-
Notifications
You must be signed in to change notification settings - Fork 1
/
sf.js
1 lines (1 loc) · 41.5 KB
/
sf.js
1
!function(){let e="* * * HIDDEN * * *",t="studio-form",n="StudioForm",r="w-file-upload-input",i=function(...e){eo.api.config.warn&&console.warn(...e)};function o(e="foo.js",t){new Promise((t,n)=>{let r=document.createElement("script");document.head.appendChild(r),r.onload=t,r.onerror=n,r.async=!0,r.src=e}).then(t)}let a=e=>`${n}["${"string"==typeof e?e:e.name}"] ->`;function l(e,t,n,r){let i=g(e);t.addEventListener(n,r),i.events.push([t,n,r])}function s(e,t,n=!1,r=!1,i){let o="string"==typeof e?e:e.name,a=eo.instances[o],l=a.elements.mask,s=i&&"object"==typeof i?i:{};s.instance=a,"number"==typeof s.next&&(s.nextName=a.logic[s.next].name),"number"==typeof s.current&&(s.currentName=a.logic[s.current].name);let u=eo.api.config,c=new CustomEvent(u.eventPrefix+t+(n?"":u.externalEventSuffix),{bubbles:u.eventBubbles,cancelable:r,detail:s});return l.dispatchEvent(c),c}let u=e=>`${a(e)} requirements.ts:`;function c(e,t){let n=g(e),o=e.logic[h(e)],a=o.element,l=[],s=[];if(t){if(!w.toUpperCase().split(", ").includes(t.tagName))return;t=[t]}let c=(()=>{function n(){if(!e.config.modes.requireRadios)return!0;let n=a.querySelectorAll('input[type="radio"]'),r=[];t&&"radio"==t[0].type&&(n=t);let i=!0;return n.forEach(e=>{-1===r.indexOf(e.name)&&r.push(e.name)}),r.forEach(e=>{let t=a.querySelectorAll(`input[type="radio"][name="${e}"]`),n=!1;t.forEach(e=>{e.checked&&(n=!0)}),n||(i=!1,t.forEach(e=>l.push({input:e,message:"unchecked"})))}),i}if("radio"===o.type)return n();if("standard"===o.type){let c=a.querySelectorAll(w);t&&(c=t),c.forEach(t=>{if("radio"===t.type||!t.hasAttribute("required"))return;let n=t.value.trim();if("file"==t.type)return void(document.querySelector(`[for="${t.id}"]`)&&!t.classList.contains(r)?t.hasAttribute("sf-attached")||s.push({input:t,message:"no attachments"}):n||s.push({input:t,message:"no files"}));if(!n)return void s.push({input:t,message:"empty"});if("number"===t.type){let o=function(e){let t=parseFloat(e.value),n=parseFloat(e.getAttribute("min")||""),r=parseFloat(e.getAttribute("max")||""),i=parseFloat(e.getAttribute("step")||"");return isNaN(t)?"Please enter a valid number.":!isNaN(n)&&t<n?`Value must be greater than or equal to ${n}.`:!isNaN(r)&&t>r?`Value must be less than or equal to ${r}.`:!(!isNaN(i)&&(t-n)%i!=0)||`Value must be in increments of ${i}.`}(t);if(!0!==o)return void s.push({input:t,message:o})}let a=function(e){let t=e.value,n=e.getAttribute("minlength"),r=e.getAttribute("maxlength");return null!==n&&t.length<parseInt(n)?`Minimum length required: ${n} characters.`:!(null!==r&&t.length>parseInt(r))||`Maximum length allowed: ${r} characters.`}(t);if(!0===a){if(t.getAttribute("pattern"))try{let l=RegExp(t.getAttribute("pattern")||"");return l.test(n)?void 0:void s.push({input:t,message:"invalid pattern",regex:l})}catch(c){i(`${u(e)} forEach() callback: Invalid regex test!`,c,t)}if("email"===t.type){let d=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!d.test(n))return void s.push({input:t,message:"invalid email",regex:d})}if("tel"===t.type){let f=/^[\d\s\-\+\(\)\.\/*#]+$/;if(!f.test(n))return void s.push({input:t,message:"invalid tel",regex:f})}if("number"===t.type){let p=/^-?(\d+|\d{1,3}(,\d{3})*)(\.\d+)?$/;if(!p.test(n))return void s.push({input:t,message:"invalid number",regex:p})}}else s.push({input:t,message:a})}),n();let d=!1;try{d=!!(l[0].input.compareDocumentPosition(s[0].input)&Node.DOCUMENT_POSITION_FOLLOWING)}catch{}return!((s=d?l.concat(s):s.concat(l)).length>0)}})(),d=n.validity;return d.length=0,s.forEach(e=>d.push(e_(e))),c}let d=e=>`${a(e)} scrollTo.ts:`;async function f(e,t,n=!1){let r="string"==typeof t?document.querySelector(t):t,i=e.config.modes;if(!r||!_(r))throw Error(`${d(e)} Invalid target!`);if(!i.scrollToTarget)return!1;let o=e.elements.wrapper.closest(A(null,"window")),a=o||window,u=D(e),c=r.getBoundingClientRect().top-(o?o.getBoundingClientRect().top:0)+(o?o.scrollTop:window.scrollY)-u;c=Math.max(c,0),Object.assign(g(e).animationData,{scrollToY:c,scrollToTarget:r,scrollToOffset:u,scrollToContainer:a});let f=()=>o?Math.floor(o.scrollTop)+1>=c&&Math.ceil(o.scrollTop)-1<=c:Math.floor(window.scrollY)+1>=c&&Math.ceil(window.scrollY)-1<=c;return!!f()||!s(e,"scroll-start",n,!0).defaultPrevented&&new Promise((t,r)=>{l(e,a,"scroll",function r(){f()&&(a.removeEventListener("scroll",r),s(e,"scroll-end",n),t(!0))}),a.scrollTo({top:c,behavior:"smooth"})})}let p=function(e,t,n,r){t+=1;let i=eo.instances[e],o=b("to",n),l=!!o&&m(i,o,e=>a(e)+" model/utils.ts:");return!1!==l?l:"submit"===b(null,n)?"done":r>t?t:"done"},m=function(e,t,n){let r="done"===t,o=e.isDone?"done":h(e);if(!["string","number"].includes(typeof t)){let a=`${n(e)} Invalid type of slide identification: `;return console.error(a,t),!1}if("string"==typeof t&&/^\d+$/.test(t)&&(t=parseInt(t)),!r){let l=!1,s="string"==typeof t;if(e.logic.every(e=>e[s?"name":"index"]!==t||(s&&(t=e.index),l=!0,!1)),!l){let u=`${n(e)} Invalid slide identification: `;return i(u,t),"done"}}if(o===t){let c=`${n(e)} New slide identification cannot equal the current slide identification!`;return i(c),!1}return t},g=function(e){return eo.ghostInstances[e.name]},h=function(e,t=1){return e.record[e.record.length-t]},y=function(e,t,n,{to:r,submit:o,prev:a}={},l=!1){let s=g(e),u=e.config.modes;return!!(()=>{if(e.isAwaiting){let a=`${t(e)} Awaiting resolve!`;return i(a),!1}if((u.awaitAnimations||n.awaitAnimations)&&e.isTransitioning){let l=`${t(e)} Animation is not yet finished!`;return i(l),!1}if(r)return!0;if(s.focus.doubleClick)return!1;if(e.isDone){let c=`${t(e)} Form already submitted!`;return i(c),!1}if(o&&u.slider){let d=`${t(e)} Slider mode does not allow submissions!`;return i(d),!1}return!0})()&&(!(!n.skipRequirements&&l&&u.reportValidity&&(u.onPrevReportValidity||!a))||e.reportValidity())};function v(e,...t){let n=null;return t.every(t=>{let r=e.getAttribute(t);return!r||(n=r,!1)}),n}function b(e,...n){var r;let i=(r=e,[`sf${null===r?"":`-${r}`}`,`${t}${null===r?"":`-${r}`}`]),o=null;return i.forEach(e=>{let t=null;n.every(n=>{let r=n?.getAttribute(e);return!r||(t=r,!1)}),t&&(o=t)}),o}function _(e){return e instanceof HTMLElement}function $(e,t,n,r,i=!1,o){let a="role",l="aria-label",s="submit"===t?`Submit ${(r instanceof HTMLElement?r:r.elements.mask).getAttribute("data-name")||"form"}`:"string"==typeof t?t:`Show slide ${t+1} of ${o||r.logic.length}`;e.hasAttribute(a)&&!i||e.setAttribute(a,n||"button"),e.hasAttribute(l)&&!i||e.setAttribute(l,s)}function x(e){return encodeURIComponent((v(e,"data-name","name","id","class","type")||e.tagName).trim()).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%2E/g,".").replace(/%3A/g,":").replace(/%24/g,"$").replace(/%40/g,"@")}let w="input, select, textarea",E=A(null,"submit","next")+",.w-button"+A(null,"no-next","no-button","prev").split(",").map(e=>`:not(${e})`).join("");function A(e,...n){let r="";return n.forEach((i,o)=>{let a=[`[sf="${i}"]`,`[${t}="${i}"]`],l=`[sf-id="${e}"]`,s=[`[sf-${e}="${i}"]`,`[${t}-${e}="${i}"]`];e?(r+=a.map(e=>`${l} ${e}`).join()+",",r+=s.join()+(o<n.length-1?",":"")):r+=a.join()+(o<n.length-1?",":"")}),r}let k=e=>{let t=e.closest(A(null,"cascader")),n=["checkbox","radio"].includes(e.getAttribute("type")||"")?e.closest("label"):null;return t||n||e},T=(...e)=>{e.forEach(e=>{let t=e.element;e.closest&&(t=k(t));let n=[t];e.otherEls&&e.otherEls.forEach(e=>n.push(e)),eo.api.config.classCascading&&t.querySelectorAll("*").forEach(e=>n.push(e)),n.forEach(t=>t.classList?.[e.mode](`${eo.api.config.comboClassPrefix}${e.class}`))})},S={class:"hide",closest:{cascader:!0}},q=e=>{var t;t=e,T({...S,element:t,mode:"add"})};function C(e,t,n=!1){let r=e.elements.wrapper.closest(A(null,"window")),i=t.getBoundingClientRect(),o=r?.getBoundingClientRect(),a=D(e),l=o?.height||window.innerHeight;return i.top-(o?.top||0)-a>=-1&&i.top-(o?.top||0)<l&&(!n||i.bottom-(o?.bottom||0)<l)}function D(e){let t=e.config.animations.offset;return"number"==typeof t?t:document.querySelector(t)?.offsetHeight||16}function L(e){let t=e.querySelectorAll(w),n=e.querySelectorAll(E).length<1;n&&t.forEach(e=>{"radio"!==e.getAttribute("type")&&(n=!1)});let r="standard";return n&&(r="radio"),r}function P(e,t,n,r,i,o){let a=t.querySelectorAll(w),l=t.querySelectorAll(E),s=[];function u(e,t){let a={index:t,element:e,get next(){return p(r,n,e,o)},defaultText:e.innerHTML};setTimeout(()=>{let t=a.next;$(e,"done"===t?"submit":t,null,i,!0,o)},500),s.push(a)}return"radio"===e?(a.forEach((e,t)=>{u(k(e),t)}),s):(l.forEach((e,t)=>{u(e,t)}),s)}function I(e,t){if(!t.swapSubmitButtons)return;let n=e.querySelectorAll('input[type="submit"]');n.length<1||n.forEach(e=>{let t=e.attributes,n={};for(let r of t)n[r.name]=r.value;let i=document.createElement("a");for(let o in n)i.setAttribute(o,n[o]);i.removeAttribute("type"),i.removeAttribute("value"),i.setAttribute("sf","submit"),i.innerHTML=e.getAttribute("value")||"",e.after(i),e.remove()})}let M=e=>`${a(e)} configAnimations.ts:`;function R(t,n=!1,i=!1,o=!1,a=null){let l="FORM"===t.elements.mask.tagName?t.elements.mask:null,s=t.config.modes,u=t.config.fetch,c=g(t),d=c.hiddenData;if(!l)return!1;let f=[],p=[],m=""==u.action||!s.simpleData;(i||o)&&(m=!1);let h=!1,y=l.getAttribute("data-wf-flow"),v=m?[{key:"name",value:l.getAttribute("data-name")||""},{key:"pageId",value:document.querySelector("html")?.getAttribute("data-wf-page")||""},{key:"elementId",value:l.getAttribute("data-wf-element-id")||""},{key:"source",value:location.href},{key:"wfFlow",value:y}]:[];function b(e,t){if("string"==typeof t)""!==t&&f.push({key:e,value:t});else{let n=t instanceof File,i=n?t:null;if(!n){let o=t.files;i=!t.multiple&&o?o[0]:o,t.classList.contains(r)&&(h=!0,i=t.getAttribute("data-value"))}let a=c.files[e],l=a&&!h?a:i,s=l instanceof FileList;if(!l)return;function u(t,n=e){let r=null===t,i=m?`${n}${r?"":"]["+t}`:n;p.push({key:i,value:r?l:l[t]})}if(s)for(let d=0;d<l.length;d++)u(d);else u(null)}}y||v.pop(),t.logic.forEach(r=>{(null===a||r.index===a)&&(o||!s.partialData||t.record.includes(r.index))&&r.element.querySelectorAll(w).forEach(t=>{let r=x(t),i="file"!==t.type?"password"!=t.type||n?t.value:e:t;("radio"!=t.type||t.checked)&&((o||s.booleanCheckboxValues)&&"checkbox"==t.type&&("on"==i&&(i="true"),"off"==i&&(i="false")),b(r,i),t instanceof HTMLSelectElement&&t.multiple&&Array.from(t.selectedOptions).forEach((e,t)=>{t&&b(r,e.value)}))})}),i||Object.keys(d).forEach(t=>{b(t,n?d[t]:e)}),i&&(p=[]);let _=p.length>0&&!h?new FormData:new URLSearchParams,$=new Set;return[{name:"fields",data:f},{name:"fileUploads",data:p}].forEach(e=>{e.data.forEach(t=>{var n;let r=`${e.name}[${t.key}]`;if(m&&(n=t.key,$.has(n)||($.add(n),0))){if("fields"==e.name){let i=v.findIndex(e=>e.key==r),o=v[i];o.value=o.value+u.valueSeparator+t.value}}else v.push(m?{key:r,value:t.value}:t)})}),v.forEach(e=>_.append(e.key,e.value)),_}let N=e=>`${a(e)} fetch.ts:`;async function H(t,n,r=!1){let i=await t.recaptcha();i&&(t.hidden.recaptcha=i),window.turnstile&&(t.hidden["cf-turnstile-response"]=turnstile.getResponse());let o=n.formData||R(t,!0),a=o instanceof FormData,l=t.config.fetch,u=l.action;if(!1===o)return!1;let c="POST",d="https://webflow.com/api/v1/form/"+document.querySelector("html")?.getAttribute("data-wf-site");if(""!==u){let f=l.method.toUpperCase();d=u,["GET","PUT","POST","PATCH","DELETE"].includes(f)&&(c=f)}n.url&&(d=n.url),n.method&&(c=n.method);try{d=new URL(d)}catch(p){return console.error(`${N(t.name)}: Action URL invalid:`,p.message),!1}let m=n.accept||l.accept,h=n.contentType||l.contentType,y=n.headers||new Headers({Accept:""===m?"application/json, text/javascript, */*; q=0.01":m,"Content-Type":""===h?"application/x-www-form-urlencoded; charset=UTF-8":h}),v=void 0!==n.headers||""!==m||""!==h,b={method:c,headers:y,body:a?o:o.toString()};a&&!v&&delete b.headers,"GET"===c&&(v||delete b.headers,delete b.body,o.forEach((e,t)=>{"string"==typeof e&&d.searchParams.append(t,e)}));let _=n.authorization||g(t).auth.token||"";b.headers=b.headers||new Headers,""!==_&&b.headers.append("Authorization",`Bearer ${_}`);let $=t.data.form,x=t.data.params,w=d.toString(),E;if(""!==l.redirect)try{let A=l.redirect,k="";/^(https?:\/\/)/i.test(A)||(k=location.protocol+"//"+(A.startsWith("/")?location.hostname:""));let T=new URL(k+A);if(t.config.modes.fieldParamsRedirect){let S=T.searchParams;x.forEach((e,t)=>{S.append(t,e)}),T.search=S.toString()}E=T.toString()}catch(q){console.error(`${N(t.name)} Create redirect url: `,q)}let C={redirect:E,request:{url:w.split("?")[0],method:c,headers:new Headers(b.headers),body:"GET"===c?void 0:a?$:$.toString(),params:"GET"!==c?void 0:x}};C?.request?.headers?.has("Authorization")&&C.request.headers.set("Authorization",e);try{var D;let L=await Promise.race([fetch(w,b),(D=l.timeout,new Promise(function(e,t){setTimeout(function(){t(Error(`Request took too long! Timeout after ${D} seconds`))},1e3*D)}))]),P=new Headers(L.headers),I=L.headers.get("Content-Type"),M=I?.toLowerCase(),H;if(!M)throw Error('Couldn\'t find "Content-Type"');switch(!0){case M.indexOf("json")>-1:H=await L.json();break;case M.indexOf("text")>-1:H=await L.text();break;case M.indexOf("form")>-1:H=await L.formData();break;default:H=await L.blob()}C.response={ok:L.ok,headers:P,contentType:I,result:H,status:L.status},L.ok||(C.response.error={message:H?.message??"An error occurred during the fetch.",code:H?.code??L.status,details:H?.payload??null})}catch(O){C.response={ok:!1,headers:new Headers,result:!1,status:0,error:{message:"An error occurred during fetch or parsing",code:"FETCH_ERROR",details:O}}}let B=g(t).fetchData;return B.redirect=E,B.request=C.request,B.response=C.response,r||s(t,"fetched-api"),!0}let O=e=>`${a(e)} recaptcha.ts:`;async function B(e){let t=eo.api.config.recaptchaKey;if(""==t||!e.config.modes.recaptcha)return;if(!window.grecaptcha){let n=new Promise(e=>{o("https://www.google.com/recaptcha/api.js?render="+t,e)});await n}let r=new Promise(n=>{grecaptcha.ready(()=>{try{grecaptcha.execute(t,{action:"submit"}).then(e=>{n(e)}).catch(e=>{throw e})}catch(r){i(O(e),r),n(void 0)}})});return await r}let V=e=>`${a(e)} animatePromiseResolve.ts:`;async function j(e,n={},r=!0,i=!1,o){if(e.isAwaiting)throw Error(`${V(e.name)} There is already an active promise!`);let a="await",l=g(e),u=h(e),c=e.logic[u];function d(n="remove"){let r=A(null,a),i=[`[sf-${e.name}="${a}"]`,`[${t}-${e.name}="${a}"]`],o=[],l=c.element;return b(null,l)===a&&o.push(l),l.querySelectorAll(r).forEach(e=>o.push(e)),document.querySelectorAll(i.join()).forEach(e=>o.push(e)),o.map(e=>({element:e,mode:n,class:a}))}let f=eo.api.config,p=l.root,m="data-wait",y=e.logic[u].buttons;y&&y.forEach(e=>{let t=e.element.getAttribute(m);t&&(e.element.innerHTML=t)}),p.isAwaiting=!0,T(...d("add"));let v=()=>{},_=!1,$=e.elements.mask,x=f.eventPrefix+(i?"fetched"+(r?"":f.externalEventSuffix):"resolve");if($.addEventListener(x,w,{once:!0}),s(e,i?"submit":"promise",r,!0,{...n,slide:c}).defaultPrevented)return await w();if(_)return!0;if(i)return await w(void 0,o);async function w(e,t){let n=!1;if(t&&(n=await t()),T(...d()),p.isAwaiting=!1,y&&y.forEach(e=>{e.element.getAttribute(m)&&(e.element.innerHTML=e.defaultText)}),e){let r=e.detail?.success;_=r,v(r)}return n}return await async function(){return new Promise(e=>{v=e})}()}let z=e=>`${a(e)} submit.ts:`;async function F(e,t,n=!1,r=!1){if(!y(e,z,t,{submit:!0},!r))return!1;let i=e.config.modes,o="tabindex",a=e.elements.fail;if(i.autoShowFail&&a&&(a.style.display="",a.setAttribute(o,"-1")),t.fake)return!0;let l=await j(e,{},n,!0,async()=>H(e,{},n)),u=e.data.fetch.response,c=u?.ok||!1;return!!l&&(c||(i.autoShowFail&&a&&(a.style.display="block",a.setAttribute(o,"0")),e.elements.errors.forEach(e=>{e.innerHTML=u?.error?.message||""}),i.autoHideFail&&document.body.addEventListener("click",function(){a&&(a.style.display="",a.setAttribute(o,"-1"))},{once:!0}),s(e,"failed",n)),s(e,"fetched",n,!1,{success:u?.ok}),!r&&c&&await X(e,"done",t,n,!0),c)}let W=function(e,t,n,r){let i=e.config.animations,o=g(e).animationData,l=e.elements,s=l.wrapper,u=l.mask,c=l.done,d=e.logic,f="done"==t,p="done"==n,m=g(e),h=p?u:f?c:d[t].element,y=f?u:p?c:d[n].element,v=[n,t].includes("done")?s:u,b=s.closest(A(null,"overflow"))||s.closest("section")||s;if(m.slideCurrent=t,m.slideNext=n,!h||!y)throw Error(`${a(e)} animateTransition.ts: elements.done is not an element!`);f&&(d[n].element.style.display="");let _=h.getBoundingClientRect(),$=_.width,x=_.height;h.style.display=f?"":"none",y.style.display=p?"block":"";let w=y.getBoundingClientRect(),E=w.width,k=w.height;y.style.display=p?"":"none",h.style.display=f?"block":"";let T=$===E&&x===k,S=i.equalDimensionsMultiplier,q=1==f||!p&&t>n?-1:1,C=i.currentOpacity,D=i.nextOpacity,L=i.zIndex,P=i.currentMoveMultiplier,I=r.skipAnimations?0:i.currentTime,M=i.nextMoveMultiplier,R=r.skipAnimations?0:i.nextTime,N=i.direction,H="off"==N?0:1,O=("off"==N?0:N-90)*Math.PI/180;H||(T=!1),Object.assign(o,{currentElement:h,nextElement:y,parentElement:v,overflowElement:b,direction:H?N:"off",angle:O,zIndex:L,equalDimensions:T,equalDimensionsMulitplier:S,totalTime:I*(T?S:1)+R,currentX:-($*P*Math.cos(O)*1)*H*q,currentY:-(x*P*Math.sin(O)*1)*H*q,currentOpacity:C,currentWidth:$,currentHeight:x,currentMoveMultiplier:P,currentTime:I,currentDisplayStart:f?"block":"",currentDisplayEnd:f?"":"none",nextX:E*M*Math.cos(O)*H*q,nextY:k*M*Math.sin(O)*H*q,nextOpacity:D,nextWidth:E,nextHeight:k,nextMoveMultiplier:M,nextTime:R,nextDisplayStart:p?"block":""})},U=function(e){let t=g(e),n=e.data.animation,r=e.config.animations.directionAlignment,i=n.currentElement,o=n.nextElement,a=n.parentElement,l=n.overflowElement,s=gsap.timeline(),u=t.gsapTl;t.root.isTransitioning&&(u.transition?.progress(1),u.transition?.clear()),u.transition=s,t.root.isTransitioning=!0,s.set(l,{overflow:"hidden"}),s.set(a,{width:n.currentWidth,height:n.currentHeight,position:"relative"});let c="top"==r?0:"center"==r?.5:1,d=100*c+"%";s.set(i,{x:0,y:0,width:n.currentWidth,height:n.currentHeight,opacity:1,display:n.currentDisplayStart,position:"absolute",left:"50%",top:d,marginTop:-n.currentHeight*c,marginLeft:-(.5*n.currentWidth)}),s.set(o,{x:n.nextX,y:n.nextY,width:n.nextWidth,height:n.nextHeight,opacity:n.nextOpacity,zIndex:n.zIndex,display:n.nextDisplayStart,position:"absolute",left:"50%",top:d,marginTop:-n.nextHeight*c,marginLeft:-(.5*n.nextWidth)}),s.to(i,{duration:n.currentTime,x:n.currentX,y:n.currentY,opacity:n.currentOpacity}),s.to(a,{duration:n.currentTime,width:Math.max(n.currentWidth,n.nextWidth),height:Math.max(n.currentHeight,n.nextHeight)},"<"),s.to(o,{duration:n.nextTime,x:0,y:0,opacity:1},`<+=${n.equalDimensions?n.currentTime*n.equalDimensionsMulitplier:n.currentTime}`),s.to(a,{duration:n.nextTime,width:n.nextWidth,height:n.nextHeight},"<"),s.set(i,{x:"",y:"",width:"",height:"",opacity:"",display:n.currentDisplayEnd,position:"",left:"",top:"",bottom:"",marginTop:"",marginLeft:""}),s.set(o,{x:"",y:"",width:"",height:"",opacity:"",zIndex:"",position:"",left:"",top:"",bottom:"",marginTop:"",marginLeft:""}),s.set(a,{width:"",height:"",position:""}),s.set(l,{overflow:""}),o==e.elements.done&&s.set(e.elements.slides[h(e)],{display:"none"}),s.call(()=>{t.root.isTransitioning=!1})};function Y(e,t){function n(t,n,r){let i=e.logic[t],o=[`current-${t}`];i.name&&o.unshift(`current-${i.name}`);let a=A(e.name,...o);document.querySelectorAll(a).forEach(e=>{T({element:e,mode:n,class:r})})}function r(e,t,r){n(e,t?"add":"remove","completed"),n(e,r?"add":"remove","current")}let i=g(e);i.asyncRecord.forEach(t=>{e.record.includes(t)||r(t,!1,!1)}),i.asyncRecord=[...e.record];let o=[...e.record],a=e.isDone?null:o.pop();if(o.forEach(e=>{r(e,!0,!1)}),"number"==typeof a){let l=gsap.timeline(),s=i.gsapTl;i.root.isTransitioning&&(s.current?.progress(1),s.current?.clear()),s.current=l,l.to({},{duration:t}),l.call(()=>{r(a,!1,!0)})}}function K(e){let t=e.elements,n=g(e);if(t.progressBars.length<1&&t.currentSlides.length<1&&t.minMaxSlides.length<1&&t.minSlides.length<1&&t.maxSlides.length<1&&!e.config.modes.calculateProgress)return;let r=e.data.progress,i=e.config.animations,o=n.gsapTl;t.progressBars.forEach((t,a)=>{let l=gsap.timeline();n.root.isTransitioning&&(o.progress[a]?.pause(),o.progress[a]?.clear()),o.progress[a]=l;let s=b("axis",t)||i.progressBarAxis,u=s.indexOf("x")>-1,c=s.indexOf("y")>-1,d={duration:i.currentTime+i.nextTime,ease:i.ease,width:u?(e.isDone?100:r.slow.percentage)+"%":"",height:c?(e.isDone?100:r.slow.percentage)+"%":""};l.to(t,d)}),t.currentSlides.forEach(e=>{e.innerHTML=r.traversed+""}),t.minSlides.forEach(e=>{e.innerHTML=r.fast.path+""}),t.maxSlides.forEach(e=>{e.innerHTML=r.slow.path+""}),t.minMaxSlides.forEach(e=>{let t=r.slow.path>r.fast.path?r.fast.path+" - "+r.slow.path:r.slow.path+"";e.innerHTML=t})}let G=e=>`${a(e.name)} to.ts:`;async function X(e,t,n,r=!1,i=!1,o=!1){let a=e.config.modes,l=g(e),u=e.isDone?"done":h(e),c="done"!==u,d=m(e,t,G);if(!1===d)return!1;let p="done"===(t=d),v="number"==typeof t?t:"done",b="done"!==v,_=!c||b&&u>v;if(!y(e,G,n,{to:!0,prev:_},!i))return!1;let $=_?"prev":p?"done":"next";if(!n.fake&&a.promiseResolve&&(!_||a.onPrevPromiseResolve)&&(!p||a.onSubmitPromiseResolve)&&!await j(e,{direction:$,current:u,next:t},r)||p&&!i&&!await F(e,n,r,!0))return!1;if(l.root.isDone=p,b){let x=!1;e.record.every((e,t)=>!(v<=e)||(x=t,!1)),!1!==x&&(l.record.length=x),l.record.push(v)}let w="tabindex",E=e.elements.done;E&&(p||"-1"===E.getAttribute(w)?p&&E.setAttribute(w,"0"):E.setAttribute(w,"-1"));let A="aria-hidden";b&&e.logic[v].element.removeAttribute(A),c&&e.logic[u].element.setAttribute(A,"true"),W(e,u,v,n);let k=e.data.animation,T=s(e,"transition",r,!0,{current:u,next:v,direction:$});!a.transition||T.defaultPrevented||(U(e),o||K(e),setTimeout(()=>{let t=C(e,e.elements.wrapper);(a.forceScrollToTop||a.scrollToTop&&!t)&&f(e,k.nextElement,r)},k.currentHeight<k.nextHeight?1e3*k.currentTime+1:1e3*k.totalTime+1)),o||Y(e,k.currentTime);let S=e.data.fetch.redirect;return p&&S&&setTimeout(()=>{location.href=S},1e3*e.config.animations.redirectDelay),!0}let Z;function J(e,t=!0){t&&(Z.doubleClick=!0,e.click(),setTimeout(()=>{var t;delete Z.doubleClick;let n=["INPUT","A"].includes(e.tagName)?e:e.querySelector("input, a");n?.focus(),t=e,document.body.addEventListener("click",function(){Z.button==t&&(delete Z.button,J(t,!1))},{once:!0})},1)),T({element:e,class:"focus",mode:t?"add":"remove",closest:{cascader:!0}})}function Q(e,t,n){let r=eo.ghostInstances[e.name].focus,i=e.logic[h(e)],o=i.buttons;if(Z=r,"clear"==t)return r.button&&J(r.button,!1),void delete r.button;if(!o||o.length<2)return;if(!r.button){let a="radio"==i.type?i.element.querySelector('input[type="radio"]:checked')?.closest("label"):null;if(a&&"enter"==n)return void a.click();let l=a||o[0].element;return J(l),void(r.button=l)}let s=0;o.every((e,t)=>(r.button==e.element&&(s=t),!0));let u=s+("next"==t?1:-1);u<0&&(u=o.length-1),u>=o.length&&(u=0);let c=o[s].element,d=o[u].element;r.button=d,J(c,!1),J(d)}let ee=e=>`${a(e)} next.ts:`;async function et(e,t,n=!1,r){let i=g(e),o=e.config.modes,a="done",l=h(e);if(!y(e,ee,t)||i.focus.doubleClick)return!1;if(t.button&&(a=t.button.next),!t.button){let s=e.logic[l];if(!1===s.buttons)a=s.next;else if(1===s.buttons.length)a=s.buttons[0].next;else{let u=!1;if(s.buttons.every(e=>e.element!==i.focus.button||(a=e.next,u=!0,!1)),!u)return o.autoFocusButtons&&e.focus.next(r),"focused"}}return await X(e,a,t,n)}let en=e=>`${a(e)} prev.ts:`;async function er(e,t,n=!1){if(!e.config.modes.allowPrev||!y(e,en,t))return!1;let r=h(e,2);if(void 0===r){let o=`${en(e)} Can't navigate backwards any further!`;return i(o),!1}return await X(e,r,t,n)}let ei=(e,t,n)=>{var r;let o={},l=e_(function e(t,n){function r(e,r=!0){let i=function(e,t,n){let r=b("id",n),i=eo.instances[r+""],o=i?.logic[h(i)].element,a=[t,n];return o&&a.unshift(o),b(e,...a)}(e,n,t);return"true"===(i=i||r+"")}return{get allowPrev(){return r("allow-prev")},get transition(){return r("transition")},get keyboardEvents(){return r("keyboard-events")},get simpleData(){return r("simple-data")},get partialData(){return r("partial-data")},get booleanCheckboxValues(){return r("boolean-checkbox-values",!1)},get observeChecked(){return r("observe-checked")},get requireRadios(){return r("require-radios",!0)},get observeAttachments(){return r("observe-attachments")},get removeConditionallyInvisibeSlides(){return r("remove-conditionally-invisible-slides")},get slider(){return"FORM"!==n.tagName||r("slider",!1)},get swapSubmitButtons(){return r("swap-submit-buttons")},get calculateProgress(){return r("calculate-progress",!1)},get autoFocusButtons(){return r("auto-focus-buttons")},get scrollToTarget(){return r("scroll-to-target")},get scrollToTop(){return r("scroll-to-top")},get forceScrollToTop(){return r("force-scroll-to-top",!1)},get scrollToValidity(){return r("scroll-to-validity")},get forceScrollToValidity(){return r("force-scroll-to-validity",!1)},get awaitAnimations(){return r("await-animations",!1)},get autoShowFail(){return r("auto-show-fail")},get autoHideFail(){return r("auto-hide-fail")},get reportValidity(){return r("report-validity")},get nativeReportValidity(){return r("native-report-validity")},get onPrevReportValidity(){return r("on-prev-report-validity",!1)},get promiseResolve(){return r("promise-resolve",!1)},get onPrevPromiseResolve(){return r("on-prev-promise-resolve",!1)},get onSubmitPromiseResolve(){return r("on-submit-promise-resolve")},get fieldParamsRedirect(){return r("field-params-redirect",!1)},get fileDrop(){return r("file-drop")},get initDefaultStyles(){return r("init-default-styles")},get recaptcha(){return r("recaptcha")}}}(t,n),"modes",e);o["set-modes"]=e=>"boolean"==typeof e.value;let u=function e(t,n,r,i){let o=(...e)=>document.querySelectorAll(A(n,...e));return o("divider").forEach(e=>e.remove()),t.removeConditionallyInvisibeSlides&&i.childNodes.forEach(e=>{e?.classList?.contains("w-condition-invisible")&&e.remove()}),{wrapper:r,mask:i,get slides(){return i.querySelectorAll(":scope > *")},done:r.querySelector(".w-form-done"),fail:r.querySelector(".w-form-fail"),get errors(){return o("error")},get progressBars(){return o("progress-bar")},get currentSlides(){return o("current-slide")},get minMaxSlides(){return o("min-max-slides")},get minSlides(){return o("min-slides")},get maxSlides(){return o("max-slides")},get prevs(){return o("prev")},get nexts(){let a=[];return o("next").forEach(e=>{(e.closest("[sf-id]>form")||e.closest("[sf-id]>*"))!==i&&a.push(e)}),a}}}(l,e,t,n),d=e_(u);if(!u.slides.length)return void i(`${a(r=e)} instance.ts: Couldn't find slides!`,u);let m=e_(function e(t,n,r){let i=[],o=e_;for(let a=0,l=r.slides.length;a<l;a++){let s=r.slides[a];I(s,n);let u=L(s),c=o(P(u,s,a,t,r.mask,l)),d={get name(){return b("name",s)},index:a,element:s,type:u,buttons:!!c.length&&c,get next(){return p(t,a,s,l)}};i.push(o(d))}return i}(e,l,d)),y=[0],v=e_(y),_=e_(function e(t,n,r){function i(e,t,n="Current"){let r=t["slide"+n];return"string"==typeof r?e.elements.done:e.logic[r]?.element}function o(e,o=!1){let a=eo.instances[t],l=eo.ghostInstances[t],s=i(a,l),u=i(a,l,"Next");if(!u||!s)throw Error(`${M(t)} Couldn't find instance.elements.done!`);return b(e,o?s:u,r,n)}function a(e,t,n=!1){let r=parseFloat(o(e,n)||t+"");return isNaN(r)?t:r}let l={get direction(){let s=o("direction")?.toLowerCase();return"off"===s?"off":a("direction",90)},get directionAlignment(){return o("direction-alignment")||"center"},get ease(){return o("ease")||"power1.out"},get equalDimensionsMultiplier(){return a("equal-dimensions-multiplier",.5)},get offset(){let u=o("offset",!0)||"16";return/^\d+(\.\d+)?$/.test(u)?parseFloat(u):u},get time(){return a("time",1)},get progressBarAxis(){return o("progress-bar-axis",!0)||"x"},get currentMoveMultiplier(){return a("current-move-multiplier",1,!0)},get currentTime(){return a("current-time",l.time/2,!0)},get currentOpacity(){return a("current-opacity",0,!0)},get nextMoveMultiplier(){return a("next-move-multiplier",1)},get nextTime(){return a("next-time",l.time/2)},get nextOpacity(){return a("next-opacity",0)},get zIndex(){return a("z-index",1)},get redirectDelay(){return a("redirect-delay",eo.instances[t].data.animation.totalTime,!0)}};return l}(e,t,n),"animations-config",e);o["set-animations-config"]=e=>{let t=e.value,n=e.property.toString(),r=["ease","progressBarAxis"].includes(n),i=["offset"].includes(n);return(i||!r)&&("number"==typeof t||"direction"===n&&"off"===t)||(i||r)&&"string"==typeof t};let $=e_(function e(t,n){function r(e,r=!0,i){let o=b(e,n,t);return!o&&r&&(o=n.getAttribute(e)),o||i||""}return{get action(){return r("action")},get method(){return r("method")},get accept(){return r("accept",!1)},get contentType(){return r("content-type",!1)},get redirect(){return r("redirect")},get timeout(){return parseFloat(b("timeout",n,t)||"300")},get valueSeparator(){return r("value-separator",!1,", ")}}}(t,n),"fetch-config",e);o["set-fetch-config"]=e=>{let t=!1,n="timeout"===e.property;return n&&"number"==typeof e.value?t=!0:n||"string"!=typeof e.value||(t=!0),t};let x=e_({animations:_,fetch:$,modes:l}),w={},E=e_(w),S={},q=e_(S),D=[],N=e_(D),O={},V=e_(O,"files",e);["set","delete"].forEach(e=>{o[`${e}-files`]=e=>{let t=e.property.toString(),n=e.value,r=!1;return n instanceof File&&(O[t]=n,r=!0),void 0===n&&(delete O[t],r=!0),r}});let z=function(e=null){return Array.from(R(J,!0,!1,!0,e).entries()).reduce((e,[t,n])=>(e[t]?e[t]=Array.isArray(e[t])?[...e[t],n]:[e[t],n]:e[t]=n,e),{})};Object.assign(z,{animation:E,fetch:q,files:V,validity:N}),Object.defineProperties(z,{form:{get:()=>R(J)},params:{get:()=>R(J,!1,!0)},progress:{get:()=>(function e(t){let n=t.logic,r=t.record,i=h(t),o={};!function e(t){let r=n[t];if(!r)return;let i=new Set;r.buttons?r.buttons.map(e=>i.add(e.next)):i.add(r.next),i.forEach(e=>{"done"!=e&&e<=t&&i.delete(e)}),o[t]=Array.from(i),e(t+1)}(i);let a=i.toString(),l=r.length,s=function(e,t,n){let r=[{node:t,path:[t]}],i=new Set;for(;r.length>0;){let{node:o,path:a}=r.shift();if(i.add(o),o===n)return a;for(let l of e[o])i.has(String(l))||r.push({node:String(l),path:[...a,String(l)]})}return null}(o,a,"done"),u=function(e,t,n){let r=[{node:t,path:[t]}],i=null;for(;r.length>0;){let{node:o,path:a}=r.shift();if(o===n&&(i=a),"done"!=o)for(let l of e[o])r.push({node:String(l),path:[...a,String(l)]})}return i}(o,a,"done"),c=l-1+s?.length,d=l-1+u?.length;return{fast:{percentage:l/c*100,path:c-1},slow:{percentage:l/d*100,path:d-1},traversed:l}})(J)}});let W=e_(z),U={},G=e_({},"hidden",e);["set","delete"].forEach(e=>{o[`${e}-hidden`]=e=>{let t=e.property,n=e.value,r=!1;return("string"==typeof n||n instanceof File)&&(U[t.toString()]=n,r=!0),void 0!==n&&!1!==n||(delete U[t.toString()],r=!0),r}});let Z={fetch:async(e={})=>await H(J,e),promise:async(e={})=>await j(J,e),reportValidity:(...e)=>(function e(t,n=!1,...r){if(r.length){let i=[];return r.forEach(e=>{e&&("string"==typeof e&&(e=document.querySelectorAll(e)),e instanceof HTMLElement&&(e=[e]),e.forEach(e=>i.push(e)))}),void o(i)}if(s(t,"check-requirements",n,!1),c(t))return!0;if(s(t,"report-validity",n,!0).defaultPrevented)return!1;return o(t.data.validity.map(e=>e.input)),!1;async function o(e){if(e.length<1)return;let r=e[0],i=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement].some(e=>r instanceof e),o=t.config.modes;function a(){t.config.modes.nativeReportValidity&&i&&r.reportValidity()}let l=k(r),s=C(t,l,!0);function u(e,t){T({element:e,class:"required",mode:t,closest:{cascader:!0}})}(o.scrollToValidity&&!s||o.forceScrollToValidity)&&await f(t,l,n)&&a(),o.nativeReportValidity&&s&&!o.forceScrollToValidity&&a(),setTimeout(()=>{e.forEach(e=>{u(e,"add")}),document.body.addEventListener("click",function(){e.forEach(e=>{u(e,"remove")})},{once:!0})},1)}})(J,!1,...e),validate:e=>c(J,e),recaptcha:async()=>await B(J),to:async(e,t={})=>await X(J,e,t),scrollTo:async e=>await f(J,e),focus:e_({clear(){Q(J,"clear")},next(e){var t,n;t=J,Q(t,"next",n=e)},prev(){Q(J,"prev")}}),prev:async(e={})=>await er(J,e),next:async(e={})=>await et(J,e),submit:async(e={})=>await F(J,e),isAwaiting:!1,isTransitioning:!1,isDone:!1,name:e,elements:d,config:x,logic:m,record:v,data:W,hidden:G},J=e_(Z,"instance",e),ee={token:void 0};["set","delete"].forEach(t=>{o[`${t}-instance`]=t=>{let n=t.property,r=t.value,i=!1;if("record"==n&&(i=function e(t){let n=t.target,r=t.value,i=n.logic.length-1,o=g(n),a=eo.api.config,l=eo.api[n.name];if(!Array.isArray(r)||!r.length||r.some(e=>"number"!=typeof e)||r[0]<0)return!1;for(let s=1;s<r.length;s++)if(r[s]<=r[s-1]||r[s]>i)return!1;return(async()=>{let e=a.warn;a.warn=!1,l.resolve=!1,X(n,r[r.length-1],{skipRequirements:!0},!1,!1,!0),l.resolve=!0,setTimeout(()=>{a.warn=e},1),o.record.length=0,r.forEach(e=>o.record.push(e)),K(n),Y(n,n.data.animation.currentTime)})(),!1}(t)),"auth"!==n||"string"!=typeof r&&void 0!==r&&"boolean"!=typeof r||!0!==r&&(ee.token="string"==typeof r?r:void 0,i=!0),"resolve"===n&&("boolean"==typeof r||void 0===r)){if(!J.isAwaiting)return!1;s(e,"resolve",!0,!1,{success:r}),i=!0}return i}}),eo.ghostInstances[e]={animationData:w,fetchData:S,record:y,root:Z,files:O,validity:D,auth:ee,hiddenData:U,asyncRecord:[],gsapTl:{progress:[]},slideCurrent:0,slideNext:0,focus:{},proxyCallbacks:o,observer:null,events:[]},eo.instances[e]=J,eo.api[e]=eo.instances[e]},eo={activeKeyBoardInstance:"",ghostInstances:{},instances:{},initInstance(e,t,n){ei(e,t,n)},api:{},proxy:{},proxyCallbacks:{},get proxyWrite(){let ea=(eo.ghostInstances[ey.instanceName||""]?.proxyCallbacks||eo.proxyCallbacks)[ey.mode+"-"+(ey.identifier||"")];if("root"==ey.identifier&&"delete"==ey.mode){let el=ey.data.property.toString(),es=eo.instances[el];if(!es)return!1;let eu=eo.ghostInstances[el];return eu.observer?.disconnect(),eu.events.forEach(([e,t,n])=>e.removeEventListener(t,n)),function(e){let t=["role","aria-label"],n=e.elements;[n.wrapper,n.mask,...e.logic.flatMap(e=>{let t=[e.element];return e.buttons&&(t=[...t,...e.buttons.map(e=>e.element)]),t})].forEach(e=>{t.forEach(t=>e.removeAttribute(t))}),n.wrapper.removeAttribute("sf-id")}(es),delete eo.ghostInstances[el],delete eo.api[el],delete eo.instances[el],!0}if(!ea)return!1;let ec=ea(ey.data);if(ec&&"resolve"!==ey.data.property){let ed=ey.data,ef=ed.property,ep=ed.value;delete ed.target[ef],"set"===ey.mode&&(ed.target[ef]=ep),"auth"===ef&&("string"==typeof ep?ed.target[ef]=!0:delete ed.target[ef]),ey.identifier?.endsWith("hidden")&&("string"==typeof ep||ep instanceof File?ed.target[ef]=!0:delete ed.target[ef])}return ec}},em=["config","forEach","init","instances","keys","length","push","version"],eg=e_({get comboClassPrefix(){return b("combo-class-prefix",document.body)||"sf-"},get eventPrefix(){return b("event-prefix",document.body)||"sf-"},get externalEventSuffix(){return b("external-event-suffix",document.body)||"-api"},get recaptchaKey(){return b("recaptcha-key",document.body)||""},get classCascading(){return"true"===(b("class-cascading",document.body)||"true")},get eventBubbles(){return"true"===(b("event-bubbles",document.body)||"true")},get warn(){return"true"===(b("warn",document.body)||"true")}},"global-config");eo.proxyCallbacks["set-global-config"]=e=>{let t=e.property,n=e.value,r=["classCascading","eventBubbles","warn"].includes(t.toString());return r&&"boolean"==typeof n||!r&&"string"==typeof n};let eh=(e,t)=>{eo.api={version:"1.5.2",push:e,init:t,config:eg,get keys(){return Object.keys(this).filter(e=>!em.includes(e))},get length(){return this.keys.length},forEach:function(e){this.keys.forEach((t,n)=>{e(this[t],n,this.instances)})},get instances(){return this.keys.map(e=>this[e])}},eo.proxy=e_(eo.api,"root")},ey,ev=(e,t)=>`property "${String(e)}"${t?` to "${t}"`:""} is not allowed.`,eb=`${n} -> model.ts:`;function e_(e,t,n){return new Proxy(e,{set:(e,r,o)=>(ey={mode:"set",identifier:t,instanceName:n,data:{target:e,property:r,value:o}},!!eo.proxyWrite||(i(`${eb} Setting ${ev(r,o)}`),!1)),deleteProperty:(e,r)=>(ey={mode:"delete",identifier:t,instanceName:n,data:{target:e,property:r}},!!eo.proxyWrite||(i(`${eb} Deleting ${ev(r)}`),!1)),setPrototypeOf:()=>(i(`${eb} Changing the prototype is not allowed.`),!1),defineProperty:(e,t)=>(i(`${eb} Defining ${ev(t)}`),!1)})}let e$=`${n} -> view.ts:`,ex=`${n} -> controller.ts:`;function ew(){let e=window[n],o=[];if(Array.isArray(e)&&(o=e||[]),void 0!==e&&!Array.isArray(e))return void console.warn(`${ex} ${n} is being loaded multiple times. The functionality should not be affected.`);eh((...t)=>{t.forEach((t,n)=>{"function"==typeof t?t(e):i(`${ex} `,t," is not a function!")})},()=>{var e;e=eo,document.querySelectorAll(A(null,"wrapper","mask")).forEach(async t=>{var n;let o="FORM"===t.tagName?t.parentElement:"mask"!==b(null,t)||t.classList.contains("w-form")?t:t.parentElement,a=o.querySelector(":scope > form")||o.firstElementChild;if(!a)return void i(`${e$} Couldn't find mask!`,o);let u="sf-id";if(o.hasAttribute(u))return;let c=(v(a,"data-name","name","id","class")||a.tagName).replace(/[^a-zA-Z0-9-_.]/g,"_");["id","name","to","cloak","value","required","attached",...Object.keys(e.api)].forEach(e=>{if(e.toLowerCase()!==c.toLowerCase())return;let t=e.split("_"),n=parseInt(t.pop()||"");c=isNaN(n)?e+"_2":t.join("_")+"_"+(n+1)}),o.setAttribute(u,c),e.initInstance(c,o,a);let d=e.api[c];if(!d)return;Y(d,0),setTimeout(()=>{K(d)},500);let f=d.config.modes,p=f.initDefaultStyles,m="aria-hidden";$(o,f.slider?"carousel":"progressive form","region");let h=d.elements.slides;h.forEach((e,t,n)=>{let r=e;p&&(r.style.display="none"),$(r,`${t+1} of ${n.length}`,"group"),r.setAttribute(m,"true")});let y=h[0];p&&(y.style.display=""),y.removeAttribute(m);let w=new MutationObserver(S);w.observe(a,{childList:!0,subtree:!0}),eo.ghostInstances[c].observer=w;let E=!1;function S(e){if(!E&&null!==e)return;E||(E=!0);let t=[],n=[],i=[];function o(e){e.forEach(e=>{let r=[e];e instanceof Element&&e.querySelectorAll("input").forEach(e=>r.push(e)),r.forEach(e=>{e instanceof HTMLInputElement&&("file"===e.type&&t.push(e),"checkbox"===e.type&&n.push(e),"radio"===e.type&&i.push(e))})})}e?e.forEach(e=>{"childList"===e.type&&o(e.addedNodes)}):o(a.childNodes),f.observeAttachments&&function e(t,n){let i=g(t),o=t.config.modes;n.length&&n.forEach(e=>{let n=document.querySelector(`[for="${e.id}"]`),a=n?.querySelector(A(null,"swap-label")),u=a?.innerHTML;if(!_(n)||e.classList.contains(r))return;function c(e="remove"){f(e,"drag-over")}function d(e){f(e,"attached")}function f(e,t){T({class:t,mode:e,element:n})}["dragover","dragleave","drop"].forEach((e,r)=>{l(t,n,e,function(e){if(o.fileDrop)switch(e?.preventDefault(),r){case 0:c("add");break;case 1:c();break;case 2:c(),m(e.dataTransfer?.files)}})}),l(t,n,"click",t=>{o.fileDrop&&(e.files?.length||m(null))}),l(t,e,"change",t=>{m(e.files)});let p="sf-attached";function m(r){function o(r=!1){d("remove"),a&&u&&(a.innerHTML=u),r&&t.reportValidity(n),delete i.files[c],e.removeAttribute(p),s(t,"detached",!0,!1,{key:c})}let l=e.multiple,c=x(e);if(!r||!r.length)return void o();function f(t){let r=parseFloat(b(t,e,n)||"");return isNaN(r)?null:r}let m=f("min-files"),g=f("max-files"),h=f("min-size"),y=f("max-size"),v=[];for(let _=0,$=r.length;_<$;_++){let w=r[_];if(!l&&_)break;null!==h&&w.size<h||null!==y&&w.size>y||v.push(w)}if(null!==m&&v.length>=m&&(v=[]),null!==g&&v.length<=g&&(v=[]),!v.length)return void o(!0);let E=v.map(e=>e.name).join(t.config.fetch.valueSeparator),A=(b("swap-prefix",e,n)||"")+E+(b("swap-suffix",e,n)||"");a&&(a.innerHTML=A),d("add"),i.files[c]=l?e_(v):v[0],e.setAttribute(p,""),s(t,"attached",!0,!1,{key:c})}})}(d,t),f.observeChecked&&function e(t,n,r){function i(e,t="remove"){T({element:e,class:"checked",mode:t,closest:{cascader:!0}})}function o(e){for(;e&&e.parentElement;){if(e.parentElement===t.elements.mask)return e;e=e.parentElement}return null}(r.length||n.length)&&(n.forEach(e=>{let n=k(e);l(t,n,"click",t=>{if("INPUT"!==t?.target?.tagName)return;let n=o(e)?.querySelectorAll(`input[name="${e.name}"][type="radio"]`);n?.forEach(t=>{t!==e&&i(t)}),i(e,"add")})}),r.forEach(e=>{let n="sf-required";function r(t){let r=o(e)?.querySelectorAll(`input[name="${e.name}"][type="checkbox"]`);if(r){if(r.length<2&&(e.required="true"===e.getAttribute(n)),r.length>1){let a=parseInt(b("min",...r)||"1");a=isNaN(a)?1:a;let l=parseInt(b("max",...r)||"");l=isNaN(l)?null:l;let s=0;r.forEach(e=>s+=e.checked?1:0);let u=s>=a;null!==l&&(u=s<=l),function(e,t){e.forEach(e=>e.required=t)}(r,!u)}t?(e.value=b("value",e)||"on",i(e,"add")):(e.value=e.hasAttribute("required")||r.length>1?"":"off",i(e,"remove"))}}e.hasAttribute(n)||e.setAttribute(n,e.hasAttribute("required")+""),r(e.hasAttribute("checked"));let a=k(e);l(t,a,"click",t=>{"INPUT"===t?.target?.tagName&&r(e.checked)})}))}(d,i,n)}setTimeout(()=>{S(null)},1),(n=d).logic.forEach(e=>{e.buttons&&e.buttons.forEach(e=>{$(e.element,"number"==typeof e.next?e.next:"submit",null,n),l(n,e.element,"click",t=>{let r=t?.target;r&&("BUTTON"==(r.querySelector("button")||r).tagName&&t?.preventDefault(),("LABEL"==r.tagName?r:r.closest("label"))&&"INPUT"!=r.tagName||et(n,{button:e},!0))})})}),n.elements.nexts.forEach(e=>{$(e,"next slide",null),l(n,e,"click",()=>{et(n,{},!0,"enter")})}),n.elements.prevs.forEach(e=>{q(e),$(e,"previous slide",null),l(n,e,"click",()=>{er(n,{},!0)})}),l(n,n.elements.wrapper,"mouseover",()=>{eo.activeKeyBoardInstance=n.name}),eo.api.keys[0]===n.name&&(eo.activeKeyBoardInstance=n.name),l(n,document,"keydown",e=>{if(!(e instanceof KeyboardEvent))return;let t=e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement?e.target:null;if(eo.activeKeyBoardInstance!==n.name||!n.config.modes.keyboardEvents||t instanceof HTMLTextAreaElement||n.isDone)return;let r=["text","email","password","tel","number"];if("Backspace"===e.key){if(r.includes(t?.type||""))return;er(n,{},!0),n.focus.clear()}else if("Enter"===e.key)!async function(){!0===await et(n,{},!0,"enter")&&n.focus.clear()}();else if("ArrowLeft"===e.key)n.focus.prev();else if("ArrowRight"===e.key){if(r.includes(t?.type||""))return;n.focus.next()}})})}),e=eo.proxy,window[n]=e,document.querySelectorAll(["sf",t].map(e=>`[${e}-cloak]`).join()).forEach(e=>{T({element:e,mode:"add",class:"hide"})}),e.init(),e.push(...o)}function eE(){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",ew):ew()}document.querySelector('script[src*="/gsap.min.js"]')?(()=>{let e=setInterval(()=>{window.gsap&&(clearInterval(e),eE())},4)})():o("https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js",eE)}();