{"version":3,"file":"te-connect-js.js","sources":["webpack://te-connect-js/te-connect-js.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports[\"te-connect-js\"]=e():t[\"te-connect-js\"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=9)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){function n(e){return\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},n(e)}t.exports=n},function(t,e,n){t.exports=n(8)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}},function(t,e){function n(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,\"next\",t)}function u(t){n(a,o,i,c,u,\"throw\",t)}c(void 0)}))}}},function(t,e){function n(t,e){for(var n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}},function(t,e,n){var r=function(t){\"use strict\";var e=Object.prototype,n=e.hasOwnProperty,r=\"function\"==typeof Symbol?Symbol:{},o=r.iterator||\"@@iterator\",i=r.asyncIterator||\"@@asyncIterator\",a=r.toStringTag||\"@@toStringTag\";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},\"\")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new P(r||[]);return i._invoke=function(t,e,n){var r=\"suspendedStart\";return function(o,i){if(\"executing\"===r)throw new Error(\"Generator is already running\");if(\"completed\"===r){if(\"throw\"===o)throw i;return x()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=g(a,n);if(c){if(c===l)continue;return c}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(\"suspendedStart\"===r)throw r=\"completed\",n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);r=\"executing\";var u=s(t,e,n);if(\"normal\"===u.type){if(r=n.done?\"completed\":\"suspendedYield\",u.arg===l)continue;return{value:u.arg,done:n.done}}\"throw\"===u.type&&(r=\"completed\",n.method=\"throw\",n.arg=u.arg)}}}(t,n,a),i}function s(t,e,n){try{return{type:\"normal\",arg:t.call(e,n)}}catch(t){return{type:\"throw\",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var y={};y[o]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(S([])));m&&m!==e&&n.call(m,o)&&(y=m);var v=h.prototype=f.prototype=Object.create(y);function b(t){[\"next\",\"throw\",\"return\"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var u=s(t[o],t,i);if(\"throw\"!==u.type){var l=u.arg,f=l.value;return f&&\"object\"==typeof f&&n.call(f,\"__await\")?e.resolve(f.__await).then((function(t){r(\"next\",t,a,c)}),(function(t){r(\"throw\",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r(\"throw\",t,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function g(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,\"throw\"===e.method){if(t.iterator.return&&(e.method=\"return\",e.arg=void 0,g(t,e),\"throw\"===e.method))return l;e.method=\"throw\",e.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return l}var r=s(n,t.iterator,e.arg);if(\"throw\"===r.type)return e.method=\"throw\",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,\"return\"!==e.method&&(e.method=\"next\",e.arg=void 0),e.delegate=null,l):o:(e.method=\"throw\",e.arg=new TypeError(\"iterator result is not an object\"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if(\"root\"===i.tryLoc)return r(\"end\");if(i.tryLoc<=this.prev){var c=n.call(i,\"catchLoc\"),u=n.call(i,\"finallyLoc\");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,\"finallyLoc\")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if(\"throw\"===r.type){var o=r.arg;O(n)}return o}}throw new Error(\"illegal catch attempt\")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},\"next\"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function(\"r\",\"regeneratorRuntime = r\")(r)}},function(t,e,n){\"use strict\";n.r(e),n.d(e,\"TeConnectJs\",(function(){return N}));var r=n(3),o=n.n(r),i=n(6),a=n.n(i),c=n(2),u=n.n(c),s=n(4),l=n.n(s),f=n(1),p=n.n(f),h=n(5),y=n.n(h),d=n(0),m=n.n(d),v=\"\".concat(\"https://svc4.magensa.net\",\"/TEConnect\"),b=[\"instanceId\",\"pubKey\",\"requestOrigin\"],w=\"This usually means TEConnect was not loaded properly - or is unable to resolve the TEConnect URL.\",g=\"Reference to Card Entry element was not found. \".concat(w,\".\"),E=\"Id for TEConnect inputs was not found. \".concat(w,\".\"),O=\"__te-connect-secure-window\",P={passive:!0},S={border:\"none !important\",margin:\"0px !important\",padding:\"0px !important\",width:\"1px !important\",minWidth:\"100% !important\",overflow:\"hidden !important\",display:\"block !important\",userSelect:\"none !important\",transform:\"translateZ(0px) !important\",height:\"100%\"},x={buttonLanguage:\"en\",buttonType:\"plain\",buttonStyle:\"black\"};function T(t,e){var n;if(\"undefined\"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if(\"string\"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(t);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(t,e)}(t))||e&&t&&\"number\"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var i,a=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n5&&(this.formId=n),\"string\"==typeof r&&r.length>5&&(this.prFormId=r)}}},{key:\"attachTeFormListener\",value:function(){window.addEventListener(\"message\",this.formIdListener,!this.listenerOptionsSupported||P),window.addEventListener(\"unload\",(function(){window.removeEventListener(\"message\",this.formIdListener,!this.listenerOptionsSupported||P)}),!this.listenerOptionsSupported||P)}}]),t}(),N=function t(e){o()(this,t);var n=new _(e);this.createPayment=n.createPayment,this.setStyles=n.setStyles,this.mountCardEntry=n.mountCardEntry,this.createTecPaymentRequest=n.createTecPaymentRequest}}])}));"],"mappings":"AAAA","sourceRoot":""}