!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/FP/Assets/Cache/output/",n(n.s=0)}({0:function(e,t,n){n("5aef2a6e3fd48bb06a74"),e.exports=n("100e020ef925e2fe2f62")},"100e020ef925e2fe2f62":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gtmIframeLoader=d;var o,i=(o=n("6f6124c2a401d7cb7165"))&&o.__esModule?o:{default:o},a=n("c27cdd1b7c76313bdfab");function d(){window.addEventListener("message",(function(e){var t=e.data;if(t.optIn&&!t.isFtb&&!t.optOut){var n=new i.default;n.setShouldLoadExtendedContainer(t.shouldLoadExtendedContainer),n.loadNonTrustedContainer(!0)}var o=(0,a.getWindow)();t.firstElement?o.gtmDataLayer[0]=t:o.gtmDataLayer.push(t)}))}d()},"5aef2a6e3fd48bb06a74":function(e,t,n){"use strict";n.p=window.AssetManager?window.AssetManager.R_JS("/FP/Assets/Cache/output/"):""},"65e7950f253150cb9bd3":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.API_RESULT_SHOULD_LOAD_EXTENDED_CONTAINER=t.API_SHOULD_LOAD_EXTERNAL_GTM=t.CONTAINER_TYPE_UNTRUSTED=t.CONTAINER_TYPE_NON_MANDATORY=t.COVID_GTM_ACCOUNT_ID=t.MAX_ONE_TRUST_CLEANUP_INTERVAL=t.UNTRUSTED_ACCOUNT_ID_EXTENDED=t.UNTRUSTED_ACCOUNT_ID_BASE=t.GTM_ACCOUNT_ID_EXTENDED=t.GTM_ACCOUNT_ID_BASE=void 0;t.GTM_ACCOUNT_ID_BASE="GTM-J44C";t.GTM_ACCOUNT_ID_EXTENDED="GTM-MCTD222";t.UNTRUSTED_ACCOUNT_ID_BASE="GTM-PTLTXDK";t.UNTRUSTED_ACCOUNT_ID_EXTENDED="GTM-NVKCPJZ";t.MAX_ONE_TRUST_CLEANUP_INTERVAL=120;t.COVID_GTM_ACCOUNT_ID="GTM-WHS5WNX";t.CONTAINER_TYPE_NON_MANDATORY=1;t.CONTAINER_TYPE_UNTRUSTED=2;t.API_SHOULD_LOAD_EXTERNAL_GTM="//www.myheritage.com/FP/API/GTM/should-load-extended-container.php";t.API_RESULT_SHOULD_LOAD_EXTENDED_CONTAINER="lec"},"698d75b157f24ae829cc":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"6f6124c2a401d7cb7165":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,i=(o=n("ad8f9c92f942b11b016c"))&&o.__esModule?o:{default:o},a=n("65e7950f253150cb9bd3");function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;d(this,e),this.window=t,this.eventContainer=new i.default,this.window.ajaxCheckIfShouldLoadExtendedContainer=this.window.ajaxCheckIfShouldLoadExtendedContainer||!1,this.shouldLoadExtendedContainer=void 0!==this.window.shouldLoadExtendedContainer?this.window.shouldLoadExtendedContainer:this.getSavedShouldLoadExtendedContainer()}var t,n,o;return t=e,(n=[{key:"setShouldLoadExtendedContainer",value:function(e){this.shouldLoadExtendedContainer=e}},{key:"loadGtmContainer",value:function(e){!function(e,t,n,o,i){e[o]=e[o]||[],e[o].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],d=t.createElement(n),r="&l=".concat(o);d.async=!0,d.src="//www.googletagmanager.com/gtm.js?id=".concat(i).concat(r),a.parentNode.insertBefore(d,a)}(this.window,this.window.document,"script","gtmDataLayer",e)}},{key:"loadNonMandatoryContainer",value:function(e){this.window.isFtb||void 0===this.window.gtmDataLayer||(this.window.isCovidDomain?this.loadGtmContainer(a.COVID_GTM_ACCOUNT_ID):this.window.optOut||(this.loadGtmContainer(a.GTM_ACCOUNT_ID_BASE),void 0!==this.shouldLoadExtendedContainer?(this.shouldLoadExtendedContainer&&this.loadGtmContainer(a.GTM_ACCOUNT_ID_EXTENDED),"function"==typeof e&&e()):this.window.ajaxCheckIfShouldLoadExtendedContainer&&this.sendAjaxLoadExtendedContainer(a.CONTAINER_TYPE_NON_MANDATORY,e)))}},{key:"getSavedShouldLoadExtendedContainer",value:function(){if(this.didStoreApiResponse())return"true"===this.window.sessionStorage.getItem(a.API_RESULT_SHOULD_LOAD_EXTENDED_CONTAINER)}},{key:"didStoreApiResponse",value:function(){return this.window.sessionStorage&&null!==this.window.sessionStorage.getItem(a.API_RESULT_SHOULD_LOAD_EXTENDED_CONTAINER)}},{key:"sendAjaxLoadExtendedContainer",value:function(e,t){var n=this,o=new this.window.XMLHttpRequest;o.preventCsrfToken=!0,o.open("GET",a.API_SHOULD_LOAD_EXTERNAL_GTM),o.setRequestHeader("Content-Type","application/json"),o.onload=function(){try{if(200===o.status&&o.responseText){var i=n.window.JSON.parse(o.responseText),d="false";i.data.shouldLoadExtendedGTMContainer&&(e===a.CONTAINER_TYPE_NON_MANDATORY?n.loadGtmContainer(a.GTM_ACCOUNT_ID_EXTENDED):e===a.CONTAINER_TYPE_UNTRUSTED&&n.loadGtmContainer(a.UNTRUSTED_ACCOUNT_ID_EXTENDED),d="true"),n.window.sessionStorage&&(n.window.sessionStorage.setItem(a.API_RESULT_SHOULD_LOAD_EXTENDED_CONTAINER,d),n.shouldLoadExtendedContainer=d),"function"==typeof t&&t()}}catch(e){console.log(e)}},o.send()}},{key:"loadNonTrustedContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||!this.window.optOut&&!this.window.isFtb)&&(this.loadGtmContainer(a.UNTRUSTED_ACCOUNT_ID_BASE),void 0!==this.shouldLoadExtendedContainer?this.shouldLoadExtendedContainer&&this.loadGtmContainer(a.UNTRUSTED_ACCOUNT_ID_EXTENDED):this.window.ajaxCheckIfShouldLoadExtendedContainer&&this.sendAjaxLoadExtendedContainer(a.CONTAINER_TYPE_UNTRUSTED))}}])&&r(t.prototype,n),o&&r(t,o),e}();t.default=s},ad8f9c92f942b11b016c:function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=[]}var t,n,i;return t=e,(n=[{key:"addEvent",value:function(e,t,n){var o=this;if(e&&e.addEventListener&&t&&"function"==typeof n)return this.performPushAndAdd(e,t,n),function(){o.removeEvent(e,t,n)}}},{key:"removeEvent",value:function(e,t,n){e&&e.removeEventListener&&t&&"function"==typeof n&&(e.removeEventListener(t,n),this.container=this.container.filter((function(o){return o.element!==e&&o.eventName!==t&&o.eventFn!==n})))}},{key:"addMultipleEvents",value:function(e,t,n){if(e&&e.addEventListener&&t&&"function"==typeof n)for(var o=0,i=t.length;o<i;o++){var a=t[o];this.performPushAndAdd(e,a,n)}}},{key:"performPushAndAdd",value:function(e,t,n){this.container.push({element:e,eventName:t,eventFn:n}),e.addEventListener(t,n)}},{key:"destroy",value:function(){for(var e=0,t=this.container.length;e<t;e++)this.container[e].element.removeEventListener(this.container[e].eventName,this.container[e].eventFn);this.container=[]}}])&&o(t.prototype,n),i&&o(t,i),e}();t.default=i},c27cdd1b7c76313bdfab:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobal=function(){var t=null;"undefined"!=typeof window&&"Window"===window.constructor.name?t=window:void 0!==e&&(t=e);return t},t.getWindow=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e}}).call(this,n("698d75b157f24ae829cc"))}});
//# sourceMappingURL=https://www.myheritage.com/FP/Assets/sourcemaps/GtmIframeLoader-4a8aed0d15a4fd7856ea137e291720c4.js.map
