if(typeof window.nmresize=='undefined'){ window.nmresize=true; var search = window.location.search; if (search != '') { document.querySelectorAll('.payment-form').forEach(t => { t.setAttribute('src', t.src + search); }); } var already_running=false; function resize_iframe(idx){ setTimeout(function(idx){ iFrameResize({ log: false, checkOrigin: false, // heightCalculationMethod : 'lowestElement' }, '#'+idx); },500,idx); } window.addEventListener('message',function(e){ if(e.data.type=='fpr'){ try{ fpr("referral",e.user); }catch(err){} } if(e.data?.type=='init_standalone_form' && !already_running){ already_running=true; let xt=document.querySelectorAll('iframe[id*="form_"]'); xt.forEach((t,ind)=>{ let atz=t.getAttribute('resizedx') || ""; if(atz==""){ let idx=t.id; t.setAttribute('id',idx); t.setAttribute('resizedx',1); resize_iframe(idx); } if(xt.length-1==ind){ already_running=false; } }); } }); (()=>{function le(){"use strict";function e(o,m,g){"addEventListener"in window?o.addEventListener(m,g,!1):"attachEvent"in window&&o.attachEvent("on"+m,g)}function i(){var o,m=["moz","webkit","o","ms"];for(o=0;ov)throw new Error("Value for min"+f+" can not be greater than max"+f);n(" Checking "+z+" is in range "+N+"-"+v),N>S&&(S=N,n(" Set "+z+" to min value")),S>v&&(S=v,n(" Set "+z+" to max value")),w[z]=""+S}function B(){var f=w.iframe.src;!f&&w.iframe.getAttribute("data-src")&&(f=w.iframe.getAttribute("data-src"));var v=o.origin,N=f.split("/").slice(0,3).join("/");if(d.checkOrigin&&(n(" Checking connection is from: "+N),""+v!="null"&&v!==N))throw new Error("Unexpected message received from: "+v+" for "+w.iframe.id+". Message was: "+o.data+". This error can be disabled by adding the checkOrigin: false option.");return!0}function $(){return U===(""+H).substr(0,M)}function Y(){var f=w.type in{true:1,false:1};return f&&n(" Ignoring init message from meta parent page"),f}function I(f){return H.substr(H.indexOf(":")+ie+f)}function T(f){n(" MessageCallback passed: {iframe: "+w.iframe.id+", message: "+f+"}"),d.messageCallback({iframe:w.iframe,message:JSON.parse(f)}),n(" --")}function ge(){if(w.iframe===null)throw new Error("iFrame ("+w.id+") does not exist on "+_);return!0}function oe(f){var v=f.getBoundingClientRect();return r(),{x:parseInt(v.left,10)+parseInt(h.x,10),y:parseInt(v.top,10)+parseInt(h.y,10)}}function de(f){function v(){h=S,se(),n(" --")}function N(){return{x:Number(w.width)+z.x,y:Number(w.height)+z.y}}var z=f?oe(w.iframe):{x:0,y:0},S=N();n(" Reposition requested from iFrame (offset x:"+z.x+" y:"+z.y+")"),window.top!==window.self?window.parentIFrame?f?parentIFrame.scrollToOffset(S.x,S.y):parentIFrame.scrollTo(w.width,w.height):s(" Unable to scroll to requested position, window.parentIFrame not found"):v()}function se(){d.scrollCallback(h)!==!1&&p()}function he(f){function v(we){var G=oe(we);n(" Moving to in page link (#"+N+") at x: "+G.x+" y: "+G.y),h={x:G.x,y:G.y},se(),n(" --")}var N=f.split("#")[1]||"",z=decodeURIComponent(N),S=document.getElementById(z)||document.getElementsByName(z)[0];window.top!==window.self?window.parentIFrame?parentIFrame.moveToAnchor(N):n(" In page link #"+N+" not found and window.parentIFrame not found"):S?v(S):n(" In page link #"+N+" not found")}function ye(){switch(w.type){case"close":g(w.iframe),d.resizedCallback(w);break;case"message":T(I(6));break;case"scrollTo":de(!1);break;case"scrollToOffset":de(!0);break;case"inPageLink":he(I(9));break;case"reset":c(w);break;case"init":m(),d.initCallback(w.iframe);break;default:m()}}var H=o.data,w={};$()&&(n(" Received: "+H),w=x(),!Y()&&ge()&&B()&&(ye(),D=!1))}function r(){h===null&&(h={x:window.pageXOffset!==void 0?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==void 0?window.pageYOffset:document.documentElement.scrollTop},n(" Get page position: "+h.x+","+h.y))}function p(){h!==null&&(window.scrollTo(h.x,h.y),n(" Set page position: "+h.x+","+h.y),h=null)}function c(o){function m(){l(o),A("reset","reset",o.iframe)}n(" Size reset requested by "+(o.type==="init"?"host page":"iFrame")),r(),k(m,o,"init")}function l(o){function m(g){o.iframe.style[g]=o[g]+"px",n(" IFrame ("+o.iframe.id+") "+g+" set to "+o[g]+"px")}d.sizeHeight&&m("height"),d.sizeWidth&&m("width")}function k(o,m,g){g!==m.type&&E?(n(" Requesting animation frame"),E(o)):o()}function A(o,m,g){n("["+o+"] Sending msg to iframe ("+m+")"),g.contentWindow.postMessage(U+m,"*")}function R(){function o(){function I(T){1/0!==d[T]&&d[T]!==0&&($.style[T]=d[T]+"px",n(" Set "+T+" = "+d[T]+"px"))}I("maxHeight"),I("minHeight"),I("maxWidth"),I("minWidth")}function m(I){return I===""&&($.id=I="iFrameResizer"+ee++,n(" Added missing iframe ID: "+I+" ("+$.src+")")),I}function g(){n(" IFrame scrolling "+(d.scrolling?"enabled":"disabled")+" for "+Y),$.style.overflow=d.scrolling===!1?"hidden":"auto",$.scrolling=d.scrolling===!1?"no":"yes"}function x(){(typeof d.bodyMargin=="number"||d.bodyMargin==="0")&&(d.bodyMarginV1=d.bodyMargin,d.bodyMargin=""+d.bodyMargin+"px")}function O(){return Y+":"+d.bodyMarginV1+":"+d.sizeWidth+":"+d.log+":"+d.interval+":"+d.enablePublicMethods+":"+d.autoResize+":"+d.bodyMargin+":"+d.heightCalculationMethod+":"+d.bodyBackground+":"+d.bodyPadding+":"+d.tolerance}function B(I){e($,"load",function(){var T=D;A("iFrame.onload",I,$),!T&&d.heightCalculationMethod in Q&&c({iframe:$,height:0,width:0,type:"init"})}),A("init",I,$)}var $=this,Y=m($.id);g(),o(),x(),B(O())}function Z(o){if(typeof o!="object")throw new TypeError("Options is not an object.")}function W(o){o=o||{},Z(o);for(var m in y)y.hasOwnProperty(m)&&(d[m]=o.hasOwnProperty(m)?o[m]:y[m])}function q(){function o(m){if(!m.tagName)throw new TypeError("Object is not a valid DOM element");if(m.tagName.toUpperCase()!=="IFRAME")throw new TypeError("Expected