window.CUSTOMER_DATA_HUB_API_SERVER="https://hubapi.fromdoppler.com",window.cdhReferrer=function(){var e;return e=window.cdh_stored_referrer||""===window.cdh_stored_referrer?window.cdh_stored_referrer:document.referrer,window.cdh_stored_referrer=window.location.href,e}();const enableCustomTracking=document.currentScript&&"true"==document.currentScript.getAttribute("enableCustomTracking"),domainsToBeLinked=document.currentScript&&document.currentScript.getAttribute("domainsToBeLinked");var _dha=function(){function e(e){var t;return void 0===(t="object"==typeof e[0]?e[0]:{}).local&&(t.local=!1),t}function t(e,t,r){return enableCustomTracking?{page:e||window.location.pathname,search:t,hash:r,referrer:window.cdhReferrer,host:window.location.host}:{page:window.location.pathname,search:window.location.search,hash:window.location.hash,referrer:window.cdhReferrer,host:window.location.host}}function r(e,t,r,n,o){_dha.utils.getPageInformation(!1,null,function(i,a){i||_dha.proxy.trackData(_dha.storage.getItem("_dha__uuid"),window.location.host,e||window.location.pathname,n,t,r,_dha.utils.detectSourceByUrl(),"historychange_"+o,null,null,a,_dha.utils.hasEmail())})}function n(e){if(0!==e.button&&1!==e.button)return;const t=domainsToBeLinked&&domainsToBeLinked.split(",").map(function(e){return e.trim()});if(!t||0===t.length)return;const r=_dha.storage.getItem("_dha__em");if(r){const e=_dha.utils.asciiToHex(r),n={completeUrl:this.href,protocolHostAndPath:this.origin+this.pathname,search:this.search,hash:this.hash,host:this.host};-1!==t.indexOf(n.host)&&(this.href=_dha.utils.getUrlAddingNewParam(n,"dplrid",e))}}function o(e){if(!domainsToBeLinked||""===domainsToBeLinked.trim())return;const t=(e||document).getElementsByTagName("a"),r=t&&[].slice.call(t).filter(e=>e.href);[].forEach.call(r,function(e){e.addEventListener("click",n),e.addEventListener("auxclick",n)})}function i(e){const r=function(e){e.cdhFnOnChange&&e.removeEventListener("change",e.cdhFnOnChange),e.cdhFnOnChange=function(r){!function(e,r){if(_dha.utils.trackVisitorEmail(e.target.value)){const e=t(null,null,null);_dha.utils.getPageInformation(!1,null,function(t,n){t||_dha.proxy.trackData(_dha.storage.getItem("_dha__uuid"),e.host,e.page,e.referrer,e.search,e.hash,"","inputemailchange",r.id,null,n,_dha.utils.hasEmail())})}}(r,e)},e.addEventListener("change",e.cdhFnOnChange)},n=(e||document).getElementsByTagName("input");[].forEach.call(n,function(e){("email"===e.type||e.id&&-1!==e.id.indexOf("email")||e.name&&-1!==e.name.indexOf("email"))&&r(e)})}return window.addEventListener("hashchange",function(e){if(!enableCustomTracking){var t=_dha.storage.getItem("_dha__uuid");t&&_dha.utils.getPageInformation(!1,null,function(r,n){r||_dha.proxy.trackData(t,window.location.host,window.location.pathname,e.oldURL,window.location.search,window.location.hash,null,"hashchange",null,null,n,_dha.utils.hasEmail())})}}),{trackAddToCart:function(e){var t=e.formSelectors||[],r=_dha.utils.getTagsByNameAndAttribute("form",t),n=[];r&&r.length>=1&&r.forEach(function(e){var t=e.querySelector("input[type=submit], button[type=submit], button[type=button]");t&&n.push({form:e,input:t})}),n.forEach(function(e){e.input.addEventListener("click",function(){_dha.utils.getPageInformation(!0,{involvedForm:e.form},function(e,t){e||_dha.proxy.trackData(_dha.storage.getItem("_dha__uuid"),window.location.host,window.location.pathname,window.cdhReferrer,window.location.search,window.location.hash,_dha.utils.detectSourceByUrl(),"addcartformevent",null,null,t,_dha.utils.hasEmail())})})})},track:function(){var r=e(arguments);_dha.proxy.config(r);var n=_dha.storage.getItem("_dha__uuid"),o=_dha.utils.obtainEmailParameter(),i=function(e,t){var r=!1,n="";return e?(t&&e!==t?(n=t,_dha.storage.deleteItem("_dha__uuid"),_dha.storage.setItem("_dha__uuid",n),_dha.proxy.aliasVisitor(t,e)):n=e,{guid:n,isNewGuid:r}):(t?n=t:(n=_dha.utils.generateUUID(),r=!0),_dha.storage.setItem("_dha__uuid",n),{guid:n,isNewGuid:r})}(n,_dha.utils.getParameterByName("dha_id"));_dha.updateUrlLink(i.guid);const a=t(r.navigatedPage,r.search,r.hash);_dha.utils.getPageInformation(!1,null,function(e,t){e||_dha.proxy.trackData(i.guid,a.host,a.page,a.referrer,a.search,a.hash,_dha.utils.detectSourceByUrl(),"pageview",null,null,t,_dha.utils.hasEmail())});var s=!1,u=!1,c=!1;if(o&&_dha.utils.isValidEmail(o)&&(s=!0,o===_dha.storage.getItem("_dha__em")&&(u=!0),c=_dha.utils.isFirstEmail(),_dha.storage.setItem("_dha__em",o)),i.isNewGuid)_dha.proxy.addVisitor(i.guid,s?o:null,window.location.host,c);else if(s&&!u)_dha.proxy.updateVisitor(i.guid,o,null,null,window.location.host,c);else if(localStorage.getItem("_dha__vud")){var l=new Date(JSON.parse(localStorage.getItem("_dha__vud")));new Date>l&&_dha.proxy.updateVisitor(i.guid,s?o:null,null,null,window.location.host,c)}},savePushNotificationToken:function(e,t){var r=_dha.storage.getItem("_dha__uuid"),n=_dha.storage.getItem("_dha__push_token");return!!r&&(!n||t?(_dha.storage.setItem("_dha__push_token","true"),_dha.proxy.updateVisitor(r,null,null,null,window.location.host,!1,e)):void 0)},trackForm:function(){var t=e(arguments);t.trackForm.length>0?_dha.trackFormByParameters(t.trackForm,t.navigatedPage,t.hash,t.search):_dha.trackAllForm(t.navigatedPage,t.hash,t.search)},trackFormByParameters:function(e,r,n,o){var i=_dha.storage.getItem("_dha__uuid");e.forEach(function(e){var a="",s=document.querySelector("#"+e.id_form_track);s?a="#"+e.id_form_track:(s=document.querySelector("form[name="+e.id_form_track+"]"))&&(a="form[name="+e.id_form_track+"]"),a&&document.forms[e.id_form_track].addEventListener("submit",function(){var s=[];if(e.id_input_track.length>0)e.id_input_track.forEach(function(e){var t,r=document.querySelector(a+" #"+e);t=r?r.getAttribute("id"):(r=document.querySelector(a+" input[name="+e+"]")).getAttribute("name");var n=r.getAttribute("type");if(t&&t.indexOf("email")>-1||n&&"email"===n.toLowerCase()){var o=r.value;if(o&&_dha.utils.isValidEmail(o)){const e=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(i,o,null,null,window.location.host,e),_dha.storage.setItem("_dha__em",o)}}n&&"password"!=n.toLowerCase()&&"hidden"!=n.toLowerCase()&&r.value&&s.push({name:t,value:r.value})});else{var u=document.querySelectorAll(a+" input");[].forEach.call(u,function(e){input_id=e.getAttribute("id")?e.getAttribute("id"):e.getAttribute("name");var t=e.getAttribute("type");t&&"password"!=t.toLowerCase()&&"hidden"!=t.toLowerCase()&&e.value&&s.push({name:input_id,value:e.value})})}if(s.length>0){r||window.location.pathname;const a=t(r,o,n);_dha.proxy.trackData(i,a.host,a.page,a.referrer,a.search,a.hash,"","formevent",e.id_form_track,s,null,_dha.utils.hasEmail(),!1)}})})},trackAllForm:function(e,r,n){[].forEach.call(document.forms,function(o){var i=[],a=o.getAttribute("id");a||(a=o.getAttribute("name"))||(a="");var s=_dha.storage.getItem("_dha__uuid");o.addEventListener("submit",function(){var o=this.querySelectorAll("input");if([].forEach.call(o,function(e){var t=e.getAttribute("id"),r=e.getAttribute("type");if(t||(t=e.getAttribute("name")),t&&t.indexOf("email")>-1||r&&"email"===r.toLowerCase()){var n=e.value;if(n&&_dha.utils.isValidEmail(n)){const e=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(s,n,null,null,window.location.host,e),_dha.storage.setItem("_dha__em",n)}}r&&"password"!=r.toLowerCase()&&"hidden"!=r.toLowerCase()&&e.value&&i.push({name:t,value:e.value})}),i.length>0){const o=t(e,n,r);_dha.proxy.trackData(s,o.host,o.page,o.referrer,o.search,o.hash,"","formevent",a,i,null,_dha.utils.hasEmail(),!1)}})})},linkDomains:function(e){o(e)},trackInputEmail:function(e){i(e)},trackDOMMutation:function(){const e=document.body;new MutationObserver(function(e,t){for(let t of e)"childList"===t.type&&t.addedNodes&&t.addedNodes.length>0&&(i(t.target),o(t.target))}).observe(e,{childList:!0,subtree:!0})},trackChangeState:function(){const e=window.history.pushState;window.history.pushState=function(t,r,n){return"function"==typeof window.history.onpushstate_cdh&&window.history.onpushstate_cdh({state:t,unused:r,url:n}),e.apply(window.history,arguments)},window.history.onpushstate_cdh=function(e){const t=window.location.pathname;var n=e.url||window.location;"object"==typeof n?r(n.pathname,n.search,n.hash,t,"onpushstate"):r(n,null,null,t,"onpushstate")},window.addEventListener("popstate",function(e){const t=window.location;r(t.pathname,t.search,t.hash,document.referrer,"onpopstate")})},updateUrlLink:function(e){if(e){var t=document.querySelectorAll(".dh--link--exit");[].forEach.call(t,function(t){t.onclick=function(){t.href=-1===t.href.indexOf("?")?t.href+"?dha_id="+e:t.href+"&dha_id="+e}})}},trackEmail:function(e){_dha.utils.trackVisitorEmail(e)}}}();_dha.proxy=function(){var e={local:!1};document.location.protocol;function t(){return e.local?"http://localhost:3000":CUSTOMER_DATA_HUB_API_SERVER}function r(){var e=new Date;return e.setMinutes(e.getMinutes()+14400),e}return{config:function(t){e=t},addVisitor:function(e,n,o,i){_dha.storage.setItem("_dha__vud",JSON.stringify(r()));var a=new XMLHttpRequest;a.open("POST",t()+"/api/visitors"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.onload=function(e){4===a.readyState&&(200===a.status||console.error(a.statusText))},a.onerror=function(e){console.error(a.statusText)},a.send(JSON.stringify({visitor:{visitorGuid:e,email:n,domain:o,isFirstEmail:i}}))},aliasVisitor:function(e,r){var n=new XMLHttpRequest;n.open("POST",t()+"/api/alias"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.onload=function(e){4===n.readyState&&(200===n.status||console.error(n.statusText))},n.onerror=function(e){console.error(n.statusText)},n.send(JSON.stringify({visitor:{visitor_1:e,visitor_2:r}}))},updateVisitor:function(e,n,o,i,a,s,u){_dha.storage.setItem("_dha__vud",JSON.stringify(r()));var c=new XMLHttpRequest,l=t()+"/api/visitors/"+e;c.open("POST",l),c.setRequestHeader("Content-Type","application/json;charset=UTF-8"),c.onload=function(e){4===c.readyState&&(200===c.status||console.error(c.statusText))},c.onerror=function(e){console.error(c.statusText)},c.send(JSON.stringify({visitor:{visitorGuid:e,email:n,username:o,fullname:i,domain:a,isFirstEmail:s,pushNotificationToken:u}}))},trackData:function(e,r,n,o,i,a,s,u,c,l,d,f,p){p=void 0===p||p;var h=new XMLHttpRequest;h.open("POST",t()+"/api/data",p),h.setRequestHeader("Content-Type","application/json;charset=UTF-8"),h.onload=function(e){4===h.readyState&&(200===h.status||console.error(h.statusText))},h.onerror=function(e){console.error(h.statusText)},h.send(JSON.stringify({visitor:{visitorGuid:e,domain:r,page:n,referrer:o,queryString:i,hash:a,source:s,eventType:u,eventName:c,additionalInfo:l,pageInfo:d,scriptVersion:"1.15.0",userAgent:navigator.userAgent,appName:navigator.appName,appVersion:navigator.appVersion,hasEmail:f}}))}}}(),_dha.storage=function(){var e=!1,t=!1;function r(){t||(e=function(){var e="_dha__ck";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}(),t=!0)}return{setItem:function(t,n){r(),e?function(e,t){localStorage.setItem(e,t)}(t,n):function(e,t){var r=new Date;r.setTime(r.getTime()+31536e7);var n="expires="+r.toUTCString();document.cookie=e+"="+t+"; "+n+"path=/"}(t,n)},getItem:function(t){return r(),e?function(e){return localStorage.getItem(e)}(t):function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""}(t)},deleteItem:function(t){return r(),e?function(e){localStorage.removeItem(e)}(t):(n=t,void(document.cookie=n+"=;expires=Thu, 01 Jan 1970 00:00:00 UTCpath=/"));var n}}}(),_dha.utils=function(){const e=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,t=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function r(e){var t;e.pageType||(t=o("meta",[{attName:"property",attValue:"og:type"}]))&&t.length>0&&(e.pageType=t[0].getAttribute("content"));e.price||(t=o("meta",[{attName:"property",attValue:"og:price"},{attName:"property",attValue:"og:price:amount"},{attName:"property",attValue:"product:price:amount"}]))&&t.length>0&&(e.price=t[0].getAttribute("content"));return e}function n(e){return e.pageType?{pageType:e.pageType,productId:e.productId?e.productId.toString():void 0,price:e.price?e.price:void 0,categoryId:e.categoryId?e.categoryId.toString():void 0,cartId:e.cartId?e.cartId.toString():void 0,items:e.items&&e.items.length>=1?e.items:void 0,eCommerceCustomer:e.eCommerceCustomer?e.eCommerceCustomer.toString():void 0}:null}function o(e,t,r){for(var n=(r||document).getElementsByTagName(e),o=[],i=0;i<n.length;i++)for(var a=0;a<t.length;a++)if(n[i].getAttribute(t[a].attName)===t[a].attValue)o.push(n[i]);else if("class"===t[a].attName){const e=n[i].getAttribute(t[a].attName),r=e&&e.split(" ");r&&-1!==r.indexOf(t[a].attValue)&&o.push(n[i])}return o}function i(e){if(!e||!e.hasChildNodes())return"";const t=e.childNodes;for(var r=0;r<t.length;r++){const e=t[r];if(8===e.nodeType){const t=e.textContent.match(/VirtualFolder\.Name: (\S+)/);if(t&&t[1])return t[1]}}return""}function a(e){const t={pageType:void 0,productId:void 0,price:void 0,categoryId:void 0};switch(t.pageType=function(){let e="";switch((e=i(document.body))||(e=i(document.head)),e.toLowerCase()){case"/":return"home";case"@produto@":case"@product@":return"product";case"@departamento@":case"@departament@":case"@categoria@":case"@category@":return"category";case"busca":case"search":return"search"}if("/checkout/"===window.location.pathname||"/cart"===window.location.pathname)return window.location.pathname.replace(/\//g,"")}(),t.pageType){case"product":if(window.skuJson){const e=window.skuJson.skus.filter(function(e){return e.available})[0]||{};t.productId=window.skuJson.productId,t.price=e.bestPrice&&e.bestPrice/100,t.categoryId=window.vtxctx&&window.vtxctx.categoryId}break;case"category":t.categoryId=window.vtxctx&&window.vtxctx.categoryId;break;case"cart":case"checkout":t.cartId=window.vtexjs.checkout.orderFormId}return"cart"!==t.pageType&&"checkout"!==t.pageType||t.cartId?e(null,t):window.vtexjs.checkout.getOrderForm().then(function(r){return t.cartId=r&&r.orderFormId,e(null,t)})}return{getTagsByNameAndAttribute:function(e,t,r){return o(e,t,r)},getPageInformation:function(e,t,i){var s={pageType:void 0,productId:void 0,price:void 0,categoryId:void 0};switch("undefined"!=typeof Shopify&&Shopify&&Shopify.shop?"shopify":window.LS?"tienda-nube":_dha.storage.getItem("mage-cache-storage")?"magento":window.vtxctx||window.vtexjs?"vtex":void 0){case"shopify":s=function(e){const t={pageType:e?"cart":void 0,productId:void 0,price:void 0,categoryId:void 0};return window.meta&&(t.pageType||(t.pageType=window.meta.page&&window.meta.page.pageType),window.meta.product&&(t.productId=window.meta.product.id,t.price=window.meta.product.variants&&window.meta.product.variants.length>0?window.meta.product.variants[0].price:void 0)),t}(e);break;case"tienda-nube":s=function(e,t){const r={pageType:e?"cart":window.LS.template,productId:void 0,price:void 0,categoryId:void 0};let n;if(r.pageType||(r.pageType=/^\/checkout\//.test(window.location.pathname)?"checkout":void 0),e&&t&&t.involvedForm){const e=o("input",[{attName:"name",attValue:"add_to_cart"}],t.involvedForm);n=e&&e.length>0&&e[0].value||void 0}if(r.cartId=window.LS.cart?window.LS.cart.id:void 0,r.productId=n||window.LS.product&&window.LS.product.id||void 0,r.price=window.LS.variants&&window.LS.variants.length>0?window.LS.variants[0].price_number:void 0,r.categoryId=window.LS.category?window.LS.category.id:void 0,r.eCommerceCustomer=window.LS.customer,r.eCommerceCustomer){const e=new XMLHttpRequest;e.open("GET","/account/info/",!0),e.responseType="document",e.onload=function(){if(4==e.readyState)if(200==e.status){const t=e.responseXML.getElementsByName("email");t&&t.length>0&&Array.prototype.slice.call(t).forEach(function(e){_dha.utils.isValidEmail(e.value)&&_dha.utils.trackVisitorEmail(e.value)})}else console.error(`${e.status} => ${e.statusText}`)},e.onerror=function(){console.error(`${e.status} => ${e.statusText}`)},e.send()}return r}(e,t);break;case"magento":s=function(e){const t={pageType:e?"cart":void 0,productId:void 0,price:void 0,categoryId:void 0,items:void 0};if(t.pageType||(t.pageType=/\/checkout\//.test(window.location.pathname)?"checkout":void 0),"cart"===t.pageType){const e=o("form",[{attName:"id",attValue:"product_addtocart_form"}]);t.productId=e&&e.length>0&&e[0].getAttribute("data-product-sku")}if("cart"===t.pageType||"checkout"===t.pageType){const e=JSON.parse(_dha.storage.getItem("mage-cache-storage"));if(e&&e.cart&&e.cart.items){const r=e.cart.items.map(e=>({item_id:e.item_id,product_id:e.product_id,sku:e.product_sku}));t.items=r}}return t}(e);break;case"vtex":return a(function(e,t){return s=r(t),i(null,n(s))});default:s=function(){const e={pageType:void 0,productId:void 0,price:void 0,categoryId:void 0};if(window.dataLayer){for(var t,r=0;r<window.dataLayer.length&&!t;r++){const e=window.dataLayer[r];e.hasOwnProperty("pagetype")&&(t=e)}t&&(e.pageType=t.pagetype,e.productId=t.prodID,e.price=t.totalvalue,e.categoryId=t.catID)}return e}()}return s=r(s),i(null,n(s))},hexToAscii:function(e){for(var t=e.toString(),r="",n=0;n<t.length;n+=2)r+=String.fromCharCode(parseInt(t.substr(n,2),16));return r},asciiToHex:function(e){const t=[];for(let r=0;r<e.length;r++){const n=Number(e.charCodeAt(r)).toString(16);t.push(n)}return t.join("")},getUrlAddingNewParam:function(e,t,r){const n=t+"=";return-1!==e.search.indexOf(n)?e.completeUrl:e.protocolHostAndPath+(e.search?e.search+"&":"?")+n+r+e.hash},getParameterByName:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)","i");return results=t.exec(location.search),null===results?"":decodeURIComponent(results[1].replace(/\+/g," "))},isValidEmail:function(e){return/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/.test(e)},trackVisitorEmail:function(e){if(_dha.utils.isValidEmail(e)){var t=_dha.storage.getItem("_dha__uuid");if(t){const r=_dha.utils.isFirstEmail();return _dha.storage.setItem("_dha__em",e),_dha.proxy.updateVisitor(t,e,null,null,window.location.host,r),!0}}return!1},obtainEmailParameter:function(){var e=_dha.utils.getParameterByName("dplrid");return e?e=_dha.utils.hexToAscii(e):(e=_dha.utils.getParameterByName("email"))||_dha.utils.getParameterByName("dha_em")},hasEmail:function(){const e=_dha.storage.getItem("_dha__em"),t=_dha.utils.obtainEmailParameter();return!!(e||t&&_dha.utils.isValidEmail(t))},isFirstEmail:function(){return!_dha.storage.getItem("_dha__em")},isStringIntoArrayOfSubstring:function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},isStringIntoArrayOfString:function(e,t){return t.indexOf(e)>-1},detectSourceByUrl:function(){var e=["twitter","facebook","linkedin","pinterest","plus.google","youtube","instagram"],t=["google","bing","duckduckgo","exalead","gigablast","munax","qwant","yahoo","yandex"],r=_dha.utils.getParameterByName("utm_medium"),n=_dha.utils.getParameterByName("utm_source"),o=_dha.utils.getParameterByName("utm_campaign");const i=!!_dha.utils.getParameterByName("dplrid");var a=[];if(r&&(r=r.toLowerCase(),a.push(r)),n&&(n=n.toLowerCase(),a.push(n)),o&&(o=o.toLowerCase(),a.push(o)),"social"===r){if(_dha.utils.isStringIntoArrayOfString(n,e))return"Social";if(window.cdhReferrer&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,e))return"Social"}return _dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,e)?"Social":_dha.utils.isStringIntoArrayOfSubstring(n,["email"])||_dha.utils.isStringIntoArrayOfSubstring(r,["email"])||_dha.utils.isStringIntoArrayOfSubstring(o,["email"])||i?"Email":_dha.utils.isStringIntoArrayOfSubstring(n,["adword","ppc","cpc"])||_dha.utils.isStringIntoArrayOfSubstring(r,["adword","ppc","cpc"])||_dha.utils.isStringIntoArrayOfSubstring(o,["adword","ppc","cpc"])?"Paid":_dha.utils.getParameterByName("gclid")?"Paid":window.cdhReferrer&&a.length>0&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,a)?"Paid":window.cdhReferrer&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,t)?"Organic":!window.cdhReferrer||_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,t)&&_dha.utils.isStringIntoArrayOfSubstring(window.cdhReferrer,e)?"Direct":"Referral"},generateBrowserFingerprint:function(){var e=(new Date).getTime(),t=window.navigator,r=window.screen,n=t.mimeTypes.length;n+=t.userAgent.replace(/\D+/g,""),n+=t.plugins.length,n+=r.height||"",n+=r.width||"";for(var o=e+(n+=r.pixelDepth||""),i=[8,4,4,4,12],a=[],s=0,u=0;u<i.length;u++)a.push(o.slice(s,s+i[u])),s+=i[u];return a.join("-")},generateUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);var r=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return e[255&r]+e[r>>8&255]+e[r>>16&255]+e[r>>24&255]+"-"+e[255&n]+e[n>>8&255]+"-"+e[n>>16&15|64]+e[n>>24&255]+"-"+e[63&o|128]+e[o>>8&255]+"-"+e[o>>16&255]+e[o>>24&255]+e[255&i]+e[i>>8&255]+e[i>>16&255]+e[i>>24&255]},isMobile:function(){const r=navigator.userAgent||navigator.vendor||window.opera;return e.test(r)||t.test(r.substr(0,4))}}}(),_dha.UI=function(){var e={},t=0,r=!1;function n(e){var t;return function e(t,r){for(var n in r)t.hasOwnProperty(n)?"object"==typeof r[n]&&e(t[n],r[n]):t[n]=r[n]}(t="object"==typeof e[0]?e[0]:{},{delay_capturer_display:0,mobile:!1,leave_window:!1,after_time:{show:!1,time:1e4},repeat_after_time:2592e6,capturer_info:{handle_by_lib:!0,import_file:!0,capturer_id:"dha-capturer-container",form_id:"dha-capturer-form"}}),t}return{config:function(t){e=t},init:function(){window.onblur=function(){r=!0},window.onfocus=function(){r=!1},e.capturer_info.handle_by_lib&&(document.onclick=function(t){t.target.id!=e.capturer_info.capturer_id&&"dha-close-popup"!=t.target.id&&"dha-close-popup"!=t.target.parentElement.id||(document.getElementById(e.capturer_info.capturer_id).style.display="none")})},captureEmail:function(){if(!_dha.storage.getItem("_dha__ps")){if(_dha.UI.config(n(arguments)),_dha.utils.isMobile()&&!e.mobile)return;if(e.capturer_info.import_file){var t=document.querySelector("#dha-capturer-file");t&&t.href&&fetch(t.href).then(function(e){return e.text()}).then(function(e){var t=document.createElement("div");t.innerHTML=e,document.body.appendChild(t)})}_dha.UI.init(),_dha.UI.verify_time_to_repeat(),e.after_time.show&&_dha.UI.show_popup_after_period_a_time(),e.leave_window&&setTimeout(function(){document.onmouseout=function(e){if(!_dha.storage.getItem("_dha__ped")){var t=(e=e||window.event).relatedTarget||e.toElement;t&&"HTML"!=t.nodeName||_dha.UI.show_popup()}}},e.delay_capturer_display),e.capturer_info.handle_by_lib||_dha.UI.bindCapturerSubmit()}},validateCapturer:function(){var t="#"+e.capturer_info.form_id,r=document.querySelector(t+" #email");return document.querySelector(t+" #dha-error-email-empty").style.display="none",document.querySelector(t+" #dha-error-email-invalid").style.display="none",r.value?_dha.utils.isValidEmail(r.value)?void _dha.UI.registerInfoPopup(r.value):(r.className&&-1==r.className.indexOf("dha-error")?r.className+=" dha-error":r.className||(r.className="dha-error"),void(document.querySelector(t+" #dha-error-email-invalid").style.display="block")):(r.className&&-1==r.className.indexOf("dha-error")?r.className+=" dha-error":r.className||(r.className="dha-error"),void(document.querySelector(t+" #dha-error-email-empty").style.display="block"))},show_popup_after_period_a_time:function(){time=e.after_time.time,delta=100,_dha.storage.getItem("_dha__ped")||(t=setInterval(function(){r?time=e.after_time.time:(time-=delta,time<=0&&(clearInterval(t),_dha.UI.show_popup()))},delta))},verify_time_to_repeat:function(){if(_dha.storage.getItem("_dha__ped")){popup_exit_date=new Date(JSON.parse(localStorage.getItem("_dha__ped"))),max_date_popup=new Date(JSON.parse(localStorage.getItem("_dha__ped")));var t=Math.floor(e.repeat_after_time/1e3/60);max_date_popup.setMinutes(max_date_popup.getMinutes()+t),current_time=new Date,current_time>max_date_popup&&_dha.storage.deleteItem("_dha__ped")}},show_popup:function(){if(_dha.storage.setItem("_dha__ped",JSON.stringify(new Date)),clearInterval(t),e.capturer_info.handle_by_lib){var r="#"+e.capturer_info.form_id,n=document.querySelector(r+" #email");n.className=n.className.replace("dha-error",""),document.querySelector(r+" #dha-error-email-empty").style.display="none",document.querySelector(r+" #dha-error-email-invalid").style.display="none",document.querySelector(r+" div.dha-before-submit").style.display="block",document.querySelector(r+" div.dha-after-submit").style.display="none",document.querySelector(r+" div.dha-inputs-holder").style.display="block"}document.querySelector("div#"+e.capturer_info.capturer_id)&&(document.querySelector("div#"+e.capturer_info.capturer_id).style.display="block")},bindCapturerSubmit:function(){var t=_dha.storage.getItem("_dha__uuid"),r=document.querySelector("#"+e.capturer_info.form_id);r&&r.addEventListener("submit",function(){var e=this.querySelector("#email").value;if(e&&_dha.utils.isValidEmail(e)){const r=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(t,e,null,null,window.location.host,r),_dha.storage.setItem("_dha__em",e),_dha.storage.setItem("_dha__ps",new Date)}})},registerInfoPopup:function(t){var r=_dha.storage.getItem("_dha__uuid");const n=_dha.utils.isFirstEmail();_dha.proxy.updateVisitor(r,t,null,null,window.location.host,n),_dha.storage.setItem("_dha__em",t),_dha.storage.setItem("_dha__ps",new Date);var o="#"+e.capturer_info.form_id;document.querySelector(o+" div.dha-before-submit").style.display="none",document.querySelector(o+" div.dha-after-submit").style.display="block",document.querySelector(o+" div.dha-inputs-holder").style.display="none",setTimeout(function(){document.getElementById(e.capturer_info.capturer_id).style.display="none"},4e3)}}}(),(()=>{var e={752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,i=r(655),a=r(313),s=r(730),u=r(594),c=((n={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",n["bad-app-name"]="Illegal App name: '{$appName}",n["duplicate-app"]="Firebase App named '{$appName}' already exists",n["app-deleted"]="Firebase App named '{$appName}' already deleted",n["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",n["invalid-log-argument"]="First argument to `onLog` must be null or a function.",n),l=new a.ErrorFactory("app","Firebase",c),d="@firebase/app",f="[DEFAULT]",p=((o={})[d]="fire-core",o["@firebase/analytics"]="fire-analytics",o["@firebase/auth"]="fire-auth",o["@firebase/database"]="fire-rtdb",o["@firebase/functions"]="fire-fn",o["@firebase/installations"]="fire-iid",o["@firebase/messaging"]="fire-fcm",o["@firebase/performance"]="fire-perf",o["@firebase/remote-config"]="fire-rc",o["@firebase/storage"]="fire-gcs",o["@firebase/firestore"]="fire-fst",o["fire-js"]="fire-js",o["firebase-wrapper"]="fire-js-all",o),h=new u.Logger("@firebase/app"),g=function(){function e(e,t,r){var n,o,u=this;this.firebase_=r,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(e),this.container=new s.ComponentContainer(t.name),this._addComponent(new s.Component("app",function(){return u},"PUBLIC"));try{for(var c=i.__values(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var d=l.value;this._addComponent(d)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map(function(e){return e.delete()}))}).then(function(){e.isDeleted_=!0})},e.prototype._getService=function(e,t){return void 0===t&&(t=f),this.checkDestroyed_(),this.container.getProvider(e).getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=f),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){h.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},e.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},e}();g.prototype.name&&g.prototype.options||g.prototype.delete||console.log("dc");var v=function e(){var t=function(e){var t={},r=new Map,n={__esModule:!0,initializeApp:function(r,o){void 0===o&&(o={}),"object"==typeof o&&null!==o||(o={name:o});var i=o;void 0===i.name&&(i.name=f);var s=i.name;if("string"!=typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(a.contains(t,s))throw l.create("duplicate-app",{appName:s});var u=new e(r,i,n);return t[s]=u,u},app:o,registerVersion:function(e,t,r){var n,o=null!==(n=p[e])&&void 0!==n?n:e;r&&(o+="-"+r);var i=o.match(/\s|\//),a=t.match(/\s|\//);if(i||a){var u=['Unable to register library "'+o+'" with version "'+t+'":'];return i&&u.push('library name "'+o+'" contains illegal characters (whitespace or "/")'),i&&a&&u.push("and"),a&&u.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void h.warn(u.join(" "))}c(new s.Component(o+"-version",function(){return{library:o,version:t}},"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(e,t){if(null!==e&&"function"!=typeof e)throw l.create("invalid-log-argument",{appName:name});u.setUserLogHandler(e,t)},apps:null,SDK_VERSION:"7.20.0",INTERNAL:{registerComponent:c,removeApp:function(e){delete t[e]},components:r,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function o(e){if(e=e||f,!a.contains(t,e))throw l.create("no-app",{appName:e});return t[e]}function c(s){var u,c,d=s.name;if(r.has(d))return h.debug("There were multiple attempts to register component "+d+"."),"PUBLIC"===s.type?n[d]:null;if(r.set(d,s),"PUBLIC"===s.type){var f=function(e){if(void 0===e&&(e=o()),"function"!=typeof e[d])throw l.create("invalid-app-argument",{appName:d});return e[d]()};void 0!==s.serviceProps&&a.deepExtend(f,s.serviceProps),n[d]=f,e.prototype[d]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._getService.bind(this,d).apply(this,s.multipleInstances?e:[])}}try{for(var p=i.__values(Object.keys(t)),g=p.next();!g.done;g=p.next()){var v=g.value;t[v]._addComponent(s)}}catch(e){u={error:e}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?n[d]:null}return n.default=n,Object.defineProperty(n,"apps",{get:function(){return Object.keys(t).map(function(e){return t[e]})}}),o.App=e,n}(g);return t.INTERNAL=i.__assign(i.__assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){a.deepExtend(t,e)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),t}(),m=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null}).filter(function(e){return e}).join(" ")},e}();if(a.isBrowser()&&void 0!==self.firebase){h.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var y=self.firebase.SDK_VERSION;y&&y.indexOf("LITE")>=0&&h.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var _=v.initializeApp;v.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.isNode()&&h.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/rollup-plugin-node-resolve\n      '),_.apply(void 0,e)};var w=v;!function(e,t){e.INTERNAL.registerComponent(new s.Component("platform-logger",function(e){return new m(e)},"PRIVATE")),e.registerVersion(d,"0.6.11",void 0),e.registerVersion("fire-js","")}(w),t.default=w,t.firebase=w},730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(655),o=r(313),i=function(){function e(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e}(),a="[DEFAULT]",s=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return e.prototype.get=function(e){void 0===e&&(e=a);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var r=new o.Deferred;this.instancesDeferred.set(t,r);try{var n=this.getOrInitializeService(t);n&&r.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=n.__assign({identifier:a,optional:!1},e),r=t.identifier,o=t.optional,i=this.normalizeInstanceIdentifier(r);try{var s=this.getOrInitializeService(i);if(!s){if(o)return null;throw Error("Service "+this.name+" is not available")}return s}catch(e){if(o)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,r;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService(a)}catch(e){}try{for(var o=n.__values(this.instancesDeferred.entries()),i=o.next();!i.done;i=o.next()){var s=n.__read(i.value,2),u=s[0],c=s[1],l=this.normalizeInstanceIdentifier(u);try{var d=this.getOrInitializeService(l);c.resolve(d)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},e.prototype.clearInstance=function(e){void 0===e&&(e=a),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){var e;return n.__generator(this,function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(n.__spread(e.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}),e.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()})))];case 1:return t.sent(),[2]}})})},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.getOrInitializeService=function(e){var t=this.instances.get(e);return!t&&this.component&&(t=this.component.instanceFactory(this.container,function(e){return e===a?void 0:e}(e)),this.instances.set(e,t)),t||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:a:e},e}(),u=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new s(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();t.Component=i,t.ComponentContainer=u,t.Provider=s},594:(e,t,r)=>{"use strict";function n(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}var o;r.r(t),r.d(t,{LogLevel:()=>i,Logger:()=>d,setLogLevel:()=>(function(e){a.forEach(function(t){t.setLogLevel(e)})}),setUserLogHandler:()=>(function(e,t){for(var r=function(r){var n=null;t&&t.level&&(n=s[t.level]),r.userLogHandler=null===e?null:function(t,r){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=o.map(function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(function(e){return e}).join(" ");r>=(null!=n?n:t.logLevel)&&e({level:i[r].toLowerCase(),message:s,args:o,type:t.name})}},n=0,o=a;n<o.length;n++)r(o[n])})});var i,a=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));var s={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},u=i.INFO,c=((o={})[i.DEBUG]="log",o[i.VERBOSE]="log",o[i.INFO]="info",o[i.WARN]="warn",o[i.ERROR]="error",o),l=function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!(t<e.logLevel)){var i=(new Date).toISOString(),a=c[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,n(["["+i+"]  "+e.name+":"],r))}},d=function(){function e(e){this.name=e,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?s[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,n([this,i.DEBUG],e)),this._logHandler.apply(this,n([this,i.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,n([this,i.VERBOSE],e)),this._logHandler.apply(this,n([this,i.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,n([this,i.INFO],e)),this._logHandler.apply(this,n([this,i.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,n([this,i.WARN],e)),this._logHandler.apply(this,n([this,i.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,n([this,i.ERROR],e)),this._logHandler.apply(this,n([this,i.ERROR],e))},e}()},313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(655),o={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},i=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+o.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t[r++]=o:o<2048?(t[r++]=o>>6|192,t[r++]=63&o|128):55296==(64512&o)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n)),t[r++]=o>>18|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>12|224,t[r++]=o>>6&63|128,t[r++]=63&o|128)}return t},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[],o=0;o<e.length;o+=3){var i=e[o],a=o+1<e.length,s=a?e[o+1]:0,u=o+2<e.length,c=u?e[o+2]:0,l=i>>2,d=(3&i)<<4|s>>4,f=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(f=64)),n.push(r[l],r[d],r[f],r[p])}return n.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],r=0,n=0;r<e.length;){var o=e[r++];if(o<128)t[n++]=String.fromCharCode(o);else if(o>191&&o<224){var i=e[r++];t[n++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){var a=((7&o)<<18|(63&(i=e[r++]))<<12|(63&(s=e[r++]))<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(a>>10)),t[n++]=String.fromCharCode(56320+(1023&a))}else{i=e[r++];var s=e[r++];t[n++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[],o=0;o<e.length;){var i=r[e.charAt(o++)],a=o<e.length?r[e.charAt(o)]:0,s=++o<e.length?r[e.charAt(o)]:64,u=++o<e.length?r[e.charAt(o)]:64;if(++o,null==i||null==a||null==s||null==u)throw Error();var c=i<<2|a>>4;if(n.push(c),64!==s){var l=a<<4&240|s>>2;if(n.push(l),64!==u){var d=s<<6&192|u;n.push(d)}}}return n},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},c=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function l(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var r in t)t.hasOwnProperty(r)&&(e[r]=l(e[r],t[r]));return e}var d=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})}return e.prototype.wrapCallback=function(e){var t=this;return function(r,n){r?t.reject(r):t.resolve(n),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(r):e(r,n))}},e}();function f(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function p(){try{return"[object process]"===Object.prototype.toString.call(r.g.process)}catch(e){return!1}}var h=function(e){function t(r,n){var o=e.call(this,n)||this;return o.code=r,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,g.prototype.create),o}return n.__extends(t,e),t}(Error),g=function(){function e(e,t,r){this.service=e,this.serviceName=t,this.errors=r}return e.prototype.create=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=t[0]||{},o=this.service+"/"+e,i=this.errors[e],a=i?function(e,t){return e.replace(v,function(e,r){var n=t[r];return null!=n?String(n):"<"+r+"?>"})}(i,n):"Error",s=this.serviceName+": "+a+" ("+o+").",u=new h(o,s),c=0,l=Object.keys(n);c<l.length;c++){var d=l[c];"_"!==d.slice(-1)&&(d in u&&console.warn('Overwriting FirebaseError base field "'+d+'" can cause unexpected behavior.'),u[d]=n[d])}return u},e}();var v=/\{\$([^}]+)}/g;function m(e){return JSON.parse(e)}var y=function(e){var t={},r={},n={},o="";try{var i=e.split(".");t=m(c(i[0])||""),r=m(c(i[1])||""),o=i[2],n=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:n,signature:o}},_=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var r=this.W_;if("string"==typeof e)for(var n=0;n<16;n++)r[n]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(n=0;n<16;n++)r[n]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(n=16;n<80;n++){var o=r[n-3]^r[n-8]^r[n-14]^r[n-16];r[n]=4294967295&(o<<1|o>>>31)}var i,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],d=this.chain_[4];for(n=0;n<80;n++)n<40?n<20?(i=l^u&(c^l),a=1518500249):(i=u^c^l,a=1859775393):n<60?(i=u&c|l&(u|c),a=2400959708):(i=u^c^l,a=3395469782),o=(s<<5|s>>>27)+i+d+a+r[n]&4294967295,d=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=o;this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,n=0,o=this.buf_,i=this.inbuf_;n<t;){if(0===i)for(;n<=r;)this.compress_(e,n),n+=this.blockSize;if("string"==typeof e){for(;n<t;)if(o[i]=e.charCodeAt(n),++n,++i===this.blockSize){this.compress_(o),i=0;break}}else for(;n<t;)if(o[i]=e[n],++n,++i===this.blockSize){this.compress_(o),i=0;break}}this.inbuf_=i,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var r=this.blockSize-1;r>=56;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);var n=0;for(r=0;r<5;r++)for(var o=24;o>=0;o-=8)e[n]=this.chain_[r]>>o&255,++n;return e},e}(),w=function(){function e(e,t){var r=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(r)}).catch(function(e){r.error(e)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,r){var n,o=this;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");void 0===(n=function(e,t){if("object"!=typeof e||null===e)return!1;for(var r=0,n=["next","error","complete"];r<n.length;r++){var o=n[r];if(o in e&&"function"==typeof e[o])return!0}return!1}(e)?e:{next:e,error:t,complete:r}).next&&(n.next=b),void 0===n.error&&(n.error=b),void 0===n.complete&&(n.complete=b);var i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{o.finalError?n.error(o.finalError):n.complete()}catch(e){}}),this.observers.push(n),i},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var r=this;this.task.then(function(){if(void 0!==r.observers&&void 0!==r.observers[e])try{t(r.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}();function b(){}function S(e,t,r){var n="";switch(t){case 1:n=r?"first":"First";break;case 2:n=r?"second":"Second";break;case 3:n=r?"third":"Third";break;case 4:n=r?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}return e+" failed: "+n+" argument "}t.CONSTANTS=o,t.Deferred=d,t.ErrorFactory=g,t.FirebaseError=h,t.MAX_VALUE_MILLIS=144e5,t.RANDOM_FACTOR=.5,t.Sha1=_,t.areCookiesEnabled=function(){return!(!navigator||!navigator.cookieEnabled)},t.assert=i,t.assertionError=a,t.async=function(e,t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];Promise.resolve(!0).then(function(){e.apply(void 0,r)}).catch(function(e){t&&t(e)})}},t.base64=u,t.base64Decode=c,t.base64Encode=function(e){var t=s(e);return u.encodeByteArray(t,!0)},t.calculateBackoffMillis=function(e,t,r){void 0===t&&(t=1e3),void 0===r&&(r=2);var n=t*Math.pow(r,e),o=Math.round(.5*n*(Math.random()-.5)*2);return Math.min(144e5,n+o)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var r=new w(e,t);return r.subscribe.bind(r)},t.decode=y,t.deepCopy=function(e){return l(void 0,e)},t.deepExtend=l,t.errorPrefix=S,t.getUA=f,t.isAdmin=function(e){var t=y(e).claims;return"object"==typeof t&&!0===t.admin},t.isBrowser=function(){return"object"==typeof self&&self.self===self},t.isBrowserExtension=function(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id},t.isElectron=function(){return f().indexOf("Electron/")>=0},t.isEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isIE=function(){var e=f();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},t.isIndexedDBAvailable=function(){return"indexedDB"in self&&null!=indexedDB},t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(f())},t.isNode=p,t.isNodeSdk=function(){return!0===o.NODE_CLIENT||!0===o.NODE_ADMIN},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.isSafari=function(){return!p()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},t.isUWP=function(){return f().indexOf("MSAppHost/")>=0},t.isValidFormat=function(e){var t=y(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=y(e).claims,r=Math.floor((new Date).getTime()/1e3),n=0,o=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?n=t.nbf:t.hasOwnProperty("iat")&&(n=t.iat),o=t.hasOwnProperty("exp")?t.exp:n+86400),!!r&&!!n&&!!o&&r>=n&&r<=o},t.issuedAtTime=function(e){var t=y(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=m,t.map=function(e,t,r){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=t.call(r,e[o],o,e));return n},t.querystring=function(e){for(var t=[],r=function(e,r){Array.isArray(r)?r.forEach(function(r){t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))},n=0,o=Object.entries(e);n<o.length;n++){var i=o[n];r(i[0],i[1])}return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var r=e.split("=");t[r[0]]=r[1]}}),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t++:n<2048?t+=2:n>=55296&&n<=56319?(t+=4,r++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);if(o>=55296&&o<=56319){var a=o-55296;i(++n<e.length,"Surrogate pair missing trail surrogate."),o=65536+(a<<10)+(e.charCodeAt(n)-56320)}o<128?t[r++]=o:o<2048?(t[r++]=o>>6|192,t[r++]=63&o|128):o<65536?(t[r++]=o>>12|224,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>18|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,r,n){var o;if(n<t?o="at least "+t:n>r&&(o=0===r?"none":"no more than "+r),o)throw new Error(e+" failed: Was called with "+n+(1===n?" argument.":" arguments.")+" Expects "+o+".")},t.validateCallback=function(e,t,r,n){if((!n||r)&&"function"!=typeof r)throw new Error(S(e,t,n)+"must be a valid function.")},t.validateContextObject=function(e,t,r,n){if((!n||r)&&("object"!=typeof r||null===r))throw new Error(S(e,t,n)+"must be a valid context object.")},t.validateIndexedDBOpenable=function(){return new Promise(function(e,t){try{var r=!0,n="validate-browser-context-for-indexeddb-analytics-module",o=window.indexedDB.open(n);o.onsuccess=function(){o.result.close(),r||window.indexedDB.deleteDatabase(n),e(!0)},o.onupgradeneeded=function(){r=!1},o.onerror=function(){var e;t((null===(e=o.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})},t.validateNamespace=function(e,t,r,n){if((!n||r)&&"string"!=typeof r)throw new Error(S(e,t,n)+"must be a valid firebase namespace.")}},923:(e,t,r)=>{"use strict";var n=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(r(752));n.default.registerVersion("firebase","7.24.0","app"),e.exports=n.default},567:(e,t,r)=>{"use strict";r.r(t);var n,o=r(752),i=r(730),a=r(655),s=r(313),u=r(676),c="w:0.4.17",l=((n={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',n["not-registered"]="Firebase Installation is not registered.",n["installation-not-found"]="Firebase Installation not found.",n["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',n["app-offline"]="Could not process request. Application offline.",n["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",n),d=new s.ErrorFactory("installations","Installations",l);function f(e){return e instanceof s.FirebaseError&&e.code.includes("request-failed")}function p(e){return"https://firebaseinstallations.googleapis.com/v1/projects/"+e.projectId+"/installations"}function h(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function g(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,t.json()];case 1:return r=o.sent(),n=r.error,[2,d.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})]}})})}function v(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function m(e,t){var r=t.refreshToken,n=v(e);return n.append("Authorization","FIS_v2 "+r),n}function y(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t;return(0,a.__generator)(this,function(r){switch(r.label){case 0:return[4,e()];case 1:return(t=r.sent()).status>=500&&t.status<600?[2,e()]:[2,t]}})})}function _(e){return new Promise(function(t){setTimeout(t,e)})}var w=/^[cdef][\w-]{21}$/;function b(e){return e.appName+"!"+e.appId}var S=new Map;function k(e,t){var r=b(e);x(r,t),function(e,t){var r=I();r&&r.postMessage({key:e,fid:t}),O()}(r,t)}function x(e,t){var r,n,o=S.get(e);if(o)try{for(var i=(0,a.__values)(o),s=i.next();!s.done;s=i.next())(0,s.value)(t)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}var E=null;function I(){return!E&&"BroadcastChannel"in self&&((E=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){x(e.data.key,e.data.fid)}),E}function O(){0===S.size&&E&&(E.close(),E=null)}var C,T,A="firebase-installations-store",D=null;function F(){return D||(D=(0,u.openDb)("firebase-installations-database",1,function(e){0===e.oldVersion&&e.createObjectStore(A)})),D}function N(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o,i,s;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return r=b(e),[4,F()];case 1:return n=a.sent(),o=n.transaction(A,"readwrite"),[4,(i=o.objectStore(A)).get(r)];case 2:return s=a.sent(),[4,i.put(t,r)];case 3:return a.sent(),[4,o.complete];case 4:return a.sent(),s&&s.fid===t.fid||k(e,t.fid),[2,t]}})})}function P(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return t=b(e),[4,F()];case 1:return r=o.sent(),[4,(n=r.transaction(A,"readwrite")).objectStore(A).delete(t)];case 2:return o.sent(),[4,n.complete];case 3:return o.sent(),[2]}})})}function L(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o,i,s,u;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return r=b(e),[4,F()];case 1:return n=a.sent(),o=n.transaction(A,"readwrite"),[4,(i=o.objectStore(A)).get(r)];case 2:return s=a.sent(),void 0!==(u=t(s))?[3,4]:[4,i.delete(r)];case 3:return a.sent(),[3,6];case 4:return[4,i.put(u,r)];case 5:a.sent(),a.label=6;case 6:return[4,o.complete];case 7:return a.sent(),!u||s&&s.fid===u.fid||k(e,u.fid),[2,u]}})})}function j(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,L(e,function(r){var n=R(r||{fid:function(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return(t=e,btoa(String.fromCharCode.apply(String,(0,a.__spread)(t))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}(e);return w.test(t)?t:""}catch(e){return""}}(),registrationStatus:0}),o=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(d.create("app-offline"))};var r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,7]),[4,function(e,t){var r=t.fid;return(0,a.__awaiter)(this,void 0,void 0,function(){var t,n,o,i,s,u;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return t=p(e),n=v(e),o={fid:r,authVersion:"FIS_v2",appId:e.appId,sdkVersion:c},i={method:"POST",headers:n,body:JSON.stringify(o)},[4,y(function(){return fetch(t,i)})];case 1:return(s=a.sent()).ok?[4,s.json()]:[3,3];case 2:return[2,{fid:(u=a.sent()).fid||r,registrationStatus:2,refreshToken:u.refreshToken,authToken:h(u.authToken)}];case 3:return[4,g("Create Installation",s)];case 4:throw a.sent()}})})}(e,t)];case 1:return r=o.sent(),[2,N(e,r)];case 2:return f(n=o.sent())&&409===n.serverCode?[4,P(e)]:[3,4];case 3:return o.sent(),[3,6];case 4:return[4,N(e,{fid:t.fid,registrationStatus:0})];case 5:o.sent(),o.label=6;case 6:throw n;case 7:return[2]}})})}(e,r);return{installationEntry:r,registrationPromise:n}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n,o;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return[4,M(e)];case 1:t=i.sent(),i.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,_(100)];case 3:return i.sent(),[4,M(e)];case 4:return t=i.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,j(e)];case 6:return r=i.sent(),n=r.installationEntry,(o=r.registrationPromise)?[2,o]:[2,n];case 7:return[2,t]}})})}(e)}:{installationEntry:t}}(e,n);return t=o.registrationPromise,o.installationEntry})];case 1:return""!==(r=o.sent()).fid?[3,3]:(n={},[4,t]);case 2:return[2,(n.installationEntry=o.sent(),n)];case 3:return[2,{installationEntry:r,registrationPromise:t}]}})})}function M(e){return L(e,function(e){if(!e)throw d.create("installation-not-found");return R(e)})}function R(e){return 1===(t=e).registrationStatus&&t.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function B(e,t){return void 0===t&&(t=!1),(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return[4,L(e.appConfig,function(n){if(!U(n))throw d.create("not-registered");var o,i=n.authToken;if(!t&&2===(o=i).requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(o))return n;if(1===i.requestStatus)return r=function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,V(e.appConfig)];case 1:r=o.sent(),o.label=2;case 2:return 1!==r.authToken.requestStatus?[3,5]:[4,_(100)];case 3:return o.sent(),[4,V(e.appConfig)];case 4:return r=o.sent(),[3,2];case 5:return 0===(n=r.authToken).requestStatus?[2,B(e,t)]:[2,n]}})})}(e,t),n;if(!navigator.onLine)throw d.create("app-offline");var s=function(e){var t={requestStatus:1,requestTime:Date.now()};return(0,a.__assign)((0,a.__assign)({},e),{authToken:t})}(n);return r=function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,8]),[4,function(e,t){var r=e.appConfig,n=e.platformLoggerProvider;return(0,a.__awaiter)(this,void 0,void 0,function(){var e,o,i,s,u,l;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return e=function(e,t){var r=t.fid;return p(e)+"/"+r+"/authTokens:generate"}(r,t),o=m(r,t),(i=n.getImmediate({optional:!0}))&&o.append("x-firebase-client",i.getPlatformInfoString()),s={installation:{sdkVersion:c}},u={method:"POST",headers:o,body:JSON.stringify(s)},[4,y(function(){return fetch(e,u)})];case 1:return(l=a.sent()).ok?[4,l.json()]:[3,3];case 2:return[2,h(a.sent())];case 3:return[4,g("Generate Auth Token",l)];case 4:throw a.sent()}})})}(e,t)];case 1:return r=i.sent(),o=(0,a.__assign)((0,a.__assign)({},t),{authToken:r}),[4,N(e.appConfig,o)];case 2:return i.sent(),[2,r];case 3:return!f(n=i.sent())||401!==n.serverCode&&404!==n.serverCode?[3,5]:[4,P(e.appConfig)];case 4:return i.sent(),[3,7];case 5:return o=(0,a.__assign)((0,a.__assign)({},t),{authToken:{requestStatus:0}}),[4,N(e.appConfig,o)];case 6:i.sent(),i.label=7;case 7:throw n;case 8:return[2]}})})}(e,s),s})];case 1:return n=i.sent(),r?[4,r]:[3,3];case 2:return o=i.sent(),[3,4];case 3:o=n.authToken,i.label=4;case 4:return[2,o]}})})}function V(e){return L(e,function(e){if(!U(e))throw d.create("not-registered");var t;return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?(0,a.__assign)((0,a.__assign)({},e),{authToken:{requestStatus:0}}):e})}function U(e){return void 0!==e&&2===e.registrationStatus}function q(e){return d.create("missing-app-config-values",{valueName:e})}(C=o.default).INTERNAL.registerComponent(new i.Component("installations",function(e){var t=e.getProvider("app").getImmediate(),r={appConfig:function(e){var t,r;if(!e||!e.options)throw q("App Configuration");if(!e.name)throw q("App Name");try{for(var n=(0,a.__values)(["projectId","apiKey","appId"]),o=n.next();!o.done;o=n.next()){var i=o.value;if(!e.options[i])throw q(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:e.getProvider("platform-logger")};return{app:t,getId:function(){return function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,j(e.appConfig)];case 1:return t=o.sent(),r=t.installationEntry,(n=t.registrationPromise)?n.catch(console.error):B(e).catch(console.error),[2,r.fid]}})})}(r)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(r){switch(r.label){case 0:return[4,function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t;return(0,a.__generator)(this,function(r){switch(r.label){case 0:return[4,j(e)];case 1:return(t=r.sent().registrationPromise)?[4,t]:[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}})})}(e.appConfig)];case 1:return r.sent(),[4,B(e,t)];case 2:return[2,r.sent().token]}})})}(r,e)},delete:function(){return function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return[4,L(t=e.appConfig,function(e){if(!e||0!==e.registrationStatus)return e})];case 1:if(!(r=n.sent()))return[3,6];if(1!==r.registrationStatus)return[3,2];throw d.create("delete-pending-registration");case 2:if(2!==r.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw d.create("app-offline");case 3:return[4,function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o,i;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return r=function(e,t){var r=t.fid;return p(e)+"/"+r}(e,t),n=m(e,t),o={method:"DELETE",headers:n},[4,y(function(){return fetch(r,o)})];case 1:return(i=a.sent()).ok?[3,3]:[4,g("Delete Installation",i)];case 2:throw a.sent();case 3:return[2]}})})}(t,r)];case 4:return n.sent(),[4,P(t)];case 5:n.sent(),n.label=6;case 6:return[2]}})})}(r)},onIdChange:function(e){return function(e,t){I();var r=b(e),n=S.get(r);n||(n=new Set,S.set(r,n)),n.add(t)}(n=r.appConfig,t=e),function(){!function(e,t){var r=b(e),n=S.get(r);n&&(n.delete(t),0===n.size&&S.delete(r),O())}(n,t)};var t,n}}},"PUBLIC")),C.registerVersion("@firebase/installations","0.4.17");var K,H=((T={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',T["only-available-in-window"]="This method is available in a Window context.",T["only-available-in-sw"]="This method is available in a service worker context.",T["permission-default"]="The notification permission was not granted and dismissed instead.",T["permission-blocked"]="The notification permission was not granted and blocked instead.",T["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",T["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",T["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",T["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",T["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",T["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",T["token-update-no-token"]="FCM returned no token when updating the user to push.",T["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",T["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",T["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",T["invalid-vapid-key"]="The public VAPID key must be a string.",T["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",T),z=new s.ErrorFactory("messaging","Messaging",H),W="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";function G(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,(0,a.__spread)(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(K||(K={}));var J="fcm_token_details_db",$="fcm_token_object_Store";var X="firebase-messaging-store",Z=null;function Y(){return Z||(Z=(0,u.openDb)("firebase-messaging-database",1,function(e){0===e.oldVersion&&e.createObjectStore(X)})),Z}function Q(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return t=te(e),[4,Y()];case 1:return[4,o.sent().transaction(X).objectStore(X).get(t)];case 2:return(r=o.sent())?[2,r]:[3,3];case 3:return[4,function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r=this;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(!n.sent().map(function(e){return e.name}).includes(J))return[2,null];n.label=2;case 2:return t=null,[4,(0,u.openDb)(J,5,function(n){return(0,a.__awaiter)(r,void 0,void 0,function(){var r,o,i,s;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return n.oldVersion<2?[2]:n.objectStoreNames.contains($)?[4,(r=n.transaction.objectStore($)).index("fcmSenderId").get(e)]:[2];case 1:return o=a.sent(),[4,r.clear()];case 2:if(a.sent(),!o)return[2];if(2===n.oldVersion){if(!(i=o).auth||!i.p256dh||!i.endpoint)return[2];t={token:i.fcmToken,createTime:null!==(s=i.createTime)&&void 0!==s?s:Date.now(),subscriptionOptions:{auth:i.auth,p256dh:i.p256dh,endpoint:i.endpoint,swScope:i.swScope,vapidKey:"string"==typeof i.vapidKey?i.vapidKey:G(i.vapidKey)}}}else(3===n.oldVersion||4===n.oldVersion)&&(t={token:(i=o).fcmToken,createTime:i.createTime,subscriptionOptions:{auth:G(i.auth),p256dh:G(i.p256dh),endpoint:i.endpoint,swScope:i.swScope,vapidKey:G(i.vapidKey)}});return[2]}})})})];case 3:return n.sent().close(),[4,(0,u.deleteDb)(J)];case 4:return n.sent(),[4,(0,u.deleteDb)("fcm_vapid_details_db")];case 5:return n.sent(),[4,(0,u.deleteDb)("undefined")];case 6:return n.sent(),[2,function(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null]}})})}(e.appConfig.senderId)];case 4:return(n=o.sent())?[4,ee(e,n)]:[3,6];case 5:return o.sent(),[2,n];case 6:return[2]}})})}function ee(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return r=te(e),[4,Y()];case 1:return n=i.sent(),[4,(o=n.transaction(X,"readwrite")).objectStore(X).put(t,r)];case 2:return i.sent(),[4,o.complete];case 3:return i.sent(),[2,t]}})})}function te(e){return e.appConfig.appId}function re(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o,i,s;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return[4,oe(e)];case 1:r=a.sent(),n={method:"DELETE",headers:r},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(ne(e.appConfig)+"/"+t,n)];case 3:return[4,a.sent().json()];case 4:if((o=a.sent()).error)throw i=o.error.message,z.create("token-unsubscribe-failed",{errorInfo:i});return[3,6];case 5:throw s=a.sent(),z.create("token-unsubscribe-failed",{errorInfo:s});case 6:return[2]}})})}function ne(e){return"https://fcmregistrations.googleapis.com/v1/projects/"+e.projectId+"/registrations"}function oe(e){var t=e.appConfig,r=e.installations;return(0,a.__awaiter)(this,void 0,void 0,function(){var e;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return[4,r.getToken()];case 1:return e=n.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}})})}function ie(e){var t=e.p256dh,r=e.auth,n=e.endpoint,o=e.vapidKey,i={web:{endpoint:n,auth:r,p256dh:t}};return o!==W&&(i.web.applicationPubKey=o),i}function ae(e,t,r){return(0,a.__awaiter)(this,void 0,void 0,function(){var n,o,i,s;return(0,a.__generator)(this,function(a){switch(a.label){case 0:if("granted"!==Notification.permission)throw z.create("permission-blocked");return[4,le(t,r)];case 1:return n=a.sent(),[4,Q(e)];case 2:return o=a.sent(),i={vapidKey:r,swScope:t.scope,endpoint:n.endpoint,auth:G(n.getKey("auth")),p256dh:G(n.getKey("p256dh"))},o?[3,3]:[2,ce(e,i)];case 3:if(u=o.subscriptionOptions,l=(c=i).vapidKey===u.vapidKey,d=c.endpoint===u.endpoint,f=c.auth===u.auth,p=c.p256dh===u.p256dh,l&&d&&f&&p)return[3,8];a.label=4;case 4:return a.trys.push([4,6,,7]),[4,re(e,o.token)];case 5:return a.sent(),[3,7];case 6:return s=a.sent(),console.warn(s),[3,7];case 7:return[2,ce(e,i)];case 8:return Date.now()>=o.createTime+6048e5?[2,ue({token:o.token,createTime:Date.now(),subscriptionOptions:i},e,t)]:[2,o.token];case 9:return[2]}var u,c,l,d,f,p})})}function se(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,Q(e)];case 1:return(r=o.sent())?[4,re(e,r.token)]:[3,4];case 2:return o.sent(),[4,function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return t=te(e),[4,Y()];case 1:return r=o.sent(),[4,(n=r.transaction(X,"readwrite")).objectStore(X).delete(t)];case 2:return o.sent(),[4,n.complete];case 3:return o.sent(),[2]}})})}(e)];case 3:o.sent(),o.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return(n=o.sent())?[2,n.unsubscribe()]:[2,!0]}})})}function ue(e,t,r){return(0,a.__awaiter)(this,void 0,void 0,function(){var n,o,i;return(0,a.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,5]),[4,function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o,i,s,u;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return[4,oe(e)];case 1:r=a.sent(),n=ie(t.subscriptionOptions),o={method:"PATCH",headers:r,body:JSON.stringify(n)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(ne(e.appConfig)+"/"+t.token,o)];case 3:return[4,a.sent().json()];case 4:return i=a.sent(),[3,6];case 5:throw s=a.sent(),z.create("token-update-failed",{errorInfo:s});case 6:if(i.error)throw u=i.error.message,z.create("token-update-failed",{errorInfo:u});if(!i.token)throw z.create("token-update-no-token");return[2,i.token]}})})}(t,e)];case 1:return n=s.sent(),o=(0,a.__assign)((0,a.__assign)({},e),{token:n,createTime:Date.now()}),[4,ee(t,o)];case 2:return s.sent(),[2,n];case 3:return i=s.sent(),[4,se(t,r)];case 4:throw s.sent(),i;case 5:return[2]}})})}function ce(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return[4,function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r,n,o,i,s,u;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return[4,oe(e)];case 1:r=a.sent(),n=ie(t),o={method:"POST",headers:r,body:JSON.stringify(n)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(ne(e.appConfig),o)];case 3:return[4,a.sent().json()];case 4:return i=a.sent(),[3,6];case 5:throw s=a.sent(),z.create("token-subscribe-failed",{errorInfo:s});case 6:if(i.error)throw u=i.error.message,z.create("token-subscribe-failed",{errorInfo:u});if(!i.token)throw z.create("token-subscribe-no-token");return[2,i.token]}})})}(e,t)];case 1:return r=o.sent(),n={token:r,createTime:Date.now(),subscriptionOptions:t},[4,ee(e,n)];case 2:return o.sent(),[2,n.token]}})})}function le(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return(r=n.sent())?[2,r]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(t),n=new Uint8Array(r.length),o=0;o<r.length;++o)n[o]=r.charCodeAt(o);return n}(t)})]}})})}function de(e){return"object"==typeof e&&!!e&&"google.c.a.c_id"in e}var fe=function(){function e(e){var t=this;this.firebaseDependencies=e,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",function(e){e.waitUntil(t.onPush(e))}),self.addEventListener("pushsubscriptionchange",function(e){e.waitUntil(t.onSubChange(e))}),self.addEventListener("notificationclick",function(e){e.waitUntil(t.onNotificationClick(e))})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(e){if(this.isOnBackgroundMessageUsed=!1,!e||"function"!=typeof e)throw z.create("invalid-bg-handler");this.bgMessageHandler=e},e.prototype.onBackgroundMessage=function(e){var t=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=e,function(){t.bgMessageHandler=null}},e.prototype.getToken=function(){var e,t;return(0,a.__awaiter)(this,void 0,void 0,function(){var r;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return this.vapidKey?[3,2]:[4,Q(this.firebaseDependencies)];case 1:r=n.sent(),this.vapidKey=null!==(t=null===(e=null==r?void 0:r.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:W,n.label=2;case 2:return[2,ae(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},e.prototype.deleteToken=function(){return se(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw z.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw z.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw z.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(){throw z.create("only-available-in-window")},e.prototype.onMessage=function(){throw z.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw z.create("only-available-in-window")},e.prototype.onPush=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n,o;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return(t=function(e){var t=e.data;if(!t)return null;try{return t.json()}catch(e){return null}}(e))?[4,he()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return(r=i.sent()).some(function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")})?[2,function(e,t){var r,n;t.isFirebaseMessaging=!0,t.messageType=K.PUSH_RECEIVED;try{for(var o=(0,a.__values)(e),i=o.next();!i.done;i=o.next())i.value.postMessage(t)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}(r,t)]:(n=!1,t.notification?[4,function(e){var t,r=e.actions,n=Notification.maxActions;return r&&n&&r.length>n&&console.warn("This browser only supports "+n+" actions. The remaining actions will not be displayed."),self.registration.showNotification(null!==(t=e.title)&&void 0!==t?t:"",e)}(function(e){var t,r=(0,a.__assign)({},e.notification);return r.data=((t={}).FCM_MSG=e,t),r}(t))]:[3,3]);case 2:i.sent(),n=!0,i.label=3;case 3:return!0===n&&!1===this.isOnBackgroundMessageUsed||this.bgMessageHandler&&(o=function(e){var t={from:e.from,collapseKey:e.collapse_key};return function(e,t){if(t.notification){e.notification={};var r=t.notification.title;r&&(e.notification.title=r);var n=t.notification.body;n&&(e.notification.body=n);var o=t.notification.image;o&&(e.notification.image=o)}}(t,e),function(e,t){t.data&&(e.data=t.data)}(t,e),function(e,t){if(t.fcmOptions){e.fcmOptions={};var r=t.fcmOptions.link;r&&(e.fcmOptions.link=r);var n=t.fcmOptions.analytics_label;n&&(e.fcmOptions.analyticsLabel=n)}}(t,e),t}(t),"function"==typeof this.bgMessageHandler?this.bgMessageHandler(o):this.bgMessageHandler.next(o)),[2]}})})},e.prototype.onSubChange=function(e){var t,r;return(0,a.__awaiter)(this,void 0,void 0,function(){var n;return(0,a.__generator)(this,function(o){switch(o.label){case 0:return e.newSubscription?[3,2]:[4,se(this.firebaseDependencies,self.registration)];case 1:case 5:return o.sent(),[2];case 2:return[4,Q(this.firebaseDependencies)];case 3:return n=o.sent(),[4,se(this.firebaseDependencies,self.registration)];case 4:return o.sent(),[4,ae(this.firebaseDependencies,self.registration,null!==(r=null===(t=null==n?void 0:n.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==r?r:W)]}})})},e.prototype.onNotificationClick=function(e){var t,r;return(0,a.__awaiter)(this,void 0,void 0,function(){var n,o,i,s,u;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return(n=null===(r=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===r?void 0:r.FCM_MSG)?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(o=function(e){var t,r,n;return(null!==(r=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==r?r:null===(n=e.notification)||void 0===n?void 0:n.click_action)||(de(e.data)?self.location.origin:null)}(n))?(i=new URL(o,self.location.href),s=new URL(self.location.origin),i.host!==s.host?[2]:[4,pe(i)]):[2]):[2];case 1:return(u=a.sent())?[3,4]:[4,self.clients.openWindow(o)];case 2:return u=a.sent(),[4,new Promise(function(e){setTimeout(e,3e3)})];case 3:return a.sent(),[3,6];case 4:return[4,u.focus()];case 5:u=a.sent(),a.label=6;case 6:return u?(n.messageType=K.NOTIFICATION_CLICKED,n.isFirebaseMessaging=!0,[2,u.postMessage(n)]):[2]}})})},e}();function pe(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,n,o,i,s,u;return(0,a.__generator)(this,function(c){switch(c.label){case 0:return[4,he()];case 1:t=c.sent();try{for(r=(0,a.__values)(t),n=r.next();!n.done;n=r.next())if(o=n.value,i=new URL(o.url,self.location.href),e.host===i.host)return[2,o]}catch(e){s={error:e}}finally{try{n&&!n.done&&(u=r.return)&&u.call(r)}finally{if(s)throw s.error}}return[2,null]}})})}function he(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}var ge=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(e){return t.messageEventListener(e)})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.messageEventListener=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return(t=e.data).isFirebaseMessaging?(this.onMessageCallback&&t.messageType===K.PUSH_RECEIVED&&("function"==typeof this.onMessageCallback?this.onMessageCallback(function(e){return delete e.messageType,delete e.isFirebaseMessaging,e}(Object.assign({},t))):this.onMessageCallback.next(Object.assign({},t))),de(r=t.data)&&"1"===r["google.c.a.e"]?[4,this.logEvent(t.messageType,r)]:[3,2]):[2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.getVapidKey=function(){return this.vapidKey},e.prototype.getSwReg=function(){return this.swRegistration},e.prototype.getToken=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(t){switch(t.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:t.sent(),t.label=2;case 2:if("granted"!==Notification.permission)throw z.create("permission-blocked");return[4,this.updateVapidKey(null==e?void 0:e.vapidKey)];case 3:return t.sent(),[4,this.updateSwReg(null==e?void 0:e.serviceWorkerRegistration)];case 4:return t.sent(),[2,ae(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}})})},e.prototype.updateVapidKey=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(t){return e?this.vapidKey=e:this.vapidKey||(this.vapidKey=W),[2]})})},e.prototype.updateSwReg=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(t){switch(t.label){case 0:return e||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:if(!e&&this.swRegistration)return[2];if(!(e instanceof ServiceWorkerRegistration))throw z.create("invalid-sw-registration");return this.swRegistration=e,[2]}})})},e.prototype.registerDefaultSw=function(){return(0,a.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,a.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return e.swRegistration=r.sent(),this.swRegistration.update().catch(function(){}),[3,3];case 2:throw t=r.sent(),z.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 3:return[2]}})})},e.prototype.deleteToken=function(){return(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(e){switch(e.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:return[2,se(this.firebaseDependencies,this.swRegistration)]}})})},e.prototype.requestPermission=function(){return(0,a.__awaiter)(this,void 0,void 0,function(){var e;return(0,a.__generator)(this,function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?z.create("permission-blocked"):z.create("permission-default")}})})},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw z.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw z.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw z.create("invalid-sw-registration");if(this.swRegistration)throw z.create("use-sw-after-get-token");this.swRegistration=e},e.prototype.onMessage=function(e){var t=this;return this.onMessageCallback=e,function(){t.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw z.create("only-available-in-sw")},e.prototype.onBackgroundMessage=function(){throw z.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.logEvent=function(e,t){return(0,a.__awaiter)(this,void 0,void 0,function(){var r;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return r=function(e){switch(e){case K.NOTIFICATION_CLICKED:return"notification_open";case K.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return n.sent().logEvent(r,{message_id:t["google.c.a.c_id"],message_name:t["google.c.a.c_l"],message_time:t["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},e}();function ve(e){return z.create("missing-app-config-values",{valueName:e})}var me={isSupported:ye};function ye(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}o.default.INTERNAL.registerComponent(new i.Component("messaging",function(e){var t=e.getProvider("app").getImmediate(),r=function(e){var t,r;if(!e||!e.options)throw ve("App Configuration Object");if(!e.name)throw ve("App Name");var n=e.options;try{for(var o=(0,a.__values)(["projectId","apiKey","appId","messagingSenderId"]),i=o.next();!i.done;i=o.next()){var s=i.value;if(!n[s])throw ve(s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(t),n={app:t,appConfig:r,installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!ye())throw z.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new fe(n):new ge(n)},"PUBLIC").setServiceProps(me))},676:function(e,t){!function(e){"use strict";function t(e){return new Promise(function(t,r){e.onsuccess=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function r(e,r,n){var o,i=new Promise(function(i,a){t(o=e[r].apply(e,n)).then(i,a)});return i.request=o,i}function n(e,t,n){var o=r(e,t,n);return o.then(function(e){if(e)return new c(e,o.request)})}function o(e,t,r){r.forEach(function(r){Object.defineProperty(e.prototype,r,{get:function(){return this[t][r]},set:function(e){this[t][r]=e}})})}function i(e,t,n,o){o.forEach(function(o){o in n.prototype&&(e.prototype[o]=function(){return r(this[t],o,arguments)})})}function a(e,t,r,n){n.forEach(function(n){n in r.prototype&&(e.prototype[n]=function(){return this[t][n].apply(this[t],arguments)})})}function s(e,t,r,o){o.forEach(function(o){o in r.prototype&&(e.prototype[o]=function(){return n(this[t],o,arguments)})})}function u(e){this._index=e}function c(e,t){this._cursor=e,this._request=t}function l(e){this._store=e}function d(e){this._tx=e,this.complete=new Promise(function(t,r){e.oncomplete=function(){t()},e.onerror=function(){r(e.error)},e.onabort=function(){r(e.error)}})}function f(e,t,r){this._db=e,this.oldVersion=t,this.transaction=new d(r)}function p(e){this._db=e}o(u,"_index",["name","keyPath","multiEntry","unique"]),i(u,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),s(u,"_index",IDBIndex,["openCursor","openKeyCursor"]),o(c,"_cursor",["direction","key","primaryKey","value"]),i(c,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(e){e in IDBCursor.prototype&&(c.prototype[e]=function(){var r=this,n=arguments;return Promise.resolve().then(function(){return r._cursor[e].apply(r._cursor,n),t(r._request).then(function(e){if(e)return new c(e,r._request)})})})}),l.prototype.createIndex=function(){return new u(this._store.createIndex.apply(this._store,arguments))},l.prototype.index=function(){return new u(this._store.index.apply(this._store,arguments))},o(l,"_store",["name","keyPath","indexNames","autoIncrement"]),i(l,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),s(l,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),a(l,"_store",IDBObjectStore,["deleteIndex"]),d.prototype.objectStore=function(){return new l(this._tx.objectStore.apply(this._tx,arguments))},o(d,"_tx",["objectStoreNames","mode"]),a(d,"_tx",IDBTransaction,["abort"]),f.prototype.createObjectStore=function(){return new l(this._db.createObjectStore.apply(this._db,arguments))},o(f,"_db",["name","version","objectStoreNames"]),a(f,"_db",IDBDatabase,["deleteObjectStore","close"]),p.prototype.transaction=function(){return new d(this._db.transaction.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),a(p,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(e){[l,u].forEach(function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t=function(e){return Array.prototype.slice.call(e)}(arguments),r=t[t.length-1],n=this._store||this._index,o=n[e].apply(n,t.slice(0,-1));o.onsuccess=function(){r(o.result)}})})}),[u,l].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var r=this,n=[];return new Promise(function(o){r.iterateCursor(e,function(e){e?(n.push(e.value),void 0===t||n.length!=t?e.continue():o(n)):o(n)})})})}),e.openDb=function(e,t,n){var o=r(indexedDB,"open",[e,t]),i=o.request;return i&&(i.onupgradeneeded=function(e){n&&n(new f(i.result,e.oldVersion,i.transaction))}),o.then(function(e){return new p(e)})},e.deleteDb=function(e){return r(indexedDB,"deleteDatabase",[e])},Object.defineProperty(e,"__esModule",{value:!0})}(t)},655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>(function(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:s(e[n](t)),done:"return"===n}:o?o(t):t}:o}}),__asyncGenerator:()=>(function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||u(e,t)})})}function u(e,t){try{(r=o[e](t)).value instanceof s?Promise.resolve(r.value.v).then(c,l):d(i[0][2],r)}catch(e){d(i[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function d(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}),__asyncValues:()=>(function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=i(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}),__await:()=>s,__awaiter:()=>(function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}),__classPrivateFieldGet:()=>(function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}),__classPrivateFieldSet:()=>(function(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}),__createBinding:()=>(function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__decorate:()=>(function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}),__exportStar:()=>(function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}),__extends:()=>(function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),__generator:()=>(function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}),__importDefault:()=>(function(e){return e&&e.__esModule?e:{default:e}}),__importStar:()=>(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}),__makeTemplateObject:()=>(function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),__metadata:()=>(function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),__param:()=>(function(e,t){return function(r,n){t(r,n,e)}}),__read:()=>a,__rest:()=>(function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}),__spread:()=>(function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}),__spreadArrays:()=>(function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}),__values:()=>i});var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function s(e){return this instanceof s?(this.v=e,this):new s(e)}},61:(e,t,r)=>{var n=r(698).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),s=new O(n||[]);return a(i,"_invoke",{value:function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=p(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function g(){}function v(){}function m(){}var y={};d(y,u,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(C([])));w&&w!==r&&i.call(w,u)&&(y=w);var b=m.prototype=g.prototype=Object.create(y);function S(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function k(e,t){function r(o,a,s,u){var c=p(e[o],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==n(d)&&i.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,s,u)},function(e){r("throw",e,s,u)}):t.resolve(d).then(function(e){l.value=e,s(l)},function(e){return r("throw",e,s,u)})}u(c.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,o){r(e,n,t,o)})}return o=o?o.then(i,i):i()}})}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:T}}function T(){return{value:void 0,done:!0}}return v.prototype=m,a(b,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:v,configurable:!0}),v.displayName=d(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,d(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},S(k.prototype),d(k.prototype,c,function(){return this}),t.AsyncIterator=k,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(b),d(b,l,"Generator"),d(b,u,function(){return this}),d(b,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=(e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}),r.d=((e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),r.r=(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}),(()=>{"use strict";function e(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function s(t){e(a,o,i,s,u,"next",t)}function u(t){e(a,o,i,s,u,"throw",t)}s(void 0)})}}var n=r(687),o=r.n(n);function i(e){return(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})(e)}!function(e,t){var r="http"+("https:"===t.location.protocol?"s":"")+"://",n="logglytrackingsession",o=n.length+1;function a(){this.key=!1,this.sendConsoleErrors=!1,this.tag="jslogger",this.useDomainProxy=!1,this.useUtfEncoding=!1}function s(t){1==t.useDomainProxy?t.inputUrl=r+e.location.host+"/loggly/inputs/"+t.key+"/tag/"+t.tag:t.inputUrl=r+(t.logglyCollectorDomain||"logs-01.loggly.com")+"/inputs/"+t.key+"/tag/"+t.tag}a.prototype={setSession:function(e){e?(this.session_id=e,this.setCookie(this.session_id)):this.session_id||(this.session_id=this.readCookie(),this.session_id||(this.session_id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),this.setCookie(this.session_id)))},push:function(t){var r=i(t);if(t&&("object"===r||"string"===r)){var n,o,a,u,c,l,d,f,p=this;if("string"===r)t={text:t};else{if(t.logglyCollectorDomain)return void(p.logglyCollectorDomain=t.logglyCollectorDomain);if(void 0!==t.sendConsoleErrors&&function(t,r){if(t.sendConsoleErrors=r,!0===t.sendConsoleErrors){var n=e.onerror;e.onerror=function(r,o,i,a,s){t.push({category:"BrowserJsException",exception:{message:r,url:o,lineno:i,colno:a,stack:s?s.stack:"n/a"}}),n&&"function"==typeof n&&n.apply(e,arguments)}}}(p,t.sendConsoleErrors),t.tag&&(d=p,f=t.tag,d.tag=f),void 0!==t.useUtfEncoding&&(c=p,l=t.useUtfEncoding,c.useUtfEncoding=l),t.useDomainProxy&&(a=p,u=t.useDomainProxy,a.useDomainProxy=u,s(a)),t.logglyKey)return n=p,o=t.logglyKey,n.key=o,n.setSession(),void s(n);if(t.session_id)return void p.setSession(t.session_id)}p.key&&p.track(t)}},track:function(t){t.sessionId=this.session_id;try{var r=new XMLHttpRequest;r.open("POST",this.inputUrl,!0),!0===c.useUtfEncoding?r.setRequestHeader("Content-Type","text/plain; charset=utf-8"):r.setRequestHeader("Content-Type","text/plain"),r.send(JSON.stringify(t))}catch(r){e&&e.console&&"function"==typeof e.console.log&&(console.log("Failed to log to loggly because of this exception:\n"+r),console.log("Failed log data:",t))}},readCookie:function(){var e=t.cookie,r=e.indexOf(n);if(r<0)return!1;var i=e.indexOf(";",r+1);return i=i<0?e.length:i,e.slice(r+o,i)},setCookie:function(e){t.cookie=n+"="+e}};var u=e._LTracker,c=new a;if(u&&u.length){var l=0,d=u.length;for(l=0;l<d;l++)c.push(u[l])}e._LTracker=c,e.LogglyTracker=a}(window,document);var a=r(923);r(567);var s=new LogglyTracker;function u(){return c.apply(this,arguments)}function c(){return(c=t(o().mark(function e(){var r,n,i,u,c,l;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={apiKey:"AIzaSyAv7G04oyBZYqE_yAyku-rRQRXnsA1mLmw",authDomain:"webpush-prod.firebaseapp.com",projectId:"webpush-prod",storageBucket:"webpush-prod.appspot.com",messagingSenderId:"312459295826",appId:"1:312459295826:web:6d6650a797358aafe3f38b",measurementId:"G-FWD9J8MWD6"},n=a.initializeApp(r,"pushMessage"),(i=n.messaging()).usePublicVapidKey("BAdGdYm_SSlWJV0eXw36DDjDPhKYsa37R5WphjCA_Dm1kBo55XsVCn62jCE1RFAAXbzQGs0mG3hs9ZvXhVfTUpg"),u=function(e,t){try{_dha.savePushNotificationToken(e,t)}catch(e){s.push("Datahub script must be included first. Error: ".concat(e))}},c=function(){var e=t(o().mark(function e(t){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t===_dha.storage.getItem("_dha__push_deviceToken")){e.next=5;break}return e.next=3,fetch("".concat("https://apis.fromdoppler.com/doppler-push-contact","/push-contacts"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,deviceToken:t,visitorGuid:_dha.storage.getItem("_dha__uuid"),email:_dha.storage.getItem("_dha__em")||null})});case 3:e.sent.ok&&_dha.storage.setItem("_dha__push_deviceToken",t);case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.prev=6,e.next=9,i.requestPermission();case 9:return e.next=11,i.getToken();case 11:return l=e.sent,u(l,!1),e.next=15,c(l);case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),s.push("FCM blocked or not allowed: ".concat(JSON.stringify(e.t0)));case 20:i.onMessage(function(){}),i.onTokenRefresh(t(o().mark(function e(){var t;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.getToken();case 3:return t=e.sent,u(t,!0),e.next=7,c(t);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),s.push("Unable to retrieve refreshed token ".concat(e.t0));case 12:case"end":return e.stop()}},e,null,[[0,9]])})));case 22:case"end":return e.stop()}},e,null,[[6,17]])}))).apply(this,arguments)}s.push({logglyKey:"97cc20a4-a0dc-40b0-a74e-9643a9388202",sendConsoleErrors:!1,tag:"push-client-side-".concat("prod")});var l=function(){var e=t(o().mark(function e(){var t,r,n,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=document.location.hostname,r="".concat("https://apis.fromdoppler.com/doppler-push-contact","/domains/").concat(t,"/isPushFeatureEnabled"),e.next=5,fetch(r);case 5:if(404!==(n=e.sent).status){e.next=9;break}return s.push("Api push contact. Hostname ".concat(t," not found.")),e.abrupt("return",!1);case 9:return e.next=11,n.json();case 11:return i=e.sent,e.abrupt("return",i);case 15:return e.prev=15,e.t0=e.catch(0),s.push("Api push contact. Err: ".concat(JSON.stringify(e.t0))),e.abrupt("return",!1);case 19:case"end":return e.stop()}},e,null,[[0,15]])}));return function(){return e.apply(this,arguments)}}();t(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l();case 2:if(!e.sent){e.next=4;break}u();case 4:case"end":return e.stop()}},e)}))()})()})();