/*! stripe-js 18-02-2017 */ (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m={}.hasOwnProperty,n=function(a,b){function c(){this.constructor=a}for(var d in b)m.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};if(j="https://js.stripe.com",e="https://js.stripe.com",f=!!/stripe\.com$/.test("undefined"!=typeof window&&null!==window?window.location.host:void 0),d="console"in window&&"warn"in window.console,c=function(){var a;return(null!=(a=window.performance)&&"function"==typeof a.now?a.now():void 0)||("function"==typeof Date.now?Date.now():void 0)},i=c(),!f&&"querySelectorAll"in document&&d&&(h=document.querySelectorAll('script[src^="'+j+'"]'),h.length||console.warn("It looks like Stripe.js is not being loaded from https://js.stripe.com. Stripe does not support serving Stripe.js from your own domain.")),a=function(){function a(){if(a.StripeV3)return a.StripeV3.apply(a,arguments)}return a.version=2,a.endpoint="https://api.stripe.com/v1",a.StripeV3=null,a.setPublishableKey=function(b){return a.key=b,a.utils.validateProtocol(a.key)},a._language="en-US",a.setLanguage=function(b){return a._language=b},a._allowedCustomHeaders=["X-Stripe-Livemode","Authorization"],a._customHeaders={},a._setCustomHeader=function(a,b){var c,d,e,f,g;for(d=!1,g=this._allowedCustomHeaders,e=0,f=g.length;e0&&(e.amount=g)),b._fields&&b.createToken)return b.createToken(f);if(e[d.tokenName]=a.token.formatData(b,d.whitelistedAttrs),e.time_on_page=Math.round(c()-i),null==e.guid&&(e.guid="EMPTY"),null==e.muid&&(e.muid="EMPTY"),"undefined"!=typeof StripeMirador&&null!==StripeMirador)try{"EMPTY"===e.guid&&(e.guid=a.utils.getSID()),"EMPTY"===e.muid&&(e.muid=a.utils.getMID())}catch(j){h=j,a.reportError("DeviceIdError-Extraction")}return a.token.create(e,f)},d.getToken=function(b,c){return a.token.get(b,c)},d.validateCardNumber=function(a){return a=(a+"").replace(/\s+|-/g,""),a.length>=10&&a.length<=16&&d.luhnCheck(a)},d.validateCVC=function(b){return b=a.utils.trim(b),/^\d+$/.test(b)&&b.length>=3&&b.length<=4},d.validateExpiry=function(b,c){var d,e,f,g;if(null!=c)f=a.utils.trim(b),c=a.utils.trim(c);else{try{g=a.utils.parseExpString(b),f=g[0],c=g[1]}catch(h){return!1}f+="",c+=""}return!!/^\d+$/.test(f)&&(!!/^\d+$/.test(c)&&(1<=f&&f<=12&&(2===c.length&&(c=c<70?"20"+c:"19"+c),4===c.length&&(e=new Date(c,f),d=new Date,e.setMonth(e.getMonth()-1),e.setMonth(e.getMonth()+1,1),e>d))))},d.luhnCheck=function(a){var b,c,d,e,f,g;for(d=!0,e=0,c=(a+"").split("").reverse(),f=0,g=c.length;f9&&(b-=9),e+=b;return e%10===0},d.cardType=function(a){return d.cardTypes[a.slice(0,2)]||"Unknown"},d.cardBrand=function(a){return d.cardType(a)},d.cardTypes=function(){var a,b,c,d;for(b={},a=c=40;c<=49;a=++c)b[a]="Visa";for(a=d=50;d<=59;a=++d)b[a]="MasterCard";return b[34]=b[37]="American Express",b[60]=b[62]=b[64]=b[65]="Discover",b[35]="JCB",b[30]=b[36]=b[38]=b[39]="Diners Club",b}(),d}(this.Stripe.token),this.Stripe.bankAccount=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return n(c,b),c.tokenName="bank_account",c.whitelistedAttrs=["country","currency","routing_number","account_number","name","account_holder_type","account_holder_name"],c.createToken=function(b,d,e){return null==d&&(d={}),a.token.validate(b,"bank account"),"function"==typeof d&&(e=d,d={}),d[c.tokenName]=a.token.formatData(b,c.whitelistedAttrs),a.token.create(d,e)},c.getToken=function(b,c){return a.token.get(b,c)},c.validateRoutingNumber=function(b,d){switch(b=a.utils.trim(b),d){case"US":return/^\d+$/.test(b)&&9===b.length&&c.routingChecksum(b);case"CA":return/\d{5}\-\d{3}/.test(b)&&9===b.length;default:return!0}},c.validateAccountNumber=function(b,c){switch(b=a.utils.trim(b),c){case"US":return/^\d+$/.test(b)&&b.length>=1&&b.length<=17;default:return!0}},c.routingChecksum=function(a){var b,c,d,e,f,g;for(d=0,b=(a+"").split(""),g=[0,3,6],e=0,f=g.length;e=400&&g<500?(a._clearPoll(b),"function"==typeof f?f(g,h):void 0):200===g&&e(b,h)?(a._clearPoll(b),"function"==typeof f?f(g,h):void 0):(200===g&&d(b,h)&&"function"==typeof f&&f(g,h),500===g&&2*a._activePolls[b].interval<=a._maxPollInterval?a._activePolls[b].interval*=2:g>=200&&g<500&&(a._activePolls[b].interval=a._defaultPollInterval),i=setTimeout(function(){return a._poll(b,c,d,e,f)},a._activePolls[b].interval),a._activePolls[b].timeoutId=i)})},a._cancelPoll=function(b){var c;if(c=a._activePolls[b],null==c)throw new Error("You are not polling "+b+".");null!=c.timeoutId&&clearTimeout(c.timeoutId),a._clearPoll(b)},a}(),this.Stripe.bitcoinReceiver=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return n(c,b),c._whitelistedAttrs=["amount","currency","email","description"],c.createReceiver=function(b,c){var d;return a.token.validate(b,"bitcoin_receiver data"),d=a.token.formatData(b,this._whitelistedAttrs),d.key=a.key||a.publishableKey,a.utils.validateKey(d.key),a.request({url:""+a.endpoint+"/bitcoin/receivers",data:d,method:"POST",success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred while creating a Bitcoin address. Please try again."),timeout:4e4})},c.getReceiver=function(b,c){var d;if(!b)throw new Error("receiver id required");return d=a.key||a.publishableKey,a.utils.validateKey(d),a.request({url:""+a.endpoint+"/bitcoin/receivers/"+b,data:{key:d},success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred loading data from Stripe. Please try again."),timeout:4e4})},c.pollReceiver=function(a,b){return this._initPoll(a),this._poll(a,function(a){return function(b,c){return a.getReceiver(b,c)}}(this),function(a,b){return!1},function(a,b){return b.filled},b)},c.cancelReceiverPoll=function(a){return c._cancelPoll(a)},c}(this.Stripe._poller),this.Stripe.source=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return n(c,b),c.stripeAccount=null,c.create=function(b,c){var d,e;return a.token.validate(b,"source data"),d=a.token.formatData(b,this._whitelistedAttrs),d.key=a.key||a.publishableKey,a.utils.validateKey(d.key),e={url:""+a.endpoint+"/sources",data:d,method:"POST",success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred while creating a Source. Please try again."),timeout:4e4,headers:a.source.stripeAccount?{"Stripe-Account":a.source.stripeAccount}:{}},a._language&&(e.headers["Accept-Language"]=a._language),a.request(e)},c.createThreeDSecure=function(a,b){var c,d,e,f;return c={type:"card",currency:a.currency},(null!=(e=a.three_d_secure)?e.card:void 0)&&(c.card={number:a.three_d_secure.card.number,cvc:a.three_d_secure.card.cvc,exp_month:a.three_d_secure.card.exp_month,exp_year:a.three_d_secure.card.exp_year}),(null!=(f=a.owner)?f.address:void 0)&&(c.owner||(c.owner={}),(d=c.owner).address||(d.address=a.owner.address)),this.create(c,function(c){return function(d,e){var f;return 200===d?(f={type:"three_d_secure",amount:a.amount,currency:e.currency,three_d_secure:{card:e.id},redirect:{return_url:a.redirect.return_url}},c.create(f,b)):[d,e]}}(this))},c.get=function(b,c,d){var e,f;if(!b)throw new Error("sourceId required");if(!c)throw new Error("clientSecret required");return e=a.key||a.publishableKey,a.utils.validateKey(e),f={},f.key=e,f.client_secret=c,a.request({url:""+a.endpoint+"/sources/"+b,data:f,success:function(a,b){return"function"==typeof d?d(b,a):void 0},complete:a.complete(d,"A network error has occurred loading data from Stripe. Please try again."),timeout:4e4,headers:a.source.stripeAccount?{"Stripe-Account":a.source.stripeAccount}:{}})},c.poll=function(a,b,c){return this._initPoll(a),this._poll(a,function(a){return function(c,d){return a.get(c,b,d)}}(this),function(a){return function(b,c){return a._activePolls[b].source_status!==c.status&&(a._activePolls[b].source_status=c.status,!0)}}(this),function(a,b){return!1},c)},c.cancelPoll=function(a){return this._cancelPoll(a)},c}(this.Stripe._poller),this.Stripe.threeDSecure=function(){function b(){}return b.create=function(b,c){var d;if("object"!=typeof b)throw new Error("params must be an object.");if("function"!=typeof c)throw new Error("callback must be a function.");return b.key||(b.key=a.key||a.publishableKey),b.return_url||(b.return_url="_callback"),a.utils.validateKey(b.key),d={url:""+a.endpoint+"/3d_secure",data:b,method:"POST",headers:{},success:function(a,b){return"function"==typeof c?c(b,a):void 0},complete:a.complete(c,"A network error has occurred, and you have not been charged. Please try again."),timeout:4e4,tokenType:"three_d_secure"},a._language&&(d.headers["Accept-Language"]=a._language),a.request(d),null},b.createIframe=function(b,c,d){var e,f;if(f=null,!a.validator.isUrl(b))throw new Error("redirectUrl must be a valid URL.");if(!a.validator.isElementOrId(c))throw new Error("parentElement must be a DOM Element, or the ID of a DOM element.");if("function"!=typeof d)throw new Error("callback must be a function.");return e=function(b,c){var e,g;try{g=a.JSON.parse(b)}catch(h){throw e=h,a.reportError("InvalidJSON-3DSecureCallback"),new Error("Stripe.js received invalid JSON")}return f.destroy(),d(g)},f=new a.easyXDM.Socket({swf:""+a._iframeBaseUrl+"/v2/stripexdm.swf",remote:b,onMessage:e,container:c}),null},b}(),this.Stripe.applePay=function(){function b(){}return b.stripeAccount=null,b._isOverHTTPS=function(){return"https:"===window.location.protocol},b.checkAvailability=function(b){var c,d,e,f;if(null==b)throw new Error("This function executes asynchronously; please pass it a callback function.");return this._isOverHTTPS()?(d=/^pk_test_/.test(a.key||a.publishableKey))?void b(null!=(e=window.ApplePaySession)?e.canMakePayments():void 0):(null!=(f=window.ApplePaySession)?f.canMakePayments():void 0)?(c=this.stripeAccount?"merchant."+window.location.hostname+"."+this.stripeAccount+".stripe":"merchant."+window.location.hostname+".stripe",ApplePaySession.canMakePaymentsWithActiveCard(c).then(function(a){return b(a)})):void b(!1):(console.warn("To use Apple Pay, you must serve your page over HTTPS."),void b(!1))},b.buildSession=function(b,c,d){return new a.ApplePaySession(b,c,d)},b.createToken=function(b,c){var d,e,f;return d={apple_pay:!0,pk_token:a.JSON.stringify(b.token.paymentData),pk_token_transaction_id:b.token.transactionIdentifier,pk_token_payment_network:b.token.paymentMethod.network,pk_token_instrument_name:b.token.paymentMethod.displayName},null!=b.billingContact&&(d.card={name:[b.billingContact.givenName,b.billingContact.familyName].join(" ").trim(),address_line1:null!=(e=b.billingContact.addressLines)?e[0]:void 0,address_line2:null!=(f=b.billingContact.addressLines)?f[1]:void 0,address_city:b.billingContact.locality,address_state:b.billingContact.administrativeArea,address_zip:b.billingContact.postalCode,address_country:b.billingContact.countryCode}),a.token.create(d,c)},b}(),b=["createToken","getToken","cardType","validateExpiry","validateCVC","validateCardNumber"],k=0,l=b.length;k1)))/4)-C((a-1901+b)/100)+C((a-1601+b)/400)};if((o=r.hasOwnProperty)||(o=function(a){var b,c={};return(c.__proto__=null,c.__proto__={toString:1},c).toString!=s?o=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);return this.__proto__=b,c}:(b=c.constructor,o=function(a){var c=(this.constructor||b).prototype;return a in this&&!(a in c&&this[a]===c[a])}),c=null,o.call(this,a)}),p=function(a,b){var d,e,f,g=0;(d=function(){this.valueOf=0}).prototype.valueOf=0,e=new d;for(f in e)o.call(e,f)&&g++;return d=e=null,g?p=2==g?function(a,b){var c,d={},e=s.call(a)==v;for(c in a)e&&"prototype"==c||o.call(d,c)||!(d[c]=1)||!o.call(a,c)||b(c)}:function(a,b){var c,d,e=s.call(a)==v;for(c in a)e&&"prototype"==c||!o.call(a,c)||(d="constructor"===c)||b(c);(d||o.call(a,c="constructor"))&&b(c)}:(e=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(a,b){var d,f,g=s.call(a)==v,h=!g&&"function"!=typeof a.constructor&&c[typeof a.hasOwnProperty]&&a.hasOwnProperty||o;for(d in a)g&&"prototype"==d||!h.call(a,d)||b(d);for(f=e.length;d=e[--f];h.call(a,d)&&b(d));}),p(a,b)},!f("json-stringify")){var F={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},G="000000",H=function(a,b){return(G+(b||0)).slice(-a)},I="\\u00",J=function(a){for(var b='"',c=0,d=a.length,e=!B||d>10,f=e&&(B?a.split(""):a);c-1/0&&h<1/0){if(E){for(m=C(h/864e5),j=C(m/365.2425)+1970-1;E(j+1,0)<=m;j++);for(k=C((m-E(j,0))/30.42);E(j,k+1)<=m;k++);m=1+m-E(j,k),n=(h%864e5+864e5)%864e5,r=C(n/36e5)%24,t=C(n/6e4)%60,u=C(n/1e3)%60,v=n%1e3}else j=h.getUTCFullYear(),k=h.getUTCMonth(),m=h.getUTCDate(),r=h.getUTCHours(),t=h.getUTCMinutes(),u=h.getUTCSeconds(),v=h.getUTCMilliseconds();h=(j<=0||j>=1e4?(j<0?"-":"+")+H(6,j<0?-j:j):H(4,j))+"-"+H(2,k+1)+"-"+H(2,m)+"T"+H(2,r)+":"+H(2,t)+":"+H(2,u)+"."+H(3,v)+"Z"}else h=null;if(c&&(h=c.call(b,a,h)),null===h)return"null";if(i=s.call(h),i==A)return""+h;if(i==x)return h>-1/0&&h<1/0?""+h:"null";if(i==y)return J(""+h);if("object"==typeof h){for(G=g.length;G--;)if(g[G]===h)throw l();if(g.push(h),B=[],I=f,f+=e,i==z){for(F=0,G=h.length;F0)for(e="",d>10&&(d=10);e.length=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70||P();a+=N("0x"+f.slice(b,L));break;default:P()}else{if(34==e)break;for(e=f.charCodeAt(L),b=L;e>=32&&92!=e&&34!=e;)e=f.charCodeAt(++L);a+=f.slice(b,L)}if(34==f.charCodeAt(L))return L++,a;P();default:if(b=L,45==e&&(d=!0,e=f.charCodeAt(++L)),e>=48&&e<=57){for(48==e&&(e=f.charCodeAt(L+1),e>=48&&e<=57)&&P(),d=!1;L=48&&e<=57);L++);if(46==f.charCodeAt(L)){for(c=++L;c=48&&e<=57);c++);c==L&&P(),L=c}if(e=f.charCodeAt(L),101==e||69==e){for(e=f.charCodeAt(++L),43!=e&&45!=e||L++,c=L;c=48&&e<=57);c++);c==L&&P(),L=c}return+f.slice(b,L)}if(d&&P(),"true"==f.slice(L,L+4))return L+=4,!0;if("false"==f.slice(L,L+5))return L+=5,!1;if("null"==f.slice(L,L+4))return L+=4,null;P()}return"$"},R=function(a){var b,c;if("$"==a&&P(),"string"==typeof a){if("@"==(B?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(b=[];a=Q(),"]"!=a;c||(c=!0))c&&(","==a?(a=Q(),"]"==a&&P()):P()),","==a&&P(),b.push(R(a));return b}if("{"==a){for(b={};a=Q(),"}"!=a;c||(c=!0))c&&(","==a?(a=Q(),"}"==a&&P()):P()),","!=a&&"string"==typeof a&&"@"==(B?a.charAt(0):a[0])&&":"==Q()||P(),b[a.slice(1)]=R(Q());return b}P()}return a},S=function(a,b,c){var d=T(a,b,c);d===q?delete a[b]:a[b]=d},T=function(a,b,c){var d,e=a[b];if("object"==typeof e&&e)if(s.call(e)==z)for(d=e.length;d--;)S(e,d,c);else p(e,function(a){S(e,a,c)});return c.call(a,b,e)};e.parse=function(a,b){var c,d;return L=0,M=""+a,c=R(Q()),"$"!=Q()&&P(),L=M=null,b&&s.call(b)==v?T((d={},d[""]=c,d),"",b):c}}}return e.runInContext=b,e}var c={"function":!0,object:!0},d=this,e=b(a,d);d.JSON={parse:e.parse,stringify:e.stringify}}.call(Stripe,this)}.call(this),function(){this.Stripe.isDoubleLoaded||!function(a,b,c,d,e,f){function g(a,b){var c=typeof a[b];return"function"==c||!("object"!=c||!a[b])||"unknown"==c}function h(){var a="Shockwave Flash",b="application/x-shockwave-flash";if(!p(navigator.plugins)&&"object"==typeof navigator.plugins[a]){var c=navigator.plugins[a].description;c&&!p(navigator.mimeTypes)&&navigator.mimeTypes[b]&&navigator.mimeTypes[b].enabledPlugin&&(x=c.match(/\d+/g))}if(!x){var d;try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),x=Array.prototype.slice.call(d.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),d=null}catch(e){}}if(!x)return!1;var f=parseInt(x[0],10),g=parseInt(x[1],10);return y=f>9&&g>0,!0}function i(){if(!L){L=!0;for(var a=0;a'):(e=b.createElement("IFRAME"),e.name=c.props.name),e.id=e.name=c.props.name,delete c.props.name,"string"==typeof c.container&&(c.container=b.getElementById(c.container)),c.container||(q(e.style,{position:"absolute",top:"-2000px",left:"0px"}),c.container=b.body);var f=c.props.src;c.props.src="about:blank",q(e,c.props),e.border=e.frameBorder=0,e.allowTransparency=!0;var g=!1;return c.onFrameAck&&"postMessage"in a&&a.addEventListener?a.addEventListener("message",function(a){var b=Stripe._iframeBaseUrl.replace(/^https?:\/\//,"").replace(/\/.*$/,""),d=a.origin.replace(/^https?:\/\//,"").replace(/\/.*$/,"");b===d&&"stripe:ack"===a.data&&c.onFrameAck(!0)},!1):g=!0,c.container.appendChild(e),c.onLoad&&z(e,"load",function(){c.onLoad.apply(c,arguments),g&&c.onFrameAck(!1)}),c.onError&&z(e,"error",function(){c.onError.apply(c,arguments)}),e.src=f,c.onAsyncInject&&d(function(){c.onAsyncInject.call(c,e)},5e3),c.props.src=f,e}function t(c){var d,e=c.protocol;if(c.isHost=c.isHost||p(O.xdm_p),J=c.hash||!1,c.props||(c.props={}),c.isHost){if(c.remote=n(c.remote),c.channel=c.channel||"default"+C++,c.secret=Math.random().toString(16).substring(2),p(e))if(g(a,"postMessage")||g(b,"postMessage"))e="1";else{if(!(c.swf&&g(a,"ActiveXObject")&&h()))throw new Error("No suitable transport protocol for Stripe.js");e="6"}}else c.channel=O.xdm_c.replace(/["'<>\\]/g,""),c.secret=O.xdm_s,c.remote=O.xdm_e.replace(/["'<>\\]/g,""),e=O.xdm_p;switch(c.protocol=e,e){case"1":d=[new H.stack.PostMessageTransport(c)];break;case"6":x||h(),d=[new H.stack.FlashTransport(c)]}return d?(d.push(new H.stack.QueueBehavior({lazy:c.lazy,remove:!0})),d):void c.onInternalError.call(c,"BadXDMProtocol")}function u(a){for(var b,c={incoming:function(a,b){this.up.incoming(a,b)},outgoing:function(a,b){this.down.outgoing(a,b)},callback:function(a){this.up.callback(a)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},d=0,e=a.length;d"}var h,i,p,r,t;return h={outgoing:function(b,c,d){r.postMessage(a.channel,b.toString()),d&&d()},destroy:function(){try{r.destroyChannel(a.channel)}catch(b){}r=null,i&&(i.parentNode.removeChild(i),i=null)},onDOMReady:function(){p=a.remote,H.Fn.set("flash_"+a.channel+"_init",function(){d(function(){h.up.callback(!0)})}),H.Fn.set("flash_"+a.channel+"_onMessage",e),a.swf=n(a.swf);var b=k(a.swf),f=function(){H.stack.FlashTransport[b].init=!0,r=H.stack.FlashTransport[b].swf,r.createChannel(a.channel,a.secret,m(a.remote),a.isHost),a.isHost&&(y&&a.swfNoThrottle&&q(a.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),q(a.props,{src:o(a.remote,{xdm_e:m(c.href),xdm_c:a.channel,xdm_p:6,xdm_s:a.secret}),name:I+a.channel+"_provider"}),i=s(a))};H.stack.FlashTransport[b]&&H.stack.FlashTransport[b].init?f():H.stack.FlashTransport[b]?H.stack.FlashTransport[b].queue.push(f):(H.stack.FlashTransport[b]={queue:[f]},g(b))},init:function(){j(h.onDOMReady,h)}}},H.stack.PostMessageTransport=function(b){function e(a){if(a.origin)return m(a.origin);if(a.uri)return m(a.uri);if(a.domain)return c.protocol+"//"+a.domain;throw new Error("Unable to retrieve the origin of the event")}function f(a){var c=e(a);c==k&&"string"==typeof a.data&&a.data.substring(0,b.channel.length+1)==b.channel+" "&&g.up.incoming(a.data.substring(b.channel.length+1),c)}var g,h,i,k;return g={outgoing:function(a,c,d){try{i.postMessage(b.channel+" "+a,c||k),d&&d()}catch(e){b.onInternalError&&b.onInternalError.call(b,"CallerWindowError")}},destroy:function(){A(a,"message",f),h&&(i=null,h.parentNode.removeChild(h),h=null)},onDOMReady:function(){if(k=m(b.remote),b.isHost){var e=function(c){c.data==b.channel+"-ready"&&(i="postMessage"in h.contentWindow?h.contentWindow:h.contentWindow.document,A(a,"message",e),z(a,"message",f),d(function(){g.up.callback(!0)},0))};z(a,"message",e),q(b.props,{src:o(b.remote,{xdm_e:m(c.href),xdm_c:b.channel,xdm_p:1}),name:I+b.channel+"_provider"}),h=s(b)}else z(a,"message",f),i="postMessage"in a.parent?a.parent:a.parent.document,i.postMessage(b.channel+"-ready",k),d(function(){g.up.callback(!0)},0)},init:function(){j(g.onDOMReady,g)}}},H.stack.QueueBehavior=function(a){function b(){if(a.remove&&0===h.length)return void v(c);if(!i&&0!==h.length&&!g){i=!0;var e=h.shift();c.down.outgoing(e.data,e.origin,function(a){i=!1,e.callback&&d(function(){e.callback(a)},0),b()})}}var c,g,h=[],i=!0,j="",k=0,l=!1,m=!1;return c={init:function(){p(a)&&(a={}),a.maxLength&&(k=a.maxLength,m=!0),a.lazy?l=!0:c.down.init()},callback:function(a){i=!1;var d=c.up;b(),d.callback(a)},incoming:function(b,d){if(m){var f=b.indexOf("_"),g=parseInt(b.substring(0,f),10);j+=b.substring(f+1),0===g&&(a.encode&&(j=e(j)),c.up.incoming(j,d),j="")}else c.up.incoming(b,d)},outgoing:function(d,e,g){a.encode&&(d=f(d));var i,j=[];if(m){for(;0!==d.length;)i=d.substring(0,k),d=d.substring(i.length),j.push(i);for(;i=j.shift();)h.push({data:j.length+"_"+i,origin:e,callback:0===j.length?g:null})}else h.push({data:d,origin:e,callback:g});l?c.down.init():b()},destroy:function(){g=!0,c.down.destroy()}}},Stripe.easyXDM=H}(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent)}.call(this),function(){var a,b=[].slice,c=[].indexOf||function(a){for(var b=0,c=this.length;b=0&&(null===(n=l.billingContact.countryCode)||void 0===n||""===n)))return(new Image).src="https://q.stripe.com/?event=stripejs-error&type=ApplePayInvalidCountry&"+Stripe.utils.serialize(l.billingContact),void e.session.completePayment(ApplePaySession.STATUS_INVALID_BILLING_POSTAL_ADDRESS);if(null!=l.shippingContact){if(l.shippingContact=d(l.shippingContact),m=a.requiredShippingContactFields||[],c.call(m,"postalAddress")>=0&&(null===(o=l.shippingContact.countryCode)||void 0===o||""===o))return(new Image).src="https://q.stripe.com/?event=stripejs-error&type=ApplePayInvalidCountry&"+Stripe.utils.serialize(l.shippingContact),void e.session.completePayment(ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);j.shippingContact=l.shippingContact}return b(j,function(a){return a===ApplePaySession.STATUS_SUCCESS||a===ApplePaySession.STATUS_FAILURE||a===ApplePaySession.STATUS_INVALID_BILLING_POSTAL_ADDRESS||a===ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS||a===ApplePaySession.STATUS_INVALID_SHIPPING_CONTACT?e.session.completePayment(a):a?e.session.completePayment(ApplePaySession.STATUS_SUCCESS):e.session.completePayment(ApplePaySession.STATUS_FAILURE)})}))}}(this))}var d,e;return e=function(a){return a.supportedNetworks||(a.supportedNetworks=["amex","discover","masterCard","visa"]),a.merchantCapabilities=["supports3DS"],a},d=function(a){var b,c,d,e,f;return c={australia:"AU",austria:"AT",canada:"CA",schweiz:"CH",deutschland:"DE",hongkong:"HK",saudiarabia:"SA",espaa:"ES",singapore:"SG",us:"US",usa:"US",unitedstatesofamerica:"US",unitedstates:"US",england:"GB",gb:"GB",uk:"GB",unitedkingdom:"GB"},null!==(e=a.countryCode)&&void 0!==e&&""!==e||(b=null!=(f=a.country)&&"function"==typeof f.toLowerCase&&"function"==typeof(d=f.toLowerCase()).replace?d.replace(/[^a-z]+/g,""):void 0,a.countryCode=c[b]),a},a.prototype.completeMerchantValidation=function(){throw new Error("Stripe handles calling this method for you; you shouldn't invoke it directly. For more help, see https://stripe.com/docs/apple-pay/web#apple-merchant-validation")},a.prototype.completePayment=function(){throw new Error("Stripe handles calling this method for you; you shouldn't invoke it directly. For more help, see https://stripe.com/docs/apple-pay/web#apple-merchant-validation")},a.prototype.abort=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).abort.apply(c,a)},a.prototype.addEventListener=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).addEventListener.apply(c,a)},a.prototype.begin=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).begin.apply(c,a)},a.prototype.completePaymentMethodSelection=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).completePaymentMethodSelection.apply(c,a)},a.prototype.completeShippingContactSelection=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).completeShippingContactSelection.apply(c,a)},a.prototype.completeShippingMethodSelection=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).completeShippingMethodSelection.apply(c,a)},a.prototype.supportsVersion=function(){var a,c;return a=1<=arguments.length?b.call(arguments,0):[],(c=this.session).supportsVersion.apply(c,a)},a}(),this.Stripe.ApplePaySession=a)}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;b12?(h=f[0],c=f[1]):(c=f[0],h=f[1]),c>12&&g("Month must be a number 1-12, not "+c+". "),h<100&&(h+=2e3),[c,h]},b.formatAmountWithCurrency=function(b,c){var d,e,f;return d=parseFloat(b),e=["bif","clp","djf","gnf","jpy","kmf","krw","mga","pyg","rwf","vnd","vuv","xaf","xof","xpf"],f=c.toLowerCase(),a.call(e,f)<0&&(d=Math.round(100*d)),parseInt(d)},b.generateID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b,c;return b=16*Math.random()|0,c="x"===a?b:3&b|8,c.toString(16)})},b.setCookie=function(a,b,c){var d,e;return null==c&&(c={}),e=new Date,e.setTime(e.getTime()+31536e6),null==c.path&&(c.path="/"),b=(b+"").replace(/[^!#-+\--:<-\[\]-~]/g,encodeURIComponent),d=""+encodeURIComponent(a)+"="+b+";expires="+e.toGMTString()+";path="+c.path,c.domain&&(d+=";domain="+c.domain),document.cookie=d},b.getCookie=function(a){var b,c,d,e,f,g,h;for(c=document.cookie.split("; "),g=0,h=c.length;g0&&(e=setTimeout(function(){return j.abort("timeout")},c.timeout)),j})}.call(this),function(){var a,b,c,d,e,f,g,h,i,j={}.hasOwnProperty;this.Stripe.isDoubleLoaded||(b={contentType:"application/x-www-form-urlencoded",accept:{json:"application/json"}},g=/^(20\d|1223)$/,f="invalid_json_response",d=function(a,b,c){return function(){return a._aborted?c(a.request,"abort"):a.request&&4===a.request.readyState?(a.request.onreadystatechange=function(){},0===a.request.status?c(a.request,"empty_response"):g.test(a.request.status)?b(a.request,a.request.status):b(a.request,a.request.status)):void 0}},h=function(a,c){var d,e,f,g,h;f=c.headers||{},f.Accept||(f.Accept=b.accept.json),f["Content-Type"]||(f["Content-Type"]=b.contentType),g=c._globalCustomHeaders;for(d in g)j.call(g,d)&&"setRequestHeader"in a&&a.setRequestHeader(d,c._globalCustomHeaders[d]);h=[];for(e in f)j.call(f,e)&&("setRequestHeader"in a?h.push(a.setRequestHeader(e,f[e])):h.push(void 0));return h},i=function(a,b){return/\?/.test(a)?a+"&"+b:a+"?"+b},c=function(a,b){var c,e,f,g,j,k,l,m,n;k=this.o,j=(k.method||"GET").toUpperCase(),l=k.url,g=null!=(m=k.data)?m.key:void 0,c=Stripe.utils.serialize(k.data),f=void 0,"GET"===j&&c&&(l=i(l,c),c=null),n=new XMLHttpRequest,n.open(j,l,!0),h(n,k),n.onreadystatechange=d(this,a,b);try{n.send(c)}catch(o){e=o,Stripe.reportError("XHR-"+e.toString()),b(n,"xhr_send_failure")}return n},a=function(a){return this.o=a,e.apply(this,arguments)},e=function(a){var b,d,e;return this.url=a.url,this.timeout=null,this._successHandler=function(){},this._errorHandlers=[],this._completeHandlers=[],a.timeout&&(this.timeout=setTimeout(function(a){return function(){return a.abort()}}(this),a.timeout)),a.success&&(this._successHandler=function(){return a.success.apply(a,arguments)}),a.error&&this._errorHandlers.push(function(){return a.error.apply(a,arguments)}),a.complete&&this._completeHandlers.push(function(){return a.complete.apply(a,arguments)}),b=function(b){return function(c,d){var e;for(a.timeout&&clearTimeout(b.timeout),b.timeout=null,e=[];b._completeHandlers.length>0;)e.push(b._completeHandlers.shift()(d,c,a));return e}}(this),e=function(a){return function(c,e){var g,h,i;if(i=c.responseText,!i||!i.length)return d(c,"empty_response");try{return h=Stripe.JSON.parse(i),a._successHandler(h,e,c),b(h,"success")}catch(j){return g=j,d(c,f)}}}(this),d=function(a){return function(b,c){var d,e,g;if(g=b.responseText,e=void 0,g&&g.length&&c!==f)try{e=Stripe.JSON.parse(g)}catch(h){d=h,c=c+"_AND_"+f}for(;a._errorHandlers.length>0;)a._errorHandlers.shift()(e||b,c);return Stripe.reportError(c),Stripe._fallBackToOldStripeJsTechniques(),Stripe.request(a.o,!0)}}(this),this.request=c.call(this,e,d)},a.prototype={abort:function(){var a;return this._aborted=!0,null!=(a=this.request)?a.abort():void 0}},this.Stripe.xhr=function(b){return b._globalCustomHeaders=this._customHeaders,new a(b)})}.call(this),function(){var a,b,c,d,e={}.hasOwnProperty;this.Stripe.isDoubleLoaded||(a=function(a){return this.options=a,a.requestId=Stripe._callCount,a.endpoint=Stripe.endpoint,a.trackPerf=Stripe.trackPerf,this.iframeTimeout=setTimeout(function(){return Stripe._fallBackToOldStripeJsTechniques(),Stripe._iframePendingRequests[a.requestId]&&(Stripe.request(Stripe._iframePendingRequests[a.requestId],!0),delete Stripe._iframePendingRequests[a.requestId]),Stripe._callCache[a.requestId]=function(){return Stripe.reportError("TimeoutEventualReturnError")}},1e4),Stripe._iframePendingRequests[a.requestId]=a,Stripe._callCache[a.requestId]=function(b){return function(){return clearTimeout(b.iframeTimeout),delete Stripe._iframePendingRequests[a.requestId],a.success.apply(a,arguments),"function"==typeof a.complete?a.complete("success",null,a):void 0}}(this),Stripe._callCount+=1,Stripe._socket.postMessage(Stripe.JSON.stringify(a))},this.Stripe.iframe=function(b){return new a(b)},c=Stripe.easyXDM,this.Stripe._isChannel?Stripe._socket=new c.Socket({swf:""+Stripe._iframeBaseUrl+"/v2/stripexdm.swf",onMessage:Stripe._channelListener}):Stripe._isSafeDomain||(d=function(a){var b,c,e;"console"in window&&"warn"in window.console,1,Stripe._iframeChannelComplete.call(Stripe,!1),Stripe._callCache={},Stripe.reportError("FB-"+a),c=document.createElement("script"),e=Math.round((new Date).getTime()/1e3),c.src=""+Stripe._iframeBaseUrl+"/v2/cspblocked.js?domain="+encodeURIComponent(document.location.href)+"×tamp="+e+"&info="+encodeURIComponent(a)+"&payment_user_agent="+encodeURIComponent(Stripe.stripejs_ua),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),d=function(){}},b="",Stripe._socket=new c.Socket({swf:""+Stripe._iframeBaseUrl+"/v2/stripexdm.swf",remote:""+Stripe._iframeBaseUrl+"/v2"+b+"/channel"+(Stripe.accountDetails?"-provisioning":"")+".html#__stripe_transport__",onMessage:Stripe._receiveChannelRelay,ackTimeoutDuration:1e4,onLoad:function(){return this._socketLoadTime=+new Date,this.onError=function(){},this.onAsyncInject=function(){},clearTimeout(this.injectTimeout),this._socketAckTime?this.loadTimeout?(clearTimeout(this.loadTimeout),Stripe._iframeChannelComplete.call(Stripe,!0)):Stripe.reportError("LoadDelayError",this._socketLoadTime-this._socketAckTime):this.ackTimeout=setTimeout(function(a){return function(){return a.onFrameAck=function(){},clearTimeout(a.loadTimeout),d("AckTimeoutError")}}(this),this.ackTimeoutDuration)},onError:function(){return this.onLoad=function(){},this.onAsyncInject=function(){},this.onFrameAck=function(){},clearTimeout(this.ackTimeout),clearTimeout(this.injectTimeout),clearTimeout(this.loadTimeout),d("IframeOnError")},onInternalError:function(a){var b,c,d;this.onError=function(){},this.onLoad=function(){},this.onFrameAck=function(){},this.onAsyncInject=function(){},clearTimeout(this.ackTimeout),clearTimeout(this.loadTimeout),clearTimeout(this.injectTimeout),Stripe.reportError("FB-XDM-"+a),Stripe._fallBackToOldStripeJsTechniques(),d=Stripe._iframePendingRequests;for(b in d)e.call(d,b)&&(c=d[b],Stripe._callCache[c.requestId]=function(){},delete Stripe._iframePendingRequests[c.requestId],Stripe.request(c,!0))},onAsyncInject:function(a){return this.injectTimeout=setTimeout(function(a){return function(){return a.onError=function(){},a.onLoad=function(){},a.onFrameAck=function(){},clearTimeout(a.ackTimeout),clearTimeout(a.loadTimeout),d("InjectTimeoutError")}}(this),this.ackTimeoutDuration)},onFrameAck:function(a){return this._socketAckTime=+new Date,clearTimeout(this.ackTimeout),clearTimeout(this.injectTimeout),this.onAsyncInject=function(){},this.onError=function(){},this.ackTimeout?Stripe._iframeChannelComplete.call(Stripe,!0):this._socketLoadTime?(this.onLoad=function(){},Stripe.reportError("AckDelayError",this._socketAckTime-this._socketLoadTime)):this.loadTimeout=setTimeout(function(a){return function(){return d("LoadTimeoutError"),a.onLoad=function(){}}}(this),this.ackTimeoutDuration)}})))}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;b0))return"Enter a positive value"},range:function(b,c){var d;if(d=parseInt(c,10),a.call(b,d)<0)return"Needs to be between "+b[0]+" and "+b[b.length-1]},required:function(a,b){if(a&&(null==b||""===b))return"Required"},year:function(a,b){if(!/^\d{4}$/.test(b))return"Enter a 4-digit year"},birthYear:function(a,b){var c;return c=this.year(a,b),c?c:parseInt(b,10)>2e3?"You must be over 18":parseInt(b,10)<1900?"Enter your birth year":void 0},month:function(a,b){return this.integer(a,b)?"Please enter a month":this.range([1,2,3,4,5,6,7,8,9,10,11,12],b)?"Needs to be between 1 and 12":void 0},choices:function(b,c){if(a.call(b,c)<0)return"Not an acceptable value for this field"},email:function(a,b){if(!/^[^@<\s>]+@[^@<\s>]+$/.test(b))return"That doesn't look like an email address"},url:function(a,b){if(!/^https?:\/\/.+\..+/.test(b))return"Not a valid url"},usTaxID:function(a,b){if(!/^\d{2}-?\d{1}-?\d{2}-?\d{4}$/.test(b))return"Not a valid tax ID"},ein:function(a,b){if(!/^\d{2}-?\d{7}$/.test(b))return"Not a valid EIN"},ssnLast4:function(a,b){if(!/^\d{4}$/.test(b))return"Not a valid last 4 digits for an SSN"},ownerPersonalID:function(a,b){var c;if(c=function(){switch(a){case"CA":return/^\d{3}-?\d{3}-?\d{3}$/.test(b);case"US":return!0}}(),!c)return"Not a valid ID"},bizTaxID:function(a,b){var c,d,e,f,g,h,i,j;if(h={CA:["Tax ID",[/^\d{9}$/]],US:["EIN",[/^\d{2}-?\d{7}$/]]},g=h[a],null!=g){for(c=g[0],f=g[1],d=!1,i=0,j=f.length;i