UNPKG

136 kBJavaScriptView Raw
1!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("zoid",[],n):"object"==typeof exports?exports.zoid=n():e.zoid=n()}("undefined"!=typeof self?self:this,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=15)}([function(e,n,t){"use strict";var r=t(16);t.d(n,"assertSameDomain",function(){return r.a}),t.d(n,"getActualDomain",function(){return r.b}),t.d(n,"getAllFramesInWindow",function(){return r.c}),t.d(n,"getAncestor",function(){return r.d}),t.d(n,"getDistanceFromTop",function(){return r.e}),t.d(n,"getDomain",function(){return r.f}),t.d(n,"getDomainFromUrl",function(){return r.g}),t.d(n,"getFrameByName",function(){return r.h}),t.d(n,"getNthParentFromTop",function(){return r.i}),t.d(n,"getOpener",function(){return r.j}),t.d(n,"getParent",function(){return r.k}),t.d(n,"getTop",function(){return r.l}),t.d(n,"getUserAgent",function(){return r.m}),t.d(n,"isActuallySameDomain",function(){return r.n}),t.d(n,"isAncestor",function(){return r.o}),t.d(n,"isBlankDomain",function(){return r.p}),t.d(n,"isOpener",function(){return r.q}),t.d(n,"isSameDomain",function(){return r.r}),t.d(n,"isSameTopWindow",function(){return r.s}),t.d(n,"isTop",function(){return r.t}),t.d(n,"isWindow",function(){return r.u}),t.d(n,"isWindowClosed",function(){return r.v}),t.d(n,"linkFrameWindow",function(){return r.w}),t.d(n,"matchDomain",function(){return r.x}),t.d(n,"normalizeMockUrl",function(){return r.y}),t.d(n,"onCloseWindow",function(){return r.z}),t.d(n,"stringifyDomainPattern",function(){return r.A});var o=t(17);t.n(o),t(9)},function(e,n,t){"use strict";t(10);var r=t(11);t.d(n,"PopupOpenError",function(){return r.a}),t.d(n,"addClass",function(){return r.b}),t.d(n,"addEventListener",function(){return r.c}),t.d(n,"animateAndHide",function(){return r.d}),t.d(n,"appendChild",function(){return r.e}),t.d(n,"awaitFrameLoad",function(){return r.f}),t.d(n,"awaitFrameWindow",function(){return r.g}),t.d(n,"destroyElement",function(){return r.h}),t.d(n,"elementReady",function(){return r.i}),t.d(n,"extendUrl",function(){return r.j}),t.d(n,"getElement",function(){return r.k}),t.d(n,"hideElement",function(){return r.l}),t.d(n,"iframe",function(){return r.m}),t.d(n,"onResize",function(){return r.o}),t.d(n,"popup",function(){return r.p}),t.d(n,"removeClass",function(){return r.q}),t.d(n,"showAndAnimate",function(){return r.r}),t.d(n,"showElement",function(){return r.s}),t.d(n,"waitForDocumentBody",function(){return r.t}),t.d(n,"watchElementForClose",function(){return r.u}),t.d(n,"writeElementToWindow",function(){return r.v}),t(18),t(19),t(12);var o=t(7);t.d(n,"base64decode",function(){return o.a}),t.d(n,"base64encode",function(){return o.b}),t.d(n,"dasherizeToCamel",function(){return o.d}),t.d(n,"dotify",function(){return o.f}),t.d(n,"eventEmitter",function(){return o.g}),t.d(n,"extend",function(){return o.h}),t.d(n,"getOrSet",function(){return o.j}),t.d(n,"isDefined",function(){return o.l}),t.d(n,"isRegex",function(){return o.m}),t.d(n,"memoize",function(){return o.n}),t.d(n,"memoizePromise",function(){return o.o}),t.d(n,"noop",function(){return o.p}),t.d(n,"once",function(){return o.q}),t.d(n,"promisify",function(){return o.r}),t.d(n,"replaceObject",function(){return o.s}),t.d(n,"safeInterval",function(){return o.t}),t.d(n,"stringify",function(){return o.u}),t.d(n,"stringifyError",function(){return o.v}),t.d(n,"uniqueID",function(){return o.w}),t.d(n,"weakMapMemoize",function(){return o.x}),t.d(n,"weakMapMemoizePromise",function(){return o.y}),t(20);var i=t(21);t.n(i),t.o(i,"isPerc")&&t.d(n,"isPerc",function(){return i.isPerc}),t.o(i,"isPx")&&t.d(n,"isPx",function(){return i.isPx}),t.o(i,"memoized")&&t.d(n,"memoized",function(){return i.memoized}),t.o(i,"normalizeDimension")&&t.d(n,"normalizeDimension",function(){return i.normalizeDimension}),t.o(i,"toCSS")&&t.d(n,"toCSS",function(){return i.toCSS});var a=t(22);t.d(n,"memoized",function(){return a.a});var u=t(23);t.d(n,"isPerc",function(){return u.a}),t.d(n,"isPx",function(){return u.b}),t.d(n,"normalizeDimension",function(){return u.c}),t.d(n,"toCSS",function(){return u.d}),t(24)},function(e,n,t){"use strict";function r(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}function o(){var e=void 0;if("undefined"!=typeof window)e=window;else{if("undefined"==typeof window)throw new TypeError("Can not find global");e=window}var n=e.__zalgopromise__=e.__zalgopromise__||{};return n.flushPromises=n.flushPromises||[],n.activeCount=n.activeCount||0,n.possiblyUnhandledPromiseHandlers=n.possiblyUnhandledPromiseHandlers||[],n.dispatchedErrors=n.dispatchedErrors||[],n}var i=function(){function e(n){var t=this;if(function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var r=void 0,o=void 0,i=!1,a=!1,u=!1;try{n(function(e){u?t.resolve(e):(i=!0,r=e)},function(e){u?t.reject(e):(a=!0,o=e)})}catch(e){return void this.reject(e)}u=!0,i?this.resolve(r):a&&this.reject(o)}}return e.prototype.resolve=function(e){if(this.resolved||this.rejected)return this;if(r(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},e.prototype.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(r(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){n.errorHandled||function(e,n){if(-1===o().dispatchedErrors.indexOf(e)){o().dispatchedErrors.push(e),setTimeout(function(){throw e},1);for(var t=0;t<o().possiblyUnhandledPromiseHandlers.length;t++)o().possiblyUnhandledPromiseHandlers[t](e,n)}}(e,n)},1),this.dispatch(),this},e.prototype.asyncReject=function(e){this.errorHandled=!0,this.reject(e)},e.prototype.dispatch=function(){var n=this,t=this.dispatching,i=this.resolved,a=this.rejected,u=this.handlers;if(!t&&(i||a)){this.dispatching=!0,o().activeCount+=1;for(var c=function(t){var o=u[t],c=o.onSuccess,s=o.onError,d=o.promise,f=void 0;if(i)try{f=c?c(n.value):n.value}catch(e){return d.reject(e),"continue"}else if(a){if(!s)return d.reject(n.error),"continue";try{f=s(n.error)}catch(e){return d.reject(e),"continue"}}f instanceof e&&(f.resolved||f.rejected)?(f.resolved?d.resolve(f.value):d.reject(f.error),f.errorHandled=!0):r(f)?f instanceof e&&(f.resolved||f.rejected)?f.resolved?d.resolve(f.value):d.reject(f.error):f.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(f)},s=0;s<u.length;s++)c(s);u.length=0,this.dispatching=!1,o().activeCount-=1,0===o().activeCount&&e.flushQueue()}},e.prototype.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},e.prototype.catch=function(e){return this.then(void 0,e)},e.prototype.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then(function(t){return e.try(n).then(function(){return t})},function(t){return e.try(n).then(function(){throw t})})},e.prototype.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout(function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(r),e})},e.prototype.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:r(n)?new e(function(e,t){return n.then(e,t)}):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.all=function(n){var t=new e,o=n.length,i=[];if(!o)return t.resolve(i),t;for(var a=function(a){var u=n[a];if(u instanceof e){if(u.resolved)return i[a]=u.value,o-=1,"continue"}else if(!r(u))return i[a]=u,o-=1,"continue";e.resolve(u).then(function(e){i[a]=e,0==(o-=1)&&t.resolve(i)},function(e){t.reject(e)})},u=0;u<n.length;u++)a(u);return 0===o&&t.resolve(i),t},e.hash=function(n){var t={};return e.all(Object.keys(n).map(function(r){return e.resolve(n[r]).then(function(e){t[r]=e})})).then(function(){return t})},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return o().possiblyUnhandledPromiseHandlers.push(e),{cancel:function(){o().possiblyUnhandledPromiseHandlers.splice(o().possiblyUnhandledPromiseHandlers.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o=void 0;try{o=n.apply(t,r||[])}catch(n){return e.reject(n)}return e.resolve(o)},e.delay=function(n){return new e(function(e){setTimeout(e,n)})},e.isPromise=function(n){return!!(n&&n instanceof e)||r(n)},e.flush=function(){var n=new e;return o().flushPromises.push(n),0===o().activeCount&&e.flushQueue(),n},e.flushQueue=function(){var e=o().flushPromises;o().flushPromises=[];for(var n=0,t=null==e?0:e.length;n<t;n++)e[n].resolve()},e}();t.d(n,"a",function(){return i})},function(e,n,t){"use strict";var r,o={REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},i={SUCCESS:"success",ERROR:"error"},a={METHOD:"postrobot_method",HELLO:"postrobot_hello",OPEN_TUNNEL:"postrobot_open_tunnel"},u={POSTROBOT:"__postRobot__"},c={POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},s={MOCK:"mock:",FILE:"file:"},d={CROSS_DOMAIN_ZALGO_PROMISE:"cross_domain_zalgo_promise",CROSS_DOMAIN_FUNCTION:"cross_domain_function",CROSS_DOMAIN_WINDOW:"cross_domain_window"},f={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,BRIDGE_TIMEOUT:5e3,CHILD_WINDOW_TIMEOUT:5e3,ACK_TIMEOUT:2e3,ACK_TIMEOUT_KNOWN:1e4,RES_TIMEOUT:-1,ALLOWED_POST_MESSAGE_METHODS:(r={},r[c.POST_MESSAGE]=!0,r[c.BRIDGE]=!0,r[c.GLOBAL]=!0,r)};0===window.location.href.indexOf(s.FILE)&&(f.ALLOW_POSTMESSAGE_POPUP=!0),t.d(n,"b",function(){return f}),t.d(n,"e",function(){return o}),t.d(n,"c",function(){return i}),t.d(n,"d",function(){return a}),t.d(n,"j",function(){return u}),t.d(n,"g",function(){return c}),t.d(n,"f",function(){return s}),t.d(n,"a",function(){return"__postrobot_bridge__"}),t.d(n,!1,function(){return"__postrobot_proxy__"}),t.d(n,"i",function(){return"*"}),t.d(n,"h",function(){return d})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t.d(n,"ZOID",function(){return r}),t.d(n,"__ZOID__",function(){return o}),t.d(n,"POST_MESSAGE",function(){return i}),t.d(n,"PROP_TYPES",function(){return a}),t.d(n,"INITIAL_PROPS",function(){return u}),t.d(n,"WINDOW_REFERENCES",function(){return c}),t.d(n,"PROP_SERIALIZATION",function(){return s}),t.d(n,"PROP_TYPES_LIST",function(){return d}),t.d(n,"CONTEXT",function(){return f}),t.d(n,"CLASS_NAMES",function(){return l}),t.d(n,"EVENTS",function(){return p}),t.d(n,"ATTRIBUTES",function(){return h}),t.d(n,"ANIMATION_NAMES",function(){return w}),t.d(n,"EVENT_NAMES",function(){return m}),t.d(n,"CLOSE_REASONS",function(){return y}),t.d(n,"CONTEXT_LIST",function(){return v}),t.d(n,"DELEGATE",function(){return g}),t.d(n,"WILDCARD",function(){return E}),t.d(n,"DEFAULT_DIMENSIONS",function(){return O});var r="zoid",o="__"+r+"__",i={DELEGATE:r+"_delegate",ALLOW_DELEGATE:r+"_allow_delegate"},a={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},u={RAW:"raw",UID:"uid"},c={OPENER:"opener",TOP:"top",PARENT:"parent",GLOBAL:"global"},s={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},d=Object.keys(a).map(function(e){return a[e]}),f={IFRAME:"iframe",POPUP:"popup"},l={ZOID:""+r,OUTLET:r+"-outlet",COMPONENT_FRAME:r+"-component-frame",PRERENDER_FRAME:r+"-prerender-frame",VISIBLE:r+"-visible",INVISIBLE:r+"-invisible"},p={CLOSE:r+"-close"},h={IFRAME_PLACEHOLDER:"data-zoid-"+r+"-placeholder"},w={SHOW_CONTAINER:r+"-show-container",SHOW_COMPONENT:r+"-show-component",HIDE_CONTAINER:r+"-hide-container",HIDE_COMPONENT:r+"-hide-component"},m={CLICK:"click"},y={PARENT_CALL:"parent_call",CHILD_CALL:"child_call",CLOSE_DETECTED:"close_detected",USER_CLOSED:"user_closed",PARENT_CLOSE_DETECTED:"parent_close_detected"},v=Object.keys(f).map(function(e){return f[e]}),g={CALL_ORIGINAL:"call_original",CALL_DELEGATE:"call_delegate"},E="*",O={WIDTH:"300px",HEIGHT:"150px"}},function(e,n,t){"use strict";t.d(n,"a",function(){return a}),n.c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;function t(e){return u.getOrSet(e,n)}return{has:function(n){return t(n).hasOwnProperty(e)},get:function(n,r){var o=t(n);return o.hasOwnProperty(e)?o[e]:r},set:function(n,r){return t(n)[e]=r,r},del:function(n){delete t(n)[e]},getOrSet:function(n,r){var o=t(n);if(o.hasOwnProperty(e))return o[e];var i=r();return o[e]=i,i}}},n.b=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,t=Object(o.getOrSet)(a,e,n);return{has:function(e){return t.hasOwnProperty(e)},get:function(e,n){return t.hasOwnProperty(e)?t[e]:n},set:function(e,n){return t[e]=n,n},del:function(e){delete t[e]},getOrSet:function(e,n){if(t.hasOwnProperty(e))return t[e];var r=n();return t[e]=r,r},reset:function(){t=n()},keys:function(){return Object.keys(t)}}},t(0);var r=t(8),o=t(1),i=t(3),a=window[i.j.POSTROBOT]=window[i.j.POSTROBOT]||{},u=a.windowStore=a.windowStore||new r.a,c=function(){return{}}},function(e,n,t){"use strict";var r=t(0),o=t(2),i=t(1),a=t(3),u=t(5);u.a.instanceID=u.a.instanceID||Object(i.uniqueID)();var c=Object(u.c)("helloPromises");function s(e){return c.getOrSet(e,function(){return new o.a})}var d=Object(i.once)(function(){u.a.on(a.d.HELLO,{domain:a.i},function(e){var n=e.source,t=e.origin;return s(n).resolve({win:n,domain:t}),{instanceID:u.a.instanceID}})});function f(e){return u.a.send(e,a.d.HELLO,{instanceID:u.a.instanceID},{domain:a.i,timeout:-1}).then(function(n){var t=n.origin,r=n.data.instanceID;return s(e).resolve({win:e,domain:t}),{win:e,domain:t,instanceID:r}})}var l=Object(i.weakMapMemoizePromise)(function(e){return f(e).then(function(e){return e.instanceID})});function p(){d();var e=Object(r.getAncestor)();e&&f(e).catch(i.noop)}function h(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",r=s(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}function w(){return!!Object(r.getUserAgent)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!a.b.ALLOW_POSTMESSAGE_POPUP}var m=Object(u.c)("knownWindows");function y(e){m.set(e,!0)}function v(e){return m.get(e,!1)}t.d(n,"g",function(){return f}),t.d(n,"b",function(){return l}),t.d(n,"c",function(){return p}),t.d(n,"a",function(){return h}),t.d(n,"f",function(){return w}),t.d(n,"e",function(){return y}),t.d(n,"d",function(){return v})},function(e,n,t){"use strict";n.b=a,n.a=function(e){if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob(e);if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")},n.w=u,n.i=function(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("No global found")},n.n=function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new o.a;function i(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var a=r.getOrSet(t.thisNamespace?this:e,function(){return{}}),u=s(o),c=t.time;if(a[u]&&c&&Date.now()-a[u].time<c&&delete a[u],a[u])return a[u].value;var d=Date.now(),f=e.apply(this,arguments);return a[u]={time:d,value:f},a[u].value}return i.reset=function(){r.delete(t.thisNamespace?n:e)},t.name&&(i.displayName=t.name+":memoized"),i},n.o=function(e){var n={};function t(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=s(r);return n.hasOwnProperty(i)?n[i]:(n[i]=e.apply(this,arguments).finally(function(){delete n[i]}),n[i])}return t.reset=function(){n={}},t},n.r=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};function t(){return r.a.try(e,this,arguments)}return n.name&&(t.displayName=n.name+":promisified"),t},n.k=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=s(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)},n.p=function(){},n.q=function(e){var n=!1;return function(){if(!n)return n=!0,e.apply(this,arguments)}},n.v=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t>=3)return"stringifyError stack overflow";try{if(!n)return"<unknown error: "+Object.prototype.toString.call(n)+">";if("string"==typeof n)return n;if(n instanceof Error){var r=n&&n.stack,o=n&&n.message;if(r&&o)return-1!==r.indexOf(o)?r:o+"\n"+r;if(r)return r;if(o)return o}return"function"==typeof n.toString?n.toString():Object.prototype.toString.call(n)}catch(n){return"Error while stringifying error: "+e(n,t+1)}},n.u=function(e){return"string"==typeof e?e:e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)},n.h=function(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e},n.t=function(e,n){var t=void 0;return function r(){t=setTimeout(function(){e(),r()},n)}(),{cancel:function(){clearTimeout(t)}}},n.f=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var o in t=t?t+".":t,n)n.hasOwnProperty(o)&&void 0!==n[o]&&null!==n[o]&&"function"!=typeof n[o]&&(n[o]&&Array.isArray(n[o])&&n[o].length&&n[o].every(function(e){return"object"!==(void 0===e?"undefined":i(e))})?r[""+t+o+"[]"]=n[o].join(","):n[o]&&"object"===i(n[o])?r=e(n[o],""+t+o,r):r[""+t+o]=n[o].toString());return r},n.g=function(){var e={},n={};return{on:function(e,t){var r=n[e]=n[e]||[];r.push(t);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(t),1))}}},once:function(e,n){var t=this.on(e,function(){t.cancel(),n()});return t},trigger:function(e){var t=n[e];if(t)for(var r=0,o=null==t?0:t.length;r<o;r++)(0,t[r])()},triggerOnce:function(n){e[n]||(e[n]=!0,this.trigger(n))}}},n.d=function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},n.c=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},n.s=function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Array.isArray(n)){for(var o=n.length,i=[],a=function(o){d(i,o,function(){var i=r?r+"."+o:""+o,a=n[o],u=t(a,o,i);return(l(u)||Array.isArray(u))&&(u=e(u,t,i)),u})},u=0;u<o;u++)a(u);return i}if(l(n)){var c={},s=function(o){if(!n.hasOwnProperty(o))return"continue";d(c,o,function(){var i=r?r+"."+o:""+o,a=n[o],u=t(a,o,i);return(l(u)||Array.isArray(u))&&(u=e(u,t,i)),u})};for(var f in n)s(f);return c}throw new Error("Pass an object or array")},n.l=function(e){return null!==e&&void 0!==e},n.e=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,t=void 0;return function(){var r=this,o=arguments;clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}},n.m=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.d(n,"x",function(){return p}),t.d(n,"y",function(){return h}),n.j=function(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r};var r=t(2),o=t(8),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(e){if("undefined"!=typeof window&&"function"==typeof window.btoa)return window.btoa(e);if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function u(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+a((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var c=void 0;function s(e){try{return JSON.stringify(Array.prototype.slice.call(e),function(e,n){return"function"==typeof n?"memoize["+function(e){if(c=c||new o.a,null===e||void 0===e||"object"!==(void 0===e?"undefined":i(e))&&"function"!=typeof e)throw new Error("Invalid object");var n=c.get(e);return n||(n=(void 0===e?"undefined":i(e))+":"+u(),c.set(e,n)),n}(n)+"]":n})}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function d(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"===(void 0===e?"undefined":i(e))&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function f(e){return"object"===(void 0===(n=e)?"undefined":i(n))&&null!==n&&"[object Object]"===Object.prototype.toString.call(e);var n}function l(e){if(!f(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!f(t)&&!!t.hasOwnProperty("isPrototypeOf")}var p=function(e){var n=new o.a;return function(t){var r=this;return n.getOrSet(t,function(){return e.call(r,t)})}},h=function(e){var n=new o.a;return function(t){var r=this;return n.getOrSet(t,function(){return e.call(r,t).finally(function(){n.delete(t)})})}}},function(e,n,t){"use strict";t.d({},"WeakMap",function(){return u});var r=t(0);function o(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var i=Object.defineProperty,a=Date.now()%1e9,u=function(){function e(){if(function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),a+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+a,function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}return e.prototype._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t<n.length;t++){var o=n[t];if(Object(r.isWindow)(o)&&Object(r.isWindowClosed)(o)){if(e)try{e.delete(o)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},e.prototype.isSafeToReadWrite=function(e){if(Object(r.isWindow)(e))return!1;try{e&&e.self,e&&e[this.name]}catch(e){return!1}return!0},e.prototype.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var r=this.name,a=e[r];a&&a[0]===e?a[1]=n:i(e,r,{value:[e,n],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,c=this.values,s=o(u,e);-1===s?(u.push(e),c.push(n)):c[s]=n}},e.prototype.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(!this.isSafeToReadWrite(e)){this._cleanupClosedWindows();var t=o(this.keys,e);if(-1===t)return;return this.values[t]}var r=e[this.name];if(r&&r[0]===e)return r[1]},e.prototype.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}else{this._cleanupClosedWindows();var r=this.keys,i=o(r,e);-1!==i&&(r.splice(i,1),this.values.splice(i,1))}},e.prototype.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];return!(!t||t[0]!==e)}return this._cleanupClosedWindows(),-1!==o(this.keys,e)},e.prototype.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();t.d(n,"a",function(){return u})},function(e,n,t){"use strict";t.d(n,"a",function(){return r}),t.d(n,"b",function(){return o});var r={MOCK:"mock:",FILE:"file:",ABOUT:"about:"},o="*"},function(e,n,t){"use strict";n.a=function(){return!!(window.navigator.mockUserAgent||window.navigator.userAgent).match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}},function(e,n,t){"use strict";var r=t(2),o=t(0),i=t(8),a=t(7);t(10),n.t=function(){return f().then(function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")})},n.j=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.query||{},o=t.hash||{},i=void 0,a=e.split("#");i=a[0],n=a[1];var u=i.split("?");i=u[0];var c=p(u[1],r),s=p(n,o);return c&&(i=i+"?"+c),s&&(i=i+"#"+s),i},n.n=function e(){return Object(a.k)(e,function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===n)return!0}}catch(e){}return!1})},n.e=h,n.k=m,n.i=function(e){return new r.a(function(n,t){var r=Object(a.u)(e),o=w(e);if(o)return n(o);if(s())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval(function(){return(o=w(e))?(clearInterval(i),n(o)):s()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0},10)})},n.a=y,n.p=function(e,n){var t=n=n||{},r=t.width,i=t.height,u=0,s=0;r&&(window.outerWidth?s=Math.round((window.outerWidth-r)/2)+window.screenX:window.screen.width&&(s=Math.round((window.screen.width-r)/2))),i&&(window.outerHeight?u=Math.round((window.outerHeight-i)/2)+window.screenY:window.screen.height&&(u=Math.round((window.screen.height-i)/2)));var d=(n=c({top:u,left:s,width:r,height:i,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n)).name||"";delete n.name;var f,l=Object.keys(n).map(function(e){if(n[e])return e+"="+Object(a.u)(n[e])}).filter(Boolean).join(","),p=void 0;try{p=window.open(e,d,l,!0)}catch(f){throw new y("Can not open popup window - "+(f.stack||f.message))}if(Object(o.isWindowClosed)(p))throw new y("Can not open popup window - blocked");return p},n.v=function(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement;r.children&&r.children.length;)r.removeChild(r.children[0]);for(;n.children.length;)r.appendChild(n.children[0])},n.f=g,n.g=function(e){return e.contentWindow?r.a.resolve(e.contentWindow):g(e).then(function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow})},n.m=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,o=m(t),i=n.attributes||{},u=n.style||{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments[2];e=e.toLowerCase();var r=document.createElement(e);if(n.style&&Object(a.h)(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.attributes)for(var o=0,i=Object.keys(n.attributes),u=null==i?0:i.length;o<u;o++){var c=i[o];r.setAttribute(c,n.attributes[c])}if(n.styleSheet&&function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.document;e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n))}(r,n.styleSheet),t&&h(t,r),n.html)if("iframe"===e){if(!t||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");!function(e,n){try{e.document.open(),e.document.write(n),e.document.close()}catch(t){try{e.location="javascript: document.open(); document.write("+JSON.stringify(n)+"); document.close();"}catch(e){}}}(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}("iframe",{attributes:c({frameBorder:"0",allowTransparency:"true"},i),style:c({backgroundColor:"transparent"},u),html:n.html,class:n.class});g(s),o.appendChild(s);var d=s.contentWindow;if(d)try{Object(a.p)(d.name)}catch(i){if(o.removeChild(s),!r)throw new Error("Frame is cross-domain: "+i.stack);return e(n,t,r-1)}return(n.url||window.navigator.userAgent.match(/MSIE|Edge/i))&&s.setAttribute("src",n.url||"about:blank"),s},n.c=function(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}},n.s=_,n.l=A,n.h=function(e){e.parentNode&&e.parentNode.removeChild(e)},n.r=function(e,n,t){var r=T(e,n,t);return _(e),r},n.d=function(e,n,t){return T(e,n,t).then(function(){A(e)})},n.b=function(e,n){e.classList?e.classList.add(n):-1===e.className.split(/\s+/).indexOf(n)&&(e.className+=" "+n)},n.q=function(e,n){e.classList?e.classList.remove(n):-1!==e.className.split(/\s+/).indexOf(n)&&(e.className=e.className.replace(n,""))},n.u=function(e,n){n=Object(a.q)(n);var t=void 0;return D(e)?n():t=Object(a.t)(function(){D(e)&&(t.cancel(),n())},50),{cancel:function(){t&&t.cancel()}}},n.o=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.width,o=void 0===r||r,i=t.height,a=void 0===i||i,u=t.interval,c=void 0===u?100:u,s=t.win,d=void 0===s?window:s,f=e.offsetWidth,l=e.offsetHeight;n({width:f,height:l});var p=function(){var t=e.offsetWidth,r=e.offsetHeight;(o&&t!==f||a&&r!==l)&&n({width:t,height:r}),f=t,l=r},h=void 0,w=void 0;return void 0!==d.ResizeObserver?(h=new d.ResizeObserver(p)).observe(e):void 0!==d.MutationObserver?((h=new d.MutationObserver(p)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),d.addEventListener("resize",p)):function e(){p(),w=setTimeout(e,c)}(),{cancel:function(){h.disconnect(),window.removeEventListener("resize",p),clearTimeout(w)}}};var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};function s(){return Boolean(document.body)&&"complete"===document.readyState}function d(e){return e.replace(/\?/g,"%3F").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\+/g,"%2B")}function f(){return Object(a.k)(f,function(){return new r.a(function(e){if(s())return e();var n=setInterval(function(){if(s())return clearInterval(n),e()},10)})})}function l(e){return Object(a.k)(l,function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&"),o=null==r?0:r.length;t<o;t++){var i=r[t];(i=i.split("="))[0]&&i[1]&&(n[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}return n},[e])}function p(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n&&Object.keys(n).length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).filter(function(n){return"string"==typeof e[n]}).map(function(n){return d(n)+"="+d(e[n])}).join("&")}(c({},l(e),n)):e}function h(e,n){e.appendChild(n)}function w(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return(n=e)instanceof window.Element||null!==n&&"object"===(void 0===n?"undefined":u(n))&&1===n.nodeType&&"object"===u(n.style)&&"object"===u(n.ownerDocument)?e:"string"==typeof e?t.querySelector(e):void 0}function m(e){var n=w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:document);if(n)return n;throw new Error("Can not find element: "+Object(a.u)(e))}function y(e){this.message=e}y.prototype=Object.create(Error.prototype);var v=void 0;function g(e){if((v=v||new i.a).has(e)){var n=v.get(e);if(n)return n}var t=new r.a(function(n,t){e.addEventListener("load",function(){Object(o.linkFrameWindow)(e),n(e)}),e.addEventListener("error",function(r){e.contentWindow?n(e):t(r)})});return v.set(e,t),t}function E(e,n,t){t=Object(a.q)(t);for(var r=0,o=null==n?0:n.length;r<o;r++){var i=n[r];e.addEventListener(i,t)}return{cancel:Object(a.q)(function(){for(var r=0,o=null==n?0:n.length;r<o;r++){var i=n[r];e.removeEventListener(i,t)}})}}var O=["webkit","moz","ms","o"];function b(e,n,t){e.style[n]=t;for(var r=Object(a.c)(n),o=0,i=null==O?0:O.length;o<i;o++){var u=O[o];e.style[""+u+r]=t}}var C=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],S=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function T(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return new r.a(function(r,i){var a=m(e);if(!a||!function(e,n){var t=window.CSSRule,r=t.KEYFRAMES_RULE||t.WEBKIT_KEYFRAMES_RULE||t.MOZ_KEYFRAMES_RULE||t.O_KEYFRAMES_RULE||t.MS_KEYFRAMES_RULE,o=e.ownerDocument.styleSheets;try{for(var i=0;i<o.length;i++){var a=o[i].cssRules;if(a)for(var u=0;u<a.length;u++){var c=a[u];if(c&&c.type===r&&c.name===n)return!0}}}catch(e){return!1}return!1}(a,n))return r();var u=!1,c=void 0,s=void 0,d=void 0,f=void 0;function l(){b(a,"animationName",""),clearTimeout(c),clearTimeout(s),d.cancel(),f.cancel()}d=E(a,C,function(e){e.target===a&&e.animationName===n&&(clearTimeout(c),e.stopPropagation(),d.cancel(),u=!0,s=setTimeout(function(){l(),r()},o))}),f=E(a,S,function(e){if(e.target===a&&e.animationName===n)return l(),"string"==typeof e.animationName&&e.animationName!==n?i("Expected animation name to be "+n+", found "+e.animationName):r()}),b(a,"animationName",n),c=setTimeout(function(){if(!u)return l(),r()},200),t&&t(l)})}var j={DISPLAY:{NONE:"none",BLOCK:"block"},VISIBILITY:{VISIBLE:"visible",HIDDEN:"hidden"},IMPORTANT:"important"};function _(e){e.style.setProperty("display","")}function A(e){e.style.setProperty("display",j.DISPLAY.NONE,j.IMPORTANT)}function D(e){return!e||!e.parentNode}},function(e,n,t){"use strict";n.a=function e(n){var t=n.name,i=n.version,a=void 0===i?"latest":i,u=n.lifetime,c=void 0===u?3e5:u;return Object(r.k)(e,function(){var e="__"+t+"_"+a+"_storage__",n=void 0;function i(t){var i=Object(o.n)(),a=void 0;if(n&&(a=n),!a&&i){var u=window.localStorage.getItem(e);u&&(a=JSON.parse(u))}a||(a=Object(r.i)()[e]),a||(a={id:Object(r.w)()}),a.id||(a.id=Object(r.w)()),n=a;var c=t(a);return i?window.localStorage.setItem(e,JSON.stringify(a)):Object(r.i)()[e]=a,n=null,c}function u(e){return i(function(n){var t=n.__session__,o=Date.now();return t&&o-t.created>c&&(t=null),t||(t={guid:Object(r.w)(),created:o}),n.__session__=t,e(t)})}return{getState:i,getID:function(){return i(function(e){return e.id})},getSessionState:function(e){return u(function(n){return n.state=n.state||{},e(n.state)})},getSessionID:function(){return u(function(e){return e.guid})}}},[{name:t,version:a,lifetime:c}])};var r=t(7),o=t(11)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),o=t(3);function i(e,n){if(!o.b.ALLOW_POSTMESSAGE_POPUP&&!1===Object(r.isSameTopWindow)(e,n))throw new Error("Can not send and receive post messages between two different windows (disabled to emulate IE)")}t.d(n,"emulateIERestrictions",function(){return i})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(2),o=t(0),i=t(1),a=t(3),u=t(5),c=Object(u.b)("tunnelWindows");function s(){return!!Object(o.getUserAgent)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!a.b.ALLOW_POSTMESSAGE_POPUP}function d(e){return!Object(o.isSameTopWindow)(window,e)}function f(e,n){if(e){if(Object(o.getDomain)()!==Object(o.getDomainFromUrl)(e))return!0}else if(n&&!Object(o.isSameDomain)(n))return!0;return!1}function l(e){var n=e.win,t=e.domain;return!(!s()||t&&!f(t,n)||n&&!d(n))}function p(e){var n=(e=e||Object(o.getDomainFromUrl)(e)).replace(/[^a-zA-Z0-9]+/g,"_");return a.a+"_"+n}function h(){return Boolean(window.name&&window.name===p(Object(o.getDomain)()))}u.a.openTunnelToParent=function(e){var n=e.name,t=e.source,r=e.canary,s=e.sendMessage,d=Object(o.getParent)(window);if(!d)throw new Error("No parent window found to open tunnel to");var f=function(e){var n=e.name,t=e.source,r=e.canary,a=e.sendMessage;!function(){for(var e=0,n=c.keys(),t=null==n?0:n.length;e<t;e++){var r=n[e],a=c[r];try{Object(i.noop)(a.source)}catch(e){c.del(r);continue}Object(o.isWindowClosed)(a.source)&&c.del(r)}}();var u=Object(i.uniqueID)();return c.set(u,{name:n,source:t,canary:r,sendMessage:a}),u}({name:n,source:t,canary:r,sendMessage:s});return u.a.send(d,a.d.OPEN_TUNNEL,{name:n,sendMessage:function(){var e=c.get(f);try{Object(i.noop)(e&&e.source)}catch(e){return void c.del(f)}if(e&&e.source&&!Object(o.isWindowClosed)(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:a.i})};var w=new r.a(function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval(function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)},10)}),m=Object(u.c)("remoteWindows");function y(e){m.getOrSet(e,function(){return new r.a})}function v(e){var n=m.get(e);if(!n)throw new Error("Remote window not found");return n}function g(e,n,t){v(e).resolve(function(r,i,a){if(r!==e)throw new Error("Remote window does not match window");if(!Object(o.matchDomain)(i,n))throw new Error("Remote domain "+i+" does not match domain "+n);t(a)})}function E(e,n){v(e).reject(n).catch(i.noop)}function O(e,n,t){var r=Object(o.isOpener)(window,e),i=Object(o.isOpener)(e,window);if(!r&&!i)throw new Error("Can only send messages to and from parent and popup windows");return v(e).then(function(r){return r(e,n,t)})}var b=Object(i.weakMapMemoize)(function(e){return r.a.try(function(){try{var n=Object(o.getFrameByName)(e,p(Object(o.getDomain)()));if(!n)return;return Object(o.isSameDomain)(n)&&n[a.j.POSTROBOT]?n:new r.a(function(e){var t=void 0,r=void 0;t=setInterval(function(){if(n&&Object(o.isSameDomain)(n)&&n[a.j.POSTROBOT])return clearInterval(t),clearTimeout(r),e(n)},100),r=setTimeout(function(){return clearInterval(t),e()},2e3)})}catch(e){}})});function C(){return r.a.try(function(){var e=Object(o.getOpener)(window);if(e&&l({win:e}))return y(e),b(e).then(function(n){return n?window.name?n[a.j.POSTROBOT].openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{Object(i.noop)(window)}catch(e){return}if(window&&!window.closed)try{u.a.receiveMessage({data:e,origin:this.origin,source:this.source})}catch(e){r.a.reject(e)}}}).then(function(n){var t=n.source,r=n.origin,o=n.data;if(t!==e)throw new Error("Source does not match opener");g(t,r,o.sendMessage)}).catch(function(n){throw E(e,n),n}):E(e,new Error("Can not register with opener: window does not have a name")):E(e,new Error("Can not register with opener: no bridge found in opener"))})})}var S=t(6),T=Object(u.b)("bridges"),j=Object(u.b)("bridgeFrames"),_=Object(u.b)("popupWindowsByName"),A=Object(u.c)("popupWindowsByWin");function D(e,n){return T.has(n||Object(o.getDomainFromUrl)(e))}function P(e,n){return n=n||Object(o.getDomainFromUrl)(e),T.getOrSet(n,function(){return r.a.try(function(){if(Object(o.getDomain)()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var t=p(n);if(Object(o.getFrameByName)(window,t))throw new Error("Frame with name "+t+" already exists on page");var i=function(e,n){var t=document.createElement("iframe");return t.setAttribute("name",e),t.setAttribute("id",e),t.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),t.setAttribute("frameborder","0"),t.setAttribute("border","0"),t.setAttribute("scrolling","no"),t.setAttribute("allowTransparency","true"),t.setAttribute("tabindex","-1"),t.setAttribute("hidden","true"),t.setAttribute("title",""),t.setAttribute("role","presentation"),t.src=n,t}(t,e);return j.set(n,i),w.then(function(t){t.appendChild(i);var o=i.contentWindow;return function(e,n){u.a.on(a.d.OPEN_TUNNEL,{window:e,domain:n},function(e){var t=e.origin,o=e.data;if(t!==n)throw new Error("Domain "+n+" does not match origin "+t);if(!o.name)throw new Error("Register window expected to be passed window name");if(!o.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!_.has(o.name))throw new Error("Window with name "+o.name+" does not exist, or was not opened by this window");if(!_.get(o.name).domain)throw new Error("We do not have a registered domain for window "+o.name);if(_.get(o.name).domain!==t)throw new Error("Message origin "+t+" does not matched registered window origin "+_.get(o.name).domain);return g(_.get(o.name).win,n,o.sendMessage),{sendMessage:function(e){if(window&&!window.closed){var n=_.get(o.name);if(n)try{u.a.receiveMessage({data:e,origin:n.domain,source:n.win})}catch(e){r.a.reject(e)}}}}})}(o,n),new r.a(function(e,n){i.onload=e,i.onerror=n}).then(function(){return Object(S.a)(o,a.b.BRIDGE_TIMEOUT,"Bridge "+e)}).then(function(){return o})})})})}var L=window.open;function N(e,n){A.has(e)&&(A.get(e).domain=Object(o.getDomainFromUrl)(n),y(e))}function I(){for(var e=0,n=j.keys(),t=null==n?0:n.length;e<t;e++){var r=n[e],o=j.get(r);o&&o.parentNode&&o.parentNode.removeChild(o)}j.reset(),T.reset()}window.open=function(e,n,t,r){var i=e;if(e&&0===e.indexOf(a.f.MOCK)){var u=e.split("|");i=u[0],e=u[1]}i&&(i=Object(o.getDomainFromUrl)(i));var c=L.call(this,e,n,t,r);if(!c)return c;e&&y(c);for(var s=0,d=_.keys(),f=null==d?0:d.length;s<f;s++){var l=d[s];Object(o.isWindowClosed)(_.get(l).win)&&_.del(l)}if(n&&c){var p=A.getOrSet(c,function(){return{}});p.name=p.name||n,p.win=p.win||c,p.domain=p.domain||i,A.set(c,p),_.set(n,p)}return c},t.d(n,"openTunnelToOpener",function(){return C}),t.d(n,"needsBridgeForBrowser",function(){return s}),t.d(n,"needsBridgeForWin",function(){return d}),t.d(n,"needsBridgeForDomain",function(){return f}),t.d(n,"needsBridge",function(){return l}),t.d(n,"getBridgeName",function(){return p}),t.d(n,"isBridge",function(){return h}),t.d(n,"documentBodyReady",function(){return w}),t.d(n,"registerRemoteWindow",function(){return y}),t.d(n,"findRemoteWindow",function(){return v}),t.d(n,"registerRemoteSendMessage",function(){return g}),t.d(n,"rejectRemoteSendMessage",function(){return E}),t.d(n,"sendBridgeMessage",function(){return O}),t.d(n,"hasBridge",function(){return D}),t.d(n,"openBridge",function(){return P}),t.d(n,"linkUrl",function(){return N}),t.d(n,"destroyBridges",function(){return I})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={};t.d(r,"markWindowKnown",function(){return c.e}),t.d(r,"serializeMessage",function(){return N}),t.d(r,"deserializeMessage",function(){return I}),t.d(r,"ProxyWindow",function(){return j}),t.d(r,"cleanUpWindow",function(){return he}),t.d(r,"Promise",function(){return u.a}),t.d(r,"bridge",function(){return we}),t.d(r,"parent",function(){return pe}),t.d(r,"send",function(){return oe}),t.d(r,"requestPromises",function(){return te}),t.d(r,"request",function(){return re}),t.d(r,"sendToParent",function(){return ie}),t.d(r,"client",function(){return ae}),t.d(r,"on",function(){return se}),t.d(r,"listen",function(){return ce}),t.d(r,"once",function(){return de}),t.d(r,"listener",function(){return fe}),t.d(r,"CONFIG",function(){return f.b}),t.d(r,"disable",function(){return le});var o={};t.d(o,"default",function(){return me}),t.d(o,"markWindowKnown",function(){return c.e}),t.d(o,"serializeMessage",function(){return N}),t.d(o,"deserializeMessage",function(){return I}),t.d(o,"ProxyWindow",function(){return j}),t.d(o,"cleanUpWindow",function(){return he}),t.d(o,"Promise",function(){return u.a}),t.d(o,"bridge",function(){return we}),t.d(o,"parent",function(){return pe}),t.d(o,"send",function(){return oe}),t.d(o,"requestPromises",function(){return te}),t.d(o,"request",function(){return re}),t.d(o,"sendToParent",function(){return ie}),t.d(o,"client",function(){return ae}),t.d(o,"on",function(){return se}),t.d(o,"listen",function(){return ce}),t.d(o,"once",function(){return de}),t.d(o,"listener",function(){return fe}),t.d(o,"CONFIG",function(){return f.b}),t.d(o,"disable",function(){return le});var i={};t.d(i,"PopupOpenError",function(){return d.PopupOpenError}),t.d(i,"create",function(){return Sn}),t.d(i,"getByTag",function(){return Tn}),t.d(i,"getCurrentScriptDir",function(){return Be}),t.d(i,"useLogger",function(){return qe}),t.d(i,"destroyAll",function(){return jn}),t.d(i,"postRobot",function(){return _n}),t.d(i,"CONSTANTS",function(){return An});var a,u=t(2),c=t(6),s=t(0),d=t(1),f=t(3),l={FUNCTION:"function",ERROR:"error",PROMISE:"promise",REGEX:"regex",DATE:"date",ARRAY:"array",OBJECT:"object",STRING:"string",NUMBER:"number",BOOLEAN:"boolean",NULL:"null",UNDEFINED:"undefined"},p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function h(e){return"object"===(void 0===e?"undefined":p(e))&&null!==e&&"string"==typeof e.__type__}function w(e){return void 0===e?l.UNDEFINED:null===e?l.NULL:Array.isArray(e)?l.ARRAY:"function"==typeof e?l.FUNCTION:"object"===(void 0===e?"undefined":p(e))?e instanceof Error?l.ERROR:"function"==typeof e.then?l.PROMISE:"[object RegExp]"===Object.prototype.toString.call(e)?l.REGEX:"[object Date]"===Object.prototype.toString.call(e)?l.DATE:l.OBJECT:"string"==typeof e?l.STRING:"number"==typeof e?l.NUMBER:"boolean"==typeof e?l.BOOLEAN:void 0}function m(e,n){return{__type__:e,__val__:n}}var y,v=((a={})[l.FUNCTION]=function(){},a[l.ERROR]=function(e){var n=e.message,t=e.stack,r=e.code;return m(l.ERROR,{message:n,stack:t,code:r})},a[l.PROMISE]=function(){},a[l.REGEX]=function(e){return m(l.REGEX,e.source)},a[l.DATE]=function(e){return m(l.DATE,e.toJSON())},a[l.ARRAY]=function(e){return e},a[l.OBJECT]=function(e){return e},a[l.STRING]=function(e){return e},a[l.NUMBER]=function(e){return e},a[l.BOOLEAN]=function(e){return e},a[l.NULL]=function(e){return e},a),g={},E=((y={})[l.FUNCTION]=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},y[l.ERROR]=function(e){var n=e.message,t=e.stack,r=e.code,o=new Error(n);return o.code=r,o.stack=t+"\n\n"+o.stack,o},y[l.PROMISE]=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},y[l.REGEX]=function(e){return new RegExp(e)},y[l.DATE]=function(e){return new Date(e)},y[l.ARRAY]=function(e){return e},y[l.OBJECT]=function(e){return e},y[l.STRING]=function(e){return e},y[l.NUMBER]=function(e){return e},y[l.BOOLEAN]=function(e){return e},y[l.NULL]=function(e){return e},y),O={},b=t(5),C=Object(b.c)("winToProxyWindow"),S=Object(b.b)("idToProxyWindow");function T(){for(var e=0,n=S.keys(),t=null==n?0:n.length;e<t;e++){var r=n[e];S.get(r).shouldClean()&&S.del(r)}}var j=function(){function e(n,t){!function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.serializedWindow=n,this.actualWindowPromise=new u.a,t&&this.setWindow(t),this.serializedWindow.getInstanceID=Object(d.memoizePromise)(this.serializedWindow.getInstanceID)}return e.prototype.setLocation=function(e){var n=this;return u.a.try(function(){if(!n.actualWindow)return n.serializedWindow.setLocation(e);n.actualWindow.location=e}).then(function(){return n})},e.prototype.setName=function(e){var n=this;return u.a.try(function(){if(!n.actualWindow)return n.serializedWindow.setName(e);if(!Object(s.isSameDomain)(n.actualWindow))throw new Error("Can not set name for window on different domain");n.actualWindow.name=e,n.actualWindow.frameElement&&n.actualWindow.frameElement.setAttribute("name",e)}).then(function(){return n})},e.prototype.close=function(){var e=this;return u.a.try(function(){if(!e.actualWindow)return e.serializedWindow.close();e.actualWindow.close()}).then(function(){return e})},e.prototype.focus=function(){var e=this;return u.a.try(function(){return e.actualWindow&&e.actualWindow.focus(),e.serializedWindow.focus()}).then(function(){return e})},e.prototype.isClosed=function(){var e=this;return u.a.try(function(){return e.actualWindow?Object(s.isWindowClosed)(e.actualWindow):e.serializedWindow.isClosed()})},e.prototype.setWindow=function(e){this.actualWindow=e,this.actualWindowPromise.resolve(e)},e.prototype.matchWindow=function(e){var n=this;return u.a.try(function(){return n.actualWindow?e===n.actualWindow:u.a.all([n.getInstanceID(),Object(c.b)(e)]).then(function(t){var r=t[0]===t[1];return r&&n.setWindow(e),r})})},e.prototype.unwrap=function(){return this.actualWindow||this},e.prototype.awaitWindow=function(){return this.actualWindowPromise},e.prototype.getInstanceID=function(){return this.actualWindow?Object(c.b)(this.actualWindow):this.serializedWindow.getInstanceID()},e.prototype.serialize=function(){return this.serializedWindow},e.prototype.shouldClean=function(){return this.actualWindow&&Object(s.isWindowClosed)(this.actualWindow)},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n){return T(),e.toProxyWindow(n).serialize()},e.deserialize=function(n){return T(),S.getOrSet(n.id,function(){return new e(n)})},e.isProxyWindow=function(n){return n instanceof e},e.toProxyWindow=function(n){return T(),e.isProxyWindow(n)?n:C.getOrSet(n,function(){var t=Object(d.uniqueID)();return S.set(t,new e({id:t,getInstanceID:function(){return Object(c.b)(n)},close:function(){return u.a.try(function(){n.close()})},focus:function(){return u.a.try(function(){n.focus()})},isClosed:function(){return u.a.try(function(){return Object(s.isWindowClosed)(n)})},setLocation:function(e){return u.a.try(function(){if(Object(s.isSameDomain)(n))try{if(n.location&&"function"==typeof n.location.replace)return void n.location.replace(e)}catch(e){}n.location=e})},setName:function(e){return u.a.try(function(){n.name=e})}},n))})},e}(),_=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},A=Object(b.c)("methodStore"),D=Object(b.b)("proxyWindowMethods");b.a.listeningForFunctions=b.a.listeningForFunctions||!1;var P=Object(d.once)(function(){b.a.listeningForFunctions||(b.a.listeningForFunctions=!0,b.a.on(f.d.METHOD,{origin:f.i},function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name;return u.a.try(function(){var e=A.getOrSet(n,function(){return{}})[r.id]||D.get(o);if(!e)throw new Error("Could not find method '"+r.name+"' with id: "+r.id+" in "+Object(s.getDomain)(window));var i=e.proxy,a=e.domain,u=e.val;if(!Object(s.matchDomain)(a,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(e.domain)+" does not match origin "+t+" in "+Object(s.getDomain)(window));return i?i.matchWindow(n).then(function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+Object(s.getDomain)(window));return u}):u}).then(function(e){return e.apply({source:n,origin:t,data:r},r.args)}).then(function(e){return{result:e,id:o,name:i}})}))});function L(e,n,t,r){P();var o=Object(d.uniqueID)();return e=j.unwrap(e),j.isProxyWindow(e)?(D.set(o,{proxy:e,domain:n,val:t}),e.awaitWindow().then(function(e){D.del(o),A.getOrSet(e,function(){return{}})[o]={domain:n,val:t}})):A.getOrSet(e,function(){return{}})[o]={domain:n,val:t},m(f.h.CROSS_DOMAIN_FUNCTION,{id:o,name:t.name||r})}function N(e,n,t){var r;return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,t=JSON.stringify(e,function(e){var t=this[e];if(h(this))return t;var r=w(t);if(!r)return t;var o=n[r]||v[r];return o?o(t,e):t});return void 0===t?l.UNDEFINED:t}(t,((r={})[l.PROMISE]=function(t,r){return function(e,n,t,r){return m(f.h.CROSS_DOMAIN_ZALGO_PROMISE,{then:L(e,n,function(e,n){return t.then(e,n)},r)})}(e,n,t,r)},r[l.FUNCTION]=function(t,r){return L(e,n,t,r)},r[l.OBJECT]=function(e){return Object(s.isWindow)(e)||j.isProxyWindow(e)?(n=e,m(f.h.CROSS_DOMAIN_WINDOW,j.serialize(n))):e;var n},r))}function I(e,n,t){var r;return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O;if(e!==l.UNDEFINED)return JSON.parse(e,function(e,t){if(h(this))return t;var r=void 0,o=void 0;if(h(t)?(r=t.__type__,o=t.__val__):(r=w(t),o=t),!r)return o;var i=n[r]||E[r];return i?i(o,e):o})}(t,((r={})[f.h.CROSS_DOMAIN_ZALGO_PROMISE]=function(e){return n=e.then,new u.a(n);var n},r[f.h.CROSS_DOMAIN_FUNCTION]=function(t){return function(e,n,t){var r=t.id,o=t.name;function i(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u.a.try(function(){return j.isProxyWindow(e)?e.awaitWindow():e}).then(function(e){return b.a.send(e,f.d.METHOD,{id:r,name:o,args:t},_({domain:n},i))})}function a(){return i(Array.prototype.slice.call(arguments)).then(function(e){return e.data.result})}return a.fireAndForget=function(){return i(Array.prototype.slice.call(arguments),{fireAndForget:!0})},a.__name__=o,a.__xdomain__=!0,a.origin=n,a}(e,n,t)},r[f.h.CROSS_DOMAIN_WINDOW]=function(e){return n=e,j.deserialize(n);var n},r))}var R={};R[f.g.POST_MESSAGE]=function(e,n,r){try{t(13).emulateIERestrictions(window,e)}catch(e){return}(Array.isArray(r)?r:"string"==typeof r?[r]:[f.i]).map(function(n){if(0===n.indexOf(f.f.MOCK)){if(window.location.protocol===f.f.FILE)return f.i;if(!Object(s.isActuallySameDomain)(e))throw new Error("Attempting to send messsage to mock domain "+n+", but window is actually cross-domain");return Object(s.getActualDomain)(e)}return 0===n.indexOf(f.f.FILE)?f.i:n}).forEach(function(t){return e.postMessage(n,t)})};var x=t(14),W=x.sendBridgeMessage,M=x.needsBridgeForBrowser,k=x.isBridge;R[f.g.BRIDGE]=function(e,n,t){if(M()||k()){if(Object(s.isSameDomain)(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==Object(s.isSameTopWindow)(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");return W(e,t,n)}},R[f.g.GLOBAL]=function(e,n){if(Object(c.f)()){if(!Object(s.isSameDomain)(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==Object(s.isSameTopWindow)(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var t=e[f.j.POSTROBOT];if(!t)throw new Error("Can not find postRobot global on foreign window");return t.receiveMessage({source:window,origin:Object(s.getDomain)(),data:n})}};var U=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};function z(e,n,t){return u.a.try(function(){var r;if(Object(s.isWindowClosed)(e))throw new Error("Window is closed");var o=N(e,n,((r={})[f.j.POSTROBOT]=U({id:Object(d.uniqueID)()},t),r)),i=[];return u.a.map(Object.keys(R),function(t){return u.a.try(function(){if(!f.b.ALLOWED_POST_MESSAGE_METHODS[t])throw new Error("Strategy disallowed: "+t);return R[t](e,o,n)}).then(function(){return i.push(t+": success"),!0},function(e){return i.push(t+": "+Object(d.stringifyError)(e)+"\n"),!1})}).then(function(e){var n=e.some(Boolean),r=t.type+" "+t.name+" "+(n?"success":"error")+":\n - "+i.join("\n - ")+"\n";if(!n)throw new Error(r)})})}var F=Object(b.b)("responseListeners"),B=Object(b.c)("requestListeners"),G=Object(b.b)("erroredResponseListeners");b.a.WINDOW_WILDCARD=b.a.WINDOW_WILDCARD||new function(){};var q,H="__domain_regex__";function X(e){return F.get(e)}function K(e){F.del(e)}function Z(e){return G.has(e)}function J(e){var n=e.name,t=e.win,r=e.domain;if(t===f.i&&(t=null),r===f.i&&(r=null),!n)throw new Error("Name required to get request listener");for(var o=0,i=[t,b.a.WINDOW_WILDCARD],a=null==i?0:i.length;o<a;o++){var u=i[o];if(u){var c=B.get(u);if(c){var d=c[n];if(d){if(r&&"string"==typeof r){if(d[r])return d[r];if(d[H])for(var l=0,p=d[H],h=null==p?0:p.length;l<h;l++){var w=p[l],m=w.regex,y=w.listener;if(Object(s.matchDomain)(m,r))return y}}if(d[f.i])return d[f.i]}}}}}var V=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Y=((q={})[f.e.REQUEST]=function(e,n,t){var r=J({name:t.name,win:e,domain:n});function o(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.fireAndForget||Object(s.isWindowClosed)(e)?u.a.resolve():z(e,n,V({type:r,hash:t.hash,name:t.name},o))}return u.a.all([o(f.e.ACK),u.a.try(function(){if(!r)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Object(s.matchDomain)(r.domain,n))throw new Error("Request origin "+n+" does not match domain "+r.domain.toString());var o=t.data;return r.handler({source:e,origin:n,data:o})}).then(function(e){return o(f.e.RESPONSE,{ack:f.c.SUCCESS,data:e})},function(e){return o(f.e.RESPONSE,{ack:f.c.ERROR,error:e})})]).then(d.noop).catch(function(e){if(r&&r.handleError)return r.handleError(e);throw e})},q[f.e.ACK]=function(e,n,t){if(!Z(t.hash)){var r=X(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Object(s.matchDomain)(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());r.ack=!0}},q[f.e.RESPONSE]=function(e,n,t){if(!Z(t.hash)){var r=X(t.hash);if(!r)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Object(s.matchDomain)(r.domain,n))throw new Error("Response origin "+n+" does not match domain "+Object(s.stringifyDomainPattern)(r.domain));if(K(t.hash),t.ack===f.c.ERROR)return r.respond(t.error,null);if(t.ack===f.c.SUCCESS){var o=t.data;return r.respond(null,{source:e,origin:n,data:o})}}},q),$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q=Object(b.b)("receivedMessages");function ee(e){if(!window||window.closed)throw new Error("Message recieved in closed window");try{if(!e.source)return}catch(e){return}var n=e.source,t=e.origin,r=function(e,n,t){var r=void 0;try{r=I(n,t,e)}catch(e){return}if(r&&"object"===(void 0===r?"undefined":$(r))&&null!==r&&(r=r[f.j.POSTROBOT])&&"object"===(void 0===r?"undefined":$(r))&&null!==r&&r.type&&"string"==typeof r.type&&Y[r.type])return r}(e.data,n,t);r&&(Object(c.e)(n),Q.has(r.id)||(Q.set(r.id,!0),Object(s.isWindowClosed)(n)&&!r.fireAndForget||Y[r.type](n,t,r)))}function ne(e){try{Object(d.noop)(e.source)}catch(e){return}var n={source:e.source||e.sourceElement,origin:e.origin||e.originalEvent&&e.originalEvent.origin,data:e.data};try{t(13).emulateIERestrictions(n.source,window)}catch(e){return}ee(n)}b.a.receiveMessage=ee;var te=Object(b.c)("requestPromises");function re(e){return u.a.try(function(){if(!e.name)throw new Error("Expected options.name");var n=e.name,t=void 0,r=void 0;if("string"==typeof e.window){var o=document.getElementById(e.window);if(!o)throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be a valid element id");if("iframe"!==o.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(!o.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");t=o.contentWindow}else if(e.window instanceof HTMLIFrameElement){if("iframe"!==e.window.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(e.window&&!e.window.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");e.window&&e.window.contentWindow&&(t=e.window.contentWindow)}else t=e.window;if(!t)throw new Error("Expected options.window to be a window object, iframe, or iframe element id.");var i=t;r=e.domain||f.i;var a=e.name+"_"+Object(d.uniqueID)();if(Object(s.isWindowClosed)(i))throw new Error("Target window is closed");var l=!1,p=te.getOrSet(i,function(){return[]}),h=u.a.try(function(){if(Object(s.isAncestor)(window,i))return Object(c.a)(i,e.timeout||f.b.CHILD_WINDOW_TIMEOUT)}).then(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).domain;if(Object(d.isRegex)(r)&&!e)return Object(c.g)(i)}).then(function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).domain;if(Object(d.isRegex)(r)){if(!Object(s.matchDomain)(r,t))throw new Error("Remote window domain "+t+" does not match regex: "+r.toString());r=t}if("string"!=typeof r&&!Array.isArray(r))throw new TypeError("Expected domain to be a string or array");var o=r;return new u.a(function(t,r){var u=void 0;if(e.fireAndForget||function(e,n){F.set(e,n)}(a,u={name:n,window:i,domain:o,respond:function(e,n){e||(l=!0,p.splice(p.indexOf(h,1))),e?r(e):t(n)}}),z(i,o,{type:f.e.REQUEST,hash:a,name:n,data:e.data,fireAndForget:Boolean(e.fireAndForget)}).catch(r),e.fireAndForget)return t();var d=Object(c.d)(i)?f.b.ACK_TIMEOUT_KNOWN:f.b.ACK_TIMEOUT,w=e.timeout||f.b.RES_TIMEOUT,m=d,y=w,v=100;setTimeout(function e(){if(!l){if(Object(s.isWindowClosed)(i))return u.ack?r(new Error("Window closed for "+n+" before response")):r(new Error("Window closed for "+n+" before ack"));if(m=Math.max(m-v,0),-1!==y&&(y=Math.max(y-v,0)),u.ack){if(-1===y)return;v=Math.min(y,2e3)}else{if(0===m)return r(new Error("No ack for postMessage "+n+" in "+Object(s.getDomain)()+" in "+d+"ms"));if(0===y)return r(new Error("No response for postMessage "+n+" in "+Object(s.getDomain)()+" in "+w+"ms"))}setTimeout(e,v)}},v)})});return h.catch(function(){!function(e){G.set(e,!0)}(a),K(a)}),p.push(h),h})}function oe(e,n,t,r){return(r=r||{}).window=e,r.name=n,r.data=t,re(r)}function ie(e,n,t){var r=Object(s.getAncestor)();return r?oe(r,e,n,t):new u.a(function(e,n){return n(new Error("Window does not have a parent"))})}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.window)throw new Error("Expected options.window");var n=e.window;return{send:function(t,r){return oe(n,t,r,e)}}}b.a.send=oe;var ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ce(e){if(!e.name)throw new Error("Expected options.name");if(!e.handler)throw new Error("Expected options.handler");var n=e.name,t=e.window,r=e.domain,o={handler:e.handler,handleError:e.errorHandler||function(e){throw e},window:t,domain:r||f.i,name:n},i=function e(n,t){var r=n.name,o=n.win,i=n.domain;if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],u=0,c=o,s=null==c?0:c.length;u<s;u++){var l=c[u];a.push(e({name:r,domain:i,win:l},t))}return{cancel:function(){for(var e=0,n=null==a?0:a.length;e<n;e++)a[e].cancel()}}}if(Array.isArray(i)){for(var p=[],h=0,w=i,m=null==w?0:w.length;h<m;h++){var y=w[h];p.push(e({name:r,win:o,domain:y},t))}return{cancel:function(){for(var e=0,n=null==p?0:p.length;e<n;e++)p[e].cancel()}}}var v=J({name:r,win:o,domain:i});if(o&&o!==f.i||(o=b.a.WINDOW_WILDCARD),i=i||f.i,v)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===b.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===b.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var g=B.getOrSet(o,function(){return{}}),E=Object(d.getOrSet)(g,r,function(){return{}}),O=i.toString(),C=void 0,S=void 0;return Object(d.isRegex)(i)?(C=Object(d.getOrSet)(E,H,function(){return[]}),S={regex:i,listener:t},C.push(S)):E[O]=t,{cancel:function(){delete E[O],S&&(C.splice(C.indexOf(S,1)),C.length||delete E[H]),Object.keys(E).length||delete g[r],o&&!Object.keys(g).length&&B.del(o)}}}({name:n,win:t,domain:r},o);if(e.once){var a=o.handler;o.handler=Object(d.once)(function(){return i.cancel(),a.apply(this,arguments)})}if(o.window&&e.errorOnClose)var u=Object(d.safeInterval)(function(){t&&"object"===(void 0===t?"undefined":ue(t))&&Object(s.isWindowClosed)(t)&&(u.cancel(),o.handleError(new Error("Post message target window is closed")))},50);return{cancel:function(){i.cancel()}}}function se(e,n,t){return"function"==typeof n&&(t=n,n={}),(n=n||{}).name=e,n.handler=t||n.handler,ce(n)}function de(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments[2];"function"==typeof n&&(t=n,n={}),n=n||{},t=t||n.handler;var r=n.errorHandler,o=new u.a(function(o,i){(n=n||{}).name=e,n.once=!0,n.handler=function(e){if(o(e),t)return t(e)},n.errorHandler=function(e){if(i(e),r)return r(e)}}),i=ce(n);return o.cancel=i.cancel,o}function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{on:function(n,t){return se(n,e,t)}}}function le(){delete window[f.j.POSTROBOT],window.removeEventListener("message",ne)}b.a.on=se;var pe=Object(s.getAncestor)();function he(e){for(var n=0,t=te.get(e,[]),r=null==t?0:t.length;n<r;n++)t[n].reject(new Error("Window cleaned up before response"))}var we=t(25);b.a.initialized||(b.a.initialized=!0,Object(d.addEventListener)(window,"message",ne),we&&we.openTunnelToOpener(),Object(c.c)());var me=r,ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ve(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function ge(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}function Ee(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var Oe=function(){function e(){Ee(this,e)}return e.prototype.isElementNode=function(){return!1},e.prototype.isTextNode=function(){return!1},e.prototype.isFragmentNode=function(){return!1},e}(),be=function(e){function n(t,r,o){Ee(this,n);var i=ve(this,e.call(this));return i.name=t,i.props=r,i.children=o,"function"==typeof r.onRender&&(i.onRender=r.onRender,delete r.onRender),i}return ge(n,e),n.prototype.getTag=function(){return this.name},n.prototype.isTag=function(e){return e===this.name},n.prototype.isElementNode=function(){return!0},n.prototype.render=function(e){var n=e(this.name,this.props,this.children);return this.onRender&&this.onRender(n),n},n.prototype.getText=function(){throw new Error("Can not get text of an element node")},n}(Oe),Ce=function(e){function n(t){Ee(this,n);var r=ve(this,e.call(this));return r.text=t,r}return ge(n,e),n.prototype.getTag=function(){throw new Error("Can not get tag of text node")},n.prototype.isTag=function(e){throw new Error("Can not check tag of text node")},n.prototype.isTextNode=function(){return!0},n.prototype.render=function(e){throw new Error("Can not render a text node")},n.prototype.getText=function(){return this.text},n}(Oe),Se=function(e){function n(t){Ee(this,n);var r=ve(this,e.call(this));return r.children=t,r}return ge(n,e),n.prototype.getTag=function(){throw new Error("Can not get tag of fragment node")},n.prototype.isTag=function(e){throw new Error("Can not check tag of fragment node")},n.prototype.isFragmentNode=function(){return!0},n.prototype.render=function(e){throw new Error("Can not render a fragment node")},n.prototype.getText=function(){throw new Error("Can not get text of a fragment node")},n}(Oe);function Te(e){if("string"==typeof e)return new Ce(e);if(e instanceof be||e instanceof Ce||e instanceof Se)return e;if(Array.isArray(e))return new Se(je(e));if(null!==e&&void 0!==e)throw new Error("Child node must be string or instance of jsx-pragmatic node; got "+(void 0===e?"undefined":ye(e)))}function je(e){for(var n=[],t=0,r=null==e?0:e.length;t<r;t++){var o=Te(e[t]);if(o)if(o instanceof Se)for(var i=0,a=o.children,u=null==a?0:a.length;i<u;i++){var c=a[i];n.push(c)}else n.push(o)}return n}var _e,Ae,De=function(e,n){for(var t=arguments.length,r=Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];if("string"==typeof e)return new be(e,n||{},je(r));if("function"==typeof e)return Te(e(n||{},je(r)));throw new TypeError("Expected jsx Element to be a string or a function")},Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le="html",Ne="iframe",Ie="script",Re="node",xe="default",We="innerHTML",Me="el",ke={onBlur:"blur",onCancel:"cancel",onClick:"click",onClose:"close",onContextMenu:"contextMenu",onCopy:"copy",onCut:"cut",onAuxClick:"auxClick",onDoubleClick:"doubleClick",onDragEnd:"dragEnd",onDragStart:"dragStart",onDrop:"drop",onFocus:"focus",onInput:"input",onInvalid:"invalid",onKeyDown:"keyDown",onKeyPress:"keyPress",onKeyUp:"keyUp",onMouseDown:"mouseDown",onMouseUp:"mouseUp",onPaste:"paste",onPause:"pause",onPlay:"play",onPointerCancel:"pointerCancel",onPointerDown:"pointerDown",onPointerUp:"pointerUp",onRateChange:"rateChange",onReset:"reset",onSeeked:"seeked",onSubmit:"submit",onTouchCancel:"touchCancel",onTouchEnd:"touchEnd",onTouchStart:"touchStart",onVolumeChange:"volumeChange",onAbort:"abort",onAnimationEnd:"animationEnd",onAnimationIteration:"animationIteration",onAnimationStart:"animationStart",onCanPlay:"canPlay",onCanPlayThrough:"canPlayThrough",onDrag:"drag",onDragEnter:"dragEnter",onDragExit:"dragExit",onDragLeave:"dragLeave",onDragOver:"dragOver",onDurationChange:"durationChange",onEmptied:"emptied",onEncrypted:"encrypted",onEnded:"ended",onError:"error",onGotPointerCapture:"gotPointerCapture",onLoad:"load",onLoadedData:"loadedData",onLoadedMetadata:"loadedMetadata",onLoadStart:"loadStart",onLostPointerCapture:"lostPointerCapture",onMouseMove:"mouseMove",onMouseOut:"mouseOut",onMouseOver:"mouseOver",onPlaying:"playing",onPointerMove:"pointerMove",onPointerOut:"pointerOut",onPointerOver:"pointerOver",onProgress:"progress",onScroll:"scroll",onSeeking:"seeking",onStalled:"stalled",onSuspend:"suspend",onTimeUpdate:"timeUpdate",onToggle:"toggle",onTouchMove:"touchMove",onTransitionEnd:"transitionEnd",onWaiting:"waiting",onWheel:"wheel"},Ue=((_e={})[Re]=function(e){var n=e.props;if(!n[Me])throw new Error("Must pass "+Me+" prop to "+Re+" element");if(Object.keys(n).length>1)throw new Error("Must not pass any prop other than "+Me+" to "+Re+" element");return n[Me]},_e[xe]=function(e){var n=e.name;return e.doc.createElement(n)},_e),ze=((Ae={})[Ne]=function(e){var n=e.el,t=e.children,r=t[0];if(t.length>1||!r.isElementNode())throw new Error("Expected only single element node as child of "+Ne+" element");if(!r.isTag(Le))throw new Error("Expected element to be inserted into frame to be html, got "+r.getTag());n.addEventListener("load",function(){var e=n.contentWindow;if(!e)throw new Error("Expected frame to have contentWindow");for(var t=e.document,o=t.documentElement;o.children&&o.children.length;)o.removeChild(o.children[0]);for(var i=r.render(Fe({doc:t}));i.children.length;)o.appendChild(i.children[0])})},Ae[Ie]=function(e){var n=e.el,t=e.children,r=t[0];if(1!==t.length||!r.isTextNode())throw new Error("Expected only single text node as child of "+Ie+" element");n.text=r.getText()},Ae[xe]=function(e){for(var n=e.el,t=e.children,r=e.doc,o=e.domRenderer,i=0,a=null==t?0:t.length;i<a;i++){var u=t[i];u.isTextNode()?n.appendChild(r.createTextNode(u.getText())):n.appendChild(u.render(o))}},Ae),Fe=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).doc,n=void 0===e?document:e;return function e(t,r,o){var i=function(e){var n=e.doc,t=e.name,r=e.props;return(Ue[t]||Ue[xe])({name:t,props:r,doc:n})}({name:t,props:r,doc:n});return function(e){for(var n=e.el,t=e.props,r=0,o=Object.keys(t),i=null==o?0:o.length;r<i;r++){var a=o[r],u=t[a];if(null!==u&&void 0!==u&&a!==Me&&a!==We)if(ke.hasOwnProperty(a)){if(void 0!==u&&"function"!=typeof u)throw new TypeError("Prop "+a+" must be function");n.addEventListener(ke[a],u)}else if("string"==typeof u||"number"==typeof u)n.setAttribute(a,u.toString());else{if("boolean"!=typeof u)throw new TypeError("Can not render prop "+a+" of type "+(void 0===u?"undefined":Pe(u)));!0===u&&n.setAttribute(a,"")}}}({el:i,props:r}),function(e){var n=e.el,t=e.name,r=e.props,o=e.children,i=e.doc,a=e.domRenderer;if(r.hasOwnProperty(We)){if(o.length>=1)throw new Error("Expected no children to be passed when "+We+" prop is set");var u=r[We];if("string"!=typeof u)throw new TypeError(We+" prop must be string");t===Ie?n.text=u:(n.innerHTML=u,function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.document,t=0,r=e.querySelectorAll("script"),o=null==r?0:r.length;t<o;t++){var i=r[t],a=i.parentNode;if(a){var u=n.createElement("script");u.text=i.textContent,a.replaceChild(u,i)}}}(n,i))}else(ze[t]||ze[xe])({el:n,name:t,props:r,children:o,doc:i,domRenderer:a})}({el:i,name:t,props:r,children:o,doc:n,domRenderer:e}),i}};function Be(){return console.warn("Do not use zoid.getCurrentScriptDir() in production -- browser support is limited"),document.currentScript?document.currentScript.src.split("/").slice(0,-1).join("/"):"."}"function"==typeof Symbol&&Symbol.iterator;var Ge=void 0;function qe(e){Ge=e}var He=t(4);function Xe(e){if(Object(s.isSameDomain)(e))return e[He.__ZOID__]||(e[He.__ZOID__]={}),e[He.__ZOID__]}var Ke=function(){var e=Xe(window);if(!e)throw new Error("Could not get local global");return e}();function Ze(e){var n=[],t=!1;return{set:function(n,r){return t?r:(e[n]=r,this.register(function(){delete e[n]}),r)},register:function(e,r){if("function"==typeof e&&(r=e,e="<anonymous-cleanup-handler>"),"function"!=typeof r)throw new TypeError("Expected to be passed function to clean.register");t?r():n.push({complete:!1,name:e,run:function(){this.complete||(this.complete=!0,r&&r())}})},hasTasks:function(){return Boolean(n.filter(function(e){return!e.complete}).length)},all:function(){var e=[];for(t=!0;n.length;)e.push(n.pop().run());return u.a.all(e).then(function(){})},run:function(e){for(var t=[],r=0,o=null==n?0:n.length;r<o;r++){var i=n[r];i.name===e&&t.push(i.run())}return u.a.all(t).then(d.noop)}}}var Je,Ve=Object(d.memoize)(function(){if(!window.name)throw new Error("No window name");var e=window.name.split("__"),n=e[1],t=e[2],r=e[3];if(n!==He.ZOID)throw new Error("Window not rendered by zoid - got "+n);if(!t)throw new Error("Expected component name");if(!r)throw new Error("Expected encoded payload");try{return JSON.parse(Object(d.base64decode)(r))}catch(e){throw new Error("Can not decode window name payload: "+r+": "+Object(d.stringifyError)(e))}}),Ye=Object(d.memoize)(function(){try{Ve()}catch(e){return!1}return!0});function $e(e,n,t,r){var o=e.getProp(t);return o&&"function"==typeof o.childDecorate?o.childDecorate(r):r}var Qe,en,nn,tn,rn,on=(Je=function(){function e(n){var t=this;!function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),u.a.try(function(){if(window.xchild||window.xprops)throw t.component.createError("Can not attach multiple components to the same window");t.component=n,t.onPropHandlers=[];var e=Ve(),r=e.parent,o=e.domain,i=e.exports,a=e.context,u=e.props;t.context=a,t.parentComponentWindow=t.getWindowByRef(r),t.parentExports=I(t.parentComponentWindow,o,i),t.checkParentDomain(o),window.xchild=t.component.xchild=t;var s=t.getPropsByRef(t.parentComponentWindow,o,u);return t.setProps(s,o),Object(c.e)(t.parentComponentWindow),t.watchForClose(),t.parentExports.init(t.buildExports())}).then(function(){return t.watchForResize()}).catch(function(e){t.error(e)})}return e.prototype.checkParentDomain=function(e){if(!Object(s.matchDomain)(this.component.allowedParentDomains,e))throw new Error("Can not be rendered by domain: "+e)},e.prototype.onProps=function(e){this.onPropHandlers.push(e)},e.prototype.getPropsByRef=function(e,n,t){var r=t.type,o=t.value,i=t.uid,a=void 0;if(r===He.INITIAL_PROPS.RAW)a=o;else if(r===He.INITIAL_PROPS.UID){if(!Object(s.isSameDomain)(e)){if("file:"===window.location.protocol)throw new Error("Can not get props from file:// domain");throw new Error("Parent component window is on a different domain - expected "+Object(s.getDomain)()+" - can not retrieve props")}var u=Xe(e);if(!u)throw new Error("Can not find global for parent component - can not retrieve props");a=u.props[i]}if(!a)throw new Error("Initial props not found");return I(e,n,a)},e.prototype.getWindowByRef=function(e){var n=e.type,t=void 0;if(n===He.WINDOW_REFERENCES.OPENER)t=Object(s.getOpener)(window);else if(n===He.WINDOW_REFERENCES.TOP)t=Object(s.getTop)(window);else if(n===He.WINDOW_REFERENCES.PARENT){var r=e.distance;t=r?Object(s.getNthParentFromTop)(window,r):Object(s.getParent)(window)}if(n===He.WINDOW_REFERENCES.GLOBAL){var o=e.uid,i=Object(s.getAncestor)(window);if(i)for(var a=0,u=Object(s.getAllFramesInWindow)(i),c=null==u?0:u.length;a<c;a++){var d=Xe(u[a]);if(d&&d.windows&&d.windows[o]){t=d.windows[o];break}}}if(!t)throw new Error("Unable to find "+n+" window");return t},e.prototype.setProps=function(e,n){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.props=this.props||{};var r=function(e,n,t,r){for(var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i={},a=0,u=Object.keys(t),c=null==u?0:u.length;a<c;a++){var d=u[a],f=n.getProp(d);if(!f||!f.sameDomain||r===Object(s.getDomain)(window)&&Object(s.isSameDomain)(e)){var l=$e(n,0,d,t[d]);i[d]=l,f&&f.alias&&!i[f.alias]&&(i[f.alias]=l)}}if(o)for(var p=0,h=n.getPropNames(),w=null==h?0:h.length;p<w;p++){var m=h[p];t.hasOwnProperty(m)||(i[m]=$e(n,0,m,t[m]))}return i}(this.parentComponentWindow,this.component,e,n,t);Object(d.extend)(this.props,r);for(var o=0,i=this.onPropHandlers,a=null==i?0:i.length;o<a;o++)i[o].call(this,this.props);window.xprops=this.component.xprops=this.props},e.prototype.watchForClose=function(){var e=this;window.addEventListener("unload",function(){return e.parentExports.checkClose.fireAndForget()})},e.prototype.enableAutoResize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width,t=void 0!==n&&n,r=e.height,o=void 0===r||r,i=e.element,a=void 0===i?"body":i;this.autoResize={width:t,height:o,element:a},this.watchForResize()},e.prototype.getAutoResize=function(){var e=this.autoResize||this.component.autoResize||{},n=e.width,t=void 0!==n&&n,r=e.height,o=void 0!==r&&r,i=e.element,a=void 0===i?"body":i;return{width:t,height:o,element:a=Object(d.getElement)(a)}},e.prototype.watchForResize=function(){var e=this;return Object(d.waitForDocumentBody)().then(function(){var n=e.getAutoResize(),t=n.width,r=n.height,o=n.element;(t||r)&&e.context!==He.CONTEXT.POPUP&&Object(d.onResize)(o,function(n){var o=n.width,i=n.height;e.resize({width:t?o:void 0,height:r?i:void 0})},{width:t,height:r})})},e.prototype.buildExports=function(){var e=this;return{updateProps:function(n){var t=this;return u.a.try(function(){return e.setProps(n,t.origin,!1)})},close:function(){return u.a.try(function(){return e.destroy()})}}},e.prototype.resize=function(e){var n=e.width,t=e.height;return this.parentExports.resize.fireAndForget({width:n,height:t})},e.prototype.hide=function(){return this.parentExports.hide()},e.prototype.show=function(){return this.parentExports.show()},e.prototype.userClose=function(){return this.close(He.CLOSE_REASONS.USER_CLOSED)},e.prototype.close=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.CHILD_CALL;return this.parentExports.close(e)},e.prototype.destroy=function(){return u.a.try(function(){window.close()})},e.prototype.focus=function(){window.focus()},e.prototype.error=function(e){var n=this;return u.a.try(function(){if(n.parentExports.error)return n.parentExports.error(e)}).catch(d.noop).then(function(){throw e})},e}(),Qe=Je.prototype,en=[d.memoized],nn=Object.getOwnPropertyDescriptor(Je.prototype,"watchForResize"),tn=Je.prototype,rn={},Object.keys(nn).forEach(function(e){rn[e]=nn[e]}),rn.enumerable=!!rn.enumerable,rn.configurable=!!rn.configurable,("value"in rn||rn.initializer)&&(rn.writable=!0),rn=en.slice().reverse().reduce(function(e,n){return n(Qe,"watchForResize",e)||e},rn),tn&&void 0!==rn.initializer&&(rn.value=rn.initializer?rn.initializer.call(tn):void 0,rn.initializer=void 0),void 0===rn.initializer&&(Object.defineProperty(Qe,"watchForResize",rn),rn=null),Je),an=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},un={};un[He.CONTEXT.IFRAME]={renderedIntoContainer:!0,callChildToClose:!1,open:function(){var e=this,n=this.component.attributes.iframe||{},t=Object(d.iframe)({attributes:an({title:this.component.name},n),class:[He.CLASS_NAMES.COMPONENT_FRAME,He.CLASS_NAMES.INVISIBLE]},this.element);return this.clean.set("iframe",t),Object(d.awaitFrameWindow)(t).then(function(n){var r=function(){return u.a.try(function(){return e.props.onClose(He.CLOSE_REASONS.CLOSE_DETECTED)}).finally(function(){return e.destroy()})},o=Object(d.watchElementForClose)(t,r),i=Object(d.watchElementForClose)(e.element,r);return e.clean.register("destroyWindow",function(){o.cancel(),i.cancel(),he(n),Object(d.destroyElement)(t)}),j.toProxyWindow(n)})},openPrerender:function(){var e=this,n=this.component.attributes.iframe||{},t=Object(d.iframe)({attributes:an({name:"__zoid_prerender_frame__"+this.component.name+"_"+Object(d.uniqueID)()+"__"},n),class:[He.CLASS_NAMES.PRERENDER_FRAME,He.CLASS_NAMES.VISIBLE]},this.element);return this.clean.set("prerenderIframe",t),Object(d.awaitFrameLoad)(t).then(function(){var n=t.contentWindow;return e.clean.register("destroyPrerender",function(){Object(d.destroyElement)(t)}),Object(s.assertSameDomain)(n)})},switchPrerender:function(){var e=this;Object(d.addClass)(this.prerenderIframe,He.CLASS_NAMES.INVISIBLE),Object(d.removeClass)(this.prerenderIframe,He.CLASS_NAMES.VISIBLE),Object(d.addClass)(this.iframe,He.CLASS_NAMES.VISIBLE),Object(d.removeClass)(this.iframe,He.CLASS_NAMES.INVISIBLE),setTimeout(function(){e.prerenderIframe&&Object(d.destroyElement)(e.prerenderIframe)},1e3)},delegateOverrides:{openContainer:He.DELEGATE.CALL_DELEGATE,destroyComponent:He.DELEGATE.CALL_DELEGATE,destroyContainer:He.DELEGATE.CALL_DELEGATE,cancelContainerEvents:He.DELEGATE.CALL_DELEGATE,prerender:He.DELEGATE.CALL_DELEGATE,elementReady:He.DELEGATE.CALL_DELEGATE,showContainer:He.DELEGATE.CALL_DELEGATE,showComponent:He.DELEGATE.CALL_DELEGATE,hideContainer:He.DELEGATE.CALL_DELEGATE,hideComponent:He.DELEGATE.CALL_DELEGATE,hide:He.DELEGATE.CALL_DELEGATE,show:He.DELEGATE.CALL_DELEGATE,resize:He.DELEGATE.CALL_DELEGATE,loadUrl:He.DELEGATE.CALL_DELEGATE,openPrerender:He.DELEGATE.CALL_DELEGATE,switchPrerender:He.DELEGATE.CALL_DELEGATE,setWindowName:He.DELEGATE.CALL_DELEGATE,open:He.DELEGATE.CALL_DELEGATE},resize:function(e){var n=e.width,t=e.height;n&&(this.container.style.width=Object(d.toCSS)(n),this.element.style.width=Object(d.toCSS)(n)),t&&(this.container.style.height=Object(d.toCSS)(t),this.element.style.height=Object(d.toCSS)(t))},show:function(){Object(d.showElement)(this.element)},hide:function(){Object(d.hideElement)(this.element)}},un[He.CONTEXT.POPUP]={renderedIntoContainer:!1,callChildToClose:!0,open:function(){var e=this;return u.a.try(function(){var n=e.component.dimensions,t=n.width,r=n.height;t=Object(d.normalizeDimension)(t,window.outerWidth),r=Object(d.normalizeDimension)(r,window.outerWidth);var o=e.component.attributes.popup||{},i=Object(d.popup)("",an({width:t,height:r},o));return e.clean.register("destroyWindow",function(){i.close(),he(i)}),j.toProxyWindow(i)})},openPrerender:function(e){return u.a.try(function(){if(Object(s.isSameDomain)(e))return Object(s.assertSameDomain)(e)})},resize:function(){},hide:function(){throw new Error("Can not hide popup")},show:function(){throw new Error("Can not show popup")},delegateOverrides:{openContainer:He.DELEGATE.CALL_DELEGATE,destroyContainer:He.DELEGATE.CALL_DELEGATE,elementReady:He.DELEGATE.CALL_DELEGATE,showContainer:He.DELEGATE.CALL_DELEGATE,showComponent:He.DELEGATE.CALL_DELEGATE,hideContainer:He.DELEGATE.CALL_DELEGATE,hideComponent:He.DELEGATE.CALL_DELEGATE,hide:He.DELEGATE.CALL_DELEGATE,show:He.DELEGATE.CALL_DELEGATE,cancelContainerEvents:He.DELEGATE.CALL_DELEGATE}};var cn,sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ln(e,n,t,r,o){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=t.slice().reverse().reduce(function(t,r){return r(e,n,t)||t},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,n,i),i=null),i}Ke.props=Ke.props||{},Ke.windows=Ke.windows||{};var pn=(ln((cn=function(){function e(n,t,r){var o=this,i=r.props;!function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),u.a.try(function(){return o.onInit=new u.a,o.clean=Ze(o),o.event=Object(d.eventEmitter)(),o.component=n,o.driver=un[t],o.setProps(i),o.registerActiveComponent(),o.watchForUnload(),o.onInit}).catch(function(e){return o.error(e,i)})}return e.prototype.render=function(e,n){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return this.tryInit(function(){t.component.log("render");var o=Object(d.uniqueID)(),i={};i.onRender=t.props.onRender();var a=t.getDomain(),c=t.getInitialDomain();i.elementReady=u.a.try(function(){if(n)return t.elementReady(n)});var f=function(){return i.open.then(function(e){return e.focus()})};return i.openContainer=i.elementReady.then(function(){return t.openContainer(n,{context:e,uid:o,focus:f})}),i.open=t.driver.renderedIntoContainer?i.openContainer.then(function(){return t.open()}):t.open(),i.awaitWindow=i.open.then(function(e){return e.awaitWindow()}),i.showContainer=i.openContainer.then(function(){return t.showContainer()}),i.buildWindowName=i.open.then(function(n){return t.buildWindowName({proxyWin:n,initialDomain:c,domain:a,target:r,context:e,uid:o})}),i.setWindowName=u.a.all([i.open,i.buildWindowName]).then(function(e){var n=e[0],r=e[1];return t.setWindowName(n,r)}),i.watchForClose=u.a.all([i.awaitWindow,i.setWindowName]).then(function(e){var n=e[0];return t.watchForClose(n)}),i.prerender=u.a.all([i.awaitWindow,i.openContainer]).then(function(n){var r=n[0];return t.prerender(r,{context:e,uid:o})}),i.showComponent=i.prerender.then(function(){return t.showComponent()}),i.buildUrl=t.buildUrl(),i.openBridge=u.a.all([i.awaitWindow,i.buildUrl]).then(function(n){var r=n[0],o=n[1];return t.openBridge(r,Object(s.getDomainFromUrl)(o),e)}),i.loadUrl=u.a.all([i.open,i.buildUrl,i.setWindowName]).then(function(e){var n=e[0],r=e[1];return t.loadUrl(n,r)}),i.switchPrerender=u.a.all([i.prerender,t.onInit]).then(function(){return t.switchPrerender()}),i.runTimeout=i.loadUrl.then(function(){return t.runTimeout()}),u.a.hash(i)}).then(function(){return t.props.onEnter()}).then(function(){return t})},e.prototype.renderTo=function(e,n,t){var r=this;return this.tryInit(function(){if(n===window)return r.render(e,t);if(t&&"string"!=typeof t)throw new Error("Element passed to renderTo must be a string selector, got "+(void 0===t?"undefined":fn(t))+" "+t);return r.checkAllowRemoteRender(n),r.component.log("render_"+e+"_to_win",{element:Object(d.stringify)(t),context:e}),r.delegate(e,n),r.render(e,t,n)})},e.prototype.on=function(e,n){return this.event.on(e,n)},e.prototype.checkAllowRemoteRender=function(e){if(!e)throw this.component.createError("Must pass window to renderTo");if(!Object(s.isSameTopWindow)(window,e))throw new Error("Can only renderTo an adjacent frame");var n=Object(s.getDomain)(),t=this.getDomain();if(!Object(s.matchDomain)(t,n)&&!Object(s.isSameDomain)(e))throw new Error("Can not render remotely to "+t.toString()+" - can only render to "+n)},e.prototype.registerActiveComponent=function(){var n=this;e.activeComponents.push(this),this.clean.register(function(){e.activeComponents.splice(e.activeComponents.indexOf(n),1)})},e.prototype.getWindowRef=function(e,n,t,r){if(n===Object(s.getDomain)(window))return Ke.windows[t]=window,this.clean.register(function(){delete Ke.windows[t]}),{type:He.WINDOW_REFERENCES.GLOBAL,uid:t};if(e!==window)throw new Error("Can not currently create window reference for different target with a different domain");return r===He.CONTEXT.POPUP?{type:He.WINDOW_REFERENCES.OPENER}:Object(s.isTop)(window)?{type:He.WINDOW_REFERENCES.TOP}:{type:He.WINDOW_REFERENCES.PARENT,distance:Object(s.getDistanceFromTop)(window)}},e.prototype.buildWindowName=function(e){var n,t,r,o,i=e.proxyWin,a=e.initialDomain,u=e.domain,c=e.target,s=e.uid,f=e.context;return n=this.component.name,t=this.buildChildPayload({proxyWin:i,initialDomain:a,domain:u,target:c,context:f,uid:s}),r=n.replace(/^[^a-z0-9A-Z]+|[^a-z0-9A-Z]+$/g,"").replace(/[^a-z0-9A-Z]+/g,"_"),o=Object(d.base64encode)(JSON.stringify(t)),"__"+He.ZOID+"__"+r+"__"+o+"__"},e.prototype.getPropsRef=function(e,n,t,r){var o=N(e,t,this.getPropsForChild(t)),i=Object(s.isSameDomain)(n)?{type:He.INITIAL_PROPS.RAW,value:o}:{type:He.INITIAL_PROPS.UID,uid:r};return i.type===He.INITIAL_PROPS.UID&&(Ke.props[r]=o,this.clean.register(function(){delete Ke.props[r]})),i},e.prototype.buildChildPayload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.proxyWin,t=e.initialDomain,r=e.domain,o=e.target,i=void 0===o?window:o,a=e.context,u=e.uid;return{uid:u,context:a,domain:Object(s.getDomain)(window),tag:this.component.tag,parent:this.getWindowRef(i,t,u,a),props:this.getPropsRef(n,i,r,u),exports:N(n,r,this.buildParentExports(n))}},e.prototype.setProps=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.component.validate&&this.component.validate(this.component,e),this.props=this.props||{},Object(d.extend)(this.props,function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o={};t=t||{};for(var i=r?[]:e.getPropNames(),a=0,u=Object.keys(t),c=null==u?0:u.length;a<c;a++){var s=u[a];-1===i.indexOf(s)&&i.push(s)}for(var f=[],l=0,p=null==i?0:i.length;l<p;l++){var h=i[l],w=e.getProp(h),m=t[h];if(w){var y=w.alias;if(y&&(!Object(d.isDefined)(m)&&Object(d.isDefined)(t[y])&&(m=t[y]),f.push(y)),w.value&&(m=w.value()),!Object(d.isDefined)(m)&&w.def&&(m=w.def(t,e)),Object(d.isDefined)(m)){if("array"===w.type?!Array.isArray(m):(void 0===m?"undefined":sn(m))!==w.type)throw new TypeError("Prop is not of type "+w.type+": "+h)}else if(!1!==w.required)throw new Error("Expected prop "+h+" to be passed");o[h]=m}else o[h]=m}for(var v=0,g=null==f?0:f.length;v<g;v++)delete o[f[v]];for(var E=0,O=Object.keys(o),b=null==O?0:O.length;E<b;E++){var C=O[E],S=e.getProp(C),T=o[C];S&&(Object(d.isDefined)(T)&&S.validate&&S.validate(T,o),S.decorate&&(o[C]=S.decorate(T,o)),o[C]&&"function"===S.type&&(o[C]=o[C].bind(n)))}return o}(this.component,this,e,n))},e.prototype.buildUrl=function(){var e,n,t,r=this;return(e=dn({},this.component.props,this.component.builtinProps),n=this.props,t={},u.a.all(Object.keys(n).map(function(r){var o=e[r];if(o)return u.a.resolve().then(function(){var e=n[r];if(e&&o.queryParam)return e}).then(function(e){if(null!==e&&void 0!==e)return u.a.all([function(e,n,t){return u.a.try(function(){return"function"==typeof e.queryParam?e.queryParam(t):"string"==typeof e.queryParam?e.queryParam:n})}(o,r,e),function(e,n,t){return u.a.try(function(){return"function"==typeof e.queryValue?e.queryValue(t):t})}(o,0,e)]).then(function(e){var n=e[0],i=e[1],a=void 0;if("boolean"==typeof i)a=i.toString();else if("string"==typeof i)a=i.toString();else{if("function"==typeof i)return;if("object"===(void 0===i?"undefined":sn(i))&&null!==i){if(o.serialization===He.PROP_SERIALIZATION.JSON)a=JSON.stringify(i);else if(o.serialization===He.PROP_SERIALIZATION.BASE64)a=btoa(JSON.stringify(i));else if(o.serialization===He.PROP_SERIALIZATION.DOTIFY||!o.serialization){a=Object(d.dotify)(i,r);for(var u=0,c=Object.keys(a),s=null==c?0:c.length;u<s;u++){var f=c[u];t[f]=a[f]}return}}else"number"==typeof i&&(a=i.toString())}t[n]=a})})})).then(function(){return t})).then(function(e){var n=Object(s.normalizeMockUrl)(r.component.getUrl(r.props));return Object(d.extendUrl)(n,{query:dn({},e)})})},e.prototype.getDomain=function(){return this.component.getDomain(this.props)},e.prototype.getInitialDomain=function(){return this.component.getInitialDomain(this.props)},e.prototype.getPropsForChild=function(e){for(var n={},t=0,r=Object.keys(this.props),o=null==r?0:r.length;t<o;t++){var i=r[t],a=this.component.getProp(i);a&&!1===a.sendToChild||a&&a.sameDomain&&!Object(s.matchDomain)(e,Object(s.getDomain)(window))||(n[i]=this.props[i])}return n},e.prototype.updateProps=function(e){var n=this;return this.setProps(e,!0),this.onInit.then(function(){if(n.childExports)return n.childExports.updateProps(n.getPropsForChild(n.getDomain()));throw new Error("Child exports were not available")})},e.prototype.openBridge=function(e,n,t){var r=this;return u.a.try(function(){if(we&&we.needsBridge({win:e,domain:n})&&!we.hasBridge(n,n)){var o=r.component.getBridgeUrl(r.props);if(!o)throw new Error("Bridge url and domain needed to render "+t);var i=Object(s.getDomainFromUrl)(o);return we.linkUrl(e,n),we.openBridge(o,i)}})},e.prototype.open=function(){var e=this;return u.a.try(function(){e.component.log("open");var n=e.props.window;return n?(e.clean.register("destroyProxyWindow",function(){return n.close()}),n):e.driver.open.call(e)})},e.prototype.setWindowName=function(e,n){return e.setName(n)},e.prototype.switchPrerender=function(){var e=this;return u.a.try(function(){if(e.component.prerenderTemplate&&e.driver.switchPrerender)return e.driver.switchPrerender.call(e)})},e.prototype.elementReady=function(e){return Object(d.elementReady)(e).then(d.noop)},e.prototype.delegate=function(e,n){var t=this;this.component.log("delegate");for(var r={window:this.props.window,onClose:this.props.onClose,onDisplay:this.props.onDisplay},o=0,i=this.component.getPropNames(),a=null==i?0:i.length;o<a;o++){var u=i[o];this.component.getProp(u).allowDelegate&&(r[u]=this.props[u])}for(var c=oe(n,He.POST_MESSAGE.DELEGATE+"_"+this.component.name,{context:e,props:r,overrides:{userClose:function(){return t.userClose()},error:function(e){return t.error(e)},on:function(e,n){return t.on(e,n)}}}).then(function(e){var n=e.data;return t.clean.register(n.destroy),n}).catch(function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+Object(d.stringifyError)(e))}),s=this.driver.delegateOverrides,f=function(e,n,r){var o=n[e];s[o]===He.DELEGATE.CALL_DELEGATE&&(t[o]=function(){var e=this,n=arguments;return c.then(function(t){return t.overrides[o].apply(e,n)})})},l=0,p=Object.keys(s),h=null==p?0:p.length;l<h;l++)f(l,p)},e.prototype.watchForClose=function(e){var n=this,t=Object(s.onCloseWindow)(e,function(){return n.component.log("detect_close_child"),u.a.try(function(){return n.props.onClose(He.CLOSE_REASONS.CLOSE_DETECTED)}).finally(function(){return n.destroy()})},3e3);this.clean.register("destroyCloseWindowListener",t.cancel)},e.prototype.watchForUnload=function(){var e=this,n=Object(d.once)(function(){e.component.log("navigate_away"),e.destroyComponent()}),t=Object(d.addEventListener)(window,"unload",n);this.clean.register("destroyUnloadWindowListener",t.cancel)},e.prototype.loadUrl=function(e,n){return this.component.log("load_url"),e.setLocation(n)},e.prototype.runTimeout=function(){var e=this,n=this.props.timeout;if(n){var t=this.timeout=setTimeout(function(){e.component.log("timed_out",{timeout:n.toString()}),e.error(e.component.createError("Loading component timed out after "+n+" milliseconds"))},n);this.clean.register(function(){clearTimeout(t),delete e.timeout})}},e.prototype.initChild=function(e){var n=this;return u.a.try(function(){n.childExports=e,n.onInit.resolve(n),n.timeout&&clearTimeout(n.timeout)})},e.prototype.buildParentExports=function(e){var n=this;return{init:function(e){return n.initChild(e)},close:function(e){return n.close(e)},checkClose:function(){return n.checkClose(e)},resize:function(e){var t=e.width,r=e.height;return n.resize({width:t,height:r})},trigger:function(e){return u.a.try(function(){return n.event.trigger(e)})},hide:function(){return u.a.try(function(){return n.hide()})},show:function(){return u.a.try(function(){return n.show()})},error:function(e){return n.error(e)}}},e.prototype.resize=function(e){var n=this,t=e.width,r=e.height;return u.a.try(function(){n.driver.resize.call(n,{width:t,height:r})})},e.prototype.hide=function(){return this.container&&Object(d.hideElement)(this.container),this.driver.hide.call(this)},e.prototype.show=function(){return this.container&&Object(d.showElement)(this.container),this.driver.show.call(this)},e.prototype.checkClose=function(e){var n=this;return e.isClosed().then(function(t){return t?n.userClose():u.a.delay(200).then(function(){return e.isClosed()}).then(function(e){if(e)return n.userClose()})})},e.prototype.userClose=function(){return this.close(He.CLOSE_REASONS.USER_CLOSED)},e.prototype.close=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.PARENT_CALL;return u.a.try(function(){return e.component.log("close",{reason:n}),e.event.triggerOnce(He.EVENTS.CLOSE),e.props.onClose(n)}).then(function(){return u.a.all([e.closeComponent(),e.closeContainer()])}).then(function(){return e.destroy()})},e.prototype.closeContainer=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.PARENT_CALL;return u.a.try(function(){return e.event.triggerOnce(He.EVENTS.CLOSE),e.props.onClose(n)}).then(function(){return u.a.all([e.closeComponent(n),e.hideContainer()])}).then(function(){return e.destroyContainer()})},e.prototype.destroyContainer=function(){var e=this;return u.a.try(function(){e.clean.run("destroyContainerEvents"),e.clean.run("destroyContainerTemplate")})},e.prototype.closeComponent=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.PARENT_CALL;return u.a.try(function(){return e.cancelContainerEvents()}).then(function(){return e.event.triggerOnce(He.EVENTS.CLOSE),e.props.onClose(n)}).then(function(){return e.hideComponent()}).then(function(){return e.destroyComponent()}).then(function(){e.childExports&&e.driver.callChildToClose&&e.childExports.close().catch(d.noop)})},e.prototype.destroyComponent=function(){this.clean.run("destroyUnloadWindowListener"),this.clean.run("destroyCloseWindowListener"),this.clean.run("destroyContainerEvents"),this.clean.run("destroyWindow")},e.prototype.showContainer=function(){var e=this;return u.a.try(function(){if(e.props.onDisplay)return e.props.onDisplay()}).then(function(){if(e.container)return Object(d.showAndAnimate)(e.container,He.ANIMATION_NAMES.SHOW_CONTAINER,e.clean.register)})},e.prototype.showComponent=function(){var e=this;return u.a.try(function(){if(e.props.onDisplay)return e.props.onDisplay()}).then(function(){if(e.element)return Object(d.showAndAnimate)(e.element,He.ANIMATION_NAMES.SHOW_COMPONENT,e.clean.register)})},e.prototype.hideContainer=function(){var e=this;return u.a.try(function(){if(e.container)return Object(d.animateAndHide)(e.container,He.ANIMATION_NAMES.HIDE_CONTAINER,e.clean.register)})},e.prototype.hideComponent=function(){var e=this;return u.a.try(function(){if(e.element)return Object(d.animateAndHide)(e.element,He.ANIMATION_NAMES.HIDE_COMPONENT,e.clean.register)})},e.prototype.prerender=function(e,n){var t=this,r=n.context,o=n.uid;return u.a.try(function(){if(t.component.prerenderTemplate)return u.a.try(function(){return t.driver.openPrerender.call(t,e)}).then(function(e){if(e&&Object(s.isSameDomain)(e)&&Object(s.isBlankDomain)(e)){var n=e.document,i=t.renderTemplate(t.component.prerenderTemplate,{context:r,uid:o,document:n});i instanceof be&&(i=i.render(Fe({doc:n})));try{Object(d.writeElementToWindow)(e,i)}catch(e){return}var a=t.component.autoResize||{},u=a.width,c=void 0!==u&&u,f=a.height,l=void 0!==f&&f,p=a.element,h=void 0===p?"body":p;(c||l)&&Object(d.onResize)(Object(d.getElement)(h,e.document),function(e){var n=e.width,r=e.height;t.resize({width:c?n:void 0,height:l?r:void 0})},{width:c,height:l,win:e})}})})},e.prototype.renderTemplate=function(e,n){var t=this,r=n.context,o=n.uid,i=n.focus,a=n.container,c=n.document,s=n.outlet;return i=i||function(){return u.a.resolve()},e.call(this,{context:r,uid:o,id:He.CLASS_NAMES.ZOID+"-"+this.component.tag+"-"+o,props:e.__xdomain__?null:this.props,tag:this.component.tag,CLASS:He.CLASS_NAMES,ANIMATION:He.ANIMATION_NAMES,CONTEXT:He.CONTEXT,EVENT:He.EVENTS,actions:{focus:i,close:function(){return t.userClose()}},on:function(e,n){return t.on(e,n)},jsxDom:De,document:c,dimensions:this.component.dimensions,container:a,outlet:s})},e.prototype.openContainer=function(e,n){var t=this,r=n.context,o=n.uid,i=n.focus;return u.a.try(function(){var n;if(!(n=e?Object(d.getElement)(e):document.body))throw new Error("Could not find element to open container into");if(t.component.containerTemplate){var a=document.createElement("div");Object(d.addClass)(a,He.CLASS_NAMES.OUTLET);var u=t.renderTemplate(t.component.containerTemplate,{context:r,uid:o,container:n,focus:i,outlet:a});if(u instanceof be&&(u=u.render(Fe({doc:document}))),t.container=u,Object(d.hideElement)(t.container),Object(d.appendChild)(n,t.container),t.driver.renderedIntoContainer){if(t.element=a,Object(d.hideElement)(t.element),!t.element)throw new Error("Could not find element to render component into");Object(d.hideElement)(t.element)}t.clean.register("destroyContainerTemplate",function(){t.container&&t.container.parentNode&&t.container.parentNode.removeChild(t.container),delete t.container})}else if(t.driver.renderedIntoContainer)throw new Error("containerTemplate needed to render "+r)})},e.prototype.cancelContainerEvents=function(){this.clean.run("destroyContainerEvents")},e.prototype.destroy=function(){var e=this;return u.a.try(function(){if(e.clean.hasTasks())return e.component.log("destroy"),e.clean.all()})},e.prototype.tryInit=function(e){var n=this;return u.a.try(e).catch(function(e){n.onInit.reject(e)}).then(function(){return n.onInit})},e.prototype.error=function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if(!this.errored)return this.errored=!0,u.a.try(function(){return n.onInit=n.onInit||new u.a,n.onInit.reject(e),n.destroy()}).then(function(){if(t.onError)return t.onError(e)}).catch(function(n){throw new Error("An error was encountered while handling error:\n\n "+Object(d.stringifyError)(e)+"\n\n"+Object(d.stringifyError)(n))}).then(function(){if(!t.onError)throw e})},e.destroyAll=function(){for(var n=[];e.activeComponents.length;)n.push(e.activeComponents[0].destroy());return u.a.all(n).then(d.noop)},e}()).prototype,"close",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"close"),cn.prototype),ln(cn.prototype,"closeContainer",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"closeContainer"),cn.prototype),ln(cn.prototype,"destroyContainer",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"destroyContainer"),cn.prototype),ln(cn.prototype,"closeComponent",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"closeComponent"),cn.prototype),ln(cn.prototype,"showContainer",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"showContainer"),cn.prototype),ln(cn.prototype,"showComponent",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"showComponent"),cn.prototype),ln(cn.prototype,"hideContainer",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"hideContainer"),cn.prototype),ln(cn.prototype,"hideComponent",[d.memoized],Object.getOwnPropertyDescriptor(cn.prototype,"hideComponent"),cn.prototype),cn);pn.activeComponents=[];var hn=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),wn=function(){function e(n,t,r){!function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.component=n,this.context=r.context,this.clean=Ze(this),this.event=Object(d.eventEmitter)(),this.destroyComponent=pn.prototype.destroyComponent,this.resize=pn.prototype.resize,this.renderTemplate=pn.prototype.renderTemplate,this.registerActiveComponent=pn.prototype.registerActiveComponent,this.props={window:r.props.window,onClose:r.props.onClose,onDisplay:r.props.onDisplay};for(var o=0,i=n.getPropNames(),a=null==i?0:i.length;o<a;o++){var u=i[o];this.component.getProp(u).allowDelegate&&(this.props[u]=r.props[u])}this.userClose=r.overrides.userClose,this.error=r.overrides.error,this.on=r.overrides.on,this.registerActiveComponent(),this.watchForClose(t)}return e.prototype.getDelegate=function(){var e=this;return{overrides:this.getOverrides(),destroy:function(){return e.destroy()}}},e.prototype.watchForClose=function(e){var n=this,t=Object(s.onCloseWindow)(e,function(){return n.destroy()},3e3);this.clean.register("destroyCloseWindowListener",t.cancel)},e.prototype.getOverrides=function(){for(var e=this.context,n=un[e].delegateOverrides,t={},r=this,o=function(e,n,o){var i=n[e];t[i]=function(){return pn.prototype[i].apply(r,arguments)}},i=0,a=Object.keys(n),u=null==a?0:a.length;i<u;i++)o(i,a);return t},e.prototype.destroy=function(){return this.clean.all()},hn(e,[{key:"driver",get:function(){return un[this.context]}}]),e}(),mn=t(26),yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function vn(e){var n=e.id,t=e.tag,r=e.context,o=e.CLASS,i=e.outlet,a=e.document,u=e.dimensions,c=u.width,s=u.height;return De("div",{id:n,class:o.ZOID+" "+o.ZOID+"-tag-"+t+" "+o.ZOID+"-context-"+r},De("style",null,"\n #"+n+", #"+n+" > ."+o.OUTLET+" {\n width: "+c+";\n height: "+s+";\n }\n\n #"+n+" > ."+o.OUTLET+" {\n display: inline-block;\n position: relative;\n }\n\n #"+n+" > ."+o.OUTLET+" > iframe {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > ."+o.OUTLET+" > iframe."+o.VISIBLE+" {\n opacity: 1;\n }\n\n #"+n+" > ."+o.OUTLET+" > iframe."+o.INVISIBLE+" {\n opacity: 0;\n }\n "),De("node",{el:i})).render(Fe({doc:a}))}function gn(e){var n=e.document;return De("html",null,De("head",null,De("style",null,"\n html, body {\n width: 100%;\n height: 100%;\n overflow: hidden;\n top: 0;\n left: 0;\n margin: 0;\n text-align: center;\n }\n\n .spinner {\n position: absolute;\n max-height: 60vmin;\n max-width: 60vmin;\n height: 40px;\n width: 40px;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n z-index: 10;\n }\n\n .spinner .loader {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n border: 3px solid rgba(0, 0, 0, .2);\n border-top-color: rgba(33, 128, 192, 0.8);\n border-radius: 100%;\n animation: rotation .7s infinite linear;\n\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg)\n }\n to {\n transform: rotate(359deg)\n }\n }\n ")),De("body",null,De("div",{class:"spinner"},De("div",{id:"loader",class:"loader"})))).render(Fe({doc:n}))}t(33);var En,On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn={angular:mn.angular,angular2:mn.angular2,glimmer:mn.glimmer,react:mn.react,vue:mn.vue},Cn=(function(e,n,t,r,o){var i={};Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=t.slice().reverse().reduce(function(n,t){return t(e,"getPropNames",n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,"getPropNames",i),i=null)}((En=function(){function e(n){if(function(n,t){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this),function(e){if(!e)throw new Error("Expected options to be passed");if(!e.tag||!e.tag.match(/^[a-z0-9-]+$/))throw new Error("Invalid options.tag: "+e.tag);if(function(e){if(e.props&&"object"!==yn(e.props))throw new Error("Expected options.props to be an object");if(e.props)for(var n=0,t=Object.keys(e.props),r=null==t?0:t.length;n<r;n++){var o=t[n],i=e.props[o];if(!i||"object"!==(void 0===i?"undefined":yn(i)))throw new Error("Expected options.props."+o+" to be an object");if(!i.type)throw new Error("Expected prop.type");if(-1===He.PROP_TYPES_LIST.indexOf(i.type))throw new Error("Expected prop.type to be one of "+He.PROP_TYPES_LIST.join(", "));if(i.required&&i.def)throw new Error("Required prop can not have a default value")}}(e),e.dimensions){if(e.dimensions&&!Object(d.isPx)(e.dimensions.width)&&!Object(d.isPerc)(e.dimensions.width))throw new Error("Expected options.dimensions.width to be a px or % string value");if(e.dimensions&&!Object(d.isPx)(e.dimensions.height)&&!Object(d.isPerc)(e.dimensions.height))throw new Error("Expected options.dimensions.height to be a px or % string value")}if(e.contexts){e.contexts.popup;for(var n=!1,t=0,r=Object.keys(e.contexts),o=null==r?0:r.length;t<o;t++){var i=r[t];if(-1===He.CONTEXT_LIST.indexOf(i))throw new Error("Unsupported context type: "+i);(e.contexts&&e.contexts[i]||e.contexts&&void 0===e.contexts[i])&&(n=!0)}if(!n)throw new Error("No context type is enabled")}if(e.defaultContext){if(-1===He.CONTEXT_LIST.indexOf(e.defaultContext))throw new Error("Unsupported context type: "+(e.defaultContext||"unknown"));if(e.contexts&&e.defaultContext&&!e.contexts[e.defaultContext])throw new Error("Disallowed default context type: "+(e.defaultContext||"unknown"))}if(e.defaultEnv){if("string"!=typeof e.defaultEnv)throw new TypeError("Expected options.defaultEnv to be a string");if("object"===yn(e.url)&&!e.url[e.defaultEnv])throw new Error("No url found for default env: "+e.defaultEnv)}if(!e.url&&!e.buildUrl)throw new Error("Must pass url");if("object"===yn(e.url)){if(!e.defaultEnv)throw new Error("Must pass options.defaultEnv with env->url mapping");for(var a=0,u=Object.keys(e.url),c=null==u?0:u.length;a<c;a++){var s=u[a];if(!e.url[s])throw new Error("No url specified for env: "+s)}}if(e.prerenderTemplate&&"function"!=typeof e.prerenderTemplate)throw new Error("Expected options.prerenderTemplate to be a function");if(e.containerTemplate&&"function"!=typeof e.containerTemplate)throw new Error("Expected options.containerTemplate to be a function")}(n),this.tag=n.tag,this.name=this.tag.replace(/-/g,"_"),this.allowedParentDomains=n.allowedParentDomains||He.WILDCARD,e.components[this.tag])throw new Error("Can not register multiple components with the same tag");this.builtinProps={env:{type:"string",queryParam:!0,required:!1,def:function(e,n){return n.defaultEnv}},window:{type:"object",sendToChild:!1,required:!1,validate:function(e){if(!Object(s.isWindow)(e)&&!j.isProxyWindow(e))throw new Error("Expected Window or ProxyWindow")},decorate:function(e){if(e)return j.toProxyWindow(e)}},dimensions:{type:"object",required:!1},timeout:{type:"number",required:!1,sendToChild:!1},onDisplay:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.memoize)(Object(d.promisify)(e))}},onEnter:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.promisify)(e)}},onRender:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.promisify)(e)}},onClose:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.once)(Object(d.promisify)(e))}},onError:{type:"function",required:!1,sendToChild:!0,def:function(){return function(e){setTimeout(function(){throw e})}},decorate:function(e){return Object(d.once)(Object(d.promisify)(e))}}},this.props=n.props||{};var t=n.dimensions||{},r=t.width,o=void 0===r?He.DEFAULT_DIMENSIONS.WIDTH:r,i=t.height,a=void 0===i?He.DEFAULT_DIMENSIONS.HEIGHT:i;this.dimensions={width:Object(d.toCSS)(o),height:Object(d.toCSS)(a)},this.defaultEnv=n.defaultEnv,this.url=n.url||n.buildUrl,this.domain=n.domain,this.bridgeUrl=n.bridgeUrl,this.attributes=n.attributes||{},this.contexts=n.contexts||{iframe:!0,popup:!1},this.defaultContext=n.defaultContext||He.CONTEXT.IFRAME,this.autoResize="object"===On(n.autoResize)?n.autoResize:{width:Boolean(n.autoResize),height:Boolean(n.autoResize),element:"body"},this.containerTemplate=n.containerTemplate||vn,this.prerenderTemplate=n.prerenderTemplate||gn,this.validate=n.validate,e.components[this.tag]=this,this.registerDrivers(),this.registerChild(),this.listenDelegate()}return e.prototype.getPropNames=function(){for(var e=Object.keys(this.props),n=0,t=Object.keys(this.builtinProps),r=null==t?0:t.length;n<r;n++){var o=t[n];-1===e.indexOf(o)&&e.push(o)}return e},e.prototype.getProp=function(e){return this.props[e]||this.builtinProps[e]},e.prototype.registerDrivers=function(){this.driverCache={};for(var e=0,n=Object.keys(bn),t=null==n?0:n.length;e<t;e++){var r=n[e];if(0!==r.indexOf("_")){var o=bn[r].global();o&&this.driver(r,o)}}},e.prototype.driver=function(e,n){if(!bn[e])throw new Error("Could not find driver for framework: "+e);return this.driverCache[e]||(this.driverCache[e]=bn[e].register(this,n)),this.driverCache[e]},e.prototype.registerChild=function(){var e=this;return u.a.try(function(){if(e.isChild())return new on(e)})},e.prototype.listenDelegate=function(){var e=this;se(He.POST_MESSAGE.ALLOW_DELEGATE+"_"+this.name,function(){return!0}),se(He.POST_MESSAGE.DELEGATE+"_"+this.name,function(n){var t=n.source,r=n.data,o=r.context,i=r.props,a=r.overrides;return e.delegate(t,{context:o,props:i,overrides:a}).getDelegate()})},e.prototype.canRenderTo=function(e){return oe(e,He.POST_MESSAGE.ALLOW_DELEGATE+"_"+this.name).then(function(e){return e.data}).catch(function(){return!1})},e.prototype.getUrl=function(e){if("function"==typeof this.url)return this.url(e);if("string"==typeof this.url)return this.url;var n=e.env||this.defaultEnv;if(n&&"object"===On(this.url)&&this.url[n])return this.url[n];throw new Error("Can not find url")},e.prototype.getInitialDomain=function(e){if("string"==typeof this.domain)return this.domain;var n=e.env||this.defaultEnv;return n&&"object"===On(this.domain)&&!Object(d.isRegex)(this.domain)&&this.domain[n]?this.domain[n]:Object(s.getDomainFromUrl)(this.getUrl(e))},e.prototype.getDomain=function(e){return Object(d.isRegex)(this.domain)?this.domain:this.getInitialDomain(e)},e.prototype.getBridgeUrl=function(e){if(this.bridgeUrl){if("string"==typeof this.bridgeUrl)return this.bridgeUrl;var n=e.env||this.defaultEnv;if(n&&"object"===On(this.bridgeUrl)&&this.bridgeUrl[n])return this.bridgeUrl[n]}},e.prototype.isZoidComponent=function(){return Ye()},e.prototype.isChild=function(){return Ye()&&Ve().tag===this.tag},e.prototype.createError=function(e,n){return new Error("["+(n||this.tag)+"] "+e)},e.prototype.init=function(e,n,t){return new pn(this,this.getRenderContext(n,t),{props:e})},e.prototype.delegate=function(e,n){return new wn(this,e,n)},e.prototype.validateRenderContext=function(e,n){if(e&&!this.contexts[e])throw new Error("["+this.tag+"] Can not render to "+e);if(!n&&e===He.CONTEXT.IFRAME)throw new Error("["+this.tag+"] Context type "+He.CONTEXT.IFRAME+" requires an element selector")},e.prototype.getDefaultContext=function(){if(this.defaultContext&&this.contexts[this.defaultContext])return this.defaultContext;if(this.contexts[He.CONTEXT.IFRAME])return He.CONTEXT.IFRAME;if(this.contexts[He.CONTEXT.POPUP])return He.CONTEXT.POPUP;throw new Error("Can not determine default context")},e.prototype.getRenderContext=function(e,n){return e=e||this.getDefaultContext(),this.validateRenderContext(e,n),e},e.prototype.render=function(e,n){var t=this;return u.a.try(function(){var r=t.getRenderContext(null,n);return new pn(t,r,{props:e}).render(r,n)})},e.prototype.renderIframe=function(e,n){var t=this;return u.a.try(function(){var r=t.getRenderContext(He.CONTEXT.IFRAME,n);return new pn(t,r,{props:e}).render(r,n)})},e.prototype.renderPopup=function(e){var n=this;return u.a.try(function(){var t=n.getRenderContext(He.CONTEXT.POPUP);return new pn(n,t,{props:e}).render(t)})},e.prototype.renderTo=function(e,n,t){var r=this;return u.a.try(function(){var o=r.getRenderContext(null,t);return new pn(r,o,{props:n}).renderTo(o,e,t)})},e.prototype.renderIframeTo=function(e,n,t){var r=this;return u.a.try(function(){var o=r.getRenderContext(He.CONTEXT.IFRAME,t);return new pn(r,o,{props:n}).renderTo(o,e,t)})},e.prototype.renderPopupTo=function(e,n){var t=this;return u.a.try(function(){var r=t.getRenderContext(He.CONTEXT.POPUP);return new pn(t,r,{props:n}).renderTo(r,e)})},e.prototype.log=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ge&&Ge.info("xc_"+e+"_"+n,t)}(this.name,e,n)},e.prototype.logWarning=function(e,n){!function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ge&&Ge.warn("xc_"+e+"_"+n,t)}(this.name,e,n)},e.prototype.logError=function(e,n){!function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ge&&Ge.error("xc_"+e+"_"+n,t)}(this.name,e,n)},e.getByTag=function(n){return e.components[n]},e}()).prototype,0,[d.memoize],Object.getOwnPropertyDescriptor(En.prototype,"getPropNames"),En.prototype),En);function Sn(e){return new Cn(e)}function Tn(e){return Cn.getByTag(e)}function jn(){return pn.destroyAll()}Cn.components={};var _n=o,An=He;t.d(n,"PopupOpenError",function(){return d.PopupOpenError}),t.d(n,"create",function(){return Sn}),t.d(n,"getByTag",function(){return Tn}),t.d(n,"getCurrentScriptDir",function(){return Be}),t.d(n,"useLogger",function(){return qe}),t.d(n,"destroyAll",function(){return jn}),t.d(n,"postRobot",function(){return _n}),t.d(n,"CONSTANTS",function(){return An}),n.default=i},function(e,n,t){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var o=t(9);n.k=u,n.j=c,n.b=d,n.f=f,n.p=function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1},n.n=l,n.r=p,n.a=function(e){if(!p(e))throw new Error("Expected window to be same domain");return e},n.l=y,n.c=v,n.t=function(e){return e===y(e)},n.v=O,n.w=function(e){if(function(){for(var e=0;e<g.length;e++)O(g[e])&&(E.splice(e,1),g.splice(e,1))}(),e&&e.contentWindow)try{g.push(e.contentWindow),E.push(e)}catch(e){}},n.m=function(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent},n.h=function(e,n){for(var t=w(e),r=0,o=null==t?0:t.length;r<o;r++){var i=t[r];try{if(p(i)&&i.name===n&&-1!==t.indexOf(i))return i}catch(e){}}try{if(-1!==t.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==t.indexOf(e[n]))return e[n]}catch(e){}},n.q=function(e,n){return e===c(n)},n.d=b,n.o=function(e,n){var t=b(n);if(t)return t===e;if(n===e)return!1;if(y(n)===n)return!1;for(var r=0,o=w(e),i=null==o?0:o.length;r<i;r++)if(o[r]===n)return!0;return!1},n.e=S,n.i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=e,r=0;r<n;r++){if(!t)return;t=u(t)}return t}(e,S(e)-n)},n.s=function(e,n){var t=y(e)||e,r=y(n)||n;try{if(t&&r)return t===r}catch(e){}var o=v(e),i=v(n);if(C(o,i))return!0;var a=c(t),u=c(r);return!(a&&C(v(a),i)||(u&&C(v(u),o),1))},n.x=function e(n,t){if("string"==typeof n){if("string"==typeof t)return n===o.b||t===n;if(r(t))return!1;if(Array.isArray(t))return!1}return r(n)?r(t)?n.toString()===t.toString():!Array.isArray(t)&&Boolean(t.match(n)):!!Array.isArray(n)&&(Array.isArray(t)?JSON.stringify(n)===JSON.stringify(t):!r(t)&&n.some(function(n){return e(n,t)}))},n.A=function(e){return Array.isArray(e)?"("+e.join(" | ")+")":r(e)?"RegExp("+e.toString():e.toString()},n.g=T,n.z=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,o=void 0;return function i(){if(O(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}},n.u=function(e){try{if(e===window)return!0}catch(e){if(e&&e.message===i)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===i)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===i)return!0}try{e&&e.__cross_domain_utils_window_check__}catch(e){return!0}return!1},n.y=function(e){if(0!==T(e).indexOf(o.a.MOCK))return e;throw new Error("Mock urls not supported out of test mode")};var i="Call was rejected by callee.\r\n";function a(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).location.protocol===o.a.ABOUT}function u(e){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function c(e){if(e&&!u(e))try{return e.opener}catch(e){}}function s(e){try{return e&&e.location&&e.location.href,!0}catch(e){}return!1}function d(e){var n=(e=e||window).location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if(t===o.a.FILE)return o.a.FILE+"//";if(t===o.a.ABOUT){var r=u(e);return r&&s(r)?d(r):o.a.ABOUT+"//"}var i=n.host;if(!i)throw new Error("Can not read window host");return t+"//"+i}function f(e){var n=d(e=e||window);return n&&e.mockDomain&&0===e.mockDomain.indexOf(o.a.MOCK)?e.mockDomain:n}function l(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(a(e)&&s(e))return!0}catch(e){}try{if(d(e)===d(window))return!0}catch(e){}return!1}function p(e){if(!l(e))return!1;try{if(e===window)return!0;if(a(e)&&s(e))return!0;if(f(window)===f(e))return!0}catch(e){}return!1}function h(e,n){if(!e||!n)return!1;var t=u(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function w(e){var n=[],t=void 0;try{t=e.frames}catch(n){t=e}var r=void 0;try{r=t.length}catch(e){}if(0===r)return n;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=t[o]}catch(e){continue}n.push(i)}return n}for(var a=0;a<100;a++){var u=void 0;try{u=t[a]}catch(e){return n}if(!u)return n;n.push(u)}return n}function m(e){for(var n=[],t=0,r=w(e),o=null==r?0:r.length;t<o;t++){var i=r[t];n.push(i);for(var a=0,u=m(i),c=null==u?0:u.length;a<c;a++){var s=u[a];n.push(s)}}return n}function y(e){if(e){try{if(e.top)return e.top}catch(e){}if(u(e)===e)return e;try{if(h(window,e)&&window.top)return window.top}catch(e){}try{if(h(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=m(e),r=null==t?0:t.length;n<r;n++){var o=t[n];try{if(o.top)return o.top}catch(e){}if(u(o)===o)return o}}}function v(e){var n=y(e);if(!n)throw new Error("Can not determine top window");return[].concat(m(n),[n])}var g=[],E=[];function O(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==i}if(n&&p(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(g,e);if(-1!==t){var r=E[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;return!(!n||!n.documentElement||n.documentElement.contains(e))}(r))return!0}return!1}function b(e){return c(e=e||window)||u(e)||void 0}function C(e,n){for(var t=0,r=null==e?0:e.length;t<r;t++)for(var o=e[t],i=0,a=null==n?0:n.length;i<a;i++)if(o===n[i])return!0;return!1}function S(){for(var e=0,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;n;)(n=u(n))&&(e+=1);return e}function T(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):f()}},function(e,n){},function(e,n,t){"use strict";t(7),t(12)},function(e,n,t){"use strict";t(7)},function(e,n,t){"use strict";t(2),t(0)},function(e,n){},function(e,n,t){"use strict";n.a=function(e,n,t){t.value=Object(r.n)(t.value,{name:n,thisNamespace:!0})};var r=t(7)},function(e,n,t){"use strict";function r(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function o(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)}function i(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function a(e){return i(e)+"px"}n.a=r,n.b=o,n.d=function(e){return"number"==typeof e?a(e):r(e)?e:a(e)},n.c=function(e,n){if("number"==typeof e)return e;if(r(e))return parseInt(n*i(e)/100,10);if(o(e))return i(e);throw new Error("Can not normalize dimension: "+e)}},function(e,n,t){"use strict";t(2),t(7)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(14);t.d(n,"openBridge",function(){return r.openBridge}),t.d(n,"linkUrl",function(){return r.linkUrl}),t.d(n,"isBridge",function(){return r.isBridge}),t.d(n,"needsBridge",function(){return r.needsBridge}),t.d(n,"needsBridgeForBrowser",function(){return r.needsBridgeForBrowser}),t.d(n,"hasBridge",function(){return r.hasBridge}),t.d(n,"needsBridgeForWin",function(){return r.needsBridgeForWin}),t.d(n,"needsBridgeForDomain",function(){return r.needsBridgeForDomain}),t.d(n,"openTunnelToOpener",function(){return r.openTunnelToOpener}),t.d(n,"destroyBridges",function(){return r.destroyBridges})},function(e,n,t){"use strict";var r=t(27);t.d(n,"react",function(){return r.a});var o=t(28);t.d(n,"vue",function(){return o.a});var i=t(29);t.d(n,"angular",function(){return i.a});var a=t(30);t.n(a),t.o(a,"angular2")&&t.d(n,"angular2",function(){return a.angular2}),t.o(a,"glimmer")&&t.d(n,"glimmer",function(){return a.glimmer});var u=t(31);t.d(n,"glimmer",function(){return u.a});var c=t(32);t.d(n,"angular2",function(){return c.a})},function(e,n,t){"use strict";t.d(n,"a",function(){return i});var r=t(1),o=t(4),i={global:function(){if(window.React&&window.ReactDOM)return{React:window.React,ReactDOM:window.ReactDOM}},register:function(e,n){var t=n.React,i=n.ReactDOM;return t.createClass?e.react=t.createClass({render:function(){return t.createElement("div",null)},componentDidMount:function(){e.log("instantiate_react_component");var n=i.findDOMNode(this),t=e.init(Object(r.extend)({},this.props),null,n);this.setState({parent:t}),t.render(o.CONTEXT.IFRAME,n)},componentDidUpdate:function(){this.state&&this.state.parent&&this.state.parent.updateProps(Object(r.extend)({},this.props))}}):e.react=function(n){function a(){return function(e,n){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,n.apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(a,n),a.prototype.render=function(){return t.createElement("div",null)},a.prototype.componentDidMount=function(){e.log("instantiate_react_component");var n=i.findDOMNode(this),t=e.init(Object(r.extend)({},this.props),null,n);this.setState({parent:t}),t.render(o.CONTEXT.IFRAME,n)},a.prototype.componentDidUpdate=function(){this.state&&this.state.parent&&this.state.parent.updateProps(Object(r.extend)({},this.props))},a}(t.Component),e.react}}},function(e,n,t){"use strict";t.d(n,"a",function(){return i});var r=t(1),o=t(4),i={global:function(){},register:function(e){return{render:function(e){return e("div")},inheritAttrs:!1,mounted:function(){var n=this.$el;this.parent=e.init(Object(r.extend)({},this.$attrs),null,n),this.parent.render(o.CONTEXT.IFRAME,n)},beforeUpdate:function(){this.parent&&this.$attrs&&this.parent.updateProps(Object(r.extend)({},this.$attrs))}}}}},function(e,n,t){"use strict";t.d(n,"a",function(){return i});var r=t(1),o=t(4),i={global:function(){return window.angular},register:function(e,n){return n.module(e.tag,[]).directive(Object(r.dasherizeToCamel)(e.tag),function(){for(var n={},t=0,i=e.getPropNames(),a=null==i?0:i.length;t<a;t++){var u=i[t];n[u]="="}return n.props="=",{scope:n,restrict:"E",controller:["$scope","$element",function(t,i){e.log("instantiate_angular_component");var a=function(){var e=void 0;if(t.props)e=t.props;else{e={};for(var o=0,i=Object.keys(n),a=null==i?0:i.length;o<a;o++){var u=i[o];void 0!==t[u]&&(e[u]=t[u])}}return Object(r.replaceObject)(e,function(e){return"function"==typeof e?function(){var n=e.apply(this,arguments);return function(){if("$apply"!==t.$root.$$phase&&"$digest"!==t.$root.$$phase)try{t.$apply()}catch(e){}}(),n}:e})},u=e.init(a(),null,i[0]);u.render(o.CONTEXT.IFRAME,i[0]),t.$watch(function(){u.updateProps(a())})}]}})}}},function(e,n){},function(e,n,t){"use strict";t.d(n,"a",function(){return o});var r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o={global:function(){},register:function(e,n){return function(n){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,n.apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(t,n),t.prototype.didInsertElement=function(){e.render(r({},this.args),this.element)},t}(n)}}},function(e,n,t){"use strict";t.d(n,"a",function(){return a});var r=t(1),o=t(4),i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a={global:function(){},register:function(e,n){var t=n.Component,a=n.NgModule,u=n.ElementRef,c=n.NgZone;e.log("initializing angular2 component");var s=function(e){return Object(r.replaceObject)(i({},e.internalProps,e.props),function(n){return"function"==typeof n?function(){var t=this,r=arguments;return e.zone.run(function(){return n.apply(t,r)})}:n})},d=t({selector:e.tag,template:"<div></div>",inputs:["props"]}).Class({constructor:[u,c,function(e,n){this.elementRef=e,this.zone=n}],ngOnInit:function(){var n=this.elementRef.nativeElement,t=e.init(s(this),null,n);t.render(o.CONTEXT.IFRAME,n),this.parent=t},ngOnChanges:function(){this.parent&&this.parent.updateProps(s(this))}});return a({declarations:[d],exports:[d]}).Class({constructor:function(){}})}}},function(e,n){}])});
2//# sourceMappingURL=zoid.min.js.map
\No newline at end of file