diff --git a/dist/vue-paypal-checkout.common.js b/dist/vue-paypal-checkout.common.js index b361789..6701756 100644 --- a/dist/vue-paypal-checkout.common.js +++ b/dist/vue-paypal-checkout.common.js @@ -80,6 +80,8 @@ function defaultProps () { } }); + props['send-paypal-actions'] = { type: Function, required: false, default: undefined }; + return props; } @@ -225,6 +227,9 @@ var assignTo = assignToPropertyObject(additionalProps); var script = { props: _Object$assign(defaultProps(), additionalProps.vmProps()), methods: { + validate: function validate(actions) { + this.$emit('send-paypal-actions', actions); + }, payment: function payment() { var vue = this; @@ -286,13 +291,101 @@ var script = { onAuthorize: vue.onAuthorize, // Pass a function to be called when the customer cancels the payment - onCancel: vue.onCancel + onCancel: vue.onCancel, + + // Pass a function to be called when the page load + validate: vue.validate }, assignTo(vue, propTypes.BUTTON)); paypal.Button.render(button, vue.$el); } }; +function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier +/* server only */ +, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } // Vue.extend constructor export interop. + + + var options = typeof script === 'function' ? script.options : script; // render functions + + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; // functional template + + if (isFunctionalTemplate) { + options.functional = true; + } + } // scopedId + + + if (scopeId) { + options._scopeId = scopeId; + } + + var hook; + + if (moduleIdentifier) { + // server build + hook = function hook(context) { + // 2.3 injection + context = context || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional + // 2.2 with runInNewContext: true + + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } // inject component styles + + + if (style) { + style.call(this, createInjectorSSR(context)); + } // register component module identifier for async chunk inference + + + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; // used by ssr in case component is cached and beforeCreate + // never gets called + + + options._ssrRegister = hook; + } else if (style) { + hook = shadowMode ? function () { + style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); + } : function (context) { + style.call(this, createInjector(context)); + }; + } + + if (hook) { + if (options.functional) { + // register for functional component in vue file + var originalRender = options.render; + + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + + return script; +} + +var normalizeComponent_1 = normalizeComponent; + /* script */ var __vue_script__ = script; @@ -314,30 +407,11 @@ var __vue_scope_id__ = undefined; var __vue_module_identifier__ = undefined; /* functional template */ var __vue_is_functional_template__ = false; -/* component normalizer */ -function __vue_normalize__(template, style, script$$1, scope, functional, moduleIdentifier, createInjector, createInjectorSSR) { - var component = (typeof script$$1 === 'function' ? script$$1.options : script$$1) || {}; - - // For security concerns, we use only base name in production mode. - component.__file = "/home/khoa/src/github.com/khoanguyen96/paypal/src/components/PayPalCheckout.vue"; - - if (!component.render) { - component.render = template.render; - component.staticRenderFns = template.staticRenderFns; - component._compiled = true; - - if (functional) component.functional = true; - } - - component._scopeId = scope; - - return component; -} /* style inject */ /* style inject SSR */ -var PayPalCheckout = __vue_normalize__({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined); +var PayPalCheckout = normalizeComponent_1({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined); var components = { 'paypal-checkout': PayPalCheckout diff --git a/dist/vue-paypal-checkout.esm.js b/dist/vue-paypal-checkout.esm.js index 0b4da8e..6ec8b03 100644 --- a/dist/vue-paypal-checkout.esm.js +++ b/dist/vue-paypal-checkout.esm.js @@ -76,6 +76,8 @@ function defaultProps () { } }); + props['send-paypal-actions'] = { type: Function, required: false, default: undefined }; + return props; } @@ -221,6 +223,9 @@ var assignTo = assignToPropertyObject(additionalProps); var script = { props: _Object$assign(defaultProps(), additionalProps.vmProps()), methods: { + validate: function validate(actions) { + this.$emit('send-paypal-actions', actions); + }, payment: function payment() { var vue = this; @@ -282,13 +287,101 @@ var script = { onAuthorize: vue.onAuthorize, // Pass a function to be called when the customer cancels the payment - onCancel: vue.onCancel + onCancel: vue.onCancel, + + // Pass a function to be called when the page load + validate: vue.validate }, assignTo(vue, propTypes.BUTTON)); paypal.Button.render(button, vue.$el); } }; +function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier +/* server only */ +, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } // Vue.extend constructor export interop. + + + var options = typeof script === 'function' ? script.options : script; // render functions + + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; // functional template + + if (isFunctionalTemplate) { + options.functional = true; + } + } // scopedId + + + if (scopeId) { + options._scopeId = scopeId; + } + + var hook; + + if (moduleIdentifier) { + // server build + hook = function hook(context) { + // 2.3 injection + context = context || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional + // 2.2 with runInNewContext: true + + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } // inject component styles + + + if (style) { + style.call(this, createInjectorSSR(context)); + } // register component module identifier for async chunk inference + + + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; // used by ssr in case component is cached and beforeCreate + // never gets called + + + options._ssrRegister = hook; + } else if (style) { + hook = shadowMode ? function () { + style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); + } : function (context) { + style.call(this, createInjector(context)); + }; + } + + if (hook) { + if (options.functional) { + // register for functional component in vue file + var originalRender = options.render; + + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + + return script; +} + +var normalizeComponent_1 = normalizeComponent; + /* script */ var __vue_script__ = script; @@ -310,30 +403,11 @@ var __vue_scope_id__ = undefined; var __vue_module_identifier__ = undefined; /* functional template */ var __vue_is_functional_template__ = false; -/* component normalizer */ -function __vue_normalize__(template, style, script$$1, scope, functional, moduleIdentifier, createInjector, createInjectorSSR) { - var component = (typeof script$$1 === 'function' ? script$$1.options : script$$1) || {}; - - // For security concerns, we use only base name in production mode. - component.__file = "/home/khoa/src/github.com/khoanguyen96/paypal/src/components/PayPalCheckout.vue"; - - if (!component.render) { - component.render = template.render; - component.staticRenderFns = template.staticRenderFns; - component._compiled = true; - - if (functional) component.functional = true; - } - - component._scopeId = scope; - - return component; -} /* style inject */ /* style inject SSR */ -var PayPalCheckout = __vue_normalize__({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined); +var PayPalCheckout = normalizeComponent_1({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined); var components = { 'paypal-checkout': PayPalCheckout diff --git a/dist/vue-paypal-checkout.min.js b/dist/vue-paypal-checkout.min.js index 59f3a9f..7fe91a4 100644 --- a/dist/vue-paypal-checkout.min.js +++ b/dist/vue-paypal-checkout.min.js @@ -1 +1 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.vuePaypalCheckout=n()}(this,function(){"use strict";var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,n){return e(n={exports:{}},n.exports),n.exports}var _defined=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},_toObject=function(e){return Object(_defined(e))},hasOwnProperty={}.hasOwnProperty,_has=function(e,n){return hasOwnProperty.call(e,n)},toString={}.toString,_cof=function(e){return toString.call(e).slice(8,-1)},_iobject=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==_cof(e)?e.split(""):Object(e)},_toIobject=function(e){return _iobject(_defined(e))},ceil=Math.ceil,floor=Math.floor,_toInteger=function(e){return isNaN(e=+e)?0:(0r;)_has(a,o=n[r++])&&(~arrayIndexOf(t,o)||t.push(o));return t},_enumBugKeys="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},_ctx=function(a,r,e){if(_aFunction(a),void 0===r)return a;switch(e){case 1:return function(e){return a.call(r,e)};case 2:return function(e,n){return a.call(r,e,n)};case 3:return function(e,n,o){return a.call(r,e,n,o)}}return function(){return a.apply(r,arguments)}},_isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_fails=function(e){try{return!!e()}catch(e){return!0}},_descriptors=!_fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),document$1=_global.document,is=_isObject(document$1)&&_isObject(document$1.createElement),_domCreate=function(e){return is?document$1.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails(function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a}),_toPrimitive=function(e,n){if(!_isObject(e))return e;var o,a;if(n&&"function"==typeof(o=e.toString)&&!_isObject(a=o.call(e)))return a;if("function"==typeof(o=e.valueOf)&&!_isObject(a=o.call(e)))return a;if(!n&&"function"==typeof(o=e.toString)&&!_isObject(a=o.call(e)))return a;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f=_descriptors?Object.defineProperty:function(e,n,o){if(_anObject(e),n=_toPrimitive(n,!0),_anObject(o),_ie8DomDefine)try{return dP(e,n,o)}catch(e){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(e[n]=o.value),e},_objectDp={f:f},_propertyDesc=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}},_hide=_descriptors?function(e,n,o){return _objectDp.f(e,n,_propertyDesc(1,o))}:function(e,n,o){return e[n]=o,e},PROTOTYPE="prototype",$export=function(e,n,o){var a,r,t,u=e&$export.F,l=e&$export.G,p=e&$export.S,i=e&$export.P,s=e&$export.B,c=e&$export.W,y=l?_core:_core[n]||(_core[n]={}),g=y[PROTOTYPE],d=l?_global:p?_global[n]:(_global[n]||{})[PROTOTYPE];for(a in l&&(o=n),o)(r=!u&&d&&void 0!==d[a])&&_has(y,a)||(t=r?d[a]:o[a],y[a]=l&&"function"!=typeof d[a]?o[a]:s&&r?_ctx(t,_global):c&&d[a]==t?function(a){var e=function(e,n,o){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(e);case 2:return new a(e,n)}return new a(e,n,o)}return a.apply(this,arguments)};return e[PROTOTYPE]=a[PROTOTYPE],e}(t):i&&"function"==typeof t?_ctx(Function.call,t):t,i&&((y.virtual||(y.virtual={}))[a]=t,e&$export.R&&g&&!g[a]&&_hide(g,a,t)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128;var _export=$export,_objectSap=function(e,n){var o=(_core.Object||{})[e]||Object[e],a={};a[e]=n(o),_export(_export.S+_export.F*_fails(function(){o(1)}),"Object",a)};_objectSap("keys",function(){return function(e){return _objectKeys(_toObject(e))}});var keys=_core.Object.keys,keys$1=createCommonjsModule(function(e){e.exports={default:keys,__esModule:!0}}),_Object$keys=unwrapExports(keys$1),f$1=Object.getOwnPropertySymbols,_objectGops={f:f$1},f$2={}.propertyIsEnumerable,_objectPie={f:f$2},$assign=Object.assign,_objectAssign=!$assign||_fails(function(){var e={},n={},o=Symbol(),a="abcdefghijklmnopqrst";return e[o]=7,a.split("").forEach(function(e){n[e]=e}),7!=$assign({},e)[o]||Object.keys($assign({},n)).join("")!=a})?function(e,n){for(var o=_toObject(e),a=arguments.length,r=1,t=_objectGops.f,u=_objectPie.f;r>8-r%1*8)){if(255<(o=a.charCodeAt(r+=.75)))throw new p("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|o}return u}),e.atob||(e.atob=function(e){var n=String(e).replace(/[=]+$/,"");if(n.length%4==1)throw new p("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,a,r=0,t=0,u="";a=n.charAt(t++);~a&&(o=r%4?64*o+a:a,r++%4)?u+=String.fromCharCode(255&o>>(-2*r&6)):0)a=l.indexOf(a);return u})}()},"./node_modules/beaver-logger/client/index.js":function(e,n,o){var a={};o.d(a,"track",function(){return F}),o.d(a,"buffer",function(){return w}),o.d(a,"tracking",function(){return m}),o.d(a,"getTransport",function(){return C}),o.d(a,"setTransport",function(){return b}),o.d(a,"print",function(){return P}),o.d(a,"immediateFlush",function(){return A}),o.d(a,"flush",function(){return T}),o.d(a,"log",function(){return N}),o.d(a,"prefix",function(){return D}),o.d(a,"debug",function(){return x}),o.d(a,"info",function(){return k}),o.d(a,"warn",function(){return S}),o.d(a,"error",function(){return M}),o.d(a,"init",function(){return G}),o.d(a,"startTransition",function(){return X}),o.d(a,"endTransition",function(){return J}),o.d(a,"transition",function(){return $}),o.d(a,"payloadBuilders",function(){return u}),o.d(a,"metaBuilders",function(){return d}),o.d(a,"trackingBuilders",function(){return l}),o.d(a,"headerBuilders",function(){return h}),o.d(a,"addPayloadBuilder",function(){return p}),o.d(a,"addMetaBuilder",function(){return i}),o.d(a,"addTrackingBuilder",function(){return s}),o.d(a,"addHeaderBuilder",function(){return c}),o.d(a,"config",function(){return f}),o.d(a,"logLevels",function(){return y});var r=o("./node_modules/zalgo-promise/src/index.js");function g(e,n){var o=!(2y.indexOf(a))){o=o||{};var r=[n];Boolean(window.document.documentMode)&&(o=JSON.stringify(o)),r.push(o),(o.error||o.warning)&&r.push("\n\n",o.error||o.warning);try{window.console[e]&&window.console[e].apply?window.console[e].apply(window.console,r):window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,r)}catch(e){}}}}function A(){var e=(0f.heartbeatMaxThreshold)){r+=1;var e=a.elapsed(),n=e-f.heartbeatInterval,o={count:r,elapsed:e};f.heartbeatTooBusy&&(o.lag=n)>=f.heartbeatTooBusyThreshold&&k("toobusy",o,f.heartbeatConsoleLog),k("heartbeat",o,f.heartbeatConsoleLog)}}(),e()},n)}()}var V=!1;function G(e){g(f,e||{}),V||(V=!0,f.logPerformance&&function(){if(!j)return k("no_performance_data");p(function(){var e={};return e.client_elapsed=U.elapsed(),j&&(e.req_elapsed=W.elapsed()),e}),new r.a(function(e){"undefined"!=typeof document&&"complete"===document.readyState&&e(),window.addEventListener("load",e)}).then(function(){var o={};["connectEnd","connectStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","domainLookupEnd","domainLookupStart","fetchStart","loadEventEnd","loadEventStart","navigationStart","redirectEnd","redirectStart","requestStart","responseEnd","responseStart","secureConnectionStart","unloadEventEnd","unloadEventStart"].forEach(function(e){o[e]=parseInt(window.performance.timing[e],10)||0});var a=o.connectEnd-o.navigationStart;o.connectEnd&&Object.keys(o).forEach(function(e){var n=o[e];n&&k("timing_"+e,{client_elapsed:parseInt(n-o.connectEnd-(U.startTime-a),10),req_elapsed:parseInt(n-o.connectEnd,10)})}),k("timing",o),k("memory",window.performance.memory),k("navigation",window.performance.navigation),window.performance.getEntries&&window.performance.getEntries().forEach(function(e){-1<["link","script","img","css"].indexOf(e.initiatorType)&&k(e.initiatorType,e)})})}(),f.heartbeat&&H(),f.logUnload&&(window.addEventListener("beforeunload",function(){k("window_beforeunload"),A({fireAndForget:!0})}),window.addEventListener("unload",function(){k("window_unload"),A({fireAndForget:!0})})),f.flushInterval&&setInterval(T,f.flushInterval),window.beaverLogQueue&&(window.beaverLogQueue.forEach(function(e){N(e.level,e.event,e)}),delete window.beaverLogQueue))}var Z=t(),Y=t(),q=f.initial_state_name,K=void 0;function X(){K=I()}function J(e){K=K||z();var n=I(),o=void 0;void 0!==K&&(o=parseInt(n-K,0));var a="transition_"+q+"_to_"+e;k(a,{duration:o}),F({transition:a,transition_time:o}),A(),K=n,q=e,Y=t()}function $(e){X(),J(e)}p(function(){return{windowID:Z,pageID:Y}}),i(function(){return{state:"ui_"+q}}),o.d(n,"p",function(){return F}),o.d(n,!1,function(){return w}),o.d(n,!1,function(){return m}),o.d(n,"i",function(){return C}),o.d(n,"o",function(){return b}),o.d(n,!1,function(){return P}),o.d(n,"j",function(){return A}),o.d(n,"h",function(){return T}),o.d(n,!1,function(){return N}),o.d(n,"n",function(){return D}),o.d(n,"f",function(){return x}),o.d(n,"k",function(){return k}),o.d(n,"q",function(){return S}),o.d(n,"g",function(){return M}),o.d(n,"l",function(){return G}),o.d(n,!1,function(){return X}),o.d(n,!1,function(){return J}),o.d(n,!1,function(){return $}),o.d(n,!1,function(){return u}),o.d(n,!1,function(){return d}),o.d(n,!1,function(){return l}),o.d(n,!1,function(){return h}),o.d(n,"c",function(){return p}),o.d(n,"b",function(){return i}),o.d(n,"d",function(){return s}),o.d(n,"a",function(){return c}),o.d(n,"e",function(){return f}),o.d(n,"m",function(){return y})},"./node_modules/bowser/bowser.min.js":function(e,n,o){var a;a=function(){function u(o){function n(e){var n=o.match(e);return n&&1n[1][o])return 1;if(n[0][o]!==n[1][o])return-1;if(0===o)return 0}}function t(e,n,o){var a=l;"string"==typeof n&&(o=n,n=void 0),void 0===n&&(n=!1),o&&(a=u(o));var r=""+a.version;for(var t in e)if(e.hasOwnProperty(t)&&a[t]){if("string"!=typeof e[t])throw new Error("Browser version in the minVersion map should be a string: "+t+": "+String(e));return A([r,e[t]])<0}return n}var _=!0,l=u("undefined"!=typeof navigator&&navigator.userAgent||"");return l.test=function(e){for(var n=0;n>>0)+"__"+a,function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}return o.prototype._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,o=0;o>3<<3;y>>2),i[s++]=255&(o<<6|a<<1|r>>>4),i[s++]=255&(r<<4|t>>>1),i[s++]=255&(t<<7|u<<2|l>>>3),i[s++]=255&(l<<5|p);var d=c-g;return 2===d?(n=h[e.charAt(y++)],o=h[e.charAt(y++)],i[s++]=255&(n<<3|o>>>2)):4===d?(n=h[e.charAt(y++)],o=h[e.charAt(y++)],a=h[e.charAt(y++)],r=h[e.charAt(y++)],i[s++]=255&(n<<3|o>>>2),i[s++]=255&(o<<6|a<<1|r>>>4)):5===d?(n=h[e.charAt(y++)],o=h[e.charAt(y++)],a=h[e.charAt(y++)],r=h[e.charAt(y++)],t=h[e.charAt(y++)],i[s++]=255&(n<<3|o>>>2),i[s++]=255&(o<<6|a<<1|r>>>4),i[s++]=255&(r<<4|t>>>1)):7===d&&(n=h[e.charAt(y++)],o=h[e.charAt(y++)],a=h[e.charAt(y++)],r=h[e.charAt(y++)],t=h[e.charAt(y++)],u=h[e.charAt(y++)],l=h[e.charAt(y++)],i[s++]=255&(n<<3|o>>>2),i[s++]=255&(o<<6|a<<1|r>>>4),i[s++]=255&(r<<4|t>>>1),i[s++]=255&(t<<7|u<<2|l>>>3)),i},a=function(e,n){if(!n)return function(e){for(var n,o,a="",r=e.length,t=0,u=0;t>10)),a+=String.fromCharCode(56320+(1023&o)))}return a}(w(e));if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var o,a,r,t,u,l,p,i,s="",c=e.indexOf("=");-1===c&&(c=e.length);for(var y=0,g=c>>3<<3;y>>2))+String.fromCharCode(255&(a<<6|r<<1|t>>>4))+String.fromCharCode(255&(t<<4|u>>>1))+String.fromCharCode(255&(u<<7|l<<2|p>>>3))+String.fromCharCode(255&(p<<5|i));var d=c-g;return 2===d?(o=h[e.charAt(y++)],a=h[e.charAt(y++)],s+=String.fromCharCode(255&(o<<3|a>>>2))):4===d?(o=h[e.charAt(y++)],a=h[e.charAt(y++)],r=h[e.charAt(y++)],t=h[e.charAt(y++)],s+=String.fromCharCode(255&(o<<3|a>>>2))+String.fromCharCode(255&(a<<6|r<<1|t>>>4))):5===d?(o=h[e.charAt(y++)],a=h[e.charAt(y++)],r=h[e.charAt(y++)],t=h[e.charAt(y++)],u=h[e.charAt(y++)],s+=String.fromCharCode(255&(o<<3|a>>>2))+String.fromCharCode(255&(a<<6|r<<1|t>>>4))+String.fromCharCode(255&(t<<4|u>>>1))):7===d&&(o=h[e.charAt(y++)],a=h[e.charAt(y++)],r=h[e.charAt(y++)],t=h[e.charAt(y++)],u=h[e.charAt(y++)],l=h[e.charAt(y++)],p=h[e.charAt(y++)],s+=String.fromCharCode(255&(o<<3|a>>>2))+String.fromCharCode(255&(a<<6|r<<1|t>>>4))+String.fromCharCode(255&(t<<4|u>>>1))+String.fromCharCode(255&(u<<7|l<<2|p>>>3))),s},r={encode:function(e,n){var o="string"!=typeof e;return o&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),o?function(e){for(var n,o,a,r,t,u="",l=e.length,p=0,i=5*parseInt(l/5);p>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[31&(a<<1|r>>>7)]+g[r>>>2&31]+g[31&(r<<3|t>>>5)]+g[31&t];var s=l-i;return 1===s?(n=e[p],u+=g[n>>>3]+g[n<<2&31]+"======"):2===s?(n=e[p++],o=e[p],u+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[o<<4&31]+"===="):3===s?(n=e[p++],o=e[p++],a=e[p],u+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[a<<1&31]+"==="):4===s&&(n=e[p++],o=e[p++],a=e[p++],r=e[p],u+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[31&(a<<1|r>>>7)]+g[r>>>2&31]+g[r<<3&31]+"="),u}(e):n?function(e){for(var n,o,a,r,t,u="",l=e.length,p=0,i=5*parseInt(l/5);p>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[31&(a<<1|r>>>7)]+g[r>>>2&31]+g[31&(r<<3|t>>>5)]+g[31&t];var s=l-i;return 1===s?(n=e.charCodeAt(p),u+=g[n>>>3]+g[n<<2&31]+"======"):2===s?(n=e.charCodeAt(p++),o=e.charCodeAt(p),u+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[o<<4&31]+"===="):3===s?(n=e.charCodeAt(p++),o=e.charCodeAt(p++),a=e.charCodeAt(p),u+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[a<<1&31]+"==="):4===s&&(n=e.charCodeAt(p++),o=e.charCodeAt(p++),a=e.charCodeAt(p++),r=e.charCodeAt(p),u+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[31&(a<<1|r>>>7)]+g[r>>>2&31]+g[r<<3&31]+"="),u}(e):function(e){var n,o,a,r,t,u,l,p=!1,i="",s=0,c=0,y=e.length;do{for(d[0]=d[5],d[1]=d[6],d[2]=d[7],l=c;s>6:(d[l++]=u<55296||57344<=u?224|u>>12:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),d[l++]=240|u>>18,128|u>>12&63),128|u>>6&63),128|63&u);c=l-5,s===y&&++s,y>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[31&(a<<1|r>>>7)]+g[r>>>2&31]+g[31&(r<<3|t>>>5)]+g[31&t]):1===l?i+=g[n>>>3]+g[n<<2&31]+"======":2===l?(o=d[1],i+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[o<<4&31]+"===="):3===l?(o=d[1],a=d[2],i+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[a<<1&31]+"==="):(o=d[1],a=d[2],r=d[3],i+=g[n>>>3]+g[31&(n<<2|o>>>6)]+g[o>>>1&31]+g[31&(o<<4|a>>>4)]+g[31&(a<<1|r>>>7)]+g[r>>>2&31]+g[r<<3&31]+"=")}while(!p);return i}(e)},decode:a};a.asBytes=w,n?l.exports=r:(e.base32=r,o&&void 0!==(p=function(){return r}.call(r,s,r,l))&&(l.exports=p))}()}).call(n,s("./node_modules/process/browser.js"),s("./node_modules/webpack/buildin/global.js"),s("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/post-robot/src/bridge/index.js":function(e,n,o){Object.defineProperty(n,"__esModule",{value:!0});var l=o("./node_modules/zalgo-promise/src/index.js"),y=o("./node_modules/cross-domain-utils/src/index.js"),g=o("./node_modules/post-robot/src/conf/index.js"),d=o("./node_modules/post-robot/src/lib/index.js"),h=o("./node_modules/post-robot/src/global.js");function f(e){try{h.a.tunnelWindows[e]&&delete h.a.tunnelWindows[e].source}catch(e){}delete h.a.tunnelWindows[e]}h.a.tunnelWindows=h.a.tunnelWindows||{},h.a.tunnelWindowId=0,h.a.openTunnelToParent=function(e){var n=e.name,o=e.source,a=e.canary,r=e.sendMessage,t=Object(y.getParent)(window);if(!t)throw new Error("No parent window found to open tunnel to");var u,l,p,i,s,c=(l=(u={name:n,source:o,canary:a,sendMessage:r}).name,p=u.source,i=u.canary,s=u.sendMessage,function(){for(var e=h.a.tunnelWindows,n=0,o=Object.keys(e),a=null==o?0:o.length;n";if("string"==typeof e)return e;if(e instanceof Error){var o=e&&e.stack,a=e&&e.message;if(o&&a)return-1!==o.indexOf(a)?o:a+"\n"+o;if(o)return o;if(a)return a}return"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}catch(e){return"Error while stringifying error: "+h(e,n+1)}}var a=function(e){if(!e)return e;var n=!1;return function(){if(!n)return n=!0,e.apply(this,arguments)}};function t(){}function p(e,n,o){return e.addEventListener?e.addEventListener(n,o):e.attachEvent("on"+n,o),{cancel:function(){e.removeEventListener?e.removeEventListener(n,o):e.detachEvent("on"+n,o)}}}function i(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})}function s(e,n){for(var o=0;o"),"function"!=typeof n)throw new TypeError("Expected to be passed function to clean.register");a?n():t.push({complete:!1,name:e,run:function(){this.complete||(this.complete=!0,n&&n())}})},hasTasks:function(){return Boolean(t.filter(function(e){return!e.complete}).length)},all:function(){var e=[];for(a=!0;t.length;)e.push(t.pop().run());return u.a.all(e).then(function(){})},run:function(e){for(var n=[],o=0,a=null==t?0:t.length;o ."+r.OUTLET+" {\n width: "+p+";\n height: "+i+";\n }\n\n #"+n+" > ."+r.OUTLET+" {\n display: inline-block;\n position: relative;\n }\n\n #"+n+" > ."+r.OUTLET+" > iframe {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > ."+r.OUTLET+" > iframe."+r.VISIBLE+" {\n opacity: 1;\n }\n\n #"+n+" > ."+r.OUTLET+" > iframe."+r.INVISIBLE+" {\n opacity: 0;\n }\n "),t)}function m(e){var n=e.jsxDom;return n("html",null,n("head",null,n("style",null,"\n html, body {\n width: 100%;\n height: 100%;\n overflow: hidden;\n top: 0;\n left: 0;\n margin: 0;\n text-align: center;\n }\n\n .spinner {\n position: absolute;\n max-height: 60vmin;\n max-width: 60vmin;\n height: 40px;\n width: 40px;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n z-index: 10;\n }\n\n .spinner .loader {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n border: 3px solid rgba(0, 0, 0, .2);\n border-top-color: rgba(33, 128, 192, 0.8);\n border-radius: 100%;\n animation: rotation .7s infinite linear;\n\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg)\n }\n to {\n transform: rotate(359deg)\n }\n }\n ")),n("body",null,n("div",{class:"spinner"},n("div",{id:"loader",class:"loader"}))))}o("./node_modules/zoid/src/types.js"),o.d(n,"a",function(){return T});var E,C,b,v,P,A,_,O="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},L={angular:y.angular,angular2:y.angular2,glimmer:y.glimmer,react:y.react,vue:y.vue,script:y.script},T=(C=(E=function(o){function a(e){!function(e,n){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this);var n=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,o.call(this));if(function(e){if(!e)throw new Error("Expecred options to be passed");if(!e.tag||!e.tag.match(/^[a-z0-9-]+$/))throw new Error("Invalid options.tag: "+e.tag);if(function(e){if(e.props&&"object"!==g(e.props))throw new Error("Expected options.props to be an object");if(e.props)for(var n=0,o=Object.keys(e.props),a=null==o?0:o.length;nurl");if(e.url&&"object"===g(e.url)&&!e.url[e.defaultEnv])throw new Error("No url found for default env: "+e.defaultEnv)}if(e.url&&"object"===g(e.url)){if(!e.defaultEnv)throw new Error("Must pass options.defaultEnv with env->url mapping");for(var u=0,l=Object.keys(e.url),p=null==l?0:l.length;u\n\n '+e+"\n\n