Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remixproject/engine

Package Overview
Dependencies
Maintainers
3
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remixproject/engine - npm Package Compare versions

Comparing version 0.1.11 to 0.1.13

dist/utils/src/external-api/3box/api.d.ts

2

dist/index.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.pluginEngine=t():e.pluginEngine=t()}(window,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=0)}([function(e,t,n){window,e.exports=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=0)}([function(e,t,n){window,e.exports=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=0)}([function(e,t,n){window,e.exports=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=0)}([function(e,t,n){window,e.exports=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=0)}([function(e,t,n){window,e.exports=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=0)}([function(e,t,n){window,e.exports=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=10)}([function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,s)}a((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,u={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(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}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])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.profile=e,this.requestQueue=[]}return Object.defineProperty(e.prototype,"name",{get:function(){return this.profile.name},enumerable:!0,configurable:!0}),e.prototype.activate=function(){this.onActivation&&this.onActivation()},e.prototype.deactivate=function(){this.onDeactivation&&this.onDeactivation()},e.prototype.callPluginMethod=function(e,t){if(!(e in this))throw new Error("Method "+e+" is not implemented by "+this.profile.name);return this[e].apply(this,t)},e.prototype.addRequest=function(e,t,n){var i=this;return new Promise(function(u,s){i.profile.methods&&i.profile.methods.includes(t)||s(new Error("Method "+t+" is not exposed by "+i.profile.name)),i.requestQueue.push(function(){return r(i,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:this.currentRequest=e,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.callPluginMethod(t,n)];case 2:return r=o.sent(),u(r),[3,4];case 3:return i=o.sent(),s(i),[3,4];case 4:return delete this.currentRequest,this.requestQueue.shift(),0!==this.requestQueue.length&&this.requestQueue[0](),[2]}})})}),1===i.requestQueue.length&&i.requestQueue[0]()})},e.prototype.on=function(e,t,n){throw new Error('Method "on" from '+this.name+" should be hooked by PluginEngine")},e.prototype.call=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return r(this,void 0,void 0,function(){return o(this,function(e){throw new Error('Method "call" from '+this.name+" should be hooked by PluginEngine")})})},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];throw new Error('Method "emit" from '+this.name+" should be hooked by PluginEngine")},e}();t.Plugin=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(18))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(21))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(22))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(23))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(24))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(26))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,s)}a((r=r.apply(e,t||[])).next())})},u=this&&this.__generator||function(e,t){var n,r,o,i,u={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(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}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])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0);t.isView=function(e){return!!e.location};var a=function(e){function t(t){var n=e.call(this,t)||this;return n.profile=t,n}return o(t,e),t.prototype.activate=function(){return i(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this.call(this.profile.location,"addView",this.profile,this.render())];case 1:return t.sent(),e.prototype.activate.call(this),[2]}})})},t.prototype.deactivate=function(){this.call(this.profile.location,"removeView",this.profile)},t}(s.Plugin);t.ViewPlugin=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(11))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(12)),r(n(27))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(13))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||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)},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,s)}a((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,r,o,i,u={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(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}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])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(14),c=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.plugins={},r.methods={},r.events={},r.listeners={},r.actives=[],r.settings=function(e){return i({autoActivate:!1,natives:[]},e)}(n),r.register(Object.keys(t).map(function(e){return t[e]})),r}return o(t,e),t.prototype.isRegistered=function(e){return!!this.plugins[e]},t.prototype.isActive=function(e){return!!this.actives.includes(e)},t.prototype.isNative=function(e){return!e.url||this.settings.natives.includes(e.name)},t.prototype.setSettings=function(e,t){var n;this.settings=i({},this.settings,"string"==typeof e?((n={})[e]=t,n):e)},t.prototype.register=function(e){var t=this;Array.isArray(e)?e.forEach(function(e){return t.registerOne(e)}):this.registerOne(e)},t.prototype.registerOne=function(e){if(!this.plugins[e.name]){if(!e.profile)throw new Error("Plugin "+e.name+" doesn't match the plugin interface");this.plugins[e.name]=e,this.onRegistration&&this.onRegistration(e),e.onRegistation&&e.onRegistation()}},t.prototype.activate=function(e){return u(this,void 0,void 0,function(){var t=this;return s(this,function(n){return[2,Array.isArray(e)?Promise.all(e.map(function(e){return t.activateOne(e)})):this.activateOne(e)]})})},t.prototype.activateOne=function(e){return u(this,void 0,void 0,function(){function t(t,n){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];return u(this,void 0,void 0,function(){var i,u,a,c,l;return s(this,function(s){switch(s.label){case 0:if(!this.isRegistered(t))throw new Error("Cannot call "+t+" from "+e+", because "+t+" is not registered");return i=this.plugins[t],u=this.isNative(r.profile),!this.settings.permissionHandler||u?[3,2]:i.profile.permission?[4,this.settings.permissionHandler.askPermission(r.profile,i.profile)]:[3,2];case 1:if(!s.sent())throw new Error('Plugin "'+e+'" don\'t have permission to call method "'+n+'" of plugin "'+t+'"');s.label=2;case 2:if(!this.isActive(t)){if(!this.settings.autoActivate||!u)throw new Error("Cannot call "+t+" from "+e+", because "+t+" is not activated yet");this.settings.permissionHandler&&this.settings.permissionHandler.onActivation(r.profile,i.profile),this.activateOne(t)}if(!i.profile.methods.includes(n))throw a='Cannot call method "'+n+'" of "'+t+'" from "'+e+'", because "'+n+'" is not exposed.',c="Here is the list of exposed methods: "+i.profile.methods.map(function(e){return'"'+e+'"'}).join(","),new Error(a+" "+c);return l={from:e},[2,i.addRequest(l,n,o)]}})})}function n(t,n,r){var o=a.listenEvent(t,n);this.events[e][o]||(this.events[e][o]=r),this.listeners[o]||(this.listeners[o]=[]),this.listeners[o].includes(e)||this.listeners[o].push(e)}var r,o,c=this;return s(this,function(u){switch(u.label){case 0:if(this.isActive(e))return[2];if(!this.isRegistered(e))throw new Error("Plugin "+e+" is not register yet. It cannot be activated");return r=this.plugins[e],this.actives.push(e),r.call=t.bind(this),this.events[e]={},r.on=n.bind(this),r.emit=function(t){for(var n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i=a.listenEvent(e,t);this.listeners[i]&&(this.listeners[i]||[]).forEach(function(o){var u;if(!n.events[o][i])throw new Error("Plugin "+o+" should be listening on event "+t+" from "+e+". But no callback have been found");(u=n.events[o])[i].apply(u,r)})}.bind(this),o=Object.keys(this.plugins).reduce(function(e,r){var o;return i({},e,((o={})[r]=c.plugins[r].profile.methods.reduce(function(e,n){var o;return i({},e,((o={})[n]=t.bind(c,r,n),o))},{on:n.bind(c,r)}),o))},{}),r.app=Object.freeze(o),[4,r.activate()];case 1:return u.sent(),this.onActivated&&this.onActivated(r),[2]}})})},t.prototype.deactivate=function(e){return u(this,void 0,void 0,function(){var t=this;return s(this,function(n){return[2,Array.isArray(e)?Promise.all(e.map(function(e){return t.deactivateOne(e)})):this.deactivateOne(e)]})})},t.prototype.deactivateOne=function(e){return u(this,void 0,void 0,function(){var t,n,r,o=this;return s(this,function(i){switch(i.label){case 0:return[4,(t=this.plugins[e]).deactivate()];case 1:return i.sent(),n=this.actives.indexOf(e),this.actives.splice(n,1),r=function(t){return"Plugin "+e+" is currently deactivated. "+t+". Activate "+e+" first"},t.call=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];throw new Error(r("It cannot call method "+t+" of plugin "+e+"."))},t.on=function(e,t){throw new Error(r("It cannot listen on event "+t+" of plugin "+e+"."))},t.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];throw new Error(r("It cannot emit the event "+e))},delete this.methods[e],delete this.events[e],Object.keys(this.listeners).forEach(function(t){o.listeners[t].forEach(function(n,r){n===e&&o.listeners[t].splice(r,1)})}),delete t.app,this.onDeactivated&&this.onDeactivated(t),[2]}})})},t}(function(){});t.PluginEngine=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(15))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(16)),r(n(17))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callEvent=function(e,t,n){return"["+e+"] "+t+"-"+n},t.listenEvent=function(e,t){return"["+e+"] "+t}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1)),r(n(2)),r(n(3)),r(n(4)),r(n(5)),r(n(6)),r(n(7)),r(n(25)),r(n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilerProfile={name:"compiler",methods:["compile","getCompilationResult"],events:["compilationFinished"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorProfile={name:"editor",methods:["discardHighlight","highlight"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filSystemProfile={name:"fs",methods:["getCurrentFile","getFile","getFolder","setFile","switchFile"],events:["currentFileChanged"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.networkProfile={name:"network",methods:["addNetwork","detectNetwork","getEndpoint","getNetworkProvider","removeNetwork"],events:["providerChanged"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.udappProfile={name:"udapp",methods:["createVMAccount","getAccounts","sendTransaction"],events:["newTransaction"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.themeProfile={name:"theme",methods:[],events:["themeChanged"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unitTestProfile={name:"unitTest",methods:["testFromPath","testFromSource"]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=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)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(3),u=n(2),s=n(4),a=n(5),c=n(6),l=n(7),f=n(8);t.remixApi=Object.freeze({solidity:r({},o.compilerProfile,{name:"solidity"}),fileManager:r({},i.filSystemProfile,{name:"fileManager"}),solidityUnitTesting:r({},l.unitTestProfile,{name:"solidityUnitTesting"}),editor:u.editorProfile,network:s.networkProfile,udapp:a.udappProfile,contentImport:f.contentImportProfile,theme:c.themeProfile}),t.remixProfiles=Object.freeze({solidity:r({},o.compilerProfile,{name:"solidity"}),fileManager:r({},i.filSystemProfile,{name:"fileManager"}),solidityUnitTesting:r({},l.unitTestProfile,{name:"solidityUnitTesting"}),editor:u.editorProfile,network:s.networkProfile,udapp:a.udappProfile,contentImport:f.contentImportProfile,theme:c.themeProfile})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentImportProfile={name:"contentImport",methods:["resolve"]}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(0)),r(n(28)),r(n(29)),r(n(30)),r(n(9))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this,t)||this;return n.profile=t,n.entities={},n}return o(t,e),t}(n(0).Plugin);t.HostPlugin=i},function(e,t,n){"use strict";var r,o=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||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)},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,s)}a((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,r,o,i,u={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(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}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])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n.profile=t,n.listener=["message",function(e){return n.getMessage(e)},!1],n.id=0,n.iframe=document.createElement("iframe"),n.pendingRequest={},n}return o(t,e),t.prototype.deactivate=function(){this.iframe.remove(),window.removeEventListener.apply(window,this.listener),e.prototype.deactivate.call(this)},t.prototype.callPluginMethod=function(e,t){var n=this;void 0===t&&(t=[]);var r=this.id++,o=this.currentRequest,i=this.name,u=new Promise(function(e,t){n.pendingRequest[r]=function(n,r){return r?t(r):e(n)}});return this.postMessage({id:r,action:"request",key:e,payload:t,requestInfo:o,name:i}),u},t.prototype.getMessage=function(e){return u(this,void 0,void 0,function(){var t,n,r,o,u,a,c,l,f=this;return s(this,function(s){switch(s.label){case 0:if(e.origin!==this.origin)return[2];switch((t=e.data).action){case"listen":return[3,1];case"notification":return[3,2];case"request":return[3,3];case"response":return[3,8]}return[3,9];case 1:return n=t.name,r=t.key,this.on(n,r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return f.postMessage({action:"notification",name:n,key:r,payload:e})}),[3,10];case 2:return t.payload?(this.emit.apply(this,[t.key].concat(t.payload)),[3,10]):[3,10];case 3:o="response",s.label=4;case 4:return s.trys.push([4,6,,7]),[4,this.call.apply(this,[t.name,t.key].concat(t.payload))];case 5:return c=s.sent(),l=void 0,this.postMessage(i({},t,{action:o,payload:c,error:l})),[3,7];case 6:return u=s.sent(),c=void 0,l=u.message,this.postMessage(i({},t,{action:o,payload:c,error:l})),[3,7];case 7:return[3,10];case 8:return a=t.id,c=t.payload,l=t.error,this.pendingRequest[a](c,l),delete this.pendingRequest[a],[3,10];case 9:throw new Error("Message should be a notification, request or response");case 10:return[2]}})})},t.prototype.postMessage=function(e){if(!this.source)throw new Error("No window attached to Iframe yet");this.source.postMessage(e,this.origin)},t.prototype.render=function(){var e=this;if(this.iframe.contentWindow)throw new Error(this.name+" plugin is already rendered");return this.iframe.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-top-navigation"),this.iframe.setAttribute("seamless","true"),this.iframe.src=this.profile.url,this.iframe.onload=function(){return u(e,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(!this.iframe.contentWindow)throw new Error(this.name+" plugin is cannot find url "+this.profile.url);return window.addEventListener.apply(window,this.listener),this.origin=new URL(this.iframe.src).origin,this.source=this.iframe.contentWindow,[4,this.callPluginMethod("handshake")];case 1:return(e=t.sent())&&(this.profile.methods=e),[2]}})})},this.iframe},t}(n(9).ViewPlugin);t.IframePlugin=a},function(e,t,n){"use strict";var r,o=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,s)}a((r=r.apply(e,t||[])).next())})},u=this&&this.__generator||function(e,t){var n,r,o,i,u={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(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}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])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0);function a(e){return!!e.location}t.isViewLibrary=a;var c=function(e){function t(t,n){var r=e.call(this,n)||this;if(r.library=t,r.profile=n,n.methods.forEach(function(e){if(!t[e])throw new Error("Method "+e+" is exposed by LibraryPlugin "+n.name+". But library doesn't expose this method")}),r.isView=a(n),r.isView&&!r.render)throw new Error("Profile "+n.name+" define the location "+n.location+', but method "render" is not implemented');return r}return o(t,e),t.prototype.activate=function(){return i(this,void 0,void 0,function(){var t=this;return u(this,function(n){switch(n.label){case 0:return this.isView?[4,this.call(this.profile.location,"addView",this.profile,this.render())]:[3,2];case 1:n.sent(),n.label=2;case 2:if(e.prototype.activate.call(this),this.profile.notifications){if(!this.library.events||!this.library.events.emit)throw new Error("Library of plugin "+this.name+" should listen on notifications.\n But doesn't expose the right interface (library.events.emit)");Object.keys(this.profile.notifications).forEach(function(e){t.profile.notifications[e].forEach(function(n){t.on(e,n,function(r){var o;return(o=t.library.events).emit.apply(o,["["+e+"] "+n].concat(r))})})})}if(this.profile.events){if(!this.library.events||!this.library.events.emit)throw new Error("Library of plugin "+this.name+" should emit events but doesn't expose the right interface (library.events.emit)");this.profile.events.forEach(function(e){t.library.events.on(e,function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.emit.apply(t,[e].concat(n))})})}return[2]}})})},t.prototype.deactivate=function(){this.isView&&this.call(this.profile.location,"removeView",this.profile),e.prototype.deactivate.call(this)},t.prototype.callPluginMethod=function(e,t){var n;if(!this.library[e])throw new Error("LibraryPlugin "+this.name+" doesn't expose method "+e);return(n=this.library)[e].apply(n,t)},t}(s.Plugin);t.LibraryPlugin=c}])}])}])}])}])}])}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.pluginEngine=t():e.pluginEngine=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=0)}([function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=10)}([function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.profile=e,this.requestQueue=[]}return Object.defineProperty(e.prototype,"name",{get:function(){return this.profile.name},enumerable:!0,configurable:!0}),e.prototype.activate=function(){this.onActivation&&this.onActivation()},e.prototype.deactivate=function(){this.onDeactivation&&this.onDeactivation()},e.prototype.callPluginMethod=function(e,t){if(!(e in this))throw new Error("Method "+e+" is not implemented by "+this.profile.name);return this[e].apply(this,t)},e.prototype.addRequest=function(e,t,n){var o=this;return new Promise(function(s,a){o.profile.methods&&o.profile.methods.includes(t)||a(new Error("Method "+t+" is not exposed by "+o.profile.name)),o.requestQueue.push(function(){return r(o,void 0,void 0,function(){var r,o;return i(this,function(i){switch(i.label){case 0:this.currentRequest=e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.callPluginMethod(t,n)];case 2:return r=i.sent(),s(r),[3,4];case 3:return o=i.sent(),a(o),[3,4];case 4:return delete this.currentRequest,this.requestQueue.shift(),0!==this.requestQueue.length&&this.requestQueue[0](),[2]}})})}),1===o.requestQueue.length&&o.requestQueue[0]()})},e.prototype.on=function(e,t,n){throw new Error('Method "on" from '+this.name+" should be hooked by PluginEngine")},e.prototype.call=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return r(this,void 0,void 0,function(){return i(this,function(e){throw new Error('Method "call" from '+this.name+" should be hooked by PluginEngine")})})},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];throw new Error('Method "emit" from '+this.name+" should be hooked by PluginEngine")},e}();t.Plugin=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(18))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(21))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(22))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(23))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(24))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(26))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);t.isView=function(e){return!!e.location};var u=function(e){function t(t){var n=e.call(this,t)||this;return n.profile=t,n}return i(t,e),t.prototype.activate=function(){return o(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.call(this.profile.location,"addView",this.profile,this.render())];case 1:return t.sent(),e.prototype.activate.call(this),[2]}})})},t.prototype.deactivate=function(){this.call(this.profile.location,"removeView",this.profile)},t}(a.Plugin);t.ViewPlugin=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(11))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(12)),r(n(30))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(13))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(14),c=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.plugins={},r.methods={},r.events={},r.listeners={},r.actives=[],r.settings=function(e){return o({autoActivate:!1,natives:[]},e)}(n),r.register(Object.keys(t).map(function(e){return t[e]})),r}return i(t,e),t.prototype.isRegistered=function(e){return!!this.plugins[e]},t.prototype.isActive=function(e){return!!this.actives.includes(e)},t.prototype.isNative=function(e){return!e.url||this.settings.natives.includes(e.name)},t.prototype.setSettings=function(e,t){var n;this.settings=o({},this.settings,"string"==typeof e?((n={})[e]=t,n):e)},t.prototype.register=function(e){var t=this;Array.isArray(e)?e.forEach(function(e){return t.registerOne(e)}):this.registerOne(e)},t.prototype.registerOne=function(e){if(!this.plugins[e.name]){if(!e.profile)throw new Error("Plugin "+e.name+" doesn't match the plugin interface");this.plugins[e.name]=e,this.onRegistration&&this.onRegistration(e),e.onRegistation&&e.onRegistation()}},t.prototype.activate=function(e){return s(this,void 0,void 0,function(){var t=this;return a(this,function(n){return[2,Array.isArray(e)?Promise.all(e.map(function(e){return t.activateOne(e)})):this.activateOne(e)]})})},t.prototype.activateOne=function(e){return s(this,void 0,void 0,function(){function t(t,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return s(this,void 0,void 0,function(){var o,s,u,c,l;return a(this,function(a){switch(a.label){case 0:if(!this.isRegistered(t))throw new Error("Cannot call "+t+" from "+e+", because "+t+" is not registered");return o=this.plugins[t],s=this.isNative(r.profile),!this.settings.permissionHandler||s?[3,2]:o.profile.permission?[4,this.settings.permissionHandler.askPermission(r.profile,o.profile)]:[3,2];case 1:if(!a.sent())throw new Error('Plugin "'+e+'" don\'t have permission to call method "'+n+'" of plugin "'+t+'"');a.label=2;case 2:if(!this.isActive(t)){if(!this.settings.autoActivate||!s)throw new Error("Cannot call "+t+" from "+e+", because "+t+" is not activated yet");this.settings.permissionHandler&&this.settings.permissionHandler.onActivation(r.profile,o.profile),this.activateOne(t)}if(!o.profile.methods.includes(n))throw u='Cannot call method "'+n+'" of "'+t+'" from "'+e+'", because "'+n+'" is not exposed.',c="Here is the list of exposed methods: "+o.profile.methods.map(function(e){return'"'+e+'"'}).join(","),new Error(u+" "+c);return l={from:e},[2,o.addRequest(l,n,i)]}})})}function n(t,n,r){var i=u.listenEvent(t,n);this.events[e][i]||(this.events[e][i]=r),this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].includes(e)||this.listeners[i].push(e)}var r,i,c=this;return a(this,function(s){switch(s.label){case 0:if(this.isActive(e))return[2];if(!this.isRegistered(e))throw new Error("Plugin "+e+" is not register yet. It cannot be activated");return r=this.plugins[e],this.actives.push(e),r.call=t.bind(this),this.events[e]={},r.on=n.bind(this),r.emit=function(t){for(var n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=u.listenEvent(e,t);this.listeners[o]&&(this.listeners[o]||[]).forEach(function(i){var s;if(!n.events[i][o])throw new Error("Plugin "+i+" should be listening on event "+t+" from "+e+". But no callback have been found");(s=n.events[i])[o].apply(s,r)})}.bind(this),i=Object.keys(this.plugins).reduce(function(e,r){var i;return o({},e,((i={})[r]=c.plugins[r].profile.methods.reduce(function(e,n){var i;return o({},e,((i={})[n]=t.bind(c,r,n),i))},{on:n.bind(c,r)}),i))},{}),r.app=Object.freeze(i),[4,r.activate()];case 1:return s.sent(),this.onActivated&&this.onActivated(r),[2]}})})},t.prototype.deactivate=function(e){return s(this,void 0,void 0,function(){var t=this;return a(this,function(n){return[2,Array.isArray(e)?Promise.all(e.map(function(e){return t.deactivateOne(e)})):this.deactivateOne(e)]})})},t.prototype.deactivateOne=function(e){return s(this,void 0,void 0,function(){var t,n,r,i=this;return a(this,function(o){switch(o.label){case 0:return[4,(t=this.plugins[e]).deactivate()];case 1:return o.sent(),n=this.actives.indexOf(e),this.actives.splice(n,1),r=function(t){return"Plugin "+e+" is currently deactivated. "+t+". Activate "+e+" first"},t.call=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];throw new Error(r("It cannot call method "+t+" of plugin "+e+"."))},t.on=function(e,t){throw new Error(r("It cannot listen on event "+t+" of plugin "+e+"."))},t.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];throw new Error(r("It cannot emit the event "+e))},delete this.methods[e],delete this.events[e],Object.keys(this.listeners).forEach(function(t){i.listeners[t].forEach(function(n,r){n===e&&i.listeners[t].splice(r,1)})}),delete t.app,this.onDeactivated&&this.onDeactivated(t),[2]}})})},t}(function(){});t.PluginEngine=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(15))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(16)),r(n(17)),r(n(27))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callEvent=function(e,t,n){return"["+e+"] "+t+"-"+n},t.listenEvent=function(e,t){return"["+e+"] "+t}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1)),r(n(2)),r(n(3)),r(n(4)),r(n(5)),r(n(6)),r(n(7)),r(n(25)),r(n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compilerProfile={name:"compiler",methods:["compile","getCompilationResult"],events:["compilationFinished"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorProfile={name:"editor",methods:["discardHighlight","highlight"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filSystemProfile={name:"fs",methods:["getCurrentFile","getFile","getFolder","setFile","switchFile"],events:["currentFileChanged"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.networkProfile={name:"network",methods:["addNetwork","detectNetwork","getEndpoint","getNetworkProvider","removeNetwork"],events:["providerChanged"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.udappProfile={name:"udapp",methods:["createVMAccount","getAccounts","sendTransaction"],events:["newTransaction"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.themeProfile={name:"theme",methods:[],events:["themeChanged"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unitTestProfile={name:"unitTest",methods:["testFromPath","testFromSource"]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(3),s=n(2),a=n(4),u=n(5),c=n(6),l=n(7),f=n(8);t.remixApi=Object.freeze({solidity:r({},i.compilerProfile,{name:"solidity"}),fileManager:r({},o.filSystemProfile,{name:"fileManager"}),solidityUnitTesting:r({},l.unitTestProfile,{name:"solidityUnitTesting"}),editor:s.editorProfile,network:a.networkProfile,udapp:u.udappProfile,contentImport:f.contentImportProfile,theme:c.themeProfile}),t.remixProfiles=Object.freeze({solidity:r({},i.compilerProfile,{name:"solidity"}),fileManager:r({},o.filSystemProfile,{name:"fileManager"}),solidityUnitTesting:r({},l.unitTestProfile,{name:"solidityUnitTesting"}),editor:s.editorProfile,network:a.networkProfile,udapp:u.udappProfile,contentImport:f.contentImportProfile,theme:c.themeProfile})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentImportProfile={name:"contentImport",methods:["resolve"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(28))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(29))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boxProfile={name:"box",methods:["login","isEnabled","getUserAddress","openSpace","closeSpace","isSpaceOpened","getSpacePrivateValue","setSpacePrivateValue","getSpacePublicValue","setSpacePublicValue","getSpacePublicData","getSpaceName"],events:["enabled","loggedIn","loggedOut","spaceClosed","spaceOpened"]}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(0)),r(n(31)),r(n(32)),r(n(33)),r(n(9))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.profile=t,n.entities={},n}return i(t,e),t}(n(0).Plugin);t.HostPlugin=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t){var n=e.call(this,t)||this;return n.profile=t,n.listener=["message",function(e){return n.getMessage(e)},!1],n.id=0,n.iframe=document.createElement("iframe"),n.pendingRequest={},n}return i(t,e),t.prototype.deactivate=function(){this.iframe.remove(),window.removeEventListener.apply(window,this.listener),e.prototype.deactivate.call(this)},t.prototype.callPluginMethod=function(e,t){var n=this;void 0===t&&(t=[]);var r=this.id++,i=this.currentRequest,o=this.name,s=new Promise(function(e,t){n.pendingRequest[r]=function(n,r){return r?t(r):e(n)}});return this.postMessage({id:r,action:"request",key:e,payload:t,requestInfo:i,name:o}),s},t.prototype.getMessage=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,s,u,c,l,f=this;return a(this,function(a){switch(a.label){case 0:if(e.origin!==this.origin)return[2];switch((t=e.data).action){case"listen":return[3,1];case"notification":return[3,2];case"request":return[3,3];case"response":return[3,8]}return[3,9];case 1:return n=t.name,r=t.key,this.on(n,r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return f.postMessage({action:"notification",name:n,key:r,payload:e})}),[3,10];case 2:return t.payload?(this.emit.apply(this,[t.key].concat(t.payload)),[3,10]):[3,10];case 3:i="response",a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.call.apply(this,[t.name,t.key].concat(t.payload))];case 5:return c=a.sent(),l=void 0,this.postMessage(o({},t,{action:i,payload:c,error:l})),[3,7];case 6:return s=a.sent(),c=void 0,l=s.message,this.postMessage(o({},t,{action:i,payload:c,error:l})),[3,7];case 7:return[3,10];case 8:return u=t.id,c=t.payload,l=t.error,this.pendingRequest[u](c,l),delete this.pendingRequest[u],[3,10];case 9:throw new Error("Message should be a notification, request or response");case 10:return[2]}})})},t.prototype.postMessage=function(e){if(!this.source)throw new Error("No window attached to Iframe yet");this.source.postMessage(e,this.origin)},t.prototype.render=function(){var e=this;if(this.iframe.contentWindow)throw new Error(this.name+" plugin is already rendered");return this.iframe.setAttribute("sandbox","allow-popups allow-scripts allow-same-origin allow-forms allow-top-navigation"),this.iframe.setAttribute("seamless","true"),this.iframe.src=this.profile.url,this.iframe.onload=function(){return s(e,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:if(!this.iframe.contentWindow)throw new Error(this.name+" plugin is cannot find url "+this.profile.url);return window.addEventListener.apply(window,this.listener),this.origin=new URL(this.iframe.src).origin,this.source=this.iframe.contentWindow,[4,this.callPluginMethod("handshake")];case 1:return(e=t.sent())&&(this.profile.methods=e),[2]}})})},this.iframe},t}(n(9).ViewPlugin);t.IframePlugin=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);function u(e){return!!e.location}t.isViewLibrary=u;var c=function(e){function t(t,n){var r=e.call(this,n)||this;if(r.library=t,r.profile=n,n.methods.forEach(function(e){if(!t[e])throw new Error("Method "+e+" is exposed by LibraryPlugin "+n.name+". But library doesn't expose this method")}),r.isView=u(n),r.isView&&!r.render)throw new Error("Profile "+n.name+" define the location "+n.location+', but method "render" is not implemented');return r}return i(t,e),t.prototype.activate=function(){return o(this,void 0,void 0,function(){var t=this;return s(this,function(n){switch(n.label){case 0:return this.isView?[4,this.call(this.profile.location,"addView",this.profile,this.render())]:[3,2];case 1:n.sent(),n.label=2;case 2:if(e.prototype.activate.call(this),this.profile.notifications){if(!this.library.events||!this.library.events.emit)throw new Error("Library of plugin "+this.name+" should listen on notifications.\n But doesn't expose the right interface (library.events.emit)");Object.keys(this.profile.notifications).forEach(function(e){t.profile.notifications[e].forEach(function(n){t.on(e,n,function(r){var i;return(i=t.library.events).emit.apply(i,["["+e+"] "+n].concat(r))})})})}if(this.profile.events){if(!this.library.events||!this.library.events.emit)throw new Error("Library of plugin "+this.name+" should emit events but doesn't expose the right interface (library.events.emit)");this.profile.events.forEach(function(e){t.library.events.on(e,function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.emit.apply(t,[e].concat(n))})})}return[2]}})})},t.prototype.deactivate=function(){this.isView&&this.call(this.profile.location,"removeView",this.profile),e.prototype.deactivate.call(this)},t.prototype.callPluginMethod=function(e,t){var n;if(!this.library[e])throw new Error("LibraryPlugin "+this.name+" doesn't expose method "+e);return(n=this.library)[e].apply(n,t)},t}(a.Plugin);t.LibraryPlugin=c}])}])});
export * from './event-name';
export * from './types';
export * from './api';
export * from './external-api';
{
"name": "@remixproject/engine",
"version": "0.1.11",
"version": "0.1.13",
"description": "Plugin Engine that power Remix IDE",

@@ -5,0 +5,0 @@ "contributors": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc