Valide reactie. Dit is het script.
<!--
'use strict';var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&'function'==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?'symbol':typeof b};(function(b,d){console.log('Connect SDK Version: 2.0.0');var g='finicityConnect';'function'==typeof define&&define.amd?define([g],d):'object'===('undefined'==typeof exports?'undefined':_typeof(exports))?module.exports=d():b[g]=d(),'u'!=('undefined'==typeof Promise?'undefined':_typeof(Promise))[0]||function(k,m){function q(z,A){return('undefined'==typeof A?'undefined':_typeof(A))[0]==z}function v(z,A){return A=function B(C,D,E,F,G,H){function I(J){return function(K){G&&(G=0,B(q,J,K))}}if(F=B.q,C!=q)return v(function(J,K){F.push({p:this,r:J,j:K,1:C,0:D})});if(E&&q(k,E)|q(m,E))try{G=E.then}catch(J){D=0,E=J}if(q(k,G))try{G.call(E,I(1),D=I(0))}catch(J){D(J)}else for(A=function e(J,K){return q(k,J=D?J:K)?v(function(L,M){w(this,L,M,E,J)}):z},H=0;H<F.length;)G=F[H++],q(k,C=G[D])?w(G.p,G.r,G.j,E,C):(D?G.r:G.j)(E)},A.q=[],z.call(z={then:function then(B,C){return A(B,C)},'catch':function _catch(B){return A(0,B)}},function(B){A(q,1,B)},function(B){A(q,0,B)}),z}function w(z,A,B,C,D){setTimeout(function(){try{C=D(C),D=C&&q(m,C)|q(k,C)&&C.then,q(k,D)?C==z?B(TypeError()):D.call(C,A,B):A(C)}catch(E){B(E)}})}function x(z){return v(function(A){A(z)})}window.Promise=v,v.resolve=x,v.reject=function(z){return v(function(A,B){B(z)})},v.all=function(z){return v(function(A,B,C,D){D=[],C=z.length||A(D),z.map(function(E,F){x(E).then(function(G){D[F]=G,--C||A(D)},B)})})}}('f','o'),function(k){var q=function m(){try{return!!Symbol.iterator}catch(A){return!1}}(),v=function(A){var B={next:function next(){var C=A.shift();return{done:void 0===C,value:C}}};return q&&(B[Symbol.iterator]=function(){return B}),B},w=function(A){return encodeURIComponent(A).replace(/%20/g,'+')},x=function(A){return decodeURIComponent(A).replace(/\+/g,' ')};'URLSearchParams'in k&&'a=1'===new URLSearchParams('?a=1').toString()||function a(){var A=function(C){if(Object.defineProperty(this,'_entries',{value:{}}),'string'==typeof C){if(''!==C){C=C.replace(/^\?/,'');for(var E,D=C.split('&'),F=0;F<D.length;F++)E=D[F].split('='),this.append(x(E[0]),1<E.length?x(E[1]):'')}}else if(C instanceof A){var G=this;C.forEach(function(H,I){G.append(H,I)})}},B=A.prototype;B.append=function(C,D){C in this._entries?this._entries[C].push(D.toString()):this._entries[C]=[D.toString()]},B.delete=function(C){delete this._entries[C]},B.get=function(C){return C in this._entries?this._entries[C][0]:null},B.getAll=function(C){return C in this._entries?this._entries[C].slice(0):[]},B.has=function(C){return C in this._entries},B.set=function(C,D){this._entries[C]=[D.toString()]},B.forEach=function(C,D){var E;for(var F in this._entries)if(this._entries.hasOwnProperty(F)){E=this._entries[F];for(var G=0;G<E.length;G++)C.call(D,E[G],F,this)}},B.keys=function(){var C=[];return this.forEach(function(D,E){C.push(E)}),v(C)},B.values=function(){var C=[];return this.forEach(function(D){C.push(D)}),v(C)},B.entries=function(){var C=[];return this.forEach(function(D,E){C.push([E,D])}),v(C)},q&&(B[Symbol.iterator]=B.entries),B.toString=function(){var C=[];return this.forEach(function(D,E){C.push(w(E)+'='+w(D))}),C.join('&')},k.URLSearchParams=A}()}('undefined'==typeof global?'undefined'==typeof window?'undefined'==typeof self?this:self:window:global),function(k){if(function m(){try{var w=new URL('b','http://a');return w.pathname='c%20d','http://a/c%20d'===w.href&&w.searchParams}catch(x){return!1}}()||function n(){var w=k.URL,x=function n(B,C){'string'!=typeof B&&(B+='');var D=document.implementation.createHTMLDocument('');if(window.doc=D,C){var E=D.createElement('base');E.href=C,D.head.appendChild(E)}var F=D.createElement('a');if(F.href=B,D.body.appendChild(F),F.href=F.href,':'===F.protocol||!/:/.test(F.href))throw new TypeError('Invalid URL');Object.defineProperty(this,'_anchorElement',{value:F})},z=x.prototype,A=function(B){Object.defineProperty(z,B,{get:function get(){return this._anchorElement[B]},set:function set(C){this._anchorElement[B]=C},enumerable:!0})};['hash','host','hostname','port','protocol','search'].forEach(function(B){A(B)}),Object.defineProperties(z,{toString:{get:function get(){var B=this;return function(){return B.href}}},href:{get:function get(){return this._anchorElement.href.replace(/\?$/,'')},set:function set(B){this._anchorElement.href=B},enumerable:!0},pathname:{get:function get(){return this._anchorElement.pathname.replace(/(^\/?)/,'/')},set:function set(B){this._anchorElement.pathname=B},enumerable:!0},origin:{get:function get(){var B={'http:':80,'https:':443,'ftp:':21}[this._anchorElement.protocol],C=this._anchorElement.port!=B&&''!==this._anchorElement.port;return this._anchorElement.protocol+'//'+this._anchorElement.hostname+(C?':'+this._anchorElement.port:'')},enumerable:!0},password:{get:function get(){return''},set:function set(){},enumerable:!0},username:{get:function get(){return''},set:function set(){},enumerable:!0},searchParams:{get:function get(){var B=new URLSearchParams(this.search),C=this;return['append','delete','set'].forEach(function(D){var E=B[D];B[D]=function(){E.apply(B,arguments),C.search=B.toString()}}),B},enumerable:!0}}),x.createObjectURL=function(){return w.createObjectURL.apply(w,arguments)},x.revokeObjectURL=function(){return w.revokeObjectURL.apply(w,arguments)},k.URL=x}(),void 0!==k.location&&!('origin'in k.location)){var v=function(){return k.location.protocol+'//'+k.location.hostname+(k.location.port?':'+k.location.port:'')};try{Object.defineProperty(k.location,'origin',{get:v,enumerable:!0})}catch(w){setInterval(function(){k.location.origin=v()},100)}}}('undefined'==typeof global?'undefined'==typeof window?'undefined'==typeof self?this:self:window:global)})(window,function(){function b(L){var M=setInterval(g,1e3,{type:B,selector:L});G=function onMessageFn(N){var O=N.data.data,P=N.data.type;N.origin===H&&(P===v?clearInterval(M):P===x?d(N.data.url):P===z?(F.success(O),K.destroy()):P===w?(F.cancel(O),K.destroy()):P===A?(F.error(O),K.destroy()):P===D?F.route(N.data):P===E&&F.user(N.data))},window.addEventListener('message',G)}function d(L){var M=window.top.outerHeight/2+window.top.screenY-q/2,N=window.top.outerWidth/2+window.top.screenX-m/2,O=window.open(L,'targetWindow','toolbar=no,location=no,status=no,menubar=no,width='+m+',height='+q+',top='+M+',left='+N);O.focus();var P=setInterval(function(){O.closed&&(clearInterval(P),g({type:C,closed:!0}))},1e3)}function g(L){I&&I.contentWindow&&I.contentWindow.postMessage(L,H)}var k='finicityConnectIframe',m=600,q=600,v='ack',w='cancel',x='url',z='done',A='error',B='ping',C='window',D='route',E='user',F,G,H,I,J;document.addEventListener('DOMContentLoaded',function(){var L=document.createElement('style');L.type='text/css',L.innerHTML='#'+k+'{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n background: rgba(0,0,0,0.8);\n }',document.getElementsByTagName('head')[0].appendChild(L)});var K={destroy:function destroy(){I&&I.parentNode&&I.parentNode.removeChild(I),J&&J.parentNode&&J.parentNode.removeChild(J),I=void 0,J=void 0,window.removeEventListener('message',G)},launch:function launch(L){var M=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},N=!!M.selector;if(F=M,I&&I.parentNode)throw new Error('You must destroy the iframe before you can open a new one. Call finicityConnect.destroy()');return new Promise(function(O,P){M.success=M.success||function(T){O(T)},M.error=M.error||function(T){P(T)},M.loaded=M.loaded||function(){},M.cancel=M.cancel||function(T){P(T)},M.route=M.route||function(){},M.user=M.user||function(){};var Q=document.querySelectorAll('meta[name="viewport"]');0===Q.length&&(J=document.createElement('meta'),J.setAttribute('name','viewport'),J.setAttribute('content','initial-scale=1'),document.head.appendChild(J)),I=document.createElement('iframe'),I.src=L,I.setAttribute('id',k),I.setAttribute('frameborder','0'),I.setAttribute('scrolling','no'),M.overlay&&I.setAttribute('style','background: '+M.overlay+';');var R=document.querySelector(M.selector)||document.body;R.appendChild(I),H=new URL(L).origin;var S=!1;I.onload=function(){S||(b(N),M.loaded(),S=!0)}})}};return K});
//# sourceMappingURL=finicity-connect.min.js.map
-->