!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VenlyConnect=t():e.VenlyConnect=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=36)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return f})),n.d(t,"__read",(function(){return h})),n.d(t,"__spread",(function(){return _})),n.d(t,"__spreadArrays",(function(){return v})),n.d(t,"__await",(function(){return T})),n.d(t,"__asyncGenerator",(function(){return R})),n.d(t,"__asyncDelegator",(function(){return A})),n.d(t,"__asyncValues",(function(){return y})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return m})),n.d(t,"__importDefault",(function(){return g}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function p(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function T(e){return this instanceof T?(this.v=e,this):new T(e)}function R(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof T?Promise.resolve(n.value.v).then(u,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function A(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:T(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function y(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionRequest=void 0;var r=function(){};t.TransactionRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(){}return Object.defineProperty(e,"rawEnvironment",{get:function(){return e.rawEnvironmentHolder},set:function(t){e.rawEnvironmentHolder=t;var n=t.split("-");e.environment=n[0],e.connectEnvironment=n.length>1&&n[1]||"",e.keycloakEnvironment=n.length>2&&n[2]||""},enumerable:!1,configurable:!0}),e.environments=function(){return{qa:{api:"https://api-wallet-qa.venly.io/api",connect:"https://connect-qa.venly.io",login:"https://login-qa.venly.io/auth",storage:"https://storage-qa.venly.io/production"},staging:{api:"https://api-wallet-staging.venly.io/api",connect:"https://connect-staging.venly.io",login:"https://login-staging.venly.io/auth",storage:"https://storage-staging.venly.io/production"},sandbox:{api:"https://api-wallet-sandbox.venly.io/api",connect:"https://connect-sandbox.venly.io",login:"https://login-staging.venly.io/auth",storage:"https://storage.venly.io/sandbox"}}},Object.defineProperty(e,"urls",{get:function(){var t="";switch(e.environment){case"local":t="qa";break;case"prod":case"production":t="";break;default:t=e.environment}var n=this.environments()[t];return n?{api:n.api,connect:"local"===e.environment||"local"===e.connectEnvironment?"http://localhost:8181":n.connect,login:"local"===e.keycloakEnvironment?"https://localhost:8443":n.login,storage:n.storage}:{api:"https://api-wallet.venly.io/api",connect:"https://connect.venly.io",login:"https://login.venly.io/auth",storage:"https://storage.venly.io/production"}},enumerable:!1,configurable:!0}),e.removeNulls=function(t){return Object.keys(t).filter((function(e){return null!==t[e]&&void 0!==t[e]})).reduce((function(n,r){var o,i;return"object"!=typeof t[r]||Array.isArray(t[r])?Object.assign(n,((i={})[r]=t[r],i)):Object.assign(n,((o={})[r]=e.removeNulls(t[r]),o))}),{})},e.removeNullsAndEmpty=function(t){return Object.keys(t).filter((function(e){return null!==t[e]&&void 0!==t[e]&&""!==t[e]})).reduce((function(n,r){var o,i;return"object"!=typeof t[r]||Array.isArray(t[r])?Object.assign(n,((i={})[r]=t[r],i)):Object.assign(n,((o={})[r]=e.removeNullsAndEmpty(t[r]),o))}),{})},e.messages=function(){return{hasValidOrigin:function(t){return t.origin===e.urls.connect},hasType:function(e){return e.data&&e.data.type&&""!==e.data.type},isOfType:function(t,n){return e.messages().hasType(t)&&t.data.type===n.toString()},hasCorrectCorrelationID:function(e,t){return t&&e.data&&e.data.correlationID===t}}},e.formatNumber=function(e,t,n){return void 0===t&&(t=2),void 0===n&&(n=t),new Intl.NumberFormat("en-US",{minimumFractionDigits:t,maximumFractionDigits:n}).format(e)},e.rawValue=function(){return{toTokenValue:function(e,t){return e/Math.pow(10,t)},toGwei:function(e){return e/Math.pow(10,9)}}},e.gwei=function(){return{toRawValue:function(e){return e*Math.pow(10,9)}}},e.openExternalUrl=function(e,t){if(void 0===t&&(t=!0),t){var n=window.open("","_blank");return n&&(n.opener=null,n.location.assign(e)),n}return window.location.href=e,window},e.zeroIfUndefined=function(e){return e||0},e.defaultRedirectUriIfNotPresent=function(e){return void 0===e&&(e={}),e.redirectUri||(e.redirectUri=window.location.href),e},e.http=function(){return{postInForm:function(t,n,o,i){i=e.defaultRedirectUriIfNotPresent(i);var a=document.createElement("form");a.action=e.http().buildUrl(t,i),a.method="POST";var s=document.createElement("input");s.type="hidden",s.name="bearerToken",s.value=o(),a.appendChild(s);var u=document.createElement("input");u.type="hidden",u.name="data",u.value=JSON.stringify(r.__assign({},n)),a.appendChild(u),document.body.appendChild(a),a.submit()},buildUrl:function(t,n){if(n&&(n.redirectUri||n.correlationID)){var r={};return n.redirectUri&&(r.redirectUri=n.redirectUri),n.correlationID&&(r.cid=n.correlationID),e.http().addRequestParams(t,r)}return t},addRequestParams:function(e,t){if(e&&t){var n=new URLSearchParams(t).toString();return e&&e.indexOf("?")>0?e+"&"+n:e+"?"+n}return e}}},e.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},e.rawEnvironmentHolder="",e.environment="",e.connectEnvironment="",e.keycloakEnvironment="",e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowMode=void 0,function(e){e.POPUP="POPUP",e.DIALOG="DIALOG",e.REDIRECT="REDIRECT"}(t.WindowMode||(t.WindowMode={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventTypes=void 0,function(e){e.POPUP_CLOSED="POPUP_CLOSED",e.POPUP_FINISHED="POPUP_FINISHED",e.POPUP_MOUNTED="POPUP_MOUNTED",e.SEND_DATA="SEND_DATA",e.SEND_TRANSACTION_DATA="SEND_TRANSACTION_DATA",e.SIGNER_FINISHED="SIGNER_FINISHED",e.TRANSACTION_EXECUTED="TRANSACTION_EXECUTED",e.TRANSACTION_SIGNED="TRANSACTION_SIGNED",e.CHECK_AUTHENTICATED="CHECK_AUTHENTICATED",e.AUTHENTICATE="AUTHENTICATE",e.LOGOUT="LOGOUT"}(t.EventTypes||(t.EventTypes={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogWindow=void 0;var r=n(0),o=n(8),i=n(3),a=r.__importDefault(n(2)),s=function(){function e(){}return e.openLoginDialog=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,s=this;return r.__generator(this,(function(u){switch(t.idpHint){case"google":n=a.default.urls.connect+"/modal/login/google";break;case"apple":n=a.default.urls.connect+"/modal/login/apple";break;case"twitter":case"arkane-twitter":n=a.default.urls.connect+"/modal/login/twitter";break;case"facebook":case"arkane-facebook":n=a.default.urls.connect+"/modal/login/facebook";break;case"password":n=a.default.urls.connect+"/modal/login/password";break;default:n=a.default.urls.connect+"/modal/login/none"}return[2,new Promise((function(a,u){fetch(n).then((function(e){return e.text()})).then((function(n){var c=s.createTemplate(n,e),l=c.overlayContainer,d=c.container,p=c.shadowRoot,f=t.idpHint;"register"===f?(s.showRefocusLayout(),o.Security.login(e,r.__assign(r.__assign({},t),{idpHint:f,windowMode:i.WindowMode.POPUP})).then((function(e){s.removeBackdrop(),s.closeRefocusLayout(),a(e)}))):(l.appendChild(d),s.addAuthEventListeners(e,t,a,p),document.body.appendChild(l),s.addCloseListeners(p,u))}))}))]}))}))},e.openActionDialog=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,o=this;return r.__generator(this,(function(r){return n=a.default.urls.connect+"/modal/action/"+t,[2,new Promise((function(t,r){fetch(n).then((function(e){return e.text()})).then((function(n){var i=o.createTemplate(n,e),a=i.overlayContainer,s=i.container,u=i.shadowRoot;u.querySelector(".action-btn").addEventListener("click",(function(){o.closeLoginDialog(),t(!0)})),a.appendChild(s),document.body.appendChild(a),o.addCloseListeners(u,r)}))}))]}))}))},e.addFonts=function(){if("undefined"!=typeof window){var e=a.default.urls.connect+"/static/css/connect/fonts.css";if(!document.querySelector('link[href="'+e+'"]')){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),t.setAttribute("type","text/css"),t.setAttribute("crossorigin","anonymous"),document.querySelector("head").appendChild(t)}}},e.addAnimationScript=function(e){var t="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.10.2/lottie.min.js";if(!document.querySelector('script[src="'+t+'"]')){var n=document.createElement("script");n.setAttribute("src",t),n.setAttribute("integrity","sha512-fTTVSuY9tLP+l/6c6vWz7uAQqd1rq3Q/GyKBN2jOZvJSLC5RjggSdboIFL1ox09/Ezx/AKwcv/xnDeYN9+iDDA=="),n.setAttribute("crossorigin","anonymous"),n.setAttribute("referrerpolicy","no-referrer"),document.querySelector("head").appendChild(n)}var r=setInterval((function(){var t=lottie;t&&(t.loadAnimation({container:e.querySelector(".animation"),renderer:"svg",loop:!0,autoplay:!0,path:a.default.urls.connect+"/static/animations/login-animation.json"}),clearInterval(r))}),100)},e.addAuthEventListeners=function(e,t,n,a){var s=this,u=a.querySelectorAll(".auth-action");Array.from(u).forEach((function(a){a.addEventListener("click",(function(a){var u=a.target.dataset.idpHint||a.target.parentElement.dataset.idpHint;o.Security.login(e,r.__assign(r.__assign({},t),{idpHint:u,windowMode:i.WindowMode.POPUP})).then((function(e){s.removeBackdrop(),s.closeRefocusLayout(t.closePopup),n(e)})),s.closeLoginDialog(),s.showRefocusLayout()}))}));var c=a.querySelector(".select-another-option");c&&c.addEventListener("click",(function(){s.closeLoginDialog(),s.removeBackdrop(),delete t.idpHint,n(s.openLoginDialog(e,t))}))},e.addCloseListeners=function(e,t){var n=this,r=e.querySelector(".venly-connect-close-dialog");r&&r.addEventListener("click",(function(){n.closeLoginDialog(),n.removeBackdrop(),t({status:"ABORTED",errors:[]})}))},e.closeLoginDialog=function(){document.querySelectorAll(".venly-connect-dialog-container").forEach((function(e){return e.remove()}))},e.removeBackdrop=function(){document.querySelectorAll(".overlay-container").forEach((function(e){return e.remove()}))},e.showRefocusLayout=function(e,t){var n=this;fetch(a.default.urls.connect+"/modal/re-focus-layout").then((function(e){return e.text()})).then((function(r){var o=n.createOverlayContainer(e),i=document.createElement("div"),a=i.attachShadow({mode:"open"});i.classList.add("venly-connect-refocus-container"),a.innerHTML=r,i.style.position="absolute",i.style.top="calc(50% - 218px)",i.style.left="calc(50% - 147.5px)",i.style.zIndex="2147483647";var s=document.querySelector(".overlay-container");s?s.appendChild(i):(o.appendChild(n.createBackdrop()),o.appendChild(i),document.body.appendChild(o)),n.addRefocusListeners(a,t)}))},e.closeRefocusLayout=function(e){void 0===e&&(e=!0),document.querySelectorAll(".overlay-container").forEach((function(e){return e.remove()})),document.querySelectorAll(".venly-connect-refocus-container").forEach((function(e){return e.remove()})),e&&o.Security.closePopupWindow()},e.addRefocusListeners=function(e,t){void 0===t&&(t=o.Security.focusPopupWindow);var n=e.querySelector(".venly-connect-re-focus-wrapper .reopen-action");n&&n.addEventListener("click",(function(){return t()}))},e.createOverlayContainer=function(e){void 0===e&&(e="venly-overlay-container");var t=document.createElement("div");return t.id=e,t.classList.add("overlay-container"),t.style.position="fixed",t.style.zIndex="2147483647",t.style.top="0",t.style.left="0",t.style.height="100%",t.style.background="rgba(33, 37, 41, 0.70)",t.style.width="100%",t},e.createBackdrop=function(){var e=document.createElement("div");return e.classList.add("venly-connect-dialog-backdrop"),e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.zIndex="2147483647",e.style.backdropFilter="blur(5px)",e},e.createTemplate=function(e,t){var n=document.createElement("div"),r=n.attachShadow({mode:"open"});n.classList.add("venly-connect-dialog-container"),r.innerHTML=e,n.style.position="absolute",n.style.zIndex="2147483647",n.style.display="flex",n.style.justifyContent="center",n.style.width="100%",n.style.height="100%",r.querySelector(".connect-company-logo").src=a.default.urls.storage+"/clients/logos/"+t+".png";var o=this.createOverlayContainer();return o.appendChild(this.createBackdrop()),this.addFonts(),this.addAnimationScript(r),o.appendChild(n),{overlayContainer:o,container:n,shadowRoot:r}},e}();t.DialogWindow=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTransactionRequestType=void 0,function(e){e.TRANSFER="TRANSFER",e.GAS_TRANSFER="GAS_TRANSFER",e.TOKEN_TRANSFER="TOKEN_TRANSFER",e.NFT_TRANSFER="NFT_TRANSFER",e.CONTRACT_EXECUTION="CONTRACT_EXECUTION"}(t.BuildTransactionRequestType||(t.BuildTransactionRequestType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTransferRequestBase=void 0;var r=function(e,t,n,r,o,i){this.type=e,this.walletId=t,this.to=n,this.secretType=r,o&&(this.network=o),i&&(this.chainSpecificFields=i)};t.BuildTransferRequestBase=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Security=void 0;var r=n(0),o=n(3),i=n(37),a=n(4),s=r.__importDefault(n(2)),u=n(5),c=function(){function e(){}return e.getConfig=function(e){return{clientId:e,realm:"Arkane",url:s.default.urls.login,"ssl-required":"external","public-client":"true"}},e.login=function(t,n,r){switch(n&&n.idpHint&&("twitter"===n.idpHint||"facebook"===n.idpHint)&&(n.idpHint="arkane-"+n.idpHint),n&&n.windowMode){case o.WindowMode.POPUP:return e.loginPopup(t,r||s.default.uuidv4(),n);case o.WindowMode.DIALOG:return u.DialogWindow.openLoginDialog(t,n);default:return e.loginRedirect(t,n)}},e.loginRedirect=function(t,n){var o=e.getConfig(t),i=r.__assign(r.__assign(r.__assign(r.__assign({},(null==n?void 0:n.idpHint)&&{idpHint:n.idpHint}),"password"===(null==n?void 0:n.idpHint)&&(null==n?void 0:n.emailHint)&&{loginHint:n.emailHint}),(null==n?void 0:n.redirectUri)&&{redirectUri:n.redirectUri}),(null==n?void 0:n.prompt)&&{prompt:n.prompt});return this.keycloakLogin(o,i)},e.loginPopup=function(t,n,r){var o=!r||r.closePopup;return Promise.race([e.initialiseAuthenticatedListener(t,a.EventTypes.AUTHENTICATE,n,o),e.initialiseLoginPopup(t,n,r)])},e.checkAuthenticated=function(t,n){if((n&&n.windowMode)===o.WindowMode.REDIRECT){var r={onLoad:"check-sso",checkLoginIframe:!1};return n.redirectUri&&(r.redirectUri=n.redirectUri),e.initKeycloak(e.getConfig(t),r)}var i=e.initialiseAuthenticatedListener(t,a.EventTypes.CHECK_AUTHENTICATED,s.default.uuidv4());return e.initialiseCheckAuthenticatedIFrame(t),i},e.logout=function(t){var n=this;return t.authenticated&&t.clientId?new Promise((function(o,i){return r.__awaiter(n,void 0,void 0,(function(){var n,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return t.clientId?(n={client_id:t.clientId,id_token_hint:t.idToken,refresh_token:t.refreshToken},u=Object.keys(n).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(n[e])})).join("&"),[4,fetch(s.default.urls.login+"/realms/Arkane/protocol/openid-connect/logout",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:u})]):[3,3];case 1:return r.sent(),c=e,[4,e.createLogoutListener(a.EventTypes.LOGOUT,t,o,i)];case 2:c.logoutListener=r.sent(),window.addEventListener("message",e.logoutListener),e.initialiseLogoutIFrame(t.clientId),r.label=3;case 3:return[2]}}))}))})):Promise.resolve()},e.hasPopupWindow=function(){return!!this.popupWindow},e.closePopupWindow=function(){e.popupWindow&&!e.popupWindow.closed&&(e.popupWindow.close(),delete e.popupWindow)},e.focusPopupWindow=function(){e.popupWindow&&!e.popupWindow.closed&&e.popupWindow.focus()},Object.defineProperty(e,"checkAuthenticatedURI",{get:function(){return s.default.urls.connect+"/checkAuthenticated"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"authenticateURI",{get:function(){return s.default.urls.connect+"/authenticate"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"logoutURI",{get:function(){return s.default.urls.connect+"/logout"},enumerable:!1,configurable:!0}),e.initialiseLoginPopup=function(t,n,o){return r.__awaiter(this,void 0,void 0,(function(){var a,u,c,l,d;return r.__generator(this,(function(r){switch(r.label){case 0:return a=window.location.href.replace(window.location.search,""),u=e.authenticateURI+"?"+new URLSearchParams({clientId:t,origin:a,env:s.default.rawEnvironment}).toString(),o&&o.idpHint&&(c=o.idpHint,u+="&"+new URLSearchParams({kc_idp_hint:c}).toString()),o&&o.emailHint&&"password"===o.idpHint&&(l=o.emailHint,u+="&"+new URLSearchParams({login_hint:l}).toString()),d=this,[4,i.PopupWindowAsync.openNew(u,n,{useOverlay:!1})];case 1:return d.popupWindow=r.sent(),[2,e.initialiseIsLoginPopupClosedInterval(n)]}}))}))},e.initialiseIsLoginPopupClosedInterval=function(t){return new Promise((function(n,r){e.isLoginPopupClosedInterval=window.setInterval((function(){var r=e.popupWindow;r&&r.closed&&(e.clearIsLoginPopupClosedInterval(),e.cleanUp(a.EventTypes.AUTHENTICATE,t),n({authenticated:!1}))}),2e3)}))},e.clearIsLoginPopupClosedInterval=function(){clearInterval(e.isLoginPopupClosedInterval),delete e.isLoginPopupClosedInterval},e.initialiseCheckAuthenticatedIFrame=function(t){return this.initialiseIFrame(t,e.AUTH_IFRAME_ID,e.checkAuthenticatedURI)},e.initialiseLogoutIFrame=function(t){return this.initialiseIFrame(t,e.LOGOUT_IFRAME_ID,e.logoutURI)},e.initialiseIFrame=function(e,t,n){var r=document.getElementById(t),o=!0;r||(o=!1,r=document.createElement("iframe"));var i=window.location.href.replace(window.location.search,"");return r.src=n+"?"+new URLSearchParams({clientId:e,origin:i,env:s.default.rawEnvironment}).toString(),r.hidden=!0,r.id=t,r.setAttribute("style","display: none!important;"),document.body.appendChild(r),o||document.body.appendChild(r),r},e.setUpdateTokenInterval=function(){var t=this;e.updateTokenInterval&&(clearInterval(e.updateTokenInterval),e.updateTokenInterval=null),e.updateTokenInterval=setInterval((function(){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return new Promise((function(t,n){e.keycloak?e.keycloak.updateToken(70).then((function(e){t(e)})):n(!1)})).then((function(t){t&&e.onTokenUpdate&&e.keycloak.token&&e.onTokenUpdate(e.keycloak.token)})).catch((function(){console.error("failed to refresh token"),clearInterval(e.updateTokenInterval),e.updateTokenInterval=null})),[2]}))}))}),6e4)},e.forceUpdateToken=function(){var t;return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return[4,null===(t=e.keycloak)||void 0===t?void 0:t.updateToken(300)];case 1:return n.sent()&&e.onTokenUpdate&&e.keycloak.token&&e.onTokenUpdate(e.keycloak.token),[2]}}))}))},e.keycloakLogin=function(t,o){return r.__awaiter(this,void 0,void 0,(function(){var i;return r.__generator(this,(function(a){switch(a.label){case 0:return[4,Promise.resolve().then((function(){return r.__importStar(n(19))}))];case 1:return i=a.sent(),e.keycloak=i.default(t),[2,new Promise((function(t,n){e.keycloak.init({}).then((function(){return e.keycloak.login(o).then((function(n){n&&e.setUpdateTokenInterval(),t({keycloak:e.keycloak,authenticated:n})})).catch((function(e){n(e)}))}))}))]}}))}))},e.initKeycloak=function(t,o){return r.__awaiter(this,void 0,void 0,(function(){var i;return r.__generator(this,(function(a){switch(a.label){case 0:return[4,Promise.resolve().then((function(){return r.__importStar(n(19))}))];case 1:return i=a.sent(),e.keycloak=i.default(t),[2,new Promise((function(t,n){e.keycloak.init(o).then((function(n){n&&e.setUpdateTokenInterval(),e.removeLoginState(),t({keycloak:e.keycloak,authenticated:n})})).catch((function(e){n(e)}))}))]}}))}))},e.removeLoginState=function(){var e=window.location.href,t=e.indexOf("#");if(-1!==t){var n=e.substring(0,t);window.history.replaceState({},"",n)}},e.cleanUp=function(t,n,r){if(void 0===r&&(r=!0),e.authenticatedListeners.has(t)&&(window.removeEventListener("message",e.authenticatedListeners.get(t)),e.authenticatedListeners.delete(t)),t===a.EventTypes.CHECK_AUTHENTICATED){var o=document.getElementById(e.AUTH_IFRAME_ID);o&&o.remove()}else t===a.EventTypes.AUTHENTICATE&&r&&(e.popupWindow&&!e.popupWindow.closed&&e.popupWindow.close(),delete e.popupWindow)},e.authenticatedListeners=new Map,e.AUTH_IFRAME_ID="venly-auth-iframe",e.LOGOUT_IFRAME_ID="venly-logout-iframe",e.THIRD_PARTY_COOKIES_DISABLED="Third party cookies are disabled",e.initialiseAuthenticatedListener=function(t,n,o,i){return r.__awaiter(this,void 0,void 0,(function(){var a=this;return r.__generator(this,(function(u){return[2,new Promise((function(u,c){var l=function(l){return r.__awaiter(a,void 0,void 0,(function(){var a,d,p,f,h;return r.__generator(this,(function(r){switch(r.label){case 0:if(!l||l.origin!==s.default.urls.connect)return[3,11];if(!l.data||l.data.type!==n)return[3,10];a=l.data,e.isLoginPopupClosedInterval&&e.clearIsLoginPopupClosedInterval(),r.label=1;case 1:return r.trys.push([1,9,,10]),a.success?a.authenticated?(e.cleanUp(n,o,i),d=a.keycloak,p={onLoad:"check-sso",token:d.token,refreshToken:d.refreshToken,idToken:d.idToken,timeSkew:d.timeSkew,checkLoginIframe:!1},e.removeLoginState(),[4,e.initKeycloak(e.getConfig(t),p)]):[3,3]:[3,5];case 2:return f=r.sent(),u({keycloak:f.keycloak,authenticated:f.authenticated}),[3,4];case 3:u({authenticated:!1}),r.label=4;case 4:return[3,8];case 5:return a.reason&&a.reason===e.THIRD_PARTY_COOKIES_DISABLED?[4,e.initKeycloak(e.getConfig(t),{onLoad:"check-sso",checkLoginIframe:!1})]:[3,7];case 6:return f=r.sent(),u({keycloak:f.keycloak,authenticated:f.authenticated}),[3,8];case 7:c({error:a.reason}),r.label=8;case 8:return[3,10];case 9:return h=r.sent(),c({error:h}),[3,10];case 10:return[2,l];case 11:return[2]}}))}))};window.addEventListener("message",l),e.authenticatedListeners.has(n)&&window.removeEventListener("message",e.authenticatedListeners.get(n)),e.authenticatedListeners.set(n,l)}))]}))}))},e.createLogoutListener=function(e,t,n,o){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,function(r){r&&r.origin===s.default.urls.connect&&r.data&&r.data.type===e&&(t.authenticated?r.data.authenticated?o():(t.onAuthLogout&&t.onAuthLogout(),n()):n())}]}))}))},e}();t.Security=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationRequestType=void 0,function(e){e.CREATE_APPLICATION_WALLET="CREATE_APPLICATION_WALLET",e.CREATE_FIRST_WALLET="CREATE_FIRST_WALLET",e.IMPORT_WALLET="IMPORT"}(t.ConfirmationRequestType||(t.ConfirmationRequestType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTransferRequestBaseDto=void 0;var r=function(){};t.BuildTransferRequestBaseDto=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTransactionRequest=void 0;var r=n(0),o=n(6),i=function(e){function t(t,n,r,i,a,s,u,c,l){var d,p=this;return d=a&&c?o.BuildTransactionRequestType.NFT_TRANSFER:a?o.BuildTransactionRequestType.TOKEN_TRANSFER:o.BuildTransactionRequestType.TRANSFER,(p=e.call(this,d,t,n,r,l)||this).value=i,a&&(p.tokenAddress=a),s&&(p.data=s),u&&(p.from=u),c&&(p.tokenId=c),p}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.to,e.secretType,e.value,e.tokenAddress,e.data,e.from,e.tokenId,e.network)},t}(n(7).BuildTransferRequestBase);t.BuildTransactionRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportWalletRequest=void 0;var r=n(9),o=function(){function e(e,t){this.walletId=e,this.to=t,this.confirmationRequestType=r.ConfirmationRequestType.IMPORT_WALLET}return e.fromData=function(e){return new this(e.walletId,e.to)},e}();t.ImportWalletRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumErcTokenTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.EthereumErcTokenTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaticErcTokenTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.MaticErcTokenTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArbitrumErcTokenTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.ArbitrumErcTokenTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateWalletRequest=void 0;var r=function(e){this.secretType=e};t.CreateWalletRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VenlyConnect=void 0;var r=n(0),o=n(8),i=n(20),a=n(3),s=n(22),u=r.__importDefault(n(2)),c=n(44),l=n(5),d=function(){function e(e,t){var n=this;this.clientId=e,this.windowMode=t&&t.windowMode||a.WindowMode.POPUP,this.signUsing=t&&t.signUsing||this.windowMode,this.useOverlayWithPopup=!t||null==t.useOverlayWithPopup||t.useOverlayWithPopup,u.default.rawEnvironment=t&&t.environment||"prod",this._bearerTokenProvider=t&&t.bearerTokenProvider||function(){return n.loginResult&&n.loginResult.authenticated&&n.auth&&n.auth.token||""},this._bearerTokenProvider&&(this.api=new i.Api(u.default.urls.api,this._bearerTokenProvider)),this.flows=new c.Flows(this,this.clientId),l.DialogWindow.addFonts()}return Object.defineProperty(e.prototype,"signer",{get:function(){return s.SignerFactory.createSignerFor(this.windowMode,this._bearerTokenProvider,this.clientId,{useOverlay:this.useOverlayWithPopup})},enumerable:!1,configurable:!0}),e.prototype.checkAuthenticated=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(i){switch(i.label){case 0:return this.loginResult?[2,this.afterAuthentication(this.loginResult)]:[3,1];case 1:return(t=r.__assign({},e)).windowMode=t.windowMode||this.windowMode,[4,o.Security.checkAuthenticated(this.clientId,t)];case 2:return n=i.sent(),[2,this.afterAuthentication(n)]}}))}))},e.prototype.logout=function(e){var t=this;return this.loginResult=void 0,(e&&e.windowMode||this.windowMode)===a.WindowMode.REDIRECT?new Promise((function(n,r){var o={};if(t.auth){e&&e.redirectUri?o.post_logout_redirect_uri=e.redirectUri:o.post_logout_redirect_uri=window.location.href,t.auth.clientId&&(o.client_id=t.auth.clientId),t.auth.idToken&&(o.id_token_hint=t.auth.idToken);var i=new URLSearchParams(o).toString(),a=u.default.urls.login+"/realms/Arkane/protocol/openid-connect/logout";u.default.openExternalUrl(i?a+"?"+i:a,!1)}else e&&e.redirectUri?u.default.openExternalUrl(e.redirectUri,!1):n()})):this.auth?o.Security.logout(this.auth).then((function(){return t.auth=void 0})):Promise.resolve()},e.prototype.addOnTokenRefreshCallback=function(e){e&&(o.Security.onTokenUpdate=e)},e.prototype.createSigner=function(e,t){return t&&null!=t.useOverlay||(t={useOverlay:this.useOverlayWithPopup}),s.SignerFactory.createSignerFor(e||this.signUsing||this.windowMode,this._bearerTokenProvider,this.clientId,t)},e.prototype.isPopupSigner=function(e){return void 0!==e.closePopup},e.prototype.authenticate=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.flows.authenticate(e)]}))}))},e.prototype.manageWallets=function(e,t){return this.flows.manageWallets(e,t)},e.prototype.linkWallets=function(e){return this.flows.linkWallets(e)},e.prototype._afterAuthenticationForFlowUse=function(e){return this.afterAuthentication(e)},e.prototype.afterAuthentication=function(e){return this.loginResult=e,this.auth=e.keycloak,{auth:this.auth,isAuthenticated:e.authenticated,authenticated:function(t){return e.authenticated&&e.keycloak&&t(e.keycloak),this},notAuthenticated:function(t){return e.authenticated||t(e.keycloak),this}}},e}();t.VenlyConnect=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupWindow=void 0;var r=n(0),o=n(5),i=r.__importDefault(n(2)),a=function(){function e(e,t,n,r,o){if(this.id="id-"+i.default.uuidv4(),this.useOverlay=void 0===r||r,this.win=window.open(e,t,n),!this.win)throw new Error("Something went wrong while trying to open the popup");this.setCloseInterval(),this.openOverlay()}return e.openNew=function(t,n){var r=Object.assign({title:"Venly Connect",w:350,h:700,useOverlay:!0},n),o=screen.width/2-r.w/2,i=screen.height/2-r.h/2,a="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, ";return a+="copyhistory=no, width="+r.w+", height="+r.h+", top="+i+", left="+o,new e(t,r.title,a,r.useOverlay)},e.prototype.setCloseInterval=function(){var e=this;this.interval=window.setInterval((function(){e.win&&!e.win.closed||(e.clearCloseInterval(),e.close())}),100)},e.prototype.clearCloseInterval=function(){window.clearInterval(this.interval)},e.prototype.close=function(){this.win&&(this.win.close(),this.closeOverlay())},Object.defineProperty(e.prototype,"closed",{get:function(){return!this.win||this.win.closed},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.win&&this.win.focus()},e.prototype.postMessage=function(e,t,n){this.win&&this.win.postMessage(e,t,n)},e.prototype.closeOverlay=function(){e.closeOverlay(this.id,this.useOverlay)},e.prototype.openOverlay=function(){e.openOverlay(this.id,this.useOverlay,this.focus.bind(this),this.close.bind(this))},e.closeOverlay=function(e,t){var n=document.querySelector("#venly-overlay-container, #"+e);n&&n.remove()},e.openOverlay=function(e,t,n,r){t&&o.DialogWindow.showRefocusLayout(e,n)},e.CONST={overlayClassName:"venly-connect__overlay",overlayLinkClassName:"venly-connect__reopen-link",overlayCloseLinkClassName:"venly-connect__close-link",overlayMessage:"Don’t see the popup? We’ll help you re-open the popup to complete your action.",overlayLinkMessage:"Click to continue",overlayLinkStyle:"color: white; text-decoration: underline; font-weight: bold;"},e}();t.PopupWindow=a},function(e,t,n){window,e.exports=function(e,t){if("undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");var n=!1;function r(){n||(n=!0,console.warn("[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead."))}function o(e){return e.__proto__=i.prototype,e}function i(e){return o(new Promise(e))}return i.prototype=Object.create(Promise.prototype),i.prototype.constructor=i,i.prototype.success=function(e){return r(),o(this.then((function(t){e(t)})))},i.prototype.error=function(e){return r(),o(this.catch((function(t){e(t)})))},function n(r){if(!(this instanceof n))return new n(r);for(var o,a,s=this,u=[],c={enable:!0,callbackList:[],interval:5},l=document.getElementsByTagName("script"),d=0;d<l.length;d++)-1===l[d].src.indexOf("keycloak.js")&&-1===l[d].src.indexOf("keycloak.min.js")||-1===l[d].src.indexOf("version=")||(s.iframeVersion=l[d].src.substring(l[d].src.indexOf("version=")+8).split("&")[0]);var p=!0,f=P(console.info),h=P(console.warn);function _(e,t){for(var n=function(e){var t=null,n=window.crypto||window.msCrypto;if(n&&n.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),n.getRandomValues(t),t;t=new Array(e);for(var r=0;r<t.length;r++)t[r]=Math.floor(256*Math.random());return t}(e),r=new Array(e),o=0;o<e;o++)r[o]=t.charCodeAt(n[o]%t.length);return String.fromCharCode.apply(null,r)}function v(){return void 0!==s.authServerUrl?"/"==s.authServerUrl.charAt(s.authServerUrl.length-1)?s.authServerUrl+"realms/"+encodeURIComponent(s.realm):s.authServerUrl+"/realms/"+encodeURIComponent(s.realm):void 0}function T(e,t){var n=e.code,r=e.error,o=e.prompt,i=(new Date).getTime();if(e.kc_action_status&&s.onActionUpdate&&s.onActionUpdate(e.kc_action_status),r)if("none"!=o){var a={error:r,error_description:e.error_description};s.onAuthError&&s.onAuthError(a),t&&t.setError(a)}else t&&t.setSuccess();else if("standard"!=s.flow&&(e.access_token||e.id_token)&&d(e.access_token,null,e.id_token,!0),"implicit"!=s.flow&&n){var u="code="+n+"&grant_type=authorization_code",c=s.endpoints.token(),l=new XMLHttpRequest;l.open("POST",c,!0),l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u+="&client_id="+encodeURIComponent(s.clientId),u+="&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(u+="&code_verifier="+e.pkceCodeVerifier),l.withCredentials=!0,l.onreadystatechange=function(){if(4==l.readyState)if(200==l.status){var e=JSON.parse(l.responseText);d(e.access_token,e.refresh_token,e.id_token,"standard"===s.flow),C()}else s.onAuthError&&s.onAuthError(),t&&t.setError()},l.send(u)}function d(n,r,o,a){A(n,r,o,i=(i+(new Date).getTime())/2),p&&(s.tokenParsed&&s.tokenParsed.nonce!=e.storedNonce||s.refreshTokenParsed&&s.refreshTokenParsed.nonce!=e.storedNonce||s.idTokenParsed&&s.idTokenParsed.nonce!=e.storedNonce)?(f("[KEYCLOAK] Invalid nonce, clearing token"),s.clearToken(),t&&t.setError()):a&&(s.onAuthSuccess&&s.onAuthSuccess(),t&&t.setSuccess())}}function R(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function A(e,t,n,r){if(s.tokenTimeoutHandle&&(clearTimeout(s.tokenTimeoutHandle),s.tokenTimeoutHandle=null),t?(s.refreshToken=t,s.refreshTokenParsed=y(t)):(delete s.refreshToken,delete s.refreshTokenParsed),n?(s.idToken=n,s.idTokenParsed=y(n)):(delete s.idToken,delete s.idTokenParsed),e){if(s.token=e,s.tokenParsed=y(e),s.sessionId=s.tokenParsed.session_state,s.authenticated=!0,s.subject=s.tokenParsed.sub,s.realmAccess=s.tokenParsed.realm_access,s.resourceAccess=s.tokenParsed.resource_access,r&&(s.timeSkew=Math.floor(r/1e3)-s.tokenParsed.iat),null!=s.timeSkew&&(f("[KEYCLOAK] Estimated time difference between browser and server is "+s.timeSkew+" seconds"),s.onTokenExpired)){var o=1e3*(s.tokenParsed.exp-(new Date).getTime()/1e3+s.timeSkew);f("[KEYCLOAK] Token expires in "+Math.round(o/1e3)+" s"),o<=0?s.onTokenExpired():s.tokenTimeoutHandle=setTimeout(s.onTokenExpired,o)}}else delete s.token,delete s.tokenParsed,delete s.subject,delete s.realmAccess,delete s.resourceAccess,s.authenticated=!1}function y(e){switch((e=(e=(e=e.split(".")[1]).replace(/-/g,"+")).replace(/_/g,"/")).length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Invalid token"}return e=decodeURIComponent(escape(atob(e))),e=JSON.parse(e)}function E(){var e=_(36,"0123456789abcdef").split("");return e[14]="4",e[19]="0123456789abcdef".substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function m(e){var t=function(e){var t;switch(s.flow){case"standard":t=["code","state","session_state","kc_action_status"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status"];break;case"hybrid":t=["access_token","id_token","code","state","session_state","kc_action_status"]}t.push("error"),t.push("error_description"),t.push("error_uri");var n,r,o=e.indexOf("?"),i=e.indexOf("#");"query"===s.responseMode&&-1!==o?(n=e.substring(0,o),""!==(r=g(e.substring(o+1,-1!==i?i:e.length),t)).paramsString&&(n+="?"+r.paramsString),-1!==i&&(n+=e.substring(i))):"fragment"===s.responseMode&&-1!==i&&(n=e.substring(0,i),""!==(r=g(e.substring(i+1),t)).paramsString&&(n+="#"+r.paramsString));if(r&&r.oauthParams)if("standard"===s.flow||"hybrid"===s.flow){if((r.oauthParams.code||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}else if("implicit"===s.flow&&(r.oauthParams.access_token||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=n,r.oauthParams}(e);if(t){var n=a.get(t.state);return n&&(t.valid=!0,t.redirectUri=n.redirectUri,t.storedNonce=n.nonce,t.prompt=n.prompt,t.pkceCodeVerifier=n.pkceCodeVerifier),t}}function g(e,t){for(var n=e.split("&"),r={paramsString:"",oauthParams:{}},o=0;o<n.length;o++){var i=n[o].indexOf("="),a=n[o].slice(0,i);-1!==t.indexOf(a)?r.oauthParams[a]=n[o].slice(i+1):(""!==r.paramsString&&(r.paramsString+="&"),r.paramsString+=n[o])}return r}function w(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new i((function(t,n){e.resolve=t,e.reject=n})),e}function S(){var e=w();if(!c.enable)return e.setSuccess(),e.promise;if(c.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");c.iframe=t,t.onload=function(){var t=s.endpoints.authorize();"/"===t.charAt(0)?c.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):c.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var n=s.endpoints.checkSessionIframe();t.setAttribute("src",n),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t);return window.addEventListener("message",(function(e){if(e.origin===c.iframeOrigin&&c.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&s.clearToken();for(var t=c.callbackList.splice(0,c.callbackList.length),n=t.length-1;n>=0;--n){var r=t[n];"error"==e.data?r.setError():r.setSuccess("unchanged"==e.data)}}}),!1),e.promise}function C(){c.enable&&s.token&&setTimeout((function(){O().then((function(e){e&&C()}))}),1e3*c.interval)}function O(){var e=w();if(c.iframe&&c.iframeOrigin){var t=s.clientId+" "+(s.sessionId?s.sessionId:"");c.callbackList.push(e);var n=c.iframeOrigin;1==c.callbackList.length&&c.iframe.contentWindow.postMessage(t,n)}else e.setSuccess();return e.promise}function I(e){if(!e||"default"==e)return{login:function(e){return window.location.replace(s.createLoginUrl(e)),w().promise},logout:function(e){return window.location.replace(s.createLogoutUrl(e)),w().promise},register:function(e){return window.location.replace(s.createRegisterUrl(e)),w().promise},accountManagement:function(){var e=s.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";return window.location.href=e,w().promise},redirectUri:function(e,t){return 1==arguments.length&&(t=!0),e&&e.redirectUri?e.redirectUri:s.redirectUri?s.redirectUri:location.href}};if("cordova"==e){c.enable=!1;var t=function(e,t,n){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,n):window.open(e,t,n)},n=function(e){var t=function(e){return e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce((function(t,n){return t[n]=e.cordovaOptions[n],t}),{}):{}}(e);return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),function(e){return Object.keys(e).reduce((function(t,n){return t.push(n+"="+e[n]),t}),[]).join(",")}(t)};return{login:function(e){var r=w(),o=n(e),i=s.createLoginUrl(e),a=t(i,"_blank",o),u=!1,c=!1,l=function(){c=!0,a.close()};return a.addEventListener("loadstart",(function(e){0==e.url.indexOf("http://localhost")&&(T(m(e.url),r),l(),u=!0)})),a.addEventListener("loaderror",(function(e){u||(0==e.url.indexOf("http://localhost")?(T(m(e.url),r),l(),u=!0):(r.setError(),l()))})),a.addEventListener("exit",(function(e){c||r.setError({reason:"closed_by_user"})})),r.promise},logout:function(e){var n,r=w(),o=s.createLogoutUrl(e),i=t(o,"_blank","location=no,hidden=yes");return i.addEventListener("loadstart",(function(e){0==e.url.indexOf("http://localhost")&&i.close()})),i.addEventListener("loaderror",(function(e){0==e.url.indexOf("http://localhost")||(n=!0),i.close()})),i.addEventListener("exit",(function(e){n?r.setError():(s.clearToken(),r.setSuccess())})),r.promise},register:function(e){var r=w(),o=s.createRegisterUrl(),i=n(e),a=t(o,"_blank",i);return a.addEventListener("loadstart",(function(e){0==e.url.indexOf("http://localhost")&&(a.close(),T(m(e.url),r))})),r.promise},accountManagement:function(){var e=s.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";var n=t(e,"_blank","location=no");n.addEventListener("loadstart",(function(e){0==e.url.indexOf("http://localhost")&&n.close()}))},redirectUri:function(e){return"http://localhost"}}}if("cordova-native"==e)return c.enable=!1,{login:function(e){var t=w(),n=s.createLoginUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),T(m(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},logout:function(e){var t=w(),n=s.createLogoutUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),s.clearToken(),t.setSuccess()})),window.cordova.plugins.browsertab.openUrl(n),t.promise},register:function(e){var t=w(),n=s.createRegisterUrl(e);return universalLinks.subscribe("keycloak",(function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),T(m(e.url),t)})),window.cordova.plugins.browsertab.openUrl(n),t.promise},accountManagement:function(){var e=s.createAccountUrl();if(void 0===e)throw"Not supported by the OIDC server";window.cordova.plugins.browsertab.openUrl(e)},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:s.redirectUri?s.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}s.init=function(e){s.authenticated=!1,a=function(){try{return new b}catch(e){}return new N}();if(o=e&&["default","cordova","cordova-native"].indexOf(e.adapter)>-1?I(e.adapter):e&&"object"==typeof e.adapter?e.adapter:window.Cordova||window.cordova?I("cordova"):I(),e){if(void 0!==e.useNonce&&(p=e.useNonce),void 0!==e.checkLoginIframe&&(c.enable=e.checkLoginIframe),e.checkLoginIframeInterval&&(c.interval=e.checkLoginIframeInterval),"login-required"===e.onLoad&&(s.loginRequired=!0),e.responseMode){if("query"!==e.responseMode&&"fragment"!==e.responseMode)throw"Invalid value for responseMode";s.responseMode=e.responseMode}if(e.flow){switch(e.flow){case"standard":s.responseType="code";break;case"implicit":s.responseType="id_token token";break;case"hybrid":s.responseType="code id_token token";break;default:throw"Invalid value for flow"}s.flow=e.flow}if(null!=e.timeSkew&&(s.timeSkew=e.timeSkew),e.redirectUri&&(s.redirectUri=e.redirectUri),e.silentCheckSsoRedirectUri&&(s.silentCheckSsoRedirectUri=e.silentCheckSsoRedirectUri),"boolean"==typeof e.silentCheckSsoFallback?s.silentCheckSsoFallback=e.silentCheckSsoFallback:s.silentCheckSsoFallback=!0,e.pkceMethod){if("S256"!==e.pkceMethod)throw"Invalid value for pkceMethod";s.pkceMethod=e.pkceMethod}"boolean"==typeof e.enableLogging?s.enableLogging=e.enableLogging:s.enableLogging=!1}s.responseMode||(s.responseMode="fragment"),s.responseType||(s.responseType="code",s.flow="standard");var t=w(),n=w();n.promise.then((function(){s.onReady&&s.onReady(s.authenticated),t.setSuccess(s.authenticated)})).catch((function(e){t.setError(e)}));var i=function(e){var t,n=w();r?"string"==typeof r&&(t=r):t="keycloak.json";function o(e){s.endpoints=e?{authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:{authorize:function(){return v()+"/protocol/openid-connect/auth"},token:function(){return v()+"/protocol/openid-connect/token"},logout:function(){return v()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=v()+"/protocol/openid-connect/login-status-iframe.html";return s.iframeVersion&&(e=e+"?version="+s.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=v()+"/protocol/openid-connect/3p-cookies/step1.html";return s.iframeVersion&&(e=e+"?version="+s.iframeVersion),e},register:function(){return v()+"/protocol/openid-connect/registrations"},userinfo:function(){return v()+"/protocol/openid-connect/userinfo"}}}if(t){(u=new XMLHttpRequest).open("GET",t,!0),u.setRequestHeader("Accept","application/json"),u.onreadystatechange=function(){if(4==u.readyState)if(200==u.status||R(u)){var e=JSON.parse(u.responseText);s.authServerUrl=e["auth-server-url"],s.realm=e.realm,s.clientId=e.resource,o(null),n.setSuccess()}else n.setError()},u.send()}else{if(!r.clientId)throw"clientId missing";s.clientId=r.clientId;var i=r.oidcProvider;if(i){var a,u;if("string"==typeof i)a="/"==i.charAt(i.length-1)?i+".well-known/openid-configuration":i+"/.well-known/openid-configuration",(u=new XMLHttpRequest).open("GET",a,!0),u.setRequestHeader("Accept","application/json"),u.onreadystatechange=function(){4==u.readyState&&(200==u.status||R(u)?(o(JSON.parse(u.responseText)),n.setSuccess()):n.setError())},u.send();else o(i),n.setSuccess()}else{if(!r.url)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++)if(c[l].src.match(/.*keycloak\.js/)){r.url=c[l].src.substr(0,c[l].src.indexOf("/js/keycloak.js"));break}if(!r.realm)throw"realm missing";s.authServerUrl=r.url,s.realm=r.realm,o(null),n.setSuccess()}}return n.promise}();function u(){var t=function(e){e||(o.prompt="none"),s.login(o).then((function(){n.setSuccess()})).catch((function(){n.setError()}))},r=function(){var e=document.createElement("iframe"),t=s.createLoginUrl({prompt:"none",redirectUri:s.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var r=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(T(m(t.data),n),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},o={};switch(e.onLoad){case"check-sso":c.enable?S().then((function(){O().then((function(e){e?n.setSuccess():s.silentCheckSsoRedirectUri?r():t(!1)})).catch((function(){n.setError()}))})):s.silentCheckSsoRedirectUri?r():t(!1);break;case"login-required":t(!0);break;default:throw"Invalid value for onLoad"}}function l(){var t=m(window.location.href);if(t&&window.history.replaceState(window.history.state,null,t.newUrl),t&&t.valid)return S().then((function(){T(t,n)})).catch((function(e){n.setError()}));e?e.token&&e.refreshToken?(A(e.token,e.refreshToken,e.idToken),c.enable?S().then((function(){O().then((function(e){e?(s.onAuthSuccess&&s.onAuthSuccess(),n.setSuccess(),C()):n.setSuccess()})).catch((function(){n.setError()}))})):s.updateToken(-1).then((function(){s.onAuthSuccess&&s.onAuthSuccess(),n.setSuccess()})).catch((function(){s.onAuthError&&s.onAuthError(),e.onLoad?u():n.setError()}))):e.onLoad?u():n.setSuccess():n.setSuccess()}return i.then((function(){(function(){var e=w();if(c.enable||s.silentCheckSsoRedirectUri){var t=document.createElement("iframe");t.setAttribute("src",s.endpoints.thirdPartyCookiesIframe()),t.setAttribute("title","keycloak-3p-check-iframe"),t.style.display="none",document.body.appendChild(t);var n=function(r){t.contentWindow===r.source&&("supported"!==r.data&&"unsupported"!==r.data?e.setError():"unsupported"===r.data&&(c.enable=!1,s.silentCheckSsoFallback&&(s.silentCheckSsoRedirectUri=!1),h("[KEYCLOAK] 3rd party cookies aren't supported by this browser. checkLoginIframe and silent check-sso are not available.")),document.body.removeChild(t),window.removeEventListener("message",n),e.setSuccess())};window.addEventListener("message",n,!1)}else e.setSuccess();return e.promise})().then(l).catch((function(){t.setError()}))})),i.catch((function(){t.setError()})),t.promise},s.login=function(e){return o.login(e)},s.createLoginUrl=function(n){var r,i,u=E(),c=E(),l=o.redirectUri(n),d={state:u,nonce:c,redirectUri:encodeURIComponent(l)};n&&n.prompt&&(d.prompt=n.prompt),r=n&&"register"==n.action?s.endpoints.register():s.endpoints.authorize(),i=n&&n.scope?-1!=n.scope.indexOf("openid")?n.scope:"openid "+n.scope:"openid";var f=r+"?client_id="+encodeURIComponent(s.clientId)+"&redirect_uri="+encodeURIComponent(l)+"&state="+encodeURIComponent(u)+"&response_mode="+encodeURIComponent(s.responseMode)+"&response_type="+encodeURIComponent(s.responseType)+"&scope="+encodeURIComponent(i);if(p&&(f=f+"&nonce="+encodeURIComponent(c)),n&&n.prompt&&(f+="&prompt="+encodeURIComponent(n.prompt)),n&&n.maxAge&&(f+="&max_age="+encodeURIComponent(n.maxAge)),n&&n.loginHint&&(f+="&login_hint="+encodeURIComponent(n.loginHint)),n&&n.idpHint&&(f+="&kc_idp_hint="+encodeURIComponent(n.idpHint)),n&&n.action&&"register"!=n.action&&(f+="&kc_action="+encodeURIComponent(n.action)),n&&n.locale&&(f+="&ui_locales="+encodeURIComponent(n.locale)),s.pkceMethod){var h=_(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");d.pkceCodeVerifier=h,f+="&code_challenge="+function(n,r){switch(n){case"S256":var o=new Uint8Array(e.arrayBuffer(r));return t.fromByteArray(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");default:throw"Invalid value for pkceMethod"}}(s.pkceMethod,h),f+="&code_challenge_method="+s.pkceMethod}return a.add(d),f},s.logout=function(e){return o.logout(e)},s.createLogoutUrl=function(e){return s.endpoints.logout()+"?redirect_uri="+encodeURIComponent(o.redirectUri(e,!1))},s.register=function(e){return o.register(e)},s.createRegisterUrl=function(e){return e||(e={}),e.action="register",s.createLoginUrl(e)},s.createAccountUrl=function(e){var t=v(),n=void 0;return void 0!==t&&(n=t+"/account?referrer="+encodeURIComponent(s.clientId)+"&referrer_uri="+encodeURIComponent(o.redirectUri(e))),n},s.accountManagement=function(){return o.accountManagement()},s.hasRealmRole=function(e){var t=s.realmAccess;return!!t&&t.roles.indexOf(e)>=0},s.hasResourceRole=function(e,t){if(!s.resourceAccess)return!1;var n=s.resourceAccess[t||s.clientId];return!!n&&n.roles.indexOf(e)>=0},s.loadUserProfile=function(){var e=v()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+s.token);var n=w();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(s.profile=JSON.parse(t.responseText),n.setSuccess(s.profile)):n.setError())},t.send(),n.promise},s.loadUserInfo=function(){var e=s.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+s.token);var n=w();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(s.userInfo=JSON.parse(t.responseText),n.setSuccess(s.userInfo)):n.setError())},t.send(),n.promise},s.isTokenExpired=function(e){if(!s.tokenParsed||!s.refreshToken&&"implicit"!=s.flow)throw"Not authenticated";if(null==s.timeSkew)return f("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=s.tokenParsed.exp-Math.ceil((new Date).getTime()/1e3)+s.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},s.updateToken=function(e){var t=w();if(!s.refreshToken)return t.setError(),t.promise;e=e||5;var n=function(){var n=!1;if(-1==e?(n=!0,f("[KEYCLOAK] Refreshing token: forced refresh")):s.tokenParsed&&!s.isTokenExpired(e)||(n=!0,f("[KEYCLOAK] Refreshing token: token expired")),n){var r="grant_type=refresh_token&refresh_token="+s.refreshToken,o=s.endpoints.token();if(u.push(t),1==u.length){var i=new XMLHttpRequest;i.open("POST",o,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.withCredentials=!0,r+="&client_id="+encodeURIComponent(s.clientId);var a=(new Date).getTime();i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status){f("[KEYCLOAK] Token refreshed"),a=(a+(new Date).getTime())/2;var e=JSON.parse(i.responseText);A(e.access_token,e.refresh_token,e.id_token,a),s.onAuthRefreshSuccess&&s.onAuthRefreshSuccess();for(var t=u.pop();null!=t;t=u.pop())t.setSuccess(!0)}else{h("[KEYCLOAK] Failed to refresh token"),400==i.status&&s.clearToken(),s.onAuthRefreshError&&s.onAuthRefreshError();for(t=u.pop();null!=t;t=u.pop())t.setError(!0)}},i.send(r)}}else t.setSuccess(!1)};c.enable?O().then((function(){n()})).catch((function(){t.setError()})):n();return t.promise},s.clearToken=function(){s.token&&(A(null,null,null),s.onAuthLogout&&s.onAuthLogout(),s.loginRequired&&s.login())};var b=function(){if(!(this instanceof b))return new b;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");function e(){for(var e=(new Date).getTime(),t=0;t<localStorage.length;t++){var n=localStorage.key(t);if(n&&0==n.indexOf("kc-callback-")){var r=localStorage.getItem(n);if(r)try{var o=JSON.parse(r).expires;(!o||o<e)&&localStorage.removeItem(n)}catch(e){localStorage.removeItem(n)}}}}this.get=function(t){if(t){var n="kc-callback-"+t,r=localStorage.getItem(n);return r&&(localStorage.removeItem(n),r=JSON.parse(r)),e(),r}},this.add=function(t){e();var n="kc-callback-"+t.state;t.expires=(new Date).getTime()+36e5,localStorage.setItem(n,JSON.stringify(t))}},N=function(){if(!(this instanceof N))return new N;this.get=function(r){if(r){var o=t("kc-callback-"+r);return n("kc-callback-"+r,"",e(-100)),o?JSON.parse(o):void 0}},this.add=function(t){n("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){n(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},n=function(e,t,n){var r=e+"="+t+"; expires="+n.toUTCString()+"; ";document.cookie=r}};function P(e){return function(){s.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}}(n(38),n(42))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Api=void 0;var r=n(0),o=r.__importDefault(n(2)),i=n(21),a=function(){function e(e,t){var n=this;this.getAvailableSecretTypes=function(){var e=n.fetchGet("chains");return n.processResponse(e)},this.getWallets=function(e){e=e&&o.default.removeNulls(e)||{};var t=n.fetchGet("wallets",e);return n.processResponse(t)},this.getWallet=function(e){var t=n.fetchGet("wallets/"+e);return n.processResponse(t)},this.getBalance=function(e){var t=n.fetchGet("wallets/"+e+"/balance");return n.processResponse(t)},this.getBalanceByAddress=function(e,t){var r=n.fetchGet("wallets/"+e+"/"+t+"/balance");return n.processResponse(r)},this.getTokenBalances=function(e){var t=n.fetchGet("wallets/"+e+"/balance/tokens");return n.processResponse(t)},this.getTokenBalancesByAddress=function(e,t){var r=n.fetchGet("wallets/"+e+"/"+t+"/balance/tokens");return n.processResponse(r)},this.getTokenBalance=function(e,t){var r=n.fetchGet("wallets/"+e+"/balance/tokens/"+t);return n.processResponse(r)},this.getTokenBalanceByAddress=function(e,t,r){var o=n.fetchGet("wallets/"+e+"/"+t+"/balance/tokens/"+r);return n.processResponse(o)},this.getNonfungibles=function(e){var t=n.fetchGet("wallets/"+e+"/nonfungibles");return n.processResponse(t)},this.getNonfungiblesByAddress=function(e,t){var r=n.fetchGet("wallets/"+e+"/"+t+"/nonfungibles");return n.processResponse(r)},this.getAllNonfungibles=function(e){var t=e&&e.length>0?"?"+e.map((function(e){return"secretType="+e})).join("&"):"",r=n.fetchGet("wallets/nonfungibles",t);return n.processResponse(r)},this.unlink=function(e){var t=n.fetchGet("wallets/"+e+"/link");return n.processResponse(t)},this.getProfile=function(){var e=n.fetchGet("profile");return n.processResponse(e)},this.getPendingTransactions=function(){var e=n.fetchGet("transactions");return n.processResponse(e)},this.deleteTransaction=function(e){var t=n.fetchDelete("transactions/"+e);return n.processResponse(t)},this.getTransactionStatus=function(e,t){var r=n.fetchGet("transactions/"+t+"/"+e+"/status");return n.mapTransactionData(t,r)},this.mapTransactionData=function(e,t){switch(e){case i.SecretType.AVAC||i.SecretType.BSC||i.SecretType.ETHEREUM||i.SecretType.GOCHAIN||i.SecretType.MATIC||i.SecretType.ARBITRUM:case i.SecretType.HEDERA:case i.SecretType.TRON:case i.SecretType.VECHAIN:default:return n.processResponse(t)}},this.readContract=function(e){var t=n.fetchPost("contracts/read",e);return n.processResponse(t)},this._baseUrl=e.endsWith("/")?e.substring(0,e.length-1):e,this._tokenProvider=t}return e.prototype.fetchGet=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:if(!(n=this._tokenProvider()))throw new Error("Not authenticated");return[4,fetch(this._baseUrl+"/"+e+"?"+new URLSearchParams(t).toString(),{headers:{Authorization:"Bearer "+n}}).then((function(e){return e.json()})).then((function(e){return e}))];case 1:return[2,r.sent()]}}))}))},e.prototype.fetchPost=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:if(!(n=this._tokenProvider()))throw new Error("Not authenticated");return[4,fetch(this._baseUrl+"/"+e,{method:"POST",body:JSON.stringify(t),headers:{Authorization:"Bearer "+n,"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){return e}))];case 1:return[2,r.sent()]}}))}))},e.prototype.fetchDelete=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!(t=this._tokenProvider()))throw new Error("Not authenticated");return[4,fetch(this._baseUrl+"/"+e,{method:"DELETE",headers:{Authorization:"Bearer "+t}}).then((function(e){return e.json()})).then((function(e){return e}))];case 1:return[2,n.sent()]}}))}))},e.prototype.processResponse=function(e){return new Promise((function(t,n){e.then((function(e){e.success?e.result?t(e.result):t():n(e.errors)})).catch((function(e){if(e.response&&e.response.data)n(e.response.data.errors);else if(e.message){var t=e.message.indexOf("authenticat")>=0?"auth.error":"unknown.error";n([{code:t,message:e.message}])}else n([{code:"unknown.error",message:"An unknown error occured"}])}))}))},e}();t.Api=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecretType=void 0,function(e){e.AETERNITY="AETERNITY",e.AVAC="AVAC",e.BITCOIN="BITCOIN",e.BSC="BSC",e.ETHEREUM="ETHEREUM",e.GOCHAIN="GOCHAIN",e.HEDERA="HEDERA",e.LITECOIN="LITECOIN",e.MATIC="MATIC",e.NEO="NEO",e.TRON="TRON",e.VECHAIN="VECHAIN",e.IMX="IMX",e.ARBITRUM="ARBITRUM",e.XPLA="XPLA",e.BASE="BASE",e.OPTIMISM="OPTIMISM",e.SOLANA="SOLANA",e.SUI="SUI"}(t.SecretType||(t.SecretType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignMethod=t.SignerFactory=void 0;var r=n(23),o=n(34),i=n(3),a=n(8),s=function(){function e(){}return e.createSignerFor=function(e,t,n,s){switch(a.Security.forceUpdateToken(),e){case i.WindowMode.POPUP:return new r.PopupSigner(t,n,s);case i.WindowMode.REDIRECT:return new o.RedirectSigner(t);default:throw new Error("The provided signMethod is not supported")}},e}();t.SignerFactory=s,function(e){e.POPUP="POPUP",e.REDIRECT="REDIRECT"}(t.SignMethod||(t.SignMethod={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupSigner=void 0;var r=n(0),o=n(11),i=n(24),a=n(25),s=n(26),u=n(27),c=n(28),l=r.__importDefault(n(29)),d=n(4),p=r.__importDefault(n(2)),f=n(30),h=n(33),_=n(12),v=n(5),T=function(){function e(e,t,n){this.bearerTokenProvider=e,this.options=n,this.clientId=t}return e.prototype.openPopup=function(){var e=this;this.popup=new R(p.default.urls.connect+"/popup/transaction/init.html",this.bearerTokenProvider,this.options),window.addEventListener("beforeunload",(function(){e.closePopup()}))},e.prototype.closePopup=function(){this.popup&&this.popup.close()},e.prototype.isOpen=function(){return!!this.popup&&this.popup.isOpen()},e.prototype.sign=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return e.hash=void 0===e.hash||e.hash,e.prefix=void 0===e.hash||e.prefix,[2,this.signRequest(e)]}))}))},e.prototype.signMessage=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.signData(f.BuildMessageSignRequest.fromData(e))]}))}))},e.prototype.signEip712=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.signData(h.BuildEip712SignRequest.fromData(e))]}))}))},e.prototype.signTransaction=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.sign(e)]}))}))},e.prototype.executeNativeTransaction=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t=this;return r.__generator(this,(function(n){return[2,v.DialogWindow.openActionDialog(this.clientId,"execute-transaction").then((function(){return t.handleRequest("execute/"+e.type,e)}))]}))}))},e.prototype.executeTransaction=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return"string"==typeof e?[2,this.execute({transactionId:e})]:[2,this.execute(o.BuildTransactionRequest.fromData(e))]}))}))},e.prototype.executeTransfer=function(e){return this.execute(i.BuildSimpleTransactionRequest.fromData(e))},e.prototype.executeTokenTransfer=function(e){return this.execute(a.BuildTokenTransferRequest.fromData(e))},e.prototype.executeNftTransfer=function(e){return this.execute(s.BuildNftTransferRequest.fromData(e))},e.prototype.executeGasTransfer=function(e){return this.execute(u.BuildGasTransferRequest.fromData(e))},e.prototype.executeContract=function(e){return this.execute(c.BuildContractExecutionRequest.fromData(e))},e.prototype.executeSavedTransaction=function(e){var t=this;return v.DialogWindow.openActionDialog(this.clientId,"execute-transaction").then((function(){return t.handleRequest("execute/"+e,{})}))},e.prototype.resubmitTransaction=function(e){var t=this;return v.DialogWindow.openActionDialog(this.clientId,"execute-transaction").then((function(){return t.handleRequest("resubmit",{transactionId:e})}))},e.prototype.cancelTransaction=function(e){return this.handleRequest("cancel",{transactionId:e})},e.prototype.importWallet=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.confirm(_.ImportWalletRequest.fromData(e))]}))}))},e.prototype.confirm=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t=this;return r.__generator(this,(function(n){return[2,v.DialogWindow.openActionDialog(this.clientId,"import-wallet").then((function(){return t.handleRequest("confirm",e)}))]}))}))},e.prototype.execute=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t=this;return r.__generator(this,(function(n){return[2,v.DialogWindow.openActionDialog(this.clientId,"execute-transaction").then((function(){return t.handleRequest("execute",e)}))]}))}))},e.prototype.signData=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t=this;return r.__generator(this,(function(n){return[2,v.DialogWindow.openActionDialog(this.clientId,"sign-data").then((function(){return t.handleRequest("sign",e)}))]}))}))},e.prototype.signRequest=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t=this;return r.__generator(this,(function(n){return[2,v.DialogWindow.openActionDialog(this.clientId,"sign-transaction").then((function(){return t.handleRequest("sign",e)}))]}))}))},e.prototype.handleRequest=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n=this;return r.__generator(this,(function(r){return this.openPopup(),this.popup.focus(),[2,this.popup.sendData(e,Object.assign({},t)).finally((function(){n.closePopup()}))]}))}))},e}();t.PopupSigner=T;var R=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.finishedEventType=d.EventTypes.SIGNER_FINISHED,o.sendDataEventType=d.EventTypes.SEND_TRANSACTION_DATA,o}return r.__extends(t,e),t.prototype.sendData=function(e,t){var n=this;return new Promise((function(r,o){n.onPopupMountedQueue.push(n.attachFinishedListener(r,o)),n.onPopupMountedQueue.push(n.sendDataToPopup(e,t)),n.processPopupMountedQueue()}))},t.prototype.sendDataToPopup=function(e,t){var n=this;return function(){n.isOpen()&&n.popupWindow.postMessage({type:n.sendDataEventType,params:{action:e,transactionRequest:t,bearerToken:n.bearerTokenProvider()}},p.default.urls.connect)}},t}(l.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildSimpleTransactionRequest=void 0;var r=n(0),o=n(6),i=function(e){function t(t,n,r,i,a,s,u){var c=e.call(this,o.BuildTransactionRequestType.TRANSFER,t,n,r,s,u)||this;return c.value=i,a&&(c.data=a),c}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.to,e.secretType,e.value,e.data,e.network,e.chainSpecificFields)},t}(n(7).BuildTransferRequestBase);t.BuildSimpleTransactionRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTokenTransferRequest=void 0;var r=n(0),o=n(6),i=function(e){function t(t,n,r,i,a,s,u){var c=e.call(this,o.BuildTransactionRequestType.TOKEN_TRANSFER,t,n,i,s,u)||this;return c.value=r,c.tokenAddress=a,c}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.to,e.value,e.secretType,e.tokenAddress,e.network,e.chainSpecificFields)},t}(n(7).BuildTransferRequestBase);t.BuildTokenTransferRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildNftTransferRequest=void 0;var r=n(0),o=n(6),i=function(e){function t(t,n,r,i,a,s,u,c,l){var d=e.call(this,o.BuildTransactionRequestType.NFT_TRANSFER,t,n,r,c)||this;return d.tokenAddress=i,d.tokenId=a,d.amount=s||1,u&&(d.from=u),l&&(d.chainSpecificFields=l),d}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.to,e.secretType,e.tokenAddress,e.tokenId,e.amount,e.from,e.network,e.chainSpecificFields)},t}(n(7).BuildTransferRequestBase);t.BuildNftTransferRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildGasTransferRequest=void 0;var r=n(0),o=n(6),i=function(e){function t(t,n,r,i,a){var s=e.call(this,o.BuildTransactionRequestType.GAS_TRANSFER,t,n,i,a)||this;return s.value=r,s}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.to,e.value,e.secretType,e.network)},t}(n(7).BuildTransferRequestBase);t.BuildGasTransferRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildContractExecutionRequest=void 0;var r=n(0),o=n(7),i=n(6),a=n(43),s=function(e){function t(t,n,r,o,a,s,u,c){var l=e.call(this,i.BuildTransactionRequestType.CONTRACT_EXECUTION,t,n,r,c)||this;return l.functionName=o,l.value=s,l.inputs=a,l.chainSpecificFields=u,l}return r.__extends(t,e),t.fromData=function(e){var t=e.walletId,n=e.to,r=e.secretType,o=e.network,i=e.functionName,s=e.value,u=e.chainSpecificFields;return new this(t,n,r,i,e.inputs?e.inputs.map((function(e){return a.ContractCallInput.fromData(e)})):[],s,u,o)},t}(o.BuildTransferRequestBase);t.BuildContractExecutionRequest=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(18),i=n(4),a=r.__importDefault(n(2)),s=function(){function e(e,t,n){this.onPopupMountedQueue=[],this.isPopupMounted=!1,this.useOverlay=!0,this.useOverlay=!n||void 0===n.useOverlay||n.useOverlay,this.correlationID=""+Date.now()+Math.random(),this.bearerTokenProvider=t,this.popupMountedListener=this.createPopupMountedListener(this.correlationID),window.addEventListener("message",this.popupMountedListener),e=a.default.http().addRequestParams(e,{cid:this.correlationID,webURI:a.default.urls.connect}),this.popupWindow=o.PopupWindow.openNew(e,{useOverlay:this.useOverlay})}return e.clearPopupIntervals=function(){e.popupIntervals.forEach((function(t,n){clearInterval(e.popupIntervals[n])})),e.popupIntervals=[]},e.prototype.isOpen=function(){return this.popupWindow&&!this.popupWindow.closed},e.prototype.close=function(){this.popupMountedListener&&window.removeEventListener("message",this.popupMountedListener),this.popupWindow.close()},e.prototype.focus=function(){this.popupWindow.focus()},e.prototype.attachFinishedListener=function(t,n){var r=this;return function(){e.clearPopupIntervals(),r.finishedListener&&(window.removeEventListener("message",r.finishedListener),delete r.finishedListener),e.popupIntervals.push(r.createPopupClosedListener(n)),r.finishedListener=r.createFinishedListener(t,n),window.addEventListener("message",r.finishedListener)}},e.prototype.createPopupMountedListener=function(e){var t=this;return function(n){a.default.messages().hasValidOrigin(n)&&a.default.messages().hasCorrectCorrelationID(n,e)&&a.default.messages().isOfType(n,i.EventTypes.POPUP_MOUNTED)&&(t.isPopupMounted=!0,t.popupMountedListener&&(window.removeEventListener("message",t.popupMountedListener),delete t.popupMountedListener),t.processPopupMountedQueue())}},e.prototype.createPopupClosedListener=function(t){var n=this;return window.setInterval((function(){n.popupWindow&&!n.popupWindow.closed||(e.clearPopupIntervals(),t({status:"ABORTED",errors:[]}))}),100)},e.prototype.createFinishedListener=function(t,n){var o=this;return function(i){if(a.default.messages().hasValidOrigin(i)&&a.default.messages().isOfType(i,o.finishedEventType)&&a.default.messages().hasCorrectCorrelationID(i,o.correlationID))switch(e.clearPopupIntervals(),i.data.result.status){case"SUCCESS":t(i.data&&r.__assign({},i.data.result));break;case"ABORTED":case"FAILED":n(i.data&&r.__assign({},i.data.result))}}},e.prototype.processPopupMountedQueue=function(){if(this.isPopupMounted)for(var e=this.onPopupMountedQueue.shift();e;)e(),e=this.onPopupMountedQueue.shift()},e.popupIntervals=[],e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildMessageSignRequest=void 0;var r=n(0),o=n(31),i=n(32),a=function(e){function t(t,n,r){var o=e.call(this,i.BuildSignatureRequestType.MESSAGE,t,n)||this;return o.data=r,o}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.secretType,e.data)},t}(o.BuildSignRequestBase);t.BuildMessageSignRequest=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildSignRequestBase=void 0;var r=function(e,t,n){this.type=e,this.walletId=t,this.secretType=n};t.BuildSignRequestBase=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildSignatureRequestType=void 0,function(e){e.MESSAGE="MESSAGE",e.EIP712="EIP712"}(t.BuildSignatureRequestType||(t.BuildSignatureRequestType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildEip712SignRequest=void 0;var r=n(0),o=n(31),i=n(32),a=function(e){function t(t,n,r){var o=e.call(this,i.BuildSignatureRequestType.EIP712,t,n)||this;return o.data=r,o}return r.__extends(t,e),t.fromData=function(e){return new this(e.walletId,e.secretType,e.data)},t}(o.BuildSignRequestBase);t.BuildEip712SignRequest=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectSigner=void 0;var r=n(0),o=n(11),i=r.__importDefault(n(2)),a=n(27),s=n(25),u=n(26),c=n(24),l=n(28),d=n(30),p=n(33),f=n(12),h=function(){function e(e){this.bearerTokenProvider=e}return e.prototype.executeNativeTransaction=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/execute/"+e.type.toLowerCase(),e,n.bearerTokenProvider,t),r()}))},e.prototype.executeTransaction=function(e,t){return"string"==typeof e?this.executeSavedTransaction(e,t):this.executeProvidedTransaction(o.BuildTransactionRequest.fromData(e),t)},e.prototype.executeTransfer=function(e,t){return this.executeProvidedTransaction(c.BuildSimpleTransactionRequest.fromData(e),t)},e.prototype.executeTokenTransfer=function(e,t){return this.executeProvidedTransaction(s.BuildTokenTransferRequest.fromData(e),t)},e.prototype.executeNftTransfer=function(e,t){return this.executeProvidedTransaction(u.BuildNftTransferRequest.fromData(e),t)},e.prototype.executeGasTransfer=function(e,t){return this.executeProvidedTransaction(a.BuildGasTransferRequest.fromData(e),t)},e.prototype.executeContract=function(e,t){return this.executeProvidedTransaction(l.BuildContractExecutionRequest.fromData(e),t)},e.prototype.executeSavedTransaction=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/execute/"+e,{},n.bearerTokenProvider,t),r()}))},e.prototype.resubmitTransaction=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/resubmit/"+e,{},n.bearerTokenProvider,t),r()}))},e.prototype.cancelTransaction=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/cancel/"+e,{},n.bearerTokenProvider,t),r()}))},e.prototype.executeProvidedTransaction=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/execute",e,n.bearerTokenProvider,t),r()}))},e.prototype.sign=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/sign/"+e.type.toLowerCase(),e,n.bearerTokenProvider,t),r()}))},e.prototype.signMessage=function(e,t){return this.signProvidedSignature(d.BuildMessageSignRequest.fromData(e),t)},e.prototype.signEip712=function(e,t){return this.signProvidedSignature(p.BuildEip712SignRequest.fromData(e),t)},e.prototype.signProvidedSignature=function(e,t){var n=this;return new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/transaction/sign",e,n.bearerTokenProvider,t),r()}))},e.prototype.signTransaction=function(e,t){return this.sign(e,t)},e.prototype.importWallet=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return[2,this.confirm(f.ImportWalletRequest.fromData(e),t)]}))}))},e.prototype.confirm=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n=this;return r.__generator(this,(function(r){return[2,new Promise((function(r,o){i.default.http().postInForm(i.default.urls.connect+"/confirm/"+e.confirmationRequestType.toLowerCase(),e,n.bearerTokenProvider,t),r()}))]}))}))},e}();t.RedirectSigner=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupActions=void 0,function(e){e.MANAGE_WALLETS="manage-wallets",e.LINK_WALLET="link-wallets",e.CLAIM_WALLETS="claim-wallets",e.PERFORM_KYC="perform-kyc"}(t.PopupActions||(t.PopupActions={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(17);r.__exportStar(n(20),t),r.__exportStar(n(17),t);var i=n(9);Object.defineProperty(t,"ConfirmationRequestType",{enumerable:!0,get:function(){return i.ConfirmationRequestType}});var a=n(46);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return a.Network}});var s=n(21);Object.defineProperty(t,"SecretType",{enumerable:!0,get:function(){return s.SecretType}});var u=n(47);Object.defineProperty(t,"SignatureRequestType",{enumerable:!0,get:function(){return u.SignatureRequestType}});var c=n(48);Object.defineProperty(t,"TransactionRequestType",{enumerable:!0,get:function(){return c.TransactionRequestType}});var l=n(3);Object.defineProperty(t,"WindowMode",{enumerable:!0,get:function(){return l.WindowMode}});var d=n(49);Object.defineProperty(t,"ContractReadRequest",{enumerable:!0,get:function(){return d.ContractReadRequest}});var p=n(50);Object.defineProperty(t,"ContractReadRequestInputParam",{enumerable:!0,get:function(){return p.ContractReadRequestInputParam}});var f=n(51);Object.defineProperty(t,"ContractReadRequestOutputParam",{enumerable:!0,get:function(){return f.ContractReadRequestOutputParam}});var h=n(52);Object.defineProperty(t,"ContractReadResult",{enumerable:!0,get:function(){return h.ContractReadResult}}),r.__exportStar(n(53),t);var _=n(1);Object.defineProperty(t,"TransactionRequest",{enumerable:!0,get:function(){return _.TransactionRequest}});var v=n(54);Object.defineProperty(t,"TransactionResult",{enumerable:!0,get:function(){return v.TransactionResult}});var T=n(55);Object.defineProperty(t,"TxStatus",{enumerable:!0,get:function(){return T.TxStatus}});var R=n(11);Object.defineProperty(t,"BuildTransactionRequest",{enumerable:!0,get:function(){return R.BuildTransactionRequest}});var A=n(56);Object.defineProperty(t,"BuildContractExecutionRequestDto",{enumerable:!0,get:function(){return A.BuildContractExecutionRequestDto}});var y=n(57);Object.defineProperty(t,"BuildTransferRequestDto",{enumerable:!0,get:function(){return y.BuildTransferRequestDto}});var E=n(58);Object.defineProperty(t,"BuildTokenTransferRequestDto",{enumerable:!0,get:function(){return E.BuildTokenTransferRequestDto}});var m=n(59);Object.defineProperty(t,"BuildGasTransferRequestDto",{enumerable:!0,get:function(){return m.BuildGasTransferRequestDto}}),r.__exportStar(n(60),t);var g=n(61);Object.defineProperty(t,"EthereumErc20TransactionRequest",{enumerable:!0,get:function(){return g.EthereumErc20TransactionRequest}});var w=n(62);Object.defineProperty(t,"EthereumErc721TransactionRequest",{enumerable:!0,get:function(){return w.EthereumErc721TransactionRequest}});var S=n(13);Object.defineProperty(t,"EthereumErcTokenTransactionRequest",{enumerable:!0,get:function(){return S.EthereumErcTokenTransactionRequest}});var C=n(63);Object.defineProperty(t,"EthereumTransactionRequest",{enumerable:!0,get:function(){return C.EthereumTransactionRequest}});var O=n(64);Object.defineProperty(t,"GochainErc20TransactionRequest",{enumerable:!0,get:function(){return O.GochainErc20TransactionRequest}});var I=n(65);Object.defineProperty(t,"GochainTransactionRequest",{enumerable:!0,get:function(){return I.GochainTransactionRequest}}),r.__exportStar(n(66),t);var b=n(67);Object.defineProperty(t,"MaticErc20TransactionRequest",{enumerable:!0,get:function(){return b.MaticErc20TransactionRequest}});var N=n(68);Object.defineProperty(t,"MaticErc721TransactionRequest",{enumerable:!0,get:function(){return N.MaticErc721TransactionRequest}});var P=n(14);Object.defineProperty(t,"MaticErcTokenTransactionRequest",{enumerable:!0,get:function(){return P.MaticErcTokenTransactionRequest}});var k=n(69);Object.defineProperty(t,"MaticTransactionRequest",{enumerable:!0,get:function(){return k.MaticTransactionRequest}});var M=n(70);Object.defineProperty(t,"HederaTokenAssociationTransactionRequest",{enumerable:!0,get:function(){return M.HederaTokenAssociationTransactionRequest}}),r.__exportStar(n(71),t);var U=n(72);Object.defineProperty(t,"ArbitrumErc20TransactionRequest",{enumerable:!0,get:function(){return U.ArbitrumErc20TransactionRequest}});var q=n(73);Object.defineProperty(t,"ArbitrumErc721TransactionRequest",{enumerable:!0,get:function(){return q.ArbitrumErc721TransactionRequest}});var L=n(15);Object.defineProperty(t,"ArbitrumErcTokenTransactionRequest",{enumerable:!0,get:function(){return L.ArbitrumErcTokenTransactionRequest}});var H=n(74);Object.defineProperty(t,"ArbitrumTransactionRequest",{enumerable:!0,get:function(){return H.ArbitrumTransactionRequest}}),r.__exportStar(n(75),t);var x=n(76);Object.defineProperty(t,"TronTransactionRequest",{enumerable:!0,get:function(){return x.TronTransactionRequest}});var D=n(77);Object.defineProperty(t,"VechainContractCallExecutionRequest",{enumerable:!0,get:function(){return D.VechainContractCallExecutionRequest}}),r.__exportStar(n(78),t),r.__exportStar(n(79),t),r.__exportStar(n(80),t);var B=n(81);Object.defineProperty(t,"BitcoinTransactionRequest",{enumerable:!0,get:function(){return B.BitcoinTransactionRequest}});var W=n(82);Object.defineProperty(t,"LitecoinTransactionRequest",{enumerable:!0,get:function(){return W.LitecoinTransactionRequest}});var j=n(83);Object.defineProperty(t,"CreateApplicationWalletRequest",{enumerable:!0,get:function(){return j.CreateApplicationWalletRequest}});var F=n(84);Object.defineProperty(t,"CreateFirstWalletRequest",{enumerable:!0,get:function(){return F.CreateFirstWalletRequest}});var X=n(16);Object.defineProperty(t,"CreateWalletRequest",{enumerable:!0,get:function(){return X.CreateWalletRequest}});var G=n(12);Object.defineProperty(t,"ImportWalletRequest",{enumerable:!0,get:function(){return G.ImportWalletRequest}}),r.__exportStar(n(85),t);var V=n(86);Object.defineProperty(t,"TokenBalance",{enumerable:!0,get:function(){return V.TokenBalance}}),r.__exportStar(n(87),t);var K=n(88);Object.defineProperty(t,"WalletBalance",{enumerable:!0,get:function(){return K.WalletBalance}});var Y=n(35);Object.defineProperty(t,"PopupActions",{enumerable:!0,get:function(){return Y.PopupActions}}),r.__exportStar(n(23),t),r.__exportStar(n(34),t),r.__exportStar(n(22),t);var z=n(4);Object.defineProperty(t,"EventTypes",{enumerable:!0,get:function(){return z.EventTypes}}),"undefined"!=typeof window&&(window.VenlyConnect=o.VenlyConnect)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopupWindowAsync=void 0;var r=n(0),o=r.__importDefault(n(2)),i=n(4),a=n(18),s=function(){function e(e,t,n,r,i,a){this.id="id-"+o.default.uuidv4(),this.url=e,this.target=t,this.features=n,this.useOverlay=void 0===r||r,this.correlationID=i,this.replace=a,this.openOverlay()}return e.openNew=function(t,n,i){return r.__awaiter(this,void 0,void 0,(function(){var a,s,u,c,l;return r.__generator(this,(function(r){switch(r.label){case 0:return a=Object.assign({title:"Venly Connect",w:350,h:700,useOverlay:!0},i),s=screen.width/2-a.w/2,u=screen.height/2-a.h/2,c="popup=true, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+a.w+", height="+a.h+", top="+u+", left="+s,t=o.default.http().addRequestParams(t,{cid:n}),[4,(l=new e(t,a.title,c,a.useOverlay,n)).open()];case 1:return r.sent(),[2,l]}}))}))},e.prototype.open=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(n){switch(n.label){case 0:return e=this,[4,new Promise((function(e){t.popupMountedListener=t.createPopupMountedListener(t.correlationID,e),window.addEventListener("message",t.popupMountedListener);try{window.open(t.url,t.target,t.features)}catch(e){console.debug("popup open failed",e)}})).then((function(e){return t.setCloseInterval(),e}))];case 1:return e.win=n.sent(),[2]}}))}))},e.prototype.createPopupMountedListener=function(e,t){var n=this;return function(e){o.default.messages().hasValidOrigin(e)&&o.default.messages().isOfType(e,i.EventTypes.POPUP_MOUNTED)&&(n.popupMountedListener&&(window.removeEventListener("message",n.popupMountedListener),delete n.popupMountedListener),t(e.source))}},e.prototype.setCloseInterval=function(){var e=this;this.closeInterval=window.setInterval((function(){e.win&&!e.win.closed||e.close()}),100)},e.prototype.clearCloseInterval=function(){window.clearInterval(this.closeInterval)},e.prototype.close=function(){this.closePopup(),this.closeOverlay(),this.clearCloseInterval(),this.removePopupMountedListener()},e.prototype.closePopup=function(){this.win&&this.win.close()},e.prototype.removePopupMountedListener=function(){this.popupMountedListener&&(window.removeEventListener("message",this.popupMountedListener),delete this.popupMountedListener)},Object.defineProperty(e.prototype,"closed",{get:function(){return!this.win||this.win.closed},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.win&&this.win.focus()},e.prototype.closeOverlay=function(){a.PopupWindow.closeOverlay(this.id,this.useOverlay)},e.prototype.openOverlay=function(){a.PopupWindow.openOverlay(this.id,this.useOverlay,this.focus,this.close)},e}();t.PopupWindowAsync=s},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
/**
 * [js-sha256]{@link https://github.com/emn178/js-sha256}
 *
 * @version 0.9.0
 * @author Chen, Yi-Cyuan [emn178@gmail.com]
 * @copyright Chen, Yi-Cyuan 2014-2017
 * @license MIT
 */!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(41),ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];t[r]=createOutputMethod(r,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if("string"==typeof e)return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(null==e)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(n,r){return new HmacSha256(n,t,!0).update(r)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(t){return new HmacSha256(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];t[r]=createHmacOutputMethod(r,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function HmacSha256(e,t,n){var r,o=typeof e;if("string"===o){var i,a=[],s=e.length,u=0;for(r=0;r<s;++r)(i=e.charCodeAt(r))<128?a[u++]=i:i<2048?(a[u++]=192|i>>6,a[u++]=128|63&i):i<55296||i>=57344?(a[u++]=224|i>>12,a[u++]=128|i>>6&63,a[u++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++r)),a[u++]=240|i>>18,a[u++]=128|i>>12&63,a[u++]=128|i>>6&63,a[u++]=128|63&i);e=a}else{if("object"!==o)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],l=[];for(r=0;r<64;++r){var d=e[r]||0;c[r]=92^d,l[r]=54^d}Sha256.call(this,t,n),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var r,o,i=0,a=e.length,s=this.blocks;i<a;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),t)for(o=this.start;i<a&&o<64;++i)s[o>>2]|=e[i]<<SHIFT[3&o++];else for(o=this.start;i<a&&o<64;++i)(r=e.charCodeAt(i))<128?s[o>>2]|=r<<SHIFT[3&o++]:r<2048?(s[o>>2]|=(192|r>>6)<<SHIFT[3&o++],s[o>>2]|=(128|63&r)<<SHIFT[3&o++]):r<55296||r>=57344?(s[o>>2]|=(224|r>>12)<<SHIFT[3&o++],s[o>>2]|=(128|r>>6&63)<<SHIFT[3&o++],s[o>>2]|=(128|63&r)<<SHIFT[3&o++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++i)),s[o>>2]|=(240|r>>18)<<SHIFT[3&o++],s[o>>2]|=(128|r>>12&63)<<SHIFT[3&o++],s[o>>2]|=(128|r>>6&63)<<SHIFT[3&o++],s[o>>2]|=(128|63&r)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,n,r,o,i,a,s,u,c=this.h0,l=this.h1,d=this.h2,p=this.h3,f=this.h4,h=this.h5,_=this.h6,v=this.h7,T=this.blocks;for(e=16;e<64;++e)t=((o=T[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,n=((o=T[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,T[e]=T[e-16]+t+T[e-7]+n<<0;for(u=l&d,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,v=(o=T[0]-1413257819)-150054599<<0,p=o+24177077<<0):(i=704751109,v=(o=T[0]-210244248)-1521486534<<0,p=o+143694565<<0),this.first=!1):(t=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(i=c&l)^c&d^u,v=p+(o=v+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&_)+K[e]+T[e])<<0,p=o+(t+r)<<0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(a=p&c)^p&l^i,_=d+(o=_+(n=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&f^~v&h)+K[e+1]+T[e+1])<<0,t=((d=o+(t+r)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(s=d&p)^d&c^a,h=l+(o=h+(n=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&v^~_&f)+K[e+2]+T[e+2])<<0,t=((l=o+(t+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(u=l&d)^l&p^s,f=c+(o=f+(n=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&_^~h&v)+K[e+3]+T[e+3])<<0,c=o+(t+r)<<0;this.h0=this.h0+c<<0,this.h1=this.h1+l<<0,this.h2=this.h2+d<<0,this.h3=this.h3+p<<0,this.h4=this.h4+f<<0,this.h5=this.h5+h<<0,this.h6=this.h6+_<<0,this.h7=this.h7+v<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a];return this.is224||(u+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),u},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,255&s),u},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(39),__webpack_require__(40))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,d=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&f())}function f(){if(!l){var e=s(p);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function _(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=_,o.addListener=_,o.once=_,o.off=_,o.removeListener=_,o.removeAllListeners=_,o.emit=_,o.prependListener=_,o.prependOnceListener=_,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,d=s>0?a-4:a;for(n=0;n<d;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(l(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractCallInput=void 0;var r=function(){function e(e,t){this.type=e,this.value=t}return e.fromData=function(e){return new this(e.type,e.value)},e}();t.ContractCallInput=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flows=void 0;var r=n(0),o=r.__importDefault(n(2)),i=n(45),a=n(35),s=n(8),u=n(3),c=n(5),l=function(){function e(e,t){this.clientId=t,this.connect=e}return e.prototype.authenticate=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(o){switch(o.label){case 0:return(t=r.__assign({},e)).windowMode=t.windowMode||this.connect.windowMode,t.windowMode=t.windowMode!==u.WindowMode.POPUP||t.forcePopup?t.windowMode:u.WindowMode.DIALOG,[4,s.Security.login(this.clientId,t)];case 1:return n=o.sent(),[2,this.connect._afterAuthenticationForFlowUse(n)]}}))}))},e.prototype.manageWallets=function(e,t){var n=t&&t.windowMode||this.connect.windowMode,r=t&&null!=t.useOverlayWithPopup?t.useOverlayWithPopup:this.connect.useOverlayWithPopup,o=t?t.closePopup:void 0;return n===u.WindowMode.REDIRECT?this.manageWalletsRedirect(e,t):this.manageWalletsPopup(e,{useOverlay:r,closePopup:o})},e.prototype.linkWallets=function(e){var t=e&&e.windowMode||this.connect.windowMode,n=e&&null!=e.useOverlayWithPopup?e.useOverlayWithPopup:this.connect.useOverlayWithPopup;return t===u.WindowMode.REDIRECT?this.linkWalletsRedirect(e):this.linkWalletsPopup({useOverlay:n})},e.prototype.claimWallets=function(e){var t=e&&e.windowMode||this.connect.windowMode,n=e&&e.useOverlayWithPopup||this.connect.useOverlayWithPopup;return t===u.WindowMode.REDIRECT?this.claimWalletsRedirect(e):this.claimWalletsPopup({useOverlay:n})},e.prototype.performKYC=function(e){var t=e&&e.windowMode||this.connect.windowMode,n=e&&null!=e.useOverlayWithPopup?e.useOverlayWithPopup:this.connect.useOverlayWithPopup;return t===u.WindowMode.REDIRECT?this.performKYCRedirect(e):this.performKYCPopup({useOverlay:n})},e.prototype.getAccount=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,i,a,c,l,d,p;return r.__generator(this,(function(r){switch(r.label){case 0:n=this.connect.loginResult||{},i=[],a=o.default.uuidv4(),r.label=1;case 1:return r.trys.push([1,8,,9]),c={windowMode:u.WindowMode.POPUP},t&&t.idpHint&&(c.idpHint=t.idpHint),t&&t.emailHint&&(c.emailHint=t.emailHint),n&&n.authenticated?[3,3]:[4,s.Security.login(this.clientId,c,a)];case 2:n=r.sent(),r.label=3;case 3:return(l=this.connect._afterAuthenticationForFlowUse(n)).isAuthenticated?[4,this.connect.api.getWallets({secretType:e.toUpperCase()})]:[3,7];case 4:return(i=r.sent())&&i.length>0?[3,7]:[4,this.manageWallets(e,{windowMode:u.WindowMode.POPUP})];case 5:return(d=r.sent())&&"SUCCESS"===d.status?[4,this.connect.api.getWallets({secretType:e.toUpperCase()})]:[3,7];case 6:i=r.sent(),r.label=7;case 7:if(!l.isAuthenticated||0===i.length)throw Error("Something went wrong.");return[3,9];case 8:return p=r.sent(),console.error(p),[3,9];case 9:return s.Security.hasPopupWindow()&&s.Security.closePopupWindow(),[2,{wallets:i,auth:n.keycloak,isAuthenticated:n.authenticated}]}}))}))},e.prototype.manageWalletsRedirect=function(e,t){return o.default.http().postInForm(o.default.urls.connect+"/wallets/manage",{chain:e.toLowerCase()},this.connect._bearerTokenProvider,t),Promise.resolve()},e.prototype.manageWalletsPopup=function(e,t){var n=this;return c.DialogWindow.openActionDialog(this.clientId,"connect-wallet").then((function(){return i.GeneralPopup.openNewPopup(a.PopupActions.MANAGE_WALLETS,n.connect._bearerTokenProvider,{chain:e.toLowerCase()},t)}))},e.prototype.linkWalletsRedirect=function(e){return o.default.http().postInForm(o.default.urls.connect+"/wallets/link",{},this.connect._bearerTokenProvider,e),Promise.resolve()},e.prototype.performKYCRedirect=function(e){return o.default.http().postInForm(o.default.urls.connect+"/verification/sessions",{},this.connect._bearerTokenProvider,e),Promise.resolve()},e.prototype.linkWalletsPopup=function(e){var t=this;return c.DialogWindow.openActionDialog(this.clientId,"connect-wallet").then((function(){return i.GeneralPopup.openNewPopup(a.PopupActions.LINK_WALLET,t.connect._bearerTokenProvider,void 0,e)}))},e.prototype.performKYCPopup=function(e){return i.GeneralPopup.openNewPopup(a.PopupActions.PERFORM_KYC,this.connect._bearerTokenProvider,void 0,e)},e.prototype.claimWalletsRedirect=function(e){return o.default.http().postInForm(o.default.urls.connect+"/wallets/claim",{},this.connect._bearerTokenProvider,e),Promise.resolve()},e.prototype.claimWalletsPopup=function(e){var t=this;return c.DialogWindow.openActionDialog(this.clientId,"claim-wallet").then((function(){return i.GeneralPopup.openNewPopup(a.PopupActions.CLAIM_WALLETS,t.connect._bearerTokenProvider,void 0,e)}))},e}();t.Flows=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneralPopup=void 0;var r=n(0),o=n(4),i=r.__importDefault(n(29)),a=r.__importDefault(n(2)),s=n(5),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finishedEventType=o.EventTypes.POPUP_FINISHED,t.sendDataEventType=o.EventTypes.SEND_DATA,t}return r.__extends(t,e),t.openNewPopup=function(e,n,r,o){var i=new t(a.default.urls.connect+"/popup/general/init.html",n,o);return window.addEventListener("beforeunload",(function(){i.close()})),i.focus(),i.sendData(e,r&&JSON.parse(JSON.stringify(r))).catch((function(){i.close()})).finally((function(){o&&0==o.closePopup||(i.close(),s.DialogWindow.removeBackdrop(),s.DialogWindow.closeRefocusLayout())}))},t.prototype.sendData=function(e,t){var n=this;return new Promise((function(r,o){n.onPopupMountedQueue.push(n.attachFinishedListener(r,o)),n.onPopupMountedQueue.push(n.sendDataToPopup(e,t)),n.processPopupMountedQueue()}))},t.prototype.sendDataToPopup=function(e,t){var n=this;return function(){if(n.isOpen()){var r={action:e,bearerToken:n.bearerTokenProvider()};t&&(r.data=t),n.popupWindow.postMessage({type:n.sendDataEventType,params:r},a.default.urls.connect)}}},t}(i.default);t.GeneralPopup=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;var r=function(){};t.Network=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureRequestType=void 0,function(e){e.AETERNITY_RAW="AETERNITY_RAW",e.AETERNITY_TRANSACTION="AETERNITY_TRANSACTION",e.AVAC_EIP712="AVAC_712",e.AVAC_RAW="AVAC_RAW",e.AVAC_TRANSACTION="AVAC_TRANSACTION",e.BITCOIN_TRANSACTION="BITCOIN_TRANSACTION",e.BSC_EIP712="BSC_712",e.BSC_RAW="BSC_RAW",e.BSC_TRANSACTION="BSC_TRANSACTION",e.ETHEREUM_EIP712="ETHEREUM_712",e.ETHEREUM_RAW="ETHEREUM_RAW",e.ETHEREUM_TRANSACTION="ETHEREUM_TRANSACTION",e.GOCHAIN_RAW="GOCHAIN_RAW",e.GOCHAIN_TRANSACTION="GOCHAIN_TRANSACTION",e.HEDERA_HBAR_TRANSFER="HEDERA_HBAR_TRANSFER",e.HEDERA_RAW="HEDERA_RAW",e.IMX_RAW="IMX_RAW",e.LITECOIN_TRANSACTION="LITECOIN_TRANSACTION",e.MATIC_RAW="MATIC_RAW",e.MATIC_TRANSACTION="MATIC_TRANSACTION",e.NEO_MESSAGE="NEO_MESSAGE",e.NEO_NATIVE_TRANSACTION="NEO_NATIVE_TRANSACTION",e.NEO_RAW="NEO_RAW",e.TRC10_TRANSACTION="TRC10_TRANSACTION",e.TRON_RAW="TRON_RAW",e.TRON_TRANSACTION="TRON_TRANSACTION",e.VECHAIN_RAW="VECHAIN_RAW",e.VECHAIN_TRANSACTION="VECHAIN_TRANSACTION",e.ARBITRUM_RAW="ARBITRUM_RAW",e.ARBITRUM_TRANSACTION="ARBITRUM_TRANSACTION",e.XPLA_RAW="XPLA_RAW",e.XPLA_TRANSACTION="XPLA_TRANSACTION",e.BASE_RAW="BASE_RAW",e.BASE_TRANSACTION="BASE_TRANSACTION",e.BASE_EIP712="BASE_EIP712",e.OPTIMISM_EIP712="OPTIMISM_EIP712",e.OPTIMISM_RAW="OPTIMISM_RAW",e.OPTIMISM_TRANSACTION="OPTIMISM_TRANSACTION",e.SOLANA_TRANSACTION="SOLANA_TRANSACTION",e.SOLANA_RAW="SOLANA_RAW",e.SUI_TRANSACTION="SUI_TRANSACTION",e.SUI_RAW="SUI_RAW"}(t.SignatureRequestType||(t.SignatureRequestType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionRequestType=void 0,function(e){e.AE_TRANSACTION="AE_TRANSACTION",e.AVAC_TRANSACTION="AVAC_TRANSACTION",e.AVAC_ERC20_TRANSACTION="AVAC_ERC20_TRANSACTION",e.AVAC_ERC721_TRANSACTION="AVAC_ERC721_TRANSACTION",e.AVAC_CONTRACT_EXECUTION="AVAC_CONTRACT_EXECUTION",e.BSC_TRANSACTION="BSC_TRANSACTION",e.BSC_BEP20_TRANSACTION="BSC_BEP20_TRANSACTION",e.BSC_ERC721_TRANSACTION="BSC_ERC721_TRANSACTION",e.BSC_CONTRACT_EXECUTION="BSC_CONTRACT_EXECUTION",e.BTC_TRANSACTION="BTC_TRANSACTION",e.ETH_TRANSACTION="ETH_TRANSACTION",e.ETHEREUM_ERC20_TRANSACTION="ETHEREUM_ERC20_TRANSACTION",e.ETHEREUM_ERC721_TRANSACTION="ETHEREUM_ERC721_TRANSACTION",e.ETHEREUM_CONTRACT_EXECUTION="ETHEREUM_CONTRACT_EXECUTION",e.MATIC_TRANSACTION="MATIC_TRANSACTION",e.MATIC_ERC20_TRANSACTION="MATIC_ERC20_TRANSACTION",e.MATIC_ERC721_TRANSACTION="MATIC_ERC721_TRANSACTION",e.MATIC_CONTRACT_EXECUTION="MATIC_CONTRACT_EXECUTION",e.GO_TRANSACTION="GO_TRANSACTION",e.GOCHAIN_GO20_TRANSACTION="GOCHAIN_GO20_TRANSACTION",e.HBAR_TRANSFER="HBAR_TRANSFER",e.HEDERA_TOKEN_TRANSFER="HEDERA_TOKEN_TRANSFER",e.HEDERA_NFT_TRANSFER="HEDERA_NFT_TRANSFER",e.HEDERA_TOKEN_ASSOCIATION="HEDERA_TOKEN_ASSOCIATION",e.HEDERA_APPROVE_ALLOWANCE="HEDERA_APPROVE_ALLOWANCE",e.LTC_TRANSACTION="LTC_TRANSACTION",e.VECHAIN_VIP180_TRANSACTION="VECHAIN_VIP180_TRANSACTION",e.VET_TRANSACTION="VET_TRANSACTION",e.VECHAIN_CONTRACT_EXECUTION="VECHAIN_CONTRACT_EXECUTION",e.TRC10_TRANSACTION="TRC10_TRANSACTION",e.TRX_TRANSACTION="TRX_TRANSACTION",e.TRON_CONTRACT_EXECUTION="TRON_CONTRACT_EXECUTION",e.NEO_NATIVE_TRANSACTION="NEO_NATIVE_TRANSACTION",e.NEO_GAS_TRANSACTION="NEO_GAS_TRANSACTION",e.NEO_CONTRACT_EXECUTION="NEO_CONTRACT_EXECUTION",e.IMX_TRANSACTION="IMX_TRANSACTION",e.IMX_ERC20_TRANSACTION="IMX_ERC20_TRANSACTION",e.IMX_ERC721_TRANSACTION="IMX_ERC721_TRANSACTION",e.ARBITRUM_TRANSACTION="ARBITRUM_TRANSACTION",e.ARBITRUM_ERC20_TRANSACTION="ARBITRUM_ERC20_TRANSACTION",e.ARBITRUM_ERC721_TRANSACTION="ARBITRUM_ERC721_TRANSACTION",e.ARBITRUM_CONTRACT_EXECUTION="ARBITRUM_CONTRACT_EXECUTION",e.XPLA_TRANSACTION="XPLA_TRANSACTION",e.XPLA_CW20_TRANSACTION="XPLA_CW20_TRANSACTION",e.XPLA_ERC721_TRANSACTION="XPLA_ERC721_TRANSACTION",e.XPLA_CONTRACT_EXECUTION="XPLA_CONTRACT_EXECUTION",e.BASE_TRANSACTION="BASE_TRANSACTION",e.BASE_ERC20_TRANSACTION="BASE_ERC20_TRANSACTION",e.BASE_ERC721_TRANSACTION="BASE_ERC721_TRANSACTION",e.BASE_CONTRACT_EXECUTION="BASE_CONTRACT_EXECUTION",e.OPTIMISM_TRANSACTION="OPTIMISM_TRANSACTION",e.OPTIMISM_ERC20_TRANSACTION="OPTIMISM_ERC20_TRANSACTION",e.OPTIMISM_CONTRACT_EXECUTION="OPTIMISM_CONTRACT_EXECUTION",e.OPTIMISM_ERC721_TRANSACTION="OPTIMISM_ERC721_TRANSACTION",e.SOLANA_TRANSFER="SOLANA_TRANSFER",e.SOLANA_TOKEN_TRANSFER="SOLANA_TOKEN_TRANSFER",e.SOLANA_NFT_TRANSFER="SOLANA_NFT_TRANSFER",e.SOLANA_PROGRAM_EXECUTION="SOLANA_PROGRAM_EXECUTION",e.SUI_TRANSFER="SUI_TRANSFER",e.SUI_TOKEN_TRANSFER="SUI_TOKEN_TRANSFER",e.SUI_NFT_TRANSFER="SUI_NFT_TRANSFER",e.SUI_PACKAGE_EXECUTION="SUI_PACKAGE_EXECUTION",e.SUI_CONTRACT_CREATION="SUI_CONTRACT_CREATION"}(t.TransactionRequestType||(t.TransactionRequestType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractReadRequest=void 0;var r=function(){};t.ContractReadRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractReadRequestInputParam=void 0;var r=function(){};t.ContractReadRequestInputParam=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractReadRequestOutputParam=void 0;var r=function(){};t.ContractReadRequestOutputParam=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractReadResult=void 0;var r=function(){};t.ContractReadResult=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerificationResult=t.Profile=void 0;var r=function(){this.hasMasterPin=!1};t.Profile=r,function(e){e.VERIFIED="verified",e.FRAUD="fraud"}(t.VerificationResult||(t.VerificationResult={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResult=void 0;var r=function(){};t.TransactionResult=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TxStatus=void 0,function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.FAILED="FAILED",e.SUCCEEDED="SUCCEEDED"}(t.TxStatus||(t.TxStatus={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildContractExecutionRequestDto=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(10).BuildTransferRequestBaseDto);t.BuildContractExecutionRequestDto=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTransferRequestDto=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(10).BuildTransferRequestBaseDto);t.BuildTransferRequestDto=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildTokenTransferRequestDto=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(10).BuildTransferRequestBaseDto);t.BuildTokenTransferRequestDto=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildGasTransferRequestDto=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(10).BuildTransferRequestBaseDto);t.BuildGasTransferRequestDto=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumContractCallExecutionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.EthereumContractCallExecutionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumErc20TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(13).EthereumErcTokenTransactionRequest);t.EthereumErc20TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumErc721TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(13).EthereumErcTokenTransactionRequest);t.EthereumErc721TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumTransactionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data="0x",t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.EthereumTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GochainErc20TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.GochainErc20TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GochainTransactionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data="0x",t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.GochainTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaticContractCallExecutionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.MaticContractCallExecutionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaticErc20TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(14).MaticErcTokenTransactionRequest);t.MaticErc20TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaticErc721TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(14).MaticErcTokenTransactionRequest);t.MaticErc721TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaticTransactionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data="0x",t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.MaticTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HederaTokenAssociationTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.HederaTokenAssociationTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArbitrumContractCallExecutionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.ArbitrumContractCallExecutionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArbitrumErc20TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(15).ArbitrumErcTokenTransactionRequest);t.ArbitrumErc20TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArbitrumErc721TransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(15).ArbitrumErcTokenTransactionRequest);t.ArbitrumErc721TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArbitrumTransactionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data="0x",t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.ArbitrumTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TronContractCallExecutionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.TronContractCallExecutionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TronTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.TronTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VechainContractCallExecutionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.expiration=0,t.contractCalls=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.VechainContractCallExecutionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VechainExecutableContractCall=void 0;var r=function(){this.inputs=[]};t.VechainExecutableContractCall=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VechainTransactionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.expiration=0,t.clauses=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.VechainTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VechainVip180TransactionRequest=void 0;var r=n(0),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.expiration=0,t.clauses=[],t}return r.__extends(t,e),t}(n(1).TransactionRequest);t.VechainVip180TransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitcoinTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.BitcoinTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LitecoinTransactionRequest=void 0;var r=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1).TransactionRequest);t.LitecoinTransactionRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateApplicationWalletRequest=void 0;var r=n(0),o=n(9),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.confirmationRequestType=o.ConfirmationRequestType.CREATE_APPLICATION_WALLET,t}return r.__extends(t,e),t}(n(16).CreateWalletRequest);t.CreateApplicationWalletRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateFirstWalletRequest=void 0;var r=n(0),o=n(9),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.confirmationRequestType=o.ConfirmationRequestType.CREATE_FIRST_WALLET,t}return r.__extends(t,e),t}(n(16).CreateWalletRequest);t.CreateFirstWalletRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenBalance=void 0;var r=function(){};t.TokenBalance=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.WalletAppType=t.WalletType=void 0,function(e){e.THREEWAY_SHARED="THREEWAY_SHARED",e.USER_OWNED="USER_OWNED",e.UNCLAIMED="UNCLAIMED",e.APPLICATION="APPLICATION"}(t.WalletType||(t.WalletType={})),function(e){e.APP="APP",e.PERSONAL="PERSONAL"}(t.WalletAppType||(t.WalletAppType={}));var r=function(){this.description="",this.lastUpdated=0};t.Wallet=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletBalance=void 0;var r=function(){};t.WalletBalance=r}]).VenlyConnect}));