New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

post-robot

Package Overview
Dependencies
Maintainers
2
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

post-robot - npm Package Compare versions

Comparing version 10.0.35 to 10.0.36

15

dist/module/serialize/window.js

@@ -44,7 +44,16 @@ "use strict";

});
const windowTypePromise = winPromise.then(window => {
if (!(0, _src.isWindowClosed)(window)) {
return (0, _src.getOpener)(window) ? _src.WINDOW_TYPE.POPUP : _src.WINDOW_TYPE.IFRAME;
} else {
throw new Error(`Window is closed, can not determine type`);
}
});
windowNamePromise.catch(_src3.noop);
windowTypePromise.catch(_src3.noop);
return {
id,
getType: () => winPromise.then(win => {
return (0, _src.getOpener)(win) ? _src.WINDOW_TYPE.POPUP : _src.WINDOW_TYPE.IFRAME;
}),
getType: () => {
return windowTypePromise;
},
getInstanceID: (0, _src3.memoizePromise)(() => winPromise.then(win => (0, _lib.getWindowInstanceID)(win, {

@@ -51,0 +60,0 @@ send

2

dist/post-robot.ie.min.js

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

!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("postRobot",[],e):"object"==typeof exports?exports.postRobot=e():n.postRobot=e()}("undefined"!=typeof self?self:this,(function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)r.d(t,o,function(e){return n[e]}.bind(null,o));return t},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return{}.hasOwnProperty.call(n,e)},r.p="",r(r.s=0)}([function(n,e,r){"use strict";function t(n){return"[object RegExp]"==={}.toString.call(n)}r.r(e),r.d(e,"Promise",(function(){return L})),r.d(e,"TYPES",(function(){return ae})),r.d(e,"ProxyWindow",(function(){return Dn})),r.d(e,"setup",(function(){return te})),r.d(e,"destroy",(function(){return oe})),r.d(e,"serializeMessage",(function(){return $n})),r.d(e,"deserializeMessage",(function(){return ne})),r.d(e,"createProxyWindow",(function(){return ee})),r.d(e,"toProxyWindow",(function(){return re})),r.d(e,"on",(function(){return Qn})),r.d(e,"once",(function(){return Vn})),r.d(e,"send",(function(){return Xn})),r.d(e,"markWindowKnown",(function(){return dn})),r.d(e,"cleanUpWindow",(function(){return se})),r.d(e,"bridge",(function(){return ie}));var o="Call was rejected by callee.\r\n";function i(n){return void 0===n&&(n=window),"about:"===n.location.protocol}function a(n){if(void 0===n&&(n=window),n)try{if(n.parent&&n.parent!==n)return n.parent}catch(n){}}function s(n){if(void 0===n&&(n=window),n&&!a(n))try{return n.opener}catch(n){}}function u(n){try{return!0}catch(n){}return!1}function c(n){void 0===n&&(n=window);var e=n.location;if(!e)throw new Error("Can not read window location");var r=e.protocol;if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var t=a(n);return t&&u()?c(t):"about://"}var o=e.host;if(!o)throw new Error("Can not read window host");return r+"//"+o}function f(n){void 0===n&&(n=window);var e=c(n);return e&&n.mockDomain&&0===n.mockDomain.indexOf("mock:")?n.mockDomain:e}function d(n){if(!function(n){try{if(n===window)return!0}catch(n){}try{var e=Object.getOwnPropertyDescriptor(n,"location");if(e&&!1===e.enumerable)return!1}catch(n){}try{if(i(n)&&u())return!0}catch(n){}try{if(c(n)===c(window))return!0}catch(n){}return!1}(n))return!1;try{if(n===window)return!0;if(i(n)&&u())return!0;if(f(window)===f(n))return!0}catch(n){}return!1}function w(n){if(!d(n))throw new Error("Expected window to be same domain");return n}function l(n,e){if(!n||!e)return!1;var r=a(e);return r?r===n:-1!==function(n){var e=[];try{for(;n.parent!==n;)e.push(n.parent),n=n.parent}catch(n){}return e}(e).indexOf(n)}function h(n){var e,r,t=[];try{e=n.frames}catch(r){e=n}try{r=e.length}catch(n){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=e[o]}catch(n){continue}t.push(i)}return t}for(var a=0;a<100;a++){var s=void 0;try{s=e[a]}catch(n){return t}if(!s)return t;t.push(s)}return t}function m(n){for(var e=[],r=0,t=h(n);r<t.length;r++){var o=t[r];e.push(o);for(var i=0,a=m(o);i<a.length;i++)e.push(a[i])}return e}function p(n){void 0===n&&(n=window);try{if(n.top)return n.top}catch(n){}if(a(n)===n)return n;try{if(l(window,n)&&window.top)return window.top}catch(n){}try{if(l(n,window)&&window.top)return window.top}catch(n){}for(var e=0,r=m(n);e<r.length;e++){var t=r[e];try{if(t.top)return t.top}catch(n){}if(a(t)===t)return t}}function v(n){var e=p(n);if(!e)throw new Error("Can not determine top window");var r=[].concat(m(e),[e]);return-1===r.indexOf(n)&&(r=[].concat(r,[n],m(n))),r}var g=[],y=[];function _(n,e){void 0===e&&(e=!0);try{if(n===window)return!1}catch(n){return!0}try{if(!n)return!0}catch(n){return!0}try{if(n.closed)return!0}catch(n){return!n||n.message!==o}if(e&&d(n))try{if(n.mockclosed)return!0}catch(n){}try{if(!n.parent||!n.top)return!0}catch(n){}var r=function(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}(g,n);if(-1!==r){var t=y[r];if(t&&function(n){if(!n.contentWindow)return!0;if(!n.parentNode)return!0;var e=n.ownerDocument;if(e&&e.documentElement&&!e.documentElement.contains(n)){for(var r=n;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!e.documentElement.contains(r.host))return!0}return!1}(t))return!0}return!1}function b(n){return(n=n||window).navigator.mockUserAgent||n.navigator.userAgent}function E(n,e){for(var r=h(n),t=0;t<r.length;t++){var o=r[t];try{if(d(o)&&o.name===e&&-1!==r.indexOf(o))return o}catch(n){}}try{if(-1!==r.indexOf(n.frames[e]))return n.frames[e]}catch(n){}try{if(-1!==r.indexOf(n[e]))return n[e]}catch(n){}}function W(n,e){return n===s(e)}function x(n){return void 0===n&&(n=window),s(n=n||window)||a(n)||void 0}function j(n,e){for(var r=0;r<n.length;r++)for(var t=n[r],o=0;o<e.length;o++)if(t===e[o])return!0;return!1}function k(n,e){var r=p(n)||n,t=p(e)||e;try{if(r&&t)return r===t}catch(n){}var o=v(n),i=v(e);if(j(o,i))return!0;var a=s(r),u=s(t);return a&&j(v(a),i)||u&&j(v(u),o),!1}function S(n,e){if("string"==typeof n){if("string"==typeof e)return"*"===n||e===n;if(t(e))return!1;if(Array.isArray(e))return!1}return t(n)?t(e)?n.toString()===e.toString():!Array.isArray(e)&&Boolean(e.match(n)):!!Array.isArray(n)&&(Array.isArray(e)?JSON.stringify(n)===JSON.stringify(e):!t(e)&&n.some((function(n){return S(n,e)})))}function O(n){return n.match(/^(https?|mock|file):\/\//)?n.split("/").slice(0,3).join("/"):f()}function P(n){try{if(n===window)return!0}catch(n){if(n&&n.message===o)return!0}try{if("[object Window]"==={}.toString.call(n))return!0}catch(n){if(n&&n.message===o)return!0}try{if(window.Window&&n instanceof window.Window)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.self===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.parent===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.top===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&"__unlikely_value__"===n.__cross_domain_utils_window_check__)return!1}catch(n){return!0}return!1}function A(n){try{n.close()}catch(n){}}function M(n){try{if(!n)return!1;if("undefined"!=typeof Promise&&n instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&n instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&n instanceof window.constructor)return!1;var e={}.toString;if(e){var r=e.call(n);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof n.then)return!0}catch(n){return!1}return!1}var I,z=[],C=[],D=0;function R(){if(!D&&I){var n=I;I=null,n.resolve()}}function N(){D+=1}function T(){D-=1,R()}var L=function(){function n(n){var e=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var r,t,o=!1,i=!1,a=!1;N();try{n((function(n){a?e.resolve(n):(o=!0,r=n)}),(function(n){a?e.reject(n):(i=!0,t=n)}))}catch(n){return T(),void this.reject(n)}T(),a=!0,o?this.resolve(r):i&&this.reject(t)}}var e=n.prototype;return e.resolve=function(n){if(this.resolved||this.rejected)return this;if(M(n))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=n,this.dispatch(),this},e.reject=function(n){var e=this;if(this.resolved||this.rejected)return this;if(M(n))throw new Error("Can not reject promise with another promise");if(!n){var r=n&&"function"==typeof n.toString?n.toString():{}.toString.call(n);n=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=n,this.errorHandled||setTimeout((function(){e.errorHandled||function(n,e){if(-1===z.indexOf(n)){z.push(n),setTimeout((function(){throw n}),1);for(var r=0;r<C.length;r++)C[r](n,e)}}(n,e)}),1),this.dispatch(),this},e.asyncReject=function(n){return this.errorHandled=!0,this.reject(n),this},e.dispatch=function(){var e=this.resolved,r=this.rejected,t=this.handlers;if(!this.dispatching&&(e||r)){this.dispatching=!0,N();for(var o=function(n,e){return n.then((function(n){e.resolve(n)}),(function(n){e.reject(n)}))},i=0;i<t.length;i++){var a=t[i],s=a.onSuccess,u=a.onError,c=a.promise,f=void 0;if(e)try{f=s?s(this.value):this.value}catch(n){c.reject(n);continue}else if(r){if(!u){c.reject(this.error);continue}try{f=u(this.error)}catch(n){c.reject(n);continue}}f instanceof n&&(f.resolved||f.rejected)?(f.resolved?c.resolve(f.value):c.reject(f.error),f.errorHandled=!0):M(f)?f instanceof n&&(f.resolved||f.rejected)?f.resolved?c.resolve(f.value):c.reject(f.error):o(f,c):c.resolve(f)}t.length=0,this.dispatching=!1,T()}},e.then=function(e,r){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new n;return this.handlers.push({promise:t,onSuccess:e,onError:r}),this.errorHandled=!0,this.dispatch(),t},e.catch=function(n){return this.then(void 0,n)},e.finally=function(e){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.finally expected a function");return this.then((function(r){return n.try(e).then((function(){return r}))}),(function(r){return n.try(e).then((function(){throw r}))}))},e.timeout=function(n,e){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout((function(){r.resolved||r.rejected||r.reject(e||new Error("Promise timed out after "+n+"ms"))}),n);return this.then((function(n){return clearTimeout(t),n}))},e.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.resolve=function(e){return e instanceof n?e:M(e)?new n((function(n,r){return e.then(n,r)})):(new n).resolve(e)},n.reject=function(e){return(new n).reject(e)},n.asyncReject=function(e){return(new n).asyncReject(e)},n.all=function(e){var r=new n,t=e.length,o=[];if(!t)return r.resolve(o),r;for(var i=function(n,e,i){return e.then((function(e){o[n]=e,0==(t-=1)&&r.resolve(o)}),(function(n){i.reject(n)}))},a=0;a<e.length;a++){var s=e[a];if(s instanceof n){if(s.resolved){o[a]=s.value,t-=1;continue}}else if(!M(s)){o[a]=s,t-=1;continue}i(a,n.resolve(s),r)}return 0===t&&r.resolve(o),r},n.hash=function(e){var r={};return n.all(Object.keys(e).map((function(t){return n.resolve(e[t]).then((function(n){r[t]=n}))}))).then((function(){return r}))},n.map=function(e,r){return n.all(e.map(r))},n.onPossiblyUnhandledException=function(n){return function(n){return C.push(n),{cancel:function(){C.splice(C.indexOf(n),1)}}}(n)},n.try=function(e,r,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var o;N();try{o=e.apply(r,t||[])}catch(e){return T(),n.reject(e)}return T(),n.resolve(o)},n.delay=function(e){return new n((function(n){setTimeout(n,e)}))},n.isPromise=function(e){return!!(e&&e instanceof n)||M(e)},n.flush=function(){return e=I=I||new n,R(),e;var e},n}();function B(){return(B=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)({}).hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n}).apply(this,arguments)}function F(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}var q,H=function(){function n(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var n=new WeakMap,e={};return Object.freeze(e),n.set(e,"__testvalue__"),"__testvalue__"===n.get(e)}catch(n){return!1}}())try{this.weakmap=new WeakMap}catch(n){}this.keys=[],this.values=[]}var e=n.prototype;return e._cleanupClosedWindows=function(){for(var n=this.weakmap,e=this.keys,r=0;r<e.length;r++){var t=e[r];if(P(t)&&_(t)){if(n)try{n.delete(t)}catch(n){}e.splice(r,1),this.values.splice(r,1),r-=1}}},e.isSafeToReadWrite=function(n){return!P(n)},e.set=function(n,e){if(!n)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(n,e)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=this.name,o=n[t];return void(o&&o[0]===n?o[1]=e:Object.defineProperty(n,t,{value:[n,e],writable:!0}))}catch(n){}this._cleanupClosedWindows();var i=this.keys,a=this.values,s=F(i,n);-1===s?(i.push(n),a.push(e)):a[s]=e},e.get=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return e.get(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return r&&r[0]===n?r[1]:void 0}catch(n){}this._cleanupClosedWindows();var t=F(this.keys,n);if(-1!==t)return this.values[t]},e.delete=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{e.delete(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];r&&r[0]===n&&(r[0]=r[1]=void 0)}catch(n){}this._cleanupClosedWindows();var t=this.keys,o=F(t,n);-1!==o&&(t.splice(o,1),this.values.splice(o,1))},e.has=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return!(!r||r[0]!==n)}catch(n){}return this._cleanupClosedWindows(),-1!==F(this.keys,n)},e.getOrSet=function(n,e){if(this.has(n))return this.get(n);var r=e();return this.set(n,r),r},n}();function J(){var n="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return n.charAt(Math.floor(Math.random()*n.length))}))+"_"+function(n){if("function"==typeof btoa)return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode(parseInt(e,16))})));if("undefined"!=typeof Buffer)return Buffer.from(n,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function U(n){try{return JSON.stringify([].slice.call(n),(function(n,e){return"function"==typeof e?"memoize["+function(n){if(q=q||new H,null==n||"object"!=typeof n&&"function"!=typeof n)throw new Error("Invalid object");var e=q.get(n);return e||(e=typeof n+":"+J(),q.set(n,e)),e}(e)+"]":e}))}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}function Z(n){var e,r={};function t(){for(var e=arguments,t=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=U(i);return r.hasOwnProperty(s)||(r[s]=L.try((function(){return n.apply(t,e)})).finally((function(){delete r[s]}))),r[s]}return t.reset=function(){r={}},function(n,e){try{delete n.name,n.name=e}catch(n){}return n.__name__=n.displayName=e,n}(t,((e=n).name||e.__name__||e.displayName||"anonymous")+"::promiseMemoized")}function G(){}function K(n,e){if(void 0===e&&(e=1),e>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+{}.toString.call(n)+">";if("string"==typeof n)return n;if(n instanceof Error){var r=n&&n.stack,t=n&&n.message;if(r&&t)return-1!==r.indexOf(t)?r:t+"\n"+r;if(r)return r;if(t)return t}return n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}catch(n){return"Error while stringifying error: "+K(n,e+1)}}function Y(n){return"string"==typeof n?n:n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}function Q(n){return"[object RegExp]"==={}.toString.call(n)}function V(n,e,r){if(n.hasOwnProperty(e))return n[e];var t=r();return n[e]=t,t}function X(n){return void 0===n&&(n=window),n!==window?n.__post_robot_10_0_35__:n.__post_robot_10_0_35__=n.__post_robot_10_0_35__||{}}Object.create(Error.prototype);var $=function(){return{}};function nn(n,e){return void 0===n&&(n="store"),void 0===e&&(e=$),V(X(),n,(function(){var n=e();return{has:function(e){return n.hasOwnProperty(e)},get:function(e,r){return n.hasOwnProperty(e)?n[e]:r},set:function(e,r){return n[e]=r,r},del:function(e){delete n[e]},getOrSet:function(e,r){return V(n,e,r)},reset:function(){n=e()},keys:function(){return Object.keys(n)}}}))}var en,rn=function(){};function tn(){var n=X();return n.WINDOW_WILDCARD=n.WINDOW_WILDCARD||new rn,n.WINDOW_WILDCARD}function on(n,e){return void 0===n&&(n="store"),void 0===e&&(e=$),nn("windowStore").getOrSet(n,(function(){var r=new H,t=function(n){return r.getOrSet(n,e)};return{has:function(e){return t(e).hasOwnProperty(n)},get:function(e,r){var o=t(e);return o.hasOwnProperty(n)?o[n]:r},set:function(e,r){return t(e)[n]=r,r},del:function(e){delete t(e)[n]},getOrSet:function(e,r){return V(t(e),n,r)}}}))}function an(){return nn("instance").getOrSet("instanceID",J)}function sn(n,e){var r=e.domain,t=on("helloPromises"),o=t.get(n);o&&o.resolve({domain:r});var i=L.resolve({domain:r});return t.set(n,i),i}function un(n,e){return(0,e.send)(n,"postrobot_hello",{instanceID:an()},{domain:"*",timeout:-1}).then((function(e){var r=e.origin,t=e.data.instanceID;return sn(n,{domain:r}),{win:n,domain:r,instanceID:t}}))}function cn(n,e){var r=e.send;return on("windowInstanceIDPromises").getOrSet(n,(function(){return un(n,{send:r}).then((function(n){return n.instanceID}))}))}function fn(n,e,r){void 0===e&&(e=5e3),void 0===r&&(r="Window");var t=function(n){return on("helloPromises").getOrSet(n,(function(){return new L}))}(n);return-1!==e&&(t=t.timeout(e,new Error(r+" did not load after "+e+"ms"))),t}function dn(n){on("knownWindows").set(n,!0)}function wn(n){return"object"==typeof n&&null!==n&&"string"==typeof n.__type__}function ln(n){return void 0===n?"undefined":null===n?"null":Array.isArray(n)?"array":"function"==typeof n?"function":"object"==typeof n?n instanceof Error?"error":"function"==typeof n.then?"promise":"[object RegExp]"==={}.toString.call(n)?"regex":"[object Date]"==={}.toString.call(n)?"date":"object":"string"==typeof n?"string":"number"==typeof n?"number":"boolean"==typeof n?"boolean":void 0}function hn(n,e){return{__type__:n,__val__:e}}var mn,pn=((en={}).function=function(){},en.error=function(n){return hn("error",{message:n.message,stack:n.stack,code:n.code,data:n.data})},en.promise=function(){},en.regex=function(n){return hn("regex",n.source)},en.date=function(n){return hn("date",n.toJSON())},en.array=function(n){return n},en.object=function(n){return n},en.string=function(n){return n},en.number=function(n){return n},en.boolean=function(n){return n},en.null=function(n){return n},en),vn={},gn=((mn={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},mn.error=function(n){var e=n.stack,r=n.code,t=n.data,o=new Error(n.message);return o.code=r,t&&(o.data=t),o.stack=e+"\n\n"+o.stack,o},mn.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},mn.regex=function(n){return new RegExp(n)},mn.date=function(n){return new Date(n)},mn.array=function(n){return n},mn.object=function(n){return n},mn.string=function(n){return n},mn.number=function(n){return n},mn.boolean=function(n){return n},mn.null=function(n){return n},mn),yn={};function _n(){return!!b(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function bn(n){return!k(window,n)}function En(n,e){if(n){if(f()!==O(n))return!0}else if(e&&!d(e))return!0;return!1}function Wn(n){var e=n.win,r=n.domain;return!(!_n()||r&&!En(r,e)||e&&!bn(e))}function xn(n){return"__postrobot_bridge___"+(n=n||O(n)).replace(/[^a-zA-Z0-9]+/g,"_")}function jn(){return Boolean(window.name&&window.name===xn(f()))}var kn=new L((function(n){if(window.document&&window.document.body)return n(window.document.body);var e=setInterval((function(){if(window.document&&window.document.body)return clearInterval(e),n(window.document.body)}),10)}));function Sn(n){on("remoteWindowPromises").getOrSet(n,(function(){return new L}))}function On(n){var e=on("remoteWindowPromises").get(n);if(!e)throw new Error("Remote window promise not found");return e}function Pn(n,e,r){On(n).resolve((function(t,o,i){if(t!==n)throw new Error("Remote window does not match window");if(!S(o,e))throw new Error("Remote domain "+o+" does not match domain "+e);r.fireAndForget(i)}))}function An(n,e){On(n).reject(e).catch(G)}function Mn(n){for(var e=n.win,r=n.name,t=n.domain,o=nn("popupWindowsByName"),i=on("popupWindowsByWin"),a=0,s=o.keys();a<s.length;a++){var u=s[a],c=o.get(u);c&&!_(c.win)||o.del(u)}if(_(e))return{win:e,name:r,domain:t};var f=i.getOrSet(e,(function(){return r?o.getOrSet(r,(function(){return{win:e,name:r}})):{win:e}}));if(f.win&&f.win!==e)throw new Error("Different window already linked for window: "+(r||"undefined"));return r&&(f.name=r,o.set(r,f)),t&&(f.domain=t,Sn(e)),i.set(e,f),f}function In(n){var e,r=n.on,t=n.send,o=n.receiveMessage;e=window.open,window.open=function(n,r,t,o){var i=e.call(this,function(n){if(0!==O(n).indexOf("mock:"))return n;throw new Error("Mock urls not supported out of test mode")}(n),r,t,o);return i?(Mn({win:i,name:r,domain:n?O(n):null}),i):i},function(n){var e=n.on,r=n.send,t=n.receiveMessage,o=nn("popupWindowsByName");e("postrobot_open_tunnel",(function(n){var i=n.source,a=n.origin,s=n.data,u=nn("bridges").get(a);if(!u)throw new Error("Can not find bridge promise for domain "+a);return u.then((function(n){if(i!==n)throw new Error("Message source does not matched registered bridge for domain "+a);if(!s.name)throw new Error("Register window expected to be passed window name");if(!s.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!o.has(s.name))throw new Error("Window with name "+s.name+" does not exist, or was not opened by this window");if(!o.get(s.name).domain)throw new Error("We do not have a registered domain for window "+s.name);if(o.get(s.name).domain!==a)throw new Error("Message origin "+a+" does not matched registered window origin "+o.get(s.name).domain);return Pn(o.get(s.name).win,a,s.sendMessage),{sendMessage:function(n){if(window&&!window.closed){var i=o.get(s.name);if(i)try{t({data:n,origin:i.domain,source:i.win},{on:e,send:r})}catch(n){L.reject(n)}}}}}))}))}({on:r,send:t,receiveMessage:o}),function(n){var e=n.send;X(window).openTunnelToParent=function(n){var r=n.name,t=n.source,o=n.canary,i=n.sendMessage,s=nn("tunnelWindows"),u=a(window);if(!u)throw new Error("No parent window found to open tunnel to");var c=function(n){var e=n.name,r=n.source,t=n.canary,o=n.sendMessage;!function(){for(var n=nn("tunnelWindows"),e=0,r=n.keys();e<r.length;e++){var t=r[e];_(n[t].source)&&n.del(t)}}();var i=J();return nn("tunnelWindows").set(i,{name:e,source:r,canary:t,sendMessage:o}),i}({name:r,source:t,canary:o,sendMessage:i});return e(u,"postrobot_open_tunnel",{name:r,sendMessage:function(){var n=s.get(c);if(n&&n.source&&!_(n.source)){try{n.canary()}catch(n){return}n.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:t}),function(n){var e=n.on,r=n.send,t=n.receiveMessage;L.try((function(){var n,o=s(window);if(o&&Wn({win:o}))return Sn(o),(n=o,on("remoteBridgeAwaiters").getOrSet(n,(function(){return L.try((function(){var e=E(n,xn(f()));if(e)return d(e)&&X(w(e))?e:new L((function(n){var r,t;r=setInterval((function(){if(e&&d(e)&&X(w(e)))return clearInterval(r),clearTimeout(t),n(e)}),100),t=setTimeout((function(){return clearInterval(r),n()}),2e3)}))}))}))).then((function(n){return n?window.name?X(w(n)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(n){try{window}catch(n){return}if(window&&!window.closed)try{t({data:n,origin:this.origin,source:this.source},{on:e,send:r})}catch(n){L.reject(n)}}}).then((function(n){var e=n.source,r=n.origin,t=n.data;if(e!==o)throw new Error("Source does not match opener");Pn(e,r,t.sendMessage)})).catch((function(n){throw An(o,n),n})):An(o,new Error("Can not register with opener: window does not have a name")):An(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:r,send:t,receiveMessage:o})}function zn(){for(var n=nn("idToProxyWindow"),e=0,r=n.keys();e<r.length;e++){var t=r[e];n.get(t).shouldClean()&&n.del(t)}}function Cn(n,e){var r=e.send,t=e.id,o=void 0===t?J():t,i=n.then((function(n){if(d(n))return w(n).name}));return{id:o,getType:function(){return n.then((function(n){return s(n)?"popup":"iframe"}))},getInstanceID:Z((function(){return n.then((function(n){return cn(n,{send:r})}))})),close:function(){return n.then(A)},getName:function(){return n.then((function(n){if(!_(n))return d(n)?w(n).name:i}))},focus:function(){return n.then((function(n){n.focus()}))},isClosed:function(){return n.then((function(n){return _(n)}))},setLocation:function(e){return n.then((function(n){var r=window.location.protocol+"//"+window.location.host;if(0===e.indexOf("/"))e=""+r+e;else if(!e.match(/^https?:\/\//)&&0!==e.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(e));if(d(n))try{if(n.location&&"function"==typeof n.location.replace)return void n.location.replace(e)}catch(n){}n.location=e}))},setName:function(e){return n.then((function(n){Mn({win:n,name:e});var r=d(n),t=function(n){if(d(n))return w(n).frameElement;for(var e=0,r=document.querySelectorAll("iframe");e<r.length;e++){var t=r[e];if(t&&t.contentWindow&&t.contentWindow===n)return t}}(n);if(!r)throw new Error("Can not set name for cross-domain window: "+e);w(n).name=e,t&&t.setAttribute("name",e),i=L.resolve(e)}))}}}var Dn=function(){function n(n){var e=n.send,r=n.win,t=n.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new L,this.serializedWindow=t||Cn(this.actualWindowPromise,{send:e}),nn("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{send:e})}var e=n.prototype;return e.getID=function(){return this.serializedWindow.id},e.getType=function(){return this.serializedWindow.getType()},e.isPopup=function(){return this.getType().then((function(n){return"popup"===n}))},e.setLocation=function(n){var e=this;return this.serializedWindow.setLocation(n).then((function(){return e}))},e.getName=function(){return this.serializedWindow.getName()},e.setName=function(n){var e=this;return this.serializedWindow.setName(n).then((function(){return e}))},e.close=function(){var n=this;return this.serializedWindow.close().then((function(){return n}))},e.focus=function(){var n=this,e=this.isPopup(),r=this.getName(),t=L.hash({isPopup:e,name:r}).then((function(n){var e=n.name;n.isPopup&&e&&window.open("",e)})),o=this.serializedWindow.focus();return L.all([t,o]).then((function(){return n}))},e.isClosed=function(){return this.serializedWindow.isClosed()},e.getWindow=function(){return this.actualWindow},e.setWindow=function(n,e){var r=e.send;this.actualWindow=n,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Cn(this.actualWindowPromise,{send:r,id:this.getID()}),on("winToProxyWindow").set(n,this)},e.awaitWindow=function(){return this.actualWindowPromise},e.matchWindow=function(n,e){var r=this,t=e.send;return L.try((function(){return r.actualWindow?n===r.actualWindow:L.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:cn(n,{send:t})}).then((function(e){var o=e.proxyInstanceID===e.knownWindowInstanceID;return o&&r.setWindow(n,{send:t}),o}))}))},e.unwrap=function(){return this.actualWindow||this},e.getInstanceID=function(){return this.serializedWindow.getInstanceID()},e.shouldClean=function(){return Boolean(this.actualWindow&&_(this.actualWindow))},e.serialize=function(){return this.serializedWindow},n.unwrap=function(e){return n.isProxyWindow(e)?e.unwrap():e},n.serialize=function(e,r){var t=r.send;return zn(),n.toProxyWindow(e,{send:t}).serialize()},n.deserialize=function(e,r){var t=r.send;return zn(),nn("idToProxyWindow").get(e.id)||new n({serializedWindow:e,send:t})},n.isProxyWindow=function(n){return Boolean(n&&!P(n)&&n.isProxyWindow)},n.toProxyWindow=function(e,r){var t=r.send;if(zn(),n.isProxyWindow(e))return e;var o=e;return on("winToProxyWindow").get(o)||new n({win:o,send:t})},n}();function Rn(n,e,r,t,o){var i=on("methodStore"),a=nn("proxyWindowMethods");Dn.isProxyWindow(t)?a.set(n,{val:e,name:r,domain:o,source:t}):(a.del(n),i.getOrSet(t,(function(){return{}}))[n]={domain:o,name:r,val:e,source:t})}function Nn(n,e){var r=on("methodStore"),t=nn("proxyWindowMethods");return r.getOrSet(n,(function(){return{}}))[e]||t.get(e)}function Tn(n,e,r,t,o){var i,a,s;a=(i={on:o.on,send:o.send}).on,s=i.send,nn("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(n){var e=n.source,r=n.origin,t=n.data,o=t.id,i=t.name,a=Nn(e,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+t.id+" in "+f(window));var u=a.source,c=a.domain,d=a.val;return L.try((function(){if(!S(c,r))throw new Error("Method '"+t.name+"' domain "+JSON.stringify(Q(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+f(window));if(Dn.isProxyWindow(u))return u.matchWindow(e,{send:s}).then((function(n){if(!n)throw new Error("Method call '"+t.name+"' failed - proxy window does not match source in "+f(window))}))})).then((function(){return d.apply({source:e,origin:r},t.args)}),(function(n){return L.try((function(){if(d.onError)return d.onError(n)})).then((function(){var e,r;throw n.stack&&(n.stack="Remote call to "+i+"("+(void 0===(e=t.args)&&(e=[]),(r=e,[].slice.call(r)).map((function(n){return"string"==typeof n?"'"+n+"'":void 0===n?"undefined":null===n?"null":"boolean"==typeof n?n.toString():Array.isArray(n)?"[ ... ]":"object"==typeof n?"{ ... }":"function"==typeof n?"() => { ... }":"<"+typeof n+">"})).join(", ")+") failed\n\n")+n.stack),n}))})).then((function(n){return{result:n,id:o,name:i}}))}))}));var u=r.__id__||J();n=Dn.unwrap(n);var c=r.__name__||r.name||t;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",t+"::")),Dn.isProxyWindow(n)?(Rn(u,r,c,n,e),n.awaitWindow().then((function(n){Rn(u,r,c,n,e)}))):Rn(u,r,c,n,e),hn("cross_domain_function",{id:u,name:c})}function Ln(n,e,r,t){var o,i=t.on,a=t.send;return function(n,e){void 0===e&&(e=vn);var r=JSON.stringify(n,(function(n){var r=this[n];if(wn(this))return r;var t=ln(r);if(!t)return r;var o=e[t]||pn[t];return o?o(r,n):r}));return void 0===r?"undefined":r}(r,((o={}).promise=function(r,t){return function(n,e,r,t,o){return hn("cross_domain_zalgo_promise",{then:Tn(n,e,(function(n,e){return r.then(n,e)}),t,{on:o.on,send:o.send})})}(n,e,r,t,{on:i,send:a})},o.function=function(r,t){return Tn(n,e,r,t,{on:i,send:a})},o.object=function(n){return P(n)||Dn.isProxyWindow(n)?hn("cross_domain_window",Dn.serialize(n,{send:a})):n},o))}function Bn(n,e,r,t){var o,i=t.send;return function(n,e){if(void 0===e&&(e=yn),"undefined"!==n)return JSON.parse(n,(function(n,r){if(wn(this))return r;var t,o;if(wn(r)?(t=r.__type__,o=r.__val__):(t=ln(r),o=r),!t)return o;var i=e[t]||gn[t];return i?i(o,n):o}))}(r,((o={}).cross_domain_zalgo_promise=function(n){return function(n,e,r){return new L(r.then)}(0,0,n)},o.cross_domain_function=function(r){return function(n,e,r,t){var o=r.id,i=r.name,a=t.send,s=function(r){function t(){var s=arguments;return Dn.toProxyWindow(n,{send:a}).awaitWindow().then((function(n){var u=Nn(n,o);if(u&&u.val!==t)return u.val.apply({source:window,origin:f()},s);var c={domain:e,fireAndForget:r.fireAndForget},d=[].slice.call(s);return a(n,"postrobot_method",{id:o,name:i,args:d},c).then((function(n){if(!r.fireAndForget)return n.data.result}))})).catch((function(n){throw n}))}return void 0===r&&(r={}),t.__name__=i,t.__origin__=e,t.__source__=n,t.__id__=o,t.origin=e,t},u=s();return u.fireAndForget=s({fireAndForget:!0}),u}(n,e,r,{send:i})},o.cross_domain_window=function(n){return Dn.deserialize(n,{send:i})},o))}var Fn,qn={};function Hn(n,e,r,t){var o,i=t.on,a=t.send;if(_(n))throw new Error("Window is closed");for(var s=Ln(n,e,((o={}).__post_robot_10_0_35__=B({id:J(),origin:f(window)},r),o),{on:i,send:a}),u=Object.keys(qn),c=[],d=0;d<u.length;d++){var w=u[d];try{qn[w](n,s,e)}catch(n){c.push(n)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(n,e){return e+". "+K(n)})).join("\n\n"))}function Jn(n){return nn("responseListeners").get(n)}function Un(n){nn("responseListeners").del(n)}function Zn(n){return nn("erroredResponseListeners").has(n)}function Gn(n){var e=n.name,r=n.win,t=n.domain,o=on("requestListeners");if("*"===r&&(r=null),"*"===t&&(t=null),!e)throw new Error("Name required to get request listener");for(var i=0,a=[r,tn()];i<a.length;i++){var s=a[i];if(s){var u=o.get(s);if(u){var c=u[e];if(c){if(t&&"string"==typeof t){if(c[t])return c[t];if(c.__domain_regex__)for(var f=0,d=c.__domain_regex__;f<d.length;f++){var w=d[f],l=w.listener;if(S(w.regex,t))return l}}if(c["*"])return c["*"]}}}}}qn.postrobot_post_message=function(n,e,r){(Array.isArray(r)?r:"string"==typeof r?[r]:["*"]).map((function(n){return 0===n.indexOf("file:")?"*":n})).forEach((function(r){n.postMessage(e,r)}))},qn.postrobot_bridge=function(n,e,r){if(!_n()&&!jn())throw new Error("Bridge not needed for browser");if(d(n))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==k(window,n))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(n,e,r){var t=W(window,n),o=W(n,window);if(!t&&!o)throw new Error("Can only send messages to and from parent and popup windows");On(n).then((function(t){return t(n,e,r)}))}(n,r,e)},qn.postrobot_global=function(n,e){if(!b(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!d(n))throw new Error("Post message through global disabled between different domain windows");if(!1!==k(window,n))throw new Error("Can only use global to communicate between two different windows, not between frames");var r=X(n);if(!r)throw new Error("Can not find postRobot global on foreign window");r.receiveMessage({source:window,origin:f(),data:e})};var Kn=((Fn={}).postrobot_message_request=function(n,e,r,t){var o=t.on,i=t.send,a=Gn({name:r.name,win:n,domain:e}),s="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function u(t,a,u){if(void 0===u&&(u={}),!r.fireAndForget&&!_(n))try{Hn(n,e,B({type:t,ack:a,hash:r.hash,name:r.name},u),{on:o,send:i})}catch(n){throw new Error("Send response message failed for "+s+" in "+f()+"\n\n"+K(n))}}return L.all([u("postrobot_message_ack"),L.try((function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!S(a.domain,e))throw new Error("Request origin "+e+" does not match domain "+a.domain.toString());return a.handler({source:n,origin:e,data:r.data})})).then((function(n){return u("postrobot_message_response","success",{data:n})}),(function(n){return u("postrobot_message_response","error",{error:n})}))]).then(G).catch((function(n){if(a&&a.handleError)return a.handleError(n);throw n}))},Fn.postrobot_message_ack=function(n,e,r){if(!Zn(r.hash)){var t=Jn(r.hash);if(!t)throw new Error("No handler found for post message ack for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!S(t.domain,e))throw new Error("Ack origin "+e+" does not match domain "+t.domain.toString());if(n!==t.win)throw new Error("Ack source does not match registered window")}catch(n){t.promise.reject(n)}t.ack=!0}},Fn.postrobot_message_response=function(n,e,r){if(!Zn(r.hash)){var o,i=Jn(r.hash);if(!i)throw new Error("No handler found for post message response for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!S(i.domain,e))throw new Error("Response origin "+e+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":t(o)?"RegExp("+o.toString():o.toString()));if(n!==i.win)throw new Error("Response source does not match registered window");Un(r.hash),"error"===r.ack?i.promise.reject(r.error):"success"===r.ack&&i.promise.resolve({source:n,origin:e,data:r.data})}},Fn);function Yn(n,e){var r=e.on,t=e.send,o=nn("receivedMessages");try{if(!window||window.closed||!n.source)return}catch(n){return}var i=n.source,a=n.origin,s=function(n,e,r,t){var o,i=t.on,a=t.send;try{o=Bn(e,r,n,{on:i,send:a})}catch(n){return}if(o&&"object"==typeof o&&null!==o&&(o=o.__post_robot_10_0_35__)&&"object"==typeof o&&null!==o&&o.type&&"string"==typeof o.type&&Kn[o.type])return o}(n.data,i,a,{on:r,send:t});s&&(dn(i),o.has(s.id)||(o.set(s.id,!0),_(i)&&!s.fireAndForget||(0===s.origin.indexOf("file:")&&(a="file://"),Kn[s.type](i,a,s,{on:r,send:t}))))}function Qn(n,e,r){if(!n)throw new Error("Expected name");if("function"==typeof e&&(r=e,e={}),!r)throw new Error("Expected handler");(e=e||{}).name=n,e.handler=r||e.handler;var t=e.window,o=e.domain,i=function n(e,r){var t=e.name,o=e.win,i=e.domain,a=on("requestListeners");if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var s=[],u=0,c=o;u<c.length;u++)s.push(n({name:t,domain:i,win:c[u]},r));return{cancel:function(){for(var n=0;n<s.length;n++)s[n].cancel()}}}if(Array.isArray(i)){for(var f=[],d=0,w=i;d<w.length;d++)f.push(n({name:t,win:o,domain:w[d]},r));return{cancel:function(){for(var n=0;n<f.length;n++)f[n].cancel()}}}var l=Gn({name:t,win:o,domain:i});if(o&&"*"!==o||(o=tn()),i=i||"*",l)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===tn()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===tn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var h,m,p=a.getOrSet(o,(function(){return{}})),v=V(p,t,(function(){return{}})),g=i.toString();return Q(i)?(h=V(v,"__domain_regex__",(function(){return[]}))).push(m={regex:i,listener:r}):v[g]=r,{cancel:function(){delete v[g],m&&(h.splice(h.indexOf(m,1)),h.length||delete v.__domain_regex__),Object.keys(v).length||delete p[t],o&&!Object.keys(p).length&&a.del(o)}}}({name:n,win:t,domain:o},{handler:e.handler,handleError:e.errorHandler||function(n){throw n},window:t,domain:o||"*",name:n});return{cancel:function(){i.cancel()}}}function Vn(n,e,r){"function"==typeof(e=e||{})&&(r=e,e={});var t,o=new L;return e.errorHandler=function(n){t.cancel(),o.reject(n)},t=Qn(n,e,(function(n){if(t.cancel(),o.resolve(n),r)return r(n)})),o.cancel=t.cancel,o}var Xn=function n(e,r,t,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,s=o.timeout||5e3,u=o.fireAndForget||!1;return L.try((function(){if(function(n,e,r){if(!n)throw new Error("Expected name");if(r&&"string"!=typeof r&&!Array.isArray(r)&&!Q(r))throw new TypeError("Expected domain to be a string, array, or regex");if(_(e))throw new Error("Target window is closed")}(r,e,i),function(n,e){var r=x(e);if(r)return r===n;if(e===n)return!1;if(p(e)===e)return!1;for(var t=0,o=h(n);t<o.length;t++)if(o[t]===e)return!0;return!1}(window,e))return fn(e,s)})).then((function(r){return function(n,e,r,t){var o=t.send;return"string"==typeof e?L.resolve(e):L.try((function(){return r||un(n,{send:o}).then((function(n){return n.domain}))})).then((function(n){if(!S(e,e))throw new Error("Domain "+Y(e)+" does not match "+Y(e));return n}))}(e,i,(void 0===r?{}:r).domain,{send:n})})).then((function(o){i=o;var s,c,d="postrobot_method"===r&&t&&"string"==typeof t.name?t.name+"()":r,w=new L,l=r+"_"+J();if(!u){var h={name:r,win:e,domain:i,promise:w};!function(n,e){nn("responseListeners").set(n,e)}(l,h);var m=on("requestPromises").getOrSet(e,(function(){return[]}));m.push(w),w.catch((function(){!function(n){nn("erroredResponseListeners").set(n,!0)}(l),Un(l)}));var p=function(n){return on("knownWindows").get(n,!1)}(e)?1e4:2e3,v=a,g=p,y=v,b=(s=function(){return _(e)?w.reject(new Error("Window closed for "+r+" before "+(h.ack?"response":"ack"))):h.cancelled?w.reject(new Error("Response listener was cancelled for "+r)):(g=Math.max(g-500,0),-1!==y&&(y=Math.max(y-500,0)),h.ack||0!==g?0===y?w.reject(new Error("No response for postMessage "+d+" in "+f()+" in "+v+"ms")):void 0:w.reject(new Error("No ack for postMessage "+d+" in "+f()+" in "+p+"ms")))},500,function n(){c=setTimeout((function(){s(),n()}),500)}(),{cancel:function(){clearTimeout(c)}});w.finally((function(){b.cancel(),m.splice(m.indexOf(w,1))})).catch(G)}try{Hn(e,i,{type:"postrobot_message_request",hash:l,name:r,data:t,fireAndForget:u},{on:Qn,send:n})}catch(n){throw new Error("Send request message failed for "+d+" in "+f()+"\n\n"+K(n))}return u?w.resolve():w}))};function $n(n,e,r){return Ln(n,e,r,{on:Qn,send:Xn})}function ne(n,e,r){return Bn(n,e,r,{on:Qn,send:Xn})}function ee(n){return new Dn({send:Xn,win:n})}function re(n){return Dn.toProxyWindow(n,{send:Xn})}function te(){var n,e,r,t;X().initialized||(X().initialized=!0,e=(n={on:Qn,send:Xn}).on,r=n.send,(t=X()).receiveMessage=t.receiveMessage||function(n){return Yn(n,{on:e,send:r})},function(n){var e=n.on,r=n.send;nn().getOrSet("postMessageListener",(function(){return(n=window).addEventListener("message",t=function(n){!function(n,e){var r=e.on,t=e.send,o=n.source||n.sourceElement,i=n.origin||n.originalEvent&&n.originalEvent.origin,a=n.data;if("null"===i&&(i="file://"),o){if(!i)throw new Error("Post message did not have origin domain");Yn({source:o,origin:i,data:a},{on:r,send:t})}}(n,{on:e,send:r})}),{cancel:function(){n.removeEventListener("message",t)}};var n,t}))}({on:Qn,send:Xn}),In({on:Qn,send:Xn,receiveMessage:Yn}),function(n){var e=n.on,r=n.send;nn("builtinListeners").getOrSet("helloListener",(function(){var n=e("postrobot_hello",{domain:"*"},(function(n){return sn(n.source,{domain:n.origin}),{instanceID:an()}})),t=x();return t&&un(t,{send:r}).catch(G),n}))}({on:Qn,send:Xn}))}function oe(){var n;!function(){for(var n=nn("responseListeners"),e=0,r=n.keys();e<r.length;e++){var t=r[e],o=n.get(t);o&&(o.cancelled=!0),n.del(t)}}(),(n=nn().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_35__}var ie,ae=!0;function se(n){for(var e=0,r=on("requestPromises").get(n,[]);e<r.length;e++)r[e].reject(new Error("Window "+(_(n)?"closed":"cleaned up")+" before response")).catch(G)}ie={setupBridge:In,openBridge:function(n,e){var r=nn("bridges"),t=nn("bridgeFrames");return e=e||O(n),r.getOrSet(e,(function(){return L.try((function(){if(f()===e)throw new Error("Can not open bridge on the same domain as current domain: "+e);var r=xn(e);if(E(window,r))throw new Error("Frame with name "+r+" already exists on page");var o=function(n,e){var r=document.createElement("iframe");return r.setAttribute("name",n),r.setAttribute("id",n),r.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),r.setAttribute("frameborder","0"),r.setAttribute("border","0"),r.setAttribute("scrolling","no"),r.setAttribute("allowTransparency","true"),r.setAttribute("tabindex","-1"),r.setAttribute("hidden","true"),r.setAttribute("title",""),r.setAttribute("role","presentation"),r.src=e,r}(r,n);return t.set(e,o),kn.then((function(e){e.appendChild(o);var r=o.contentWindow;return new L((function(n,e){o.addEventListener("load",n),o.addEventListener("error",e)})).then((function(){return fn(r,5e3,"Bridge "+n)})).then((function(){return r}))}))}))}))},linkWindow:Mn,linkUrl:function(n,e){Mn({win:n,domain:O(e)})},isBridge:jn,needsBridge:Wn,needsBridgeForBrowser:_n,hasBridge:function(n,e){return nn("bridges").has(e||O(n))},needsBridgeForWin:bn,needsBridgeForDomain:En,destroyBridges:function(){for(var n=nn("bridges"),e=nn("bridgeFrames"),r=0,t=e.keys();r<t.length;r++){var o=e.get(t[r]);o&&o.parentNode&&o.parentNode.removeChild(o)}e.reset(),n.reset()}},te()}])}));
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("postRobot",[],e):"object"==typeof exports?exports.postRobot=e():n.postRobot=e()}("undefined"!=typeof self?self:this,(function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)r.d(t,o,function(e){return n[e]}.bind(null,o));return t},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return{}.hasOwnProperty.call(n,e)},r.p="",r(r.s=0)}([function(n,e,r){"use strict";function t(n){return"[object RegExp]"==={}.toString.call(n)}r.r(e),r.d(e,"Promise",(function(){return L})),r.d(e,"TYPES",(function(){return ae})),r.d(e,"ProxyWindow",(function(){return Dn})),r.d(e,"setup",(function(){return te})),r.d(e,"destroy",(function(){return oe})),r.d(e,"serializeMessage",(function(){return $n})),r.d(e,"deserializeMessage",(function(){return ne})),r.d(e,"createProxyWindow",(function(){return ee})),r.d(e,"toProxyWindow",(function(){return re})),r.d(e,"on",(function(){return Qn})),r.d(e,"once",(function(){return Vn})),r.d(e,"send",(function(){return Xn})),r.d(e,"markWindowKnown",(function(){return dn})),r.d(e,"cleanUpWindow",(function(){return se})),r.d(e,"bridge",(function(){return ie}));var o="Call was rejected by callee.\r\n";function i(n){return void 0===n&&(n=window),"about:"===n.location.protocol}function a(n){if(void 0===n&&(n=window),n)try{if(n.parent&&n.parent!==n)return n.parent}catch(n){}}function s(n){if(void 0===n&&(n=window),n&&!a(n))try{return n.opener}catch(n){}}function u(n){try{return!0}catch(n){}return!1}function c(n){void 0===n&&(n=window);var e=n.location;if(!e)throw new Error("Can not read window location");var r=e.protocol;if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var t=a(n);return t&&u()?c(t):"about://"}var o=e.host;if(!o)throw new Error("Can not read window host");return r+"//"+o}function f(n){void 0===n&&(n=window);var e=c(n);return e&&n.mockDomain&&0===n.mockDomain.indexOf("mock:")?n.mockDomain:e}function d(n){if(!function(n){try{if(n===window)return!0}catch(n){}try{var e=Object.getOwnPropertyDescriptor(n,"location");if(e&&!1===e.enumerable)return!1}catch(n){}try{if(i(n)&&u())return!0}catch(n){}try{if(c(n)===c(window))return!0}catch(n){}return!1}(n))return!1;try{if(n===window)return!0;if(i(n)&&u())return!0;if(f(window)===f(n))return!0}catch(n){}return!1}function w(n){if(!d(n))throw new Error("Expected window to be same domain");return n}function l(n,e){if(!n||!e)return!1;var r=a(e);return r?r===n:-1!==function(n){var e=[];try{for(;n.parent!==n;)e.push(n.parent),n=n.parent}catch(n){}return e}(e).indexOf(n)}function h(n){var e,r,t=[];try{e=n.frames}catch(r){e=n}try{r=e.length}catch(n){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=e[o]}catch(n){continue}t.push(i)}return t}for(var a=0;a<100;a++){var s=void 0;try{s=e[a]}catch(n){return t}if(!s)return t;t.push(s)}return t}function m(n){for(var e=[],r=0,t=h(n);r<t.length;r++){var o=t[r];e.push(o);for(var i=0,a=m(o);i<a.length;i++)e.push(a[i])}return e}function p(n){void 0===n&&(n=window);try{if(n.top)return n.top}catch(n){}if(a(n)===n)return n;try{if(l(window,n)&&window.top)return window.top}catch(n){}try{if(l(n,window)&&window.top)return window.top}catch(n){}for(var e=0,r=m(n);e<r.length;e++){var t=r[e];try{if(t.top)return t.top}catch(n){}if(a(t)===t)return t}}function v(n){var e=p(n);if(!e)throw new Error("Can not determine top window");var r=[].concat(m(e),[e]);return-1===r.indexOf(n)&&(r=[].concat(r,[n],m(n))),r}var g=[],y=[];function _(n,e){void 0===e&&(e=!0);try{if(n===window)return!1}catch(n){return!0}try{if(!n)return!0}catch(n){return!0}try{if(n.closed)return!0}catch(n){return!n||n.message!==o}if(e&&d(n))try{if(n.mockclosed)return!0}catch(n){}try{if(!n.parent||!n.top)return!0}catch(n){}var r=function(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}(g,n);if(-1!==r){var t=y[r];if(t&&function(n){if(!n.contentWindow)return!0;if(!n.parentNode)return!0;var e=n.ownerDocument;if(e&&e.documentElement&&!e.documentElement.contains(n)){for(var r=n;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!e.documentElement.contains(r.host))return!0}return!1}(t))return!0}return!1}function b(n){return(n=n||window).navigator.mockUserAgent||n.navigator.userAgent}function E(n,e){for(var r=h(n),t=0;t<r.length;t++){var o=r[t];try{if(d(o)&&o.name===e&&-1!==r.indexOf(o))return o}catch(n){}}try{if(-1!==r.indexOf(n.frames[e]))return n.frames[e]}catch(n){}try{if(-1!==r.indexOf(n[e]))return n[e]}catch(n){}}function W(n,e){return n===s(e)}function x(n){return void 0===n&&(n=window),s(n=n||window)||a(n)||void 0}function j(n,e){for(var r=0;r<n.length;r++)for(var t=n[r],o=0;o<e.length;o++)if(t===e[o])return!0;return!1}function k(n,e){var r=p(n)||n,t=p(e)||e;try{if(r&&t)return r===t}catch(n){}var o=v(n),i=v(e);if(j(o,i))return!0;var a=s(r),u=s(t);return a&&j(v(a),i)||u&&j(v(u),o),!1}function S(n,e){if("string"==typeof n){if("string"==typeof e)return"*"===n||e===n;if(t(e))return!1;if(Array.isArray(e))return!1}return t(n)?t(e)?n.toString()===e.toString():!Array.isArray(e)&&Boolean(e.match(n)):!!Array.isArray(n)&&(Array.isArray(e)?JSON.stringify(n)===JSON.stringify(e):!t(e)&&n.some((function(n){return S(n,e)})))}function O(n){return n.match(/^(https?|mock|file):\/\//)?n.split("/").slice(0,3).join("/"):f()}function P(n){try{if(n===window)return!0}catch(n){if(n&&n.message===o)return!0}try{if("[object Window]"==={}.toString.call(n))return!0}catch(n){if(n&&n.message===o)return!0}try{if(window.Window&&n instanceof window.Window)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.self===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.parent===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.top===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&"__unlikely_value__"===n.__cross_domain_utils_window_check__)return!1}catch(n){return!0}try{if("postMessage"in n&&"self"in n&&"location"in n)return!0}catch(n){}return!1}function A(n){try{n.close()}catch(n){}}function M(n){try{if(!n)return!1;if("undefined"!=typeof Promise&&n instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&n instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&n instanceof window.constructor)return!1;var e={}.toString;if(e){var r=e.call(n);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof n.then)return!0}catch(n){return!1}return!1}var I,z=[],C=[],D=0;function R(){if(!D&&I){var n=I;I=null,n.resolve()}}function N(){D+=1}function T(){D-=1,R()}var L=function(){function n(n){var e=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var r,t,o=!1,i=!1,a=!1;N();try{n((function(n){a?e.resolve(n):(o=!0,r=n)}),(function(n){a?e.reject(n):(i=!0,t=n)}))}catch(n){return T(),void this.reject(n)}T(),a=!0,o?this.resolve(r):i&&this.reject(t)}}var e=n.prototype;return e.resolve=function(n){if(this.resolved||this.rejected)return this;if(M(n))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=n,this.dispatch(),this},e.reject=function(n){var e=this;if(this.resolved||this.rejected)return this;if(M(n))throw new Error("Can not reject promise with another promise");if(!n){var r=n&&"function"==typeof n.toString?n.toString():{}.toString.call(n);n=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=n,this.errorHandled||setTimeout((function(){e.errorHandled||function(n,e){if(-1===z.indexOf(n)){z.push(n),setTimeout((function(){throw n}),1);for(var r=0;r<C.length;r++)C[r](n,e)}}(n,e)}),1),this.dispatch(),this},e.asyncReject=function(n){return this.errorHandled=!0,this.reject(n),this},e.dispatch=function(){var e=this.resolved,r=this.rejected,t=this.handlers;if(!this.dispatching&&(e||r)){this.dispatching=!0,N();for(var o=function(n,e){return n.then((function(n){e.resolve(n)}),(function(n){e.reject(n)}))},i=0;i<t.length;i++){var a=t[i],s=a.onSuccess,u=a.onError,c=a.promise,f=void 0;if(e)try{f=s?s(this.value):this.value}catch(n){c.reject(n);continue}else if(r){if(!u){c.reject(this.error);continue}try{f=u(this.error)}catch(n){c.reject(n);continue}}f instanceof n&&(f.resolved||f.rejected)?(f.resolved?c.resolve(f.value):c.reject(f.error),f.errorHandled=!0):M(f)?f instanceof n&&(f.resolved||f.rejected)?f.resolved?c.resolve(f.value):c.reject(f.error):o(f,c):c.resolve(f)}t.length=0,this.dispatching=!1,T()}},e.then=function(e,r){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new n;return this.handlers.push({promise:t,onSuccess:e,onError:r}),this.errorHandled=!0,this.dispatch(),t},e.catch=function(n){return this.then(void 0,n)},e.finally=function(e){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.finally expected a function");return this.then((function(r){return n.try(e).then((function(){return r}))}),(function(r){return n.try(e).then((function(){throw r}))}))},e.timeout=function(n,e){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout((function(){r.resolved||r.rejected||r.reject(e||new Error("Promise timed out after "+n+"ms"))}),n);return this.then((function(n){return clearTimeout(t),n}))},e.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.resolve=function(e){return e instanceof n?e:M(e)?new n((function(n,r){return e.then(n,r)})):(new n).resolve(e)},n.reject=function(e){return(new n).reject(e)},n.asyncReject=function(e){return(new n).asyncReject(e)},n.all=function(e){var r=new n,t=e.length,o=[];if(!t)return r.resolve(o),r;for(var i=function(n,e,i){return e.then((function(e){o[n]=e,0==(t-=1)&&r.resolve(o)}),(function(n){i.reject(n)}))},a=0;a<e.length;a++){var s=e[a];if(s instanceof n){if(s.resolved){o[a]=s.value,t-=1;continue}}else if(!M(s)){o[a]=s,t-=1;continue}i(a,n.resolve(s),r)}return 0===t&&r.resolve(o),r},n.hash=function(e){var r={};return n.all(Object.keys(e).map((function(t){return n.resolve(e[t]).then((function(n){r[t]=n}))}))).then((function(){return r}))},n.map=function(e,r){return n.all(e.map(r))},n.onPossiblyUnhandledException=function(n){return function(n){return C.push(n),{cancel:function(){C.splice(C.indexOf(n),1)}}}(n)},n.try=function(e,r,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var o;N();try{o=e.apply(r,t||[])}catch(e){return T(),n.reject(e)}return T(),n.resolve(o)},n.delay=function(e){return new n((function(n){setTimeout(n,e)}))},n.isPromise=function(e){return!!(e&&e instanceof n)||M(e)},n.flush=function(){return e=I=I||new n,R(),e;var e},n}();function B(){return(B=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)({}).hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n}).apply(this,arguments)}function F(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}var q,H=function(){function n(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var n=new WeakMap,e={};return Object.freeze(e),n.set(e,"__testvalue__"),"__testvalue__"===n.get(e)}catch(n){return!1}}())try{this.weakmap=new WeakMap}catch(n){}this.keys=[],this.values=[]}var e=n.prototype;return e._cleanupClosedWindows=function(){for(var n=this.weakmap,e=this.keys,r=0;r<e.length;r++){var t=e[r];if(P(t)&&_(t)){if(n)try{n.delete(t)}catch(n){}e.splice(r,1),this.values.splice(r,1),r-=1}}},e.isSafeToReadWrite=function(n){return!P(n)},e.set=function(n,e){if(!n)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(n,e)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=this.name,o=n[t];return void(o&&o[0]===n?o[1]=e:Object.defineProperty(n,t,{value:[n,e],writable:!0}))}catch(n){}this._cleanupClosedWindows();var i=this.keys,a=this.values,s=F(i,n);-1===s?(i.push(n),a.push(e)):a[s]=e},e.get=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return e.get(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return r&&r[0]===n?r[1]:void 0}catch(n){}this._cleanupClosedWindows();var t=F(this.keys,n);if(-1!==t)return this.values[t]},e.delete=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{e.delete(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];r&&r[0]===n&&(r[0]=r[1]=void 0)}catch(n){}this._cleanupClosedWindows();var t=this.keys,o=F(t,n);-1!==o&&(t.splice(o,1),this.values.splice(o,1))},e.has=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return!(!r||r[0]!==n)}catch(n){}return this._cleanupClosedWindows(),-1!==F(this.keys,n)},e.getOrSet=function(n,e){if(this.has(n))return this.get(n);var r=e();return this.set(n,r),r},n}();function J(){var n="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return n.charAt(Math.floor(Math.random()*n.length))}))+"_"+function(n){if("function"==typeof btoa)return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode(parseInt(e,16))})));if("undefined"!=typeof Buffer)return Buffer.from(n,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function U(n){try{return JSON.stringify([].slice.call(n),(function(n,e){return"function"==typeof e?"memoize["+function(n){if(q=q||new H,null==n||"object"!=typeof n&&"function"!=typeof n)throw new Error("Invalid object");var e=q.get(n);return e||(e=typeof n+":"+J(),q.set(n,e)),e}(e)+"]":e}))}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}function Z(n){var e,r={};function t(){for(var e=arguments,t=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=U(i);return r.hasOwnProperty(s)||(r[s]=L.try((function(){return n.apply(t,e)})).finally((function(){delete r[s]}))),r[s]}return t.reset=function(){r={}},function(n,e){try{delete n.name,n.name=e}catch(n){}return n.__name__=n.displayName=e,n}(t,((e=n).name||e.__name__||e.displayName||"anonymous")+"::promiseMemoized")}function G(){}function K(n,e){if(void 0===e&&(e=1),e>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+{}.toString.call(n)+">";if("string"==typeof n)return n;if(n instanceof Error){var r=n&&n.stack,t=n&&n.message;if(r&&t)return-1!==r.indexOf(t)?r:t+"\n"+r;if(r)return r;if(t)return t}return n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}catch(n){return"Error while stringifying error: "+K(n,e+1)}}function Y(n){return"string"==typeof n?n:n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}function Q(n){return"[object RegExp]"==={}.toString.call(n)}function V(n,e,r){if(n.hasOwnProperty(e))return n[e];var t=r();return n[e]=t,t}function X(n){return void 0===n&&(n=window),n!==window?n.__post_robot_10_0_36__:n.__post_robot_10_0_36__=n.__post_robot_10_0_36__||{}}Object.create(Error.prototype);var $=function(){return{}};function nn(n,e){return void 0===n&&(n="store"),void 0===e&&(e=$),V(X(),n,(function(){var n=e();return{has:function(e){return n.hasOwnProperty(e)},get:function(e,r){return n.hasOwnProperty(e)?n[e]:r},set:function(e,r){return n[e]=r,r},del:function(e){delete n[e]},getOrSet:function(e,r){return V(n,e,r)},reset:function(){n=e()},keys:function(){return Object.keys(n)}}}))}var en,rn=function(){};function tn(){var n=X();return n.WINDOW_WILDCARD=n.WINDOW_WILDCARD||new rn,n.WINDOW_WILDCARD}function on(n,e){return void 0===n&&(n="store"),void 0===e&&(e=$),nn("windowStore").getOrSet(n,(function(){var r=new H,t=function(n){return r.getOrSet(n,e)};return{has:function(e){return t(e).hasOwnProperty(n)},get:function(e,r){var o=t(e);return o.hasOwnProperty(n)?o[n]:r},set:function(e,r){return t(e)[n]=r,r},del:function(e){delete t(e)[n]},getOrSet:function(e,r){return V(t(e),n,r)}}}))}function an(){return nn("instance").getOrSet("instanceID",J)}function sn(n,e){var r=e.domain,t=on("helloPromises"),o=t.get(n);o&&o.resolve({domain:r});var i=L.resolve({domain:r});return t.set(n,i),i}function un(n,e){return(0,e.send)(n,"postrobot_hello",{instanceID:an()},{domain:"*",timeout:-1}).then((function(e){var r=e.origin,t=e.data.instanceID;return sn(n,{domain:r}),{win:n,domain:r,instanceID:t}}))}function cn(n,e){var r=e.send;return on("windowInstanceIDPromises").getOrSet(n,(function(){return un(n,{send:r}).then((function(n){return n.instanceID}))}))}function fn(n,e,r){void 0===e&&(e=5e3),void 0===r&&(r="Window");var t=function(n){return on("helloPromises").getOrSet(n,(function(){return new L}))}(n);return-1!==e&&(t=t.timeout(e,new Error(r+" did not load after "+e+"ms"))),t}function dn(n){on("knownWindows").set(n,!0)}function wn(n){return"object"==typeof n&&null!==n&&"string"==typeof n.__type__}function ln(n){return void 0===n?"undefined":null===n?"null":Array.isArray(n)?"array":"function"==typeof n?"function":"object"==typeof n?n instanceof Error?"error":"function"==typeof n.then?"promise":"[object RegExp]"==={}.toString.call(n)?"regex":"[object Date]"==={}.toString.call(n)?"date":"object":"string"==typeof n?"string":"number"==typeof n?"number":"boolean"==typeof n?"boolean":void 0}function hn(n,e){return{__type__:n,__val__:e}}var mn,pn=((en={}).function=function(){},en.error=function(n){return hn("error",{message:n.message,stack:n.stack,code:n.code,data:n.data})},en.promise=function(){},en.regex=function(n){return hn("regex",n.source)},en.date=function(n){return hn("date",n.toJSON())},en.array=function(n){return n},en.object=function(n){return n},en.string=function(n){return n},en.number=function(n){return n},en.boolean=function(n){return n},en.null=function(n){return n},en),vn={},gn=((mn={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},mn.error=function(n){var e=n.stack,r=n.code,t=n.data,o=new Error(n.message);return o.code=r,t&&(o.data=t),o.stack=e+"\n\n"+o.stack,o},mn.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},mn.regex=function(n){return new RegExp(n)},mn.date=function(n){return new Date(n)},mn.array=function(n){return n},mn.object=function(n){return n},mn.string=function(n){return n},mn.number=function(n){return n},mn.boolean=function(n){return n},mn.null=function(n){return n},mn),yn={};function _n(){return!!b(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function bn(n){return!k(window,n)}function En(n,e){if(n){if(f()!==O(n))return!0}else if(e&&!d(e))return!0;return!1}function Wn(n){var e=n.win,r=n.domain;return!(!_n()||r&&!En(r,e)||e&&!bn(e))}function xn(n){return"__postrobot_bridge___"+(n=n||O(n)).replace(/[^a-zA-Z0-9]+/g,"_")}function jn(){return Boolean(window.name&&window.name===xn(f()))}var kn=new L((function(n){if(window.document&&window.document.body)return n(window.document.body);var e=setInterval((function(){if(window.document&&window.document.body)return clearInterval(e),n(window.document.body)}),10)}));function Sn(n){on("remoteWindowPromises").getOrSet(n,(function(){return new L}))}function On(n){var e=on("remoteWindowPromises").get(n);if(!e)throw new Error("Remote window promise not found");return e}function Pn(n,e,r){On(n).resolve((function(t,o,i){if(t!==n)throw new Error("Remote window does not match window");if(!S(o,e))throw new Error("Remote domain "+o+" does not match domain "+e);r.fireAndForget(i)}))}function An(n,e){On(n).reject(e).catch(G)}function Mn(n){for(var e=n.win,r=n.name,t=n.domain,o=nn("popupWindowsByName"),i=on("popupWindowsByWin"),a=0,s=o.keys();a<s.length;a++){var u=s[a],c=o.get(u);c&&!_(c.win)||o.del(u)}if(_(e))return{win:e,name:r,domain:t};var f=i.getOrSet(e,(function(){return r?o.getOrSet(r,(function(){return{win:e,name:r}})):{win:e}}));if(f.win&&f.win!==e)throw new Error("Different window already linked for window: "+(r||"undefined"));return r&&(f.name=r,o.set(r,f)),t&&(f.domain=t,Sn(e)),i.set(e,f),f}function In(n){var e,r=n.on,t=n.send,o=n.receiveMessage;e=window.open,window.open=function(n,r,t,o){var i=e.call(this,function(n){if(0!==O(n).indexOf("mock:"))return n;throw new Error("Mock urls not supported out of test mode")}(n),r,t,o);return i?(Mn({win:i,name:r,domain:n?O(n):null}),i):i},function(n){var e=n.on,r=n.send,t=n.receiveMessage,o=nn("popupWindowsByName");e("postrobot_open_tunnel",(function(n){var i=n.source,a=n.origin,s=n.data,u=nn("bridges").get(a);if(!u)throw new Error("Can not find bridge promise for domain "+a);return u.then((function(n){if(i!==n)throw new Error("Message source does not matched registered bridge for domain "+a);if(!s.name)throw new Error("Register window expected to be passed window name");if(!s.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!o.has(s.name))throw new Error("Window with name "+s.name+" does not exist, or was not opened by this window");if(!o.get(s.name).domain)throw new Error("We do not have a registered domain for window "+s.name);if(o.get(s.name).domain!==a)throw new Error("Message origin "+a+" does not matched registered window origin "+o.get(s.name).domain);return Pn(o.get(s.name).win,a,s.sendMessage),{sendMessage:function(n){if(window&&!window.closed){var i=o.get(s.name);if(i)try{t({data:n,origin:i.domain,source:i.win},{on:e,send:r})}catch(n){L.reject(n)}}}}}))}))}({on:r,send:t,receiveMessage:o}),function(n){var e=n.send;X(window).openTunnelToParent=function(n){var r=n.name,t=n.source,o=n.canary,i=n.sendMessage,s=nn("tunnelWindows"),u=a(window);if(!u)throw new Error("No parent window found to open tunnel to");var c=function(n){var e=n.name,r=n.source,t=n.canary,o=n.sendMessage;!function(){for(var n=nn("tunnelWindows"),e=0,r=n.keys();e<r.length;e++){var t=r[e];_(n[t].source)&&n.del(t)}}();var i=J();return nn("tunnelWindows").set(i,{name:e,source:r,canary:t,sendMessage:o}),i}({name:r,source:t,canary:o,sendMessage:i});return e(u,"postrobot_open_tunnel",{name:r,sendMessage:function(){var n=s.get(c);if(n&&n.source&&!_(n.source)){try{n.canary()}catch(n){return}n.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:t}),function(n){var e=n.on,r=n.send,t=n.receiveMessage;L.try((function(){var n,o=s(window);if(o&&Wn({win:o}))return Sn(o),(n=o,on("remoteBridgeAwaiters").getOrSet(n,(function(){return L.try((function(){var e=E(n,xn(f()));if(e)return d(e)&&X(w(e))?e:new L((function(n){var r,t;r=setInterval((function(){if(e&&d(e)&&X(w(e)))return clearInterval(r),clearTimeout(t),n(e)}),100),t=setTimeout((function(){return clearInterval(r),n()}),2e3)}))}))}))).then((function(n){return n?window.name?X(w(n)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(n){try{window}catch(n){return}if(window&&!window.closed)try{t({data:n,origin:this.origin,source:this.source},{on:e,send:r})}catch(n){L.reject(n)}}}).then((function(n){var e=n.source,r=n.origin,t=n.data;if(e!==o)throw new Error("Source does not match opener");Pn(e,r,t.sendMessage)})).catch((function(n){throw An(o,n),n})):An(o,new Error("Can not register with opener: window does not have a name")):An(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:r,send:t,receiveMessage:o})}function zn(){for(var n=nn("idToProxyWindow"),e=0,r=n.keys();e<r.length;e++){var t=r[e];n.get(t).shouldClean()&&n.del(t)}}function Cn(n,e){var r=e.send,t=e.id,o=void 0===t?J():t,i=n.then((function(n){if(d(n))return w(n).name})),a=n.then((function(n){if(_(n))throw new Error("Window is closed, can not determine type");return s(n)?"popup":"iframe"}));return i.catch(G),a.catch(G),{id:o,getType:function(){return a},getInstanceID:Z((function(){return n.then((function(n){return cn(n,{send:r})}))})),close:function(){return n.then(A)},getName:function(){return n.then((function(n){if(!_(n))return d(n)?w(n).name:i}))},focus:function(){return n.then((function(n){n.focus()}))},isClosed:function(){return n.then((function(n){return _(n)}))},setLocation:function(e){return n.then((function(n){var r=window.location.protocol+"//"+window.location.host;if(0===e.indexOf("/"))e=""+r+e;else if(!e.match(/^https?:\/\//)&&0!==e.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(e));if(d(n))try{if(n.location&&"function"==typeof n.location.replace)return void n.location.replace(e)}catch(n){}n.location=e}))},setName:function(e){return n.then((function(n){Mn({win:n,name:e});var r=d(n),t=function(n){if(d(n))return w(n).frameElement;for(var e=0,r=document.querySelectorAll("iframe");e<r.length;e++){var t=r[e];if(t&&t.contentWindow&&t.contentWindow===n)return t}}(n);if(!r)throw new Error("Can not set name for cross-domain window: "+e);w(n).name=e,t&&t.setAttribute("name",e),i=L.resolve(e)}))}}}var Dn=function(){function n(n){var e=n.send,r=n.win,t=n.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new L,this.serializedWindow=t||Cn(this.actualWindowPromise,{send:e}),nn("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{send:e})}var e=n.prototype;return e.getID=function(){return this.serializedWindow.id},e.getType=function(){return this.serializedWindow.getType()},e.isPopup=function(){return this.getType().then((function(n){return"popup"===n}))},e.setLocation=function(n){var e=this;return this.serializedWindow.setLocation(n).then((function(){return e}))},e.getName=function(){return this.serializedWindow.getName()},e.setName=function(n){var e=this;return this.serializedWindow.setName(n).then((function(){return e}))},e.close=function(){var n=this;return this.serializedWindow.close().then((function(){return n}))},e.focus=function(){var n=this,e=this.isPopup(),r=this.getName(),t=L.hash({isPopup:e,name:r}).then((function(n){var e=n.name;n.isPopup&&e&&window.open("",e)})),o=this.serializedWindow.focus();return L.all([t,o]).then((function(){return n}))},e.isClosed=function(){return this.serializedWindow.isClosed()},e.getWindow=function(){return this.actualWindow},e.setWindow=function(n,e){var r=e.send;this.actualWindow=n,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Cn(this.actualWindowPromise,{send:r,id:this.getID()}),on("winToProxyWindow").set(n,this)},e.awaitWindow=function(){return this.actualWindowPromise},e.matchWindow=function(n,e){var r=this,t=e.send;return L.try((function(){return r.actualWindow?n===r.actualWindow:L.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:cn(n,{send:t})}).then((function(e){var o=e.proxyInstanceID===e.knownWindowInstanceID;return o&&r.setWindow(n,{send:t}),o}))}))},e.unwrap=function(){return this.actualWindow||this},e.getInstanceID=function(){return this.serializedWindow.getInstanceID()},e.shouldClean=function(){return Boolean(this.actualWindow&&_(this.actualWindow))},e.serialize=function(){return this.serializedWindow},n.unwrap=function(e){return n.isProxyWindow(e)?e.unwrap():e},n.serialize=function(e,r){var t=r.send;return zn(),n.toProxyWindow(e,{send:t}).serialize()},n.deserialize=function(e,r){var t=r.send;return zn(),nn("idToProxyWindow").get(e.id)||new n({serializedWindow:e,send:t})},n.isProxyWindow=function(n){return Boolean(n&&!P(n)&&n.isProxyWindow)},n.toProxyWindow=function(e,r){var t=r.send;if(zn(),n.isProxyWindow(e))return e;var o=e;return on("winToProxyWindow").get(o)||new n({win:o,send:t})},n}();function Rn(n,e,r,t,o){var i=on("methodStore"),a=nn("proxyWindowMethods");Dn.isProxyWindow(t)?a.set(n,{val:e,name:r,domain:o,source:t}):(a.del(n),i.getOrSet(t,(function(){return{}}))[n]={domain:o,name:r,val:e,source:t})}function Nn(n,e){var r=on("methodStore"),t=nn("proxyWindowMethods");return r.getOrSet(n,(function(){return{}}))[e]||t.get(e)}function Tn(n,e,r,t,o){var i,a,s;a=(i={on:o.on,send:o.send}).on,s=i.send,nn("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(n){var e=n.source,r=n.origin,t=n.data,o=t.id,i=t.name,a=Nn(e,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+t.id+" in "+f(window));var u=a.source,c=a.domain,d=a.val;return L.try((function(){if(!S(c,r))throw new Error("Method '"+t.name+"' domain "+JSON.stringify(Q(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+f(window));if(Dn.isProxyWindow(u))return u.matchWindow(e,{send:s}).then((function(n){if(!n)throw new Error("Method call '"+t.name+"' failed - proxy window does not match source in "+f(window))}))})).then((function(){return d.apply({source:e,origin:r},t.args)}),(function(n){return L.try((function(){if(d.onError)return d.onError(n)})).then((function(){var e,r;throw n.stack&&(n.stack="Remote call to "+i+"("+(void 0===(e=t.args)&&(e=[]),(r=e,[].slice.call(r)).map((function(n){return"string"==typeof n?"'"+n+"'":void 0===n?"undefined":null===n?"null":"boolean"==typeof n?n.toString():Array.isArray(n)?"[ ... ]":"object"==typeof n?"{ ... }":"function"==typeof n?"() => { ... }":"<"+typeof n+">"})).join(", ")+") failed\n\n")+n.stack),n}))})).then((function(n){return{result:n,id:o,name:i}}))}))}));var u=r.__id__||J();n=Dn.unwrap(n);var c=r.__name__||r.name||t;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",t+"::")),Dn.isProxyWindow(n)?(Rn(u,r,c,n,e),n.awaitWindow().then((function(n){Rn(u,r,c,n,e)}))):Rn(u,r,c,n,e),hn("cross_domain_function",{id:u,name:c})}function Ln(n,e,r,t){var o,i=t.on,a=t.send;return function(n,e){void 0===e&&(e=vn);var r=JSON.stringify(n,(function(n){var r=this[n];if(wn(this))return r;var t=ln(r);if(!t)return r;var o=e[t]||pn[t];return o?o(r,n):r}));return void 0===r?"undefined":r}(r,((o={}).promise=function(r,t){return function(n,e,r,t,o){return hn("cross_domain_zalgo_promise",{then:Tn(n,e,(function(n,e){return r.then(n,e)}),t,{on:o.on,send:o.send})})}(n,e,r,t,{on:i,send:a})},o.function=function(r,t){return Tn(n,e,r,t,{on:i,send:a})},o.object=function(n){return P(n)||Dn.isProxyWindow(n)?hn("cross_domain_window",Dn.serialize(n,{send:a})):n},o))}function Bn(n,e,r,t){var o,i=t.send;return function(n,e){if(void 0===e&&(e=yn),"undefined"!==n)return JSON.parse(n,(function(n,r){if(wn(this))return r;var t,o;if(wn(r)?(t=r.__type__,o=r.__val__):(t=ln(r),o=r),!t)return o;var i=e[t]||gn[t];return i?i(o,n):o}))}(r,((o={}).cross_domain_zalgo_promise=function(n){return function(n,e,r){return new L(r.then)}(0,0,n)},o.cross_domain_function=function(r){return function(n,e,r,t){var o=r.id,i=r.name,a=t.send,s=function(r){function t(){var s=arguments;return Dn.toProxyWindow(n,{send:a}).awaitWindow().then((function(n){var u=Nn(n,o);if(u&&u.val!==t)return u.val.apply({source:window,origin:f()},s);var c={domain:e,fireAndForget:r.fireAndForget},d=[].slice.call(s);return a(n,"postrobot_method",{id:o,name:i,args:d},c).then((function(n){if(!r.fireAndForget)return n.data.result}))})).catch((function(n){throw n}))}return void 0===r&&(r={}),t.__name__=i,t.__origin__=e,t.__source__=n,t.__id__=o,t.origin=e,t},u=s();return u.fireAndForget=s({fireAndForget:!0}),u}(n,e,r,{send:i})},o.cross_domain_window=function(n){return Dn.deserialize(n,{send:i})},o))}var Fn,qn={};function Hn(n,e,r,t){var o,i=t.on,a=t.send;if(_(n))throw new Error("Window is closed");for(var s=Ln(n,e,((o={}).__post_robot_10_0_36__=B({id:J(),origin:f(window)},r),o),{on:i,send:a}),u=Object.keys(qn),c=[],d=0;d<u.length;d++){var w=u[d];try{qn[w](n,s,e)}catch(n){c.push(n)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(n,e){return e+". "+K(n)})).join("\n\n"))}function Jn(n){return nn("responseListeners").get(n)}function Un(n){nn("responseListeners").del(n)}function Zn(n){return nn("erroredResponseListeners").has(n)}function Gn(n){var e=n.name,r=n.win,t=n.domain,o=on("requestListeners");if("*"===r&&(r=null),"*"===t&&(t=null),!e)throw new Error("Name required to get request listener");for(var i=0,a=[r,tn()];i<a.length;i++){var s=a[i];if(s){var u=o.get(s);if(u){var c=u[e];if(c){if(t&&"string"==typeof t){if(c[t])return c[t];if(c.__domain_regex__)for(var f=0,d=c.__domain_regex__;f<d.length;f++){var w=d[f],l=w.listener;if(S(w.regex,t))return l}}if(c["*"])return c["*"]}}}}}qn.postrobot_post_message=function(n,e,r){(Array.isArray(r)?r:"string"==typeof r?[r]:["*"]).map((function(n){return 0===n.indexOf("file:")?"*":n})).forEach((function(r){n.postMessage(e,r)}))},qn.postrobot_bridge=function(n,e,r){if(!_n()&&!jn())throw new Error("Bridge not needed for browser");if(d(n))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==k(window,n))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(n,e,r){var t=W(window,n),o=W(n,window);if(!t&&!o)throw new Error("Can only send messages to and from parent and popup windows");On(n).then((function(t){return t(n,e,r)}))}(n,r,e)},qn.postrobot_global=function(n,e){if(!b(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!d(n))throw new Error("Post message through global disabled between different domain windows");if(!1!==k(window,n))throw new Error("Can only use global to communicate between two different windows, not between frames");var r=X(n);if(!r)throw new Error("Can not find postRobot global on foreign window");r.receiveMessage({source:window,origin:f(),data:e})};var Kn=((Fn={}).postrobot_message_request=function(n,e,r,t){var o=t.on,i=t.send,a=Gn({name:r.name,win:n,domain:e}),s="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function u(t,a,u){if(void 0===u&&(u={}),!r.fireAndForget&&!_(n))try{Hn(n,e,B({type:t,ack:a,hash:r.hash,name:r.name},u),{on:o,send:i})}catch(n){throw new Error("Send response message failed for "+s+" in "+f()+"\n\n"+K(n))}}return L.all([u("postrobot_message_ack"),L.try((function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!S(a.domain,e))throw new Error("Request origin "+e+" does not match domain "+a.domain.toString());return a.handler({source:n,origin:e,data:r.data})})).then((function(n){return u("postrobot_message_response","success",{data:n})}),(function(n){return u("postrobot_message_response","error",{error:n})}))]).then(G).catch((function(n){if(a&&a.handleError)return a.handleError(n);throw n}))},Fn.postrobot_message_ack=function(n,e,r){if(!Zn(r.hash)){var t=Jn(r.hash);if(!t)throw new Error("No handler found for post message ack for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!S(t.domain,e))throw new Error("Ack origin "+e+" does not match domain "+t.domain.toString());if(n!==t.win)throw new Error("Ack source does not match registered window")}catch(n){t.promise.reject(n)}t.ack=!0}},Fn.postrobot_message_response=function(n,e,r){if(!Zn(r.hash)){var o,i=Jn(r.hash);if(!i)throw new Error("No handler found for post message response for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!S(i.domain,e))throw new Error("Response origin "+e+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":t(o)?"RegExp("+o.toString():o.toString()));if(n!==i.win)throw new Error("Response source does not match registered window");Un(r.hash),"error"===r.ack?i.promise.reject(r.error):"success"===r.ack&&i.promise.resolve({source:n,origin:e,data:r.data})}},Fn);function Yn(n,e){var r=e.on,t=e.send,o=nn("receivedMessages");try{if(!window||window.closed||!n.source)return}catch(n){return}var i=n.source,a=n.origin,s=function(n,e,r,t){var o,i=t.on,a=t.send;try{o=Bn(e,r,n,{on:i,send:a})}catch(n){return}if(o&&"object"==typeof o&&null!==o&&(o=o.__post_robot_10_0_36__)&&"object"==typeof o&&null!==o&&o.type&&"string"==typeof o.type&&Kn[o.type])return o}(n.data,i,a,{on:r,send:t});s&&(dn(i),o.has(s.id)||(o.set(s.id,!0),_(i)&&!s.fireAndForget||(0===s.origin.indexOf("file:")&&(a="file://"),Kn[s.type](i,a,s,{on:r,send:t}))))}function Qn(n,e,r){if(!n)throw new Error("Expected name");if("function"==typeof e&&(r=e,e={}),!r)throw new Error("Expected handler");(e=e||{}).name=n,e.handler=r||e.handler;var t=e.window,o=e.domain,i=function n(e,r){var t=e.name,o=e.win,i=e.domain,a=on("requestListeners");if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var s=[],u=0,c=o;u<c.length;u++)s.push(n({name:t,domain:i,win:c[u]},r));return{cancel:function(){for(var n=0;n<s.length;n++)s[n].cancel()}}}if(Array.isArray(i)){for(var f=[],d=0,w=i;d<w.length;d++)f.push(n({name:t,win:o,domain:w[d]},r));return{cancel:function(){for(var n=0;n<f.length;n++)f[n].cancel()}}}var l=Gn({name:t,win:o,domain:i});if(o&&"*"!==o||(o=tn()),i=i||"*",l)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===tn()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===tn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var h,m,p=a.getOrSet(o,(function(){return{}})),v=V(p,t,(function(){return{}})),g=i.toString();return Q(i)?(h=V(v,"__domain_regex__",(function(){return[]}))).push(m={regex:i,listener:r}):v[g]=r,{cancel:function(){delete v[g],m&&(h.splice(h.indexOf(m,1)),h.length||delete v.__domain_regex__),Object.keys(v).length||delete p[t],o&&!Object.keys(p).length&&a.del(o)}}}({name:n,win:t,domain:o},{handler:e.handler,handleError:e.errorHandler||function(n){throw n},window:t,domain:o||"*",name:n});return{cancel:function(){i.cancel()}}}function Vn(n,e,r){"function"==typeof(e=e||{})&&(r=e,e={});var t,o=new L;return e.errorHandler=function(n){t.cancel(),o.reject(n)},t=Qn(n,e,(function(n){if(t.cancel(),o.resolve(n),r)return r(n)})),o.cancel=t.cancel,o}var Xn=function n(e,r,t,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,s=o.timeout||5e3,u=o.fireAndForget||!1;return L.try((function(){if(function(n,e,r){if(!n)throw new Error("Expected name");if(r&&"string"!=typeof r&&!Array.isArray(r)&&!Q(r))throw new TypeError("Expected domain to be a string, array, or regex");if(_(e))throw new Error("Target window is closed")}(r,e,i),function(n,e){var r=x(e);if(r)return r===n;if(e===n)return!1;if(p(e)===e)return!1;for(var t=0,o=h(n);t<o.length;t++)if(o[t]===e)return!0;return!1}(window,e))return fn(e,s)})).then((function(r){return function(n,e,r,t){var o=t.send;return"string"==typeof e?L.resolve(e):L.try((function(){return r||un(n,{send:o}).then((function(n){return n.domain}))})).then((function(n){if(!S(e,e))throw new Error("Domain "+Y(e)+" does not match "+Y(e));return n}))}(e,i,(void 0===r?{}:r).domain,{send:n})})).then((function(o){i=o;var s,c,d="postrobot_method"===r&&t&&"string"==typeof t.name?t.name+"()":r,w=new L,l=r+"_"+J();if(!u){var h={name:r,win:e,domain:i,promise:w};!function(n,e){nn("responseListeners").set(n,e)}(l,h);var m=on("requestPromises").getOrSet(e,(function(){return[]}));m.push(w),w.catch((function(){!function(n){nn("erroredResponseListeners").set(n,!0)}(l),Un(l)}));var p=function(n){return on("knownWindows").get(n,!1)}(e)?1e4:2e3,v=a,g=p,y=v,b=(s=function(){return _(e)?w.reject(new Error("Window closed for "+r+" before "+(h.ack?"response":"ack"))):h.cancelled?w.reject(new Error("Response listener was cancelled for "+r)):(g=Math.max(g-500,0),-1!==y&&(y=Math.max(y-500,0)),h.ack||0!==g?0===y?w.reject(new Error("No response for postMessage "+d+" in "+f()+" in "+v+"ms")):void 0:w.reject(new Error("No ack for postMessage "+d+" in "+f()+" in "+p+"ms")))},500,function n(){c=setTimeout((function(){s(),n()}),500)}(),{cancel:function(){clearTimeout(c)}});w.finally((function(){b.cancel(),m.splice(m.indexOf(w,1))})).catch(G)}try{Hn(e,i,{type:"postrobot_message_request",hash:l,name:r,data:t,fireAndForget:u},{on:Qn,send:n})}catch(n){throw new Error("Send request message failed for "+d+" in "+f()+"\n\n"+K(n))}return u?w.resolve():w}))};function $n(n,e,r){return Ln(n,e,r,{on:Qn,send:Xn})}function ne(n,e,r){return Bn(n,e,r,{on:Qn,send:Xn})}function ee(n){return new Dn({send:Xn,win:n})}function re(n){return Dn.toProxyWindow(n,{send:Xn})}function te(){var n,e,r,t;X().initialized||(X().initialized=!0,e=(n={on:Qn,send:Xn}).on,r=n.send,(t=X()).receiveMessage=t.receiveMessage||function(n){return Yn(n,{on:e,send:r})},function(n){var e=n.on,r=n.send;nn().getOrSet("postMessageListener",(function(){return(n=window).addEventListener("message",t=function(n){!function(n,e){var r=e.on,t=e.send,o=n.source||n.sourceElement,i=n.origin||n.originalEvent&&n.originalEvent.origin,a=n.data;if("null"===i&&(i="file://"),o){if(!i)throw new Error("Post message did not have origin domain");Yn({source:o,origin:i,data:a},{on:r,send:t})}}(n,{on:e,send:r})}),{cancel:function(){n.removeEventListener("message",t)}};var n,t}))}({on:Qn,send:Xn}),In({on:Qn,send:Xn,receiveMessage:Yn}),function(n){var e=n.on,r=n.send;nn("builtinListeners").getOrSet("helloListener",(function(){var n=e("postrobot_hello",{domain:"*"},(function(n){return sn(n.source,{domain:n.origin}),{instanceID:an()}})),t=x();return t&&un(t,{send:r}).catch(G),n}))}({on:Qn,send:Xn}))}function oe(){var n;!function(){for(var n=nn("responseListeners"),e=0,r=n.keys();e<r.length;e++){var t=r[e],o=n.get(t);o&&(o.cancelled=!0),n.del(t)}}(),(n=nn().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_36__}var ie,ae=!0;function se(n){for(var e=0,r=on("requestPromises").get(n,[]);e<r.length;e++)r[e].reject(new Error("Window "+(_(n)?"closed":"cleaned up")+" before response")).catch(G)}ie={setupBridge:In,openBridge:function(n,e){var r=nn("bridges"),t=nn("bridgeFrames");return e=e||O(n),r.getOrSet(e,(function(){return L.try((function(){if(f()===e)throw new Error("Can not open bridge on the same domain as current domain: "+e);var r=xn(e);if(E(window,r))throw new Error("Frame with name "+r+" already exists on page");var o=function(n,e){var r=document.createElement("iframe");return r.setAttribute("name",n),r.setAttribute("id",n),r.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),r.setAttribute("frameborder","0"),r.setAttribute("border","0"),r.setAttribute("scrolling","no"),r.setAttribute("allowTransparency","true"),r.setAttribute("tabindex","-1"),r.setAttribute("hidden","true"),r.setAttribute("title",""),r.setAttribute("role","presentation"),r.src=e,r}(r,n);return t.set(e,o),kn.then((function(e){e.appendChild(o);var r=o.contentWindow;return new L((function(n,e){o.addEventListener("load",n),o.addEventListener("error",e)})).then((function(){return fn(r,5e3,"Bridge "+n)})).then((function(){return r}))}))}))}))},linkWindow:Mn,linkUrl:function(n,e){Mn({win:n,domain:O(e)})},isBridge:jn,needsBridge:Wn,needsBridgeForBrowser:_n,hasBridge:function(n,e){return nn("bridges").has(e||O(n))},needsBridgeForWin:bn,needsBridgeForDomain:En,destroyBridges:function(){for(var n=nn("bridges"),e=nn("bridgeFrames"),r=0,t=e.keys();r<t.length;r++){var o=e.get(t[r]);o&&o.parentNode&&o.parentNode.removeChild(o)}e.reset(),n.reset()}},te()}])}));
//# sourceMappingURL=post-robot.ie.min.js.map

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

!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("postRobot",[],e):"object"==typeof exports?exports.postRobot=e():n.postRobot=e()}("undefined"!=typeof self?self:this,(function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)r.d(t,o,function(e){return n[e]}.bind(null,o));return t},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return{}.hasOwnProperty.call(n,e)},r.p="",r(r.s=0)}([function(n,e,r){"use strict";function t(n){return"[object RegExp]"==={}.toString.call(n)}r.r(e),r.d(e,"Promise",(function(){return A})),r.d(e,"TYPES",(function(){return Rn})),r.d(e,"ProxyWindow",(function(){return ln})),r.d(e,"setup",(function(){return Mn})),r.d(e,"destroy",(function(){return Nn})),r.d(e,"serializeMessage",(function(){return An})),r.d(e,"deserializeMessage",(function(){return In})),r.d(e,"createProxyWindow",(function(){return zn})),r.d(e,"toProxyWindow",(function(){return Dn})),r.d(e,"on",(function(){return Sn})),r.d(e,"once",(function(){return Pn})),r.d(e,"send",(function(){return On})),r.d(e,"markWindowKnown",(function(){return nn})),r.d(e,"cleanUpWindow",(function(){return Cn})),r.d(e,"bridge",(function(){}));var o="Call was rejected by callee.\r\n";function i(n){return void 0===n&&(n=window),"about:"===n.location.protocol}function a(n){if(void 0===n&&(n=window),n)try{if(n.parent&&n.parent!==n)return n.parent}catch(n){}}function u(n){if(void 0===n&&(n=window),n&&!a(n))try{return n.opener}catch(n){}}function s(n){try{return!0}catch(n){}return!1}function c(n){void 0===n&&(n=window);var e=n.location;if(!e)throw new Error("Can not read window location");var r=e.protocol;if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var t=a(n);return t&&s()?c(t):"about://"}var o=e.host;if(!o)throw new Error("Can not read window host");return r+"//"+o}function f(n){void 0===n&&(n=window);var e=c(n);return e&&n.mockDomain&&0===n.mockDomain.indexOf("mock:")?n.mockDomain:e}function d(n){if(!function(n){try{if(n===window)return!0}catch(n){}try{var e=Object.getOwnPropertyDescriptor(n,"location");if(e&&!1===e.enumerable)return!1}catch(n){}try{if(i(n)&&s())return!0}catch(n){}try{if(c(n)===c(window))return!0}catch(n){}return!1}(n))return!1;try{if(n===window)return!0;if(i(n)&&s())return!0;if(f(window)===f(n))return!0}catch(n){}return!1}function l(n){if(!d(n))throw new Error("Expected window to be same domain");return n}function h(n,e){if(!n||!e)return!1;var r=a(e);return r?r===n:-1!==function(n){var e=[];try{for(;n.parent!==n;)e.push(n.parent),n=n.parent}catch(n){}return e}(e).indexOf(n)}function w(n){var e,r,t=[];try{e=n.frames}catch(r){e=n}try{r=e.length}catch(n){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=e[o]}catch(n){continue}t.push(i)}return t}for(var a=0;a<100;a++){var u=void 0;try{u=e[a]}catch(n){return t}if(!u)return t;t.push(u)}return t}var p=[],m=[];function v(n,e){void 0===e&&(e=!0);try{if(n===window)return!1}catch(n){return!0}try{if(!n)return!0}catch(n){return!0}try{if(n.closed)return!0}catch(n){return!n||n.message!==o}if(e&&d(n))try{if(n.mockclosed)return!0}catch(n){}try{if(!n.parent||!n.top)return!0}catch(n){}var r=function(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}(p,n);if(-1!==r){var t=m[r];if(t&&function(n){if(!n.contentWindow)return!0;if(!n.parentNode)return!0;var e=n.ownerDocument;if(e&&e.documentElement&&!e.documentElement.contains(n)){for(var r=n;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!e.documentElement.contains(r.host))return!0}return!1}(t))return!0}return!1}function y(n){return void 0===n&&(n=window),u(n=n||window)||a(n)||void 0}function g(n,e){if("string"==typeof n){if("string"==typeof e)return"*"===n||e===n;if(t(e))return!1;if(Array.isArray(e))return!1}return t(n)?t(e)?n.toString()===e.toString():!Array.isArray(e)&&Boolean(e.match(n)):!!Array.isArray(n)&&(Array.isArray(e)?JSON.stringify(n)===JSON.stringify(e):!t(e)&&n.some((function(n){return g(n,e)})))}function _(n){try{if(n===window)return!0}catch(n){if(n&&n.message===o)return!0}try{if("[object Window]"==={}.toString.call(n))return!0}catch(n){if(n&&n.message===o)return!0}try{if(window.Window&&n instanceof window.Window)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.self===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.parent===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.top===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&"__unlikely_value__"===n.__cross_domain_utils_window_check__)return!1}catch(n){return!0}return!1}function b(n){try{n.close()}catch(n){}}function W(n){try{if(!n)return!1;if("undefined"!=typeof Promise&&n instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&n instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&n instanceof window.constructor)return!1;var e={}.toString;if(e){var r=e.call(n);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof n.then)return!0}catch(n){return!1}return!1}var x,E=[],j=[],k=0;function S(){if(!k&&x){var n=x;x=null,n.resolve()}}function P(){k+=1}function O(){k-=1,S()}var A=function(){function n(n){var e=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var r,t,o=!1,i=!1,a=!1;P();try{n((function(n){a?e.resolve(n):(o=!0,r=n)}),(function(n){a?e.reject(n):(i=!0,t=n)}))}catch(n){return O(),void this.reject(n)}O(),a=!0,o?this.resolve(r):i&&this.reject(t)}}var e=n.prototype;return e.resolve=function(n){if(this.resolved||this.rejected)return this;if(W(n))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=n,this.dispatch(),this},e.reject=function(n){var e=this;if(this.resolved||this.rejected)return this;if(W(n))throw new Error("Can not reject promise with another promise");if(!n){var r=n&&"function"==typeof n.toString?n.toString():{}.toString.call(n);n=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=n,this.errorHandled||setTimeout((function(){e.errorHandled||function(n,e){if(-1===E.indexOf(n)){E.push(n),setTimeout((function(){throw n}),1);for(var r=0;r<j.length;r++)j[r](n,e)}}(n,e)}),1),this.dispatch(),this},e.asyncReject=function(n){return this.errorHandled=!0,this.reject(n),this},e.dispatch=function(){var e=this.resolved,r=this.rejected,t=this.handlers;if(!this.dispatching&&(e||r)){this.dispatching=!0,P();for(var o=function(n,e){return n.then((function(n){e.resolve(n)}),(function(n){e.reject(n)}))},i=0;i<t.length;i++){var a=t[i],u=a.onSuccess,s=a.onError,c=a.promise,f=void 0;if(e)try{f=u?u(this.value):this.value}catch(n){c.reject(n);continue}else if(r){if(!s){c.reject(this.error);continue}try{f=s(this.error)}catch(n){c.reject(n);continue}}f instanceof n&&(f.resolved||f.rejected)?(f.resolved?c.resolve(f.value):c.reject(f.error),f.errorHandled=!0):W(f)?f instanceof n&&(f.resolved||f.rejected)?f.resolved?c.resolve(f.value):c.reject(f.error):o(f,c):c.resolve(f)}t.length=0,this.dispatching=!1,O()}},e.then=function(e,r){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new n;return this.handlers.push({promise:t,onSuccess:e,onError:r}),this.errorHandled=!0,this.dispatch(),t},e.catch=function(n){return this.then(void 0,n)},e.finally=function(e){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.finally expected a function");return this.then((function(r){return n.try(e).then((function(){return r}))}),(function(r){return n.try(e).then((function(){throw r}))}))},e.timeout=function(n,e){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout((function(){r.resolved||r.rejected||r.reject(e||new Error("Promise timed out after "+n+"ms"))}),n);return this.then((function(n){return clearTimeout(t),n}))},e.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.resolve=function(e){return e instanceof n?e:W(e)?new n((function(n,r){return e.then(n,r)})):(new n).resolve(e)},n.reject=function(e){return(new n).reject(e)},n.asyncReject=function(e){return(new n).asyncReject(e)},n.all=function(e){var r=new n,t=e.length,o=[];if(!t)return r.resolve(o),r;for(var i=function(n,e,i){return e.then((function(e){o[n]=e,0==(t-=1)&&r.resolve(o)}),(function(n){i.reject(n)}))},a=0;a<e.length;a++){var u=e[a];if(u instanceof n){if(u.resolved){o[a]=u.value,t-=1;continue}}else if(!W(u)){o[a]=u,t-=1;continue}i(a,n.resolve(u),r)}return 0===t&&r.resolve(o),r},n.hash=function(e){var r={};return n.all(Object.keys(e).map((function(t){return n.resolve(e[t]).then((function(n){r[t]=n}))}))).then((function(){return r}))},n.map=function(e,r){return n.all(e.map(r))},n.onPossiblyUnhandledException=function(n){return function(n){return j.push(n),{cancel:function(){j.splice(j.indexOf(n),1)}}}(n)},n.try=function(e,r,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var o;P();try{o=e.apply(r,t||[])}catch(e){return O(),n.reject(e)}return O(),n.resolve(o)},n.delay=function(e){return new n((function(n){setTimeout(n,e)}))},n.isPromise=function(e){return!!(e&&e instanceof n)||W(e)},n.flush=function(){return e=x=x||new n,S(),e;var e},n}();function I(){return(I=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)({}).hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n}).apply(this,arguments)}function z(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}var D,M=function(){function n(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var n=new WeakMap,e={};return Object.freeze(e),n.set(e,"__testvalue__"),"__testvalue__"===n.get(e)}catch(n){return!1}}())try{this.weakmap=new WeakMap}catch(n){}this.keys=[],this.values=[]}var e=n.prototype;return e._cleanupClosedWindows=function(){for(var n=this.weakmap,e=this.keys,r=0;r<e.length;r++){var t=e[r];if(_(t)&&v(t)){if(n)try{n.delete(t)}catch(n){}e.splice(r,1),this.values.splice(r,1),r-=1}}},e.isSafeToReadWrite=function(n){return!_(n)},e.set=function(n,e){if(!n)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(n,e)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=this.name,o=n[t];return void(o&&o[0]===n?o[1]=e:Object.defineProperty(n,t,{value:[n,e],writable:!0}))}catch(n){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=z(i,n);-1===u?(i.push(n),a.push(e)):a[u]=e},e.get=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return e.get(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return r&&r[0]===n?r[1]:void 0}catch(n){}this._cleanupClosedWindows();var t=z(this.keys,n);if(-1!==t)return this.values[t]},e.delete=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{e.delete(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];r&&r[0]===n&&(r[0]=r[1]=void 0)}catch(n){}this._cleanupClosedWindows();var t=this.keys,o=z(t,n);-1!==o&&(t.splice(o,1),this.values.splice(o,1))},e.has=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return!(!r||r[0]!==n)}catch(n){}return this._cleanupClosedWindows(),-1!==z(this.keys,n)},e.getOrSet=function(n,e){if(this.has(n))return this.get(n);var r=e();return this.set(n,r),r},n}();function N(){var n="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return n.charAt(Math.floor(Math.random()*n.length))}))+"_"+function(n){if("function"==typeof btoa)return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode(parseInt(e,16))})));if("undefined"!=typeof Buffer)return Buffer.from(n,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function R(n){try{return JSON.stringify([].slice.call(n),(function(n,e){return"function"==typeof e?"memoize["+function(n){if(D=D||new M,null==n||"object"!=typeof n&&"function"!=typeof n)throw new Error("Invalid object");var e=D.get(n);return e||(e=typeof n+":"+N(),D.set(n,e)),e}(e)+"]":e}))}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}function C(n){var e,r={};function t(){for(var e=arguments,t=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=R(i);return r.hasOwnProperty(u)||(r[u]=A.try((function(){return n.apply(t,e)})).finally((function(){delete r[u]}))),r[u]}return t.reset=function(){r={}},function(n,e){try{delete n.name,n.name=e}catch(n){}return n.__name__=n.displayName=e,n}(t,((e=n).name||e.__name__||e.displayName||"anonymous")+"::promiseMemoized")}function T(){}function L(n,e){if(void 0===e&&(e=1),e>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+{}.toString.call(n)+">";if("string"==typeof n)return n;if(n instanceof Error){var r=n&&n.stack,t=n&&n.message;if(r&&t)return-1!==r.indexOf(t)?r:t+"\n"+r;if(r)return r;if(t)return t}return n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}catch(n){return"Error while stringifying error: "+L(n,e+1)}}function q(n){return"string"==typeof n?n:n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}function F(n){return"[object RegExp]"==={}.toString.call(n)}function H(n,e,r){if(n.hasOwnProperty(e))return n[e];var t=r();return n[e]=t,t}function J(n){return void 0===n&&(n=window),n!==window?n.__post_robot_10_0_35__:n.__post_robot_10_0_35__=n.__post_robot_10_0_35__||{}}Object.create(Error.prototype);var B=function(){return{}};function U(n,e){return void 0===n&&(n="store"),void 0===e&&(e=B),H(J(),n,(function(){var n=e();return{has:function(e){return n.hasOwnProperty(e)},get:function(e,r){return n.hasOwnProperty(e)?n[e]:r},set:function(e,r){return n[e]=r,r},del:function(e){delete n[e]},getOrSet:function(e,r){return H(n,e,r)},reset:function(){n=e()},keys:function(){return Object.keys(n)}}}))}var K,Y=function(){};function Z(){var n=J();return n.WINDOW_WILDCARD=n.WINDOW_WILDCARD||new Y,n.WINDOW_WILDCARD}function G(n,e){return void 0===n&&(n="store"),void 0===e&&(e=B),U("windowStore").getOrSet(n,(function(){var r=new M,t=function(n){return r.getOrSet(n,e)};return{has:function(e){return t(e).hasOwnProperty(n)},get:function(e,r){var o=t(e);return o.hasOwnProperty(n)?o[n]:r},set:function(e,r){return t(e)[n]=r,r},del:function(e){delete t(e)[n]},getOrSet:function(e,r){return H(t(e),n,r)}}}))}function Q(){return U("instance").getOrSet("instanceID",N)}function V(n,e){var r=e.domain,t=G("helloPromises"),o=t.get(n);o&&o.resolve({domain:r});var i=A.resolve({domain:r});return t.set(n,i),i}function X(n,e){return(0,e.send)(n,"postrobot_hello",{instanceID:Q()},{domain:"*",timeout:-1}).then((function(e){var r=e.origin,t=e.data.instanceID;return V(n,{domain:r}),{win:n,domain:r,instanceID:t}}))}function $(n,e){var r=e.send;return G("windowInstanceIDPromises").getOrSet(n,(function(){return X(n,{send:r}).then((function(n){return n.instanceID}))}))}function nn(n){G("knownWindows").set(n,!0)}function en(n){return"object"==typeof n&&null!==n&&"string"==typeof n.__type__}function rn(n){return void 0===n?"undefined":null===n?"null":Array.isArray(n)?"array":"function"==typeof n?"function":"object"==typeof n?n instanceof Error?"error":"function"==typeof n.then?"promise":"[object RegExp]"==={}.toString.call(n)?"regex":"[object Date]"==={}.toString.call(n)?"date":"object":"string"==typeof n?"string":"number"==typeof n?"number":"boolean"==typeof n?"boolean":void 0}function tn(n,e){return{__type__:n,__val__:e}}var on,an=((K={}).function=function(){},K.error=function(n){return tn("error",{message:n.message,stack:n.stack,code:n.code,data:n.data})},K.promise=function(){},K.regex=function(n){return tn("regex",n.source)},K.date=function(n){return tn("date",n.toJSON())},K.array=function(n){return n},K.object=function(n){return n},K.string=function(n){return n},K.number=function(n){return n},K.boolean=function(n){return n},K.null=function(n){return n},K),un={},sn=((on={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},on.error=function(n){var e=n.stack,r=n.code,t=n.data,o=new Error(n.message);return o.code=r,t&&(o.data=t),o.stack=e+"\n\n"+o.stack,o},on.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},on.regex=function(n){return new RegExp(n)},on.date=function(n){return new Date(n)},on.array=function(n){return n},on.object=function(n){return n},on.string=function(n){return n},on.number=function(n){return n},on.boolean=function(n){return n},on.null=function(n){return n},on),cn={};function fn(){for(var n=U("idToProxyWindow"),e=0,r=n.keys();e<r.length;e++){var t=r[e];n.get(t).shouldClean()&&n.del(t)}}function dn(n,e){var r=e.send,t=e.id,o=void 0===t?N():t,i=n.then((function(n){if(d(n))return l(n).name}));return{id:o,getType:function(){return n.then((function(n){return u(n)?"popup":"iframe"}))},getInstanceID:C((function(){return n.then((function(n){return $(n,{send:r})}))})),close:function(){return n.then(b)},getName:function(){return n.then((function(n){if(!v(n))return d(n)?l(n).name:i}))},focus:function(){return n.then((function(n){n.focus()}))},isClosed:function(){return n.then((function(n){return v(n)}))},setLocation:function(e){return n.then((function(n){var r=window.location.protocol+"//"+window.location.host;if(0===e.indexOf("/"))e=""+r+e;else if(!e.match(/^https?:\/\//)&&0!==e.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(e));if(d(n))try{if(n.location&&"function"==typeof n.location.replace)return void n.location.replace(e)}catch(n){}n.location=e}))},setName:function(e){return n.then((function(n){var r=d(n),t=function(n){if(d(n))return l(n).frameElement;for(var e=0,r=document.querySelectorAll("iframe");e<r.length;e++){var t=r[e];if(t&&t.contentWindow&&t.contentWindow===n)return t}}(n);if(!r)throw new Error("Can not set name for cross-domain window: "+e);l(n).name=e,t&&t.setAttribute("name",e),i=A.resolve(e)}))}}}new A((function(n){if(window.document&&window.document.body)return n(window.document.body);var e=setInterval((function(){if(window.document&&window.document.body)return clearInterval(e),n(window.document.body)}),10)}));var ln=function(){function n(n){var e=n.send,r=n.win,t=n.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new A,this.serializedWindow=t||dn(this.actualWindowPromise,{send:e}),U("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{send:e})}var e=n.prototype;return e.getID=function(){return this.serializedWindow.id},e.getType=function(){return this.serializedWindow.getType()},e.isPopup=function(){return this.getType().then((function(n){return"popup"===n}))},e.setLocation=function(n){var e=this;return this.serializedWindow.setLocation(n).then((function(){return e}))},e.getName=function(){return this.serializedWindow.getName()},e.setName=function(n){var e=this;return this.serializedWindow.setName(n).then((function(){return e}))},e.close=function(){var n=this;return this.serializedWindow.close().then((function(){return n}))},e.focus=function(){var n=this,e=this.isPopup(),r=this.getName(),t=A.hash({isPopup:e,name:r}).then((function(n){var e=n.name;n.isPopup&&e&&window.open("",e)})),o=this.serializedWindow.focus();return A.all([t,o]).then((function(){return n}))},e.isClosed=function(){return this.serializedWindow.isClosed()},e.getWindow=function(){return this.actualWindow},e.setWindow=function(n,e){var r=e.send;this.actualWindow=n,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=dn(this.actualWindowPromise,{send:r,id:this.getID()}),G("winToProxyWindow").set(n,this)},e.awaitWindow=function(){return this.actualWindowPromise},e.matchWindow=function(n,e){var r=this,t=e.send;return A.try((function(){return r.actualWindow?n===r.actualWindow:A.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:$(n,{send:t})}).then((function(e){var o=e.proxyInstanceID===e.knownWindowInstanceID;return o&&r.setWindow(n,{send:t}),o}))}))},e.unwrap=function(){return this.actualWindow||this},e.getInstanceID=function(){return this.serializedWindow.getInstanceID()},e.shouldClean=function(){return Boolean(this.actualWindow&&v(this.actualWindow))},e.serialize=function(){return this.serializedWindow},n.unwrap=function(e){return n.isProxyWindow(e)?e.unwrap():e},n.serialize=function(e,r){var t=r.send;return fn(),n.toProxyWindow(e,{send:t}).serialize()},n.deserialize=function(e,r){var t=r.send;return fn(),U("idToProxyWindow").get(e.id)||new n({serializedWindow:e,send:t})},n.isProxyWindow=function(n){return Boolean(n&&!_(n)&&n.isProxyWindow)},n.toProxyWindow=function(e,r){var t=r.send;if(fn(),n.isProxyWindow(e))return e;var o=e;return G("winToProxyWindow").get(o)||new n({win:o,send:t})},n}();function hn(n,e,r,t,o){var i=G("methodStore"),a=U("proxyWindowMethods");ln.isProxyWindow(t)?a.set(n,{val:e,name:r,domain:o,source:t}):(a.del(n),i.getOrSet(t,(function(){return{}}))[n]={domain:o,name:r,val:e,source:t})}function wn(n,e){var r=G("methodStore"),t=U("proxyWindowMethods");return r.getOrSet(n,(function(){return{}}))[e]||t.get(e)}function pn(n,e,r,t,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,U("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(n){var e=n.source,r=n.origin,t=n.data,o=t.id,i=t.name,a=wn(e,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+t.id+" in "+f(window));var s=a.source,c=a.domain,d=a.val;return A.try((function(){if(!g(c,r))throw new Error("Method '"+t.name+"' domain "+JSON.stringify(F(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+f(window));if(ln.isProxyWindow(s))return s.matchWindow(e,{send:u}).then((function(n){if(!n)throw new Error("Method call '"+t.name+"' failed - proxy window does not match source in "+f(window))}))})).then((function(){return d.apply({source:e,origin:r},t.args)}),(function(n){return A.try((function(){if(d.onError)return d.onError(n)})).then((function(){var e,r;throw n.stack&&(n.stack="Remote call to "+i+"("+(void 0===(e=t.args)&&(e=[]),(r=e,[].slice.call(r)).map((function(n){return"string"==typeof n?"'"+n+"'":void 0===n?"undefined":null===n?"null":"boolean"==typeof n?n.toString():Array.isArray(n)?"[ ... ]":"object"==typeof n?"{ ... }":"function"==typeof n?"() => { ... }":"<"+typeof n+">"})).join(", ")+") failed\n\n")+n.stack),n}))})).then((function(n){return{result:n,id:o,name:i}}))}))}));var s=r.__id__||N();n=ln.unwrap(n);var c=r.__name__||r.name||t;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",t+"::")),ln.isProxyWindow(n)?(hn(s,r,c,n,e),n.awaitWindow().then((function(n){hn(s,r,c,n,e)}))):hn(s,r,c,n,e),tn("cross_domain_function",{id:s,name:c})}function mn(n,e,r,t){var o,i=t.on,a=t.send;return function(n,e){void 0===e&&(e=un);var r=JSON.stringify(n,(function(n){var r=this[n];if(en(this))return r;var t=rn(r);if(!t)return r;var o=e[t]||an[t];return o?o(r,n):r}));return void 0===r?"undefined":r}(r,((o={}).promise=function(r,t){return function(n,e,r,t,o){return tn("cross_domain_zalgo_promise",{then:pn(n,e,(function(n,e){return r.then(n,e)}),t,{on:o.on,send:o.send})})}(n,e,r,t,{on:i,send:a})},o.function=function(r,t){return pn(n,e,r,t,{on:i,send:a})},o.object=function(n){return _(n)||ln.isProxyWindow(n)?tn("cross_domain_window",ln.serialize(n,{send:a})):n},o))}function vn(n,e,r,t){var o,i=t.send;return function(n,e){if(void 0===e&&(e=cn),"undefined"!==n)return JSON.parse(n,(function(n,r){if(en(this))return r;var t,o;if(en(r)?(t=r.__type__,o=r.__val__):(t=rn(r),o=r),!t)return o;var i=e[t]||sn[t];return i?i(o,n):o}))}(r,((o={}).cross_domain_zalgo_promise=function(n){return function(n,e,r){return new A(r.then)}(0,0,n)},o.cross_domain_function=function(r){return function(n,e,r,t){var o=r.id,i=r.name,a=t.send,u=function(r){function t(){var u=arguments;return ln.toProxyWindow(n,{send:a}).awaitWindow().then((function(n){var s=wn(n,o);if(s&&s.val!==t)return s.val.apply({source:window,origin:f()},u);var c={domain:e,fireAndForget:r.fireAndForget},d=[].slice.call(u);return a(n,"postrobot_method",{id:o,name:i,args:d},c).then((function(n){if(!r.fireAndForget)return n.data.result}))})).catch((function(n){throw n}))}return void 0===r&&(r={}),t.__name__=i,t.__origin__=e,t.__source__=n,t.__id__=o,t.origin=e,t},s=u();return s.fireAndForget=u({fireAndForget:!0}),s}(n,e,r,{send:i})},o.cross_domain_window=function(n){return ln.deserialize(n,{send:i})},o))}var yn,gn={};function _n(n,e,r,t){var o,i=t.on,a=t.send;if(v(n))throw new Error("Window is closed");for(var u=mn(n,e,((o={}).__post_robot_10_0_35__=I({id:N(),origin:f(window)},r),o),{on:i,send:a}),s=Object.keys(gn),c=[],d=0;d<s.length;d++){var l=s[d];try{gn[l](n,u,e)}catch(n){c.push(n)}}if(c.length===s.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(n,e){return e+". "+L(n)})).join("\n\n"))}function bn(n){return U("responseListeners").get(n)}function Wn(n){U("responseListeners").del(n)}function xn(n){return U("erroredResponseListeners").has(n)}function En(n){var e=n.name,r=n.win,t=n.domain,o=G("requestListeners");if("*"===r&&(r=null),"*"===t&&(t=null),!e)throw new Error("Name required to get request listener");for(var i=0,a=[r,Z()];i<a.length;i++){var u=a[i];if(u){var s=o.get(u);if(s){var c=s[e];if(c){if(t&&"string"==typeof t){if(c[t])return c[t];if(c.__domain_regex__)for(var f=0,d=c.__domain_regex__;f<d.length;f++){var l=d[f],h=l.listener;if(g(l.regex,t))return h}}if(c["*"])return c["*"]}}}}}gn.postrobot_post_message=function(n,e,r){(Array.isArray(r)?r:"string"==typeof r?[r]:["*"]).map((function(n){return 0===n.indexOf("file:")?"*":n})).forEach((function(r){n.postMessage(e,r)}))};var jn=((yn={}).postrobot_message_request=function(n,e,r,t){var o=t.on,i=t.send,a=En({name:r.name,win:n,domain:e}),u="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function s(t,a,s){if(void 0===s&&(s={}),!r.fireAndForget&&!v(n))try{_n(n,e,I({type:t,ack:a,hash:r.hash,name:r.name},s),{on:o,send:i})}catch(n){throw new Error("Send response message failed for "+u+" in "+f()+"\n\n"+L(n))}}return A.all([s("postrobot_message_ack"),A.try((function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(a.domain,e))throw new Error("Request origin "+e+" does not match domain "+a.domain.toString());return a.handler({source:n,origin:e,data:r.data})})).then((function(n){return s("postrobot_message_response","success",{data:n})}),(function(n){return s("postrobot_message_response","error",{error:n})}))]).then(T).catch((function(n){if(a&&a.handleError)return a.handleError(n);throw n}))},yn.postrobot_message_ack=function(n,e,r){if(!xn(r.hash)){var t=bn(r.hash);if(!t)throw new Error("No handler found for post message ack for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!g(t.domain,e))throw new Error("Ack origin "+e+" does not match domain "+t.domain.toString());if(n!==t.win)throw new Error("Ack source does not match registered window")}catch(n){t.promise.reject(n)}t.ack=!0}},yn.postrobot_message_response=function(n,e,r){if(!xn(r.hash)){var o,i=bn(r.hash);if(!i)throw new Error("No handler found for post message response for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(i.domain,e))throw new Error("Response origin "+e+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":t(o)?"RegExp("+o.toString():o.toString()));if(n!==i.win)throw new Error("Response source does not match registered window");Wn(r.hash),"error"===r.ack?i.promise.reject(r.error):"success"===r.ack&&i.promise.resolve({source:n,origin:e,data:r.data})}},yn);function kn(n,e){var r=e.on,t=e.send,o=U("receivedMessages");try{if(!window||window.closed||!n.source)return}catch(n){return}var i=n.source,a=n.origin,u=function(n,e,r,t){var o,i=t.on,a=t.send;try{o=vn(e,r,n,{on:i,send:a})}catch(n){return}if(o&&"object"==typeof o&&null!==o&&(o=o.__post_robot_10_0_35__)&&"object"==typeof o&&null!==o&&o.type&&"string"==typeof o.type&&jn[o.type])return o}(n.data,i,a,{on:r,send:t});u&&(nn(i),o.has(u.id)||(o.set(u.id,!0),v(i)&&!u.fireAndForget||(0===u.origin.indexOf("file:")&&(a="file://"),jn[u.type](i,a,u,{on:r,send:t}))))}function Sn(n,e,r){if(!n)throw new Error("Expected name");if("function"==typeof e&&(r=e,e={}),!r)throw new Error("Expected handler");(e=e||{}).name=n,e.handler=r||e.handler;var t=e.window,o=e.domain,i=function n(e,r){var t=e.name,o=e.win,i=e.domain,a=G("requestListeners");if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var u=[],s=0,c=o;s<c.length;s++)u.push(n({name:t,domain:i,win:c[s]},r));return{cancel:function(){for(var n=0;n<u.length;n++)u[n].cancel()}}}if(Array.isArray(i)){for(var f=[],d=0,l=i;d<l.length;d++)f.push(n({name:t,win:o,domain:l[d]},r));return{cancel:function(){for(var n=0;n<f.length;n++)f[n].cancel()}}}var h=En({name:t,win:o,domain:i});if(o&&"*"!==o||(o=Z()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===Z()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===Z()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var w,p,m=a.getOrSet(o,(function(){return{}})),v=H(m,t,(function(){return{}})),y=i.toString();return F(i)?(w=H(v,"__domain_regex__",(function(){return[]}))).push(p={regex:i,listener:r}):v[y]=r,{cancel:function(){delete v[y],p&&(w.splice(w.indexOf(p,1)),w.length||delete v.__domain_regex__),Object.keys(v).length||delete m[t],o&&!Object.keys(m).length&&a.del(o)}}}({name:n,win:t,domain:o},{handler:e.handler,handleError:e.errorHandler||function(n){throw n},window:t,domain:o||"*",name:n});return{cancel:function(){i.cancel()}}}function Pn(n,e,r){"function"==typeof(e=e||{})&&(r=e,e={});var t,o=new A;return e.errorHandler=function(n){t.cancel(),o.reject(n)},t=Sn(n,e,(function(n){if(t.cancel(),o.resolve(n),r)return r(n)})),o.cancel=t.cancel,o}var On=function n(e,r,t,o){var i=(o=o||{}).domain||"*",u=o.timeout||-1,s=o.timeout||5e3,c=o.fireAndForget||!1;return A.try((function(){if(function(n,e,r){if(!n)throw new Error("Expected name");if(r&&"string"!=typeof r&&!Array.isArray(r)&&!F(r))throw new TypeError("Expected domain to be a string, array, or regex");if(v(e))throw new Error("Target window is closed")}(r,e,i),function(n,e){var r=y(e);if(r)return r===n;if(e===n)return!1;if(function(n){void 0===n&&(n=window);try{if(n.top)return n.top}catch(n){}if(a(n)===n)return n;try{if(h(window,n)&&window.top)return window.top}catch(n){}try{if(h(n,window)&&window.top)return window.top}catch(n){}for(var e=0,r=function n(e){for(var r=[],t=0,o=w(e);t<o.length;t++){var i=o[t];r.push(i);for(var a=0,u=n(i);a<u.length;a++)r.push(u[a])}return r}(n);e<r.length;e++){var t=r[e];try{if(t.top)return t.top}catch(n){}if(a(t)===t)return t}}(e)===e)return!1;for(var t=0,o=w(n);t<o.length;t++)if(o[t]===e)return!0;return!1}(window,e))return function(n,e,r){void 0===e&&(e=5e3),void 0===r&&(r="Window");var t=function(n){return G("helloPromises").getOrSet(n,(function(){return new A}))}(n);return-1!==e&&(t=t.timeout(e,new Error(r+" did not load after "+e+"ms"))),t}(e,s)})).then((function(r){return function(n,e,r,t){var o=t.send;return"string"==typeof e?A.resolve(e):A.try((function(){return r||X(n,{send:o}).then((function(n){return n.domain}))})).then((function(n){if(!g(e,e))throw new Error("Domain "+q(e)+" does not match "+q(e));return n}))}(e,i,(void 0===r?{}:r).domain,{send:n})})).then((function(o){i=o;var a,s,d="postrobot_method"===r&&t&&"string"==typeof t.name?t.name+"()":r,l=new A,h=r+"_"+N();if(!c){var w={name:r,win:e,domain:i,promise:l};!function(n,e){U("responseListeners").set(n,e)}(h,w);var p=G("requestPromises").getOrSet(e,(function(){return[]}));p.push(l),l.catch((function(){!function(n){U("erroredResponseListeners").set(n,!0)}(h),Wn(h)}));var m=function(n){return G("knownWindows").get(n,!1)}(e)?1e4:2e3,y=u,g=m,_=y,b=(a=function(){return v(e)?l.reject(new Error("Window closed for "+r+" before "+(w.ack?"response":"ack"))):w.cancelled?l.reject(new Error("Response listener was cancelled for "+r)):(g=Math.max(g-500,0),-1!==_&&(_=Math.max(_-500,0)),w.ack||0!==g?0===_?l.reject(new Error("No response for postMessage "+d+" in "+f()+" in "+y+"ms")):void 0:l.reject(new Error("No ack for postMessage "+d+" in "+f()+" in "+m+"ms")))},500,function n(){s=setTimeout((function(){a(),n()}),500)}(),{cancel:function(){clearTimeout(s)}});l.finally((function(){b.cancel(),p.splice(p.indexOf(l,1))})).catch(T)}try{_n(e,i,{type:"postrobot_message_request",hash:h,name:r,data:t,fireAndForget:c},{on:Sn,send:n})}catch(n){throw new Error("Send request message failed for "+d+" in "+f()+"\n\n"+L(n))}return c?l.resolve():l}))};function An(n,e,r){return mn(n,e,r,{on:Sn,send:On})}function In(n,e,r){return vn(n,e,r,{on:Sn,send:On})}function zn(n){return new ln({send:On,win:n})}function Dn(n){return ln.toProxyWindow(n,{send:On})}function Mn(){var n,e,r,t;J().initialized||(J().initialized=!0,e=(n={on:Sn,send:On}).on,r=n.send,(t=J()).receiveMessage=t.receiveMessage||function(n){return kn(n,{on:e,send:r})},function(n){var e=n.on,r=n.send;U().getOrSet("postMessageListener",(function(){return(n=window).addEventListener("message",t=function(n){!function(n,e){var r=e.on,t=e.send,o=n.source||n.sourceElement,i=n.origin||n.originalEvent&&n.originalEvent.origin,a=n.data;if("null"===i&&(i="file://"),o){if(!i)throw new Error("Post message did not have origin domain");kn({source:o,origin:i,data:a},{on:r,send:t})}}(n,{on:e,send:r})}),{cancel:function(){n.removeEventListener("message",t)}};var n,t}))}({on:Sn,send:On}),function(n){var e=n.on,r=n.send;U("builtinListeners").getOrSet("helloListener",(function(){var n=e("postrobot_hello",{domain:"*"},(function(n){return V(n.source,{domain:n.origin}),{instanceID:Q()}})),t=y();return t&&X(t,{send:r}).catch(T),n}))}({on:Sn,send:On}))}function Nn(){var n;!function(){for(var n=U("responseListeners"),e=0,r=n.keys();e<r.length;e++){var t=r[e],o=n.get(t);o&&(o.cancelled=!0),n.del(t)}}(),(n=U().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_35__}var Rn=!0;function Cn(n){for(var e=0,r=G("requestPromises").get(n,[]);e<r.length;e++)r[e].reject(new Error("Window "+(v(n)?"closed":"cleaned up")+" before response")).catch(T)}Mn()}])}));
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("postRobot",[],e):"object"==typeof exports?exports.postRobot=e():n.postRobot=e()}("undefined"!=typeof self?self:this,(function(){return function(n){var e={};function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,e){if(1&e&&(n=r(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)r.d(t,o,function(e){return n[e]}.bind(null,o));return t},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,e){return{}.hasOwnProperty.call(n,e)},r.p="",r(r.s=0)}([function(n,e,r){"use strict";function t(n){return"[object RegExp]"==={}.toString.call(n)}r.r(e),r.d(e,"Promise",(function(){return A})),r.d(e,"TYPES",(function(){return Rn})),r.d(e,"ProxyWindow",(function(){return ln})),r.d(e,"setup",(function(){return Mn})),r.d(e,"destroy",(function(){return Nn})),r.d(e,"serializeMessage",(function(){return An})),r.d(e,"deserializeMessage",(function(){return In})),r.d(e,"createProxyWindow",(function(){return zn})),r.d(e,"toProxyWindow",(function(){return Dn})),r.d(e,"on",(function(){return Sn})),r.d(e,"once",(function(){return Pn})),r.d(e,"send",(function(){return On})),r.d(e,"markWindowKnown",(function(){return nn})),r.d(e,"cleanUpWindow",(function(){return Cn})),r.d(e,"bridge",(function(){}));var o="Call was rejected by callee.\r\n";function i(n){return void 0===n&&(n=window),"about:"===n.location.protocol}function a(n){if(void 0===n&&(n=window),n)try{if(n.parent&&n.parent!==n)return n.parent}catch(n){}}function u(n){if(void 0===n&&(n=window),n&&!a(n))try{return n.opener}catch(n){}}function s(n){try{return!0}catch(n){}return!1}function c(n){void 0===n&&(n=window);var e=n.location;if(!e)throw new Error("Can not read window location");var r=e.protocol;if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var t=a(n);return t&&s()?c(t):"about://"}var o=e.host;if(!o)throw new Error("Can not read window host");return r+"//"+o}function f(n){void 0===n&&(n=window);var e=c(n);return e&&n.mockDomain&&0===n.mockDomain.indexOf("mock:")?n.mockDomain:e}function d(n){if(!function(n){try{if(n===window)return!0}catch(n){}try{var e=Object.getOwnPropertyDescriptor(n,"location");if(e&&!1===e.enumerable)return!1}catch(n){}try{if(i(n)&&s())return!0}catch(n){}try{if(c(n)===c(window))return!0}catch(n){}return!1}(n))return!1;try{if(n===window)return!0;if(i(n)&&s())return!0;if(f(window)===f(n))return!0}catch(n){}return!1}function l(n){if(!d(n))throw new Error("Expected window to be same domain");return n}function h(n,e){if(!n||!e)return!1;var r=a(e);return r?r===n:-1!==function(n){var e=[];try{for(;n.parent!==n;)e.push(n.parent),n=n.parent}catch(n){}return e}(e).indexOf(n)}function w(n){var e,r,t=[];try{e=n.frames}catch(r){e=n}try{r=e.length}catch(n){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=e[o]}catch(n){continue}t.push(i)}return t}for(var a=0;a<100;a++){var u=void 0;try{u=e[a]}catch(n){return t}if(!u)return t;t.push(u)}return t}var p=[],m=[];function v(n,e){void 0===e&&(e=!0);try{if(n===window)return!1}catch(n){return!0}try{if(!n)return!0}catch(n){return!0}try{if(n.closed)return!0}catch(n){return!n||n.message!==o}if(e&&d(n))try{if(n.mockclosed)return!0}catch(n){}try{if(!n.parent||!n.top)return!0}catch(n){}var r=function(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}(p,n);if(-1!==r){var t=m[r];if(t&&function(n){if(!n.contentWindow)return!0;if(!n.parentNode)return!0;var e=n.ownerDocument;if(e&&e.documentElement&&!e.documentElement.contains(n)){for(var r=n;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!e.documentElement.contains(r.host))return!0}return!1}(t))return!0}return!1}function y(n){return void 0===n&&(n=window),u(n=n||window)||a(n)||void 0}function g(n,e){if("string"==typeof n){if("string"==typeof e)return"*"===n||e===n;if(t(e))return!1;if(Array.isArray(e))return!1}return t(n)?t(e)?n.toString()===e.toString():!Array.isArray(e)&&Boolean(e.match(n)):!!Array.isArray(n)&&(Array.isArray(e)?JSON.stringify(n)===JSON.stringify(e):!t(e)&&n.some((function(n){return g(n,e)})))}function _(n){try{if(n===window)return!0}catch(n){if(n&&n.message===o)return!0}try{if("[object Window]"==={}.toString.call(n))return!0}catch(n){if(n&&n.message===o)return!0}try{if(window.Window&&n instanceof window.Window)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.self===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.parent===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&n.top===n)return!0}catch(n){if(n&&n.message===o)return!0}try{if(n&&"__unlikely_value__"===n.__cross_domain_utils_window_check__)return!1}catch(n){return!0}try{if("postMessage"in n&&"self"in n&&"location"in n)return!0}catch(n){}return!1}function W(n){try{n.close()}catch(n){}}function b(n){try{if(!n)return!1;if("undefined"!=typeof Promise&&n instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&n instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&n instanceof window.constructor)return!1;var e={}.toString;if(e){var r=e.call(n);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof n.then)return!0}catch(n){return!1}return!1}var E,x=[],j=[],k=0;function S(){if(!k&&E){var n=E;E=null,n.resolve()}}function P(){k+=1}function O(){k-=1,S()}var A=function(){function n(n){var e=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var r,t,o=!1,i=!1,a=!1;P();try{n((function(n){a?e.resolve(n):(o=!0,r=n)}),(function(n){a?e.reject(n):(i=!0,t=n)}))}catch(n){return O(),void this.reject(n)}O(),a=!0,o?this.resolve(r):i&&this.reject(t)}}var e=n.prototype;return e.resolve=function(n){if(this.resolved||this.rejected)return this;if(b(n))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=n,this.dispatch(),this},e.reject=function(n){var e=this;if(this.resolved||this.rejected)return this;if(b(n))throw new Error("Can not reject promise with another promise");if(!n){var r=n&&"function"==typeof n.toString?n.toString():{}.toString.call(n);n=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=n,this.errorHandled||setTimeout((function(){e.errorHandled||function(n,e){if(-1===x.indexOf(n)){x.push(n),setTimeout((function(){throw n}),1);for(var r=0;r<j.length;r++)j[r](n,e)}}(n,e)}),1),this.dispatch(),this},e.asyncReject=function(n){return this.errorHandled=!0,this.reject(n),this},e.dispatch=function(){var e=this.resolved,r=this.rejected,t=this.handlers;if(!this.dispatching&&(e||r)){this.dispatching=!0,P();for(var o=function(n,e){return n.then((function(n){e.resolve(n)}),(function(n){e.reject(n)}))},i=0;i<t.length;i++){var a=t[i],u=a.onSuccess,s=a.onError,c=a.promise,f=void 0;if(e)try{f=u?u(this.value):this.value}catch(n){c.reject(n);continue}else if(r){if(!s){c.reject(this.error);continue}try{f=s(this.error)}catch(n){c.reject(n);continue}}f instanceof n&&(f.resolved||f.rejected)?(f.resolved?c.resolve(f.value):c.reject(f.error),f.errorHandled=!0):b(f)?f instanceof n&&(f.resolved||f.rejected)?f.resolved?c.resolve(f.value):c.reject(f.error):o(f,c):c.resolve(f)}t.length=0,this.dispatching=!1,O()}},e.then=function(e,r){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new n;return this.handlers.push({promise:t,onSuccess:e,onError:r}),this.errorHandled=!0,this.dispatch(),t},e.catch=function(n){return this.then(void 0,n)},e.finally=function(e){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.finally expected a function");return this.then((function(r){return n.try(e).then((function(){return r}))}),(function(r){return n.try(e).then((function(){throw r}))}))},e.timeout=function(n,e){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout((function(){r.resolved||r.rejected||r.reject(e||new Error("Promise timed out after "+n+"ms"))}),n);return this.then((function(n){return clearTimeout(t),n}))},e.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.resolve=function(e){return e instanceof n?e:b(e)?new n((function(n,r){return e.then(n,r)})):(new n).resolve(e)},n.reject=function(e){return(new n).reject(e)},n.asyncReject=function(e){return(new n).asyncReject(e)},n.all=function(e){var r=new n,t=e.length,o=[];if(!t)return r.resolve(o),r;for(var i=function(n,e,i){return e.then((function(e){o[n]=e,0==(t-=1)&&r.resolve(o)}),(function(n){i.reject(n)}))},a=0;a<e.length;a++){var u=e[a];if(u instanceof n){if(u.resolved){o[a]=u.value,t-=1;continue}}else if(!b(u)){o[a]=u,t-=1;continue}i(a,n.resolve(u),r)}return 0===t&&r.resolve(o),r},n.hash=function(e){var r={};return n.all(Object.keys(e).map((function(t){return n.resolve(e[t]).then((function(n){r[t]=n}))}))).then((function(){return r}))},n.map=function(e,r){return n.all(e.map(r))},n.onPossiblyUnhandledException=function(n){return function(n){return j.push(n),{cancel:function(){j.splice(j.indexOf(n),1)}}}(n)},n.try=function(e,r,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var o;P();try{o=e.apply(r,t||[])}catch(e){return O(),n.reject(e)}return O(),n.resolve(o)},n.delay=function(e){return new n((function(n){setTimeout(n,e)}))},n.isPromise=function(e){return!!(e&&e instanceof n)||b(e)},n.flush=function(){return e=E=E||new n,S(),e;var e},n}();function I(){return(I=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)({}).hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n}).apply(this,arguments)}function z(n,e){for(var r=0;r<n.length;r++)try{if(n[r]===e)return r}catch(n){}return-1}var D,M=function(){function n(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var n=new WeakMap,e={};return Object.freeze(e),n.set(e,"__testvalue__"),"__testvalue__"===n.get(e)}catch(n){return!1}}())try{this.weakmap=new WeakMap}catch(n){}this.keys=[],this.values=[]}var e=n.prototype;return e._cleanupClosedWindows=function(){for(var n=this.weakmap,e=this.keys,r=0;r<e.length;r++){var t=e[r];if(_(t)&&v(t)){if(n)try{n.delete(t)}catch(n){}e.splice(r,1),this.values.splice(r,1),r-=1}}},e.isSafeToReadWrite=function(n){return!_(n)},e.set=function(n,e){if(!n)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(n,e)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var t=this.name,o=n[t];return void(o&&o[0]===n?o[1]=e:Object.defineProperty(n,t,{value:[n,e],writable:!0}))}catch(n){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=z(i,n);-1===u?(i.push(n),a.push(e)):a[u]=e},e.get=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return e.get(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return r&&r[0]===n?r[1]:void 0}catch(n){}this._cleanupClosedWindows();var t=z(this.keys,n);if(-1!==t)return this.values[t]},e.delete=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{e.delete(n)}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];r&&r[0]===n&&(r[0]=r[1]=void 0)}catch(n){}this._cleanupClosedWindows();var t=this.keys,o=z(t,n);-1!==o&&(t.splice(o,1),this.values.splice(o,1))},e.has=function(n){if(!n)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{if(e.has(n))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(n))try{var r=n[this.name];return!(!r||r[0]!==n)}catch(n){}return this._cleanupClosedWindows(),-1!==z(this.keys,n)},e.getOrSet=function(n,e){if(this.has(n))return this.get(n);var r=e();return this.set(n,r),r},n}();function N(){var n="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return n.charAt(Math.floor(Math.random()*n.length))}))+"_"+function(n){if("function"==typeof btoa)return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(function(n,e){return String.fromCharCode(parseInt(e,16))})));if("undefined"!=typeof Buffer)return Buffer.from(n,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function R(n){try{return JSON.stringify([].slice.call(n),(function(n,e){return"function"==typeof e?"memoize["+function(n){if(D=D||new M,null==n||"object"!=typeof n&&"function"!=typeof n)throw new Error("Invalid object");var e=D.get(n);return e||(e=typeof n+":"+N(),D.set(n,e)),e}(e)+"]":e}))}catch(n){throw new Error("Arguments not serializable -- can not be used to memoize")}}function C(n){var e,r={};function t(){for(var e=arguments,t=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=R(i);return r.hasOwnProperty(u)||(r[u]=A.try((function(){return n.apply(t,e)})).finally((function(){delete r[u]}))),r[u]}return t.reset=function(){r={}},function(n,e){try{delete n.name,n.name=e}catch(n){}return n.__name__=n.displayName=e,n}(t,((e=n).name||e.__name__||e.displayName||"anonymous")+"::promiseMemoized")}function T(){}function L(n,e){if(void 0===e&&(e=1),e>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+{}.toString.call(n)+">";if("string"==typeof n)return n;if(n instanceof Error){var r=n&&n.stack,t=n&&n.message;if(r&&t)return-1!==r.indexOf(t)?r:t+"\n"+r;if(r)return r;if(t)return t}return n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}catch(n){return"Error while stringifying error: "+L(n,e+1)}}function q(n){return"string"==typeof n?n:n&&n.toString&&"function"==typeof n.toString?n.toString():{}.toString.call(n)}function F(n){return"[object RegExp]"==={}.toString.call(n)}function H(n,e,r){if(n.hasOwnProperty(e))return n[e];var t=r();return n[e]=t,t}function J(n){return void 0===n&&(n=window),n!==window?n.__post_robot_10_0_36__:n.__post_robot_10_0_36__=n.__post_robot_10_0_36__||{}}Object.create(Error.prototype);var B=function(){return{}};function U(n,e){return void 0===n&&(n="store"),void 0===e&&(e=B),H(J(),n,(function(){var n=e();return{has:function(e){return n.hasOwnProperty(e)},get:function(e,r){return n.hasOwnProperty(e)?n[e]:r},set:function(e,r){return n[e]=r,r},del:function(e){delete n[e]},getOrSet:function(e,r){return H(n,e,r)},reset:function(){n=e()},keys:function(){return Object.keys(n)}}}))}var K,Y=function(){};function Z(){var n=J();return n.WINDOW_WILDCARD=n.WINDOW_WILDCARD||new Y,n.WINDOW_WILDCARD}function G(n,e){return void 0===n&&(n="store"),void 0===e&&(e=B),U("windowStore").getOrSet(n,(function(){var r=new M,t=function(n){return r.getOrSet(n,e)};return{has:function(e){return t(e).hasOwnProperty(n)},get:function(e,r){var o=t(e);return o.hasOwnProperty(n)?o[n]:r},set:function(e,r){return t(e)[n]=r,r},del:function(e){delete t(e)[n]},getOrSet:function(e,r){return H(t(e),n,r)}}}))}function Q(){return U("instance").getOrSet("instanceID",N)}function V(n,e){var r=e.domain,t=G("helloPromises"),o=t.get(n);o&&o.resolve({domain:r});var i=A.resolve({domain:r});return t.set(n,i),i}function X(n,e){return(0,e.send)(n,"postrobot_hello",{instanceID:Q()},{domain:"*",timeout:-1}).then((function(e){var r=e.origin,t=e.data.instanceID;return V(n,{domain:r}),{win:n,domain:r,instanceID:t}}))}function $(n,e){var r=e.send;return G("windowInstanceIDPromises").getOrSet(n,(function(){return X(n,{send:r}).then((function(n){return n.instanceID}))}))}function nn(n){G("knownWindows").set(n,!0)}function en(n){return"object"==typeof n&&null!==n&&"string"==typeof n.__type__}function rn(n){return void 0===n?"undefined":null===n?"null":Array.isArray(n)?"array":"function"==typeof n?"function":"object"==typeof n?n instanceof Error?"error":"function"==typeof n.then?"promise":"[object RegExp]"==={}.toString.call(n)?"regex":"[object Date]"==={}.toString.call(n)?"date":"object":"string"==typeof n?"string":"number"==typeof n?"number":"boolean"==typeof n?"boolean":void 0}function tn(n,e){return{__type__:n,__val__:e}}var on,an=((K={}).function=function(){},K.error=function(n){return tn("error",{message:n.message,stack:n.stack,code:n.code,data:n.data})},K.promise=function(){},K.regex=function(n){return tn("regex",n.source)},K.date=function(n){return tn("date",n.toJSON())},K.array=function(n){return n},K.object=function(n){return n},K.string=function(n){return n},K.number=function(n){return n},K.boolean=function(n){return n},K.null=function(n){return n},K),un={},sn=((on={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},on.error=function(n){var e=n.stack,r=n.code,t=n.data,o=new Error(n.message);return o.code=r,t&&(o.data=t),o.stack=e+"\n\n"+o.stack,o},on.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},on.regex=function(n){return new RegExp(n)},on.date=function(n){return new Date(n)},on.array=function(n){return n},on.object=function(n){return n},on.string=function(n){return n},on.number=function(n){return n},on.boolean=function(n){return n},on.null=function(n){return n},on),cn={};function fn(){for(var n=U("idToProxyWindow"),e=0,r=n.keys();e<r.length;e++){var t=r[e];n.get(t).shouldClean()&&n.del(t)}}function dn(n,e){var r=e.send,t=e.id,o=void 0===t?N():t,i=n.then((function(n){if(d(n))return l(n).name})),a=n.then((function(n){if(v(n))throw new Error("Window is closed, can not determine type");return u(n)?"popup":"iframe"}));return i.catch(T),a.catch(T),{id:o,getType:function(){return a},getInstanceID:C((function(){return n.then((function(n){return $(n,{send:r})}))})),close:function(){return n.then(W)},getName:function(){return n.then((function(n){if(!v(n))return d(n)?l(n).name:i}))},focus:function(){return n.then((function(n){n.focus()}))},isClosed:function(){return n.then((function(n){return v(n)}))},setLocation:function(e){return n.then((function(n){var r=window.location.protocol+"//"+window.location.host;if(0===e.indexOf("/"))e=""+r+e;else if(!e.match(/^https?:\/\//)&&0!==e.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(e));if(d(n))try{if(n.location&&"function"==typeof n.location.replace)return void n.location.replace(e)}catch(n){}n.location=e}))},setName:function(e){return n.then((function(n){var r=d(n),t=function(n){if(d(n))return l(n).frameElement;for(var e=0,r=document.querySelectorAll("iframe");e<r.length;e++){var t=r[e];if(t&&t.contentWindow&&t.contentWindow===n)return t}}(n);if(!r)throw new Error("Can not set name for cross-domain window: "+e);l(n).name=e,t&&t.setAttribute("name",e),i=A.resolve(e)}))}}}new A((function(n){if(window.document&&window.document.body)return n(window.document.body);var e=setInterval((function(){if(window.document&&window.document.body)return clearInterval(e),n(window.document.body)}),10)}));var ln=function(){function n(n){var e=n.send,r=n.win,t=n.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new A,this.serializedWindow=t||dn(this.actualWindowPromise,{send:e}),U("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{send:e})}var e=n.prototype;return e.getID=function(){return this.serializedWindow.id},e.getType=function(){return this.serializedWindow.getType()},e.isPopup=function(){return this.getType().then((function(n){return"popup"===n}))},e.setLocation=function(n){var e=this;return this.serializedWindow.setLocation(n).then((function(){return e}))},e.getName=function(){return this.serializedWindow.getName()},e.setName=function(n){var e=this;return this.serializedWindow.setName(n).then((function(){return e}))},e.close=function(){var n=this;return this.serializedWindow.close().then((function(){return n}))},e.focus=function(){var n=this,e=this.isPopup(),r=this.getName(),t=A.hash({isPopup:e,name:r}).then((function(n){var e=n.name;n.isPopup&&e&&window.open("",e)})),o=this.serializedWindow.focus();return A.all([t,o]).then((function(){return n}))},e.isClosed=function(){return this.serializedWindow.isClosed()},e.getWindow=function(){return this.actualWindow},e.setWindow=function(n,e){var r=e.send;this.actualWindow=n,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=dn(this.actualWindowPromise,{send:r,id:this.getID()}),G("winToProxyWindow").set(n,this)},e.awaitWindow=function(){return this.actualWindowPromise},e.matchWindow=function(n,e){var r=this,t=e.send;return A.try((function(){return r.actualWindow?n===r.actualWindow:A.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:$(n,{send:t})}).then((function(e){var o=e.proxyInstanceID===e.knownWindowInstanceID;return o&&r.setWindow(n,{send:t}),o}))}))},e.unwrap=function(){return this.actualWindow||this},e.getInstanceID=function(){return this.serializedWindow.getInstanceID()},e.shouldClean=function(){return Boolean(this.actualWindow&&v(this.actualWindow))},e.serialize=function(){return this.serializedWindow},n.unwrap=function(e){return n.isProxyWindow(e)?e.unwrap():e},n.serialize=function(e,r){var t=r.send;return fn(),n.toProxyWindow(e,{send:t}).serialize()},n.deserialize=function(e,r){var t=r.send;return fn(),U("idToProxyWindow").get(e.id)||new n({serializedWindow:e,send:t})},n.isProxyWindow=function(n){return Boolean(n&&!_(n)&&n.isProxyWindow)},n.toProxyWindow=function(e,r){var t=r.send;if(fn(),n.isProxyWindow(e))return e;var o=e;return G("winToProxyWindow").get(o)||new n({win:o,send:t})},n}();function hn(n,e,r,t,o){var i=G("methodStore"),a=U("proxyWindowMethods");ln.isProxyWindow(t)?a.set(n,{val:e,name:r,domain:o,source:t}):(a.del(n),i.getOrSet(t,(function(){return{}}))[n]={domain:o,name:r,val:e,source:t})}function wn(n,e){var r=G("methodStore"),t=U("proxyWindowMethods");return r.getOrSet(n,(function(){return{}}))[e]||t.get(e)}function pn(n,e,r,t,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,U("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(n){var e=n.source,r=n.origin,t=n.data,o=t.id,i=t.name,a=wn(e,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+t.id+" in "+f(window));var s=a.source,c=a.domain,d=a.val;return A.try((function(){if(!g(c,r))throw new Error("Method '"+t.name+"' domain "+JSON.stringify(F(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+f(window));if(ln.isProxyWindow(s))return s.matchWindow(e,{send:u}).then((function(n){if(!n)throw new Error("Method call '"+t.name+"' failed - proxy window does not match source in "+f(window))}))})).then((function(){return d.apply({source:e,origin:r},t.args)}),(function(n){return A.try((function(){if(d.onError)return d.onError(n)})).then((function(){var e,r;throw n.stack&&(n.stack="Remote call to "+i+"("+(void 0===(e=t.args)&&(e=[]),(r=e,[].slice.call(r)).map((function(n){return"string"==typeof n?"'"+n+"'":void 0===n?"undefined":null===n?"null":"boolean"==typeof n?n.toString():Array.isArray(n)?"[ ... ]":"object"==typeof n?"{ ... }":"function"==typeof n?"() => { ... }":"<"+typeof n+">"})).join(", ")+") failed\n\n")+n.stack),n}))})).then((function(n){return{result:n,id:o,name:i}}))}))}));var s=r.__id__||N();n=ln.unwrap(n);var c=r.__name__||r.name||t;return"string"==typeof c&&"function"==typeof c.indexOf&&0===c.indexOf("anonymous::")&&(c=c.replace("anonymous::",t+"::")),ln.isProxyWindow(n)?(hn(s,r,c,n,e),n.awaitWindow().then((function(n){hn(s,r,c,n,e)}))):hn(s,r,c,n,e),tn("cross_domain_function",{id:s,name:c})}function mn(n,e,r,t){var o,i=t.on,a=t.send;return function(n,e){void 0===e&&(e=un);var r=JSON.stringify(n,(function(n){var r=this[n];if(en(this))return r;var t=rn(r);if(!t)return r;var o=e[t]||an[t];return o?o(r,n):r}));return void 0===r?"undefined":r}(r,((o={}).promise=function(r,t){return function(n,e,r,t,o){return tn("cross_domain_zalgo_promise",{then:pn(n,e,(function(n,e){return r.then(n,e)}),t,{on:o.on,send:o.send})})}(n,e,r,t,{on:i,send:a})},o.function=function(r,t){return pn(n,e,r,t,{on:i,send:a})},o.object=function(n){return _(n)||ln.isProxyWindow(n)?tn("cross_domain_window",ln.serialize(n,{send:a})):n},o))}function vn(n,e,r,t){var o,i=t.send;return function(n,e){if(void 0===e&&(e=cn),"undefined"!==n)return JSON.parse(n,(function(n,r){if(en(this))return r;var t,o;if(en(r)?(t=r.__type__,o=r.__val__):(t=rn(r),o=r),!t)return o;var i=e[t]||sn[t];return i?i(o,n):o}))}(r,((o={}).cross_domain_zalgo_promise=function(n){return function(n,e,r){return new A(r.then)}(0,0,n)},o.cross_domain_function=function(r){return function(n,e,r,t){var o=r.id,i=r.name,a=t.send,u=function(r){function t(){var u=arguments;return ln.toProxyWindow(n,{send:a}).awaitWindow().then((function(n){var s=wn(n,o);if(s&&s.val!==t)return s.val.apply({source:window,origin:f()},u);var c={domain:e,fireAndForget:r.fireAndForget},d=[].slice.call(u);return a(n,"postrobot_method",{id:o,name:i,args:d},c).then((function(n){if(!r.fireAndForget)return n.data.result}))})).catch((function(n){throw n}))}return void 0===r&&(r={}),t.__name__=i,t.__origin__=e,t.__source__=n,t.__id__=o,t.origin=e,t},s=u();return s.fireAndForget=u({fireAndForget:!0}),s}(n,e,r,{send:i})},o.cross_domain_window=function(n){return ln.deserialize(n,{send:i})},o))}var yn,gn={};function _n(n,e,r,t){var o,i=t.on,a=t.send;if(v(n))throw new Error("Window is closed");for(var u=mn(n,e,((o={}).__post_robot_10_0_36__=I({id:N(),origin:f(window)},r),o),{on:i,send:a}),s=Object.keys(gn),c=[],d=0;d<s.length;d++){var l=s[d];try{gn[l](n,u,e)}catch(n){c.push(n)}}if(c.length===s.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(n,e){return e+". "+L(n)})).join("\n\n"))}function Wn(n){return U("responseListeners").get(n)}function bn(n){U("responseListeners").del(n)}function En(n){return U("erroredResponseListeners").has(n)}function xn(n){var e=n.name,r=n.win,t=n.domain,o=G("requestListeners");if("*"===r&&(r=null),"*"===t&&(t=null),!e)throw new Error("Name required to get request listener");for(var i=0,a=[r,Z()];i<a.length;i++){var u=a[i];if(u){var s=o.get(u);if(s){var c=s[e];if(c){if(t&&"string"==typeof t){if(c[t])return c[t];if(c.__domain_regex__)for(var f=0,d=c.__domain_regex__;f<d.length;f++){var l=d[f],h=l.listener;if(g(l.regex,t))return h}}if(c["*"])return c["*"]}}}}}gn.postrobot_post_message=function(n,e,r){(Array.isArray(r)?r:"string"==typeof r?[r]:["*"]).map((function(n){return 0===n.indexOf("file:")?"*":n})).forEach((function(r){n.postMessage(e,r)}))};var jn=((yn={}).postrobot_message_request=function(n,e,r,t){var o=t.on,i=t.send,a=xn({name:r.name,win:n,domain:e}),u="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function s(t,a,s){if(void 0===s&&(s={}),!r.fireAndForget&&!v(n))try{_n(n,e,I({type:t,ack:a,hash:r.hash,name:r.name},s),{on:o,send:i})}catch(n){throw new Error("Send response message failed for "+u+" in "+f()+"\n\n"+L(n))}}return A.all([s("postrobot_message_ack"),A.try((function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(a.domain,e))throw new Error("Request origin "+e+" does not match domain "+a.domain.toString());return a.handler({source:n,origin:e,data:r.data})})).then((function(n){return s("postrobot_message_response","success",{data:n})}),(function(n){return s("postrobot_message_response","error",{error:n})}))]).then(T).catch((function(n){if(a&&a.handleError)return a.handleError(n);throw n}))},yn.postrobot_message_ack=function(n,e,r){if(!En(r.hash)){var t=Wn(r.hash);if(!t)throw new Error("No handler found for post message ack for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!g(t.domain,e))throw new Error("Ack origin "+e+" does not match domain "+t.domain.toString());if(n!==t.win)throw new Error("Ack source does not match registered window")}catch(n){t.promise.reject(n)}t.ack=!0}},yn.postrobot_message_response=function(n,e,r){if(!En(r.hash)){var o,i=Wn(r.hash);if(!i)throw new Error("No handler found for post message response for message: "+r.name+" from "+e+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(i.domain,e))throw new Error("Response origin "+e+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":t(o)?"RegExp("+o.toString():o.toString()));if(n!==i.win)throw new Error("Response source does not match registered window");bn(r.hash),"error"===r.ack?i.promise.reject(r.error):"success"===r.ack&&i.promise.resolve({source:n,origin:e,data:r.data})}},yn);function kn(n,e){var r=e.on,t=e.send,o=U("receivedMessages");try{if(!window||window.closed||!n.source)return}catch(n){return}var i=n.source,a=n.origin,u=function(n,e,r,t){var o,i=t.on,a=t.send;try{o=vn(e,r,n,{on:i,send:a})}catch(n){return}if(o&&"object"==typeof o&&null!==o&&(o=o.__post_robot_10_0_36__)&&"object"==typeof o&&null!==o&&o.type&&"string"==typeof o.type&&jn[o.type])return o}(n.data,i,a,{on:r,send:t});u&&(nn(i),o.has(u.id)||(o.set(u.id,!0),v(i)&&!u.fireAndForget||(0===u.origin.indexOf("file:")&&(a="file://"),jn[u.type](i,a,u,{on:r,send:t}))))}function Sn(n,e,r){if(!n)throw new Error("Expected name");if("function"==typeof e&&(r=e,e={}),!r)throw new Error("Expected handler");(e=e||{}).name=n,e.handler=r||e.handler;var t=e.window,o=e.domain,i=function n(e,r){var t=e.name,o=e.win,i=e.domain,a=G("requestListeners");if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var u=[],s=0,c=o;s<c.length;s++)u.push(n({name:t,domain:i,win:c[s]},r));return{cancel:function(){for(var n=0;n<u.length;n++)u[n].cancel()}}}if(Array.isArray(i)){for(var f=[],d=0,l=i;d<l.length;d++)f.push(n({name:t,win:o,domain:l[d]},r));return{cancel:function(){for(var n=0;n<f.length;n++)f[n].cancel()}}}var h=xn({name:t,win:o,domain:i});if(o&&"*"!==o||(o=Z()),i=i||"*",h)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===Z()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===Z()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var w,p,m=a.getOrSet(o,(function(){return{}})),v=H(m,t,(function(){return{}})),y=i.toString();return F(i)?(w=H(v,"__domain_regex__",(function(){return[]}))).push(p={regex:i,listener:r}):v[y]=r,{cancel:function(){delete v[y],p&&(w.splice(w.indexOf(p,1)),w.length||delete v.__domain_regex__),Object.keys(v).length||delete m[t],o&&!Object.keys(m).length&&a.del(o)}}}({name:n,win:t,domain:o},{handler:e.handler,handleError:e.errorHandler||function(n){throw n},window:t,domain:o||"*",name:n});return{cancel:function(){i.cancel()}}}function Pn(n,e,r){"function"==typeof(e=e||{})&&(r=e,e={});var t,o=new A;return e.errorHandler=function(n){t.cancel(),o.reject(n)},t=Sn(n,e,(function(n){if(t.cancel(),o.resolve(n),r)return r(n)})),o.cancel=t.cancel,o}var On=function n(e,r,t,o){var i=(o=o||{}).domain||"*",u=o.timeout||-1,s=o.timeout||5e3,c=o.fireAndForget||!1;return A.try((function(){if(function(n,e,r){if(!n)throw new Error("Expected name");if(r&&"string"!=typeof r&&!Array.isArray(r)&&!F(r))throw new TypeError("Expected domain to be a string, array, or regex");if(v(e))throw new Error("Target window is closed")}(r,e,i),function(n,e){var r=y(e);if(r)return r===n;if(e===n)return!1;if(function(n){void 0===n&&(n=window);try{if(n.top)return n.top}catch(n){}if(a(n)===n)return n;try{if(h(window,n)&&window.top)return window.top}catch(n){}try{if(h(n,window)&&window.top)return window.top}catch(n){}for(var e=0,r=function n(e){for(var r=[],t=0,o=w(e);t<o.length;t++){var i=o[t];r.push(i);for(var a=0,u=n(i);a<u.length;a++)r.push(u[a])}return r}(n);e<r.length;e++){var t=r[e];try{if(t.top)return t.top}catch(n){}if(a(t)===t)return t}}(e)===e)return!1;for(var t=0,o=w(n);t<o.length;t++)if(o[t]===e)return!0;return!1}(window,e))return function(n,e,r){void 0===e&&(e=5e3),void 0===r&&(r="Window");var t=function(n){return G("helloPromises").getOrSet(n,(function(){return new A}))}(n);return-1!==e&&(t=t.timeout(e,new Error(r+" did not load after "+e+"ms"))),t}(e,s)})).then((function(r){return function(n,e,r,t){var o=t.send;return"string"==typeof e?A.resolve(e):A.try((function(){return r||X(n,{send:o}).then((function(n){return n.domain}))})).then((function(n){if(!g(e,e))throw new Error("Domain "+q(e)+" does not match "+q(e));return n}))}(e,i,(void 0===r?{}:r).domain,{send:n})})).then((function(o){i=o;var a,s,d="postrobot_method"===r&&t&&"string"==typeof t.name?t.name+"()":r,l=new A,h=r+"_"+N();if(!c){var w={name:r,win:e,domain:i,promise:l};!function(n,e){U("responseListeners").set(n,e)}(h,w);var p=G("requestPromises").getOrSet(e,(function(){return[]}));p.push(l),l.catch((function(){!function(n){U("erroredResponseListeners").set(n,!0)}(h),bn(h)}));var m=function(n){return G("knownWindows").get(n,!1)}(e)?1e4:2e3,y=u,g=m,_=y,W=(a=function(){return v(e)?l.reject(new Error("Window closed for "+r+" before "+(w.ack?"response":"ack"))):w.cancelled?l.reject(new Error("Response listener was cancelled for "+r)):(g=Math.max(g-500,0),-1!==_&&(_=Math.max(_-500,0)),w.ack||0!==g?0===_?l.reject(new Error("No response for postMessage "+d+" in "+f()+" in "+y+"ms")):void 0:l.reject(new Error("No ack for postMessage "+d+" in "+f()+" in "+m+"ms")))},500,function n(){s=setTimeout((function(){a(),n()}),500)}(),{cancel:function(){clearTimeout(s)}});l.finally((function(){W.cancel(),p.splice(p.indexOf(l,1))})).catch(T)}try{_n(e,i,{type:"postrobot_message_request",hash:h,name:r,data:t,fireAndForget:c},{on:Sn,send:n})}catch(n){throw new Error("Send request message failed for "+d+" in "+f()+"\n\n"+L(n))}return c?l.resolve():l}))};function An(n,e,r){return mn(n,e,r,{on:Sn,send:On})}function In(n,e,r){return vn(n,e,r,{on:Sn,send:On})}function zn(n){return new ln({send:On,win:n})}function Dn(n){return ln.toProxyWindow(n,{send:On})}function Mn(){var n,e,r,t;J().initialized||(J().initialized=!0,e=(n={on:Sn,send:On}).on,r=n.send,(t=J()).receiveMessage=t.receiveMessage||function(n){return kn(n,{on:e,send:r})},function(n){var e=n.on,r=n.send;U().getOrSet("postMessageListener",(function(){return(n=window).addEventListener("message",t=function(n){!function(n,e){var r=e.on,t=e.send,o=n.source||n.sourceElement,i=n.origin||n.originalEvent&&n.originalEvent.origin,a=n.data;if("null"===i&&(i="file://"),o){if(!i)throw new Error("Post message did not have origin domain");kn({source:o,origin:i,data:a},{on:r,send:t})}}(n,{on:e,send:r})}),{cancel:function(){n.removeEventListener("message",t)}};var n,t}))}({on:Sn,send:On}),function(n){var e=n.on,r=n.send;U("builtinListeners").getOrSet("helloListener",(function(){var n=e("postrobot_hello",{domain:"*"},(function(n){return V(n.source,{domain:n.origin}),{instanceID:Q()}})),t=y();return t&&X(t,{send:r}).catch(T),n}))}({on:Sn,send:On}))}function Nn(){var n;!function(){for(var n=U("responseListeners"),e=0,r=n.keys();e<r.length;e++){var t=r[e],o=n.get(t);o&&(o.cancelled=!0),n.del(t)}}(),(n=U().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_10_0_36__}var Rn=!0;function Cn(n){for(var e=0,r=G("requestPromises").get(n,[]);e<r.length;e++)r[e].reject(new Error("Window "+(v(n)?"closed":"cleaned up")+" before response")).catch(T)}Mn()}])}));
//# sourceMappingURL=post-robot.min.js.map
{
"name": "post-robot",
"version": "10.0.35",
"version": "10.0.36",
"description": "Simple postMessage based server.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ /* @flow */

import { ZalgoPromise } from 'zalgo-promise/src';
import { uniqueID, memoizePromise } from 'belter/src';
import { uniqueID, memoizePromise, noop } from 'belter/src';
import { serializeType, type CustomSerializedType } from 'universal-serialize/src';

@@ -46,7 +46,18 @@

const windowTypePromise = winPromise.then(window => {
if (!isWindowClosed(window)) {
return getOpener(window) ? WINDOW_TYPE.POPUP : WINDOW_TYPE.IFRAME;
} else {
throw new Error(`Window is closed, can not determine type`);
}
});
windowNamePromise.catch(noop);
windowTypePromise.catch(noop);
return {
id,
getType: () => winPromise.then(win => {
return getOpener(win) ? WINDOW_TYPE.POPUP : WINDOW_TYPE.IFRAME;
}),
getType: () => {
return windowTypePromise;
},
getInstanceID: memoizePromise(() => winPromise.then(win => getWindowInstanceID(win, { send }))),

@@ -129,2 +140,3 @@ close: () => winPromise.then(closeWindow),

this.serializedWindow = serializedWindow || getSerializedWindow(this.actualWindowPromise, { send });
globalStore('idToProxyWindow').set(this.getID(), this);

@@ -131,0 +143,0 @@ if (win) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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