mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
35 lines
24 KiB
Diff
35 lines
24 KiB
Diff
diff --git a/node_modules/@lavamoat/snow/snow.js b/node_modules/@lavamoat/snow/snow.js
|
|
index 6458dcb..5a96ecd 100644
|
|
--- a/node_modules/@lavamoat/snow/snow.js
|
|
+++ b/node_modules/@lavamoat/snow/snow.js
|
|
@@ -369,7 +369,7 @@ function warn(msg, a, b) {
|
|
case WARN_OPEN_API_DISABLED:
|
|
const args = a,
|
|
win = b;
|
|
- bail = true;
|
|
+ bail = false;
|
|
console.warn('SNOW:', 'blocking open API call:', args, win, '.', '\n', 'if this prevents your application from running correctly, please visit/report at', 'https://github.com/LavaMoat/snow/issues/2#issuecomment-1239264255', '.');
|
|
break;
|
|
default:
|
|
diff --git a/node_modules/@lavamoat/snow/snow.prod.js b/node_modules/@lavamoat/snow/snow.prod.js
|
|
index 635efb0..daf1d55 100644
|
|
--- a/node_modules/@lavamoat/snow/snow.prod.js
|
|
+++ b/node_modules/@lavamoat/snow/snow.prod.js
|
|
@@ -1 +1 @@
|
|
-(function(){"use strict";(()=>{var e={586:(e,t,n)=>{const r=n(228),{getFramesArray:o,getFrameTag:i}=n(648),{getOnload:c,setOnload:a,removeAttribute:l,addEventListener:s}=n(14);function u(e,t,n){if(!i(t))return;s(t,"load",(function(){r(e,[this],n)}));const o=c(t);o&&(a(t,null),l(t,"onload"),a(t,o))}e.exports=function(e,t,n){for(let r=0;r<t.length;r++){const i=t[r],c=o(i,!0);for(let t=0;t<c.length;t++)u(e,c[t],n)}}},750:e=>{e.exports=function(e){e&&e.contentWindow}},228:(e,t,n)=>{const r=n(851),o=n(750),{shadows:i,getFramesArray:c,getFrameTag:a}=n(648),{getContentWindow:l,Object:s,getFrameElement:u}=n(14);function p(e,t){let n=-1;for(;e[++n];)if(!r(e[n],e,s)&&u(e[n])===t)return e[n];for(let e=0;e<i.length;e++){const n=i[e],r=c(n,!1);for(let e=0;e<r.length;e++)if(r[e]===t)return l(r[e],a(r[e]))}return null}e.exports=function(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];o(i);const c=p(e,i);c&&n(c)}}},328:(e,t,n)=>{const{getFramesArray:r}=n(648),{removeAttribute:o,getAttribute:i,getTemplateContent:c,createElement:a,getInnerHTML:l,setInnerHTML:s}=n(14),{warn:u,WARN_IFRAME_ONLOAD_ATTRIBUTE_REMOVED:p}=n(312);function m(e){for(let t=0;t<e.length;t++){const n=e[t],r=i(n,"onload");r&&(u(p,n,r),o(n,"onload"))}}e.exports=function(e,t){for(let e=0;e<t.length;e++){const n=t[e],o=a(document,"template");s(o,n);const i=r(c(o),!1);i.length&&(m(i),t[e]=l(o))}}},352:(e,t,n)=>{const r=n(228),o=n(583),i=n(459),c=n(58),{hookShadowDOM:a}=n(373),{securely:l,addEventListener:s,getFrameElement:u}=n(14),{isMarked:p,mark:m}=n(111),{error:d,ERR_MARK_NEW_WINDOW_FAILED:f}=n(312);function g(e){try{const t=!p(e);return t&&m(e),t}catch(t){d(f,e,t)}return g(e)}function E(e,t){g(t)&&function(e,t,n,r){o(e,t),i(e,t),c(e,t),a(e,t),r(e,n)}(t,(function(n){E(e,n),s(u(n),"load",(function(){r(t,[this],(function(){E(e,n)}))}))}),l,e)}let y=!1;e.exports=function(e,t){y||(y=!0,E(e,t||window))}},58:(e,t,n)=>{const{protectShadows:r}=n(373),o=n(586),{getFramesArray:i,shadows:c}=n(648),{getParentElement:a,slice:l,Object:s,Function:u}=n(14),p=n(328),m=n(228),d={DocumentFragment:["replaceChildren","append","prepend"],Document:["replaceChildren","append","prepend","write","writeln"],Node:["appendChild","insertBefore","replaceChild"],Element:["innerHTML","outerHTML","insertAdjacentHTML","replaceWith","insertAdjacentElement","append","before","prepend","after","replaceChildren"],ShadowRoot:["innerHTML"],HTMLIFrameElement:["srcdoc"]};function f(e,t,n){return function(){const s=l(arguments),d=a(this)||this;o(e,s,n),o(e,c,n),p(e,s),p(e,c);const f=u.prototype.apply.call(t,this,s),g=i(d,!1);return m(e,g,n),m(e,s,n),r(e,n,!0),f}}e.exports=function(e,t){for(const n in d){const r=d[n];for(let o=0;o<r.length;o++){const i=r[o],c=s.getOwnPropertyDescriptor(e[n].prototype,i),a=c.set?"set":"value";c[a]=f(e,c[a],t),s.defineProperty(e[n].prototype,i,c)}}}},459:(e,t,n)=>{const r=n(228),{removeEventListener:o,addEventListener:i,slice:c,Map:a,Object:l}=n(14),s=new a;function u(e,t,n){if(t)return t.handleEvent?t.handleEvent.apply(t,n):t.apply(e,n)}function p(e,t){return function(n,o,a){let l=o;return"load"===n&&(s.has(o)||s.set(o,(function(){r(e,[this],t);const n=c(arguments);u(this,o,n)})),l=s.get(o)),i(this,n,l,a)}}e.exports=function(e,t){l.defineProperty(e.EventTarget.prototype,"addEventListener",{value:p(e,t)}),l.defineProperty(e.EventTarget.prototype,"removeEventListener",{value:function(e,t,n){let r=t;return"load"===e&&(r=s.get(t),s.delete(t)),o(this,e,r,n)}})}},312:e=>{e.exports={warn:function(e,t,n){let r;switch(e){case 1:const e=t,o=n;r=!1,console.warn("SNOW:","removing html string iframe onload attribute:",e,`"${o}"`,".","\n","if this prevents your application from running correctly, please visit/report at","https://github.com/LavaMoat/snow/issues/32#issuecomment-1239273328",".");break;case 3:const i=t,c=n;r=!0,console.warn("SNOW:","blocking open API call:",i,c,".","\n","if this prevents your application from running correctly, please visit/report at","https://github.com/LavaMoat/snow/issues/2#issuecomment-1239264255",".")}return r},error:function(e,t,n){let r;if(2===e){const e=t,o=n;r=!0,console.error("SNOW:","failed to mark new window:",e,".","\n","if this prevents your application from running correctly, please visit/report at","https://github.com/LavaMoat/snow/issues/33#issuecomment-1239280063",".","\n","in order to maintain a bulletproof defense mechanism, failing to mark a new window typically causes an infinite loop",".","\n","error caught:","\n",o)}return r},WARN_IFRAME_ONLOAD_ATTRIBUTE_REMOVED:1,ERR_MARK_NEW_WINDOW_FAILED:2,WARN_OPEN_API_DISABLED:3}},111:(e,t,n)=>{const{Map:r,Object:o,Array:i}=n(14),c=(Math.random()+1).toString(36).substring(7),a=new r;e.exports={isMarked:function(e){if(!a.has(e))return!1;const t=o.getOwnPropertyDescriptor(e,"SNOW_ID");if(!t||!o.hasOwnProperty.call(t,"value"))return!1;if("function"!=typeof t.value)return!1;const n=a.get(e);return t.value(c)===n},mark:function(e){const t=new i;o.defineProperty(e,"SNOW_ID",{configurable:!1,writable:!1,value:e=>e===c&&t}),a.set(e,t)}}},14:e=>{e.exports=function(e){const t=function(e){return function(e,t){const n=e.document.createElement("iframe");e.document.head.appendChild(n);const r=function(e){const{JSON:t,Attr:n,String:r,Function:o,Map:i,Node:c,Document:a,DocumentFragment:l,ShadowRoot:s,Object:u,Array:p,Element:m,HTMLElement:d,HTMLTemplateElement:f,EventTarget:g,HTMLIFrameElement:E,HTMLFrameElement:y,HTMLObjectElement:w}=e,O={JSON:t,Attr:n,String:r,Function:o,Map:i,Node:c,Document:a,DocumentFragment:l,ShadowRoot:s,Object:u,Array:p,Element:m,HTMLElement:d,HTMLTemplateElement:f,EventTarget:g,HTMLIFrameElement:E,HTMLFrameElement:y,HTMLObjectElement:w};return O.document={createElement:e.document.createElement},O}(n.contentWindow);return n.parentElement.removeChild(n),r}(e)}(e),{Function:n,Map:r,Node:o,Document:i,DocumentFragment:c,ShadowRoot:a,Object:l,Array:s,Element:u,HTMLElement:p,HTMLTemplateElement:m,EventTarget:d,HTMLIFrameElement:f,HTMLFrameElement:g,HTMLObjectElement:E}=t;return l.assign(t,{iframeContentWindow:l.getOwnPropertyDescriptor(f.prototype,"contentWindow").get,frameContentWindow:l.getOwnPropertyDescriptor(g.prototype,"contentWindow").get,objectContentWindow:l.getOwnPropertyDescriptor(E.prototype,"contentWindow").get,createElement:l.getOwnPropertyDescriptor(i.prototype,"createElement").value,slice:l.getOwnPropertyDescriptor(s.prototype,"slice").value,nodeType:l.getOwnPropertyDescriptor(o.prototype,"nodeType").get,tagName:l.getOwnPropertyDescriptor(u.prototype,"tagName").get,getInnerHTML:l.getOwnPropertyDescriptor(u.prototype,"innerHTML").get,setInnerHTML:l.getOwnPropertyDescriptor(u.prototype,"innerHTML").set,toString:l.getOwnPropertyDescriptor(l.prototype,"toString").value,getOnload:l.getOwnPropertyDescriptor(p.prototype,"onload").get,setOnload:l.getOwnPropertyDescriptor(p.prototype,"onload").set,getAttribute:l.getOwnPropertyDescriptor(u.prototype,"getAttribute").value,removeAttribute:l.getOwnPropertyDescriptor(u.prototype,"removeAttribute").value,addEventListener:l.getOwnPropertyDescriptor(d.prototype,"addEventListener").value,removeEventListener:l.getOwnPropertyDescriptor(d.prototype,"removeEventListener").value,getTemplateContent:l.getOwnPropertyDescriptor(m.prototype,"content").get,getFrameElement:l.getOwnPropertyDescriptor(e,"frameElement").get,getParentElement:l.getOwnPropertyDescriptor(o.prototype,"parentElement").get}),{Object:l,Function:n,Node:o,Element:u,Document:i,DocumentFragment:c,ShadowRoot:a,Array:s,Map:r,getContentWindow:function(e,n){switch(n){case"IFRAME":return t.iframeContentWindow.call(e);case"FRAME":return t.frameContentWindow.call(e);case"OBJECT":return t.objectContentWindow.call(e);default:return null}},parse:function(e,n){return t.JSON.parse(e,n)},stringify:function(e,n,r){return t.JSON.stringify(e,n,r)},slice:function(e,n,r){return t.slice.call(e,n,r)},nodeType:function(e){return t.nodeType.call(e)},tagName:function(e){return t.tagName.call(e)},toString:function(e){return t.toString.call(e)},getOnload:function(e){return t.getOnload.call(e)},setOnload:function(e,n){return t.setOnload.call(e,n)},removeAttribute:function(e,n){return t.removeAttribute.call(e,n)},getAttribute:function(e,n){return t.getAttribute.call(e,n)},addEventListener:function(e,n,r,o){return t.addEventListener.call(e,n,r,o)},removeEventListener:function(e,n,r,o){return t.removeEventListener.call(e,n,r,o)},createElement:function(e,n,r){return t.createElement.call(e,n,r)},getInnerHTML:function(e){return t.getInnerHTML.call(e)},setInnerHTML:function(e,n){return t.setInnerHTML.call(e,n)},getTemplateContent:function(e){return t.getTemplateContent.call(e)},getFrameElement:function(e){return t.Function.prototype.call.call(t.getFrameElement,e)},getParentElement:function(e){return t.getParentElement.call(e)}}}(top)},583:(e,t,n)=>{const{slice:r,Function:o}=n(14),{warn:i,WARN_OPEN_API_DISABLED:c}=n(312);e.exports=function(e,t){const n=e.open;e.open=function(){const a=r(arguments),l=i(c,a,e);if(l)return null;const s=o.prototype.apply.call(n,this,a);return t(s),s}}},373:(e,t,n)=>{const r=n(228),{getFramesArray:o,shadows:i}=n(648),{Object:c,Function:a}=n(14);function l(e,t,n){for(let c=0;c<i.length;c++){const a=i[c];if(n&&!a.isConnected)continue;const l=o(a,!1);r(e,l,t)}}e.exports={hookShadowDOM:function(e,t){const n=c.getOwnPropertyDescriptor(e.Element.prototype,"attachShadow"),r=n.value;n.value=function(e,t,n){return function(r){const o=a.prototype.call.call(t,this,r);return i.push(o),l(e,n,!0),o}}(e,r,t),c.defineProperty(e.Element.prototype,"attachShadow",n)},protectShadows:l}},648:(e,t,n)=>{const{tagName:r,nodeType:o,slice:i,Array:c,parse:a,stringify:l,Node:s,Document:u,DocumentFragment:p,Element:m,ShadowRoot:d}=n(14),f=new c;function g(e){return f.includes(e)}function E(e,t){let n=!1;for(let r=0;r<t.length;r++)e.includes(t[r])||(e.push(t[r]),n=!0);return n}e.exports={getFramesArray:function(e,t){const n=new c;if(null===e||"object"!=typeof e)return n;if("string"==typeof a(l(r=e,((e,t)=>e||r!==t?"":t)))||!function(e){if(g(e))return!0;const t=o(e);return t===m.prototype.ELEMENT_NODE||t===m.prototype.DOCUMENT_FRAGMENT_NODE||t===m.prototype.DOCUMENT_NODE}(e))return n;var r;const f=function(e){if(g(e))return d;switch(o(e)){case s.prototype.DOCUMENT_NODE:return u;case s.prototype.DOCUMENT_FRAGMENT_NODE:return p;default:return m}}(e).prototype.querySelectorAll,y=f.call(e,"iframe,frame,object,embed");return E(n,i(y)),t&&E(n,[e]),n},getFrameTag:function(e){if(!e||"object"!=typeof e)return null;if(o(e)!==m.prototype.ELEMENT_NODE)return null;if(g(e))return null;const t=r(e);return"IFRAME"!==t&&"FRAME"!==t&&"OBJECT"!==t&&"EMBED"!==t?null:t},shadows:f}},626:e=>{e.exports={SRC_IS_NOT_A_WINDOW:'provided argument "src" must be a proper window of instance Window',DST_IS_NOT_A_WINDOW:'provided argument "dst" must be a proper window of instance Window',SRC_IS_NOT_SAME_ORIGIN_AS_WINDOW:'provided argument "src" must be a window in the same origin as the current context window'}},851:(e,t,n)=>{const{DST_IS_NOT_A_WINDOW:r,SRC_IS_NOT_A_WINDOW:o,SRC_IS_NOT_SAME_ORIGIN_AS_WINDOW:i}=n(626);function c(e,t){const n=t(e);return n===n.window}function a(e,t,n){return null===n.getPrototypeOf.call(t,e)}e.exports=function(e,t=window,n=window.Object){if(!c(t,n))throw new Error(o);if(!c(e,n))throw new Error(r);if(a(window,t,n))throw new Error(i);return a(e,t,n)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t=n(352),r=n.n(t);e=window,Object.defineProperty(e,"SNOW",{value:r()})})()})();}())
|
|
\ No newline at end of file
|
|
+(function(){"use strict";(()=>{var e={586:(e,t,n)=>{const r=n(228),{getFramesArray:o,getFrameTag:i}=n(648),{getOnload:c,setOnload:a,removeAttribute:l,addEventListener:s}=n(14);function u(e,t,n){if(!i(t))return;s(t,"load",(function(){r(e,[this],n)}));const o=c(t);o&&(a(t,null),l(t,"onload"),a(t,o))}e.exports=function(e,t,n){for(let r=0;r<t.length;r++){const i=t[r],c=o(i,!0);for(let t=0;t<c.length;t++)u(e,c[t],n)}}},750:e=>{e.exports=function(e){e&&e.contentWindow}},228:(e,t,n)=>{const r=n(851),o=n(750),{shadows:i,getFramesArray:c,getFrameTag:a}=n(648),{getContentWindow:l,Object:s,getFrameElement:u}=n(14);function p(e,t){let n=-1;for(;e[++n];)if(!r(e[n],e,s)&&u(e[n])===t)return e[n];for(let e=0;e<i.length;e++){const n=i[e],r=c(n,!1);for(let e=0;e<r.length;e++)if(r[e]===t)return l(r[e],a(r[e]))}return null}e.exports=function(e,t,n){for(let r=0;r<t.length;r++){const i=t[r];o(i);const c=p(e,i);c&&n(c)}}},328:(e,t,n)=>{const{getFramesArray:r}=n(648),{removeAttribute:o,getAttribute:i,getTemplateContent:c,createElement:a,getInnerHTML:l,setInnerHTML:s}=n(14),{warn:u,WARN_IFRAME_ONLOAD_ATTRIBUTE_REMOVED:p}=n(312);function m(e){for(let t=0;t<e.length;t++){const n=e[t],r=i(n,"onload");r&&(u(p,n,r),o(n,"onload"))}}e.exports=function(e,t){for(let e=0;e<t.length;e++){const n=t[e],o=a(document,"template");s(o,n);const i=r(c(o),!1);i.length&&(m(i),t[e]=l(o))}}},352:(e,t,n)=>{const r=n(228),o=n(583),i=n(459),c=n(58),{hookShadowDOM:a}=n(373),{securely:l,addEventListener:s,getFrameElement:u}=n(14),{isMarked:p,mark:m}=n(111),{error:d,ERR_MARK_NEW_WINDOW_FAILED:f}=n(312);function g(e){try{const t=!p(e);return t&&m(e),t}catch(t){d(f,e,t)}return g(e)}function E(e,t){g(t)&&function(e,t,n,r){o(e,t),i(e,t),c(e,t),a(e,t),r(e,n)}(t,(function(n){E(e,n),s(u(n),"load",(function(){r(t,[this],(function(){E(e,n)}))}))}),l,e)}let y=!1;e.exports=function(e,t){y||(y=!0,E(e,t||window))}},58:(e,t,n)=>{const{protectShadows:r}=n(373),o=n(586),{getFramesArray:i,shadows:c}=n(648),{getParentElement:a,slice:l,Object:s,Function:u}=n(14),p=n(328),m=n(228),d={DocumentFragment:["replaceChildren","append","prepend"],Document:["replaceChildren","append","prepend","write","writeln"],Node:["appendChild","insertBefore","replaceChild"],Element:["innerHTML","outerHTML","insertAdjacentHTML","replaceWith","insertAdjacentElement","append","before","prepend","after","replaceChildren"],ShadowRoot:["innerHTML"],HTMLIFrameElement:["srcdoc"]};function f(e,t,n){return function(){const s=l(arguments),d=a(this)||this;o(e,s,n),o(e,c,n),p(e,s),p(e,c);const f=u.prototype.apply.call(t,this,s),g=i(d,!1);return m(e,g,n),m(e,s,n),r(e,n,!0),f}}e.exports=function(e,t){for(const n in d){const r=d[n];for(let o=0;o<r.length;o++){const i=r[o],c=s.getOwnPropertyDescriptor(e[n].prototype,i),a=c.set?"set":"value";c[a]=f(e,c[a],t),s.defineProperty(e[n].prototype,i,c)}}}},459:(e,t,n)=>{const r=n(228),{removeEventListener:o,addEventListener:i,slice:c,Map:a,Object:l}=n(14),s=new a;function u(e,t,n){if(t)return t.handleEvent?t.handleEvent.apply(t,n):t.apply(e,n)}function p(e,t){return function(n,o,a){let l=o;return"load"===n&&(s.has(o)||s.set(o,(function(){r(e,[this],t);const n=c(arguments);u(this,o,n)})),l=s.get(o)),i(this,n,l,a)}}e.exports=function(e,t){l.defineProperty(e.EventTarget.prototype,"addEventListener",{value:p(e,t)}),l.defineProperty(e.EventTarget.prototype,"removeEventListener",{value:function(e,t,n){let r=t;return"load"===e&&(r=s.get(t),s.delete(t)),o(this,e,r,n)}})}},312:e=>{e.exports={warn:function(e,t,n){let r;switch(e){case 1:const e=t,o=n;r=!1,console.warn("SNOW:","removing html string iframe onload attribute:",e,`"${o}"`,".","\n","if this prevents your application from running correctly, please visit/report at","https://github.com/LavaMoat/snow/issues/32#issuecomment-1239273328",".");break;case 3:const i=t,c=n;r=!1,console.warn("SNOW:","blocking open API call:",i,c,".","\n","if this prevents your application from running correctly, please visit/report at","https://github.com/LavaMoat/snow/issues/2#issuecomment-1239264255",".")}return r},error:function(e,t,n){let r;if(2===e){const e=t,o=n;r=!0,console.error("SNOW:","failed to mark new window:",e,".","\n","if this prevents your application from running correctly, please visit/report at","https://github.com/LavaMoat/snow/issues/33#issuecomment-1239280063",".","\n","in order to maintain a bulletproof defense mechanism, failing to mark a new window typically causes an infinite loop",".","\n","error caught:","\n",o)}return r},WARN_IFRAME_ONLOAD_ATTRIBUTE_REMOVED:1,ERR_MARK_NEW_WINDOW_FAILED:2,WARN_OPEN_API_DISABLED:3}},111:(e,t,n)=>{const{Map:r,Object:o,Array:i}=n(14),c=(Math.random()+1).toString(36).substring(7),a=new r;e.exports={isMarked:function(e){if(!a.has(e))return!1;const t=o.getOwnPropertyDescriptor(e,"SNOW_ID");if(!t||!o.hasOwnProperty.call(t,"value"))return!1;if("function"!=typeof t.value)return!1;const n=a.get(e);return t.value(c)===n},mark:function(e){const t=new i;o.defineProperty(e,"SNOW_ID",{configurable:!1,writable:!1,value:e=>e===c&&t}),a.set(e,t)}}},14:e=>{e.exports=function(e){const t=function(e){return function(e,t){const n=e.document.createElement("iframe");e.document.head.appendChild(n);const r=function(e){const{JSON:t,Attr:n,String:r,Function:o,Map:i,Node:c,Document:a,DocumentFragment:l,ShadowRoot:s,Object:u,Array:p,Element:m,HTMLElement:d,HTMLTemplateElement:f,EventTarget:g,HTMLIFrameElement:E,HTMLFrameElement:y,HTMLObjectElement:w}=e,O={JSON:t,Attr:n,String:r,Function:o,Map:i,Node:c,Document:a,DocumentFragment:l,ShadowRoot:s,Object:u,Array:p,Element:m,HTMLElement:d,HTMLTemplateElement:f,EventTarget:g,HTMLIFrameElement:E,HTMLFrameElement:y,HTMLObjectElement:w};return O.document={createElement:e.document.createElement},O}(n.contentWindow);return n.parentElement.removeChild(n),r}(e)}(e),{Function:n,Map:r,Node:o,Document:i,DocumentFragment:c,ShadowRoot:a,Object:l,Array:s,Element:u,HTMLElement:p,HTMLTemplateElement:m,EventTarget:d,HTMLIFrameElement:f,HTMLFrameElement:g,HTMLObjectElement:E}=t;return l.assign(t,{iframeContentWindow:l.getOwnPropertyDescriptor(f.prototype,"contentWindow").get,frameContentWindow:l.getOwnPropertyDescriptor(g.prototype,"contentWindow").get,objectContentWindow:l.getOwnPropertyDescriptor(E.prototype,"contentWindow").get,createElement:l.getOwnPropertyDescriptor(i.prototype,"createElement").value,slice:l.getOwnPropertyDescriptor(s.prototype,"slice").value,nodeType:l.getOwnPropertyDescriptor(o.prototype,"nodeType").get,tagName:l.getOwnPropertyDescriptor(u.prototype,"tagName").get,getInnerHTML:l.getOwnPropertyDescriptor(u.prototype,"innerHTML").get,setInnerHTML:l.getOwnPropertyDescriptor(u.prototype,"innerHTML").set,toString:l.getOwnPropertyDescriptor(l.prototype,"toString").value,getOnload:l.getOwnPropertyDescriptor(p.prototype,"onload").get,setOnload:l.getOwnPropertyDescriptor(p.prototype,"onload").set,getAttribute:l.getOwnPropertyDescriptor(u.prototype,"getAttribute").value,removeAttribute:l.getOwnPropertyDescriptor(u.prototype,"removeAttribute").value,addEventListener:l.getOwnPropertyDescriptor(d.prototype,"addEventListener").value,removeEventListener:l.getOwnPropertyDescriptor(d.prototype,"removeEventListener").value,getTemplateContent:l.getOwnPropertyDescriptor(m.prototype,"content").get,getFrameElement:l.getOwnPropertyDescriptor(e,"frameElement").get,getParentElement:l.getOwnPropertyDescriptor(o.prototype,"parentElement").get}),{Object:l,Function:n,Node:o,Element:u,Document:i,DocumentFragment:c,ShadowRoot:a,Array:s,Map:r,getContentWindow:function(e,n){switch(n){case"IFRAME":return t.iframeContentWindow.call(e);case"FRAME":return t.frameContentWindow.call(e);case"OBJECT":return t.objectContentWindow.call(e);default:return null}},parse:function(e,n){return t.JSON.parse(e,n)},stringify:function(e,n,r){return t.JSON.stringify(e,n,r)},slice:function(e,n,r){return t.slice.call(e,n,r)},nodeType:function(e){return t.nodeType.call(e)},tagName:function(e){return t.tagName.call(e)},toString:function(e){return t.toString.call(e)},getOnload:function(e){return t.getOnload.call(e)},setOnload:function(e,n){return t.setOnload.call(e,n)},removeAttribute:function(e,n){return t.removeAttribute.call(e,n)},getAttribute:function(e,n){return t.getAttribute.call(e,n)},addEventListener:function(e,n,r,o){return t.addEventListener.call(e,n,r,o)},removeEventListener:function(e,n,r,o){return t.removeEventListener.call(e,n,r,o)},createElement:function(e,n,r){return t.createElement.call(e,n,r)},getInnerHTML:function(e){return t.getInnerHTML.call(e)},setInnerHTML:function(e,n){return t.setInnerHTML.call(e,n)},getTemplateContent:function(e){return t.getTemplateContent.call(e)},getFrameElement:function(e){return t.Function.prototype.call.call(t.getFrameElement,e)},getParentElement:function(e){return t.getParentElement.call(e)}}}(top)},583:(e,t,n)=>{const{slice:r,Function:o}=n(14),{warn:i,WARN_OPEN_API_DISABLED:c}=n(312);e.exports=function(e,t){const n=e.open;e.open=function(){const a=r(arguments),l=i(c,a,e);if(l)return null;const s=o.prototype.apply.call(n,this,a);return t(s),s}}},373:(e,t,n)=>{const r=n(228),{getFramesArray:o,shadows:i}=n(648),{Object:c,Function:a}=n(14);function l(e,t,n){for(let c=0;c<i.length;c++){const a=i[c];if(n&&!a.isConnected)continue;const l=o(a,!1);r(e,l,t)}}e.exports={hookShadowDOM:function(e,t){const n=c.getOwnPropertyDescriptor(e.Element.prototype,"attachShadow"),r=n.value;n.value=function(e,t,n){return function(r){const o=a.prototype.call.call(t,this,r);return i.push(o),l(e,n,!0),o}}(e,r,t),c.defineProperty(e.Element.prototype,"attachShadow",n)},protectShadows:l}},648:(e,t,n)=>{const{tagName:r,nodeType:o,slice:i,Array:c,parse:a,stringify:l,Node:s,Document:u,DocumentFragment:p,Element:m,ShadowRoot:d}=n(14),f=new c;function g(e){return f.includes(e)}function E(e,t){let n=!1;for(let r=0;r<t.length;r++)e.includes(t[r])||(e.push(t[r]),n=!0);return n}e.exports={getFramesArray:function(e,t){const n=new c;if(null===e||"object"!=typeof e)return n;if("string"==typeof a(l(r=e,((e,t)=>e||r!==t?"":t)))||!function(e){if(g(e))return!0;const t=o(e);return t===m.prototype.ELEMENT_NODE||t===m.prototype.DOCUMENT_FRAGMENT_NODE||t===m.prototype.DOCUMENT_NODE}(e))return n;var r;const f=function(e){if(g(e))return d;switch(o(e)){case s.prototype.DOCUMENT_NODE:return u;case s.prototype.DOCUMENT_FRAGMENT_NODE:return p;default:return m}}(e).prototype.querySelectorAll,y=f.call(e,"iframe,frame,object,embed");return E(n,i(y)),t&&E(n,[e]),n},getFrameTag:function(e){if(!e||"object"!=typeof e)return null;if(o(e)!==m.prototype.ELEMENT_NODE)return null;if(g(e))return null;const t=r(e);return"IFRAME"!==t&&"FRAME"!==t&&"OBJECT"!==t&&"EMBED"!==t?null:t},shadows:f}},626:e=>{e.exports={SRC_IS_NOT_A_WINDOW:'provided argument "src" must be a proper window of instance Window',DST_IS_NOT_A_WINDOW:'provided argument "dst" must be a proper window of instance Window',SRC_IS_NOT_SAME_ORIGIN_AS_WINDOW:'provided argument "src" must be a window in the same origin as the current context window'}},851:(e,t,n)=>{const{DST_IS_NOT_A_WINDOW:r,SRC_IS_NOT_A_WINDOW:o,SRC_IS_NOT_SAME_ORIGIN_AS_WINDOW:i}=n(626);function c(e,t){const n=t(e);return n===n.window}function a(e,t,n){return null===n.getPrototypeOf.call(t,e)}e.exports=function(e,t=window,n=window.Object){if(!c(t,n))throw new Error(o);if(!c(e,n))throw new Error(r);if(a(window,t,n))throw new Error(i);return a(e,t,n)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t=n(352),r=n.n(t);e=window,Object.defineProperty(e,"SNOW",{value:r()})})()})();}())
|
|
diff --git a/node_modules/@lavamoat/snow/src/log.js b/node_modules/@lavamoat/snow/src/log.js
|
|
index 45e599c..093a852 100644
|
|
--- a/node_modules/@lavamoat/snow/src/log.js
|
|
+++ b/node_modules/@lavamoat/snow/src/log.js
|
|
@@ -16,7 +16,7 @@ function warn(msg, a, b) {
|
|
break;
|
|
case WARN_OPEN_API_DISABLED:
|
|
const args = a, win = b;
|
|
- bail = true;
|
|
+ bail = false;
|
|
console.warn('SNOW:',
|
|
'blocking open API call:', args, win, '.', '\n',
|
|
'if this prevents your application from running correctly, please visit/report at',
|