!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d348cc03-98f8-491e-a7f1-f639ca1ce9b3",e._sentryDebugIdIdentifier="sentry-dbid-d348cc03-98f8-491e-a7f1-f639ca1ce9b3")}catch(e){}}();var _sentryModuleMetadataGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_sentryModuleMetadataGlobal._sentryModuleMetadata=_sentryModuleMetadataGlobal._sentryModuleMetadata||{},_sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack]=Object.assign({},_sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack],{"_sentryBundlerPluginAppKey:pawshake-seo-application-key":!0}),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{30242:function(e,t,n){var r={"./da-DK/common":[99770,9770],"./da-DK/common.json":[99770,9770],"./da-DK/search":[56866,6866],"./da-DK/search.json":[56866,6866],"./da/common":[7682,7682],"./da/common.json":[7682,7682],"./da/search":[77901,7901],"./da/search.json":[77901,7901],"./de-AT/common":[47091,7091],"./de-AT/common.json":[47091,7091],"./de-AT/search":[10888,888],"./de-AT/search.json":[10888,888],"./de-BE/common":[41816,1816],"./de-BE/common.json":[41816,1816],"./de-BE/search":[36003,6003],"./de-BE/search.json":[36003,6003],"./de-CH/common":[51734,1734],"./de-CH/common.json":[51734,1734],"./de-CH/search":[83501,3501],"./de-CH/search.json":[83501,3501],"./de-DE/common":[4022,4022],"./de-DE/common.json":[4022,4022],"./de-DE/search":[42192,2192],"./de-DE/search.json":[42192,2192],"./de-LU/common":[21412,1412],"./de-LU/common.json":[21412,1412],"./de-LU/search":[68554,8554],"./de-LU/search.json":[68554,8554],"./de/common":[21545,1545],"./de/common.json":[21545,1545],"./de/search":[40304,3795],"./de/search.json":[40304,3795],"./en-AU/common":[49486,5108],"./en-AU/common.json":[49486,5108],"./en-AU/search":[54180,4180],"./en-AU/search.json":[54180,4180],"./en-BE/common":[42584,2584],"./en-BE/common.json":[42584,2584],"./en-BE/search":[11022,1022],"./en-BE/search.json":[11022,1022],"./en-CA/common":[20108,108],"./en-CA/common.json":[20108,108],"./en-CA/search":[70186,186],"./en-CA/search.json":[70186,186],"./en-DE/common":[9972,9972],"./en-DE/common.json":[9972,9972],"./en-DE/search":[93542,3542],"./en-DE/search.json":[93542,3542],"./en-FR/common":[69225,9225],"./en-FR/common.json":[69225,9225],"./en-FR/search":[87450,7450],"./en-FR/search.json":[87450,7450],"./en-GB/common":[48391,8391],"./en-GB/common.json":[48391,8391],"./en-GB/search":[86103,6103],"./en-GB/search.json":[86103,6103],"./en-HK/common":[12948,2948],"./en-HK/common.json":[12948,2948],"./en-HK/search":[63517,3517],"./en-HK/search.json":[63517,3517],"./en-IE/common":[39699,9699],"./en-IE/common.json":[39699,9699],"./en-IE/search":[20420,420],"./en-IE/search.json":[20420,420],"./en-JP/common":[16316,6316],"./en-JP/common.json":[16316,6316],"./en-JP/search":[26722,6722],"./en-JP/search.json":[26722,6722],"./en-LU/common":[17280,7280],"./en-LU/common.json":[17280,7280],"./en-LU/search":[96037,6037],"./en-LU/search.json":[96037,6037],"./en-NL/common":[38627,8627],"./en-NL/common.json":[38627,8627],"./en-NL/search":[64783,4783],"./en-NL/search.json":[64783,4783],"./en-NZ/common":[15730,5730],"./en-NZ/common.json":[15730,5730],"./en-NZ/search":[31985,4831],"./en-NZ/search.json":[31985,4831],"./en-SG/common":[49008,9008],"./en-SG/common.json":[49008,9008],"./en-SG/search":[54665,4665],"./en-SG/search.json":[54665,4665],"./en/common":[40464,464],"./en/common.json":[40464,464],"./en/search":[17842,7842],"./en/search.json":[17842,7842],"./fi-FI/common":[8038,8038],"./fi-FI/common.json":[8038,8038],"./fi-FI/search":[54518,4518],"./fi-FI/search.json":[54518,4518],"./fi/common":[8418,8418],"./fi/common.json":[8418,8418],"./fi/search":[91227,1227],"./fi/search.json":[91227,1227],"./fr-BE/common":[24153,4153],"./fr-BE/common.json":[24153,4153],"./fr-BE/search":[70316,316],"./fr-BE/search.json":[70316,316],"./fr-CA/common":[902,902],"./fr-CA/common.json":[902,902],"./fr-CA/search":[71301,1301],"./fr-CA/search.json":[71301,1301],"./fr-CH/common":[9292,9292],"./fr-CH/common.json":[9292,9292],"./fr-CH/search":[24388,4388],"./fr-CH/search.json":[24388,4388],"./fr-FR/common":[48255,8255],"./fr-FR/common.json":[48255,8255],"./fr-FR/search":[88322,8322],"./fr-FR/search.json":[88322,8322],"./fr-LU/common":[44768,4768],"./fr-LU/common.json":[44768,4768],"./fr-LU/search":[28942,8942],"./fr-LU/search.json":[28942,8942],"./fr/common":[45167,5167],"./fr/common.json":[45167,5167],"./fr/search":[77194,7194],"./fr/search.json":[77194,7194],"./it-CH/common":[52304,2304],"./it-CH/common.json":[52304,2304],"./it-CH/search":[39296,9296],"./it-CH/search.json":[39296,9296],"./it-IT/common":[16548,6548],"./it-IT/common.json":[16548,6548],"./it-IT/search":[81005,1005],"./it-IT/search.json":[81005,1005],"./it/common":[9486,9486],"./it/common.json":[9486,9486],"./it/search":[5175,5175],"./it/search.json":[5175,5175],"./nl-BE/common":[18395,8395],"./nl-BE/common.json":[18395,8395],"./nl-BE/search":[46064,6064],"./nl-BE/search.json":[46064,6064],"./nl-NL/common":[19668,9668],"./nl-NL/common.json":[19668,9668],"./nl-NL/search":[22487,2487],"./nl-NL/search.json":[22487,2487],"./nl/common":[1211,1211],"./nl/common.json":[1211,1211],"./nl/search":[10308,308],"./nl/search.json":[10308,308],"./no-NO/common":[9923,9923],"./no-NO/common.json":[9923,9923],"./no-NO/search":[94153,6868],"./no-NO/search.json":[94153,6868],"./no/common":[70399,399],"./no/common.json":[70399,399],"./no/search":[88304,8304],"./no/search.json":[88304,8304],"./sv-SE/common":[72277,2277],"./sv-SE/common.json":[72277,2277],"./sv-SE/search":[79131,9131],"./sv-SE/search.json":[79131,9131],"./sv/common":[56504,6504],"./sv/common.json":[56504,6504],"./sv/search":[1085,1085],"./sv/search.json":[1085,1085]};function i(e){if(!n.o(r,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=r[e],i=t[0];return n.e(t[1]).then(function(){return n.t(i,19)})}i.keys=function(){return Object.keys(r)},i.id=30242,e.exports=i},16575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Breakpoints=t.BreakpointConstraint=void 0;var r,i,a=n(54536);function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return a}}(e,t)||u(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.BreakpointConstraint=i,(r=i||(t.BreakpointConstraint=i={})).at="at",r.lessThan="lessThan",r.greaterThan="greaterThan",r.greaterThanOrEqual="greaterThanOrEqual",r.between="between";var f=function(){function e(t){var n,r=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),h(this,"_sortedBreakpoints",void 0),h(this,"_breakpoints",void 0),h(this,"_mediaQueries",void 0),h(this,"findBreakpointsForWidths",function(e,t){var n=r.findBreakpointAtWidth(e);if(n){var i=r.findBreakpointAtWidth(t);return i&&n!==i?r._sortedBreakpoints.slice(r._sortedBreakpoints.indexOf(n),r._sortedBreakpoints.indexOf(i)+1):[n]}}),h(this,"findBreakpointAtWidth",function(e){return r._sortedBreakpoints.find(function(t,n){var i=r._sortedBreakpoints[n+1];return i?e>=r._breakpoints[t]&&e<r._breakpoints[i]:e>=r._breakpoints[t]})}),h(this,"valuesWithBreakpointProps",function(e){var t,n=e.length,i=[];return r._sortedBreakpoints.forEach(function(r,a){var s=e[a];a<n&&(!t||t[0]!==s)?(t=[s,[r]],i.push(t)):t[1].push(r)}),i.map(function(e,t){var n=o(e,2),r=n[0],a=n[1],s={};return t===i.length-1?s.greaterThanOrEqual=a[0]:1===a.length?s.at=a[0]:s.between=[a[0],i[t+1][1][0]],[r,s]})}),this._breakpoints=t,this._sortedBreakpoints=Object.keys(t).map(function(e){return[e,t[e]]}).sort(function(e,t){return e[1]<t[1]?-1:1}).map(function(e){return e[0]});var a=this._sortedBreakpoints.slice(0,-1).reduce(function(e,t,n){return s(e).concat(s(r._sortedBreakpoints.slice(n+1).map(function(e){return[t,e]})))},[]);this._mediaQueries=(h(n={},i.at,this._createBreakpointQueries(i.at,this._sortedBreakpoints)),h(n,i.lessThan,this._createBreakpointQueries(i.lessThan,this._sortedBreakpoints.slice(1))),h(n,i.greaterThan,this._createBreakpointQueries(i.greaterThan,this._sortedBreakpoints.slice(0,-1))),h(n,i.greaterThanOrEqual,this._createBreakpointQueries(i.greaterThanOrEqual,this._sortedBreakpoints)),h(n,i.between,this._createBreakpointQueries(i.between,a)),n)}return d(e,null,[{key:"validKeys",value:function(){return[i.at,i.lessThan,i.greaterThan,i.greaterThanOrEqual,i.between]}}]),d(e,[{key:"toVisibleAtBreakpointSet",value:function(e){if((e=this._normalizeProps(e)).lessThan){var t=this.sortedBreakpoints.findIndex(function(t){return t===e.lessThan});return this.sortedBreakpoints.slice(0,t)}if(e.greaterThan){var n=this.sortedBreakpoints.findIndex(function(t){return t===e.greaterThan});return this.sortedBreakpoints.slice(n+1)}if(e.greaterThanOrEqual){var r=this.sortedBreakpoints.findIndex(function(t){return t===e.greaterThanOrEqual});return this.sortedBreakpoints.slice(r)}if(e.between){var i=e.between,a=this.sortedBreakpoints.findIndex(function(e){return e===i[0]}),s=this.sortedBreakpoints.findIndex(function(e){return e===i[1]});return this.sortedBreakpoints.slice(a,s)}return[]}},{key:"toRuleSets",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.validKeys();return Object.entries(n.reduce(function(e,n){return e[n]=t._mediaQueries[n],e},{})).reduce(function(e,t){var n=o(t,2),r=n[0];return n[1].forEach(function(t,n){e.push((0,a.createRuleSet)((0,a.createClassName)(r,n),"not all and ".concat(t)))}),e},[])}},{key:"shouldRenderMediaQuery",value:function(e,t){var n=this;if((e=this._normalizeProps(e)).lessThan){var r=this._breakpoints[e.lessThan];return Math.min.apply(Math,s(t.map(function(e){return n._breakpoints[e]})))<r}if(e.greaterThan){var i=this._breakpoints[this._findNextBreakpoint(e.greaterThan)];return Math.max.apply(Math,s(t.map(function(e){return n._breakpoints[e]})))>=i}if(e.greaterThanOrEqual){var a=this._breakpoints[e.greaterThanOrEqual];return Math.max.apply(Math,s(t.map(function(e){return n._breakpoints[e]})))>=a}if(e.between){var o=this._breakpoints[e.between[0]],u=this._breakpoints[e.between[1]],c=t.map(function(e){return n._breakpoints[e]});return!(Math.max.apply(Math,s(c))<o||Math.min.apply(Math,s(c))>=u)}return!1}},{key:"_normalizeProps",value:function(e){if(e.at){var t=this._sortedBreakpoints.indexOf(e.at),n=this._sortedBreakpoints[t+1];return n?{between:[e.at,n]}:{greaterThanOrEqual:e.at}}return e}},{key:"_createBreakpointQuery",value:function(e){if((e=this._normalizeProps(e)).lessThan){var t=this._breakpoints[e.lessThan];return"(max-width:".concat(t-.02,"px)")}if(e.greaterThan){var n=this._breakpoints[this._findNextBreakpoint(e.greaterThan)];return"(min-width:".concat(n,"px)")}if(e.greaterThanOrEqual){var r=this._breakpoints[e.greaterThanOrEqual];return"(min-width:".concat(r,"px)")}if(e.between){var i=this._breakpoints[e.between[0]],a=this._breakpoints[e.between[1]];return"(min-width:".concat(i,"px) and (max-width:").concat(a-.02,"px)")}throw Error("Unexpected breakpoint props: ".concat(JSON.stringify(e)))}},{key:"_createBreakpointQueries",value:function(e,t){var n=this;return t.reduce(function(t,r){return t.set(Array.isArray(r)?r.join("-"):r,n._createBreakpointQuery(h({},e,r))),t},new Map)}},{key:"_findNextBreakpoint",value:function(e){var t=this._sortedBreakpoints[this._sortedBreakpoints.indexOf(e)+1];if(!t)throw Error("There is no breakpoint larger than ".concat(e));return t}},{key:"sortedBreakpoints",get:function(){return this._sortedBreakpoints}},{key:"dynamicResponsiveMediaQueries",get:function(){return Array.from(this._mediaQueries[i.at].entries()).reduce(function(e,t){var n=o(t,2);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){h(e,t,n[t])})}return e}({},e,h({},n[0],n[1]))},{})}},{key:"largestBreakpoint",get:function(){return this._sortedBreakpoints[this._sortedBreakpoints.length-1]}}]),e}();t.Breakpoints=f},95157:function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.createResponsiveComponents=function(){var e=a.default.createContext({});return e.displayName="Media.DynamicContext",{Consumer:e.Consumer,Provider:function(t){var n;function i(e){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,i),t=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}(this,o(i).call(this,e)),l(c(c(t)),"isSupportedEnvironment",function(){return"undefined"!=typeof window&&void 0!==window.matchMedia}),l(c(c(t)),"setupMatchers",function(e){return Object.keys(e).reduce(function(t,n){return s({},t,l({},n,window.matchMedia(e[n])))},{})}),l(c(c(t)),"checkMatchers",function(e){return Object.keys(e).reduce(function(t,n){return s({},t,l({},n,e[n].matches))},{})}),l(c(c(t)),"mediaQueryStatusChangedCallback",function(){var e=t.checkMatchers(t.state.mediaQueryMatchers);t.setState({mediaQueryMatches:e})});var t,n,a=void 0;return t.isSupportedEnvironment()?(a=t.setupMatchers(e.mediaQueries),n=t.checkMatchers(a)):n=Object.keys(e.mediaQueries).reduce(function(t,n){return s({},t,l({},n,!!e.initialMatchingMediaQueries&&e.initialMatchingMediaQueries.includes(n)))},{}),t.state={mediaQueryMatchers:a,mediaQueryMatches:n},t}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(i,t),n=[{key:"componentDidMount",value:function(){if(this.state.mediaQueryMatchers){var e=this.mediaQueryStatusChangedCallback;Object.values(this.state.mediaQueryMatchers).forEach(function(t){t.addListener(e)})}}},{key:"componentWillUnmount",value:function(){if(this.state.mediaQueryMatchers){var e=this.mediaQueryStatusChangedCallback;Object.values(this.state.mediaQueryMatchers).forEach(function(t){return t.removeListener(e)})}}},{key:"shouldComponentUpdate",value:function(e,t){return!!this.state.mediaQueryMatchers&&(e.children!==this.props.children||!d(this.state.mediaQueryMatches,t.mediaQueryMatches))}},{key:"render",value:function(){return a.default.createElement(e.Provider,{value:this.state.mediaQueryMatches},this.props.children)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(i.prototype,n),i}(a.default.Component)}};var i,a=(i=n(18381))&&i.__esModule?i:{default:i};function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){l(e,t,n[t])})}return e}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e,t){for(var n in e)if(e[n]!==t[n])return!1;return!0}},49437:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interactions=t.InteractionKey=void 0;var r,i=n(54536);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return a}}(e,t)||s(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.InteractionKey=r,(r||(t.InteractionKey=r={})).interaction="interaction";var d=function(){function e(t){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),l(this,"_interactions",void 0),this._interactions=t}return c(e,null,[{key:"validKeys",value:function(){return[r.interaction]}}]),c(e,[{key:"toRuleSets",value:function(){return Object.entries(this._interactions).reduce(function(e,t){var n=a(t,2),u=n[0],c=n[1];return((function(e){if(Array.isArray(e))return o(e)})(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([(0,i.createRuleSet)((0,i.createClassName)(r.interaction,u),c)])},[])}},{key:"shouldRenderMediaQuery",value:function(e,t){return!!(t&&t.includes(e))}},{key:"interactions",get:function(){return Object.keys(this._interactions)}},{key:"dynamicResponsiveMediaQueries",get:function(){return Object.entries(this._interactions).reduce(function(e,t){var n=a(t,2);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){l(e,t,n[t])})}return e}({},e,l({},n[0],n[1]))},{})}}]),e}();t.Interactions=d},82822:function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMedia=function(e){var t,n,i,m=(0,u.castBreakpointsToIntegers)(e.breakpoints),g=new o.MediaQueries(m,e.interactions||{}),v=(0,s.createResponsiveComponents)(),y=a.default.createContext({});y.displayName="Media.Context";var _=a.default.createContext({hasParentMedia:!1,breakpointProps:{}});y.displayName="MediaParent.Context";var b=(0,u.memoize)(function(e){return{onlyMatch:e}});return{Media:(i=n=function(e){var t;function n(e){var t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),t=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return h(e)}(this,l(n).call(this,e)),f(h(h(t)),"getMediaParentContextValue",(0,u.memoize)(function(e){return{hasParentMedia:!0,breakpointProps:e}})),function(e){var t=Object.keys(e).filter(function(e){return p.includes(e)});if(t.length<1)throw Error("1 of ".concat(p.join(", ")," is required."));if(t.length>1)throw Error("Only 1 of ".concat(t.join(", ")," is allowed at a time."))}(e),t}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(n,e),t=[{key:"render",value:function(){var e=this,t=this.props;t.children;var n=t.className,r=t.style,i=t.interaction,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["children","className","style","interaction"]),o=this.getMediaParentContextValue(s);return a.default.createElement(_.Consumer,null,function(c){return a.default.createElement(_.Provider,{value:o},a.default.createElement(y.Consumer,null,function(){var o,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=l.onlyMatch;if(t.interaction)o=(0,u.createClassName)("interaction",t.interaction);else{if(t.at){var h=g.breakpoints.largestBreakpoint;if(t.at===h){var p=null;try{var m=e._reactInternalFiber._debugOwner.type;p=m.displayName||m.name}catch(e){}console.warn("[@artsy/fresnel] `at` is being used with the largest breakpoint. Consider using `<Media greaterThanOrEqual="+'"'.concat(h,'">` to account for future ')+"breakpoint definitions outside of this range.".concat(p?" It is being used in the ".concat(p," component."):""))}}var v=(0,u.propKey)(s),y=s[v];o=(0,u.createClassName)(v,y)}var _=(!c.hasParentMedia||(0,u.intersection)(g.breakpoints.toVisibleAtBreakpointSet(c.breakpointProps),g.breakpoints.toVisibleAtBreakpointSet(s)).length>0)&&(void 0===d||g.shouldRenderMediaQuery(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){f(e,t,n[t])})}return e}({},s,{interaction:i}),d));return t.children instanceof Function?t.children(o,_):a.default.createElement("div",{className:"fresnel-container ".concat(o," ").concat(n),style:r,suppressHydrationWarning:!_},_?t.children:null)}))})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(a.default.Component),f(n,"defaultProps",{className:"",style:{}}),f(n,"contextType",_),i),MediaContextProvider:function(e){var t=e.disableDynamicMediaQueries,n=e.onlyMatch,r=e.children;if(!t)return a.default.createElement(v.Provider,{mediaQueries:g.dynamicResponsiveMediaQueries,initialMatchingMediaQueries:(0,u.intersection)(g.mediaQueryTypes,n)},a.default.createElement(v.Consumer,null,function(e){var t=Object.keys(e).filter(function(t){return e[t]}),i=b((0,u.intersection)(t,n));return a.default.createElement(y.Provider,{value:i},r)}));var i=b(n);return a.default.createElement(y.Provider,{value:i},r)},createMediaStyle:g.toStyle,SortedBreakpoints:function(e){if(Array.isArray(e))return c(e)}(t=g.breakpoints.sortedBreakpoints)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return c(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),findBreakpointAtWidth:g.breakpoints.findBreakpointAtWidth,findBreakpointsForWidths:g.breakpoints.findBreakpointsForWidths,valuesWithBreakpointProps:g.breakpoints.valuesWithBreakpointProps}};var i,a=(i=n(18381))&&i.__esModule?i:{default:i},s=n(95157),o=n(82562),u=n(54536);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=o.MediaQueries.validKeys()},82562:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaQueries=void 0;var r=n(16575),i=n(49437),a=n(54536);function s(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(){function e(t,n){var a=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),l(this,"_breakpoints",void 0),l(this,"_interactions",void 0),l(this,"toStyle",function(e){return[".fresnel-container{margin:0;padding:0;}"].concat(s(a._breakpoints.toRuleSets(e)),s(a._interactions.toRuleSets())).join("\n")}),this._breakpoints=new r.Breakpoints(t),this._interactions=new i.Interactions(n||{})}return c(e,null,[{key:"validKeys",value:function(){return s(r.Breakpoints.validKeys()).concat(s(i.Interactions.validKeys()))}}]),c(e,[{key:"shouldRenderMediaQuery",value:function(e,t){var n=e.interaction,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["interaction"]);if(n)return this._interactions.shouldRenderMediaQuery(n,t);var i=(0,a.intersection)(t,this._breakpoints.sortedBreakpoints);return this._breakpoints.shouldRenderMediaQuery(r,i)}},{key:"breakpoints",get:function(){return this._breakpoints}},{key:"mediaQueryTypes",get:function(){return s(this._breakpoints.sortedBreakpoints).concat(s(this._interactions.interactions))}},{key:"dynamicResponsiveMediaQueries",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){l(e,t,n[t])})}return e}({},this._breakpoints.dynamicResponsiveMediaQueries,this._interactions.dynamicResponsiveMediaQueries)}}]),e}();t.MediaQueries=d},54536:function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.propKey=function(e){return Object.keys(e)[0]},t.intersection=function(e,t){return t?e.filter(function(e){return t.indexOf(e)>=0}):r(e)},t.createRuleSet=function(e,t){return"@media ".concat(t,"{.").concat(e,"{display:none!important;}}")},t.createClassName=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return["fresnel"].concat(r(t.reduce(function(e,t){return Array.isArray(t)?r(e).concat(r(t)):r(e).concat([t])},[]))).join("-")},t.castBreakpointsToIntegers=function(e){var t=Object.keys(e);return t.reduce(function(r,i,a){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),i.forEach(function(t){n(e,t,r[t])})}return e}({},r,n({},t[a],Math.round(Number(e[i]))))},{})},t.memoize=function(e){var t={};return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=JSON.stringify(r);return t[a]||(t[a]=e.apply(void 0,r)),t[a]}}},11390:function(e,t,n){"use strict";Object.defineProperty(t,"Wm",{enumerable:!0,get:function(){return r.createMedia}});var r=n(82822);n(16575)},50470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,a,s=n(87929),o=n(62831),u=n(53437),c=n(90735),l=n(28543),d=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(e){if((null==(t=e.getComponent())?void 0:t.type)!=="VERSION")return null;var t,n=e.getImmediate();return"".concat(n.library,"/").concat(n.version)}).filter(function(e){return e}).join(" ")},e}(),h="@firebase/app",f="0.9.13",p=new u.Logger("@firebase/app"),m="[DEFAULT]",g=((i={})[h]="fire-core",i["@firebase/app-compat"]="fire-core-compat",i["@firebase/analytics"]="fire-analytics",i["@firebase/analytics-compat"]="fire-analytics-compat",i["@firebase/app-check"]="fire-app-check",i["@firebase/app-check-compat"]="fire-app-check-compat",i["@firebase/auth"]="fire-auth",i["@firebase/auth-compat"]="fire-auth-compat",i["@firebase/database"]="fire-rtdb",i["@firebase/database-compat"]="fire-rtdb-compat",i["@firebase/functions"]="fire-fn",i["@firebase/functions-compat"]="fire-fn-compat",i["@firebase/installations"]="fire-iid",i["@firebase/installations-compat"]="fire-iid-compat",i["@firebase/messaging"]="fire-fcm",i["@firebase/messaging-compat"]="fire-fcm-compat",i["@firebase/performance"]="fire-perf",i["@firebase/performance-compat"]="fire-perf-compat",i["@firebase/remote-config"]="fire-rc",i["@firebase/remote-config-compat"]="fire-rc-compat",i["@firebase/storage"]="fire-gcs",i["@firebase/storage-compat"]="fire-gcs-compat",i["@firebase/firestore"]="fire-fst",i["@firebase/firestore-compat"]="fire-fst-compat",i["fire-js"]="fire-js",i.firebase="fire-js-all",i),v=new Map,y=new Map;function _(e,t){try{e.container.addComponent(t)}catch(n){p.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function b(e){var t,n,r=e.name;if(y.has(r))return p.debug("There were multiple attempts to register component ".concat(r,".")),!1;y.set(r,e);try{for(var i=o.__values(v.values()),a=i.next();!a.done;a=i.next()){var s=a.value;_(s,e)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}function w(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var E=((a={})["no-app"]="No Firebase App '{$appName}' has been created - call initializeApp() first",a["bad-app-name"]="Illegal App name: '{$appName}",a["duplicate-app"]="Firebase App named '{$appName}' already exists with different options or config",a["app-deleted"]="Firebase App named '{$appName}' already deleted",a["no-options"]="Need to provide options, when not being deployed to hosting via source.",a["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",a["invalid-log-argument"]="First argument to `onLog` must be null or a function.",a["idb-open"]="Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",a["idb-get"]="Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",a["idb-set"]="Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",a["idb-delete"]="Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",a),I=new c.ErrorFactory("app","Firebase",E),k=function(){function e(e,t,n){var r=this;this._isDeleted=!1,this._options=o.__assign({},e),this._config=o.__assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new s.Component("app",function(){return r},"PUBLIC"))}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}),Object.defineProperty(e.prototype,"config",{get:function(){return this.checkDestroyed(),this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDeleted",{get:function(){return this._isDeleted},set:function(e){this._isDeleted=e},enumerable:!1,configurable:!0}),e.prototype.checkDestroyed=function(){if(this.isDeleted)throw I.create("app-deleted",{appName:this._name})},e}();function S(e,t){void 0===t&&(t={});var n,r,i=e;"object"!=typeof t&&(t={name:t});var a=o.__assign({name:m,automaticDataCollectionEnabled:!1},t),u=a.name;if("string"!=typeof u||!u)throw I.create("bad-app-name",{appName:String(u)});if(i||(i=c.getDefaultAppConfig()),!i)throw I.create("no-options");var l=v.get(u);if(l){if(c.deepEqual(i,l.options)&&c.deepEqual(a,l.config))return l;throw I.create("duplicate-app",{appName:u})}var d=new s.ComponentContainer(u);try{for(var h=o.__values(y.values()),f=h.next();!f.done;f=h.next()){var p=f.value;d.addComponent(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var g=new k(i,a,d);return v.set(u,g),g}function T(e,t,n){var r,i=null!==(r=g[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var u=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];a&&u.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&u.push("and"),o&&u.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),p.warn(u.join(" "));return}b(new s.Component("".concat(i,"-version"),function(){return{library:i,version:t}},"VERSION"))}var O="firebase-heartbeat-store",A=null;function C(){return A||(A=l.openDB("firebase-heartbeat-database",1,{upgrade:function(e,t){0===t&&e.createObjectStore(O)}}).catch(function(e){throw I.create("idb-open",{originalErrorMessage:e.message})})),A}function P(e,t){return o.__awaiter(this,void 0,void 0,function(){var n,r,i;return o.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,C()];case 1:return[4,(n=a.sent().transaction(O,"readwrite")).objectStore(O).put(t,R(e))];case 2:return a.sent(),[4,n.done];case 3:return a.sent(),[3,5];case 4:return(r=a.sent())instanceof c.FirebaseError?p.warn(r.message):(i=I.create("idb-set",{originalErrorMessage:null==r?void 0:r.message}),p.warn(i.message)),[3,5];case 5:return[2]}})})}function R(e){return"".concat(e.name,"!").concat(e.options.appId)}var x=function(){function e(e){var t=this;this.container=e,this._heartbeatsCache=null;var n=this.container.getProvider("app").getImmediate();this._storage=new D(n),this._heartbeatsCachePromise=this._storage.read().then(function(e){return t._heartbeatsCache=e,e})}return e.prototype.triggerHeartbeat=function(){return o.__awaiter(this,void 0,void 0,function(){var e,t,n;return o.__generator(this,function(r){switch(r.label){case 0:if(e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=N(),null!==this._heartbeatsCache)return[3,2];return n=this,[4,this._heartbeatsCachePromise];case 1:n._heartbeatsCache=r.sent(),r.label=2;case 2:if(this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(function(e){return e.date===t}))return[2];return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(function(e){var t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),[2,this._storage.overwrite(this._heartbeatsCache)]}})})},e.prototype.getHeartbeatsHeader=function(){return o.__awaiter(this,void 0,void 0,function(){var e,t,n,r,i;return o.__generator(this,function(a){switch(a.label){case 0:if(null!==this._heartbeatsCache)return[3,2];return[4,this._heartbeatsCachePromise];case 1:a.sent(),a.label=2;case 2:if(null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return[2,""];if(e=N(),n=(t=function(e,t){void 0===t&&(t=1024);var n,r,i=[],a=e.slice(),s=function(e){var n=i.find(function(t){return t.agent===e.agent});if(n){if(n.dates.push(e.date),L(i)>t)return n.dates.pop(),"break"}else if(i.push({agent:e.agent,dates:[e.date]}),L(i)>t)return i.pop(),"break";a=a.slice(1)};try{for(var u=o.__values(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=s(l);if("break"===d)break}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return{heartbeatsToSend:i,unsentEntries:a}}(this._heartbeatsCache.heartbeats)).heartbeatsToSend,r=t.unsentEntries,i=c.base64urlEncodeWithoutPadding(JSON.stringify({version:2,heartbeats:n})),this._heartbeatsCache.lastSentHeartbeatDate=e,!(r.length>0))return[3,4];return this._heartbeatsCache.heartbeats=r,[4,this._storage.overwrite(this._heartbeatsCache)];case 3:return a.sent(),[3,5];case 4:this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache),a.label=5;case 5:return[2,i]}})})},e}();function N(){return new Date().toISOString().substring(0,10)}var D=function(){function e(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return e.prototype.runIndexedDBEnvironmentCheck=function(){return o.__awaiter(this,void 0,void 0,function(){return o.__generator(this,function(e){return c.isIndexedDBAvailable()?[2,c.validateIndexedDBOpenable().then(function(){return!0}).catch(function(){return!1})]:[2,!1]})})},e.prototype.read=function(){return o.__awaiter(this,void 0,void 0,function(){return o.__generator(this,function(e){switch(e.label){case 0:return[4,this._canUseIndexedDBPromise];case 1:if(e.sent())return[3,2];return[2,{heartbeats:[]}];case 2:return[4,function(e){return o.__awaiter(this,void 0,void 0,function(){var t,n;return o.__generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,C()];case 1:return[4,r.sent().transaction(O).objectStore(O).get(R(e))];case 2:return[2,r.sent()];case 3:return(t=r.sent())instanceof c.FirebaseError?p.warn(t.message):(n=I.create("idb-get",{originalErrorMessage:null==t?void 0:t.message}),p.warn(n.message)),[3,4];case 4:return[2]}})})}(this.app)];case 3:return[2,e.sent()||{heartbeats:[]}]}})})},e.prototype.overwrite=function(e){var t;return o.__awaiter(this,void 0,void 0,function(){var n;return o.__generator(this,function(r){switch(r.label){case 0:return[4,this._canUseIndexedDBPromise];case 1:if(r.sent())return[3,2];return[2];case 2:return[4,this.read()];case 3:return n=r.sent(),[2,P(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})]}})})},e.prototype.add=function(e){var t;return o.__awaiter(this,void 0,void 0,function(){var n;return o.__generator(this,function(r){switch(r.label){case 0:return[4,this._canUseIndexedDBPromise];case 1:if(r.sent())return[3,2];return[2];case 2:return[4,this.read()];case 3:return n=r.sent(),[2,P(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:o.__spreadArray(o.__spreadArray([],o.__read(n.heartbeats),!1),o.__read(e.heartbeats),!1)})]}})})},e}();function L(e){return c.base64urlEncodeWithoutPadding(JSON.stringify({version:2,heartbeats:e})).length}r="node",b(new s.Component("platform-logger",function(e){return new d(e)},"PRIVATE")),b(new s.Component("heartbeat",function(e){return new x(e)},"PRIVATE")),T(h,f,r),T(h,f,"cjs5"),T("fire-js",""),Object.defineProperty(t,"FirebaseError",{enumerable:!0,get:function(){return c.FirebaseError}}),t.SDK_VERSION="9.23.0",t._DEFAULT_ENTRY_NAME=m,t._addComponent=_,t._addOrOverwriteComponent=function(e,t){e.container.addOrOverwriteComponent(t)},t._apps=v,t._clearComponents=function(){y.clear()},t._components=y,t._getProvider=w,t._registerComponent=b,t._removeServiceInstance=function(e,t,n){void 0===n&&(n=m),w(e,t).clearInstance(n)},t.deleteApp=function(e){return o.__awaiter(this,void 0,void 0,function(){var t;return o.__generator(this,function(n){switch(n.label){case 0:if(t=e.name,!v.has(t))return[3,2];return v.delete(t),[4,Promise.all(e.container.getProviders().map(function(e){return e.delete()}))];case 1:n.sent(),e.isDeleted=!0,n.label=2;case 2:return[2]}})})},t.getApp=function(e){void 0===e&&(e=m);var t=v.get(e);if(!t&&e===m&&c.getDefaultAppConfig())return S();if(!t)throw I.create("no-app",{appName:e});return t},t.getApps=function(){return Array.from(v.values())},t.initializeApp=S,t.onLog=function(e,t){if(null!==e&&"function"!=typeof e)throw I.create("invalid-log-argument");u.setUserLogHandler(e,t)},t.registerVersion=T,t.setLogLevel=function(e){u.setLogLevel(e)}},84122:function(e,t,n){"use strict";var r,i=n(90735),a=n(50470),s=n(62831),o=n(53437),u=n(87929);function c(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}let l=new i.ErrorFactory("auth","Firebase",c()),d=new o.Logger("@firebase/auth");function h(e,...t){d.logLevel<=o.LogLevel.ERROR&&d.error(`Auth (${a.SDK_VERSION}): ${e}`,...t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function f(e,...t){throw v(e,...t)}function p(e,...t){return v(e,...t)}function m(e,t,n){let r=Object.assign(Object.assign({},c()),{[t]:n});return new i.ErrorFactory("auth","Firebase",r).create(t,{appName:e.name})}function g(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&f(e,"argument-error"),m(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function v(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return l.create(e,...t)}function y(e,t,...n){if(!e)throw v(t,...n)}function _(e){let t="INTERNAL ASSERTION FAILED: "+e;throw h(t),Error(t)}function b(e,t){e||_(t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function w(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function E(){return"http:"===I()||"https:"===I()}function I(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class k{constructor(e,t){this.shortDelay=e,this.longDelay=t,b(t>e,"Short delay should be less than long delay!"),this.isMobile=i.isMobileCordova()||i.isReactNative()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(E()||i.isBrowserExtension()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function S(e,t){b(e.emulator,"Emulator should always be set here");let{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class T{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void _("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void _("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void _("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let O={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},A=new k(3e4,6e4);function C(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function P(e,t,n,r,a={}){return R(e,a,async()=>{let a={},s={};r&&("GET"===t?s=r:a={body:JSON.stringify(r)});let o=i.querystring(Object.assign({key:e.config.apiKey},s)).slice(1),u=await e._getAdditionalHeaders();return u["Content-Type"]="application/json",e.languageCode&&(u["X-Firebase-Locale"]=e.languageCode),T.fetch()(N(e,e.config.apiHost,n,o),Object.assign({method:t,headers:u,referrerPolicy:"no-referrer"},a))})}async function R(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},O),t);try{let t=new D(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let a=await i.json();if("needConfirmation"in a)throw L(e,"account-exists-with-different-credential",a);if(i.ok&&!("errorMessage"in a))return a;{let[t,n]=(i.ok?a.errorMessage:a.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw L(e,"credential-already-in-use",a);if("EMAIL_EXISTS"===t)throw L(e,"email-already-in-use",a);if("USER_DISABLED"===t)throw L(e,"user-disabled",a);let s=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(n)throw m(e,s,n);f(e,s)}}catch(t){if(t instanceof i.FirebaseError)throw t;f(e,"network-request-failed",{message:String(t)})}}async function x(e,t,n,r,i={}){let a=await P(e,t,n,r,i);return"mfaPendingCredential"in a&&f(e,"multi-factor-auth-required",{_serverResponse:a}),a}function N(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?S(e.config,i):`${e.config.apiScheme}://${i}`}class D{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(p(this.auth,"network-request-failed")),A.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function L(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=p(e,t,r);return i.customData._tokenResponse=n,i}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function j(e,t){return P(e,"POST","/v1/accounts:delete",t)}async function M(e,t){return P(e,"POST","/v1/accounts:update",t)}async function U(e,t){return P(e,"POST","/v1/accounts:lookup",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function F(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function $(e,t=!1){let n=i.getModularInstance(e),r=await n.getIdToken(t),a=H(r);y(a&&a.exp&&a.auth_time&&a.iat,n.auth,"internal-error");let s="object"==typeof a.firebase?a.firebase:void 0,o=null==s?void 0:s.sign_in_provider;return{claims:a,token:r,authTime:F(B(a.auth_time)),issuedAtTime:F(B(a.iat)),expirationTime:F(B(a.exp)),signInProvider:o||null,signInSecondFactor:(null==s?void 0:s.sign_in_second_factor)||null}}function B(e){return 1e3*Number(e)}function H(e){let[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return h("JWT malformed, contained fewer than 3 sections"),null;try{let e=i.base64Decode(n);if(!e)return h("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return h("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function z(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof i.FirebaseError&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class V{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class q{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=F(this.lastLoginAt),this.creationTime=F(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function G(e){var t;let n=e.auth,r=await e.getIdToken(),i=await z(e,U(n,{idToken:r}));y(null==i?void 0:i.users.length,n,"internal-error");let a=i.users[0];e._notifyReloadListener(a);let o=(null===(t=a.providerUserInfo)||void 0===t?void 0:t.length)?a.providerUserInfo.map(e=>{var{providerId:t}=e,n=s.__rest(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}):[],u=[...e.providerData.filter(e=>!o.some(t=>t.providerId===e.providerId)),...o],c=e.isAnonymous,l=!(e.email&&a.passwordHash)&&!(null==u?void 0:u.length);Object.assign(e,{uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:u,metadata:new q(a.createdAt,a.lastLoginAt),isAnonymous:!!c&&l})}async function W(e){let t=i.getModularInstance(e);await G(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function K(e,t){let n=await R(e,{},async()=>{let n=i.querystring({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:a}=e.config,s=N(e,r,"/v1/token",`key=${a}`),o=await e._getAdditionalHeaders();return o["Content-Type"]="application/x-www-form-urlencoded",T.fetch()(s,{method:"POST",headers:o,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Z{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){y(e.idToken,"internal-error"),y(void 0!==e.idToken,"internal-error"),y(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=H(e);return y(t,"internal-error"),y(void 0!==t.exp,"internal-error"),y(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(y(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await K(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){let{refreshToken:n,accessToken:r,expirationTime:i}=t,a=new Z;return n&&(y("string"==typeof n,"internal-error",{appName:e}),a.refreshToken=n),r&&(y("string"==typeof r,"internal-error",{appName:e}),a.accessToken=r),i&&(y("number"==typeof i,"internal-error",{appName:e}),a.expirationTime=i),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Z,this.toJSON())}_performRefresh(){return _("not implemented")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function J(e,t){y("string"==typeof e||void 0===e,"internal-error",{appName:t})}class X{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=s.__rest(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new V(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new q(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await z(this,this.stsTokenManager.getToken(this.auth,e));return y(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return $(this,e)}reload(){return W(this)}_assign(e){this!==e&&(y(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new X(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){y(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await G(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await z(this,j(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,a,s,o,u,c;let l=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(a=t.photoURL)&&void 0!==a?a:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(o=t._redirectEventId)&&void 0!==o?o:void 0,g=null!==(u=t.createdAt)&&void 0!==u?u:void 0,v=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:_,emailVerified:b,isAnonymous:w,providerData:E,stsTokenManager:I}=t;y(_&&I,e,"internal-error");let k=Z.fromJSON(this.name,I);y("string"==typeof _,e,"internal-error"),J(l,e.name),J(d,e.name),y("boolean"==typeof b,e,"internal-error"),y("boolean"==typeof w,e,"internal-error"),J(h,e.name),J(f,e.name),J(p,e.name),J(m,e.name),J(g,e.name),J(v,e.name);let S=new X({uid:_,auth:e,email:d,emailVerified:b,displayName:l,isAnonymous:w,photoURL:f,phoneNumber:h,tenantId:p,stsTokenManager:k,createdAt:g,lastLoginAt:v});return E&&Array.isArray(E)&&(S.providerData=E.map(e=>Object.assign({},e))),m&&(S._redirectEventId=m),S}static async _fromIdTokenResponse(e,t,n=!1){let r=new Z;r.updateFromServerResponse(t);let i=new X({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await G(i),i}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let Y=new Map;function Q(e){b(e instanceof Function,"Expected a class definition");let t=Y.get(e);return t?b(t instanceof e,"Instance stored in cache mismatched with class"):(t=new e,Y.set(e,t)),t}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ee{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function et(e,t,n){return`firebase:${e}:${t}:${n}`}ee.type="NONE";class en{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=et(this.userKey,r.apiKey,i),this.fullPersistenceKey=et("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?X._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new en(Q(ee),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||Q(ee),a=et(n,e.config.apiKey,e.name),s=null;for(let n of t)try{let t=await n._get(a);if(t){let r=X._fromJSON(e,t);n!==i&&(s=r),i=n;break}}catch(e){}let o=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&o.length&&(i=o[0],s&&await i._set(a,s.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(a)}catch(e){}}))),new en(i,e,n)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function er(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(eo(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(ei(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ec(t))return"Blackberry";if(el(t))return"Webos";if(ea(t))return"Safari";if((t.includes("chrome/")||es(t))&&!t.includes("edge/"))return"Chrome";if(eu(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function ei(e=i.getUA()){return/firefox\//i.test(e)}function ea(e=i.getUA()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function es(e=i.getUA()){return/crios\//i.test(e)}function eo(e=i.getUA()){return/iemobile/i.test(e)}function eu(e=i.getUA()){return/android/i.test(e)}function ec(e=i.getUA()){return/blackberry/i.test(e)}function el(e=i.getUA()){return/webos/i.test(e)}function ed(e=i.getUA()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function eh(e=i.getUA()){return ed(e)||eu(e)||el(e)||ec(e)||/windows phone/i.test(e)||eo(e)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ef(e,t=[]){let n;switch(e){case"Browser":n=er(i.getUA());break;case"Worker":n=`${er(i.getUA())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${a.SDK_VERSION}/${r}`}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function ep(e){return(await P(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function em(e,t){return P(e,"GET","/v2/recaptchaConfig",C(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function eg(e){return void 0!==e&&void 0!==e.getResponse}function ev(e){return void 0!==e&&void 0!==e.enterprise}class ey{constructor(e){if(this.siteKey="",this.emailPasswordEnabled=!1,void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.emailPasswordEnabled=e.recaptchaEnforcementState.some(e=>"EMAIL_PASSWORD_PROVIDER"===e.provider&&"OFF"!==e.enforcementState)}}function e_(e){return new Promise((t,n)=>{var r,i;let a=document.createElement("script");a.setAttribute("src",e),a.onload=t,a.onerror=e=>{let t=p("internal-error");t.customData=e,n(t)},a.type="text/javascript",a.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(a)})}function eb(e){return`__${e}${Math.floor(1e6*Math.random())}`}class ew{constructor(e){this.type="recaptcha-enterprise",this.auth=eS(e)}async verify(e="verify",t=!1){async function n(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{em(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)n(Error("recaptcha Enterprise site key undefined"));else{let n=new ey(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;ev(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&ev(window.grecaptcha))r(n,e,i);else{if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}e_("https://www.google.com/recaptcha/enterprise.js?render="+n).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function eE(e,t,n,r=!1){let i;let a=new ew(e);try{i=await a.verify(n)}catch(e){i=await a.verify(n,!0)}let s=Object.assign({},t);return r?Object.assign(s,{captchaResp:i}):Object.assign(s,{captchaResponse:i}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eI{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let r=e(t);n(r)}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ek{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eT(this),this.idTokenSubscription=new eT(this),this.beforeStateQueue=new eI(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=l,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Q(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await en.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,a=null==r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);(!n||n===a)&&(null==s?void 0:s.user)&&(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(y(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await G(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){let t=e?i.getModularInstance(e):null;return t&&y(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&y(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Q(e))})}async initializeRecaptchaConfig(){let e=new ey(await em(this,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==this.tenantId?this._agentRecaptchaConfig=e:this._tenantRecaptchaConfigs[this.tenantId]=e,e.emailPasswordEnabled&&new ew(this).verify()}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new i.ErrorFactory("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&Q(e)||this._popupRedirectResolver;y(t,this,"argument-error"),this.redirectPersistenceManager=await en.create(this,[Q(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),a=this._isInitialized?Promise.resolve():this._initializationPromise;return(y(a,this,"internal-error"),a.then(()=>i(this.currentUser)),"function"==typeof t)?e.addObserver(t,n,r):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return y(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ef(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){d.logLevel<=o.LogLevel.WARN&&d.warn(`Auth (${a.SDK_VERSION}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function eS(e){return i.getModularInstance(e)}class eT{constructor(e){this.auth=e,this.observer=null,this.addObserver=i.createSubscribe(e=>this.observer=e)}get next(){return y(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function eO(e,t){let n=a._getProvider(e,"auth");if(n.isInitialized()){let e=n.getImmediate(),r=n.getOptions();if(i.deepEqual(r,null!=t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}function eA(e,t,n){let r=eS(e);y(r._canInitEmulator,r,"emulator-config-failed"),y(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=!!(null==n?void 0:n.disableWarnings),a=eC(t),{host:s,port:o}=function(e){let t=eC(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:eP(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:eP(t)}}}(t),u=null===o?"":`:${o}`;r.config.emulator={url:`${a}//${s}${u}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:o,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eC(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eP(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eR{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return _("not implemented")}_getIdTokenResponse(e){return _("not implemented")}_linkToIdToken(e,t){return _("not implemented")}_getReauthenticationResolver(e){return _("not implemented")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function ex(e,t){return P(e,"POST","/v1/accounts:resetPassword",C(e,t))}async function eN(e,t){return P(e,"POST","/v1/accounts:update",t)}async function eD(e,t){return P(e,"POST","/v1/accounts:update",C(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eL(e,t){return x(e,"POST","/v1/accounts:signInWithPassword",C(e,t))}async function ej(e,t){return P(e,"POST","/v1/accounts:sendOobCode",C(e,t))}async function eM(e,t){return ej(e,t)}async function eU(e,t){return ej(e,t)}async function eF(e,t){return ej(e,t)}async function e$(e,t){return ej(e,t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eB(e,t){return x(e,"POST","/v1/accounts:signInWithEmailLink",C(e,t))}async function eH(e,t){return x(e,"POST","/v1/accounts:signInWithEmailLink",C(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ez extends eR{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new ez(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new ez(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){var t;switch(this.signInMethod){case"password":let n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};if(null===(t=e._getRecaptchaConfig())||void 0===t||!t.emailPasswordEnabled)return eL(e,n).catch(async t=>{if("auth/missing-recaptcha-token"!==t.code)return Promise.reject(t);{console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.");let t=await eE(e,n,"signInWithPassword");return eL(e,t)}});{let t=await eE(e,n,"signInWithPassword");return eL(e,t)}case"emailLink":return eB(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return eN(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return eH(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eV(e,t){return x(e,"POST","/v1/accounts:signInWithIdp",C(e,t))}class eq extends eR{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eq(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):f("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=s.__rest(t,["providerId","signInMethod"]);if(!n||!r)return null;let a=new eq(n,r);return a.idToken=i.idToken||void 0,a.accessToken=i.accessToken||void 0,a.secret=i.secret,a.nonce=i.nonce,a.pendingToken=i.pendingToken||null,a}_getIdTokenResponse(e){return eV(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eV(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eV(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=i.querystring(t)}return e}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eG(e,t){return P(e,"POST","/v1/accounts:sendVerificationCode",C(e,t))}async function eW(e,t){return x(e,"POST","/v1/accounts:signInWithPhoneNumber",C(e,t))}async function eK(e,t){let n=await x(e,"POST","/v1/accounts:signInWithPhoneNumber",C(e,t));if(n.temporaryProof)throw L(e,"account-exists-with-different-credential",n);return n}let eZ={USER_NOT_FOUND:"user-not-found"};async function eJ(e,t){return x(e,"POST","/v1/accounts:signInWithPhoneNumber",C(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eZ)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eX extends eR{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new eX({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new eX({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eW(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return eK(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eJ(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new eX({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eY{constructor(e){var t,n,r,a,s,o;let u=i.querystringDecode(i.extractQuerystring(e)),c=null!==(t=u.apiKey)&&void 0!==t?t:null,l=null!==(n=u.oobCode)&&void 0!==n?n:null,d=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=u.mode)&&void 0!==r?r:null);y(c&&l&&d,"argument-error"),this.apiKey=c,this.operation=d,this.code=l,this.continueUrl=null!==(a=u.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(s=u.languageCode)&&void 0!==s?s:null,this.tenantId=null!==(o=u.tenantId)&&void 0!==o?o:null}static parseLink(e){let t=function(e){let t=i.querystringDecode(i.extractQuerystring(e)).link,n=t?i.querystringDecode(i.extractQuerystring(t)).deep_link_id:null,r=i.querystringDecode(i.extractQuerystring(e)).deep_link_id;return(r?i.querystringDecode(i.extractQuerystring(r)).link:null)||r||n||t||e}(e);try{return new eY(t)}catch(e){return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eQ{constructor(){this.providerId=eQ.PROVIDER_ID}static credential(e,t){return ez._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eY.parseLink(t);return y(n,"argument-error"),ez._fromEmailAndCode(e,n.code,n.tenantId)}}eQ.PROVIDER_ID="password",eQ.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eQ.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e0{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e1 extends e0{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class e2 extends e1{static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return y("providerId"in t&&"signInMethod"in t,"argument-error"),eq._fromParams(t)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return y(e.idToken||e.accessToken,"argument-error"),eq._fromParams(Object.assign(Object.assign({},e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return e2.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return e2.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n,oauthTokenSecret:r,pendingToken:i,nonce:a,providerId:s}=e;if(!n&&!r&&!t&&!i||!s)return null;try{return new e2(s)._credential({idToken:t,accessToken:n,nonce:a,pendingToken:i})}catch(e){return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e3 extends e1{constructor(){super("facebook.com")}static credential(e){return eq._fromParams({providerId:e3.PROVIDER_ID,signInMethod:e3.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return e3.credentialFromTaggedObject(e)}static credentialFromError(e){return e3.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return e3.credential(e.oauthAccessToken)}catch(e){return null}}}e3.FACEBOOK_SIGN_IN_METHOD="facebook.com",e3.PROVIDER_ID="facebook.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e4 extends e1{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eq._fromParams({providerId:e4.PROVIDER_ID,signInMethod:e4.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return e4.credentialFromTaggedObject(e)}static credentialFromError(e){return e4.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return e4.credential(t,n)}catch(e){return null}}}e4.GOOGLE_SIGN_IN_METHOD="google.com",e4.PROVIDER_ID="google.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e5 extends e1{constructor(){super("github.com")}static credential(e){return eq._fromParams({providerId:e5.PROVIDER_ID,signInMethod:e5.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return e5.credentialFromTaggedObject(e)}static credentialFromError(e){return e5.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return e5.credential(e.oauthAccessToken)}catch(e){return null}}}e5.GITHUB_SIGN_IN_METHOD="github.com",e5.PROVIDER_ID="github.com";class e6 extends eR{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){return eV(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eV(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eV(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){let{providerId:t,signInMethod:n,pendingToken:r}="string"==typeof e?JSON.parse(e):e;return t&&n&&r&&t===n?new e6(t,r):null}static _create(e,t){return new e6(e,t)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class e9 extends e0{constructor(e){y(e.startsWith("saml."),"argument-error"),super(e)}static credentialFromResult(e){return e9.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return e9.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){let t=e6.fromJSON(e);return y(t,"argument-error"),t}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{pendingToken:t,providerId:n}=e;if(!t||!n)return null;try{return e6._create(n,t)}catch(e){return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e8 extends e1{constructor(){super("twitter.com")}static credential(e,t){return eq._fromParams({providerId:e8.PROVIDER_ID,signInMethod:e8.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return e8.credentialFromTaggedObject(e)}static credentialFromError(e){return e8.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return e8.credential(t,n)}catch(e){return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function e7(e,t){return x(e,"POST","/v1/accounts:signUp",C(e,t))}e8.TWITTER_SIGN_IN_METHOD="twitter.com",e8.PROVIDER_ID="twitter.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class te{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){return new te({user:await X._fromIdTokenResponse(e,n,r),providerId:tt(n),_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){return await e._updateTokensIfNecessary(n,!0),new te({user:e,providerId:tt(n),_tokenResponse:n,operationType:t})}}function tt(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tn(e){var t;let n=eS(e);if(await n._initializationPromise,null===(t=n.currentUser)||void 0===t?void 0:t.isAnonymous)return new te({user:n.currentUser,providerId:null,operationType:"signIn"});let r=await e7(n,{returnSecureToken:!0}),i=await te._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tr extends i.FirebaseError{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,tr.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new tr(e,t,n,r)}}function ti(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw tr._fromErrorAndOperation(e,n,t,r);throw n})}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ta(e){return new Set(e.map(({providerId:e})=>e).filter(e=>!!e))}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function ts(e,t){let n=i.getModularInstance(e);await tu(!0,n,t);let{providerUserInfo:r}=await M(n.auth,{idToken:await n.getIdToken(),deleteProvider:[t]}),a=ta(r||[]);return n.providerData=n.providerData.filter(e=>a.has(e.providerId)),a.has("phone")||(n.phoneNumber=null),await n.auth._persistUserIfCurrent(n),n}async function to(e,t,n=!1){let r=await z(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return te._forOperation(e,"link",r)}async function tu(e,t,n){await G(t),y(ta(t.providerData).has(n)===e,t.auth,!1===e?"provider-already-linked":"no-such-provider")}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tc(e,t,n=!1){let{auth:r}=e,i="reauthenticate";try{let a=await z(e,ti(r,i,t,e),n);y(a.idToken,r,"internal-error");let s=H(a.idToken);y(s,r,"internal-error");let{sub:o}=s;return y(e.uid===o,r,"user-mismatch"),te._forOperation(e,i,a)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&f(r,"user-mismatch"),e}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tl(e,t,n=!1){let r="signIn",i=await ti(e,r,t),a=await te._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(a.user),a}async function td(e,t){return tl(eS(e),t)}async function th(e,t){let n=i.getModularInstance(e);return await tu(!1,n,t.providerId),to(n,t)}async function tf(e,t){return tc(i.getModularInstance(e),t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tp(e,t){return x(e,"POST","/v1/accounts:signInWithCustomToken",C(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tm(e,t){let n=eS(e),r=await tp(n,{token:t,returnSecureToken:!0}),i=await te._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(i.user),i}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tg{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?tv._fromServerResponse(e,t):"totpInfo"in t?ty._fromServerResponse(e,t):f(e,"internal-error")}}class tv extends tg{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new tv(t)}}class ty extends tg{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new ty(t)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function t_(e,t,n){var r;y((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),y(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(y(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(y(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tb(e,t,n){var r;let i=eS(e),a={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};if(null===(r=i._getRecaptchaConfig())||void 0===r?void 0:r.emailPasswordEnabled){let e=await eE(i,a,"getOobCode",!0);n&&t_(i,e,n),await eU(i,e)}else n&&t_(i,a,n),await eU(i,a).catch(async e=>{if("auth/missing-recaptcha-token"!==e.code)return Promise.reject(e);{console.log("Password resets are protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the password reset flow.");let e=await eE(i,a,"getOobCode",!0);n&&t_(i,e,n),await eU(i,e)}})}async function tw(e,t,n){await ex(i.getModularInstance(e),{oobCode:t,newPassword:n})}async function tE(e,t){await eD(i.getModularInstance(e),{oobCode:t})}async function tI(e,t){let n=i.getModularInstance(e),r=await ex(n,{oobCode:t}),a=r.requestType;switch(y(a,n,"internal-error"),a){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":y(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":y(r.mfaInfo,n,"internal-error");default:y(r.email,n,"internal-error")}let s=null;return r.mfaInfo&&(s=tg._fromServerResponse(eS(n),r.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.newEmail:r.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.email:r.newEmail)||null,multiFactorInfo:s},operation:a}}async function tk(e,t){let{data:n}=await tI(i.getModularInstance(e),t);return n.email}async function tS(e,t,n){var r;let i;let a=eS(e),s={returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"};if(null===(r=a._getRecaptchaConfig())||void 0===r?void 0:r.emailPasswordEnabled){let e=await eE(a,s,"signUpPassword");i=e7(a,e)}else i=e7(a,s).catch(async e=>{if("auth/missing-recaptcha-token"!==e.code)return Promise.reject(e);{console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow.");let e=await eE(a,s,"signUpPassword");return e7(a,e)}});let o=await i.catch(e=>Promise.reject(e)),u=await te._fromIdTokenResponse(a,"signIn",o);return await a._updateCurrentUser(u.user),u}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tT(e,t,n){var r;let i=eS(e),a={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function s(e,t){y(t.handleCodeInApp,i,"argument-error"),t&&t_(i,e,t)}if(null===(r=i._getRecaptchaConfig())||void 0===r?void 0:r.emailPasswordEnabled){let e=await eE(i,a,"getOobCode",!0);s(e,n),await eF(i,e)}else s(a,n),await eF(i,a).catch(async e=>{if("auth/missing-recaptcha-token"!==e.code)return Promise.reject(e);{console.log("Email link sign-in is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.");let e=await eE(i,a,"getOobCode",!0);s(e,n),await eF(i,e)}})}async function tO(e,t,n){let r=i.getModularInstance(e),a=eQ.credentialWithLink(t,n||w());return y(a._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),td(r,a)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tA(e,t){return P(e,"POST","/v1/accounts:createAuthUri",C(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tC(e,t){let n=E()?w():"http://localhost",{signinMethods:r}=await tA(i.getModularInstance(e),{identifier:t,continueUri:n});return r||[]}async function tP(e,t){let n=i.getModularInstance(e),r={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&&t_(n.auth,r,t);let{email:a}=await eM(n.auth,r);a!==e.email&&await e.reload()}async function tR(e,t,n){let r=i.getModularInstance(e),a={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await e.getIdToken(),newEmail:t};n&&t_(r.auth,a,n);let{email:s}=await e$(r.auth,a);s!==e.email&&await e.reload()}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tx(e,t){return P(e,"POST","/v1/accounts:update",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tN(e,{displayName:t,photoURL:n}){if(void 0===t&&void 0===n)return;let r=i.getModularInstance(e),a=await r.getIdToken(),s=await z(r,tx(r.auth,{idToken:a,displayName:t,photoUrl:n,returnSecureToken:!0}));r.displayName=s.displayName||null,r.photoURL=s.photoUrl||null;let o=r.providerData.find(({providerId:e})=>"password"===e);o&&(o.displayName=r.displayName,o.photoURL=r.photoURL),await r._updateTokensIfNecessary(s)}async function tD(e,t,n){let{auth:r}=e,i={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(i.email=t),n&&(i.password=n);let a=await z(e,eN(r,i));await e._updateTokensIfNecessary(a,!0)}class tL{constructor(e,t,n={}){this.isNewUser=e,this.providerId=t,this.profile=n}}class tj extends tL{constructor(e,t,n,r){super(e,t,n),this.username=r}}class tM extends tL{constructor(e,t){super(e,"facebook.com",t)}}class tU extends tj{constructor(e,t){super(e,"github.com",t,"string"==typeof(null==t?void 0:t.login)?null==t?void 0:t.login:null)}}class tF extends tL{constructor(e,t){super(e,"google.com",t)}}class t$ extends tj{constructor(e,t,n){super(e,"twitter.com",t,n)}}function tB(e,t,n,r){return i.getModularInstance(e).onIdTokenChanged(t,n,r)}function tH(e,t,n){return i.getModularInstance(e).beforeAuthStateChanged(t,n)}async function tz(e){return i.getModularInstance(e).delete()}class tV{constructor(e,t,n){this.type=e,this.credential=t,this.auth=n}static _fromIdtoken(e,t){return new tV("enroll",e,t)}static _fromMfaPendingCredential(e){return new tV("signin",e)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){var t,n;if(null==e?void 0:e.multiFactorSession){if(null===(t=e.multiFactorSession)||void 0===t?void 0:t.pendingCredential)return tV._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);if(null===(n=e.multiFactorSession)||void 0===n?void 0:n.idToken)return tV._fromIdtoken(e.multiFactorSession.idToken)}return null}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tq{constructor(e,t,n){this.session=e,this.hints=t,this.signInResolver=n}static _fromError(e,t){let n=eS(e),r=t.customData._serverResponse,i=(r.mfaInfo||[]).map(e=>tg._fromServerResponse(n,e));y(r.mfaPendingCredential,n,"internal-error");let a=tV._fromMfaPendingCredential(r.mfaPendingCredential);return new tq(a,i,async e=>{let i=await e._process(n,a);delete r.mfaInfo,delete r.mfaPendingCredential;let s=Object.assign(Object.assign({},r),{idToken:i.idToken,refreshToken:i.refreshToken});switch(t.operationType){case"signIn":let o=await te._fromIdTokenResponse(n,t.operationType,s);return await n._updateCurrentUser(o.user),o;case"reauthenticate":return y(t.user,n,"internal-error"),te._forOperation(t.user,t.operationType,s);default:f(n,"internal-error")}})}async resolveSignIn(e){return this.signInResolver(e)}}class tG{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map(t=>tg._fromServerResponse(e.auth,t)))})}static _fromUser(e){return new tG(e)}async getSession(){return tV._fromIdtoken(await this.user.getIdToken(),this.user.auth)}async enroll(e,t){let n=await this.getSession(),r=await z(this.user,e._process(this.user.auth,n,t));return await this.user._updateTokensIfNecessary(r),this.user.reload()}async unenroll(e){let t="string"==typeof e?e:e.uid,n=await this.user.getIdToken();try{var r,i;let e=await z(this.user,(r=this.user.auth,i={idToken:n,mfaEnrollmentId:t},P(r,"POST","/v2/accounts/mfaEnrollment:withdraw",C(r,i))));this.enrolledFactors=this.enrolledFactors.filter(({uid:e})=>e!==t),await this.user._updateTokensIfNecessary(e),await this.user.reload()}catch(e){throw e}}}let tW=new WeakMap,tK="__sak";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tZ{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(tK,"1"),this.storage.removeItem(tK),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class tJ extends tZ{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(){let e=i.getUA();return ea(e)||ed(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=eh(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},a=this.storage.getItem(n);i.isIE()&&10===document.documentMode&&a!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}tJ.type="LOCAL";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tX extends tZ{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}tX.type="SESSION";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tY{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new tY(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:n,data:r}=e.data,i=this.handlersMap[n];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:n});let a=Array.from(i).map(async t=>t(e.origin,r)),s=await Promise.all(a.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:n,response:s})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function tQ(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}tY.receivers=[];/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class t0{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){let r,i;let a="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!a)throw Error("connection_unavailable");return new Promise((s,o)=>{let u=tQ("",20);a.port1.start();let c=setTimeout(()=>{o(Error("unsupported_event"))},n);i={messageChannel:a,onMessage(e){if(e.data.eventId===u)switch(e.data.status){case"ack":clearTimeout(c),r=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(r),s(e.data.response);break;default:clearTimeout(c),clearTimeout(r),o(Error("invalid_response"))}}},this.handlers.add(i),a.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:u,data:t},[a.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function t1(){return window}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function t2(){return void 0!==t1().WorkerGlobalScope&&"function"==typeof t1().importScripts}async function t3(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let t4="firebaseLocalStorageDb",t5="firebaseLocalStorage",t6="fbase_key";class t9{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function t8(e,t){return e.transaction([t5],t?"readwrite":"readonly").objectStore(t5)}function t7(){let e=indexedDB.open(t4,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(t5,{keyPath:t6})}catch(e){n(e)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(t5)?t(n):(n.close(),await new t9(indexedDB.deleteDatabase(t4)).toPromise(),t(await t7()))})})}async function ne(e,t,n){return new t9(t8(e,!0).put({[t6]:t,value:n})).toPromise()}async function nt(e,t){let n=t8(e,!1).get(t),r=await new t9(n).toPromise();return void 0===r?null:r.value}function nn(e,t){return new t9(t8(e,!0).delete(t)).toPromise()}class nr{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await t7()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return t2()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=tY._getInstance(t2()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await t3(),!this.activeServiceWorker)return;this.sender=new t0(this.activeServiceWorker);let n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await t7();return await ne(e,tK,"1"),await nn(e,tK),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>ne(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>nt(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>nn(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new t9(t8(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}nr.type="LOCAL";class ni{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let n=this.counter;return this._widgets.set(n,new na(e,this.auth.name,t||{})),this.counter++,n}reset(e){var t;let n=e||1e12;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)}getResponse(e){var t;return(null===(t=this._widgets.get(e||1e12))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;return null===(t=this._widgets.get(e||1e12))||void 0===t||t.execute(),""}}class na{constructor(e,t,n){this.params=n,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let r="string"==typeof e?document.getElementById(e):e;y(r,"argument-error",{appName:t}),this.container=r,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(e){let t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}(0);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let ns=eb("rcb"),no=new k(3e4,6e4);class nu{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=t1().grecaptcha)||void 0===e?void 0:e.render)}load(e,t=""){return(y(t.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(t),e,"argument-error"),this.shouldResolveImmediately(t)&&eg(t1().grecaptcha))?Promise.resolve(t1().grecaptcha):new Promise((n,r)=>{let a=t1().setTimeout(()=>{r(p(e,"network-request-failed"))},no.get());t1()[ns]=()=>{t1().clearTimeout(a),delete t1()[ns];let i=t1().grecaptcha;if(!i||!eg(i)){r(p(e,"internal-error"));return}let s=i.render;i.render=(e,t)=>{let n=s(e,t);return this.counter++,n},this.hostLanguage=t,n(i)},e_(`https://www.google.com/recaptcha/api.js??${i.querystring({onload:ns,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(a),r(p(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(null===(t=t1().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class nc{async load(e){return new ni(e)}clearedOneInstance(){}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let nl="recaptcha",nd={theme:"light",type:"image"};class nh{constructor(e,t=Object.assign({},nd),n){this.parameters=t,this.type=nl,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=eS(n),this.isInvisible="invisible"===this.parameters.size,y("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");let r="string"==typeof e?document.getElementById(e):e;y(r,this.auth,"argument-error"),this.container=r,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new nc:new nu,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha();return t.getResponse(e)||new Promise(n=>{let r=e=>{e&&(this.tokenChangeListeners.delete(r),n(e))};this.tokenChangeListeners.add(r),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){y(!this.parameters.sitekey,this.auth,"argument-error"),y(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),y("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let n=t1()[e];"function"==typeof n&&n(t)}}}assertNotDestroyed(){y(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;y(E()&&!t2(),this.auth,"internal-error"),await (e=null,new Promise(t=>{if("complete"===document.readyState){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await ep(this.auth);y(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return y(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class nf{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=eX._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function np(e,t,n){let r=eS(e);return new nf(await nv(r,t,i.getModularInstance(n)),e=>td(r,e))}async function nm(e,t,n){let r=i.getModularInstance(e);return await tu(!1,r,"phone"),new nf(await nv(r.auth,t,i.getModularInstance(n)),e=>th(r,e))}async function ng(e,t,n){let r=i.getModularInstance(e);return new nf(await nv(r.auth,t,i.getModularInstance(n)),e=>tf(r,e))}async function nv(e,t,n){var r,i,a;let s=await n.verify();try{let o;if(y("string"==typeof s,e,"argument-error"),y(n.type===nl,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){let t=o.session;if("phoneNumber"in o)return y("enroll"===t.type,e,"internal-error"),(await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:s}},P(e,"POST","/v2/accounts/mfaEnrollment:start",C(e,i)))).phoneSessionInfo.sessionInfo;{y("signin"===t.type,e,"internal-error");let n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;return y(n,e,"missing-multi-factor-info"),(await (a={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:s}},P(e,"POST","/v2/accounts/mfaSignIn:start",C(e,a)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eG(e,{phoneNumber:o.phoneNumber,recaptchaToken:s});return t}}finally{n._reset()}}async function ny(e,t){await to(i.getModularInstance(e),t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class n_{constructor(e){this.providerId=n_.PROVIDER_ID,this.auth=eS(e)}verifyPhoneNumber(e,t){return nv(this.auth,e,i.getModularInstance(t))}static credential(e,t){return eX._fromVerification(e,t)}static credentialFromResult(e){return n_.credentialFromTaggedObject(e)}static credentialFromError(e){return n_.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?eX._fromTokenResponse(t,n):null}}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function nb(e,t){return t?Q(t):(y(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}n_.PROVIDER_ID="phone",n_.PHONE_SIGN_IN_METHOD="phone";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class nw extends eR{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eV(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eV(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eV(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function nE(e){return tl(e.auth,new nw(e),e.bypassAuthState)}function nI(e){let{auth:t,user:n}=e;return y(n,t,"internal-error"),tc(n,new nw(e),e.bypassAuthState)}async function nk(e){let{auth:t,user:n}=e;return y(n,t,"internal-error"),to(n,new nw(e),e.bypassAuthState)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class nS{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:a,type:s}=e;if(a){this.reject(a);return}let o={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return nE;case"linkViaPopup":case"linkViaRedirect":return nk;case"reauthViaPopup":case"reauthViaRedirect":return nI;default:f(this.auth,"internal-error")}}resolve(e){b(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){b(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let nT=new k(2e3,1e4);async function nO(e,t,n){let r=eS(e);g(e,t,e0);let i=nb(r,n);return new nP(r,"signInViaPopup",t,i).executeNotNull()}async function nA(e,t,n){let r=i.getModularInstance(e);g(r.auth,t,e0);let a=nb(r.auth,n);return new nP(r.auth,"reauthViaPopup",t,a,r).executeNotNull()}async function nC(e,t,n){let r=i.getModularInstance(e);g(r.auth,t,e0);let a=nb(r.auth,n);return new nP(r.auth,"linkViaPopup",t,a,r).executeNotNull()}class nP extends nS{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,nP.currentPopupAction&&nP.currentPopupAction.cancel(),nP.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return y(e,this.auth,"internal-error"),e}async onExecution(){b(1===this.filter.length,"Popup operations only handle one event");let e=tQ();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(p(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(p(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,nP.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(p(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,nT.get())};e()}}nP.currentPopupAction=null;let nR=new Map;class nx extends nS{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=nR.get(this.auth._key());if(!e){try{let t=await nN(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}nR.set(this.auth._key(),e)}return this.bypassAuthState||nR.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function nN(e,t){let n=nM(t),r=nj(e);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}async function nD(e,t){return nj(e)._set(nM(t),"true")}function nL(e,t){nR.set(e._key(),t)}function nj(e){return Q(e._redirectPersistence)}function nM(e){return et("pendingRedirect",e.config.apiKey,e.name)}async function nU(e,t,n){let r=eS(e);g(e,t,e0),await r._initializationPromise;let i=nb(r,n);return await nD(i,r),i._openRedirect(r,t,"signInViaRedirect")}async function nF(e,t,n){let r=i.getModularInstance(e);g(r.auth,t,e0),await r.auth._initializationPromise;let a=nb(r.auth,n);await nD(a,r.auth);let s=await nz(r);return a._openRedirect(r.auth,t,"reauthViaRedirect",s)}async function n$(e,t,n){let r=i.getModularInstance(e);g(r.auth,t,e0),await r.auth._initializationPromise;let a=nb(r.auth,n);await tu(!1,r,t.providerId),await nD(a,r.auth);let s=await nz(r);return a._openRedirect(r.auth,t,"linkViaRedirect",s)}async function nB(e,t){return await eS(e)._initializationPromise,nH(e,t,!1)}async function nH(e,t,n=!1){let r=eS(e),i=nb(r,t),a=new nx(r,i,n),s=await a.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}async function nz(e){let t=tQ(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}class nV{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return nG(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!nG(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(p(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(nq(e))}saveEventToCache(e){this.cachedEventUids.add(nq(e)),this.lastProcessedEventTime=Date.now()}}function nq(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function nG({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function nW(e,t={}){return P(e,"GET","/v1/projects",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let nK=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nZ=/^https?/;async function nJ(e){if(e.config.emulator)return;let{authorizedDomains:t}=await nW(e);for(let e of t)try{if(function(e){let t=w(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!nZ.test(n))return!1;if(nK.test(e))return r===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}(e))return}catch(e){}f(e,"unauthorized-domain")}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let nX=new k(3e4,6e4);function nY(){let e=t1().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let nQ=null,n0=new k(5e3,15e3),n1={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},n2=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function n3(e){let t=await (nQ=nQ||new Promise((t,n)=>{var r,i,a;function s(){nY(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{nY(),n(p(e,"network-request-failed"))},timeout:nX.get()})}if(null===(i=null===(r=t1().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(a=t1().gapi)||void 0===a?void 0:a.load)s();else{let t=eb("iframefcb");return t1()[t]=()=>{gapi.load?s():n(p(e,"network-request-failed"))},e_(`https://apis.google.com/js/api.js?onload=${t}`).catch(e=>n(e))}}).catch(e=>{throw nQ=null,e})),n=t1().gapi;return y(n,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;y(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?S(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:a.SDK_VERSION},s=n2.get(e.config.apiHost);s&&(r.eid=s);let o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${i.querystring(r).slice(1)}`}(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:n1,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=p(e,"network-request-failed"),a=t1().setTimeout(()=>{r(i)},n0.get());function s(){t1().clearTimeout(a),n(t)}t.ping(s).then(s,()=>{r(i)})}))}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let n4={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class n5{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let n6=encodeURIComponent("fac");async function n9(e,t,n,r,s,o){y(e.config.authDomain,e,"auth-domain-config-required"),y(e.config.apiKey,e,"invalid-api-key");let u={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:a.SDK_VERSION,eventId:s};if(t instanceof e0)for(let[n,r]of(t.setDefaultLanguage(e.languageCode),u.providerId=t.providerId||"",i.isEmpty(t.getCustomParameters())||(u.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(o||{})))u[n]=r;if(t instanceof e1){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(u.scopes=e.join(","))}for(let t of(e.tenantId&&(u.tid=e.tenantId),Object.keys(u)))void 0===u[t]&&delete u[t];let c=await e._getAppCheckToken(),l=c?`#${n6}=${encodeURIComponent(c)}`:"";return`${function({config:e}){return e.emulator?S(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${i.querystring(u).slice(1)}${l}`}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let n8="webStorageSupport";class n7{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=tX,this._completeRedirectFn=nH,this._overrideRedirectResult=nL}async _openPopup(e,t,n,r){var a;b(null===(a=this.eventManagers[e._key()])||void 0===a?void 0:a.manager,"_initialize() not called before _openPopup()");let s=await n9(e,t,n,w(),r);return function(e,t,n,r=500,a=600){let s=Math.max((window.screen.availHeight-a)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),u="",c=Object.assign(Object.assign({},n4),{width:r.toString(),height:a.toString(),top:s,left:o}),l=i.getUA().toLowerCase();n&&(u=es(l)?"_blank":n),ei(l)&&(t=t||"http://localhost",c.scrollbars="yes");let d=Object.entries(c).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=i.getUA()){var t;return ed(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==u)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",u),new n5(null);let h=window.open(t||"",u,d);y(h,e,"popup-blocked");try{h.focus()}catch(e){}return new n5(h)}(e,s,tQ())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=await n9(e,t,n,w(),r),t1().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(b(n,"If manager is not set, promise should be"),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await n3(e),n=new nV(e);return t.register("authEvent",t=>(y(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(n8,{type:n8},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[n8];void 0!==i&&t(!!i),f(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nJ(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eh()||ea()||ed()}}class re{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return _("unexpected MultiFactorSessionType")}}}class rt extends re{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new rt(e)}_finalizeEnroll(e,t,n){return P(e,"POST","/v2/accounts/mfaEnrollment:finalize",C(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:finalize",C(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class rn{constructor(){}static assertion(e){return rt._fromCredential(e)}}rn.FACTOR_ID="phone";class rr{static assertionForEnrollment(e,t){return ri._fromSecret(e,t)}static assertionForSignIn(e,t){return ri._fromEnrollmentId(e,t)}static async generateSecret(e){var t;y(void 0!==e.auth,"internal-error");let n=await P(t=e.auth,"POST","/v2/accounts/mfaEnrollment:start",C(t,{idToken:e.credential,totpEnrollmentInfo:{}}));return ra._fromStartTotpMfaEnrollmentResponse(n,e.auth)}}rr.FACTOR_ID="totp";class ri extends re{constructor(e,t,n){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(e,t){return new ri(t,void 0,e)}static _fromEnrollmentId(e,t){return new ri(t,e)}async _finalizeEnroll(e,t,n){return y(void 0!==this.secret,e,"argument-error"),P(e,"POST","/v2/accounts/mfaEnrollment:finalize",C(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){y(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let n={verificationCode:this.otp};return P(e,"POST","/v2/accounts/mfaSignIn:finalize",C(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n}))}}class ra{constructor(e,t,n,r,i,a,s){this.sessionInfo=a,this.auth=s,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new ra(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var n;let r=!1;return(rs(e)||rs(t))&&(r=!0),r&&(rs(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),rs(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function rs(e){return void 0===e||(null==e?void 0:e.length)===0}var ro="@firebase/auth",ru="0.23.2";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class rc{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){y(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let rl=i.getExperimentalSetting("authIdTokenMaxAge")||300,rd=null,rh=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>rl)return;let i=null==n?void 0:n.token;rd!==i&&(rd=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};r="Browser",a._registerComponent(new u.Component("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),{apiKey:s,authDomain:o}=n.options;y(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});let u=new ek(n,i,a,{apiKey:s,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ef(r)});return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Q);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(u,t),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),a._registerComponent(new u.Component("auth-internal",e=>new rc(eS(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),a.registerVersion(ro,ru,/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(r)),a.registerVersion(ro,ru,"cjs2017"),t.AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY={ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized",RECAPTCHA_NOT_ENABLED:"auth/recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"auth/missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"auth/invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"auth/invalid-recaptcha-action",MISSING_CLIENT_TYPE:"auth/missing-client-type",MISSING_RECAPTCHA_VERSION:"auth/missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"auth/invalid-recaptcha-version",INVALID_REQ_TYPE:"auth/invalid-req-type"},t.ActionCodeOperation={EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"},t.ActionCodeURL=eY,t.AuthCredential=eR,t.AuthEventManager=nV,t.AuthImpl=ek,t.AuthPopup=n5,t.EmailAuthCredential=ez,t.EmailAuthProvider=eQ,t.FacebookAuthProvider=e3,t.FactorId={PHONE:"phone",TOTP:"totp"},t.FetchProvider=T,t.GithubAuthProvider=e5,t.GoogleAuthProvider=e4,t.OAuthCredential=eq,t.OAuthProvider=e2,t.OperationType={LINK:"link",REAUTHENTICATE:"reauthenticate",SIGN_IN:"signIn"},t.PhoneAuthCredential=eX,t.PhoneAuthProvider=n_,t.PhoneMultiFactorGenerator=rn,t.ProviderId={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},t.RecaptchaVerifier=nh,t.SAMLAuthCredential=e6,t.SAMLAuthProvider=e9,t.SignInMethod={EMAIL_LINK:"emailLink",EMAIL_PASSWORD:"password",FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PHONE:"phone",TWITTER:"twitter.com"},t.TotpMultiFactorGenerator=rr,t.TotpSecret=ra,t.TwitterAuthProvider=e8,t.UserImpl=X,t._assert=y,t._castAuth=eS,t._clearRedirectOutcomes=function(){nR.clear()},t._createError=p,t._fail=f,t._generateEventId=tQ,t._getClientVersion=ef,t._getInstance=Q,t._getProjectConfig=nW,t._getRedirectResult=nH,t._getRedirectUrl=n9,t._isAndroid=eu,t._isIOS=ed,t._isIOS7Or8=function(e=i.getUA()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)},t._overrideRedirectResult=nL,t._persistenceKeyName=et,t.applyActionCode=tE,t.beforeAuthStateChanged=tH,t.browserLocalPersistence=tJ,t.browserPopupRedirectResolver=n7,t.browserSessionPersistence=tX,t.checkActionCode=tI,t.confirmPasswordReset=tw,t.connectAuthEmulator=eA,t.createUserWithEmailAndPassword=tS,t.debugAssert=b,t.debugErrorMap=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-password":"A non-empty password must be provided","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.","missing-recaptcha-token":"The reCAPTCHA token is missing when sending request to the backend.","invalid-recaptcha-token":"The reCAPTCHA token is invalid when sending request to the backend.","invalid-recaptcha-action":"The reCAPTCHA action is invalid when sending request to the backend.","recaptcha-not-enabled":"reCAPTCHA Enterprise integration is not enabled for this project.","missing-client-type":"The reCAPTCHA client type is missing when sending request to the backend.","missing-recaptcha-version":"The reCAPTCHA version is missing when sending request to the backend.","invalid-req-type":"Invalid request parameters.","invalid-recaptcha-version":"The reCAPTCHA version is invalid when sending request to the backend."}},t.deleteUser=tz,t.fetchSignInMethodsForEmail=tC,t.getAdditionalUserInfo=function(e){let{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){var t,n;if(!e)return null;let{providerId:r}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},a=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null==e?void 0:e.idToken)){let r=null===(n=null===(t=H(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(r)return new tL(a,"anonymous"!==r&&"custom"!==r?r:null)}if(!r)return null;switch(r){case"facebook.com":return new tM(a,i);case"github.com":return new tU(a,i);case"google.com":return new tF(a,i);case"twitter.com":return new t$(a,i,e.screenName||null);case"custom":case"anonymous":return new tL(a,null);default:return new tL(a,r,i)}}(n)},t.getAuth=function(e=a.getApp()){let t=a._getProvider(e,"auth");if(t.isInitialized())return t.getImmediate();let n=eO(e,{popupRedirectResolver:n7,persistence:[nr,tJ,tX]}),r=i.getExperimentalSetting("authTokenSyncURL");if(r){let e=rh(r);tH(n,e,()=>e(n.currentUser)),tB(n,t=>e(t))}let s=i.getDefaultEmulatorHost("auth");return s&&eA(n,`http://${s}`),n},t.getIdToken=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t=!1){return i.getModularInstance(e).getIdToken(t)},t.getIdTokenResult=$,t.getMultiFactorResolver=function(e,t){var n;let r=i.getModularInstance(e);return y(t.customData.operationType,r,"argument-error"),y(null===(n=t.customData._serverResponse)||void 0===n?void 0:n.mfaPendingCredential,r,"argument-error"),tq._fromError(r,t)},t.getRedirectResult=nB,t.inMemoryPersistence=ee,t.indexedDBLocalPersistence=nr,t.initializeAuth=eO,t.initializeRecaptchaConfig=function(e){return eS(e).initializeRecaptchaConfig()},t.isSignInWithEmailLink=function(e,t){let n=eY.parseLink(t);return(null==n?void 0:n.operation)==="EMAIL_SIGNIN"},t.linkWithCredential=th,t.linkWithPhoneNumber=nm,t.linkWithPopup=nC,t.linkWithRedirect=function(e,t,n){return n$(e,t,n)},t.multiFactor=function(e){let t=i.getModularInstance(e);return tW.has(t)||tW.set(t,tG._fromUser(t)),tW.get(t)},t.onAuthStateChanged=function(e,t,n,r){return i.getModularInstance(e).onAuthStateChanged(t,n,r)},t.onIdTokenChanged=tB,t.parseActionCodeURL=function(e){return eY.parseLink(e)},t.prodErrorMap=c,t.reauthenticateWithCredential=tf,t.reauthenticateWithPhoneNumber=ng,t.reauthenticateWithPopup=nA,t.reauthenticateWithRedirect=function(e,t,n){return nF(e,t,n)},t.reload=W,t.sendEmailVerification=tP,t.sendPasswordResetEmail=tb,t.sendSignInLinkToEmail=tT,t.setPersistence=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t){return i.getModularInstance(e).setPersistence(t)},t.signInAnonymously=tn,t.signInWithCredential=td,t.signInWithCustomToken=tm,t.signInWithEmailAndPassword=function(e,t,n){return td(i.getModularInstance(e),eQ.credential(t,n))},t.signInWithEmailLink=tO,t.signInWithPhoneNumber=np,t.signInWithPopup=nO,t.signInWithRedirect=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t,n){return nU(e,t,n)},t.signOut=function(e){return i.getModularInstance(e).signOut()},t.unlink=ts,t.updateCurrentUser=function(e,t){return i.getModularInstance(e).updateCurrentUser(t)},t.updateEmail=function(e,t){return tD(i.getModularInstance(e),t,null)},t.updatePassword=function(e,t){return tD(i.getModularInstance(e),null,t)},t.updatePhoneNumber=ny,t.updateProfile=tN,t.useDeviceLanguage=function(e){i.getModularInstance(e).useDeviceLanguage()},t.verifyBeforeUpdateEmail=tR,t.verifyPasswordResetCode=tk},44156:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84122);n(90735),n(50470),n(62831),n(53437),n(87929),t.ActionCodeOperation=r.ActionCodeOperation,t.ActionCodeURL=r.ActionCodeURL,t.AuthCredential=r.AuthCredential,t.AuthErrorCodes=r.AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY,t.EmailAuthCredential=r.EmailAuthCredential,t.EmailAuthProvider=r.EmailAuthProvider,t.FacebookAuthProvider=r.FacebookAuthProvider,t.FactorId=r.FactorId,t.GithubAuthProvider=r.GithubAuthProvider,t.GoogleAuthProvider=r.GoogleAuthProvider,t.OAuthCredential=r.OAuthCredential,t.OAuthProvider=r.OAuthProvider,t.OperationType=r.OperationType,t.PhoneAuthCredential=r.PhoneAuthCredential,t.PhoneAuthProvider=r.PhoneAuthProvider,t.PhoneMultiFactorGenerator=r.PhoneMultiFactorGenerator,t.ProviderId=r.ProviderId,t.RecaptchaVerifier=r.RecaptchaVerifier,t.SAMLAuthProvider=r.SAMLAuthProvider,t.SignInMethod=r.SignInMethod,t.TotpMultiFactorGenerator=r.TotpMultiFactorGenerator,t.TotpSecret=r.TotpSecret,t.TwitterAuthProvider=r.TwitterAuthProvider,t.applyActionCode=r.applyActionCode,t.beforeAuthStateChanged=r.beforeAuthStateChanged,t.browserLocalPersistence=r.browserLocalPersistence,t.browserPopupRedirectResolver=r.browserPopupRedirectResolver,t.browserSessionPersistence=r.browserSessionPersistence,t.checkActionCode=r.checkActionCode,t.confirmPasswordReset=r.confirmPasswordReset,t.connectAuthEmulator=r.connectAuthEmulator,t.createUserWithEmailAndPassword=r.createUserWithEmailAndPassword,t.debugErrorMap=r.debugErrorMap,t.deleteUser=r.deleteUser,t.fetchSignInMethodsForEmail=r.fetchSignInMethodsForEmail,t.getAdditionalUserInfo=r.getAdditionalUserInfo,t.getAuth=r.getAuth,t.getIdToken=r.getIdToken,t.getIdTokenResult=r.getIdTokenResult,t.getMultiFactorResolver=r.getMultiFactorResolver,t.getRedirectResult=r.getRedirectResult,t.inMemoryPersistence=r.inMemoryPersistence,t.indexedDBLocalPersistence=r.indexedDBLocalPersistence,t.initializeAuth=r.initializeAuth,t.initializeRecaptchaConfig=r.initializeRecaptchaConfig,t.isSignInWithEmailLink=r.isSignInWithEmailLink,t.linkWithCredential=r.linkWithCredential,t.linkWithPhoneNumber=r.linkWithPhoneNumber,t.linkWithPopup=r.linkWithPopup,t.linkWithRedirect=r.linkWithRedirect,t.multiFactor=r.multiFactor,t.onAuthStateChanged=r.onAuthStateChanged,t.onIdTokenChanged=r.onIdTokenChanged,t.parseActionCodeURL=r.parseActionCodeURL,t.prodErrorMap=r.prodErrorMap,t.reauthenticateWithCredential=r.reauthenticateWithCredential,t.reauthenticateWithPhoneNumber=r.reauthenticateWithPhoneNumber,t.reauthenticateWithPopup=r.reauthenticateWithPopup,t.reauthenticateWithRedirect=r.reauthenticateWithRedirect,t.reload=r.reload,t.sendEmailVerification=r.sendEmailVerification,t.sendPasswordResetEmail=r.sendPasswordResetEmail,t.sendSignInLinkToEmail=r.sendSignInLinkToEmail,t.setPersistence=r.setPersistence,t.signInAnonymously=r.signInAnonymously,t.signInWithCredential=r.signInWithCredential,t.signInWithCustomToken=r.signInWithCustomToken,t.signInWithEmailAndPassword=r.signInWithEmailAndPassword,t.signInWithEmailLink=r.signInWithEmailLink,t.signInWithPhoneNumber=r.signInWithPhoneNumber,t.signInWithPopup=r.signInWithPopup,t.signInWithRedirect=r.signInWithRedirect,t.signOut=r.signOut,t.unlink=r.unlink,t.updateCurrentUser=r.updateCurrentUser,t.updateEmail=r.updateEmail,t.updatePassword=r.updatePassword,t.updatePhoneNumber=r.updatePhoneNumber,t.updateProfile=r.updateProfile,t.useDeviceLanguage=r.useDeviceLanguage,t.verifyBeforeUpdateEmail=r.verifyBeforeUpdateEmail,t.verifyPasswordResetCode=r.verifyPasswordResetCode},87929:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62831),i=n(90735),a=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}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.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),s="[DEFAULT]",o=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.Deferred;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}else{if(r)return null;throw Error("Service ".concat(this.name," is not available"))}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:s})}catch(e){}try{for(var i=r.__values(this.instancesDeferred.entries()),a=i.next();!a.done;a=i.next()){var o=r.__read(a.value,2),u=o[0],c=o[1],l=this.normalizeInstanceIdentifier(u);try{var d=this.getOrInitializeService({instanceIdentifier:l});c.resolve(d)}catch(e){}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=s),this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(r.__spreadArray(r.__spreadArray([],r.__read(e.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()})),!1),r.__read(e.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()})),!1))];case 1:return t.sent(),[2]}})})},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=s),this.instances.has(e)},e.prototype.getOptions=function(e){return void 0===e&&(e=s),this.instancesOptions.get(e)||{}},e.prototype.initialize=function(e){void 0===e&&(e={});var t,n,i=e.options,a=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(a))throw Error("".concat(this.name,"(").concat(a,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));var s=this.getOrInitializeService({instanceIdentifier:a,options:void 0===i?{}:i});try{for(var o=r.__values(this.instancesDeferred.entries()),u=o.next();!u.done;u=o.next()){var c=r.__read(u.value,2),l=c[0],d=c[1],h=this.normalizeInstanceIdentifier(l);a===h&&d.resolve(s)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return s},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,i,a=this.onInitCallbacks.get(t);if(a)try{for(var s=r.__values(a),o=s.next();!o.done;o=s.next()){var u=o.value;try{u(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:t===s?void 0:t,options:r}),this.instances.set(t,i),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch(e){}return i||null},e.prototype.normalizeInstanceIdentifier=function(e){return(void 0===e&&(e=s),this.component)?this.component.multipleInstances?e:s:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},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 Error("Component ".concat(e.name," has already been registered with ").concat(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 o(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();t.Component=a,t.ComponentContainer=u,t.Provider=o},53437:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,a=n(62831),s=[];t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={}))[r.DEBUG=0]="DEBUG",r[r.VERBOSE=1]="VERBOSE",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.SILENT=5]="SILENT";var o={debug:t.LogLevel.DEBUG,verbose:t.LogLevel.VERBOSE,info:t.LogLevel.INFO,warn:t.LogLevel.WARN,error:t.LogLevel.ERROR,silent:t.LogLevel.SILENT},u=t.LogLevel.INFO,c=((i={})[t.LogLevel.DEBUG]="log",i[t.LogLevel.VERBOSE]="log",i[t.LogLevel.INFO]="info",i[t.LogLevel.WARN]="warn",i[t.LogLevel.ERROR]="error",i),l=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var i=new Date().toISOString(),s=c[t];if(s)console[s].apply(console,a.__spreadArray(["[".concat(i,"]  ").concat(e.name,":")],n,!1));else throw Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"))}},d=function(){function e(e){this.name=e,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,s.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in t.LogLevel))throw TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?o[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw 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=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,a.__spreadArray([this,t.LogLevel.DEBUG],e,!1)),this._logHandler.apply(this,a.__spreadArray([this,t.LogLevel.DEBUG],e,!1))},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,a.__spreadArray([this,t.LogLevel.VERBOSE],e,!1)),this._logHandler.apply(this,a.__spreadArray([this,t.LogLevel.VERBOSE],e,!1))},e.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,a.__spreadArray([this,t.LogLevel.INFO],e,!1)),this._logHandler.apply(this,a.__spreadArray([this,t.LogLevel.INFO],e,!1))},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,a.__spreadArray([this,t.LogLevel.WARN],e,!1)),this._logHandler.apply(this,a.__spreadArray([this,t.LogLevel.WARN],e,!1))},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,a.__spreadArray([this,t.LogLevel.ERROR],e,!1)),this._logHandler.apply(this,a.__spreadArray([this,t.LogLevel.ERROR],e,!1))},e}();t.Logger=d,t.setLogLevel=function(e){s.forEach(function(t){t.setLogLevel(e)})},t.setUserLogHandler=function(e,n){for(var r=0;r<s.length;r++)!function(r){var i=null;n&&n.level&&(i=o[n.level]),null===e?r.userLogHandler=null:r.userLogHandler=function(n,r){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var o=a.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!=i?i:n.logLevel)&&e({level:t.LogLevel[r].toLowerCase(),message:o,args:a,type:n.name})}}(s[r])}},90735:function(e,t,n){"use strict";var r=n(17017);Object.defineProperty(t,"__esModule",{value:!0});/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},a=function(e,t){if(!e)throw s(t)},s=function(e){return Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},o=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:((64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},u=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){let a=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{let a=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}}return t.join("")},c={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],a=t+1<e.length,s=a?e[t+1]:0,o=t+2<e.length,u=o?e[t+2]:0,c=i>>2,l=(3&i)<<4|s>>4,d=(15&s)<<2|u>>6,h=63&u;o||(h=64,a||(d=64)),r.push(n[c],n[l],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(o(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):u(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let i=n[e.charAt(t++)],a=t<e.length?n[e.charAt(t)]:0,s=++t<e.length?n[e.charAt(t)]:64,o=++t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==a||null==s||null==o)throw new l;let u=i<<2|a>>4;if(r.push(u),64!==s){let e=a<<4&240|s>>2;if(r.push(e),64!==o){let e=s<<6&192|o;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let 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)}}};class l extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let d=function(e){let t=o(e);return c.encodeByteArray(t,!0)},h=function(e){return d(e).replace(/\./g,"")},f=function(e){try{return c.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function p(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(let n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=p(e[n],t[n]));return e}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function m(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let g=()=>m().__FIREBASE_DEFAULTS__,v=()=>{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},y=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&f(e[1]);return t&&JSON.parse(t)},_=()=>{try{return g()||v()||y()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},b=e=>{var t,n;return null===(n=null===(t=_())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class w{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function E(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function I(){var e;let t=null===(e=_())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}}class k extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,k.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,S.prototype.create)}}class S{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?i.replace(T,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`}):"Error",s=`${this.serviceName}: ${a} (${r}).`;return new k(r,s,n)}}let T=/\{\$([^}]+)}/g;/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function O(e){return JSON.parse(e)}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let A=function(e){let t={},n={},r={},i="";try{let a=e.split(".");t=O(f(a[0])||""),n=O(f(a[1])||""),i=a[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}};function C(e){return null!==e&&"object"==typeof e}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class P{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){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}compress_(e,t){let n,r;t||(t=0);let i=this.W_;if("string"==typeof e)for(let n=0;n<16;n++)i[n]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let n=0;n<16;n++)i[n]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let e=16;e<80;e++){let t=i[e-3]^i[e-8]^i[e-14]^i[e-16];i[e]=(t<<1|t>>>31)&4294967295}let a=this.chain_[0],s=this.chain_[1],o=this.chain_[2],u=this.chain_[3],c=this.chain_[4];for(let e=0;e<80;e++){e<40?e<20?(n=u^s&(o^u),r=1518500249):(n=s^o^u,r=1859775393):e<60?(n=s&o|u&(s|o),r=2400959708):(n=s^o^u,r=3395469782);let t=(a<<5|a>>>27)+n+c+r+i[e]&4294967295;c=u,u=o,o=(s<<30|s>>>2)&4294967295,s=a,a=t}this.chain_[0]=this.chain_[0]+a&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+u&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);let n=t-this.blockSize,r=0,i=this.buf_,a=this.inbuf_;for(;r<t;){if(0===a)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[a]=e.charCodeAt(r),++a,++r,a===this.blockSize){this.compress_(i),a=0;break}}else for(;r<t;)if(i[a]=e[r],++a,++r,a===this.blockSize){this.compress_(i),a=0;break}}this.inbuf_=a,this.total_+=t}digest(){let 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(let e=this.blockSize-1;e>=56;e--)this.buf_[e]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let t=0;t<5;t++)for(let r=24;r>=0;r-=8)e[n]=this.chain_[t]>>r&255,++n;return e}}class R{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=x),void 0===r.error&&(r.error=x),void 0===r.complete&&(r.complete=x);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(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))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function x(){}function N(e,t){return`${e} failed: ${t} argument `}t.CONSTANTS=i,t.DecodeBase64StringError=l,t.Deferred=w,t.ErrorFactory=S,t.FirebaseError=k,t.MAX_VALUE_MILLIS=144e5,t.RANDOM_FACTOR=.5,t.Sha1=P,t.areCookiesEnabled=function(){return"undefined"!=typeof navigator&&!!navigator.cookieEnabled},t.assert=a,t.assertionError=s,t.async=function(e,t){return(...n)=>{Promise.resolve(!0).then(()=>{e(...n)}).catch(e=>{t&&t(e)})}},t.base64=c,t.base64Decode=f,t.base64Encode=d,t.base64urlEncodeWithoutPadding=h,t.calculateBackoffMillis=function(e,t=1e3,n=2){let r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)},t.contains=/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createMockUserToken=/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let a=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[h(JSON.stringify({alg:"none",type:"JWT"})),h(JSON.stringify(a)),""].join(".")},t.createSubscribe=function(e,t){let n=new R(e,t);return n.subscribe.bind(n)},t.decode=A,t.deepCopy=/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){return p(void 0,e)},t.deepEqual=function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let a of r){if(!i.includes(a))return!1;let r=t[a],s=n[a];if(C(r)&&C(s)){if(!e(r,s))return!1}else if(r!==s)return!1}for(let e of i)if(!r.includes(e))return!1;return!0},t.deepExtend=p,t.errorPrefix=N,t.extractQuerystring=function(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)},t.getDefaultAppConfig=()=>{var e;return null===(e=_())||void 0===e?void 0:e.config},t.getDefaultEmulatorHost=b,t.getDefaultEmulatorHostnameAndPort=e=>{let t=b(e);if(!t)return;let n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},t.getDefaults=_,t.getExperimentalSetting=e=>{var t;return null===(t=_())||void 0===t?void 0:t[`_${e}`]},t.getGlobal=m,t.getModularInstance=/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){return e&&e._delegate?e._delegate:e},t.getUA=E,t.isAdmin=function(e){let t=A(e).claims;return"object"==typeof t&&!0===t.admin},t.isBrowser=function(){return"object"==typeof self&&self.self===self},t.isBrowserExtension=function(){let 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 E().indexOf("Electron/")>=0},t.isEmpty=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isIE=function(){let e=E();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},t.isIndexedDBAvailable=function(){try{return"object"==typeof indexedDB}catch(e){return!1}},t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(E())},t.isNode=I,t.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.isSafari=function(){return!I()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},t.isUWP=function(){return E().indexOf("MSAppHost/")>=0},t.isValidFormat=function(e){let t=A(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){let t=A(e).claims,n=Math.floor(new Date().getTime()/1e3),r=0,i=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),i=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},t.issuedAtTime=function(e){let t=A(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=O,t.map=function(e,t,n){let r={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r},t.ordinal=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){return Number.isFinite(e)?e+function(e){let t=(e=Math.abs(e))%100;if(t>=10&&t<=20)return"th";let n=e%10;return 1===n?"st":2===n?"nd":3===n?"rd":"th"}(e):`${e}`},t.promiseWithTimeout=/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t=2e3){let n=new w;return setTimeout(()=>n.reject("timeout!"),t),e.then(n.resolve,n.reject),n.promise},t.querystring=/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i>=55296&&i<=56319){let t=i-55296;a(++r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(t<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},t.validateArgCount=function(e,t,n,r){let i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},t.validateCallback=function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw Error(N(e,t)+"must be a valid function.")},t.validateContextObject=function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw Error(N(e,t)+"must be a valid context object.")},t.validateIndexedDBOpenable=function(){return new Promise((e,t)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})},t.validateNamespace=function(e,t,n){if((!n||t)&&"string"!=typeof t)throw Error(N(e,"namespace")+"must be a valid firebase namespace.")}},21025:function(e,t,n){"use strict";n.d(t,{BH:function(){return y},L:function(){return c},LL:function(){return O},Pz:function(){return v},ZR:function(){return T},aH:function(){return g},b$:function(){return E},eu:function(){return S},hl:function(){return k},k$:function(){return M},m9:function(){return U},ne:function(){return D},pd:function(){return N},q4:function(){return m},ru:function(){return w},tV:function(){return l},uI:function(){return b},vZ:function(){return function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let a of r){if(!i.includes(a))return!1;let r=t[a],s=n[a];if(P(r)&&P(s)){if(!e(r,s))return!1}else if(r!==s)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}},w1:function(){return I},xO:function(){return R},xb:function(){return C},z$:function(){return _},zd:function(){return x}});var r=n(17017);/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let i=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:((64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},a=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){let a=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{let a=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}}return t.join("")},s={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],a=t+1<e.length,s=a?e[t+1]:0,o=t+2<e.length,u=o?e[t+2]:0,c=i>>2,l=(3&i)<<4|s>>4,d=(15&s)<<2|u>>6,h=63&u;o||(h=64,a||(d=64)),r.push(n[c],n[l],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):a(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let i=n[e.charAt(t++)],a=t<e.length?n[e.charAt(t)]:0,s=++t<e.length?n[e.charAt(t)]:64,u=++t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==a||null==s||null==u)throw new o;let c=i<<2|a>>4;if(r.push(c),64!==s){let e=a<<4&240|s>>2;if(r.push(e),64!==u){let e=s<<6&192|u;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let 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)}}};class o extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let u=function(e){let t=i(e);return s.encodeByteArray(t,!0)},c=function(e){return u(e).replace(/\./g,"")},l=function(e){try{return s.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},d=()=>/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,h=()=>{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},f=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&l(e[1]);return t&&JSON.parse(t)},p=()=>{try{return d()||h()||f()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},m=e=>{var t,n;return null===(n=null===(t=p())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},g=()=>{var e;return null===(e=p())||void 0===e?void 0:e.config},v=e=>{var t;return null===(t=p())||void 0===t?void 0:t[`_${e}`]};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class y{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function _(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function b(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(_())}function w(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function E(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function I(){let e=_();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function k(){try{return"object"==typeof indexedDB}catch(e){return!1}}function S(){return new Promise((e,t)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}class T extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,T.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,O.prototype.create)}}class O{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?i.replace(A,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`}):"Error",s=`${this.serviceName}: ${a} (${r}).`;return new T(r,s,n)}}let A=/\{\$([^}]+)}/g;function C(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function P(e){return null!==e&&"object"==typeof e}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function R(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function x(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function N(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function D(e,t){let n=new L(e,t);return n.subscribe.bind(n)}class L{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=j),void 0===r.error&&(r.error=j),void 0===r.complete&&(r.complete=j);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(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))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function j(){}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let M=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})};/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function U(e){return e&&e._delegate?e._delegate:e}},12030:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(67168),i=n(18381);t.default=function({html:e,height:t=null,width:n=null,children:a,dataNtpc:s=""}){return(0,i.useEffect)(()=>{s&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${s}`}})},[s]),(0,r.jsxs)(r.Fragment,{children:[a,e?(0,r.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=n?`${n}px`:"auto"},"data-ntpc":s,dangerouslySetInnerHTML:{__html:e}}):null]})}},98216:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=void 0;let a=n(67168),s=n(18381),o=i(n(36340));t.GoogleAnalytics=function(e){let{gaId:t,dataLayerName:n="dataLayer"}=e;return void 0===r&&(r=n),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
          window['${n}'] = window['${n}'] || [];
          function gtag(){window['${n}'].push(arguments);}
          gtag('js', new Date());

          gtag('config', '${t}');`}}),(0,a.jsx)(o.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`})]})},t.sendGAEvent=function(...e){if(void 0===r){console.warn("@next/third-parties: GA has not been initialized");return}window[r]?window[r].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${r} does not exist`)}},66013:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(67168),a=n(41579),s=r(n(12030));t.default=function(e){let{apiKey:t,...n}=e,r={...n,key:t},{html:o}=(0,a.GoogleMapsEmbed)(r);return(0,i.jsx)(s.default,{height:r.height||null,width:r.width||null,html:o,dataNtpc:"GoogleMapsEmbed"})}},67319:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=t.GoogleTagManager=void 0;let a=n(67168),s=n(18381),o=i(n(36340));t.GoogleTagManager=function(e){let{gtmId:t,dataLayerName:n="dataLayer",auth:i,preview:u,dataLayer:c}=e;void 0===r&&(r=n);let l="dataLayer"!==n?`&l=${n}`:"",d=i?`&gtm_auth=${i}`:"",h=u?`&gtm_preview=${u}&gtm_cookies_win=x`:"";return(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
      (function(w,l){
        w[l]=w[l]||[];
        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
        ${c?`w[l].push(${JSON.stringify(c)})`:""}
      })(window,'${n}');`}}),(0,a.jsx)(o.default,{id:"_next-gtm","data-ntpc":"GTM",src:`https://www.googletagmanager.com/gtm.js?id=${t}${l}${d}${h}`})]})},t.sendGTMEvent=e=>{if(void 0===r){console.warn("@next/third-parties: GTM has not been initialized");return}window[r]?window[r].push(e):console.warn(`@next/third-parties: GTM dataLayer ${r} does not exist`)}},46847:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=t.sendGTMEvent=t.GoogleTagManager=t.YouTubeEmbed=t.GoogleMapsEmbed=void 0;var i=n(66013);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return r(i).default}});var a=n(29743);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return r(a).default}});var s=n(67319);Object.defineProperty(t,"GoogleTagManager",{enumerable:!0,get:function(){return s.GoogleTagManager}}),Object.defineProperty(t,"sendGTMEvent",{enumerable:!0,get:function(){return s.sendGTMEvent}});var o=n(98216);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return o.GoogleAnalytics}}),Object.defineProperty(t,"sendGAEvent",{enumerable:!0,get:function(){return o.sendGAEvent}})},29743:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(67168),a=r(n(36340)),s=n(41579),o=r(n(12030)),u={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"};t.default=function(e){let{html:t,scripts:n,stylesheets:r}=(0,s.YouTubeEmbed)(e);return(0,i.jsx)(o.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==n?void 0:n.map(e=>(0,i.jsx)(a.default,{src:e.url,strategy:u[e.strategy],stylesheets:r},e.url))})}},86133:function(e,t){"use strict";let n=e=>{let t=e.method;return t&&({GET:" -X GET",POST:" -X POST",PUT:" -X PUT",PATCH:" -X PATCH",DELETE:" -X DELETE",HEAD:" -X HEAD",OPTIONS:" -X OPTIONS"})[t.toUpperCase()]||""},r=e=>"function"==typeof Headers&&e instanceof Headers,i=(e,t)=>` -H "${e}: ${`${t}`.replace(/(\\|")/g,"\\$1")}"`,a=(e={})=>{let{headers:t}=e,n=!1,a="";return r(t)?t.forEach((e,t)=>{"content-length"!==t.toLocaleLowerCase()&&(a+=i(t,e)),"accept-encoding"===t.toLocaleLowerCase()&&(n=!0)}):t&&Object.keys(t).map(e=>{"content-length"!==e.toLocaleLowerCase()&&(a+=i(e,t[e])),"accept-encoding"===e.toLocaleLowerCase()&&(n=!0)}),{params:a,isEncode:n}};function s(e){return"string"==typeof e?e.replace(/'/g,"'\\''"):e}t.ZP=(e,t)=>{let r,i;"string"==typeof e||e instanceof URL?(r=e,i=t||{}):(r=(e||{}).url,i=e||{});let{body:o}=i,u=a(i);return`curl '${r}'${n(i)}${u.params||""}${o?"object"==typeof o?` --data-binary '${s(JSON.stringify(o))}'`:` --data-binary '${s(o)}'`:""}${u.isEncode?" --compressed":""}`}},79538:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50470);/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */r.registerVersion("firebase","9.23.0","app"),Object.keys(r).forEach(function(e){"default"===e||t.hasOwnProperty(e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})},65994:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44156);Object.keys(r).forEach(function(e){"default"===e||t.hasOwnProperty(e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})},64498:function(e,t,n){"use strict";var r=n(58155),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function u(e){return r.isMemo(e)?s:o[e.$$typeof]||i}o[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[r.Memo]=s;var c=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var s=l(n);d&&(s=s.concat(d(n)));for(var o=u(t),m=u(n),g=0;g<s.length;++g){var v=s[g];if(!a[v]&&!(r&&r[v])&&!(m&&m[v])&&!(o&&o[v])){var y=h(n,v);try{c(t,v,y)}catch(e){}}}}return t}},59309:function(e,t){"use strict";/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case d:case a:case o:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case u:return e;default:return t}}case i:return t}}}function E(e){return w(e)===d}t.AsyncMode=l,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=u,t.Element=r,t.ForwardRef=h,t.Fragment=a,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=o,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||w(e)===l},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===o},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===o||e===s||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===_||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},58155:function(e,t,n){"use strict";e.exports=n(59309)},56462:function(e,t){"use strict";t.Z=function(e,t){void 0===t&&(t="localhost:3000");var n=((null==e?void 0:e.headers)?e.headers.host:window.location.host)||t,r=/^localhost(:\d+)?$/.test(n)?"http:":"https:";return e&&e.headers["x-forwarded-host"]&&"string"==typeof e.headers["x-forwarded-host"]&&(n=e.headers["x-forwarded-host"]),e&&e.headers["x-forwarded-proto"]&&"string"==typeof e.headers["x-forwarded-proto"]&&(r=e.headers["x-forwarded-proto"]+":"),{protocol:r,host:n,origin:r+"//"+n}}},93416:function(e,t,n){var r=n(17017);(()=>{"use strict";var t={281:(e,t,n)=>{var r=n(469),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function u(e){return r.isMemo(e)?s:o[e.$$typeof]||i}o[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[r.Memo]=s;var c=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var s=l(n);d&&(s=s.concat(d(n)));for(var o=u(t),m=u(n),g=0;g<s.length;++g){var v=s[g];if(!(a[v]||r&&r[v]||m&&m[v]||o&&o[v])){var y=h(n,v);try{c(t,v,y)}catch(e){}}}}return t}},355:(e,t,n)=>{n.d(t,{S:()=>i,Z:()=>a});var r=n(689),i=(0,r.createContext)(void 0);let a=function(){var e=(0,r.useContext)(i);if(!e)throw Error("When using `useUser`, the page must be wrapped in `withUser`.");return e}},324:e=>{e.exports=n(79538)},610:e=>{e.exports=n(65994)},853:e=>{e.exports=n(10655)},689:e=>{e.exports=n(18381)},469:e=>{e.exports=n(55711)}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{a.r(s),a.d(s,{AuthAction:()=>t,getUserFromCookies:()=>L,init:()=>D,setAuthCookies:()=>j,unsetAuthCookies:()=>M,useUser:()=>g.Z,verifyIdToken:()=>U,withUser:()=>N,withUserSSR:()=>F,withUserTokenSSR:()=>$});var e,t,n=a(324),i=a(610);let o=function(){return"undefined"!=typeof window};var u=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},c=!1;let l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(c){var n=o()?["%cnext-firebase-auth","background: #ffa000; color: #fff; border-radius: 2px; padding: 2px 6px"]:["next-firebase-auth:"];console.log.apply(console,u(u([],n,!1),e,!1))}};var d,h={debug:!1,onVerifyTokenError:function(e){},onTokenRefreshError:function(e){},cookies:{httpOnly:!0,maxAge:6048e5,overwrite:!0,path:"/",sameSite:"strict",secure:!0,signed:!0}},f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},p=function(e){l("[init] Setting config with provided value:",f(f(f({},e),{cookies:f(f({},e.cookies),{keys:["hidden"]})}),e.firebaseAdminInitConfig&&{firebaseAdminInitConfig:f(f({},e.firebaseAdminInitConfig),e.firebaseAdminInitConfig.credential&&{credential:f(f({},e.firebaseAdminInitConfig.credential),{privateKey:"hidden",clientEmail:"hidden"})})}));var t,n,i,a,s=e.cookies,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["cookies"]),c=f(f(f({},h),u),{cookies:f(f({},h.cookies),s||{})}),p=(t=[],c.tokenChangedHandler&&(c.loginAPIEndpoint&&t.push('The "loginAPIEndpoint" setting should not be set if you are using a "tokenChangedHandler".'),c.logoutAPIEndpoint&&t.push('The "logoutAPIEndpoint" setting should not be set if you are using a "tokenChangedHandler".'),c.onLoginRequestError&&t.push('The "onLoginRequestError" setting should not be set if you are using a "tokenChangedHandler".'),c.onLogoutRequestError&&t.push('The "onLogoutRequestError" setting should not be set if you are using a "tokenChangedHandler".')),c.firebaseClientInitConfig&&c.firebaseClientInitConfig.apiKey||t.push('The "firebaseClientInitConfig.apiKey" value is required.'),c.firebaseAuthEmulatorHost&&c.firebaseAuthEmulatorHost.startsWith("http")&&t.push("The firebaseAuthEmulatorHost should be set without a prefix (e.g., localhost:9099)"),0>(n=["function","undefined"]).indexOf(typeof c.onVerifyTokenError)&&t.push('Invalid next-firebase-auth options: The "onVerifyTokenError" setting must be a function.'),0>n.indexOf(typeof c.onTokenRefreshError)&&t.push('Invalid next-firebase-auth options: The "onTokenRefreshError" setting must be a function.'),0>n.indexOf(typeof c.onLoginRequestError)&&t.push('Invalid next-firebase-auth options: The "onLoginRequestError" setting must be a function.'),0>n.indexOf(typeof c.onLogoutRequestError)&&t.push('Invalid next-firebase-auth options: The "onLogoutRequestError" setting must be a function.'),a=Array.isArray(i=c.cookies.keys)?i.length&&(!i.filter||i.filter(function(e){return void 0!==e}).length):!!i,o()?(c.tokenChangedHandler||(c.loginAPIEndpoint||t.push('The "loginAPIEndpoint" setting is required.'),c.logoutAPIEndpoint||t.push('The "logoutAPIEndpoint" setting is required.')),c.firebaseAdminInitConfig&&c.firebaseAdminInitConfig.credential&&c.firebaseAdminInitConfig.credential.privateKey&&t.push('The "firebaseAdminInitConfig" private key setting should not be available on the client side.'),a&&t.push('The "cookies.keys" setting should not be available on the client side.')):(c.cookies.name||t.push('The "cookies.name" setting is required on the server side.'),c.firebaseAuthEmulatorHost&&(r.env.FIREBASE_AUTH_EMULATOR_HOST?r.env.FIREBASE_AUTH_EMULATOR_HOST!==c.firebaseAuthEmulatorHost&&t.push('The "FIREBASE_AUTH_EMULATOR_HOST" environment variable should be the same as the host set in the config'):t.push('The "FIREBASE_AUTH_EMULATOR_HOST" environment variable should be set if you are using the "firebaseAuthEmulatorHost" option')),(!c.cookies.maxAge||c.cookies.maxAge>12096e5)&&t.push('The "cookies.maxAge" setting must be less than two weeks ('.concat(12096e5," ms)."))),{isValid:0===t.length,errors:t}),m=p.isValid,g=p.errors;if(!m)throw Error("Invalid next-firebase-auth options: ".concat(g.join(" ")));d=c},m=function(){if(!d)throw Error("next-firebase-auth must be initialized before rendering.");return d};(e=t||(t={})).RENDER="render",e.SHOW_LOADER="showLoader",e.RETURN_NULL="returnNull",e.REDIRECT_TO_LOGIN="redirectToLogin",e.REDIRECT_TO_APP="redirectToApp";var g=a(355),v=a(281),y=a.n(v),_=["aud","auth_time","email","email_verified","exp","firebase","iat","iss","name","phone_number","picture","sub","uid","user_id"],b=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach(function(n){_.includes(n)||(t[n]=e[n])}),t},w=function(){return(w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},E=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}u((r=r.apply(e,t||[])).next())})},I=function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};let k=function(e){var t=void 0===e?{}:e,n=t.firebaseUserClientSDK,r=t.firebaseUserAdminSDK,i=t.serializedUser,s=t.clientInitialized,u=void 0!==s&&s,c=t.token,l=void 0===c?null:c,d=t.claims;if([n,r,i].reduce(function(e,t){return t?e+1:e},0)>1)throw Error('createUser cannot receive more than one of the following properties: "firebaseUserClientSDK", "firebaseUserAdminSDK", "serializedUser"');if(u&&(r||i))throw Error('The "clientInitialized" value can only be true when called with the "firebaseUserClientSDK" property or no user.');if(d&&(r||i))throw Error('The "claims" value can only be set in conjunction with the "firebaseUserClientSDK" property.');if(l&&!r)throw Error('The "token" value can only be set if the "firebaseUserAdminSDK" property is defined.');var h={},f=null,p=null,g=!1,v=null,y=null,_=null,k=null,S=function(){return E(void 0,void 0,void 0,function(){return I(this,function(e){return[2,null]})})},T=function(){return E(void 0,void 0,void 0,function(){return I(this,function(e){return[2]})})},O=null;if(n){if(o()){var A=a(324).getApp,C=a(610),P=C.getAuth,R=C.signOut,x=m().firebaseClientAppName;T=function(){return E(void 0,void 0,void 0,function(){return I(this,function(e){return[2,R(P(A(x)))]})})}}h=b(d),f=n.uid,p=n.email,g=n.emailVerified,y=n.phoneNumber,_=n.displayName,k=n.photoURL,v=n.tenantId,S=function(e){return E(void 0,void 0,void 0,function(){return I(this,function(t){return[2,n.getIdToken(e)]})})},O=null}else if(r)h=b(r),f=r.uid,p=r.email||null,g=r.email_verified||!1,y=r.phone_number||null,_=r.name,v=r.firebase&&r.firebase.tenant||null,k=r.picture||null,S=function(){return E(void 0,void 0,void 0,function(){return I(this,function(e){return[2,l]})})},O=l;else if(i){var N=JSON.parse(i);h=N.claims||{},f=N.id||null,p=N.email||null,g=N.emailVerified,v=N.tenantId||null,y=N.phoneNumber||null,_=N.displayName||null,k=N.photoURL||null,S=function(){return E(void 0,void 0,void 0,function(){return I(this,function(e){return[2,N._token||null]})})},O=N._token||null}return{id:f,email:p,emailVerified:g,tenantId:v,phoneNumber:y,displayName:_,photoURL:k,claims:h,getIdToken:S,clientInitialized:u,firebaseUser:n||null,signOut:T,serialize:function(e){var t=(void 0===e?{}:e).includeToken;return JSON.stringify(w({id:f,claims:h,email:p,emailVerified:g,tenantId:v,phoneNumber:y,displayName:_,photoURL:k,clientInitialized:u},(void 0===t||t)&&{_token:O}))}}};var S=a(689),T=function(){return(T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},O=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}u((r=r.apply(e,t||[])).next())})},A=function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},C=function(){return(C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},P=function(e){var t=e.ctx,n=e.user,r=e.redirectDestination;if("function"==typeof r){var i=r({ctx:t,user:n});return P({ctx:t,user:n,redirectDestination:i})}return"string"==typeof r?{destination:r,permanent:!1}:"object"==typeof r?C({permanent:!1},r):void 0},R=function(e){var t=e.redirectConfigName,n=e.redirectURL,r=e.ctx,i=e.user,a=n||m()[t];return function(e,t){if(!t||"string"!=typeof t&&!("destination"in t))throw Error('The "'.concat(e,'" must be set to a non-empty string, an object literal containing "destination", or a function that returns either.'));return t}(t,P({ctx:r,user:i,redirectDestination:a}))},x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};let N=function(e){var r=void 0===e?{}:e,s=r.whenAuthed,u=void 0===s?t.RENDER:s,c=r.whenUnauthedBeforeInit,d=void 0===c?t.RENDER:c,h=r.whenUnauthedAfterInit,f=void 0===h?t.RENDER:h,p=r.whenAuthedBeforeRedirect,g=void 0===p?t.RETURN_NULL:p,v=r.appPageURL,_=r.authPageURL,w=r.LoaderComponent,E=void 0===w?null:w;return function(e){l('[withUser] Calling "withUser".');try{var r=a(689),s=a(689),c=s.useEffect,h=s.useCallback,p=s.useMemo,w=a(853).useRouter,I=a(355).S}catch(e){throw"MODULE_NOT_FOUND"===e.code?Error('The dependencies "react" and "next" are required when calling `withUser`.'):e}var C=function(a){var s=a.userSerialized,y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(a,["userSerialized"]),C=p(function(){return k({serializedUser:s})},[s]),P=(J=(Z=(0,S.useState)({user:null,claims:{},initialized:!1}))[0],X=Z[1],Q=(Y=(0,S.useState)(!1))[0],ee=Y[1],(0,S.useEffect)(function(){var e=!1,t=m().firebaseClientAppName,r=(0,n.getApp)(t),a=(0,i.onIdTokenChanged)((0,i.getAuth)(r),function(t){return O(void 0,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return l("[withUser] The Firebase ID token changed. New Firebase user:",t),ee(!1),n={},t?[4,(0,i.getIdTokenResult)(t)]:[3,2];case 1:n=b(r.sent().claims),r.label=2;case 2:var a;return X({user:t,claims:n,initialized:!0}),[4,(a=t||void 0,O(void 0,void 0,void 0,function(){var e,t;return A(this,function(n){return e=m().tokenChangedHandler,t=k({firebaseUserClientSDK:a,clientInitialized:!0}),e?(l('[withUser] Calling the custom "tokenChangedHandler" provided in the config.'),[2,e(t)]):[2,O(void 0,void 0,void 0,function(){var e,n,r,i,a,s,o,u,c,d;return A(this,function(h){switch(h.label){case 0:return n=(e=m()).loginAPIEndpoint,r=e.logoutAPIEndpoint,i=e.onLoginRequestError,a=e.onLogoutRequestError,t.id?(l("[withUser] Calling the login endpoint."),[4,t.getIdToken()]):[3,11];case 1:if(o=h.sent(),!n)throw Error("Invalid config.");h.label=2;case 2:return h.trys.push([2,6,,10]),[4,fetch(n,{method:"POST",headers:{Authorization:o||void 0},credentials:"include"})];case 3:return(s=h.sent()).ok?[3,5]:[4,s.json()];case 4:throw c=h.sent(),l("[withUser] The call to the login endpoint failed with status ".concat(s.status," and response: ").concat(JSON.stringify(c))),Error("Received ".concat(s.status," response from login API endpoint: ").concat(JSON.stringify(c)));case 5:case 9:return[3,10];case 6:return u=h.sent(),i&&u instanceof Error?[4,i(u)]:[3,8];case 7:return h.sent(),[3,9];case 8:throw u;case 10:return[3,20];case 11:if(l("[withUser] Calling the logout endpoint."),!r)throw Error("Invalid config.");h.label=12;case 12:return h.trys.push([12,16,,20]),[4,fetch(r,{method:"POST",credentials:"include"})];case 13:return(s=h.sent()).ok?[3,15]:[4,s.json()];case 14:throw c=h.sent(),l("[withUser] The call to the logout endpoint failed with status ".concat(s.status," and response: ").concat(JSON.stringify(c))),Error("Received ".concat(s.status," response from logout API endpoint: ").concat(JSON.stringify(c)));case 15:case 19:return[3,20];case 16:return d=h.sent(),a&&d instanceof Error?[4,a(d)]:[3,18];case 17:return h.sent(),[3,19];case 18:throw d;case 20:return[2,s]}})})]})}))];case 3:return r.sent(),e?l("[withUser] Component unmounted before completing the auth API request."):(ee(!0),l("[withUser] Completed the auth API request.")),[2]}})})});return function(){a(),e=!0}},[]),T(T({},J),{authRequestCompleted:Q})),N=P.user,D=P.claims,L=P.initialized,j=P.authRequestCompleted,M=p(function(){return k({firebaseUserClientSDK:N||void 0,clientInitialized:L,claims:D})},[N,L,D]),U=L?M:C,F=!!U.id,$=U.clientInitialized,B=F&&u===t.REDIRECT_TO_APP,H=B&&o()&&j,z=!F&&(!$&&d===t.REDIRECT_TO_LOGIN||$&&f===t.REDIRECT_TO_LOGIN),V=z&&o()&&(d===t.REDIRECT_TO_LOGIN||j),q=w(),G=h(function(e){var t=e.basePath,n=e.destination;!1===t?window.location.replace(n):q.replace(n)},[q]),W=h(function(){var e;l("[withUser] Redirecting to app."),G(R({redirectConfigName:"appPageURL",redirectURL:(e={user:U,redirectURL:v}).redirectURL,user:e.user,ctx:e.ctx}))},[U,G]),K=h(function(){var e;l("[withUser] Redirecting to login."),G(R({redirectConfigName:"authPageURL",redirectURL:(e={user:U,redirectURL:_}).redirectURL,user:e.user,ctx:e.ctx}))},[U,G]);c(function(){o()&&(H?W():V&&K())},[H,V,W,K]);var Z,J,X,Y,Q,ee,et,en=E?r.createElement(E,null):null,er=r.createElement(I.Provider,{value:U},r.createElement(e,x({},y)));return et=B?g===t.RENDER?er:g===t.SHOW_LOADER?en:null:z?d===t.RETURN_NULL?null:d===t.SHOW_LOADER?en:er:F||j?er:d===t.SHOW_LOADER?en:d===t.RETURN_NULL?null:er,l("[withUser] Set user to:",U),et};return C.displayName="WithUserHOC",y()(C,e),C}};var D=function(e){c=!0===(null==e?void 0:e.debug),p(e),o()&&function(){var e=m(),t=e.firebaseClientInitConfig,r=e.firebaseAuthEmulatorHost,a=e.tenantId,s=e.firebaseClientAppName;if((0,n.getApps)().length)l("[init] Did not initialize the Firebase JS SDK because an app already exists.");else{if(!t)throw Error('If not initializing the Firebase JS SDK elsewhere, you must provide "firebaseClientInitConfig" to next-firebase-auth.');(0,n.initializeApp)(t,s),a&&((0,i.getAuth)().tenantId=a),l("[init] Initialized the Firebase JS SDK.")}r&&(0,i.connectAuthEmulator)((0,i.getAuth)((0,n.getApp)(s)),"http://".concat(r))}()},L=function(){throw Error('"getUserFromCookies" can only be called server-side.')},j=function(){throw Error('"setAuthCookies" can only be called server-side.')},M=function(){throw Error('"unsetAuthCookies" can only be called server-side.')},U=function(){throw Error('"verifyIdToken" can only be called server-side.')},F=function(){throw Error('"withUserSSR" can only be called server-side.')},$=function(){throw Error('"withUserTokenSSR" can only be called server-side.')}})(),e.exports=s})()},65967:function(e,t,n){"use strict";var r=n(18381);t.Z=(0,r.createContext)({t:function(e){return Array.isArray(e)?e[0]:e},lang:""})},64382:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(18381),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=n(65967),s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e){var t=(0,r.useContext)(a.Z);return(0,r.useMemo)(function(){var n;return s(s({},t),{t:(n=t.t,"string"!=typeof e?n:function(t,r,a){return n(t,r,i({ns:e},a))})})},[t,e])}},30030:function(e,t,n){e.exports=n(30285)},78389:function(e,t,n){e.exports=n(79628)},10655:function(e,t,n){e.exports=n(35542)},36340:function(e,t,n){e.exports=n(73129)},17017:function(e){var t,n,r,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u=[],c=!1,l=-1;function d(){c&&r&&(c=!1,r.length?u=r.concat(u):l=-1,u.length&&h())}function h(){if(!c){var e=o(d);c=!0;for(var t=u.length;t;){for(r=u,u=[];++l<t;)r&&r[l].run();l=-1,t=u.length}r=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new f(e,t)),1!==u.length||c||o(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},10902:function(e){"use strict";e.exports=function(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var o=e.length;s>0&&o>s&&(o=s);for(var u=0;u<o;++u){var c,l,d,h,f=e[u].replace(a,"%20"),p=f.indexOf(n);(p>=0?(c=f.substr(0,p),l=f.substr(p+1)):(c=f,l=""),d=decodeURIComponent(c),h=decodeURIComponent(l),Object.prototype.hasOwnProperty.call(i,d))?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},84580:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,i){return(n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e)?Object.keys(e).map(function(i){var a=encodeURIComponent(t(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return a+encodeURIComponent(t(e))}).join(n):a+encodeURIComponent(t(e[i]))}).filter(Boolean).join(n):i?encodeURIComponent(t(i))+r+encodeURIComponent(t(e)):""}},42845:function(e,t,n){"use strict";n(10902),t.c=n(84580)},75099:function(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,n,r){var i=r&&r.stringify||t;if("object"==typeof e&&null!==e){var a=n.length+1;if(1===a)return e;var s=Array(a);s[0]=i(e);for(var o=1;o<a;o++)s[o]=i(n[o]);return s.join(" ")}if("string"!=typeof e)return e;var u=n.length;if(0===u)return e;for(var c="",l=0,d=-1,h=e&&e.length||0,f=0;f<h;){if(37===e.charCodeAt(f)&&f+1<h){switch(d=d>-1?d:0,e.charCodeAt(f+1)){case 100:case 102:if(l>=u||null==n[l])break;d<f&&(c+=e.slice(d,f)),c+=Number(n[l]),d=f+2,f++;break;case 105:if(l>=u||null==n[l])break;d<f&&(c+=e.slice(d,f)),c+=Math.floor(Number(n[l])),d=f+2,f++;break;case 79:case 111:case 106:if(l>=u||void 0===n[l])break;d<f&&(c+=e.slice(d,f));var p=typeof n[l];if("string"===p){c+="'"+n[l]+"'",d=f+2,f++;break}if("function"===p){c+=n[l].name||"<anonymous>",d=f+2,f++;break}c+=i(n[l]),d=f+2,f++;break;case 115:if(l>=u)break;d<f&&(c+=e.slice(d,f)),c+=String(n[l]),d=f+2,f++;break;case 37:d<f&&(c+=e.slice(d,f)),c+="%",d=f+2,f++,l--}++l}++f}return -1===d?e:(d<h&&(c+=e.slice(d)),c)}},51991:function(e,t){"use strict";/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case o:case s:case h:case f:return e;default:switch(e=e&&e.$$typeof){case l:case c:case d:case m:case p:case u:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=c,t.ContextProvider=u,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=p,t.Portal=i,t.Profiler=o,t.StrictMode=s,t.Suspense=h,t.SuspenseList=f,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===c},t.isContextProvider=function(e){return v(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return v(e)===d},t.isFragment=function(e){return v(e)===a},t.isLazy=function(e){return v(e)===m},t.isMemo=function(e){return v(e)===p},t.isPortal=function(e){return v(e)===i},t.isProfiler=function(e){return v(e)===o},t.isStrictMode=function(e){return v(e)===s},t.isSuspense=function(e){return v(e)===h},t.isSuspenseList=function(e){return v(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===o||e===s||e===h||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},55711:function(e,t,n){"use strict";e.exports=n(51991)},2546:function(e){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(t),u=0;u<a.length;u++){var c=a[u];if(!o(c))return!1;var l=e[c],d=t[c];if(!1===(i=n?n.call(r,l,d,c):void 0)||void 0===i&&l!==d)return!1}return!0}},18990:function(e,t,n){"use strict";n.d(t,{vJ:function(){return eN},iv:function(){return ew},ZP:function(){return eL},F4:function(){return eD}});var r,i,a,s=n(55711),o=n(18381),u=n(2546),c=n.n(u),l=function(e){function t(e,t,r){var i=t.trim().split(p);t=i;var a=i.length,s=e.length;switch(s){case 0:case 1:var o=0;for(e=0===s?"":e[0]+" ";o<a;++o)t[o]=n(e,t[o],r).trim();break;default:var u=o=0;for(t=[];o<a;++o)for(var c=0;c<s;++c)t[u++]=n(e[c]+" ",i[o],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,a){var s=e+";",o=2*t+3*n+4*a;if(944===o){e=s.indexOf(":",9)+1;var u=s.substring(e,s.length-1).trim();return u=s.substring(0,e).trim()+u+";",1===C||2===C&&i(u,1)?"-webkit-"+u+u:u}if(0===C||2===C&&!i(s,1))return s;switch(o){case 1015:return 97===s.charCodeAt(10)?"-webkit-"+s+s:s;case 951:return 116===s.charCodeAt(3)?"-webkit-"+s+s:s;case 963:return 110===s.charCodeAt(5)?"-webkit-"+s+s:s;case 1009:if(100!==s.charCodeAt(4))break;case 969:case 942:return"-webkit-"+s+s;case 978:return"-webkit-"+s+"-moz-"+s+s;case 1019:case 983:return"-webkit-"+s+"-moz-"+s+"-ms-"+s+s;case 883:if(45===s.charCodeAt(8))return"-webkit-"+s+s;if(0<s.indexOf("image-set(",11))return s.replace(S,"$1-webkit-$2")+s;break;case 932:if(45===s.charCodeAt(4))switch(s.charCodeAt(5)){case 103:return"-webkit-box-"+s.replace("-grow","")+"-webkit-"+s+"-ms-"+s.replace("grow","positive")+s;case 115:return"-webkit-"+s+"-ms-"+s.replace("shrink","negative")+s;case 98:return"-webkit-"+s+"-ms-"+s.replace("basis","preferred-size")+s}return"-webkit-"+s+"-ms-"+s+s;case 964:return"-webkit-"+s+"-ms-flex-"+s+s;case 1023:if(99!==s.charCodeAt(8))break;return"-webkit-box-pack"+(u=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+u+s;case 1005:return h.test(s)?s.replace(d,":-webkit-")+s.replace(d,":-moz-")+s:s;case 1e3:switch(t=(u=s.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=s.replace(_,"tb");break;case 232:u=s.replace(_,"tb-rl");break;case 220:u=s.replace(_,"lr");break;default:return s}return"-webkit-"+s+"-ms-"+u+s;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(t=(s=e).length-10,o=(u=(33===s.charCodeAt(t)?s.substring(0,t):s).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:s=s.replace(u,"-webkit-"+u)+";"+s;break;case 207:case 102:s=s.replace(u,"-webkit-"+(102<o?"inline-":"")+"box")+";"+s.replace(u,"-webkit-"+u)+";"+s.replace(u,"-ms-"+u+"box")+";"+s}return s+";";case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:return u=s.replace("-items",""),"-webkit-"+s+"-webkit-box-"+u+"-ms-flex-"+u+s;case 115:return"-webkit-"+s+"-ms-flex-item-"+s.replace(E,"")+s;default:return"-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","").replace(E,"")+s}break;case 973:case 989:if(45!==s.charCodeAt(3)||122===s.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,a).replace(":fill-available",":stretch"):s.replace(u,"-webkit-"+u)+s.replace(u,"-moz-"+u.replace("fill-",""))+s;break;case 962:if(s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===n+a&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10))return s.substring(0,s.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+s}return s}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),N(2!==t?r:r.replace(I,"$1"),n,t)}function a(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,i,a,s,o,c,l){for(var d,h=0,f=t;h<x;++h)switch(d=R[h].call(u,e,f,n,r,i,a,s,o,c,l)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function o(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?C=1:(C=2,N=e):C=0),o}function u(e,n){var o=e;if(33>o.charCodeAt(0)&&(o=o.trim()),o=[o],0<x){var u=s(-1,n,o,o,O,T,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var d=function e(n,o,u,d,h){for(var f,p,m,_,w,E=0,I=0,k=0,S=0,R=0,N=0,L=m=f=0,j=0,M=0,U=0,F=0,$=u.length,B=$-1,H="",z="",V="",q="";j<$;){if(p=u.charCodeAt(j),j===B&&0!==I+S+k+E&&(0!==I&&(p=47===I?10:47),S=k=E=0,$++,B++),0===I+S+k+E){if(j===B&&(0<M&&(H=H.replace(l,"")),0<H.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:H+=u.charAt(j)}p=59}switch(p){case 123:for(f=(H=H.trim()).charCodeAt(0),m=1,F=++j;j<$;){switch(p=u.charCodeAt(j)){case 123:m++;break;case 125:m--;break;case 47:switch(p=u.charCodeAt(j+1)){case 42:case 47:e:{for(L=j+1;L<B;++L)switch(u.charCodeAt(L)){case 47:if(42===p&&42===u.charCodeAt(L-1)&&j+2!==L){j=L+1;break e}break;case 10:if(47===p){j=L+1;break e}}j=L}}break;case 91:p++;case 40:p++;case 34:case 39:for(;j++<B&&u.charCodeAt(j)!==p;);}if(0===m)break;j++}if(m=u.substring(F,j),0===f&&(f=(H=H.replace(c,"").trim()).charCodeAt(0)),64===f){switch(0<M&&(H=H.replace(l,"")),p=H.charCodeAt(1)){case 100:case 109:case 115:case 45:M=o;break;default:M=P}if(F=(m=e(o,M,m,p,h+1)).length,0<x&&(w=s(3,m,M=t(P,H,U),o,O,T,F,p,h,d),H=M.join(""),void 0!==w&&0===(F=(m=w.trim()).length)&&(p=0,m="")),0<F)switch(p){case 115:H=H.replace(b,a);case 100:case 109:case 45:m=H+"{"+m+"}";break;case 107:m=(H=H.replace(g,"$1 $2"))+"{"+m+"}",m=1===C||2===C&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=H+m,112===d&&(z+=m,m="")}else m=""}else m=e(o,t(o,H,U),m,d,h+1);V+=m,m=U=M=L=f=0,H="",p=u.charCodeAt(++j);break;case 125:case 59:if(1<(F=(H=(0<M?H.replace(l,""):H).trim()).length))switch(0===L&&(45===(f=H.charCodeAt(0))||96<f&&123>f)&&(F=(H=H.replace(" ",":")).length),0<x&&void 0!==(w=s(1,H,o,n,O,T,z.length,d,h,d))&&0===(F=(H=w.trim()).length)&&(H="\0\0"),f=H.charCodeAt(0),p=H.charCodeAt(1),f){case 0:break;case 64:if(105===p||99===p){q+=H+u.charAt(j);break}default:58!==H.charCodeAt(F-1)&&(z+=r(H,f,p,H.charCodeAt(2)))}U=M=L=f=0,H="",p=u.charCodeAt(++j)}}switch(p){case 13:case 10:47===I?I=0:0===1+f&&107!==d&&0<H.length&&(M=1,H+="\0"),0<x*D&&s(0,H,o,n,O,T,z.length,d,h,d),T=1,O++;break;case 59:case 125:if(0===I+S+k+E){T++;break}default:switch(T++,_=u.charAt(j),p){case 9:case 32:if(0===S+E+I)switch(R){case 44:case 58:case 9:case 32:_="";break;default:32!==p&&(_=" ")}break;case 0:_="\\0";break;case 12:_="\\f";break;case 11:_="\\v";break;case 38:0===S+I+E&&(M=U=1,_="\f"+_);break;case 108:if(0===S+I+E+A&&0<L)switch(j-L){case 2:112===R&&58===u.charCodeAt(j-3)&&(A=R);case 8:111===N&&(A=N)}break;case 58:0===S+I+E&&(L=j);break;case 44:0===I+k+S+E&&(M=1,_+="\r");break;case 34:case 39:0===I&&(S=S===p?0:0===S?p:S);break;case 91:0===S+I+k&&E++;break;case 93:0===S+I+k&&E--;break;case 41:0===S+I+E&&k--;break;case 40:0===S+I+E&&(0===f&&(2*R+3*N==533||(f=1)),k++);break;case 64:0===I+k+S+E+L+m&&(m=1);break;case 42:case 47:if(!(0<S+E+k))switch(I){case 0:switch(2*p+3*u.charCodeAt(j+1)){case 235:I=47;break;case 220:F=j,I=42}break;case 42:47===p&&42===R&&F+2!==j&&(33===u.charCodeAt(F+2)&&(z+=u.substring(F,j+1)),_="",I=0)}}0===I&&(H+=_)}N=R,R=p,j++}if(0<(F=z.length)){if(M=o,0<x&&void 0!==(w=s(2,z,M,n,O,T,F,d,h,d))&&0===(z=w).length)return q+z+V;if(z=M.join(",")+"{"+z+"}",0!=C*A){switch(2!==C||i(z,2)||(A=0),A){case 111:z=z.replace(y,":-moz-$1")+z;break;case 112:z=z.replace(v,"::-webkit-input-$1")+z.replace(v,"::-moz-$1")+z.replace(v,":-ms-input-$1")+z}A=0}}return q+z+V}(P,o,n,0,0);return 0<x&&void 0!==(u=s(-2,d,o,o,O,T,d.length,0,0,0))&&(d=u),A=0,T=O=1,d}var c=/^\0+/g,l=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,p=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,b=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,E=/-self|flex-/g,I=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,T=1,O=1,A=0,C=1,P=[],R=[],x=0,N=null,D=0;return u.use=function e(t){switch(t){case void 0:case null:x=R.length=0;break;default:if("function"==typeof t)R[x++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else D=0|!!t}return e},u.set=o,void 0!==e&&o(e),u},d={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},h=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,f=(r=function(e){return h.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)},i=Object.create(null),function(e){return void 0===i[e]&&(i[e]=r(e)),i[e]}),p=n(64498),m=n.n(p),g=n(17017);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var y=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},_=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,s.typeOf)(e)},b=Object.freeze([]),w=Object.freeze({});function E(e){return"function"==typeof e}function I(e){return e.displayName||e.name||"Component"}function k(e){return e&&"string"==typeof e.styledComponentId}var S=void 0!==g&&void 0!==g.env&&(g.env.REACT_APP_SC_ATTR||g.env.SC_ATTR)||"data-styled",T="undefined"!=typeof window&&"HTMLElement"in window,O=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==g&&void 0!==g.env&&(void 0!==g.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==g.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==g.env.REACT_APP_SC_DISABLE_SPEEDY&&g.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==g.env.SC_DISABLE_SPEEDY&&""!==g.env.SC_DISABLE_SPEEDY&&"false"!==g.env.SC_DISABLE_SPEEDY&&g.env.SC_DISABLE_SPEEDY)),A={};function C(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var P=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&C(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var s=this.indexOfGroup(e+1),o=0,u=t.length;o<u;o++)this.tag.insertRule(s,t[o])&&(this.groupSizes[e]++,s++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+=this.tag.getRule(a)+"/*!sc*/\n";return t},e}(),R=new Map,x=new Map,N=1,D=function(e){if(R.has(e))return R.get(e);for(;x.has(N);)N++;var t=N++;return R.set(e,t),x.set(t,e),t},L=function(e,t){t>=N&&(N=t+1),R.set(e,t),x.set(t,e)},j="style["+S+'][data-styled-version="5.3.11"]',M=RegExp("^"+S+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),U=function(e,t,n){for(var r,i=n.split(","),a=0,s=i.length;a<s;a++)(r=i[a])&&e.registerName(t,r)},F=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],i=0,a=n.length;i<a;i++){var s=n[i].trim();if(s){var o=s.match(M);if(o){var u=0|parseInt(o[1],10),c=o[2];0!==u&&(L(c,u),U(e,c,o[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(s)}}},$=function(){return n.nc},B=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(S))return r}}(n),a=void 0!==i?i.nextSibling:null;r.setAttribute(S,"active"),r.setAttribute("data-styled-version","5.3.11");var s=$();return s&&r.setAttribute("nonce",s),n.insertBefore(r,a),r},H=function(){function e(e){var t=this.element=B(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}C(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),z=function(){function e(e){var t=this.element=B(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),V=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),q=T,G={isServer:!T,useCSSOMInjection:!O},W=function(){function e(e,t,n){void 0===e&&(e=w),void 0===t&&(t={}),this.options=v({},G,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&T&&q&&(q=!1,function(e){for(var t=document.querySelectorAll(j),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(S)&&(F(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return D(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(v({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){var e,t,n,r;return this.tag||(this.tag=(t=(e=this.options).isServer,n=e.useCSSOMInjection,r=e.target,new P(t?new V(r):n?new H(r):new z(r))))},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(D(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(D(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(D(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var a,s=(a=i,x.get(a));if(void 0!==s){var o=e.names.get(s),u=t.getGroup(i);if(o&&u&&o.size){var c=S+".g"+i+'[id="'+s+'"]',l="";void 0!==o&&o.forEach(function(e){e.length>0&&(l+=e+",")}),r+=""+u+c+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),K=/(a)(d)/gi,Z=function(e){return String.fromCharCode(e+(e>25?39:97))};function J(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Z(t%52)+n;return(Z(t%52)+n).replace(K,"$1-$2")}var X=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return X(5381,e)};function Q(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(E(n)&&!k(n))return!1}return!0}var ee=Y("5.3.11"),et=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Q(e),this.componentId=t,this.baseHash=X(ee,t),this.baseStyle=n,W.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var a=e_(this.rules,e,t,n).join(""),s=J(X(this.baseHash,a)>>>0);if(!t.hasNameForId(r,s)){var o=n(a,"."+s,void 0,r);t.insertRules(r,s,o)}i.push(s),this.staticRulesId=s}}else{for(var u=this.rules.length,c=X(this.baseHash,n.hash),l="",d=0;d<u;d++){var h=this.rules[d];if("string"==typeof h)l+=h;else if(h){var f=e_(h,e,t,n),p=Array.isArray(f)?f.join(""):f;c=X(c,p+d),l+=p}}if(l){var m=J(c>>>0);if(!t.hasNameForId(r,m)){var g=n(l,"."+m,void 0,r);t.insertRules(r,m,g)}i.push(m)}}return i.join(" ")},e}(),en=/^\s*\/\/.*$/gm,er=[":","[",".","#"];function ei(e){var t,n,r,i,a=void 0===e?w:e,s=a.options,o=void 0===s?w:s,u=a.plugins,c=void 0===u?b:u,d=new l(o),h=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,a,s,o,u,c,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===d?"/*|*/":"")}case -2:r.split("/*|*/}").forEach(t)}}}(function(e){h.push(e)}),p=function(e,r,a){return 0===r&&-1!==er.indexOf(a[n.length])||a.match(i)?e:"."+t};function m(e,a,s,o){void 0===o&&(o="&");var u=e.replace(en,""),c=a&&s?s+" "+a+" { "+u+" }":u;return t=o,r=RegExp("\\"+(n=a)+"\\b","g"),i=RegExp("(\\"+n+"\\b){2,}"),d(s||!a?"":a,c)}return d.use([].concat(c,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},f,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=c.length?c.reduce(function(e,t){return t.name||C(15),X(e,t.name)},5381).toString():"",m}var ea=o.createContext(),es=(ea.Consumer,o.createContext()),eo=(es.Consumer,new W),eu=ei();function ec(){return(0,o.useContext)(ea)||eo}function el(){return(0,o.useContext)(es)||eu}function ed(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=ec(),a=(0,o.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target]),s=(0,o.useMemo)(function(){return ei({options:{prefix:!e.disableVendorPrefixes},plugins:n})},[e.disableVendorPrefixes,n]);return(0,o.useEffect)(function(){c()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]),o.createElement(ea.Provider,{value:a},o.createElement(es.Provider,{value:s},e.children))}var eh=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=eu);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return C(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=eu),this.name+e.hash},e}(),ef=/([A-Z])/,ep=/([A-Z])/g,em=/^ms-/,eg=function(e){return"-"+e.toLowerCase()};function ev(e){return ef.test(e)?e.replace(ep,eg).replace(em,"-ms-"):e}var ey=function(e){return null==e||!1===e||""===e};function e_(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],s=0,o=e.length;s<o;s+=1)""!==(i=e_(e[s],t,n,r))&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));return a}return ey(e)?"":k(e)?"."+e.styledComponentId:E(e)?"function"!=typeof e||e.prototype&&e.prototype.isReactComponent||!t?e:e_(e(t),t,n,r):e instanceof eh?n?(e.inject(n,r),e.getName(r)):e:_(e)?function e(t,n){var r,i=[];for(var a in t)t.hasOwnProperty(a)&&!ey(t[a])&&(Array.isArray(t[a])&&t[a].isCss||E(t[a])?i.push(ev(a)+":",t[a],";"):_(t[a])?i.push.apply(i,e(t[a],a)):i.push(ev(a)+": "+(null==(r=t[a])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||a in d||a.startsWith("--")?String(r).trim():r+"px")+";"));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString()}var eb=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ew(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return E(e)||_(e)?eb(e_(y(b,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:eb(e_(y(e,n)))}var eE=function(e,t,n){return void 0===n&&(n=w),e.theme!==n.theme&&e.theme||t||n.theme},eI=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ek=/(^-|-$)/g;function eS(e){return e.replace(eI,"-").replace(ek,"")}var eT=function(e){return J(Y(e)>>>0)};function eO(e){return"string"==typeof e}var eA=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},eC=o.createContext();eC.Consumer;var eP={},eR=function(e){return function e(t,n,r){if(void 0===r&&(r=w),!(0,s.isValidElementType)(n))return C(1,String(n));var i=function(){return t(n,r,ew.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,v({},r,{},i))},i.attrs=function(i){return e(t,n,v({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(function e(t,n,r){var i=k(t),a=!eO(t),s=n.attrs,u=void 0===s?b:s,c=n.componentId,l=void 0===c?(_=n.displayName,S=n.parentComponentId,eP[T="string"!=typeof _?"sc":eS(_)]=(eP[T]||0)+1,O=T+"-"+eT("5.3.11"+T+eP[T]),S?S+"-"+O:O):c,d=n.displayName,h=void 0===d?eO(t)?"styled."+t:"Styled("+I(t)+")":d,p=n.displayName&&n.componentId?eS(n.displayName)+"-"+n.componentId:n.componentId||l,g=i&&t.attrs?Array.prototype.concat(t.attrs,u).filter(Boolean):u,y=n.shouldForwardProp;i&&t.shouldForwardProp&&(y=n.shouldForwardProp?function(e,r,i){return t.shouldForwardProp(e,r,i)&&n.shouldForwardProp(e,r,i)}:t.shouldForwardProp);var _,S,T,O,A,C=new et(r,p,i?t.componentStyle:void 0),P=C.isStatic&&0===u.length,R=function(e,t){return function(e,t,n,r){var i,a,s,u,c,l=e.attrs,d=e.componentStyle,h=e.defaultProps,p=e.foldedComponentIds,m=e.shouldForwardProp,g=e.styledComponentId,y=e.target,_=(void 0===(i=eE(t,(0,o.useContext)(eC),h)||w)&&(i=w),a=v({},t,{theme:i}),s={},l.forEach(function(e){var t,n,r,i=e;for(t in E(i)&&(i=i(a)),i)a[t]=s[t]="className"===t?(n=s[t],r=i[t],n&&r?n+" "+r:n||r):i[t]}),[a,s]),b=_[0],I=_[1],k=(u=ec(),c=el(),r?d.generateAndInjectStyles(w,u,c):d.generateAndInjectStyles(b,u,c)),S=I.$as||t.$as||I.as||t.as||y,T=eO(S),O=I!==t?v({},t,{},I):t,A={};for(var C in O)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?A.as=O[C]:(m?m(C,f,S):!T||f(C))&&(A[C]=O[C]));return t.style&&I.style!==t.style&&(A.style=v({},t.style,{},I.style)),A.className=Array.prototype.concat(p,g,k!==g?k:null,t.className,I.className).filter(Boolean).join(" "),A.ref=n,(0,o.createElement)(S,A)}(A,e,t,P)};return R.displayName=h,(A=o.forwardRef(R)).attrs=g,A.componentStyle=C,A.displayName=h,A.shouldForwardProp=y,A.foldedComponentIds=i?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):b,A.styledComponentId=p,A.target=i?t.target:t,A.withComponent=function(t){var i=n.componentId,a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}(n,["componentId"]),s=i&&i+"-"+(eO(t)?t:eS(I(t)));return e(t,v({},a,{attrs:g,componentId:s}),r)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function e(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=0;a<r.length;a++){var s=r[a];if(eA(s))for(var o in s)"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&function(t,n,r){var i=t[r];eA(n)&&eA(i)?e(i,n):t[r]=n}(t,s[o],o)}return t}({},t.defaultProps,e):e}}),Object.defineProperty(A,"toString",{value:function(){return"."+A.styledComponentId}}),a&&m()(A,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A},e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){eR[e]=eR(e)});var ex=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Q(e),W.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(e_(this.rules,t,n,r).join(""),""),a=this.componentId+e;n.insertRules(a,a,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&W.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function eN(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=ew.apply(void 0,[e].concat(n)),a="sc-global-"+eT(JSON.stringify(i)),s=new ex(i,a);function u(e){var t=ec(),n=el(),r=(0,o.useContext)(eC),i=(0,o.useRef)(t.allocateGSInstance(a)).current;return t.server&&c(i,e,t,r,n),(0,o.useLayoutEffect)(function(){if(!t.server)return c(i,e,t,r,n),function(){return s.removeStyles(i,t)}},[i,e,t,r,n]),null}function c(e,t,n,r,i){if(s.isStatic)s.renderStyles(e,A,n,i);else{var a=v({},t,{theme:eE(t,r,u.defaultProps)});s.renderStyles(e,a,n,i)}}return o.memo(u)}function eD(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=ew.apply(void 0,[e].concat(n)).join("");return new eh(eT(i),i)}(a=(function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=$();return"<style "+[n&&'nonce="'+n+'"',S+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?C(2):e._emitSheetCSS()},this.getStyleElement=function(){if(e.sealed)return C(2);var t,n=((t={})[S]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=$();return r&&(n.nonce=r),[o.createElement("style",v({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new W({isServer:!0}),this.sealed=!1}).prototype).collectStyles=function(e){return this.sealed?C(2):o.createElement(ed,{sheet:this.instance},e)},a.interleaveWithNodeStream=function(e){return C(3)};var eL=eR},41579:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=t.GoogleMapsEmbed=t.GoogleAnalytics=void 0;var r=n(40364);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return r.GoogleAnalytics}});var i=n(85604);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return i.GoogleMapsEmbed}});var a=n(60840);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return a.YouTubeEmbed}})},40364:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let a=i(n(89426)),s=n(26492);t.GoogleAnalytics=e=>{var t=r(e,[]);return(0,s.formatData)(a.default,t)}},85604:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleMapsEmbed=void 0;let a=i(n(27395)),s=n(26492);t.GoogleMapsEmbed=e=>{var t=r(e,[]);return(0,s.formatData)(a.default,t)}},60840:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let a=i(n(88420)),s=n(26492);t.YouTubeEmbed=e=>{var t=r(e,[]);return(0,s.formatData)(a.default,t)}},26492:function(e,t){"use strict";function n(e,t,n=!1){return t?Object.keys(e).filter(e=>n?!t.includes(e):t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}):{}}function r(e,t,n,r){let i=r&&Object.keys(r).length>0?new URL(Object.values(r)[0],e):new URL(e);return t&&n&&t.forEach(e=>{n[e]&&i.searchParams.set(e,n[e])}),i.toString()}function i(e,t,n,i,a){var s;if(!t)return`<${e}></${e}>`;let o=(null===(s=t.src)||void 0===s?void 0:s.url)?Object.assign(Object.assign({},t),{src:r(t.src.url,t.src.params,i,a)}):t,u=Object.keys(Object.assign(Object.assign({},o),n)).reduce((e,t)=>{let r=null==n?void 0:n[t],i=o[t],a=null!=r?r:i,s=!0===a?t:`${t}="${a}"`;return a?e+` ${s}`:e},"");return`<${e}${u}></${e}>`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatData=t.createHtml=t.formatUrl=void 0,t.formatUrl=r,t.createHtml=i,t.formatData=function(e,t){var a,s,o,u,c;let l=n(t,null===(a=e.scripts)||void 0===a?void 0:a.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[])),d=n(t,null===(o=null===(s=e.html)||void 0===s?void 0:s.attributes.src)||void 0===o?void 0:o.params),h=n(t,[null===(c=null===(u=e.html)||void 0===u?void 0:u.attributes.src)||void 0===c?void 0:c.slugParam]),f=n(t,[...Object.keys(l),...Object.keys(d),...Object.keys(h)],!0);return Object.assign(Object.assign({},e),{html:e.html?i(e.html.element,e.html.attributes,f,d,h):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:r(e.url,e.params,l)})):null})}},6219:function(e,t,n){"use strict";/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(18381),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,s=r.useEffect,o=r.useLayoutEffect,u=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return o(function(){i.value=n,i.getSnapshot=t,c(i)&&l({inst:i})},[e,n,t]),s(function(){return c(i)&&l({inst:i}),e(function(){c(i)&&l({inst:i})})},[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},59592:function(e,t,n){"use strict";/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(18381),i=n(92222),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,o=r.useRef,u=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=s(e,(d=c(function(){function e(e){if(!u){if(u=!0,s=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(s=e,o=n)}var s,o,u=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]))[0],d[1]);return u(function(){h.hasValue=!0,h.value=f},[f]),l(f),f}},92222:function(e,t,n){"use strict";e.exports=n(6219)},20543:function(e,t,n){"use strict";e.exports=n(59592)},91118:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(56857)}])},85539:function(e,t,n){"use strict";n.d(t,{L:function(){return o},Z:function(){return u}});var r=n(67168),i=n(18381),a=n(64498),s=n.n(a);let o=(0,i.createContext)({});function u(e){let t=function(t){return(0,r.jsx)(o.Consumer,{children:n=>(0,r.jsx)(e,{...t,trackingService:n})})};return s()(t,e),t}},93808:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(18381).createContext)({petSize:[]})},49010:function(e,t,n){"use strict";let r,i,a,s,o,u,c,l,d,h,f,p,m,g;var v=n(56362);function y(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:v.J})),version:v.J}),e._metadata=i}var _=n(6253),b=n(45096),w=n(85359),E=n(77946),I=n(66040);let k=[];function S(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function T(e,t,n){if(n[t.name]){I.X&&b.kg.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,-1===k.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),k.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}I.X&&b.kg.log(`Integration installed: ${t.name}`)}let O=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],A=(e={})=>({name:"InboundFilters",processEvent:(t,n,r)=>{var i,a;return((i=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:O],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,r.getOptions())).ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(t)?(I.X&&b.kg.warn(`Event dropped due to being internal Sentry Error.
Event: ${(0,w.jH)(t)}`),0):(a=i.ignoreErrors,!t.type&&a&&a.length&&(function(e){let t;let n=[];e.message&&n.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(n.push(t.value),t.type&&n.push(`${t.type}: ${t.value}`)),n})(t).some(e=>(0,E.U0)(e,a)))?(I.X&&b.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${(0,w.jH)(t)}`),0):t.type||!t.exception||!t.exception.values||0===t.exception.values.length||t.message||t.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)?!function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;let n=e.transaction;return!!n&&(0,E.U0)(n,t)}(t,i.ignoreTransactions)?!function(e,t){if(!t||!t.length)return!1;let n=C(e);return!!n&&(0,E.U0)(n,t)}(t,i.denyUrls)?function(e,t){if(!t||!t.length)return!0;let n=C(e);return!n||(0,E.U0)(n,t)}(t,i.allowUrls)||(I.X&&b.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${(0,w.jH)(t)}.
Url: ${C(t)}`),0):(I.X&&b.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${(0,w.jH)(t)}.
Url: ${C(t)}`),0):(I.X&&b.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${(0,w.jH)(t)}`),0):(I.X&&b.kg.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${(0,w.jH)(t)}`),0))?t:null}});function C(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return I.X&&b.kg.error(`Cannot extract url for event ${(0,w.jH)(e)}`),null}}var P=n(93914),R=n(7071);let x=new WeakMap,N=()=>({name:"FunctionToString",setupOnce(){r=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=(0,P.HK)(this),n=x.has((0,R.s3)())&&void 0!==t?t:this;return r.apply(n,e)}}catch(e){}},setup(e){x.set(e,!0)}});var D=n(46031);let L=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{var n;if((n=e)&&(function(e,t){let n=e.message,r=t.message;return!!((n||r)&&(!n||r)&&(n||!r)&&n===r&&M(e,t)&&j(e,t))}(t,n)||function(e,t){let n=U(t),r=U(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&M(e,t)&&j(e,t))}(t,n)))return I.X&&b.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function j(e,t){let n=(0,D.Fr)(e),r=(0,D.Fr)(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function M(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function U(e){return e.exception&&e.exception.values&&e.exception.values[0]}var F=n(70518),$=n(58839);let B=$.GLOBAL_OBJ;function H(){if(!("fetch"in B))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function z(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}let V={},q={};function G(e,t){V[e]=V[e]||[],V[e].push(t)}function W(e,t){q[e]||(t(),q[e]=!0)}function K(e,t){let n=e&&V[e];if(n)for(let r of n)try{r(t)}catch(t){F.X&&b.kg.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${(0,D.$P)(r)}
Error:`,t)}}let Z=$.GLOBAL_OBJ,J=$.GLOBAL_OBJ;function X(e){let t="history";G(t,e),W(t,Y)}function Y(){if(!function(){let e=Z.chrome,t=e&&e.app&&e.app.runtime,n="history"in Z&&!!Z.history.pushState&&!!Z.history.replaceState;return!t&&n}())return;let e=J.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=i,t=String(n);i=t,K("history",{from:e,to:t})}return e.apply(this,t)}}J.onpopstate=function(...t){let n=J.location.href,r=i;if(i=n,K("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},(0,P.hl)(J.history,"pushState",t),(0,P.hl)(J.history,"replaceState",t)}let Q=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ee(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r?`${r}/`:r}${s}`}function et(e){let t=Q.exec(e);if(!t){(0,b.Cf)(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",a="",s="",o=""]=t.slice(1),u="",c=o,l=c.split("/");if(l.length>1&&(u=l.slice(0,-1).join("/"),c=l.pop()),c){let e=c.match(/^\d+/);e&&(c=e[0])}return en({host:a,pass:i,path:u,projectId:c,port:s,protocol:n,publicKey:r})}function en(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}var er=n(15242),ei=n(7709),ea=n(71781);function es(e,t=[]){return[e,t]}function eo(e,t){for(let n of e[1]){let e=n[0].type;if(t(n,e))return!0}return!1}function eu(e){return $.GLOBAL_OBJ.__SENTRY__&&$.GLOBAL_OBJ.__SENTRY__.encodePolyfill?$.GLOBAL_OBJ.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}let ec={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function el(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}class ed extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}var eh=n(65906),ef=n(16682),ep=n(21651),em=n(44498);function eg(e){if("boolean"==typeof e)return Number(e);let t="string"==typeof e?parseFloat(e):e;if("number"!=typeof t||isNaN(t)||t<0||t>1){I.X&&b.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}var ev=n(13381);let ey="Not capturing exception because it's already been captured.";class e_{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){let t="string"==typeof e?et(e):en(e);if(t&&function(e){if(!F.X)return!0;let{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(b.kg.error(`Invalid Sentry Dsn: ${t} missing`),!0))&&(n.match(/^\d+$/)?"http"===r||"https"===r?!(t&&isNaN(parseInt(t,10)))||(b.kg.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(b.kg.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(b.kg.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}(t))return t}(e.dsn):I.X&&b.kg.warn("No DSN provided, client will not send events."),this._dsn){var t,n,r;let i=(t=this._dsn,n=e.tunnel,r=e._metadata?e._metadata.sdk:void 0,n||`${function(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(t)}${t.projectId}/envelope/?${(0,P._j)({sentry_key:t.publicKey,sentry_version:"7",...r&&{sentry_client:`${r.name}/${r.version}`}})}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:i})}}captureException(e,t,n){let r=(0,w.DM)();if((0,w.YO)(e))return I.X&&b.kg.log(ey),r;let i={event_id:r,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n))),i.event_id}captureMessage(e,t,n,r){let i={event_id:(0,w.DM)(),...n},a=(0,er.Le)(e)?e:String(e),s=(0,er.pt)(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(s.then(e=>this._captureEvent(e,i,r))),i.event_id}captureEvent(e,t,n){let r=(0,w.DM)();if(t&&t.originalException&&(0,w.YO)(t.originalException))return I.X&&b.kg.log(ey),r;let i={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||n)),i.event_id}captureSession(e){"string"!=typeof e.release?I.X&&b.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),(0,em.CT)(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):(0,ei.WD)(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];T(this,e,this._integrations),t||S(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){var i;let a=el(n),s=e.type&&"replay_event"!==e.type?e.type:"event";(i=n&&n.sdk)&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||i.name,e.sdk.version=e.sdk.version||i.version,e.sdk.integrations=[...e.sdk.integrations||[],...i.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...i.packages||[]]);let o=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ee(r)},...i&&{trace:(0,P.Jr)({...i})}}}(e,a,r,t);return delete e.sdkProcessingMetadata,es(o,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=function(e,t){let[n,r]=e;return[n,[...r,t]]}(n,function(e){let t="string"==typeof e.data?eu(e.data):e.data;return[(0,P.Jr)({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}(e));let r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){let t=function(e,t,n,r){let i=el(n);return es({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:ee(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r="number"==typeof n?n:1,i=`${e}:${t}`;I.X&&b.kg.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)?this._transport.send(e).then(null,e=>(I.X&&b.kg.error("Error while sending event:",e),e)):(I.X&&b.kg.error("Transport disabled"),(0,ei.WD)({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&T(e,t,n)}),n}(this,e),S(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i)for(let e of(r=!0,i)){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}let a="ok"===e.status;(a&&0===e.errors||a&&n)&&((0,em.CT)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ei.cW(t=>{let n=0,r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=(0,R.aF)()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),(0,ev.R)(i,e,t,n,this,r).then(e=>{if(null===e)return e;let t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:n,spanId:r,parentSpanId:i,dsc:a}=t;e.contexts={trace:(0,P.Jr)({trace_id:n,span_id:r,parent_span_id:i}),...e.contexts};let s=a||(0,ef._l)(n,this);e.sdkProcessingMetadata={dynamicSamplingContext:s,...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{I.X&&("log"===e.logLevel?b.kg.log(e.message):b.kg.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=ew(e),s=eb(e),o=e.type||"error",u=`before send for type \`${o}\``,c=void 0===i?void 0:eg(i);if(s&&"number"==typeof c&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),(0,ei.$2)(new ed(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let l="replay_event"===o?"replay":o,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new ed("An event processor returned `null`, will not send event.","log");return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if((0,er.J8)(e))return e.then(e=>{if(!(0,er.PO)(e)&&null!==e)throw new ed(n);return e},e=>{throw new ed(`${t} rejected with ${e}`)});if(!(0,er.PO)(e)&&null!==e)throw new ed(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:s}=t;if(eb(n)&&i)return i(n,r);if(ew(n)){if(n.spans&&s){let t=[];for(let r of n.spans){let n=s(r);n?t.push(n):e.recordDroppedEvent("before_send","span")}n.spans=t}if(a){if(n.spans){let e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t),u)}).then(r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new ed(`${u} returned \`null\`, will not send event.`,"log")}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let s=r.transaction_info;return a&&s&&r.transaction!==e.transaction&&(r.transaction_info={...s,source:"custom"}),this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof ed)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ed(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){var e;I.X&&b.kg.log("Flushing outcomes...");let t=this._clearOutcomes();if(0===t.length){I.X&&b.kg.log("No outcomes to send");return}if(!this._dsn){I.X&&b.kg.log("No dsn provided, will not send outcomes");return}I.X&&b.kg.log("Sending outcomes:",t);let n=es((e=this._options.tunnel&&ee(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:(0,eh.yW)(),discarded_events:t}]]);this.sendEnvelope(n)}}function eb(e){return void 0===e.type}function ew(e){return"transaction"===e.type}let eE="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function eI(e,t){let n=eS(e,t),r={type:t&&t.name,value:function(e){let t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ek(e,t){return{exception:{values:[eI(e,t)]}}}function eS(e,t){let n=t.stacktrace||t.stack||"",r=t&&eT.test(t.message)?1:0,i="number"==typeof t.framesToPop?t.framesToPop:0;try{return e(n,r,i)}catch(e){}return[]}let eT=/Minified React error #\d+;/i;function eO(e,t,n,r,i){let a;if((0,er.VW)(t)&&t.error)return ek(e,t.error);if((0,er.TX)(t)||(0,er.fm)(t)){if("stack"in t)a=ek(e,t);else{let i=t.name||((0,er.TX)(t)?"DOMError":"DOMException"),s=t.message?`${i}: ${t.message}`:i;a=eA(e,s,n,r),(0,w.Db)(a,s)}return"code"in t&&(a.tags={...a.tags,"DOMException.code":`${t.code}`}),a}return(0,er.VZ)(t)?ek(e,t):((0,er.PO)(t)||(0,er.cO)(t)?a=function(e,t,n,r){let i=(0,R.s3)(),a=i&&i.getOptions().normalizeDepth,s=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),o={__serialized__:(0,ea.Qy)(t,a)};if(s)return{exception:{values:[eI(e,s)]},extra:o};let u={exception:{values:[{type:(0,er.cO)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let n=(0,P.zf)(e),r=t?"promise rejection":"exception";if((0,er.VW)(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if((0,er.cO)(e)){let t=function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e);return`Event \`${t}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=eS(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}(e,t,n,i):(a=eA(e,t,n,r),(0,w.Db)(a,`${t}`,void 0)),(0,w.EG)(a,{synthetic:!0}),a)}function eA(e,t,n,r){let i={};if(r&&n){let r=eS(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if((0,er.Le)(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}let eC=$.GLOBAL_OBJ,eP=0;function eR(e,t={},n){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return t;if((0,P.HK)(e))return e}catch(t){return e}let r=function(){let r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);let i=r.map(e=>eR(e,t));return e.apply(this,i)}catch(e){throw eP++,setTimeout(()=>{eP--}),(0,R.$e)(n=>{n.addEventProcessor(e=>(t.mechanism&&((0,w.Db)(e,void 0,void 0),(0,w.EG)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),(0,_.Tb)(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}(0,P.$Q)(r,e),(0,P.xp)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}class ex extends e_{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};y(t,"browser",["browser"],eC.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&eC.document&&eC.document.addEventListener("visibilitychange",()=>{"hidden"===eC.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=eO(e,t,n&&n.syntheticException||void 0,r);return(0,w.EG)(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),(0,ei.WD)(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){let a=eA(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),(0,ei.WD)(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){eE&&b.kg.warn("SDK not enabled, will not capture user feedback.");return}let t=function(e,{metadata:t,tunnel:n,dsn:r}){return es({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ee(r)}},[[{type:"user_report"},e]])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}function eN(){if(!J.document)return;let e=K.bind(null,"dom"),t=eD(e,!0);J.document.addEventListener("click",t,!1),J.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let n=J[t]&&J[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,P.hl)(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=eD(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(e){}return t.call(this,n,r,i)}}),(0,P.hl)(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}}))})}function eD(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch(e){return null}}(n);if("keypress"===n.type&&(!r||!r.tagName||"INPUT"!==r.tagName&&"TEXTAREA"!==r.tagName&&!r.isContentEditable))return;(0,P.xp)(n,"_sentryCaptured",!0),r&&!r._sentryId&&(0,P.xp)(r,"_sentryId",(0,w.DM)());let i="keypress"===n.type?"input":n.type;!function(e){if(e.type!==s)return!1;try{if(!e.target||e.target._sentryId!==o)return!1}catch(e){}return!0}(n)&&(e({event:n,name:i,global:t}),s=n.type,o=r?r._sentryId:void 0),clearTimeout(a),a=J.setTimeout(()=>{o=void 0,s=void 0},1e3)}}let eL="__sentry_xhr_v3__";function ej(e){G("xhr",e),W("xhr",eM)}function eM(){if(!J.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=1e3*(0,eh.ph)(),i=(0,er.HD)(n[0])?n[0].toUpperCase():void 0,a=function(e){if((0,er.HD)(e))return e;try{return e.toString()}catch(e){}}(n[1]);if(!i||!a)return e.apply(t,n);t[eL]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[eL];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}K("xhr",{endTimestamp:1e3*(0,eh.ph)(),startTimestamp:r,xhr:t})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[eL];return a&&(0,er.HD)(r)&&(0,er.HD)(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[eL];return r&&(void 0!==n[0]&&(r.body=n[0]),K("xhr",{startTimestamp:1e3*(0,eh.ph)(),xhr:t})),e.apply(t,n)}})}function eU(e,t){let n=(0,R.s3)(),r=(0,R.aF)();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=100}=n.getOptions();if(a<=0)return;let s={timestamp:(0,eh.yW)(),...e},o=i?(0,b.Cf)(()=>i(s,t)):s;null!==o&&(n.emit&&n.emit("beforeAddBreadcrumb",o,t),r.addBreadcrumb(o,a))}function eF(){"console"in $.GLOBAL_OBJ&&b.RU.forEach(function(e){e in $.GLOBAL_OBJ.console&&(0,P.hl)($.GLOBAL_OBJ.console,e,function(t){return b.LD[e]=t,function(...t){K("console",{args:t,level:e});let n=b.LD[e];n&&n.apply($.GLOBAL_OBJ.console,t)}})})}function e$(e,t){let n="fetch";G(n,e),W(n,()=>eB(void 0,t))}function eB(e,t=!1){(!t||function(){if("string"==typeof EdgeRuntime)return!0;if(!H())return!1;if(z(B.fetch))return!0;let e=!1,t=B.document;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=z(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){F.X&&b.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())&&(0,P.hl)($.GLOBAL_OBJ,"fetch",function(t){return function(...n){let{method:r,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,n]=e;return{url:eq(t),method:eV(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:eq(t),method:eV(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:r,url:i},startTimestamp:1e3*(0,eh.ph)()};e||K("fetch",{...a});let s=Error().stack;return t.apply($.GLOBAL_OBJ,n).then(async t=>(e?e(t):K("fetch",{...a,endTimestamp:1e3*(0,eh.ph)(),response:t}),t),e=>{throw K("fetch",{...a,endTimestamp:1e3*(0,eh.ph)(),error:e}),(0,er.VZ)(e)&&void 0===e.stack&&(e.stack=s,(0,P.xp)(e,"framesToPop",1)),e})}})}async function eH(e,t){if(e&&e.body&&e.body.getReader){let r=e.body.getReader();async function n({done:e}){if(e)return Promise.resolve();try{let e=await Promise.race([r.read(),new Promise(e=>{setTimeout(()=>{e({done:!0})},5e3)})]);await n(e)}catch(e){}}return r.read().then(n).then(t).catch(()=>void 0)}}async function ez(e){let t;try{t=e.clone()}catch(e){return}await eH(t,()=>{K("fetch-body-resolved",{endTimestamp:1e3*(0,eh.ph)(),response:e})})}function eV(e,t){return!!e&&"object"==typeof e&&!!e[t]}function eq(e){return"string"==typeof e?e:e?eV(e,"url")?e.url:e.toString?e.toString():"":""}var eG=n(5429);let eW=["fatal","error","warning","log","info","debug"];function eK(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}let eZ=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){let t="console";G(t,e),W(t,eF)}(function(t){var n;if((0,R.s3)()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(n=t.level)?"warning":eW.includes(n)?n:"log",message:(0,E.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${(0,E.nK)(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}eU(r,{input:t.args,level:t.level})}),t.dom&&(G("dom",(n=t.dom,function(t){let r,i;if((0,R.s3)()!==e)return;let a="object"==typeof n?n.serializeAttribute:void 0,s="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;s&&s>1024&&(eE&&b.kg.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=1024),"string"==typeof a&&(a=[a]);try{let e=t.event,n=e&&e.target?e.target:e;r=(0,eG.Rt)(n,{keyAttrs:a,maxStringLength:s}),i=(0,eG.iY)(n)}catch(e){r="<unknown>"}if(0===r.length)return;let o={category:`ui.${t.name}`,message:r};i&&(o.data={"ui.component_name":i}),eU(o,{event:t.event,name:t.name,global:t.global})})),W("dom",eN)),t.xhr&&ej(function(t){if((0,R.s3)()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[eL];if(!n||!r||!i)return;let{method:a,url:s,status_code:o,body:u}=i;eU({category:"xhr",data:{method:a,url:s,status_code:o},type:"http"},{xhr:t.xhr,input:u,startTimestamp:n,endTimestamp:r})}),t.fetch&&e$(function(t){if((0,R.s3)()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(!(!r||t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method)){if(t.error)eU({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r});else{let e=t.response;eU({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}),t.history&&X(function(t){if((0,R.s3)()!==e)return;let n=t.from,r=t.to,i=eK(eC.location.href),a=n?eK(n):void 0,s=eK(r);a&&a.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),eU({category:"navigation",data:{from:n,to:r}})}),t.sentry&&e.on("beforeSendEvent",function(t){(0,R.s3)()===e&&eU({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:(0,w.jH)(t)},{event:t})})}}},eJ=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],eX=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&(0,P.hl)(eC,"setTimeout",eY),t.setInterval&&(0,P.hl)(eC,"setInterval",eY),t.requestAnimationFrame&&(0,P.hl)(eC,"requestAnimationFrame",eQ),t.XMLHttpRequest&&"XMLHttpRequest"in eC&&(0,P.hl)(XMLHttpRequest.prototype,"send",e0);let e=t.eventTarget;e&&(Array.isArray(e)?e:eJ).forEach(e1)}}};function eY(e){return function(...t){let n=t[0];return t[0]=eR(n,{mechanism:{data:{function:(0,D.$P)(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function eQ(e){return function(t){return e.apply(this,[eR(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,D.$P)(e)},handled:!1,type:"instrument"}})])}}function e0(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&(0,P.hl)(n,e,function(t){let n={mechanism:{data:{function:e,handler:(0,D.$P)(t)},handled:!1,type:"instrument"}},r=(0,P.HK)(t);return r&&(n.mechanism.data.handler=(0,D.$P)(r)),eR(t,n)})}),e.apply(this,t)}}function e1(e){let t=eC[e]&&eC[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&((0,P.hl)(t,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=eR(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,D.$P)(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,eR(r,{mechanism:{data:{function:"addEventListener",handler:(0,D.$P)(r),target:e},handled:!1,type:"instrument"}}),i])}}),(0,P.hl)(t,"removeEventListener",function(e){return function(t,n,r){try{let i=n&&n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(e){}return e.call(this,t,n,r)}}))}let e2=null;function e3(e){let t="error";G(t,e),W(t,e4)}function e4(){e2=$.GLOBAL_OBJ.onerror,$.GLOBAL_OBJ.onerror=function(e,t,n,r,i){return K("error",{column:r,error:i,line:n,msg:e,url:t}),!!e2&&!e2.__SENTRY_LOADER__&&e2.apply(this,arguments)},$.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let e5=null;function e6(e){let t="unhandledrejection";G(t,e),W(t,e9)}function e9(){e5=$.GLOBAL_OBJ.onunhandledrejection,$.GLOBAL_OBJ.onunhandledrejection=function(e){return K("unhandledrejection",e),!e5||!!e5.__SENTRY_LOADER__||e5.apply(this,arguments)},$.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let e8=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(e3(t=>{let{stackParser:n,attachStacktrace:r}=te();if((0,R.s3)()!==e||eP>0)return;let{msg:i,url:a,line:s,column:o,error:u}=t,c=function(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},u=o.frames=o.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=(0,er.HD)(t)&&t.length>0?t:(0,eG.l4)();return 0===u.length&&u.push({colno:c,filename:d,function:D.Fi,in_app:!0,lineno:l}),e}(eO(n,u||i,void 0,r,!1),a,s,o);c.level="error",(0,_.eN)(c,{originalException:u,mechanism:{handled:!1,type:"onerror"}})}),e7("onerror")),t.onunhandledrejection&&(e6(t=>{let{stackParser:n,attachStacktrace:r}=te();if((0,R.s3)()!==e||eP>0)return;let i=function(e){if((0,er.pt)(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),a=(0,er.pt)(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:eO(n,i,void 0,r,!0);a.level="error",(0,_.eN)(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}),e7("onunhandledrejection"))}}};function e7(e){eE&&b.kg.log(`Global Handler attached: ${e}`)}function te(){let e=(0,R.s3)();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}let tt=()=>({name:"HttpContext",preprocessEvent(e){if(!eC.navigator&&!eC.location&&!eC.document)return;let t=e.request&&e.request.url||eC.location&&eC.location.href,{referrer:n}=eC.document||{},{userAgent:r}=eC.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:i};e.request=a}});function tn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function tr(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}let ti=(e={})=>{let t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){let a=i.getOptions();!function(e,t,n=250,r,i,a,s){if(!a.exception||!a.exception.values||!s||!(0,er.V9)(s.originalException,Error))return;let o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=(function e(t,n,r,i,a,s,o,u){if(s.length>=r+1)return s;let c=[...s];if((0,er.V9)(i[a],Error)){tn(o,u);let s=t(n,i[a]),l=c.length;tr(s,a,l,u),c=e(t,n,r,i[a],a,[s,...c],s,l)}return Array.isArray(i.errors)&&i.errors.forEach((i,s)=>{if((0,er.V9)(i,Error)){tn(o,u);let l=t(n,i),d=c.length;tr(l,`errors[${s}]`,d,u),c=e(t,n,r,i,a,[l,...c],l,d)}}),c})(e,t,i,s.originalException,r,a.exception.values,o,0).map(e=>(e.value&&(e.value=(0,E.$G)(e.value,n)),e)))}(eI,a.stackParser,a.maxValueLength,n,t,e,r)}}};function ta(e,t,n,r){let i={filename:e,function:"<anonymous>"===t?D.Fi:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}let ts=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,to=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tu=/\((\S*)(?::(\d+))(?::(\d+))\)/,tc=[30,e=>{let t=ts.exec(e);if(t){let[,e,n,r]=t;return ta(e,D.Fi,+n,+r)}let n=to.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){let e=tu.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=tp(n[1]||D.Fi,n[2]);return ta(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],tl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,td=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,th=[50,e=>{let t=tl.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=td.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||D.Fi;return[n,e]=tp(n,e),ta(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],tf=(0,D.pE)(tc,th),tp=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:D.Fi,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},tm="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,tg={};function tv(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function ty(e,t=function(e){let t=tg[e];if(t)return t;let n=J[e];if(z(n))return tg[e]=n.bind(J);let r=J.document;if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){tm&&b.kg.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?tg[e]=n.bind(J):n}("fetch")){let n=0,r=0;return function(e,t,n=function(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return(0,ei.$2)(new ed("Not adding Promise because buffer limit was reached."));let i=r();return -1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new ei.cW((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{(0,ei.WD)(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}}}(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(eo(i,(t,n)=>{let i=ec[n];if(function(e,t,n=Date.now()){return(e[t]||e.all||0)>n}(r,i)){let r=tv(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else a.push(t)}),0===a.length)return(0,ei.WD)({});let s=es(i[0],a),o=t=>{eo(s,(n,r)=>{let i=tv(n,r);e.recordDroppedEvent(t,ec[r],i)})};return n.add(()=>t({body:function(e){let[t,n]=e,r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[eu(r),e]:r.push("string"==typeof e?eu(e):e)}for(let e of n){let[t,n]=e;if(i(`
${JSON.stringify(t)}
`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify((0,ea.Fv)(n))}i(e)}}return"string"==typeof r?r:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}(r)}(s)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&I.X&&b.kg.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(a)for(let e of a.trim().split(",")){let[t,n,,,a]=e.split(":",5),s=parseInt(t,10),o=(isNaN(s)?60:s)*1e3;if(n)for(let e of n.split(";"))"metric_bucket"===e?(!a||a.split(";").includes("custom"))&&(i[e]=r+o):i[e]=r+o;else i.all=r+o}else s?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}(r,e),e),e=>{throw o("network_error"),e})).then(e=>e,e=>{if(e instanceof ed)return I.X&&b.kg.error("Skipped sending event because buffer is full."),o("queue_overflow"),(0,ei.WD)({});throw e})},flush:e=>n.drain(e)}}(e,function(i){let a=i.body.length;n+=a,r++;let s={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return tg.fetch=void 0,(0,ei.$2)("No fetch implementation available");try{return t(e.url,s).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return tg.fetch=void 0,n-=a,r--,(0,ei.$2)(e)}})}function t_(e){return[A(),N(),eX(),eZ(),e8(),ti(),L(),tt()]}var tb=n(18381),tw=n(55959),tE=n(70071),tI=n(42513);function tk(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let t=(0,R.s3)(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}var tS=n(12235);class tT{constructor(e={}){this._traceId=e.traceId||(0,w.DM)(),this._spanId=e.spanId||(0,w.DM)().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:ep.ve}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}var tO=n(47061);function tA(e){if(!e||0===e.length)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[tI.E1],i=n[tI.Wb];"string"==typeof r&&"number"==typeof i&&(t[e.name]={value:i,unit:r})}),t}let tC="_sentryScope",tP="_sentryIsolationScope";function tR(e){return{scope:e[tC],isolationScope:e[tP]}}class tx{constructor(e={}){this._traceId=e.traceId||(0,w.DM)(),this._spanId=e.spanId||(0,w.DM)().substring(16),this._startTime=e.startTimestamp||(0,eh.ph)(),this._attributes={},this.setAttributes({[tI.S3]:"manual",[tI.$J]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?ep.i0:ep.ve}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=(0,ep.$k)(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this}end(e){this._endTime||(this._endTime=(0,ep.$k)(e),function(e){if(!I.X)return;let{description:t="< unknown name >",op:n="< unknown op >"}=(0,ep.XU)(e),{spanId:r}=e.spanContext(),i=(0,ep.Gx)(e)===e,a=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;b.kg.log(a)}(this),this._onSpanEnded())}getSpanJSON(){return(0,P.Jr)({data:this._attributes,description:this._name,op:this._attributes[tI.$J],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:(0,ep._4)(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[tI.S3],_metrics_summary:(0,tO.y)(this),profile_id:this._attributes[tI.p6],exclusive_time:this._attributes[tI.JQ],measurements:tA(this._events),is_segment:this._isStandaloneSpan&&(0,ep.Gx)(this)===this||void 0,segment_id:this._isStandaloneSpan?(0,ep.Gx)(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){I.X&&b.kg.log("[Tracing] Adding an event to span:",e);let r=tN(t)?t:n||(0,eh.ph)(),i=tN(t)?{}:t||{},a={name:e,time:(0,ep.$k)(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=(0,R.s3)();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===(0,ep.Gx)(this)))return;if(this._isStandaloneSpan){this._sampled?function(e){let t=(0,R.s3)();if(!t)return;let n=e[1];if(!n||0===n.length){t.recordDroppedEvent("before_send","span");return}let r=t.getTransport();r&&r.send(e).then(null,e=>{I.X&&b.kg.error("Error while sending span:",e)})}(function(e,t){let n=(0,ef.jC)(e[0]),r=t&&t.getDsn(),i=t&&t.getOptions().tunnel,a={sent_at:new Date().toISOString(),...!!n.trace_id&&!!n.public_key&&{trace:n},...!!i&&r&&{dsn:ee(r)}},s=t&&t.getOptions().beforeSendSpan,o=s?e=>s((0,ep.XU)(e)):e=>(0,ep.XU)(e),u=[];for(let t of e){let e=o(t);e&&u.push([{type:"span"},e])}return es(a,u)}([this],e)):(I.X&&b.kg.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}let t=this._convertSpanToTransaction();t&&(tR(this).scope||(0,R.nZ)()).captureEvent(t)}_convertSpanToTransaction(){if(!tD((0,ep.XU)(this)))return;this._name||(I.X&&b.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:e,isolationScope:t}=tR(this),n=(e||(0,R.nZ)()).getClient()||(0,R.s3)();if(!0!==this._sampled){I.X&&b.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}let r=(0,ep.Dp)(this).filter(e=>e!==this&&!(e instanceof tx&&e.isStandaloneSpan())).map(e=>(0,ep.XU)(e)).filter(tD),i=this._attributes[tI.Zj],a={contexts:{trace:(0,ep.HR)(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...(0,P.Jr)({dynamicSamplingContext:(0,ef.jC)(this)})},_metrics_summary:(0,tO.y)(this),...i&&{transaction_info:{source:i}}},s=tA(this._events);return s&&Object.keys(s).length&&(I.X&&b.kg.log("[Measurements] Adding measurements to transaction event",JSON.stringify(s,void 0,2)),a.measurements=s),a}}function tN(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function tD(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}let tL="__SENTRY_SUPPRESS_TRACING__";function tj(e){let t=tU();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=function(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=(0,ep.$k)(e.startTime),delete n.startTime,n}return t}(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>(0,R.$e)(e.scope,t):void 0!==i?e=>tM(i,e):e=>e())(()=>{let t=(0,R.nZ)(),i=function(e){let t=(0,tS.Y)(e);if(!t)return;let n=(0,R.s3)();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?(0,ep.Gx)(t):t}(t);return e.onlyIfParent&&!i?new tT:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){var i;let a;if(!tk())return new tT;let s=(0,R.aF)();if(e&&!n)a=function(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=!t.getScopeData().sdkProcessingMetadata[tL]&&(0,ep.Tt)(e),s=a?new tx({...n,parentSpanId:r,traceId:i,sampled:a}):new tT({traceId:i});(0,ep.j5)(e,s);let o=(0,R.s3)();return o&&(o.emit("spanStart",s),n.endTimestamp&&o.emit("spanEnd",s)),s}(e,r,t),(0,ep.j5)(e,a);else if(e){let n=(0,ef.jC)(e),{traceId:i,spanId:s}=e.spanContext(),o=(0,ep.Tt)(e);a=tF({traceId:i,parentSpanId:s,...t},r,o),(0,ef.Lh)(a,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:o}={...s.getPropagationContext(),...r.getPropagationContext()};a=tF({traceId:e,parentSpanId:i,...t},r,o),n&&(0,ef.Lh)(a,n)}return function(e){if(!I.X)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=(0,ep.XU)(e),{spanId:i}=e.spanContext(),a=(0,ep.Tt)(e),s=(0,ep.Gx)(e),o=s===e,u=`[Tracing] Starting ${a?"sampled":"unsampled"} ${o?"root ":""}span`,c=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&c.push(`parent ID: ${r}`),!o){let{op:e,description:t}=(0,ep.XU)(s);c.push(`root ID: ${s.spanContext().spanId}`),e&&c.push(`root op: ${e}`),t&&c.push(`root description: ${t}`)}b.kg.log(`${u}
  ${c.join("\n  ")}`)}(a),(i=a)&&((0,P.xp)(i,tP,s),(0,P.xp)(i,tC,r)),a}({parentSpan:i,spanArguments:n,forceTransaction:r,scope:t})})}function tM(e,t){let n=tU();return n.withActiveSpan?n.withActiveSpan(e,t):(0,R.$e)(n=>((0,tS.D)(n,e||void 0),t(n)))}function tU(){let e=(0,tw.c)();return(0,tE.G)(e)}function tF(e,t,n){let r=(0,R.s3)(),i=r&&r.getOptions()||{},{name:a="",attributes:s}=e,[o,u]=t.getScopeData().sdkProcessingMetadata[tL]?[!1]:function(e,t){let n;if(!tk(e))return[!1];let r=eg(n="function"==typeof e.tracesSampler?e.tracesSampler(t):void 0!==t.parentSampled?t.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1);return void 0===r?(I.X&&b.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(I.X&&b.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(I.X&&b.kg.log(`[Tracing] Discarding transaction because ${"function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,r])}(i,{name:a,parentSampled:n,attributes:s,transactionContext:{name:a,parentSampled:n}}),c=new tx({...e,attributes:{[tI.Zj]:"custom",...e.attributes},sampled:o});return void 0!==u&&c.setAttribute(tI.TE,u),r&&r.emit("spanStart",c),c}var t$=n(73188);let tB=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",tH=(e,t,n,r)=>{let i,a;return s=>{t.value>=0&&(s||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=tB(t.value,n),e(t))}},tz=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,tV=()=>J.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],tq=()=>{let e=tV();return e&&e.activationStart||0},tG=(e,t)=>{let n=tV(),r="navigate";return n&&(J.document&&J.document.prerendering||tq()>0?r="prerender":J.document&&J.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:tz(),navigationType:r}},tW=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},tK=e=>{let t=t=>{("pagehide"===t.type||J.document&&"hidden"===J.document.visibilityState)&&e(t)};J.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},tZ=e=>{let t=!1;return n=>{t||(e(n),t=!0)}},tJ=-1,tX=()=>{tJ="hidden"!==J.document.visibilityState||J.document.prerendering?1/0:0},tY=e=>{"hidden"===J.document.visibilityState&&tJ>-1&&(tJ="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("visibilitychange",tY,!0),removeEventListener("prerenderingchange",tY,!0))},tQ=()=>{addEventListener("visibilitychange",tY,!0),addEventListener("prerenderingchange",tY,!0)},t0=()=>(J.document&&tJ<0&&(tX(),tQ()),{get firstHiddenTime(){return tJ}}),t1=e=>{J.document&&J.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},t2=[1800,3e3],t3=(e,t={})=>{t1(()=>{let n;let r=t0(),i=tG("FCP"),a=tW("paint",e=>{e.forEach(e=>{"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-tq(),0),i.entries.push(e),n(!0)))})});a&&(n=tH(e,i,t2,t.reportAllChanges))})},t4=[.1,.25],t5=(e,t={})=>{t3(tZ(()=>{let n;let r=tG("CLS",0),i=0,a=[],s=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=a[0],n=a[a.length-1];i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}}),i>r.value&&(r.value=i,r.entries=a,n())},o=tW("layout-shift",s);o&&(n=tH(e,r,t4,t.reportAllChanges),tK(()=>{s(o.takeRecords()),n(!0)}),setTimeout(n,0))}))},t6=[100,300],t9=(e,t={})=>{t1(()=>{let n;let r=t0(),i=tG("FID"),a=e=>{e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},s=e=>{e.forEach(a)},o=tW("first-input",s);n=tH(e,i,t6,t.reportAllChanges),o&&tK(tZ(()=>{s(o.takeRecords()),o.disconnect()}))})},t8=0,t7=1/0,ne=0,nt=e=>{e.forEach(e=>{e.interactionId&&(t7=Math.min(t7,e.interactionId),t8=(ne=Math.max(ne,e.interactionId))?(ne-t7)/7+1:0)})},nn=()=>u?t8:performance.interactionCount||0,nr=()=>{"interactionCount"in performance||u||(u=tW("event",nt,{type:"event",buffered:!0,durationThreshold:0}))},ni=[200,500],na=()=>nn()-0,ns=[],no={},nu=e=>{let t=ns[ns.length-1],n=no[e.interactionId];if(n||ns.length<10||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};no[t.id]=t,ns.push(t)}ns.sort((e,t)=>t.latency-e.latency),ns.splice(10).forEach(e=>{delete no[e.id]})}},nc=()=>{let e=Math.min(ns.length-1,Math.floor(na()/50));return ns[e]},nl=(e,t={})=>{t1(()=>{let n;nr();let r=tG("INP"),i=e=>{e.forEach(e=>{e.interactionId&&nu(e),"first-input"!==e.entryType||ns.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))||nu(e)});let t=nc();t&&t.latency!==r.value&&(r.value=t.latency,r.entries=t.entries,n())},a=tW("event",i,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});n=tH(e,r,ni,t.reportAllChanges),a&&("PerformanceEventTiming"in J&&"interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),tK(()=>{i(a.takeRecords()),r.value<0&&na()>0&&(r.value=0,r.entries=[]),n(!0)}))})},nd=[2500,4e3],nh={},nf=(e,t={})=>{t1(()=>{let n;let r=t0(),i=tG("LCP"),a=e=>{let t=e[e.length-1];t&&t.startTime<r.firstHiddenTime&&(i.value=Math.max(t.startTime-tq(),0),i.entries=[t],n())},s=tW("largest-contentful-paint",a);if(s){n=tH(e,i,nd,t.reportAllChanges);let r=tZ(()=>{nh[i.id]||(a(s.takeRecords()),s.disconnect(),nh[i.id]=!0,n(!0))});["keydown","click"].forEach(e=>{J.document&&addEventListener(e,()=>setTimeout(r,0),!0)}),tK(r)}})},np=[800,1800],nm=e=>{J.document&&J.document.prerendering?t1(()=>nm(e)):J.document&&"complete"!==J.document.readyState?addEventListener("load",()=>nm(e),!0):setTimeout(e,0)},ng=(e,t={})=>{let n=tG("TTFB"),r=tH(e,n,np,t.reportAllChanges);nm(()=>{let e=tV();if(e){let t=e.responseStart;if(t<=0||t>performance.now())return;n.value=Math.max(t-tq(),0),n.entries=[e],r(!0)}})},nv={},ny={};function n_(e,t=!1){return nO("cls",e,nE,c,t)}function nb(e,t){return nA(e,t),ny[e]||(function(e){let t={};"event"===e&&(t.durationThreshold=0),tW(e,t=>{nw(e,{entries:t})},t)}(e),ny[e]=!0),nC(e,t)}function nw(e,t){let n=nv[e];if(n&&n.length)for(let r of n)try{r(t)}catch(t){tm&&b.kg.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${(0,D.$P)(r)}
Error:`,t)}}function nE(){return t5(e=>{nw("cls",{metric:e}),c=e},{reportAllChanges:!0})}function nI(){return t9(e=>{nw("fid",{metric:e}),l=e})}function nk(){return nf(e=>{nw("lcp",{metric:e}),d=e},{reportAllChanges:!0})}function nS(){return ng(e=>{nw("ttfb",{metric:e}),h=e})}function nT(){return nl(e=>{nw("inp",{metric:e}),f=e})}function nO(e,t,n,r,i=!1){let a;return nA(e,t),ny[e]||(a=n(),ny[e]=!0),r&&t({metric:r}),nC(e,t,i?a:void 0)}function nA(e,t){nv[e]=nv[e]||[],nv[e].push(t)}function nC(e,t,n){return()=>{n&&n();let r=nv[e];if(!r)return;let i=r.indexOf(t);-1!==i&&r.splice(i,1)}}function nP(e){return"number"==typeof e&&isFinite(e)}function nR(e,t,n,{...r}){let i=(0,ep.XU)(e).start_timestamp;return i&&i>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),tM(e,()=>{let e=tj({startTime:t,...r});return e&&e.end(n),e})}function nx(e){let t;let n=(0,R.s3)();if(!n)return;let{name:r,transaction:i,attributes:a,startTime:s}=e,{release:o,environment:u}=n.getOptions(),c=n.getIntegrationByName("Replay"),l=c&&c.getReplayId(),d=(0,R.nZ)(),h=d.getUser(),f=void 0!==h?h.email||h.id||h.ip_address:void 0;try{t=d.getScopeData().contexts.profile.profile_id}catch(e){}return tj({name:r,attributes:{release:o,environment:u,user:f||void 0,profile_id:t||void 0,replay_id:l||void 0,transaction:i,"user_agent.original":J.navigator&&J.navigator.userAgent,...a},startTime:s,experimental:{standalone:!0}})}function nN(){return J&&J.addEventListener&&J.performance}function nD(e){return e/1e3}let nL=0,nj={};function nM(e,t,n,r,i,a){let s=a?t[a]:t[`${n}End`],o=t[`${n}Start`];o&&s&&nR(e,r+nD(o),r+nD(s),{op:"browser",name:i||n,attributes:{[tI.S3]:"auto.ui.browser.metrics"}})}function nU(e,t,n,r){let i=t[n];null!=i&&i<2147483647&&(e[r]=i)}let nF=[],n$=new Map,nB={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};var nH=n(615);let nz={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function nV(e,t={}){let n;let r=new Map,i=!1,a="externalFinish",s=!t.disableAutoFinish,o=[],{idleTimeout:u=nz.idleTimeout,finalTimeout:c=nz.finalTimeout,childSpanTimeout:l=nz.childSpanTimeout,beforeSpanEnd:d}=t,h=(0,R.s3)();if(!h||!tk())return new tT;let f=(0,R.nZ)(),p=(0,ep.HN)(),m=function(e){let t=tj(e);return(0,tS.D)((0,R.nZ)(),t),I.X&&b.kg.log("[Tracing] Started span is an idle span"),t}(e);function g(){n&&(clearTimeout(n),n=void 0)}function v(e){g(),n=setTimeout(()=>{!i&&0===r.size&&s&&(a="idleTimeout",m.end(e))},u)}function y(e){n=setTimeout(()=>{!i&&s&&(a="heartbeatFailed",m.end(e))},l)}function _(e){i=!0,r.clear(),o.forEach(e=>e()),(0,tS.D)(f,p);let t=(0,ep.XU)(m),{start_timestamp:n}=t;if(!n)return;(t.data||{})[tI.ju]||m.setAttribute(tI.ju,a),b.kg.log(`[Tracing] Idle span "${t.op}" finished`);let s=(0,ep.Dp)(m).filter(e=>e!==m),l=0;s.forEach(t=>{t.isRecording()&&(t.setStatus({code:nH.jt,message:"cancelled"}),t.end(e),I.X&&b.kg.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=(0,ep.XU)(t),i=r<=e,a=n-r<=(c+u)/1e3;if(I.X){let e=JSON.stringify(t,void 0,2);i?a||b.kg.log("[Tracing] Discarding span since it finished after idle span final timeout",e):b.kg.log("[Tracing] Discarding span since it happened after idle span was finished",e)}(!a||!i)&&((0,ep.ed)(m,t),l++)}),l>0&&m.setAttribute("sentry.idle_span_discarded_spans",l)}return m.end=new Proxy(m.end,{apply(e,t,n){d&&d(m);let[r,...i]=n,a=r||(0,eh.ph)(),s=(0,ep.$k)(a),o=(0,ep.Dp)(m).filter(e=>e!==m);if(!o.length)return _(s),Reflect.apply(e,t,[s,...i]);let u=o.map(e=>(0,ep.XU)(e).timestamp).filter(e=>!!e),l=u.length?Math.max(...u):void 0,h=(0,ep.XU)(m).start_timestamp,f=Math.min(h?h+c/1e3:1/0,Math.max(h||-1/0,Math.min(s,l||1/0)));return _(f),Reflect.apply(e,t,[f,...i])}}),o.push(h.on("spanStart",e=>{if(!i&&e!==m&&!(0,ep.XU)(e).timestamp&&(0,ep.Dp)(m).includes(e)){var t;t=e.spanContext().spanId,g(),r.set(t,!0),y((0,eh.ph)()+l/1e3)}})),o.push(h.on("spanEnd",e=>{var t;i||(t=e.spanContext().spanId,r.has(t)&&r.delete(t),0===r.size&&v((0,eh.ph)()+u/1e3))})),o.push(h.on("idleSpanEnableAutoFinish",e=>{e===m&&(s=!0,v(),r.size&&y())})),t.disableAutoFinish||v(),setTimeout(()=>{i||(m.setStatus({code:nH.jt,message:"deadline_exceeded"}),a="finalTimeout",m.end())},c),m}let nq=!1;function nG(){let e=(0,ep.HN)(),t=e&&(0,ep.Gx)(e);if(t){let e="internal_error";I.X&&b.kg.log(`[Tracing] Root span: ${e} -> Global error occured`),t.setStatus({code:nH.jt,message:e})}}nG.tag="sentry_tracingErrorCallback";var nW=n(26733),nK=n(36815),nZ=n(35283);let nJ=new WeakMap,nX=new Map,nY={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function nQ(e){let{url:t}=(0,ep.XU)(e).data||{};if(!t||"string"!=typeof t)return;let n=nb("resource",({entries:r})=>{r.forEach(r=>{"resource"===r.entryType&&"initiatorType"in r&&"string"==typeof r.nextHopProtocol&&("fetch"===r.initiatorType||"xmlhttprequest"===r.initiatorType)&&r.name.endsWith(t)&&((function(e){let{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(let i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol),r=[];return(r.push(["network.protocol.version",n],["network.protocol.name",t]),eh.Z1)?[...r,["http.request.redirect_start",n0(e.redirectStart)],["http.request.fetch_start",n0(e.fetchStart)],["http.request.domain_lookup_start",n0(e.domainLookupStart)],["http.request.domain_lookup_end",n0(e.domainLookupEnd)],["http.request.connect_start",n0(e.connectStart)],["http.request.secure_connection_start",n0(e.secureConnectionStart)],["http.request.connection_end",n0(e.connectEnd)],["http.request.request_start",n0(e.requestStart)],["http.request.response_start",n0(e.responseStart)],["http.request.response_end",n0(e.responseEnd)]]:r})(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function n0(e=0){return((eh.Z1||performance.timeOrigin)+e)/1e3}function n1(e){try{return new URL(e,eC.location.origin).href}catch(e){return}}let n2={...nz,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...nY},n3=(e={})=>{nq||(nq=!0,e3(nG),e6(nG));let{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:a},beforeStartSpan:s,idleTimeout:o,finalTimeout:u,childSpanTimeout:c,markBackgroundSpan:g,traceFetch:v,traceXHR:y,shouldCreateSpanForRequest:_,enableHTTPTimings:w,instrumentPageLoad:I,instrumentNavigation:k}={...n2,...e},S=function({recordClsStandaloneSpans:e}){let t=nN();if(t&&eh.Z1){t.mark&&J.performance.mark("sentry-tracing-init");let n=nO("fid",({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=nD(eh.Z1),r=nD(t.startTime);tm&&b.kg.log("[Measurements] Adding FID"),nj.fid={value:e.value,unit:"millisecond"},nj["mark.fid"]={value:n+r,unit:"second"}},nI,l),r=function(e,t=!1){return nO("lcp",e,nk,d,t)}(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(tm&&b.kg.log("[Measurements] Adding LCP"),nj.lcp={value:e.value,unit:"millisecond"},p=t)},!0),i=nO("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(tm&&b.kg.log("[Measurements] Adding TTFB"),nj.ttfb={value:e.value,unit:"millisecond"})},nS,h),a=e?function(){let e,t,n=0;if(!function(){try{return(0,t$.x)([PerformanceObserver,"access",e=>e.supportedEntryTypes,"optionalAccess",e=>e.includes,"call",e=>e("layout-shift")])}catch(e){return!1}}())return;let r=!1;function i(){r||(r=!0,t&&function(e,t,n){tm&&b.kg.log(`Sending CLS span (${e})`);let r=nD((eh.Z1||0)+((0,t$.x)([t,"optionalAccess",e=>e.startTime])||0)),i=(0,R.nZ)().getScopeData().transactionName,a=nx({name:t?(0,eG.Rt)((0,t$.x)([t,"access",e=>e.sources,"access",e=>e[0],"optionalAccess",e=>e.node])):"Layout shift",transaction:i,attributes:(0,P.Jr)({[tI.S3]:"auto.http.browser.cls",[tI.$J]:"ui.webvital.cls",[tI.JQ]:(0,t$.x)([t,"optionalAccess",e=>e.duration])||0,"sentry.pageload.span_id":n}),startTime:r});(0,t$.x)([a,"optionalAccess",e=>e.addEvent,"call",t=>t("cls",{[tI.E1]:"",[tI.Wb]:e})]),(0,t$.x)([a,"optionalAccess",e=>e.end,"call",e=>e(r)])}(n,e,t),a())}let a=n_(({metric:t})=>{let r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);tK(()=>{i()}),setTimeout(()=>{let e=(0,R.s3)(),n=(0,t$.x)([e,"optionalAccess",e=>e.on,"call",e=>e("startNavigationSpan",()=>{i(),n&&n()})]),r=(0,ep.HN)(),a=r&&(0,ep.Gx)(r),s=a&&(0,ep.XU)(a);s&&"pageload"===s.op&&(t=a.spanContext().spanId)},0)}():n_(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(tm&&b.kg.log(`[Measurements] Adding CLS ${e.value}`),nj.cls={value:e.value,unit:""},m=t)},!0);return()=>{n(),r(),i(),a&&a()}}return()=>void 0}({recordClsStandaloneSpans:a||!1});t&&function(){if(nN()&&eh.Z1){let e=nO("inp",({metric:e})=>{if(void 0==e.value)return;let t=e.entries.find(t=>t.duration===e.value&&nB[t.name]);if(!t)return;let{interactionId:n}=t,r=nB[t.name],i=nD(eh.Z1+t.startTime),a=nD(e.value),s=(0,ep.HN)(),o=s?(0,ep.Gx)(s):void 0,u=(null!=n?n$.get(n):void 0)||o,c=u?(0,ep.XU)(u).description:(0,R.nZ)().getScopeData().transactionName,l=nx({name:(0,eG.Rt)(t.target),transaction:c,attributes:(0,P.Jr)({[tI.S3]:"auto.http.browser.inp",[tI.$J]:`ui.interaction.${r}`,[tI.JQ]:t.duration}),startTime:i});(0,t$.x)([l,"optionalAccess",e=>e.addEvent,"call",t=>t("inp",{[tI.E1]:"millisecond",[tI.Wb]:e.value})]),(0,t$.x)([l,"optionalAccess",e=>e.end,"call",e=>e(i+a)])},nT,f)}}(),r&&$.GLOBAL_OBJ.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{if((0,ep.HN)())for(let t of e.getEntries()){if(!t.scripts[0])continue;let e=nD(eh.Z1+t.startTime),n=nD(t.duration),r={[tI.S3]:"auto.ui.browser.metrics"},{invoker:i,invokerType:a,sourceURL:s,sourceFunctionName:o,sourceCharPosition:u}=t.scripts[0];r["browser.script.invoker"]=i,r["browser.script.invoker_type"]=a,s&&(r["code.filepath"]=s),o&&(r["code.function"]=o),-1!==u&&(r["browser.script.source_char_position"]=u);let c=tj({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:e,attributes:r});c&&c.end(e+n)}}).observe({type:"long-animation-frame",buffered:!0}):n&&nb("longtask",({entries:e})=>{if((0,ep.HN)())for(let t of e){let e=nD(eh.Z1+t.startTime),n=nD(t.duration),r=tj({name:"Main UI thread blocked",op:"ui.long-task",startTime:e,attributes:{[tI.S3]:"auto.ui.browser.metrics"}});r&&r.end(e+n)}}),i&&nb("event",({entries:e})=>{if((0,ep.HN)()){for(let t of e)if("click"===t.name){let e=nD(eh.Z1+t.startTime),n=nD(t.duration),r={name:(0,eG.Rt)(t.target),op:`ui.interaction.${t.name}`,startTime:e,attributes:{[tI.S3]:"auto.ui.browser.metrics"}},i=(0,eG.iY)(t.target);i&&(r.attributes["ui.component_name"]=i);let a=tj(r);a&&a.end(e+n)}}});let T={name:void 0,source:void 0};function O(e,t){let n="pageload"===t.op,r=s?s(t):t,i=r.attributes||{};t.name!==r.name&&(i[tI.Zj]="custom",r.attributes=i),T.name=r.name,T.source=i[tI.Zj];let l=nV(r,{idleTimeout:o,finalTimeout:u,childSpanTimeout:c,disableAutoFinish:n,beforeSpanEnd:e=>{S(),function(e,t){let n=nN();if(!n||!J.performance.getEntries||!eh.Z1)return;tm&&b.kg.log("[Tracing] Adding & adjusting spans using Performance API");let r=nD(eh.Z1),i=n.getEntries(),{op:a,start_timestamp:s}=(0,ep.XU)(e);if(i.slice(nL).forEach(t=>{let n=nD(t.startTime),i=nD(Math.max(0,t.duration));if("navigation"!==a||!s||!(r+n<s))switch(t.entryType){case"navigation":["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{nM(e,t,n,r)}),nM(e,t,"secureConnection",r,"TLS/SSL","connectEnd"),nM(e,t,"fetch",r,"cache","domainLookupStart"),nM(e,t,"domainLookup",r,"DNS"),function(e,t,n){let r=n+nD(t.requestStart),i=n+nD(t.responseEnd),a=n+nD(t.responseStart);t.responseEnd&&(nR(e,r,i,{op:"browser",name:"request",attributes:{[tI.S3]:"auto.ui.browser.metrics"}}),nR(e,a,i,{op:"browser",name:"response",attributes:{[tI.S3]:"auto.ui.browser.metrics"}}))}(e,t,r);break;case"mark":case"paint":case"measure":{(function(e,t,n,r,i){let a=tV(),s=i+Math.max(n,nD(a?a.requestStart:0)),o=i+n,u={[tI.S3]:"auto.resource.browser.metrics"};s!==o&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=s),nR(e,s,o+r,{name:t.name,op:t.entryType,attributes:u})})(e,t,n,i,r);let a=t0(),s=t.startTime<a.firstHiddenTime;"first-paint"===t.name&&s&&(tm&&b.kg.log("[Measurements] Adding FP"),nj.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&s&&(tm&&b.kg.log("[Measurements] Adding FCP"),nj.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":(function(e,t,n,r,i,a){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let s=eK(n),o={[tI.S3]:"auto.resource.browser.metrics"};nU(o,t,"transferSize","http.response_transfer_size"),nU(o,t,"encodedBodySize","http.response_content_length"),nU(o,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(o["url.scheme"]=s.protocol.split(":").pop()),s.host&&(o["server.address"]=s.host),o["url.same_origin"]=n.includes(J.location.origin);let u=a+r;nR(e,u,u+i,{name:n.replace(J.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:o})})(e,t,t.name,n,i,r)}}),nL=Math.max(i.length-1,0),function(e){let t=J.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),nP(n.rtt)&&(nj["connection.rtt"]={value:n.rtt,unit:"millisecond"})),nP(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),nP(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===a){(function(e){let t=tV();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(tm&&b.kg.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})})(nj);let n=nj["mark.fid"];n&&nj.fid&&(nR(e,n.value,n.value+nD(nj.fid.value),{name:"first input delay",op:"ui.action",attributes:{[tI.S3]:"auto.ui.browser.metrics"}}),delete nj["mark.fid"]),"fcp"in nj&&t.recordClsOnPageloadSpan||delete nj.cls,Object.entries(nj).forEach(([e,t])=>{!function(e,t,n,r=(0,ep.HN)()){let i=r&&(0,ep.Gx)(r);i&&i.addEvent(e,{[tI.Wb]:t,[tI.E1]:n})}(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",r),p&&(tm&&b.kg.log("[Measurements] Adding LCP Data"),p.element&&e.setAttribute("lcp.element",(0,eG.Rt)(p.element)),p.id&&e.setAttribute("lcp.id",p.id),p.url&&e.setAttribute("lcp.url",p.url.trim().slice(0,200)),e.setAttribute("lcp.size",p.size)),m&&m.sources&&(tm&&b.kg.log("[Measurements] Adding CLS Data"),m.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,(0,eG.Rt)(t.node))))}p=void 0,m=void 0,nj={}}(e,{recordClsOnPageloadSpan:!a})}});function d(){["interactive","complete"].includes(eC.document.readyState)&&e.emit("idleSpanEnableAutoFinish",l)}return n&&eC.document&&(eC.document.addEventListener("readystatechange",()=>{d()}),d()),l}return{name:"BrowserTracing",afterAllSetup(e){let n,r;let a=eC.location&&eC.location.href;e.on("startNavigationSpan",t=>{(0,R.s3)()===e&&(n&&!(0,ep.XU)(n).timestamp&&(eE&&b.kg.log(`[Tracing] Finishing current root span with op: ${(0,ep.XU)(n).op}`),n.end()),n=O(e,{op:"navigation",...t}))}),e.on("startPageLoadSpan",(t,r={})=>{if((0,R.s3)()!==e)return;n&&!(0,ep.XU)(n).timestamp&&(eE&&b.kg.log(`[Tracing] Finishing current root span with op: ${(0,ep.XU)(n).op}`),n.end());let i=r.sentryTrace||n6("sentry-trace"),a=r.baggage||n6("baggage"),s=(0,nW.pT)(i,a);(0,R.nZ)().setPropagationContext(s),n=O(e,{op:"pageload",...t})}),e.on("spanEnd",e=>{let t=(0,ep.XU)(e).op;if(e!==(0,ep.Gx)(e)||"navigation"!==t&&"pageload"!==t)return;let n=(0,R.nZ)(),r=n.getPropagationContext();n.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:(0,ep.Tt)(e),dsc:r.dsc||(0,ef.jC)(e)})}),eC.location&&(I&&n4(e,{name:eC.location.pathname,startTime:eh.Z1?eh.Z1/1e3:void 0,attributes:{[tI.Zj]:"url",[tI.S3]:"auto.pageload.browser"}}),k&&X(({to:t,from:n})=>{if(void 0===n&&a&&-1!==a.indexOf(t)){a=void 0;return}n!==t&&(a=void 0,n5(e,{name:eC.location.pathname,attributes:{[tI.Zj]:"url",[tI.S3]:"auto.navigation.browser"}}))})),g&&(eC&&eC.document?eC.document.addEventListener("visibilitychange",()=>{let e=(0,ep.HN)();if(!e)return;let t=(0,ep.Gx)(e);if(eC.document.hidden&&t){let e="cancelled",{op:n,status:r}=(0,ep.XU)(t);eE&&b.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:nH.jt,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):eE&&b.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),i&&eC.document&&addEventListener("click",()=>{let e="ui.action.click",t=(0,ep.HN)(),n=t&&(0,ep.Gx)(t);if(n&&["navigation","pageload"].includes((0,ep.XU)(n).op)){eE&&b.kg.warn(`[Tracing] Did not create ${e} span because a pageload or navigation span is in progress.`);return}if(r&&(r.setAttribute(tI.ju,"interactionInterrupted"),r.end(),r=void 0),!T.name){eE&&b.kg.warn(`[Tracing] Did not create ${e} transaction because _latestRouteName is missing.`);return}r=nV({name:T.name,op:e,attributes:{[tI.Zj]:T.source||"url"}},{idleTimeout:o,finalTimeout:u,childSpanTimeout:c})},{once:!1,capture:!0}),t&&function(){let e=({entries:e})=>{let t=(0,ep.HN)(),n=t&&(0,ep.Gx)(t);e.forEach(e=>{if(!("duration"in e)||!n)return;let t=e.interactionId;if(!(null==t||n$.has(t))){if(nF.length>10){let e=nF.shift();n$.delete(e)}nF.push(t),n$.set(t,n)}})};nb("event",e),nb("first-input",e)}(),function(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:s}={traceFetch:nY.traceFetch,traceXHR:nY.traceXHR,...t},o="function"==typeof i?i:e=>!0,u=e=>(function(e,t){let n=eC.location&&eC.location.href;if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch(e){return!1}let a=r.origin===i;return t?(0,E.U0)(r.toString(),t)||a&&(0,E.U0)(r.pathname,t):a}{let n=!!e.match(/^\/(?!\/)/);return t?(0,E.U0)(e,t):n}})(e,s),c={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){let t=nX.get(e.span_id);t&&(e.timestamp=t/1e3,nX.delete(e.span_id))}}),e)),function(e){let t="fetch-body-resolved";G(t,e),W(t,()=>eB(ez))}(e=>{if(e.response){let t=nJ.get(e.response);t&&e.endTimestamp&&nX.set(t,e.endTimestamp)}}),e$(e=>{let t=function(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;let a=tk()&&t(e.fetchData.url);if(e.endTimestamp&&a){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(function(e,t){if(t.response){(0,nH.Q0)(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){let t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:nH.jt,message:"internal_error"});e.end()}(n,e),delete r[t]);return}let s=(0,R.nZ)(),o=(0,R.s3)(),{method:u,url:c}=e.fetchData,l=function(e){try{return new URL(e).href}catch(e){return}}(c),d=l?eK(l).host:void 0,h=!!(0,ep.HN)(),f=a&&h?tj({name:`${u} ${c}`,attributes:{url:c,type:"fetch","http.method":u,"http.url":l,"server.address":d,[tI.S3]:i,[tI.$J]:"http.client"}}):new tT;if(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)&&o){let t=e.args[0];e.args[1]=e.args[1]||{};let n=e.args[1];n.headers=function(e,t,n,r,i){let{traceId:a,spanId:s,sampled:o,dsc:u}={...(0,R.aF)().getPropagationContext(),...n.getPropagationContext()},c=i?(0,ep.Hb)(i):(0,nW.$p)(a,s,o),l=(0,nZ.IQ)(u||(i?(0,ef.jC)(i):(0,ef._l)(a,t))),d=r.headers||("undefined"!=typeof Request&&(0,er.V9)(e,Request)?e.headers:void 0);if(!d)return{"sentry-trace":c,baggage:l};if("undefined"!=typeof Headers&&(0,er.V9)(d,Headers)){let e=new Headers(d);return e.append("sentry-trace",c),l&&e.append(nZ.bU,l),e}if(Array.isArray(d)){let e=[...d,["sentry-trace",c]];return l&&e.push([nZ.bU,l]),e}{let e="baggage"in d?d.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),l&&t.push(l),{...d,"sentry-trace":c,baggage:t.length>0?t.join(","):void 0}}}(t,o,s,n,tk()&&h?f:void 0)}return f}(e,o,u,c);if(e.response&&e.fetchData.__span&&nJ.set(e.response,e.fetchData.__span),t){let n=n1(e.fetchData.url),r=n?eK(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}a&&t&&nQ(t)})),r&&ej(e=>{let t=function(e,t,n,r){let i=e.xhr,a=i&&i[eL];if(!i||i.__sentry_own_request__||!a)return;let s=tk()&&t(a.url);if(e.endTimestamp&&s){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&void 0!==a.status_code&&((0,nH.Q0)(t,a.status_code),t.end(),delete r[e]);return}let o=n1(a.url),u=o?eK(o).host:void 0,c=!!(0,ep.HN)(),l=s&&c?tj({name:`${a.method} ${a.url}`,attributes:{type:"xhr","http.method":a.method,"http.url":o,url:a.url,"server.address":u,[tI.S3]:"auto.http.browser",[tI.$J]:"http.client"}}):new tT;i.__sentry_xhr_span_id__=l.spanContext().spanId,r[i.__sentry_xhr_span_id__]=l;let d=(0,R.s3)();return i.setRequestHeader&&n(a.url)&&d&&function(e,t,n){let r=(0,R.nZ)(),{traceId:i,spanId:a,sampled:s,dsc:o}={...(0,R.aF)().getPropagationContext(),...r.getPropagationContext()};(function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(nZ.bU,n)}catch(e){}})(e,n&&tk()?(0,ep.Hb)(n):(0,nW.$p)(i,a,s),(0,nZ.IQ)(o||(n?(0,ef.jC)(n):(0,ef._l)(i,t))))}(i,d,tk()&&c?l:void 0),l}(e,o,u,c);a&&t&&nQ(t)})}(e,{traceFetch:v,traceXHR:y,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:w})}}};function n4(e,t,n){e.emit("startPageLoadSpan",t,n),(0,R.nZ)().setTransactionName(t.name);let r=(0,ep.HN)();return"pageload"===(r&&(0,ep.XU)(r).op)?r:void 0}function n5(e,t){(0,R.aF)().setPropagationContext((0,nK.Q)()),(0,R.nZ)().setPropagationContext((0,nK.Q)()),e.emit("startNavigationSpan",t),(0,R.nZ)().setTransactionName(t.name);let n=(0,ep.HN)();return"navigation"===(n&&(0,ep.XU)(n).op)?n:void 0}function n6(e){let t=(0,eG.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}var n9=n(10655),n8=n(86868);let n7=n9.events?n9:n9.default,re=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function rt(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n="/"===i.charAt(0))}return t=(function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e})(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function rn(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}let rr=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in $.GLOBAL_OBJ&&void 0!==$.GLOBAL_OBJ.window,i=e.iteratee||function({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;0===e.indexOf(t)&&(r.filename=e.replace(t,n))}}else if(i||a){let e;let a=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,s=t?function(e,t){e=rt(e).slice(1),t=rt(t).slice(1);let n=rn(e.split("/")),r=rn(t.split("/")),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let s=[];for(let e=a;e<n.length;e++)s.push("..");return(s=s.concat(r.slice(a))).join("/")}(t,a):function(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=re.exec(t);return n?n.slice(1):[]}(a)[2]||"";r.filename=`${n}${s}`}return r}}({isBrowser:r,root:t,prefix:n});return{name:"RewriteFrames",processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{var t;return{...e,...e.stacktrace&&{stacktrace:{...t=e.stacktrace,frames:t&&t.frames&&t.frames.map(e=>i(e))}}}})}}}catch(t){return e}}(t)),t}}},ri=({assetPrefixPath:e})=>({...rr({iteratee:t=>{try{let{origin:n}=new URL(t.filename);t.filename=(0,t$.x)([t,"access",e=>e.filename,"optionalAccess",e=>e.replace,"call",e=>e(n,"app://"),"access",e=>e.replace,"call",t=>t(e,"")])}catch(e){}return t.filename&&t.filename.startsWith("app:///_next")&&(t.filename=decodeURI(t.filename)),t.filename&&t.filename.match(/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/)&&(t.in_app=!1),t}}),name:"NextjsClientStackFrameNormalization"}),ra=$.GLOBAL_OBJ,rs=$.GLOBAL_OBJ,ro=new Map,ru=new Set,rc="_sentryBundlerPluginAppKey:";var rl=n(17017);globalThis.__sentryRewritesTunnelPath__=void 0,globalThis.SENTRY_RELEASE={id:"pawshake-seo"},globalThis.__sentryBasePath=void 0,globalThis.__rewriteFramesAssetPrefixPath__="/prebuild",function(e){let t={environment:"production",defaultIntegrations:function(e){let t=t_(e);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&t.push(function(e={}){let t=n3({...e,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:n=!0,instrumentNavigation:r=!0}=e;return{...t,afterAllSetup(e){var i;r&&(i=e,eC.document.getElementById("__NEXT_DATA__")?n7.events.on("routeChangeStart",e=>{let t,n;let r=e.split(/[?#]/,1)[0],a=function(e){let t=(eC.__BUILD_MANIFEST||{}).sortedPages;if(t)return t.find(t=>{let n=function(e){let t=e.split("/"),n="";(0,t$.x)([t,"access",e=>e[t.length-1],"optionalAccess",e=>e.match,"call",e=>e(/^\[\[\.\.\..+\]\]$/)])&&(t.pop(),n="(?:/(.+?))?");let r=t.map(e=>e.replace(/^\[\.\.\..+\]$/,"(.+?)").replace(/^\[.*\]$/,"([^/]+?)")).join("/");return RegExp(`^${r}${n}(?:/)?$`)}(t);return e.match(n)})}(r);a?(t=a,n="route"):(t=r,n="url"),n5(i,{name:t,attributes:{[tI.$J]:"navigation",[tI.S3]:"auto.navigation.nextjs.pages_router_instrumentation",[tI.Zj]:n}})}):e$(e=>{if(void 0!==e.endTimestamp||"GET"!==e.fetchData.method)return;let t=function(e){if(!e[0]||"object"!=typeof e[0]||void 0===e[0].searchParams||!e[1]||"object"!=typeof e[1]||!("headers"in e[1]))return null;try{let t=e[0],n=e[1].headers;if("1"!==n.RSC||"1"===n["Next-Router-Prefetch"])return null;return{targetPathname:t.pathname}}catch(e){return null}}(e.args);null!==t&&n5(i,{name:t.targetPathname,attributes:{[tI.$J]:"navigation",[tI.S3]:"auto.navigation.nextjs.app_router_instrumentation",[tI.Zj]:"url"}})})),t.afterAllSetup(e),n&&(eC.document.getElementById("__NEXT_DATA__")?function(e){let{route:t,params:n,sentryTrace:r,baggage:i}=function(){let e;let t=eC.document.getElementById("__NEXT_DATA__");if(t&&t.innerHTML)try{e=JSON.parse(t.innerHTML)}catch(e){n8.X&&b.kg.warn("Could not extract __NEXT_DATA__")}if(!e)return{};let n={},{page:r,query:i,props:a}=e;return n.route=r,n.params=i,a&&a.pageProps&&(n.sentryTrace=a.pageProps._sentryTraceData,n.baggage=a.pageProps._sentryBaggage),n}();n4(e,{name:t||eC.location.pathname,startTime:eh.Z1?eh.Z1/1e3:void 0,attributes:{[tI.$J]:"pageload",[tI.S3]:"auto.pageload.nextjs.pages_router_instrumentation",[tI.Zj]:t?"route":"url",...n&&e.getOptions().sendDefaultPii&&{...n}}},{sentryTrace:r,baggage:i})}(e):n4(e,{name:eC.location.pathname,startTime:eh.Z1?eh.Z1/1e3:void 0,attributes:{[tI.$J]:"pageload",[tI.S3]:"auto.pageload.nextjs.app_router_instrumentation",[tI.Zj]:"url"}}))}}}());let n=rs.__rewriteFramesAssetPrefixPath__||"";return t.push(ri({assetPrefixPath:n})),t}(e),...e};(function(e){let t=ra.__sentryRewritesTunnelPath__;if(t&&e.dsn){let n=et(e.dsn);if(!n)return;let r=n.host.match(/^o(\d+)\.ingest(?:\.([a-z]{2}))?\.sentry\.io$/);if(r){let i=r[1],a=r[2],s=`${t}?o=${i}&p=${n.projectId}`;a&&(s+=`&r=${a}`),e.tunnel=s,n8.X&&b.kg.info(`Tunneling events to "${s}"`)}else n8.X&&b.kg.warn("Provided DSN is not a Sentry SaaS DSN. Will not tunnel events.")}})(t),y(t,"nextjs",["nextjs","react"]),function(e){let t={...e};y(t,"react"),(0,_.v)("react",{version:tb.version}),function(e={}){let t=function(e={}){let t={defaultIntegrations:t_(),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:eC.SENTRY_RELEASE&&eC.SENTRY_RELEASE.id?eC.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}(e);if(function(){let e=void 0!==eC.window&&eC;if(!e)return!1;let t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,i=eC.location&&eC.location.href||"",a=!!r&&eC===eC.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some(e=>i.startsWith(`${e}//`)),s=void 0!==e.nw;return!!r&&!a&&!s}()){(0,b.Cf)(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}eE&&!H()&&b.kg.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."),function(e,t){!0===t.debug&&(I.X?b.kg.enable():(0,b.Cf)(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),(0,R.nZ)().update(t.initialScope);let n=new e(t);(0,R.nZ)().setClient(n),n.init()}(ex,{...t,stackParser:(0,D.Sq)(t.stackParser||tf),integrations:function(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r=function(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(Array.isArray(n)?[...t,...n]:"function"==typeof n?(0,w.lE)(n(t)):t),i=r.findIndex(e=>"Debug"===e.name);if(i>-1){let[e]=r.splice(i,1);r.push(e)}return r}(t),transport:t.transport||ty}),t.autoSessionTracking&&function(){if(void 0===eC.document){eE&&b.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}(0,_.yj)({ignoreDuration:!0}),(0,_.cg)(),X(({from:e,to:t})=>{void 0!==e&&e!==t&&((0,_.yj)({ignoreDuration:!0}),(0,_.cg)())})}()}(t)}(t);let n=e=>"transaction"===e.type&&"/404"===e.transaction?null:e;n.id="NextClient404Filter",(0,_.Qy)(n)}({dsn:rl.env.SENTRY_DSN||"https://4dad8c1b4b4c49aab09ddcc7cf27ae15@o189319.ingest.sentry.io/4504718781710336",environment:"prod-eu",tracesSampleRate:.1,normalizeDepth:10,transport:ty,stackParser:tf,integrations:[L(),tt(),eZ({dom:{serializeAttribute:["data-test-id"]}}),ti(),(g={filterKeys:["pawshake-seo-application-key"],behaviour:"apply-tag-if-contains-third-party-frames"},{name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{eo(e,(e,t)=>{if("event"===t){let t=Array.isArray(e)?e[1]:void 0;t&&(function(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(let t of e.stacktrace.frames||[])delete t.module_metadata})}catch(e){}}(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{t.type||function(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(let r of t.stacktrace.frames||[]){var n;if(!r.filename||r.module_metadata)continue;let t=(n=r.filename,function(e){if($.GLOBAL_OBJ._sentryModuleMetadata)for(let t of Object.keys($.GLOBAL_OBJ._sentryModuleMetadata)){let n=$.GLOBAL_OBJ._sentryModuleMetadata[t];if(!ru.has(t)){for(let r of(ru.add(t),e(t).reverse()))if(r.filename){ro.set(r.filename,n);break}}}}(e),ro.get(n));t&&(r.module_metadata=t)}})}catch(e){}}(e.getOptions().stackParser,t)})},processEvent(e){let t=function(e){let t=(0,D.Fr)(e);if(t)return t.filter(e=>!!e.filename).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(rc)).map(e=>e.slice(rc.length)):[])}(e);if(t&&t["drop-error-if-contains-third-party-frames"===g.behaviour||"apply-tag-if-contains-third-party-frames"===g.behaviour?"some":"every"](e=>!e.some(e=>g.filterKeys.includes(e)))){if("drop-error-if-contains-third-party-frames"===g.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===g.behaviour)return null;e.tags={...e.tags,third_party_code:!0}}return e}})],beforeSend:(e,t)=>{let n=t.originalException;return(null==n?void 0:n.stack)&&!n.stack.includes("<anonymous>")?e:null},beforeBreadcrumb:e=>{if("http"===e.type){var t;if(null===(t=e.data)||void 0===t?void 0:t.url)return e.data.url.includes("https://collector.newrelic.com")||e.data.url.includes("https://bam.nr-data.net")||e.data.url.includes("https://www.google-analytics.com")?null:e}return e},ignoreErrors:["Script error.","Error: INTERNAL ASSERTION FAILED: Pending promise was never set","Forgot password link has expired","Cannot read properties of null (reading 'removeChild')","Cannot read properties of null (reading 'appendChild')","Cannot read properties of null (reading 'Error')","Identifier 'change_ua' has already been declared",'Could not load "marker"',"Right side of assignment cannot be destructured","Invalid email address provided. Please contact support.","null is not an object (evaluating 'oi.sequence')",'Could not load "util"',"Can't find variable: UET","this.Eg.close is not a function. (In 'this.Eg.close()', 'this.Eg.close' is undefined)","null is not an object (evaluating 'yi.sequence')","NS_ERROR_NOT_INITIALIZED","jb","Firebase: Error (auth/network-request-failed).","Cannot read property 'Error' of null","Failed to read the 'localStorage' property from 'Window': Access is denied for this document.",'Could not load "onion".',"UET is not defined","The operation is insecure.","Broken pipe or closed connection","terminated"]})},30285:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return o},noSSR:function(){return s}});let r=n(80889);n(67168),n(18381);let i=r._(n(23811));function a(e){return{default:(null==e?void 0:e.default)||e}}function s(e,t){return delete t.webpack,delete t.modules,e(t)}function o(e,t){let n=i.default,r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};e instanceof Promise?r.loader=()=>e:"function"==typeof e?r.loader=e:"object"==typeof e&&(r={...r,...e});let o=(r={...r,...t}).loader;return(r.loadableGenerated&&(r={...r,...r.loadableGenerated},delete r.loadableGenerated),"boolean"!=typeof r.ssr||r.ssr)?n({...r,loader:()=>null!=o?o().then(a):Promise.resolve(a(()=>null))}):(delete r.webpack,delete r.modules,s(n,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51227:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return r}});let r=n(80889)._(n(18381)).default.createContext(null)},23811:function(e,t,n){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
 MIT License
 Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let r=n(80889)._(n(18381)),i=n(51227),a=[],s=[],o=!1;function u(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(e=>(n.loading=!1,n.loaded=e,e)).catch(e=>{throw n.loading=!1,n.error=e,e}),n}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function l(e){return function(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function u(){if(!a){let t=new c(e,n);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!o){let e=n.webpack?n.webpack():n.modules;e&&s.push(t=>{for(let n of e)if(t.includes(n))return u()})}function l(e,t){!function(){u();let e=r.default.useContext(i.LoadableContext);e&&Array.isArray(n.modules)&&n.modules.forEach(t=>{e(t)})}();let s=r.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return r.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),r.default.useMemo(()=>{var t;return s.loading||s.error?r.default.createElement(n.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:a.retry}):s.loaded?r.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return l.preload=()=>u(),l.displayName="LoadableComponent",r.default.forwardRef(l)}(u,e)}function d(e,t){let n=[];for(;e.length;){let r=e.pop();n.push(r(t))}return Promise.all(n).then(()=>{if(e.length)return d(e,t)})}l.preloadAll=()=>new Promise((e,t)=>{d(a).then(e,t)}),l.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let n=()=>(o=!0,t());d(s,e).then(n,n)})),window.__NEXT_PRELOADREADY=l.preloadReady;let h=l},56857:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return X},roboto:function(){return a()}});var r=n(67168),i=n(9558),a=n.n(i),s=JSON.parse('{"localeDetection":false,"locales":["en-BE","fr-BE","nl-BE","de-BE","de-CH","fr-CH","it-CH","de-LU","fr-LU","en-LU","en-CA","fr-CA","en-FR","fr-FR","en-NL","nl-NL","de-AT","en-GB","de-DE","en-DE","da-DK","fi-FI","en-IE","it-IT","no-NO","sv-SE"],"defaultLocale":"en-IE","pages":{"*":["common","search"],"/terms-and-conditions":["terms-and-conditions"],"/privacy-policy":["terms-and-conditions"]},"domains":[{"domain":"en.pawshake.be","defaultLocale":"en-BE"},{"domain":"fr.pawshake.be","defaultLocale":"fr-BE"},{"domain":"nl.pawshake.be","defaultLocale":"nl-BE"},{"domain":"de.pawshake.be","defaultLocale":"de-BE"},{"domain":"de.pawshake.ch","defaultLocale":"de-CH"},{"domain":"fr.pawshake.ch","defaultLocale":"fr-CH"},{"domain":"it.pawshake.ch","defaultLocale":"it-CH"},{"domain":"de.pawshake.lu","defaultLocale":"de-LU"},{"domain":"fr.pawshake.lu","defaultLocale":"fr-LU"},{"domain":"en.pawshake.lu","defaultLocale":"en-LU"},{"domain":"en.pawshake.ca","defaultLocale":"en-CA"},{"domain":"fr.pawshake.ca","defaultLocale":"fr-CA"},{"domain":"www.pawshake.fr","defaultLocale":"fr-FR"},{"domain":"en.pawshake.fr","defaultLocale":"en-FR"},{"domain":"en.pawshake.nl","defaultLocale":"en-NL"},{"domain":"www.pawshake.nl","defaultLocale":"nl-NL"},{"domain":"www.pawshake.at","defaultLocale":"de-AT"},{"domain":"www.pawshake.co.uk","defaultLocale":"en-GB"},{"domain":"www.pawshake.de","defaultLocale":"de-DE"},{"domain":"en.pawshake.de","defaultLocale":"en-DE"},{"domain":"www.pawshake.dk","defaultLocale":"da-DK"},{"domain":"www.pawshake.fi","defaultLocale":"fi-FI"},{"domain":"www.pawshake.ie","defaultLocale":"en-IE"},{"domain":"www.pawshake.it","defaultLocale":"it-IT"},{"domain":"www.pawshake.no","defaultLocale":"no-NO"},{"domain":"www.pawshake.se","defaultLocale":"sv-SE"}]}'),o=n(18381),u=n(10655),c=n(65967),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function d(e,t,n,r){void 0===t&&(t=""),void 0===r&&(r={returnObjects:!1});var i=(n||{}).keySeparator,a=void 0===i?".":i,s=a?t.split(a):[t];if(t===a&&r.returnObjects)return e;var o=s.reduce(function(e,t){if("string"==typeof e)return{};var n=e[t];return n||("string"==typeof n?n:{})},e);if("string"==typeof o||o instanceof Object&&r.returnObjects)return o}function h(e){var t=e.text,n=e.query,r=e.config,i=e.lang;if(!t||!n)return t||"";var a=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},s=r.interpolation||{},o=s.format,u=void 0===o?null:o,c=s.prefix,l=void 0===c?"{{":c,d=s.suffix,h=void 0===d?"}}":d,f=""===h?"":"(?:[\\s,]+([\\w-]*))?\\s*".concat(a(h));return Object.keys(n).reduce(function(e,t){if("string"!=typeof e)return e;var r=RegExp("".concat(a(l),"\\s*").concat(t).concat(f),"gm");return e.replace(r,function(e,r){return r&&u?u(n[t],r,i):n[t]})},t)}function f(e){e.namespace,e.i18nKey}var p=n(64382),m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},g=(0,o.createContext)({ns:{},config:{}});function v(e){var t,n,r,i,a,s,v,y,_,b,w=e.lang,E=e.namespaces,I=e.children,k=e.config,S=(0,p.Z)().lang,T=(0,u.useRouter)()||{},O=T.locale,A=T.defaultLocale,C=(0,o.useContext)(g),P=m(m(m({},"undefined"==typeof window?{}:(null===(n=null===(t=window.__NEXT_DATA__)||void 0===t?void 0:t.props)||void 0===n?void 0:n.__namespaces)||{}),C.ns),void 0===E?{}:E),R=w||S||O||A||"",x=m(m({},C.config),void 0===k?{}:k),N=(x.localesToIgnore||["default"]).includes(R),D=(i=(r={config:x,allNamespaces:P,pluralRules:new Intl.PluralRules(N?void 0:R),lang:R}).config,a=r.allNamespaces,s=r.pluralRules,v=r.lang,_=void 0===(y=i.logger)?f:y,b=function(e,t,n){void 0===e&&(e="");var r,o=Array.isArray(e)?e[0]:e,u=i.nsSeparator,c=i.loggerEnvironment,f=void 0===c?"browser":c,p=function(e,t){if(!t)return{i18nKey:e};var n=e.indexOf(t);return n<0?{i18nKey:e}:{namespace:e.slice(0,n),i18nKey:e.slice(n+t.length)}}(o,void 0===u?":":u),m=p.i18nKey,g=p.namespace,y=void 0===g?null!==(r=null==n?void 0:n.ns)&&void 0!==r?r:i.defaultNS:g,w=y&&a[y]||{},E=function(e,t,n,r,i){if(!i||"number"!=typeof i.count)return n;var a="".concat(n,"_").concat(i.count);if(void 0!==d(t,a,r))return a;var s="".concat(n,"_").concat(e.select(i.count));if(void 0!==d(t,s,r))return s;var o="".concat(n,".").concat(i.count);if(void 0!==d(t,o,r))return o;var u="".concat(n,".").concat(e.select(i.count));return void 0!==d(t,u,r)?u:n}(s,w,m,i,t),I=d(w,E,i,n),k=void 0===I||"object"==typeof I&&!Object.keys(I).length,S="string"==typeof(null==n?void 0:n.fallback)?[n.fallback]:(null==n?void 0:n.fallback)||[];if(k&&("both"===f||f===("undefined"==typeof window?"node":"browser"))&&_({namespace:y,i18nKey:m}),k&&Array.isArray(S)&&S.length){var T=S[0],O=S.slice(1);if("string"==typeof T)return b(T,t,l(l({},n),{fallback:O}))}return k&&(null==n?void 0:n.default)&&(null==S?void 0:S.length)==0?h({text:null==n?void 0:n.default,query:t,config:i,lang:v}):k?o:I instanceof Object?function e(t){var n=t.obj,r=t.query,i=t.config,a=t.lang;return r&&0!==Object.keys(r).length&&Object.keys(n).forEach(function(t){n[t]instanceof Object&&e({obj:n[t],query:r,config:i,lang:a}),"string"==typeof n[t]&&(n[t]=h({text:n[t],query:r,config:i,lang:a}))}),n}({obj:I,query:t,config:i,lang:v}):h({text:I,query:t,config:i,lang:v})});return o.createElement(c.Z.Provider,{value:{lang:R,t:D}},o.createElement(g.Provider,{value:{ns:P,config:x}},I))}var y=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}u((r=r.apply(e,t||[])).next())})},_=function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},b=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function w(e){return e.reduce(function(e,t){return e.concat(t)},[])}var E=n(17017),I=function(){return(I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},k=function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},S=null==E.env.NODE_DISABLE_COLORS&&null==E.env.NO_COLOR&&"dumb"!==E.env.TERM&&"0"!==E.env.FORCE_COLOR,T=function(){return(T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},O=function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},A=n(78389),C=n.n(A),P=n(37076);n(28310);var R=n(64821),x=n(29537),N=n(11475);n(71784);var D=n(30030),L=n.n(D),j=n(35543),M=n(36340),U=n.n(M),F=n(46847);let $=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(F.GoogleTagManager,{gtmId:"GTM-NQKHXPTM"}),(0,r.jsx)(F.GoogleAnalytics,{gaId:"G-5KZSE1JPSD"}),(0,r.jsx)(U(),{id:"google-analytics",strategy:"lazyOnload",children:"\n                    window.dataLayer = window.dataLayer || [];\n                    function gtag(){window.dataLayer.push(arguments);}\n                    gtag('js', new Date());\n\n                    gtag('config', '".concat("G-5KZSE1JPSD","', {'anonymize_ip': true});\n                ")}),(0,r.jsx)(U(),{id:"adWords-script",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:'\n                (function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"5750601"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");\n                window.uetq = window.uetq || [];\n              '}})]});var B=n(18990),H=n(85981),z=n(93808),V=n(85539),q=n(34122);let G=L()(()=>Promise.all([n.e(7229),n.e(9291),n.e(775),n.e(5621),n.e(3596),n.e(4917),n.e(7425)]).then(n.bind(n,27425)).then(e=>e.KycPopupValidator),{loadableGenerated:{webpack:()=>[27425]},ssr:!1}),W=L()(()=>Promise.all([n.e(7229),n.e(9291)]).then(n.bind(n,79291)).then(e=>e.Toaster),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),K=L()(()=>n.e(6153).then(n.bind(n,26153)).then(e=>e.SentryUserUtils),{loadableGenerated:{webpack:()=>[26153]},ssr:!1}),Z="#394147",J=(0,B.vJ)(["body{margin:0;padding:0;overflow-x:hidden;letter-spacing:0;font-size:1rem;font-family:Roboto,Arial,sans-serif;color:",";}body.modalOpen{overflow:hidden;height:100%;}textarea,select{font-size:1rem;letter-spacing:-0.1px;line-height:30px;color:",";box-sizing:border-box;outline:none;}a{color:#5cace2;text-decoration:none;}"],Z,Z);(0,x.Z)();var X=function(e,t){var r=this;function i(n){var r,i,a=t.defaultLocale;return o.createElement(v,{lang:(null===(r=n.pageProps)||void 0===r?void 0:r.__lang)||n.__lang||a,namespaces:(null===(i=n.pageProps)||void 0===i?void 0:i.__namespaces)||n.__namespaces,config:t},o.createElement(e,T({},n)))}return void 0===t&&(t={}),t.isLoader||!1===t.loader||console.warn('\uD83D\uDEA8 [next-translate] You can remove the "appWithI18n" HoC on the _app.js, unless you set "loader: false" in your i18n config file.'),"function"==typeof t.staticsHoc&&t.staticsHoc(i,e),"undefined"==typeof window?n.g.i18nConfig=t:window.i18nConfig=t,t.skipInitialProps||(i.getInitialProps=function(i){var a,s,o;return a=void 0,s=void 0,o=function(){var r,a,s;return O(this,function(o){switch(o.label){case 0:if(r=T(T({},i.ctx||{}),i||{}),a={pageProps:{}},!e.getInitialProps)return[3,2];return[4,e.getInitialProps(i)];case 1:a=o.sent()||{},o.label=2;case 2:return s=[T({},a)],[4,function(e){var t,r,i,a,s,o;return void 0===e&&(e={}),i=this,a=void 0,s=void 0,o=function(){var i,a,s,o,u,c,l,d;return k(this,function(h){switch(h.label){case 0:var f;if(a=(i=I(I({},("undefined"==typeof window?n.g:window).i18nConfig),e)).localesToIgnore||["default"],s=(null===(t=i.req)||void 0===t?void 0:t.locale)||i.locale||(null===(r=i.router)||void 0===r?void 0:r.locale)||i.defaultLocale||"",!i.pathname)return console.warn('\uD83D\uDEA8 [next-translate] You forgot to pass the "pathname" inside "loadNamespaces" configuration'),[2,{__lang:s}];if(a.includes(s))return[2,{__lang:s}];return i.loaderName||!1===i.loader||console.warn('\uD83D\uDEA8 [next-translate] You can remove the "loadNamespaces" helper, unless you set "loader: false" in your i18n config file.'),void 0===(f=i.pathname.replace(/\/index$/,""))&&(f=""),o=(f.length>1&&f.endsWith("/")?f.slice(0,-1):f)||"/",[4,function(e,t,n){var r=e.pages,i=void 0===r?{}:r;return y(this,void 0,void 0,function(){var e,r,a,s,o,u,c,l=this;return _(this,function(d){switch(d.label){case 0:return e="rgx:",r=function(e){return y(l,void 0,void 0,function(){return _(this,function(t){return[2,"function"==typeof e?e(n):e||[]]})})},a=Object.keys(i).reduce(function(n,a){return a.substring(0,e.length)===e&&new RegExp(a.replace(e,"")).test(t)&&n.push(r(i[a])),n},[]),s=[[]],[4,r(i["*"])];case 1:return o=[b.apply(void 0,s.concat([d.sent(),!0]))],[4,r(i[t])];case 2:return u=[b.apply(void 0,o.concat([d.sent(),!0]))],c=w,[4,Promise.all(a)];case 3:return[2,b.apply(void 0,u.concat([c.apply(void 0,[d.sent()]),!0]))]}})})}(i,o,i)];case 1:return u=h.sent(),c=function(){return Promise.resolve({})},[4,Promise.all(u.map(function(e){return"function"==typeof i.loadLocaleFrom?i.loadLocaleFrom(s,e).catch(function(){return{}}):c(s,e)}))];case 2:return l=h.sent()||[],!1!==i.logBuild&&"undefined"==typeof window&&console.log((d=function(e){return S?"\x1b[36m".concat(e,"\x1b[0m"):e})("next-translate"),"- compiled page:",d(o),"- locale:",d(s),"- namespaces:",d(u.join(", ")),"- used loader:",d(i.loaderName||"-")),[2,{__lang:s,__namespaces:u.reduce(function(e,t,n){return e[t]=l[n]||null,e},{})}]}})},new(s||(s=Promise))(function(e,t){function n(e){try{u(o.next(e))}catch(e){t(e)}}function r(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var i;t.done?e(t.value):((i=t.value)instanceof s?i:new s(function(e){e(i)})).then(n,r)}u((o=o.apply(i,a||[])).next())})}(T(T(T({},r),t),{loaderName:"getInitialProps"}))];case 3:return[2,T.apply(void 0,s.concat([o.sent()]))]}})},new(s||(s=Promise))(function(e,t){function n(e){try{u(o.next(e))}catch(e){t(e)}}function i(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof s?r:new s(function(e){e(r)})).then(n,i)}u((o=o.apply(r,a||[])).next())})}),i}((0,N.YN)()(e=>{let{Component:t,pageProps:n}=e,{applicationInfo:i,featureFlags:s}=n,o=new q.e2;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(C(),{children:[(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=5, user-scalable=1"}),(0,r.jsx)("meta",{name:"format-detection",content:"telephone=no"})]}),(0,r.jsx)($,{}),(0,r.jsx)(J,{}),(0,r.jsx)(R.m,{dehydratedState:n.dehydratedState,children:(0,r.jsx)(V.L.Provider,{value:o,children:(0,r.jsx)(z.Z.Provider,{value:i,children:(0,r.jsx)(P.C1,{disableDynamicMediaQueries:!0,children:(0,r.jsxs)(j.O1,{featureFlags:null!=s?s:H.MW,children:[(0,r.jsx)(G,{}),(0,r.jsx)(K,{}),(0,r.jsx)("main",{className:a().className,children:(0,r.jsx)(t,{...n})}),(0,r.jsx)(W,{style:{"--width":"100%",maxWidth:"400px"}})]})})})})})]})}),{...s,isLoader:!0,skipInitialProps:!1,loadLocaleFrom:(e,t)=>n(30242)("./".concat(e,"/").concat(t)).then(e=>e.default)})},34122:function(e,t,n){"use strict";function r(e){this.message=e}n.d(t,{e2:function(){return p},X3:function(){return h},x3:function(){return l},Is:function(){return f}}),r.prototype=Error(),r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,a=0,s=0,o="";i=t.charAt(s++);~i&&(n=a%4?64*n+i:i,a++%4)&&(o+=String.fromCharCode(255&n>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function a(e){this.message=e}a.prototype=Error(),a.prototype.name="InvalidTokenError";var s=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t,n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return t=n,decodeURIComponent(i(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return i(n)}}(e.split(".")[n]))}catch(e){throw new a("Invalid token specified: "+e.message)}},o=n(81495),u=n(52346),c=n(70649);let l=()=>(0,u.Z)()&&void 0!==window.gtag,d=e=>{var t,n,r,i,a,s,o;!1!==(0,u.Z)()&&(null===(t=window.dataLayer)||void 0===t||t.push({userId:null!==(n=null==e?void 0:e.userId)&&void 0!==n?n:null,language:null!==(r=null==e?void 0:e.language)&&void 0!==r?r:null,countryCode:null!==(i=null==e?void 0:e.countryCode)&&void 0!==i?i:null,minProfileRequirementsSet:null!==(a=null==e?void 0:e.hasMinimumProfileRequirementsSet)&&void 0!==a?a:null,isSitter:null!==(s=null==e?void 0:e.isSitter)&&void 0!==s?s:null}),l()&&window.gtag("set","user_data",{user_id:null!==(o=null==e?void 0:e.userId)&&void 0!==o?o:null}))},h=e=>{if(!e)return;let t=s(e);if(void 0!==t.loc){var n;d({userId:t.sub,language:null!==(n=t.loc.split("-").shift())&&void 0!==n?n:"en",countryCode:t.cc,hasMinimumProfileRequirementsSet:t.mmpr,isSitter:t.is})}},f=()=>{(0,o.Tb)({eventName:o.SN.Logout,properties:{}})};class p{trackEvent(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2],(0,c.L9)(e,t)}constructor(){this.trackEventV2=o.Tb,this.identifyUserFromToken=h,this.shutdown=f}}},81495:function(e,t,n){"use strict";n.d(t,{SN:function(){return a},cK:function(){return l},Tb:function(){return c},wu:function(){return u}});let r=()=>!0;var i,a,s=n(80312);let o=()=>void 0!==window.gtag;(i=a||(a={})).Register="register",i.Login="login",i.Logout="logout",i.SignUp="sign_up";let u=(e,t,n)=>{(0,s.yv)()&&r()&&o()&&window.gtag("event",t,{event_category:e,event_label:void 0===n?t:n,value:1})},c=e=>{var t;if(!window)return;let n={event:e.eventName,...e.properties};null===(t=window.dataLayer)||void 0===t||t.push(n),(0,s.yv)()||console.log(n)},l=e=>{r()&&o()&&window.gtag("set","user_data",{email:e})}},29537:function(e,t,n){"use strict";let r;n.d(t,{I:function(){return r}}),n(56462);var i=n(93416),a=n(86114),s=n(62149),o=n(80312),u=n(37543),c=n(17017);t.Z=()=>{let e=(0,a.ZF)({apiKey:"AIzaSyB7S1ZSK1k7Z4mUC4oR8efohoGAa466iJg",authDomain:"auth.pawshake.com",projectId:"feisty-oxide-147713",storageBucket:"feisty-oxide-147713.appspot.com",messagingSenderId:"100067502341",appId:"1:100067502341:web:3e30142aa87eaa9c9e2f6c",measurementId:"G-5KZSE1JPSD"});r=(0,s.v0)(e),(0,i.init)({authPageURL:e=>{let{ctx:t}=e;window.location.origin;let n=window.location.href;if(null==n)return"/user/login";let r=encodeURIComponent(n.toString());return"/sitter/application"===n?"/user/sign-up?destination=".concat(r):"/user/login?destination=".concat(r)},appPageURL:e=>{let{ctx:t}=e;window.location.origin;let n=new URLSearchParams(window.location.search),r=n.get("destination");n.delete("destination");let i=n.size>0?"?".concat(n.toString()):"",a="".concat(u.Do).concat(i),s=r?decodeURIComponent(r):u.Do;return"/user/login"===s||s.startsWith("/user/sign-up")||"/user/forgot-password"===s?a:{permanent:!1,destination:"".concat(s).concat(i),basePath:!1}},loginAPIEndpoint:"/api/login",logoutAPIEndpoint:"/api/logout",onLoginRequestError:e=>{console.error(e)},onLogoutRequestError:e=>{console.error(e)},firebaseAdminInitConfig:{credential:{projectId:"feisty-oxide-147713",clientEmail:"firebase-adminsdk-pfvlu@feisty-oxide-147713.iam.gserviceaccount.com",privateKey:c.env.FIREBASE_PRIVATE_KEY?c.env.FIREBASE_PRIVATE_KEY.replace(/\\n/gm,"\n"):""},databaseURL:"https://feisty-oxide-147713.firebaseio.com"},firebaseClientInitConfig:{apiKey:"AIzaSyB7S1ZSK1k7Z4mUC4oR8efohoGAa466iJg",authDomain:"auth.pawshake.com",databaseURL:"https://feisty-oxide-147713.firebaseio.com",projectId:"feisty-oxide-147713",storageBucket:"feisty-oxide-147713.appspot.com",messagingSenderId:"100067502341",appId:"1:100067502341:web:3e30142aa87eaa9c9e2f6c",measurementId:"G-5KZSE1JPSD"},cookies:{name:"Pawshake",keys:[c.env.FIREBASE_COOKIE_SECRET_CURRENT,c.env.FIREBASE_COOKIE_SECRET_PREVIOUS],httpOnly:!0,maxAge:10368e5,overwrite:!0,path:"/",sameSite:"lax",secure:!(0,o.yG)(),signed:!(0,o.yG)()},onVerifyTokenError:e=>{console.error(e)},onTokenRefreshError:e=>{console.error(e)},debug:!1})}},11475:function(e,t,n){"use strict";n.d(t,{YN:function(){return l}});var r=n(67168),i=n(42845),a=n(10655),s=n(18381),o=n(93416),u=(n(66521),n(74114));n(77914),n(17017),n(85981);var c=n(37543);let l=e=>t=>{let{guardEnabled:n=!1}=e||{};return(0,o.withUser)({})(e=>{let{user:o}=(0,u.f)(),l=(0,a.useRouter)();return(0,s.useEffect)(()=>{if(n){let e=(0,c.qf)(o);if(e){let t=new URLSearchParams((0,i.c)(l.query)),n=t.size>0?"?".concat(t.toString()):"",r=window.location.origin;window.location.href="".concat(r).concat(e).concat(n)}}},[l,o]),(0,r.jsx)(t,{...e})})}},74114:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r=n(93416),i=n(33641);let a=()=>{let e=(0,r.useUser)(),t=null!==e.id;return{user:!0===t?e:void 0,isAuthenticated:t,info:(0,i.gK)(e),isEmailVerified:e.emailVerified}}},66756:function(e,t,n){"use strict";n.d(t,{K:function(){return i}});var r=n(49629);let i=e=>r.JE.includes(e)?"APAC":"EU"},35543:function(e,t,n){"use strict";n.d(t,{O1:function(){return u},gV:function(){return l}});var r=n(67168),i=n(18381),a=n(29514),s=n(61922);let o=(0,i.createContext)(null),u=e=>{let{children:t,featureFlags:n}=e,[s]=i.useState(()=>(0,a.M)(()=>({featureFlags:n})));return(0,r.jsx)(o.Provider,{value:s,children:t})},c=e=>{let t=(0,i.useContext)(o);if(!t)throw Error("useFeatureFlagStore must be use within FeatureFlagProvider");return(0,s.oR)(t,e)},l=()=>c(e=>e.featureFlags)},64821:function(e,t,n){"use strict";n.d(t,{E:function(){return R},m:function(){return D}});var r=n(67168),i=n(18381);function a(){}var s=n(34541),o=n(36781),u=n(67498),c=n(70179),l=class extends c.l{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??(0,s.Rm)(r,t),a=this.get(i);return a||(a=new o.A({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){u.V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,s._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,s._x)(e,t)):t}notify(e){u.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){u.V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){u.V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},d=n(51409),h=class extends c.l{constructor(e={}){super(),this.config=e,this.#t=new Map,this.#n=Date.now()}#t;#n;build(e,t,n){let r=new d.m({mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){let t=f(e),n=this.#t.get(t)??[];n.push(e),this.#t.set(t,n),this.notify({type:"added",mutation:e})}remove(e){let t=f(e);if(this.#t.has(t)){let n=this.#t.get(t)?.filter(t=>t!==e);n&&(0===n.length?this.#t.delete(t):this.#t.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){let t=this.#t.get(f(e))?.find(e=>"pending"===e.state.status);return!t||t===e}runNext(e){let t=this.#t.get(f(e))?.find(t=>t!==e&&t.state.isPaused);return t?.continue()??Promise.resolve()}clear(){u.V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#t.values()].flat()}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,s.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,s.X7)(e,t))}notify(e){u.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return u.V.batch(()=>Promise.all(e.map(e=>e.continue().catch(s.ZT))))}};function f(e){return e.options.scope?.id??String(e.mutationId)}var p=n(79103),m=n(52037);function g(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var v=class{#r;#i;#a;#s;#o;#u;#c;#l;constructor(e={}){this.#r=e.queryCache||new l,this.#i=e.mutationCache||new h,this.#a=e.defaultOptions||{},this.#s=new Map,this.#o=new Map,this.#u=0}mount(){this.#u++,1===this.#u&&(this.#c=p.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#l=m.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#u--,0===this.#u&&(this.#c?.(),this.#c=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{let n=this.defaultQueryOptions(e),r=this.#r.build(this,n);return e.revalidateIfStale&&r.isStaleByTime((0,s.KC)(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#r.get(r.queryHash),a=i?.state.data,o=(0,s.SE)(t,a);if(void 0!==o)return this.#r.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return u.V.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;u.V.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#r,r={type:"active",...e};return u.V.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){let n={revert:!0,...t};return Promise.all(u.V.batch(()=>this.#r.findAll(e).map(e=>e.cancel(n)))).then(s.ZT).catch(s.ZT)}invalidateQueries(e={},t={}){return u.V.batch(()=>{if(this.#r.findAll(e).forEach(e=>{e.invalidate()}),"none"===e.refetchType)return Promise.resolve();let n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){let n={...t,cancelRefetch:t?.cancelRefetch??!0};return Promise.all(u.V.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(s.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(s.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#r.build(this,t);return n.isStaleByTime((0,s.KC)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(s.ZT).catch(s.ZT)}fetchInfiniteQuery(e){var t;return e.behavior=(t=e.pages,{onFetch:(e,n)=>{let r=async()=>{let n;let r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[],u=!1,c=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(e.signal.aborted?u=!0:e.signal.addEventListener("abort",()=>{u=!0}),e.signal)})},l=(0,s.cG)(e.options,e.fetchOptions),d=async(t,n,r)=>{if(u)return Promise.reject();if(null==n&&t.pages.length)return Promise.resolve(t);let i={queryKey:e.queryKey,pageParam:n,direction:r?"backward":"forward",meta:e.options.meta};c(i);let a=await l(i),{maxPages:o}=e.options,d=r?s.Ht:s.VX;return{pages:d(t.pages,a,o),pageParams:d(t.pageParams,n,o)}};if(i&&a.length){let e="backward"===i,t={pages:a,pageParams:o},s=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:g)(r,t);n=await d(t,s,e)}else{n=await d({pages:[],pageParams:[]},o[0]??r.initialPageParam);let e=t??a.length;for(let t=1;t<e;t++){let e=g(r,n);if(null==e)break;n=await d(n,e)}}return n};e.options.persister?e.fetchFn=()=>e.options.persister?.(r,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=r}}),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(s.ZT).catch(s.ZT)}resumePausedMutations(){return m.N.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#i}getDefaultOptions(){return this.#a}setDefaultOptions(e){this.#a=e}setQueryDefaults(e,t){this.#s.set((0,s.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#s.values()],n={};return t.forEach(t=>{(0,s.to)(e,t.queryKey)&&(n={...n,...t.defaultOptions})}),n}setMutationDefaults(e,t){this.#o.set((0,s.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#o.values()],n={};return t.forEach(t=>{(0,s.to)(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#a.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,s.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===s.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#a.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#i.clear()}};function y(e){return e}function _(e){return e.state.isPaused}function b(e){return"success"===e.state.status}function w(e,t,n){if("object"!=typeof t||null===t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??y,s=t.mutations||[],o=t.queries||[];s.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),o.forEach(({queryKey:t,state:r,queryHash:s,meta:o,promise:u})=>{let c=i.get(s),l=void 0===r.data?r.data:a(r.data);if(c){if(c.state.dataUpdatedAt<r.dataUpdatedAt){let{fetchStatus:e,...t}=r;c.setState({...t,data:l})}}else c=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:s,meta:o},{...r,data:l,fetchStatus:"idle"});if(u){let e=Promise.resolve(u).then(a);c.fetch(void 0,{initialPromise:e})}})}var E=n(30055),I=({children:e,options:t={},state:n,queryClient:r})=>{let a=(0,E.NL)(r),[s,o]=i.useState(),u=i.useRef(t);return u.current=t,i.useMemo(()=>{if(n){if("object"!=typeof n)return;let e=a.getQueryCache(),t=n.queries||[],r=[],i=[];for(let n of t){let t=e.get(n.queryHash);if(t){let e=n.state.dataUpdatedAt>t.state.dataUpdatedAt,r=s?.find(e=>e.queryHash===n.queryHash);e&&(!r||n.state.dataUpdatedAt>r.state.dataUpdatedAt)&&i.push(n)}else r.push(n)}r.length>0&&w(a,{queries:r},u.current),i.length>0&&o(e=>e?[...e,...i]:i)}},[a,s,n]),i.useEffect(()=>{s&&(w(a,{queries:s},u.current),o(void 0))},[a,s]),e},k=function(){return null},S=["added","removed","updated"];function T(e){return S.includes(e)}async function O({queryClient:e,persister:t,maxAge:n=864e5,buster:r="",hydrateOptions:i}){try{let a=await t.restoreClient();if(a){if(a.timestamp){let s=Date.now()-a.timestamp>n,o=a.buster!==r;s||o?t.removeClient():w(e,a.clientState,i)}else t.removeClient()}}catch(e){t.removeClient()}}async function A({queryClient:e,persister:t,buster:n="",dehydrateOptions:r}){let i={buster:n,timestamp:Date.now(),clientState:function(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??_,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??b,a=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??y;return{mutations:r,queries:e.getQueryCache().getAll().flatMap(e=>i(e)?[{state:{...e.state,...void 0!==e.state.data&&{data:a(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,..."pending"===e.state.status&&{promise:e.promise?.then(a).catch(e=>Promise.reject(Error("redacted")))},...e.meta&&{meta:e.meta}}]:[])}}(e,r)};await t.persistClient(i)}var C=n(84240),P=({client:e,children:t,persistOptions:n,onSuccess:a,...s})=>{let[o,u]=i.useState(!0),c=i.useRef({persistOptions:n,onSuccess:a}),l=i.useRef(!1);return i.useEffect(()=>{c.current={persistOptions:n,onSuccess:a}}),i.useEffect(()=>{let t={...c.current.persistOptions,queryClient:e};return l.current||(l.current=!0,u(!0),O(t).then(async()=>{try{await c.current.onSuccess?.()}finally{u(!1)}})),o?void 0:function(e){let t=e.queryClient.getQueryCache().subscribe(t=>{T(t.type)&&A(e)}),n=e.queryClient.getMutationCache().subscribe(t=>{T(t.type)&&A(e)});return()=>{t(),n()}}(t)},[e,o]),(0,r.jsx)(E.aH,{client:e,...s,children:(0,r.jsx)(C.u,{value:o,children:t})})};let R=6e4,x={defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:3e5,gcTime:6e5,retry:5,retryDelay:e=>Math.min(1e3*1**e,3e4)}}},N=function({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:s}){if(e){let a=n=>{try{e.setItem(t,r(n));return}catch(e){return e}};return{persistClient:function(e,t=100){let n,r=null;return function(...i){n=i,null===r&&(r=setTimeout(()=>{e(...n),r=null},t))}}(e=>{let t=e,n=a(t),r=0;for(;n&&t;)r++,(t=s?.({persistedClient:t,error:n,errorCount:r}))&&(n=a(t))},n),restoreClient:()=>{let n=e.getItem(t);if(n)return i(n)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:a,restoreClient:()=>void 0,removeClient:a}}({storage:window.localStorage}),D=e=>{let{children:t,dehydratedState:n}=e,[a]=(0,i.useState)(()=>new v(x));return(0,r.jsxs)(P,{client:a,persistOptions:{persister:N},children:[(0,r.jsx)(k,{initialIsOpen:!1,buttonPosition:"bottom-left"}),(0,r.jsx)(I,{state:n,children:t}),!1]})}},53477:function(e,t,n){"use strict";n.d(t,{Fd:function(){return i},kT:function(){return a}});var r=n(39326);r.z.object({url:r.z.string()});let i=r.z.enum(["sitter.unavailable","sitter.serviceNotOffered","sitter.offersNoServices","sitter.onlyAcceptsRepeatClients"]),a=r.z.discriminatedUnion("code",[r.z.object({code:r.z.literal(i.Enum["sitter.unavailable"]),error:r.z.string(),details:r.z.object({fullyBooked:r.z.array(r.z.string()),notEnoughCapacity:r.z.array(r.z.string()),unavailable:r.z.array(r.z.string())})}),r.z.object({code:r.z.literal(i.Enum["sitter.serviceNotOffered"]),error:r.z.string(),details:r.z.object({service:r.z.string(),sitterFirstName:r.z.string()})}),r.z.object({code:r.z.literal(i.Enum["sitter.offersNoServices"]),error:r.z.string()}),r.z.object({code:r.z.literal(i.Enum["sitter.onlyAcceptsRepeatClients"]),error:r.z.string()})])},49629:function(e,t,n){"use strict";n.d(t,{IR:function(){return c},JE:function(){return r},Li:function(){return o},UW:function(){return s},f6:function(){return i},kl:function(){return u},mX:function(){return a}});let r=["en-AU","en-NZ","en-HK","en-SG","en-JP"],i=["en","nl","fr","de","it","da","fi","sv","no"],a=["GB","AU","BE","CA","DK","DE","NL","FR","IE","HK","IT","JP","LU","NO","NZ","AT","SG","FI","SE","CH"],s={AU:["en"],BE:["nl","fr","de","en"],CA:["en","fr"],DK:["da"],DE:["de","en"],NL:["nl","en"],FR:["fr","en"],IE:["en"],HK:["en"],IT:["it"],JP:["en"],LU:["de","fr","en"],NO:["no"],NZ:["en"],AT:["de"],SG:["en"],FI:["fi"],SE:["sv"],CH:["de","fr","it"],GB:["en"]},o={"en-AU":"www.pawshake.com.au","nl-BE":"nl.pawshake.be","fr-BE":"fr.pawshake.be","en-BE":"en.pawshake.be","de-BE":"de.pawshake.be","fr-CA":"fr.pawshake.ca","en-CA":"en.pawshake.ca","da-DK":"www.pawshake.dk","en-DE":"en.pawshake.de","de-DE":"www.pawshake.de","nl-NL":"www.pawshake.nl","en-NL":"en.pawshake.nl","en-FR":"en.pawshake.fr","fr-FR":"www.pawshake.fr","en-IE":"www.pawshake.ie","en-HK":"www.pawshake.com.hk","it-IT":"www.pawshake.it","en-JP":"www.pawshake.jp","de-LU":"de.pawshake.lu","fr-LU":"fr.pawshake.lu","en-LU":"en.pawshake.lu","no-NO":"www.pawshake.no","en-NZ":"www.pawshake.co.nz","de-AT":"www.pawshake.at","en-SG":"www.pawshake.com.sg","fi-FI":"www.pawshake.fi","sv-SE":"www.pawshake.se","de-CH":"de.pawshake.ch","fr-CH":"fr.pawshake.ch","it-CH":"it.pawshake.ch","en-GB":"www.pawshake.co.uk"},u={en:"English",nl:"Nederlands",fr:"Fran\xe7ais",de:"Deutsch",it:"Italiano",da:"Dansk",fi:"Suomalainen",sv:"Svenska",no:"Norsk"},c={AU:"Australia",BE:"Belgi\xeb",CA:"Canada",DK:"Danmark",DE:"Deutschland",NL:"Nederland",FR:"France",IE:"Ireland",HK:"Hong Kong",IT:"Italia",JP:"Japan",LU:"Luxembourg",NO:"Norge",NZ:"New Zealand",AT:"\xd6sterreich",SG:"Singapore",FI:"Suomi",SE:"Sverige",CH:"Switzerland",GB:"United Kingdom"}},77914:function(e,t,n){"use strict";n.d(t,{h:function(){return p}});var r=n(86133),i=n(66521),a=n(66756),s=n(53477),o=n(51605),u=n(14372),c=n(33641);let l=e=>"EU"===e?"https://api.pawshake.scalecity.space":"https://api.au.pawshake.scalecity.space",d=(e,t)=>{if(null==t?void 0:t.baseUrl)return t.baseUrl;if(null==t?void 0:t.worldRegion)return l(t.worldRegion);if(e&&null!==e.id){let{worldRegion:t}=(0,c.gK)(e);return l(t)}return(null==t?void 0:t.locale)?l((0,a.K)(null==t?void 0:t.locale)):"https://api.pawshake.scalecity.space"},h=async e=>{let t={"Content-Type":"application/json"};if(e&&null!==e.id)try{let n=await e.getIdToken();if(!n)throw new o.F7({name:u.XE.EmptyToken});t={...t,Authorization:"Bearer ".concat(n)}}catch(e){throw i.k.info("user.getIdToken failed",{error:e}),new o.F7({name:u.XE.TokenRefreshFailed,cause:e})}return t},f=async e=>{let t;let{url:n,options:a,payload:c,user:l,config:f}=e,p="".concat(d(l,f)).concat(n),m=await h(l);"GET"===a.method?0!==Object.keys(c).length&&(p+="?"+new URLSearchParams(c).toString()):a.body=JSON.stringify(c);let g=new AbortController,v=setTimeout(()=>{g.abort()},3e4),y=(0,r.ZP)("".concat(p),{...a,headers:{...m,...a.headers}});try{t=await fetch("".concat(p),{...a,headers:{...m,...a.headers},signal:g.signal})}catch(e){if(e instanceof Error&&"AbortError"===e.name)throw new o.F7({name:u.XE.Abort});throw i.k.info("Fetch failed",{error:e}),new o.F7({name:u.XE.FetchFailed,cause:e,additionalLogs:{curl:y,request:{...a,baseUrl:p,headers:{...m,...a.headers}}}})}if(clearTimeout(v),!t.ok){let e;let n={status:t.status,curl:y,request:{...a,baseUrl:p,headers:{...m,...a.headers}}};if(303===t.status)throw new o.F7({name:u.XE.Redirect,response:t});if(401===t.status)throw new o.F7({name:u.XE.Unauthorized,additionalLogs:n});try{e=await t.json()}catch(t){throw new o.F7({name:u.XE.ParsingFailed,message:null==e?void 0:e.error,cause:null==e?void 0:e.error,additionalLogs:{...n,body:e}})}if(422===t.status){let t;try{t=s.kT.parse(e)}catch(t){throw new o.F7({name:u.XE.ParsingFailed,message:null==e?void 0:e.error,cause:null==e?void 0:e.error,additionalLogs:{...n,body:e}})}throw new o.vK({error:t})}if(429===e.status)throw new o.F7({name:u.XE.TooManyRequests,message:null==e?void 0:e.error,cause:null==e?void 0:e.error,additionalLogs:{...n,body:e}});throw new o.F7({name:u.XE.ResponseNotOk,message:null==e?void 0:e.error,cause:null==e?void 0:e.error,additionalLogs:{...n,body:e}})}return t},p={async get(e){let{url:t,user:n,payload:r={},headers:i={},config:a}=e;return await f({url:t,options:{method:"GET",headers:i},payload:r,user:n,config:a})},async post(e){let{url:t,user:n,payload:r={},headers:i={},config:a}=e;return await f({url:t,options:{method:"POST",headers:i},payload:r,user:n,config:a})},async put(e){let{url:t,user:n,payload:r={},headers:i={},config:a}=e;return await f({url:t,options:{method:"PUT",headers:i},payload:r,user:n,config:a})},async dispatchCommand(e){let{commandName:t,payload:n,...r}=e;return this.post({url:"/command/dispatch",payload:{commandName:t,payload:null!=n?n:{}},...r})},async queueCommand(e){let{commandName:t,payload:n,...r}=e;return this.post({url:"/command/queue",payload:{commandName:t,payload:null!=n?n:{}},...r})}}},85981:function(e,t,n){"use strict";n.d(t,{ez:function(){return o},MW:function(){return u},Vw:function(){return l}});var r=n(66521),i=n(39326);let a=e=>{let t={...u};return o.options.forEach(n=>{t[n]=e.activeFeatureFlags.includes(n)}),t};var s=n(77914);let o=i.z.enum(["DEFAULT_FF","VAS_ENABLED"]),u={DEFAULT_FF:!1,VAS_ENABLED:!1},c=i.z.object({activeFeatureFlags:i.z.array(i.z.string())}),l=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-GB";try{let t=await s.h.get({url:"/v1/feature-flags?locales=".concat(e,"&platforms=").concat("web"),config:{baseUrl:"https://api.production.pawshake.io"}}),n=await t.json(),r=c.parse(n),i=c.parse(r);return a(i)}catch(e){return r.k.error("fetchFeatureFlags - try/catch",{error:e}),u}}},80312:function(e,t,n){"use strict";n.d(t,{yG:function(){return i},yv:function(){return r}});let r=()=>!0,i=()=>!1},51605:function(e,t,n){"use strict";n.d(t,{F7:function(){return s},Gp:function(){return a},qZ:function(){return u},vK:function(){return o}});var r=n(52346),i=n(14372);class a extends Error{prettyMessage(){return"ValidationError: [".concat(this.message,"] reason: ").concat(this.cause)}sentryMessage(){return{name:this.name,message:this.message,cause:this.cause,additionalLogs:this.additionalLogs,stack:this.stack,isClientSide:(0,r.Z)()}}constructor({name:e,message:t,cause:n,additionalLogs:r,response:i}){super(),Error.captureStackTrace&&Error.captureStackTrace(this,a),this.name=e,this.message=null!=t?t:"unknown message",this.cause=n,this.additionalLogs=r,this.response=i}}class s extends a{}class o extends a{constructor({error:e}){super({name:i.XE.Unprocessable,message:e.error}),this.error=e}}class u extends a{}},14372:function(e,t,n){"use strict";var r,i,a,s,o;n.d(t,{$_:function(){return c},Jm:function(){return u},Ol:function(){return a},XE:function(){return r},iJ:function(){return i}}),(s=r||(r={})).FetchFailed="network/fetch-failed",s.ResponseNotOk="network/response-not-ok",s.TimeOut="network/time-out",s.TooManyRequests="network/too-many-requests",s.RefreshTokenFailed="network/refresh-token-failed",s.Unauthorized="network/unauthorized",s.ParsingFailed="network/parsing-failed",s.TokenRefreshFailed="network/token-refresh-failed",s.EmptyToken="network/empty-token",s.Abort="network/abort",s.Redirect="network/redirect",s.Unprocessable="network/unprocessable",(i||(i={})).ParsingFailed="front-end/parsing-failed",(o=a||(a={})).AccountExistsWithDifferentCredential="auth/account-exists-with-different-credential",o.CancelledPopupRequest="auth/cancelled-popup-request",o.EmailAlreadyInUse="auth/email-already-in-use",o.PopupClosedByUser="auth/popup-closed-by-user",o.TooManyRequests="auth/too-many-requests",o.UserNotFound="auth/user-not-found",o.WrongPassword="auth/wrong-password";let u=["auth/popup-closed-by-user","auth/cancelled-popup-request"],c=["auth/wrong-password","auth/user-not-found","auth/email-already-in-use",...u]},37076:function(e,t,n){"use strict";n.d(t,{C1:function(){return s},R5:function(){return u},mZ:function(){return o},pU:function(){return a}});var r=n(67168);let i=(0,n(11390).Wm)({breakpoints:{sm:480,md:768,lg:992,xl:1280,"2xl":1536}});i.createMediaStyle();let{Media:a,MediaContextProvider:s}=i,o=e=>{let{children:t,className:n}=e;return(0,r.jsx)(a,{lessThan:"md",className:n,children:t})},u=e=>{let{className:t="",children:n}=e;return(0,r.jsx)(a,{className:t,greaterThanOrEqual:"md",children:n})}},37543:function(e,t,n){"use strict";n.d(t,{Do:function(){return r},LY:function(){return i},qf:function(){return a}});let r="/",i=e=>e?r:"/user/sign-up/verify",a=e=>(null==e?void 0:e.claims)&&0===Object.keys(e.claims).length?(console.error("Claims are empty, redirecting to account form - /user/sign-up/provider"),"/user/sign-up/provider"):(null==e?void 0:e.emailVerified)===!1?(console.error("Email is not verified, redirecting to account form - /user/sign-up/verify"),"/user/sign-up/verify"):void 0},33641:function(e,t,n){"use strict";n.d(t,{Xc:function(){return u},gK:function(){return i},gb:function(){return s},h:function(){return o},vt:function(){return a}});let r=e=>{var t;return(null==e?void 0:null===(t=e.claims)||void 0===t?void 0:t.is)===!0},i=e=>{var t,n,i,a,s,o,u,c,l,d,h,f,p;let m="".concat(null==e?void 0:null===(t=e.claims)||void 0===t?void 0:t.fna),g="".concat(null==e?void 0:null===(n=e.claims)||void 0===n?void 0:n.fna," ").concat(null==e?void 0:null===(i=e.claims)||void 0===i?void 0:i.lna);return{email:null!==(d=null==e?void 0:e.email)&&void 0!==d?d:null,isSitter:r(e),userName:m,fullName:g,uid:null!==(h=null==e?void 0:null===(a=e.firebaseUser)||void 0===a?void 0:a.uid)&&void 0!==h?h:null,userImage:null!==(f=null==e?void 0:null===(s=e.claims)||void 0===s?void 0:s.ava)&&void 0!==f?f:null,worldRegion:(null==e?void 0:null===(o=e.claims)||void 0===o?void 0:o.wr)==="EU"?"EU":"APAC",hasCompletedSitterApplication:(null==e?void 0:null===(u=e.claims)||void 0===u?void 0:u.hacss)===!0,sitterId:null!==(p=null==e?void 0:null===(c=e.claims)||void 0===c?void 0:c.sid)&&void 0!==p?p:null,meetsMinimumProfileRequirements:(null==e?void 0:null===(l=e.claims)||void 0===l?void 0:l.mmpr)===!0}},a=()=>{let e=new Date().getHours();return e>=12&&e<=17?"common:greeting.afternoon":e>17&&e<=24?"common:greeting.evening":"common:greeting.morning"},s=e=>{if(!e)return{color:"default",label:"features.dashboard.profile.state.unknown"};let{isPublished:t,isPenalised:n,isOnHoliday:r}=e;return n?{color:"danger",label:"features.dashboard.profile.state.unavailableByPawshake",zendeskArticle:"360031208151"}:t?r?{color:"success",label:"features.dashboard.profile.state.inAwayMode",zendeskArticle:"115002062006"}:{color:"success",label:"features.dashboard.profile.state.active"}:{color:"danger",label:"features.dashboard.profile.state.notActive",zendeskArticle:"360001060026"}},o=e=>{if(e&&e.photoURL){let t=e.photoURL.replace(/=s\d*-c/,"=s480-c");return"".concat(t,"?width=480&height=480")}},u=e=>e.replace("APAC_","").replace("EU_","")},52346:function(e,t){"use strict";t.Z=()=>!0},66521:function(e,t,n){"use strict";n.d(t,{k:function(){return d}});var r=n(6253),i=n(86114),a=n(44264),s=n.n(a),o=n(80312),u=n(51605),c=n(14372);let l=s()({level:"info"}),d={info:(e,t)=>{if(t){l.info(t,e);return}l.info(e)},warn:(e,t)=>{if(t){l.warn(t,e);return}l.warn(e)},error:(e,t)=>{var n;if(!t){l.error(e),r.uT(e);return}if((0,o.yG)()?(console.log("error message",e),console.log("object.error",JSON.stringify(t.error,null,10))):l.error(t.error,e),t.error instanceof Error)switch(!0){case t.error instanceof u.F7:switch(t.error.name){case c.XE.ResponseNotOk:!1===c.$_.includes(t.error.message)&&r.Tb(t.error,{extra:t.error.sentryMessage()});return;case c.XE.FetchFailed:default:l.info(t.error,e);return}case t.error instanceof i.ZR:l.info(t,e);return;default:r.Tb(t.error,{extra:{object:t,error:t.error,cause:t.error.cause}});return}r.uT("".concat(e," - ").concat(t.error instanceof Error?null!==(n=t.error.cause)&&void 0!==n?n:t.error.message:"Error"),{extra:t})}}},70649:function(e,t,n){"use strict";n.d(t,{L9:function(){return u},Qp:function(){return c},a8:function(){return s},zL:function(){return o}});var r=n(67168),i=n(34122),a=n(80312);let s=(e,t)=>(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}},t),o=e=>e.split("\n").map((e,t)=>(0,r.jsx)("p",{children:e},t)),u=(e,t,n)=>{(0,a.yv)()&&(0,i.x3)()?window.gtag("event",t,{event_category:e,event_label:void 0===n?t:n,value:1}):console.log("Category: ".concat(e," | action: ").concat(t," |  eventLabel: ").concat(void 0===n?t:n))},c=e=>{let t="Unknown";switch(e){case"petBoarding":t="Home dog boarding";break;case"doggyDayCare":t="Doggy day care";break;case"dogWalking":t="Dog walking";break;case"homeVisits":t="Home visits";break;case"catSitting":t="Cat sitting";break;case"dogSitting":t="Dog sitting";break;case"sleepover":t="House sitting";break;case"petSitting":t="Pet sitting"}return t}},28310:function(){},71784:function(){},9558:function(e){e.exports={style:{fontFamily:"'__Roboto_6ede37', '__Roboto_Fallback_6ede37'"},className:"__className_6ede37"}},44264:function(e,t,n){"use strict";let r=n(75099);e.exports=l;let i=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function a(e,t){return"silent"===e?1/0:t.levels.values[e]}let s=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),u={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function c(e,t){let n={logger:t,parent:e[o]};t[o]=n}function l(e){var t,n;(e=e||{}).browser=e.browser||{};let r=e.browser.transmit;if(r&&"function"!=typeof r.send)throw Error("pino: transmit option must have a send function");let o=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let p=e.serializers||{},m=Array.isArray(t=e.browser.serialize)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(p),g=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(g=!1);let b=Object.keys(e.customLevels||{}),w=["error","fatal","warn","info","debug","trace"].concat(b);"function"==typeof o&&w.forEach(function(e){o[e]=o}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let E=e.level||"info",I=Object.create(o);I.log||(I.log=v),function(e,t,n){let r={};t.forEach(e=>{r[e]=n[e]?n[e]:i[e]||i[u[e]||"log"]||v}),e[s]=r}(I,w,o),c({},I),Object.defineProperty(I,"levelVal",{get:function(){return a(this.level,this)}}),Object.defineProperty(I,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,k,I,"error"),d(this,k,I,"fatal"),d(this,k,I,"warn"),d(this,k,I,"info"),d(this,k,I,"debug"),d(this,k,I,"trace"),b.forEach(e=>{d(this,k,I,e)})}});let k={transmit:r,serialize:m,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:w,timestamp:"function"==typeof(n=e).timestamp?n.timestamp:!1===n.timestamp?y:_};return I.levels=function(e){let t=e.customLevels||{};return{values:Object.assign({},l.levels.values,t),labels:Object.assign({},l.levels.labels,function(e){let t={};return Object.keys(e).forEach(function(n){t[e[n]]=n}),t}(t))}}(e),I.level=E,I.setMaxListeners=I.getMaxListeners=I.emit=I.addListener=I.on=I.prependListener=I.once=I.prependOnceListener=I.removeListener=I.removeAllListeners=I.listeners=I.listenerCount=I.eventNames=I.write=I.flush=v,I.serializers=p,I._serialize=m,I._stdErrSerialize=g,I.child=function(t,n){if(!t)throw Error("missing bindings for child Pino");n=n||{},m&&t.serializers&&(n.serializers=t.serializers);let i=n.serializers;if(m&&i){var a=Object.assign({},p,i),s=!0===e.browser.serialize?Object.keys(a):m;delete t.serializers,h([t],s,a,this._stdErrSerialize)}function o(e){this._childLevel=(0|e._childLevel)+1,this.bindings=t,a&&(this.serializers=a,this._serialize=s),r&&(this._logEvent=f([].concat(e._logEvent.bindings,t)))}o.prototype=this;let u=new o(this);return c(this,u),u.level=this.level,u},r&&(I._logEvent=f()),I}function d(e,t,n,u){var c,l;if(Object.defineProperty(e,u,{value:a(e.level,n)>a(u,n)?v:n[s][u],writable:!0,enumerable:!0,configurable:!0}),!t.transmit&&e[u]===v)return;e[u]=(c=e[s][u],function(){let s=t.timestamp(),o=Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var d=0;d<o.length;d++)o[d]=arguments[d];if(t.serialize&&!t.asObject&&h(o,this._serialize,this.serializers,this._stdErrSerialize),t.asObject||t.formatters?c.call(l,function(e,t,n,i,a={}){let{level:s=()=>e.levels.values[t],log:o=e=>e}=a;e._serialize&&h(n,e._serialize,e.serializers,e._stdErrSerialize);let u=n.slice(),c=u[0],l={};i&&(l.time=i),l.level=s(t,e.levels.values[t]);let d=(0|e._childLevel)+1;if(d<1&&(d=1),null!==c&&"object"==typeof c){for(;d--&&"object"==typeof u[0];)Object.assign(l,u.shift());c=u.length?r(u.shift(),u):void 0}else"string"==typeof c&&(c=r(u.shift(),u));return void 0!==c&&(l.msg=c),o(l)}(this,u,o,s,t.formatters)):c.apply(l,o),t.transmit){let r=t.transmit.level||e._level,i=n.levels.values[r],c=n.levels.values[u];if(c<i)return;(function(e,t,n){let r=t.send,i=t.ts,a=t.methodLevel,s=t.methodValue,o=t.val,u=e._logEvent.bindings;h(n,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=n.filter(function(e){return -1===u.indexOf(e)}),e._logEvent.level.label=a,e._logEvent.level.value=s,r(a,e._logEvent,o),e._logEvent=f(u)})(this,{ts:s,methodLevel:u,methodValue:c,transmitLevel:r,transmitValue:n.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:a(e._level,n)},o)}});let d=function(e){let t=[];e.bindings&&t.push(e.bindings);let n=e[o];for(;n.parent;)(n=n.parent).logger.bindings&&t.push(n.logger.bindings);return t.reverse()}(e);0!==d.length&&(e[u]=(l=e[u],function(){return l.apply(this,[...d,...arguments])}))}function h(e,t,n,r){for(let i in e)if(r&&e[i]instanceof Error)e[i]=l.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let r in e[i])t&&t.indexOf(r)>-1&&r in n&&(e[i][r]=n[r](e[i][r]))}function f(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let n in e)void 0===t[n]&&(t[n]=e[n]);return t}function m(){return{}}function g(e){return e}function v(){}function y(){return!1}function _(){return Date.now()}l.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},l.stdSerializers={mapHttpRequest:m,mapHttpResponse:m,wrapRequestSerializer:g,wrapResponseSerializer:g,wrapErrorSerializer:g,req:m,res:m,err:p,errWithCause:p},l.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:_,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=l,e.exports.pino=l},44593:function(e,t,n){"use strict";n.d(t,{Jn:function(){return _},KN:function(){return E},Mq:function(){return w},Xd:function(){return m},ZF:function(){return b},ZR:function(){return a.ZR},qX:function(){return g}});var r=n(85246),i=n(61655),a=n(21025),s=n(28543);/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class o{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let u="@firebase/app",c="0.9.13",l=new i.Yd("@firebase/app"),d="[DEFAULT]",h={[u]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},f=new Map,p=new Map;function m(e){let t=e.name;if(p.has(t))return l.debug(`There were multiple attempts to register component ${t}.`),!1;for(let n of(p.set(t,e),f.values()))!function(e,t){try{e.container.addComponent(t)}catch(n){l.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}(n,e);return!0}function g(e,t){let n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}let v=new a.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class y{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new r.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw v.create("app-deleted",{appName:this._name})}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let _="9.23.0";function b(e,t={}){let n=e;"object"!=typeof t&&(t={name:t});let i=Object.assign({name:d,automaticDataCollectionEnabled:!1},t),s=i.name;if("string"!=typeof s||!s)throw v.create("bad-app-name",{appName:String(s)});if(n||(n=(0,a.aH)()),!n)throw v.create("no-options");let o=f.get(s);if(o){if((0,a.vZ)(n,o.options)&&(0,a.vZ)(i,o.config))return o;throw v.create("duplicate-app",{appName:s})}let u=new r.H0(s);for(let e of p.values())u.addComponent(e);let c=new y(n,i,u);return f.set(s,c),c}function w(e=d){let t=f.get(e);if(!t&&e===d&&(0,a.aH)())return b();if(!t)throw v.create("no-app",{appName:e});return t}function E(e,t,n){var i;let a=null!==(i=h[e])&&void 0!==i?i:e;n&&(a+=`-${n}`);let s=a.match(/\s|\//),o=t.match(/\s|\//);if(s||o){let e=[`Unable to register library "${a}" with version "${t}":`];s&&e.push(`library name "${a}" contains illegal characters (whitespace or "/")`),s&&o&&e.push("and"),o&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),l.warn(e.join(" "));return}m(new r.wA(`${a}-version`,()=>({library:a,version:t}),"VERSION"))}let I="firebase-heartbeat-store",k=null;function S(){return k||(k=(0,s.openDB)("firebase-heartbeat-database",1,{upgrade:(e,t)=>{0===t&&e.createObjectStore(I)}}).catch(e=>{throw v.create("idb-open",{originalErrorMessage:e.message})})),k}async function T(e){try{let t=await S();return await t.transaction(I).objectStore(I).get(A(e))}catch(e){if(e instanceof a.ZR)l.warn(e.message);else{let t=v.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});l.warn(t.message)}}}async function O(e,t){try{let n=(await S()).transaction(I,"readwrite"),r=n.objectStore(I);await r.put(t,A(e)),await n.done}catch(e){if(e instanceof a.ZR)l.warn(e.message);else{let t=v.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});l.warn(t.message)}}}function A(e){return`${e.name}!${e.options.appId}`}class C{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new R(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){let e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=P();return(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))?void 0:(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache))}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";let e=P(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),x(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),x(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=(0,a.L)(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function P(){return new Date().toISOString().substring(0,10)}class R{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,a.hl)()&&(0,a.eu)().then(()=>!0).catch(()=>!1)}async read(){return await this._canUseIndexedDBPromise&&await T(this.app)||{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return O(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return O(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function x(e){return(0,a.L)(JSON.stringify({version:2,heartbeats:e})).length}m(new r.wA("platform-logger",e=>new o(e),"PRIVATE")),m(new r.wA("heartbeat",e=>new C(e),"PRIVATE")),E(u,c,""),E(u,c,"esm2017"),E("fire-js","")},85246:function(e,t,n){"use strict";n.d(t,{H0:function(){return o},wA:function(){return i}});var r=n(21025);class i{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let a="[DEFAULT]";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class s{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new r.BH;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){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,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:a})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=a){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=a){return this.instances.has(e)}getOptions(e=a){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){var n;let r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);let a=this.instances.get(r);return a&&e(a,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:e===a?void 0:e,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}return n||null}normalizeInstanceIdentifier(e=a){return this.component?this.component.multipleInstances?e:a:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class o{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new s(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},61655:function(e,t,n){"use strict";var r,i;n.d(t,{Yd:function(){return l},in:function(){return r}});/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let a=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let s={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},o=r.INFO,u={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},c=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=u[t];if(i)console[i](`[${r}]  ${e.name}:`,...n);else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class l{constructor(e){this.name=e,this._logLevel=o,this._logHandler=c,this._userLogHandler=null,a.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in r))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?s[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,r.DEBUG,...e),this._logHandler(this,r.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,r.VERBOSE,...e),this._logHandler(this,r.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,r.INFO,...e),this._logHandler(this,r.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,r.WARN,...e),this._logHandler(this,r.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,r.ERROR,...e),this._logHandler(this,r.ERROR,...e)}}},70071:function(e,t,n){"use strict";n.d(t,{G:function(){return h}});var r=n(55959),i=n(15242),a=n(58839),s=n(66502);class o{constructor(e,t){let n,r;n=e||new s.s,r=t||new s.s,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t;let n=this._pushScope();try{t=e(n)}catch(e){throw this._popScope(),e}return(0,i.J8)(t)?t.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function u(){let e=(0,r.c)(),t=(0,r.q)(e);return t.stack=t.stack||new o((0,a.Y)("defaultCurrentScope",()=>new s.s),(0,a.Y)("defaultIsolationScope",()=>new s.s))}function c(e){return u().withScope(e)}function l(e,t){let n=u();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function d(e){return u().withScope(()=>e(u().getIsolationScope()))}function h(e){let t=(0,r.q)(e);return t.acs?t.acs:{withIsolationScope:d,withScope:c,withSetScope:l,withSetIsolationScope:(e,t)=>d(t),getCurrentScope:()=>u().getScope(),getIsolationScope:()=>u().getIsolationScope()}}},55959:function(e,t,n){"use strict";n.d(t,{c:function(){return a},q:function(){return s}});var r=n(58839),i=n(56362);function a(){return s(r.GLOBAL_OBJ),r.GLOBAL_OBJ}function s(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||i.J,t[i.J]=t[i.J]||{}}},44138:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});let r="production"},7071:function(e,t,n){"use strict";n.d(t,{$e:function(){return l},aF:function(){return u},lW:function(){return c},nZ:function(){return o},s3:function(){return d}});var r=n(58839),i=n(70071),a=n(55959),s=n(66502);function o(){let e=(0,a.c)();return(0,i.G)(e).getCurrentScope()}function u(){let e=(0,a.c)();return(0,i.G)(e).getIsolationScope()}function c(){return(0,r.Y)("globalScope",()=>new s.s)}function l(...e){let t=(0,a.c)(),n=(0,i.G)(t);if(2===e.length){let[t,r]=e;return t?n.withSetScope(t,r):n.withScope(r)}return n.withScope(e[0])}function d(){return o().getClient()}},66040:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});let r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},6253:function(e,t,n){"use strict";n.d(t,{Qy:function(){return g},Tb:function(){return l},av:function(){return p},cg:function(){return b},eN:function(){return h},uT:function(){return d},v:function(){return f},yj:function(){return v},yl:function(){return m}});var r=n(45096),i=n(58839),a=n(44138),s=n(7071),o=n(66040),u=n(44498),c=n(13381);function l(e,t){return(0,s.nZ)().captureException(e,(0,c.U0)(t))}function d(e,t){let n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return(0,s.nZ)().captureMessage(e,n,r)}function h(e,t){return(0,s.nZ)().captureEvent(e,t)}function f(e,t){(0,s.aF)().setContext(e,t)}function p(e){(0,s.aF)().setUser(e)}async function m(e){let t=(0,s.s3)();return t?t.flush(e):(o.X&&r.kg.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}function g(e){(0,s.aF)().addEventProcessor(e)}function v(e){let t=(0,s.s3)(),n=(0,s.aF)(),r=(0,s.nZ)(),{release:o,environment:c=a.J}=t&&t.getOptions()||{},{userAgent:l}=i.GLOBAL_OBJ.navigator||{},d=(0,u.Hv)({release:o,environment:c,user:r.getUser()||n.getUser(),...l&&{userAgent:l},...e}),h=n.getSession();return h&&"ok"===h.status&&(0,u.CT)(h,{status:"exited"}),y(),n.setSession(d),r.setSession(d),d}function y(){let e=(0,s.aF)(),t=(0,s.nZ)(),n=t.getSession()||e.getSession();n&&(0,u.RJ)(n),_(),e.setSession(),t.setSession()}function _(){let e=(0,s.aF)(),t=(0,s.nZ)(),n=(0,s.s3)(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function b(e=!1){if(e){y();return}_()}},47061:function(e,t,n){"use strict";n.d(t,{y:function(){return i}});var r=n(93914);function i(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,i]]of t)(n[e]||(n[e]=[])).push((0,r.Jr)(i));return n}},66502:function(e,t,n){"use strict";n.d(t,{s:function(){return d}});var r=n(36815),i=n(15242),a=n(65906),s=n(85359),o=n(45096),u=n(44498),c=n(12235);class l{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=(0,r.Q)()}clone(){let e=new l;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,(0,c.D)(e,(0,c.Y)(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&(0,u.CT)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e,[n,r]=t instanceof d?[t.getScopeData(),t.getRequestSession()]:(0,i.PO)(t)?[e,e.requestSession]:[],{tags:a,extra:s,user:o,contexts:u,level:c,fingerprint:l=[],propagationContext:h}=n||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...s},this._contexts={...this._contexts,...u},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),h&&(this._propagationContext=h),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,(0,c.D)(this,void 0),this._attachments=[],this._propagationContext=(0,r.Q)(),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n="number"==typeof t?t:100;if(n<=0)return this;let r={timestamp:(0,a.yW)(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:(0,c.Y)(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:(0,s.DM)();if(!this._client)return o.kg.warn("No client configured on scope - will not capture exception!"),n;let r=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:(0,s.DM)();if(!this._client)return o.kg.warn("No client configured on scope - will not capture message!"),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:(0,s.DM)();return this._client?this._client.captureEvent(e,{...t,event_id:n},this):o.kg.warn("No client configured on scope - will not capture event!"),n}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}let d=l},42513:function(e,t,n){"use strict";n.d(t,{$J:function(){return a},E1:function(){return u},JQ:function(){return d},S3:function(){return s},TE:function(){return i},Wb:function(){return c},Zj:function(){return r},ju:function(){return o},p6:function(){return l}});let r="sentry.source",i="sentry.sample_rate",a="sentry.op",s="sentry.origin",o="sentry.idle_span_finish_reason",u="sentry.measurement_unit",c="sentry.measurement_value",l="sentry.profile_id",d="sentry.exclusive_time"},44498:function(e,t,n){"use strict";n.d(t,{CT:function(){return o},Hv:function(){return s},RJ:function(){return u}});var r=n(65906),i=n(85359),a=n(93914);function s(e){let t=(0,r.ph)(),n={sid:(0,i.DM)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(0,a.Jr)({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:"number"==typeof n.did||"string"==typeof n.did?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})};return e&&o(n,e),n}function o(e,t={}){if(!t.user||(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,r.ph)(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:(0,i.DM)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function u(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),o(e,n)}},16682:function(e,t,n){"use strict";n.d(t,{Lh:function(){return l},_l:function(){return d},jC:function(){return h}});var r=n(93914),i=n(35283),a=n(44138),s=n(7071),o=n(42513),u=n(21651);let c="_frozenDsc";function l(e,t){(0,r.xp)(e,c,t)}function d(e,t){let n=t.getOptions(),{publicKey:i}=t.getDsn()||{},s=(0,r.Jr)({environment:n.environment||a.J,release:n.release,public_key:i,trace_id:e});return t.emit("createDsc",s),s}function h(e){let t=(0,s.s3)();if(!t)return{};let n=d((0,u.XU)(e).trace_id||"",t),r=(0,u.Gx)(e),a=r[c];if(a)return a;let l=r.spanContext().traceState,h=l&&l.get("sentry.dsc"),f=h&&(0,i.EN)(h);if(f)return f;let p=(0,u.XU)(r),m=p.data||{},g=m[o.TE];null!=g&&(n.sample_rate=`${g}`);let v=m[o.Zj],y=p.description;return"url"!==v&&y&&(n.transaction=y),n.sampled=String((0,u.Tt)(r)),t.emit("createDsc",n,r),n}},615:function(e,t,n){"use strict";n.d(t,{OP:function(){return i},Q0:function(){return s},jt:function(){return a},pq:function(){return r}});let r=0,i=1,a=2;function s(e,t){e.setAttribute("http.response.status_code",t);let n=function(e){if(e<400&&e>=100)return{code:i};if(e>=400&&e<500)switch(e){case 401:return{code:a,message:"unauthenticated"};case 403:return{code:a,message:"permission_denied"};case 404:return{code:a,message:"not_found"};case 409:return{code:a,message:"already_exists"};case 413:return{code:a,message:"failed_precondition"};case 429:return{code:a,message:"resource_exhausted"};case 499:return{code:a,message:"cancelled"};default:return{code:a,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:a,message:"unimplemented"};case 503:return{code:a,message:"unavailable"};case 504:return{code:a,message:"deadline_exceeded"};default:return{code:a,message:"internal_error"}}return{code:a,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}},13381:function(e,t,n){"use strict";n.d(t,{U0:function(){return E},R:function(){return b}});var r=n(85359),i=n(65906),a=n(77946),s=n(58839),o=n(71781),u=n(44138),c=n(7071),l=n(7709),d=n(45096),h=n(15242),f=n(66040),p=n(66502),m=n(93914),g=n(16682),v=n(21651);function y(e,t){let{extra:n,tags:r,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:u,fingerprint:c,eventProcessors:l,attachments:d,propagationContext:h,transactionName:f,span:p}=t;_(e,"extra",n),_(e,"tags",r),_(e,"user",i),_(e,"contexts",a),_(e,"sdkProcessingMetadata",o),s&&(e.level=s),f&&(e.transactionName=f),p&&(e.span=p),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function _(e,t,n){if(n&&Object.keys(n).length)for(let r in e[t]={...e[t]},n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}function b(e,t,n,_,b,E){let{normalizeDepth:I=3,normalizeMaxBreadth:k=1e3}=e,S={...t,event_id:t.event_id||n.event_id||(0,r.DM)(),timestamp:t.timestamp||(0,i.yW)()},T=n.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:u.J),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=(0,a.$G)(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=(0,a.$G)(o.value,s));let c=e.request;c&&c.url&&(c.url=(0,a.$G)(c.url,s))})(S,e),T.length>0&&(S.sdk=S.sdk||{},S.sdk.integrations=[...S.sdk.integrations||[],...T]),b&&b.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){let n;let r=s.GLOBAL_OBJ._sentryDebugIds;if(!r)return;let i=w.get(t);i?n=i:(n=new Map,w.set(t,n));let a=Object.entries(r).reduce((e,[r,i])=>{let a;let s=n.get(r);s?a=s:(a=t(r),n.set(r,a));for(let t=a.length-1;t>=0;t--){let n=a[t];if(n.filename){e[n.filename]=i;break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=a[e.filename])})})}catch(e){}}(S,e.stackParser);let O=function(e,t){if(!t)return e;let n=e?e.clone():new p.s;return n.update(t),n}(_,n.captureContext);n.mechanism&&(0,r.EG)(S,n.mechanism);let A=b?b.getEventProcessors():[],C=(0,c.lW)().getScopeData();E&&y(C,E.getScopeData()),O&&y(C,O.getScopeData());let P=[...n.attachments||[],...C.attachments];return P.length&&(n.attachments=P),function(e,t){let{fingerprint:n,span:i,breadcrumbs:a,sdkProcessingMetadata:s}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:a,level:s,transactionName:o}=t,u=(0,m.Jr)(n);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});let c=(0,m.Jr)(r);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});let l=(0,m.Jr)(i);l&&Object.keys(l).length&&(e.user={...l,...e.user});let d=(0,m.Jr)(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&"transaction"!==e.type&&(e.transaction=o)})(e,t),i&&function(e,t){e.contexts={trace:(0,v.wy)(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:(0,g.jC)(t),...e.sdkProcessingMetadata};let n=(0,v.Gx)(t),r=(0,v.XU)(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,i),e.fingerprint=e.fingerprint?(0,r.lE)(e.fingerprint):[],n&&(e.fingerprint=e.fingerprint.concat(n)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint,function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,a),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...s}}(S,C),(function e(t,n,r,i=0){return new l.cW((a,s)=>{let o=t[i];if(null===n||"function"!=typeof o)a(n);else{let u=o({...n},r);f.X&&o.id&&null===u&&d.kg.log(`Event processor "${o.id}" dropped event`),(0,h.J8)(u)?u.then(n=>e(t,n,r,i+1).then(a)).then(null,s):e(t,u,r,i+1).then(a).then(null,s)}})})([...A,...C.eventProcessors],S,n).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof I&&I>0)?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:(0,o.Fv)(e.data,t,n)}}))},...e.user&&{user:(0,o.Fv)(e.user,t,n)},...e.contexts&&{contexts:(0,o.Fv)(e.contexts,t,n)},...e.extra&&{extra:(0,o.Fv)(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=(0,o.Fv)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:(0,o.Fv)(e.data,t,n)}}))),r}(e,I,k):e)}let w=new WeakMap;function E(e){return e?e instanceof p.s||"function"==typeof e||Object.keys(e).some(e=>I.includes(e))?{captureContext:e}:e:void 0}let I=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},12235:function(e,t,n){"use strict";n.d(t,{D:function(){return a},Y:function(){return s}});var r=n(93914);let i="_sentrySpan";function a(e,t){t?(0,r.xp)(e,i,t):delete e[i]}function s(e){return e[i]}},21651:function(e,t,n){"use strict";n.d(t,{$k:function(){return y},Dp:function(){return O},Gx:function(){return A},HN:function(){return C},HR:function(){return m},Hb:function(){return v},Tt:function(){return w},XU:function(){return b},_4:function(){return E},ed:function(){return T},i0:function(){return p},j5:function(){return S},ve:function(){return f},wy:function(){return g}});var r=n(93914),i=n(26733),a=n(65906),s=n(70071),o=n(55959),u=n(7071),c=n(47061),l=n(42513),d=n(615),h=n(12235);let f=0,p=1;function m(e){let{spanId:t,traceId:n}=e.spanContext(),{data:i,op:a,parent_span_id:s,status:o,origin:u}=b(e);return(0,r.Jr)({parent_span_id:s,span_id:t,trace_id:n,data:i,op:a,status:o,origin:u})}function g(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:i}=b(e);return(0,r.Jr)({parent_span_id:i,span_id:t,trace_id:n})}function v(e){let{traceId:t,spanId:n}=e.spanContext(),r=w(e);return(0,i.$p)(t,n,r)}function y(e){return"number"==typeof e?_(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_(e.getTime()):(0,a.ph)()}function _(e){return e>9999999999?e/1e3:e}function b(e){if("function"==typeof e.getSpanJSON)return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status){let{attributes:i,startTime:a,name:s,endTime:o,parentSpanId:u,status:d}=e;return(0,r.Jr)({span_id:t,trace_id:n,data:i,description:s,parent_span_id:u,start_timestamp:y(a),timestamp:y(o)||void 0,status:E(d),op:i[l.$J],origin:i[l.S3],_metrics_summary:(0,c.y)(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function w(e){let{traceFlags:t}=e.spanContext();return t===p}function E(e){return e&&e.code!==d.pq?e.code===d.OP?"ok":e.message||"unknown_error":void 0}let I="_sentryChildSpans",k="_sentryRootSpan";function S(e,t){let n=e[k]||e;(0,r.xp)(t,k,n),e[I]?e[I].add(t):(0,r.xp)(e,I,new Set([t]))}function T(e,t){e[I]&&e[I].delete(t)}function O(e){let t=new Set;return function e(n){if(!t.has(n)&&w(n))for(let r of(t.add(n),n[I]?Array.from(n[I]):[]))e(r)}(e),Array.from(t)}function A(e){return e[k]||e}function C(){let e=(0,o.c)(),t=(0,s.G)(e);return t.getActiveSpan?t.getActiveSpan():(0,h.Y)((0,u.nZ)())}},86868:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});let r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},35283:function(e,t,n){"use strict";n.d(t,{EN:function(){return c},IQ:function(){return l},bU:function(){return s}});var r=n(70518),i=n(15242),a=n(45096);let s="baggage",o="sentry-",u=/^sentry-/;function c(e){let t=e&&((0,i.HD)(e)||Array.isArray(e))?Array.isArray(e)?e.reduce((e,t)=>(Object.entries(d(t)).forEach(([t,n])=>{e[t]=n}),e),{}):d(e):void 0;if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(u)&&(e[t.slice(o.length)]=n),e),{});return Object.keys(n).length>0?n:void 0}function l(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],i)=>{let s=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===i?s:`${e},${s}`;return o.length>8192?(r.X&&a.kg.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${o}${t}`]=n),e),{}))}function d(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}},5429:function(e,t,n){"use strict";n.d(t,{Rt:function(){return a},iY:function(){return u},l4:function(){return s},qT:function(){return o}});var r=n(15242);let i=n(58839).GLOBAL_OBJ;function a(e,t={}){if(!e)return"<unknown>";try{let n,a=e,s=[],o=0,u=0,c=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||80;for(;a&&o++<5&&(n=function(e,t){let n=[];if(!e||!e.tagName)return"";if(i.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}n.push(e.tagName.toLowerCase());let a=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(a&&a.length)a.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{e.id&&n.push(`#${e.id}`);let t=e.className;if(t&&(0,r.HD)(t))for(let e of t.split(/\s+/))n.push(`.${e}`)}for(let t of["aria-label","type","name","title","alt"]){let r=e.getAttribute(t);r&&n.push(`[${t}="${r}"]`)}return n.join("")}(a,c),"html"!==n&&(!(o>1)||!(u+3*s.length+n.length>=l)));)s.push(n),u+=n.length,a=a.parentNode;return s.reverse().join(" > ")}catch(e){return"<unknown>"}}function s(){try{return i.document.location.href}catch(e){return""}}function o(e){return i.document&&i.document.querySelector?i.document.querySelector(e):null}function u(e){if(!i.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}},73188:function(e,t,n){"use strict";function r(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=a(n)):("call"===i||"optionalCall"===i)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}n.d(t,{x:function(){return r}})},70518:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});let r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},15242:function(e,t,n){"use strict";n.d(t,{Cy:function(){return v},HD:function(){return c},J8:function(){return g},Kj:function(){return m},Le:function(){return l},PO:function(){return h},TX:function(){return o},V9:function(){return y},VW:function(){return s},VZ:function(){return i},cO:function(){return f},fm:function(){return u},kK:function(){return p},pt:function(){return d},y1:function(){return _}});let r=Object.prototype.toString;function i(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(e,Error)}}function a(e,t){return r.call(e)===`[object ${t}]`}function s(e){return a(e,"ErrorEvent")}function o(e){return a(e,"DOMError")}function u(e){return a(e,"DOMException")}function c(e){return a(e,"String")}function l(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function d(e){return null===e||l(e)||"object"!=typeof e&&"function"!=typeof e}function h(e){return a(e,"Object")}function f(e){return"undefined"!=typeof Event&&y(e,Event)}function p(e){return"undefined"!=typeof Element&&y(e,Element)}function m(e){return a(e,"RegExp")}function g(e){return!!(e&&e.then&&"function"==typeof e.then)}function v(e){return h(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e,t){try{return e instanceof t}catch(e){return!1}}function _(e){return!!("object"==typeof e&&null!==e&&(e.__isVue||e._isVue))}},45096:function(e,t,n){"use strict";n.d(t,{Cf:function(){return o},LD:function(){return s},RU:function(){return a},kg:function(){return u}});var r=n(70518),i=n(58839);let a=["debug","info","warn","error","log","assert","trace"],s={};function o(e){if(!("console"in i.GLOBAL_OBJ))return e();let t=i.GLOBAL_OBJ.console,n={},r=Object.keys(s);r.forEach(e=>{let r=s[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}let u=(0,i.Y)("logger",function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return r.X?a.forEach(n=>{t[n]=(...t)=>{e&&o(()=>{i.GLOBAL_OBJ.console[n](`Sentry Logger [${n}]:`,...t)})}}):a.forEach(e=>{t[e]=()=>void 0}),t})},85359:function(e,t,n){"use strict";n.d(t,{DM:function(){return a},Db:function(){return u},EG:function(){return c},YO:function(){return l},jH:function(){return o},lE:function(){return d}});var r=n(93914),i=n(58839);function a(){let e=i.GLOBAL_OBJ,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function s(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function o(e){let{message:t,event_id:n}=e;if(t)return t;let r=s(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function u(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type=n||"Error")}function c(e,t){let n=s(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function l(e){if(e&&e.__sentry_captured__)return!0;try{(0,r.xp)(e,"__sentry_captured__",!0)}catch(e){}return!1}function d(e){return Array.isArray(e)?e:[e]}},71781:function(e,t,n){"use strict";n.d(t,{Fv:function(){return s},Qy:function(){return function e(t,n=3,r=102400){let i=s(t,n);return~-encodeURI(JSON.stringify(i)).split(/%..|./).length>r?e(t,n-1,r):i}}});var r=n(15242),i=n(93914),a=n(46031);function s(e,t=100,n=Infinity){try{return function e(t,n,s=Infinity,o=Infinity,u=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[c,l]=u;if(null==n||["number","boolean","string"].includes(typeof n)&&!Number.isNaN(n))return n;let d=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if((0,r.y1)(t))return"[VueViewModel]";if((0,r.Cy)(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${(0,a.$P)(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let n=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);if(/^HTML(\w*)Element$/.test(n))return`[HTMLElement: ${n}]`;return`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}(t,n);if(!d.startsWith("[object "))return d;if(n.__sentry_skip_normalization__)return n;let h="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:s;if(0===h)return d.replace("object ","");if(c(n))return"[Circular ~]";if(n&&"function"==typeof n.toJSON)try{let t=n.toJSON();return e("",t,h-1,o,u)}catch(e){}let f=Array.isArray(n)?[]:{},p=0,m=(0,i.Sh)(n);for(let t in m){if(!Object.prototype.hasOwnProperty.call(m,t))continue;if(p>=o){f[t]="[MaxProperties ~]";break}let n=m[t];f[t]=e(t,n,h-1,o,u),p++}return l(n),f}("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}},93914:function(e,t,n){"use strict";n.d(t,{$Q:function(){return l},HK:function(){return d},Jr:function(){return v},Sh:function(){return f},_j:function(){return h},hl:function(){return u},xp:function(){return c},zf:function(){return g}});var r=n(5429),i=n(70518),a=n(15242),s=n(45096),o=n(77946);function u(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);"function"==typeof i&&l(i,r),e[t]=i}function c(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){i.X&&s.kg.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function l(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,c(e,"__sentry_original__",t)}catch(e){}}function d(e){return e.__sentry_original__}function h(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function f(e){if((0,a.VZ)(e))return{message:e.message,name:e.name,stack:e.stack,...m(e)};if(!(0,a.cO)(e))return e;{let t={type:e.type,target:p(e.target),currentTarget:p(e.currentTarget),...m(e)};return"undefined"!=typeof CustomEvent&&(0,a.V9)(e,CustomEvent)&&(t.detail=e.detail),t}}function p(e){try{return(0,a.kK)(e)?(0,r.Rt)(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function m(e){if("object"!=typeof e||null===e)return{};{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}}function g(e,t=40){let n=Object.keys(f(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return(0,o.$G)(r,t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(", ");if(!(r.length>t)){if(e===n.length)return r;return(0,o.$G)(r,t)}}return""}function v(e){return function e(t,n){if(function(e){if(!(0,a.PO)(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(t)){let r=n.get(t);if(void 0!==r)return r;let i={};for(let r of(n.set(t,i),Object.keys(t)))void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){let r=n.get(t);if(void 0!==r)return r;let i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n))}),i}return t}(e,new Map)}},36815:function(e,t,n){"use strict";n.d(t,{Q:function(){return i}});var r=n(85359);function i(){return{traceId:(0,r.DM)(),spanId:(0,r.DM)().substring(16)}}},46031:function(e,t,n){"use strict";n.d(t,{$P:function(){return l},Fi:function(){return r},Fr:function(){return d},Sq:function(){return o},pE:function(){return s}});let r="?",i=/\(error: (.*)\)/,a=/captureMessage|captureException/;function s(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,s=0)=>{let o=[],c=e.split("\n");for(let e=n;e<c.length;e++){let n=c[e];if(n.length>1024)continue;let r=i.test(n)?n.replace(i,"$1"):n;if(!r.match(/\S*Error: /)){for(let e of t){let t=e(r);if(t){o.push(t);break}}if(o.length>=50+s)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(u(t).function||"")&&t.pop(),t.reverse(),a.test(u(t).function||"")&&(t.pop(),a.test(u(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||u(t).filename,function:e.function||r}))}(o.slice(s))}}function o(e){return Array.isArray(e)?s(...e):e}function u(e){return e[e.length-1]||{}}let c="<anonymous>";function l(e){try{if(!e||"function"!=typeof e)return c;return e.name||c}catch(e){return c}}function d(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch(e){}}}},77946:function(e,t,n){"use strict";n.d(t,{$G:function(){return i},U0:function(){return s},nK:function(){return a}});var r=n(15242);function i(e,t=0){return"string"!=typeof e||0===t?e:e.length<=t?e:`${e.slice(0,t)}...`}function a(e,t){if(!Array.isArray(e))return"";let n=[];for(let t=0;t<e.length;t++){let i=e[t];try{(0,r.y1)(i)?n.push("[VueViewModel]"):n.push(String(i))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t=[],n=!1){return t.some(t=>(function(e,t,n=!1){return!!(0,r.HD)(e)&&((0,r.Kj)(t)?t.test(e):!!(0,r.HD)(t)&&(n?e===t:e.includes(t)))})(e,t,n))}},7709:function(e,t,n){"use strict";n.d(t,{$2:function(){return o},WD:function(){return s},cW:function(){return u}});var r,i,a=n(15242);function s(e){return new u(t=>{t(e)})}function o(e){return new u((t,n)=>{n(e)})}(r=i||(i={}))[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED";class u{constructor(e){u.prototype.__init.call(this),u.prototype.__init2.call(this),u.prototype.__init3.call(this),u.prototype.__init4.call(this),this._state=i.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new u((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new u((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{if(i){n(r);return}t(r)})})}__init(){this._resolve=e=>{this._setResult(i.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(i.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===i.PENDING){if((0,a.J8)(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===i.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===i.RESOLVED&&e[1](this._value),this._state===i.REJECTED&&e[2](this._value),e[0]=!0)})}}}},65906:function(e,t,n){"use strict";n.d(t,{Z1:function(){return s},ph:function(){return a},yW:function(){return i}});var r=n(58839);function i(){return Date.now()/1e3}let a=function(){let{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return i;let t=Date.now()-e.now(),n=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}(),s=(()=>{let{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return;let t=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+t-n):36e5;return i<36e5||s<36e5?i<=s?e.timeOrigin:a:n})()},26733:function(e,t,n){"use strict";n.d(t,{$p:function(){return o},pT:function(){return s}});var r=n(35283),i=n(85359);let a=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function s(e,t){let n=function(e){let t;if(!e)return;let n=e.match(a);if(n)return"1"===n[3]?t=!0:"0"===n[3]&&(t=!1),{traceId:n[1],parentSampled:t,parentSpanId:n[2]}}(e),s=(0,r.EN)(t),{traceId:o,parentSpanId:u,parentSampled:c}=n||{};return n?{traceId:o||(0,i.DM)(),parentSpanId:u||(0,i.DM)().substring(16),spanId:(0,i.DM)().substring(16),sampled:c,dsc:s||{}}:{traceId:o||(0,i.DM)(),spanId:(0,i.DM)().substring(16)}}function o(e=(0,i.DM)(),t=(0,i.DM)().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}},56362:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});let r="8.30.0"},58839:function(e,t,n){"use strict";n.d(t,{GLOBAL_OBJ:function(){return i},Y:function(){return a}});var r=n(56362);let i=globalThis;function a(e,t,n){let a=n||i,s=a.__SENTRY__=a.__SENTRY__||{},o=s[r.J]=s[r.J]||{};return o[e]||(o[e]=t())}},79103:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r=n(70179),i=n(34541),a=new class extends r.l{#d;#h;#f;constructor(){super(),this.#f=e=>{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#h||this.setEventListener(this.#f)}onUnsubscribe(){this.hasListeners()||(this.#h?.(),this.#h=void 0)}setEventListener(e){this.#f=e,this.#h?.(),this.#h=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#d!==e&&(this.#d=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#d?this.#d:globalThis.document?.visibilityState!=="hidden"}}},51409:function(e,t,n){"use strict";n.d(t,{R:function(){return o},m:function(){return s}});var r=n(67498),i=n(69834),a=n(22641),s=class extends i.F{#p;#i;#m;constructor(e){super(),this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#p=[],this.state=e.state||o(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#p.includes(e)||(this.#p.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#p=this.#p.filter(t=>t!==e),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#p.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#m?.continue()??this.execute(this.state.variables)}async execute(e){this.#m=(0,a.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#g({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#g({type:"pause"})},onContinue:()=>{this.#g({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let t="pending"===this.state.status,n=!this.#m.canStart();try{if(!t){this.#g({type:"pending",variables:e,isPaused:n}),await this.#i.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#g({type:"pending",context:t,variables:e,isPaused:n})}let r=await this.#m.start();return await this.#i.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#i.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#g({type:"success",data:r}),r}catch(t){try{throw await this.#i.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#g({type:"error",error:t})}}finally{this.#i.runNext(this)}}#g(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),r.V.batch(()=>{this.#p.forEach(t=>{t.onMutationUpdate(e)}),this.#i.notify({mutation:this,type:"updated",action:e})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},67498:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0),a=r=>{t?e.push(r):i(()=>{n(r)})},s=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||s()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}()},52037:function(e,t,n){"use strict";n.d(t,{N:function(){return a}});var r=n(70179),i=n(34541),a=new class extends r.l{#v=!0;#h;#f;constructor(){super(),this.#f=e=>{if(!i.sk&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#h||this.setEventListener(this.#f)}onUnsubscribe(){this.hasListeners()||(this.#h?.(),this.#h=void 0)}setEventListener(e){this.#f=e,this.#h?.(),this.#h=e(this.setOnline.bind(this))}setOnline(e){this.#v!==e&&(this.#v=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#v}}},36781:function(e,t,n){"use strict";n.d(t,{A:function(){return o},z:function(){return u}});var r=n(34541),i=n(67498),a=n(22641),s=n(69834),o=class extends s.F{#y;#_;#b;#m;#a;#w;constructor(e){super(),this.#w=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#b=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#y=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#y,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#m?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#b.remove(this)}setData(e,t){let n=(0,r.oE)(this.state.data,e,this.options);return this.#g({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#g({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#m?.promise;return this.#m?.cancel(e),t?t.then(r.ZT).catch(r.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#y)}isActive(){return this.observers.some(e=>!1!==(0,r.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,r.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#m?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#m?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#b.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#m&&(this.#w?this.#m.cancel({revert:!0}):this.#m.cancelRetry()),this.scheduleGc()),this.#b.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#g({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#m)return this.#m.continueRetry(),this.#m.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#w=!0,n.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=(0,r.cG)(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return(i(n),this.#w=!1,this.options.persister)?this.options.persister(e,n,this):e(n)}};i(s),this.options.behavior?.onFetch(s,this),this.#_=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#g({type:"fetch",meta:s.fetchOptions?.meta});let o=e=>{(0,a.DV)(e)&&e.silent||this.#g({type:"error",error:e}),(0,a.DV)(e)||(this.#b.config.onError?.(e,this),this.#b.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#m=(0,a.Mz)({initialPromise:t?.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e){o(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){o(e);return}this.#b.config.onSuccess?.(e,this),this.#b.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:o,onFail:(e,t)=>{this.#g({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#g({type:"pause"})},onContinue:()=>{this.#g({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}),this.#m.start()}#g(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...u(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if((0,a.DV)(n)&&n.revert&&this.#_)return{...this.#_,fetchStatus:"idle"};return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.V.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#b.notify({query:this,type:"updated",action:e})})}};function u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},69834:function(e,t,n){"use strict";n.d(t,{F:function(){return i}});var r=n(34541),i=class{#E;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,r.PN)(this.gcTime)&&(this.#E=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r.sk?1/0:3e5))}clearGcTimeout(){this.#E&&(clearTimeout(this.#E),this.#E=void 0)}}},22641:function(e,t,n){"use strict";n.d(t,{DV:function(){return c},Kw:function(){return o},Mz:function(){return l}});var r=n(79103),i=n(52037),a=n(34541);function s(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||i.N.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){return e instanceof u}function l(e){let t,n,c,l=!1,d=0,h=!1,f=new Promise((e,t)=>{n=e,c=t}),p=()=>r.j.isFocused()&&("always"===e.networkMode||i.N.isOnline())&&e.canRun(),m=()=>o(e.networkMode)&&e.canRun(),g=r=>{h||(h=!0,e.onSuccess?.(r),t?.(),n(r))},v=n=>{h||(h=!0,e.onError?.(n),t?.(),c(n))},y=()=>new Promise(n=>{t=e=>{(h||p())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,h||e.onContinue?.()}),_=()=>{let t;if(h)return;let n=0===d?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(g).catch(t=>{if(h)return;let n=e.retry??(a.sk?0:3),r=e.retryDelay??s,i="function"==typeof r?r(d,t):r,o=!0===n||"number"==typeof n&&d<n||"function"==typeof n&&n(d,t);if(l||!o){v(t);return}d++,e.onFail?.(d,t),(0,a._v)(i).then(()=>p()?void 0:y()).then(()=>{l?v(t):_()})})};return{promise:f,cancel:t=>{h||(v(new u(t)),e.abort?.())},continue:()=>(t?.(),f),cancelRetry:()=>{l=!0},continueRetry:()=>{l=!1},canStart:m,start:()=>(m()?_():y().then(_),f)}}},70179:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},34541:function(e,t,n){"use strict";n.d(t,{CN:function(){return k},Ht:function(){return I},KC:function(){return u},Kp:function(){return o},Nc:function(){return c},PN:function(){return s},Rm:function(){return h},SE:function(){return a},VS:function(){return m},VX:function(){return E},Wk:function(){return w},X7:function(){return d},Ym:function(){return f},ZT:function(){return i},_v:function(){return _},_x:function(){return l},cG:function(){return S},oE:function(){return b},sk:function(){return r},to:function(){return p}});var r="undefined"==typeof window||"Deno"in globalThis;function i(){}function a(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function o(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==h(s,t.options))return!1}else if(!p(t.queryKey,s))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!a||!!a(t))}function d(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(f(t.options.mutationKey)!==f(a))return!1}else if(!p(t.options.mutationKey,a))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function h(e,t){return(t?.queryKeyHashFn||f)(e)}function f(e){return JSON.stringify(e,(e,t)=>v(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function p(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!p(e[n],t[n]))}function m(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e){if(!y(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(y(n)&&n.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function y(e){return"[object Object]"===Object.prototype.toString.call(e)}function _(e){return new Promise(t=>{setTimeout(t,e)})}function b(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?function e(t,n){if(t===n)return t;let r=g(t)&&g(n);if(r||v(t)&&v(n)){let i=r?t:Object.keys(t),a=i.length,s=r?n:Object.keys(n),o=s.length,u=r?[]:{},c=0;for(let a=0;a<o;a++){let o=r?a:s[a];(!r&&i.includes(o)||r)&&void 0===t[o]&&void 0===n[o]?(u[o]=void 0,c++):(u[o]=e(t[o],n[o]),u[o]===t[o]&&void 0!==t[o]&&c++)}return a===o&&c===a?t:u}return n}(e,t):t}function w(e){return e}function E(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function I(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function S(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==k?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}},30055:function(e,t,n){"use strict";n.d(t,{NL:function(){return s},aH:function(){return o}});var r=n(18381),i=n(67168),a=r.createContext(void 0),s=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},o=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t}))},84240:function(e,t,n){"use strict";n.d(t,{S:function(){return a},u:function(){return s}});var r=n(18381),i=r.createContext(!1),a=()=>r.useContext(i),s=i.Provider},86114:function(e,t,n){"use strict";n.d(t,{ZF:function(){return r.ZF},ZR:function(){return r.ZR}});var r=n(44593);/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */(0,r.KN)("firebase","9.23.0","app")},62149:function(e,t,n){"use strict";n.d(t,{_O:function(){return eH},hJ:function(){return ez},O4:function(){return eB},gK:function(){return e9},v0:function(){return nr},e5:function(){return e0},rh:function(){return tO}});var r,i=n(21025),a=n(44593),s=n(62831),o=n(61655),u=n(85246);function c(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}let l=new i.LL("auth","Firebase",c()),d=new o.Yd("@firebase/auth");function h(e,...t){d.logLevel<=o.in.ERROR&&d.error(`Auth (${a.Jn}): ${e}`,...t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function f(e,...t){throw g(e,...t)}function p(e,...t){return g(e,...t)}function m(e,t,n){let r=Object.assign(Object.assign({},c()),{[t]:n});return new i.LL("auth","Firebase",r).create(t,{appName:e.name})}function g(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return l.create(e,...t)}function v(e,t,...n){if(!e)throw g(t,...n)}function y(e){let t="INTERNAL ASSERTION FAILED: "+e;throw h(t),Error(t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function _(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function b(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class w{constructor(e,t){var n;this.shortDelay=e,this.longDelay=t,n="Short delay should be less than long delay!",t>e||y(n),this.isMobile=(0,i.uI)()||(0,i.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===b()||"https:"===b()||(0,i.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function E(e,t){var n,r;n=e.emulator,r="Emulator should always be set here",n||y(r);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class I{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void y("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void y("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void y("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let k={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},S=new w(3e4,6e4);function T(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function O(e,t,n,r,a={}){return A(e,a,async()=>{let a={},s={};r&&("GET"===t?s=r:a={body:JSON.stringify(r)});let o=(0,i.xO)(Object.assign({key:e.config.apiKey},s)).slice(1),u=await e._getAdditionalHeaders();return u["Content-Type"]="application/json",e.languageCode&&(u["X-Firebase-Locale"]=e.languageCode),I.fetch()(P(e,e.config.apiHost,n,o),Object.assign({method:t,headers:u,referrerPolicy:"no-referrer"},a))})}async function A(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},k),t);try{let t=new R(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let a=await i.json();if("needConfirmation"in a)throw x(e,"account-exists-with-different-credential",a);if(i.ok&&!("errorMessage"in a))return a;{let[t,n]=(i.ok?a.errorMessage:a.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw x(e,"credential-already-in-use",a);if("EMAIL_EXISTS"===t)throw x(e,"email-already-in-use",a);if("USER_DISABLED"===t)throw x(e,"user-disabled",a);let s=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(n)throw m(e,s,n);f(e,s)}}catch(t){if(t instanceof i.ZR)throw t;f(e,"network-request-failed",{message:String(t)})}}async function C(e,t,n,r,i={}){let a=await O(e,t,n,r,i);return"mfaPendingCredential"in a&&f(e,"multi-factor-auth-required",{_serverResponse:a}),a}function P(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?E(e.config,i):`${e.config.apiScheme}://${i}`}class R{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(p(this.auth,"network-request-failed")),S.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function x(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=p(e,t,r);return i.customData._tokenResponse=n,i}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function N(e,t){return O(e,"POST","/v1/accounts:delete",t)}async function D(e,t){return O(e,"POST","/v1/accounts:lookup",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function L(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function j(e,t=!1){let n=(0,i.m9)(e),r=await n.getIdToken(t),a=U(r);v(a&&a.exp&&a.auth_time&&a.iat,n.auth,"internal-error");let s="object"==typeof a.firebase?a.firebase:void 0,o=null==s?void 0:s.sign_in_provider;return{claims:a,token:r,authTime:L(M(a.auth_time)),issuedAtTime:L(M(a.iat)),expirationTime:L(M(a.exp)),signInProvider:o||null,signInSecondFactor:(null==s?void 0:s.sign_in_second_factor)||null}}function M(e){return 1e3*Number(e)}function U(e){let[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return h("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,i.tV)(n);if(!e)return h("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return h("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function F(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof i.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ${constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class B{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=L(this.lastLoginAt),this.creationTime=L(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function H(e){var t;let n=e.auth,r=await e.getIdToken(),i=await F(e,D(n,{idToken:r}));v(null==i?void 0:i.users.length,n,"internal-error");let a=i.users[0];e._notifyReloadListener(a);let o=(null===(t=a.providerUserInfo)||void 0===t?void 0:t.length)?a.providerUserInfo.map(e=>{var{providerId:t}=e,n=(0,s.__rest)(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}):[],u=[...e.providerData.filter(e=>!o.some(t=>t.providerId===e.providerId)),...o],c=e.isAnonymous,l=!(e.email&&a.passwordHash)&&!(null==u?void 0:u.length);Object.assign(e,{uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:u,metadata:new B(a.createdAt,a.lastLoginAt),isAnonymous:!!c&&l})}async function z(e){let t=(0,i.m9)(e);await H(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function V(e,t){let n=await A(e,{},async()=>{let n=(0,i.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:a}=e.config,s=P(e,r,"/v1/token",`key=${a}`),o=await e._getAdditionalHeaders();return o["Content-Type"]="application/x-www-form-urlencoded",I.fetch()(s,{method:"POST",headers:o,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class q{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){v(e.idToken,"internal-error"),v(void 0!==e.idToken,"internal-error"),v(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=U(e);return v(t,"internal-error"),v(void 0!==t.exp,"internal-error"),v(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(v(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await V(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){let{refreshToken:n,accessToken:r,expirationTime:i}=t,a=new q;return n&&(v("string"==typeof n,"internal-error",{appName:e}),a.refreshToken=n),r&&(v("string"==typeof r,"internal-error",{appName:e}),a.accessToken=r),i&&(v("number"==typeof i,"internal-error",{appName:e}),a.expirationTime=i),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new q,this.toJSON())}_performRefresh(){return y("not implemented")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function G(e,t){v("string"==typeof e||void 0===e,"internal-error",{appName:t})}class W{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=(0,s.__rest)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new $(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new B(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await F(this,this.stsTokenManager.getToken(this.auth,e));return v(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return j(this,e)}reload(){return z(this)}_assign(e){this!==e&&(v(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new W(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){v(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await H(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await F(this,N(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,a,s,o,u,c;let l=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(a=t.photoURL)&&void 0!==a?a:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(o=t._redirectEventId)&&void 0!==o?o:void 0,g=null!==(u=t.createdAt)&&void 0!==u?u:void 0,y=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:_,emailVerified:b,isAnonymous:w,providerData:E,stsTokenManager:I}=t;v(_&&I,e,"internal-error");let k=q.fromJSON(this.name,I);v("string"==typeof _,e,"internal-error"),G(l,e.name),G(d,e.name),v("boolean"==typeof b,e,"internal-error"),v("boolean"==typeof w,e,"internal-error"),G(h,e.name),G(f,e.name),G(p,e.name),G(m,e.name),G(g,e.name),G(y,e.name);let S=new W({uid:_,auth:e,email:d,emailVerified:b,displayName:l,isAnonymous:w,photoURL:f,phoneNumber:h,tenantId:p,stsTokenManager:k,createdAt:g,lastLoginAt:y});return E&&Array.isArray(E)&&(S.providerData=E.map(e=>Object.assign({},e))),m&&(S._redirectEventId=m),S}static async _fromIdTokenResponse(e,t,n=!1){let r=new q;r.updateFromServerResponse(t);let i=new W({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await H(i),i}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let K=new Map;function Z(e){var t,n;t="Expected a class definition",e instanceof Function||y(t);let r=K.get(e);return r?(n="Instance stored in cache mismatched with class",r instanceof e||y(n)):(r=new e,K.set(e,r)),r}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class J{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function X(e,t,n){return`firebase:${e}:${t}:${n}`}J.type="NONE";class Y{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=X(this.userKey,r.apiKey,i),this.fullPersistenceKey=X("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?W._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new Y(Z(J),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||Z(J),a=X(n,e.config.apiKey,e.name),s=null;for(let n of t)try{let t=await n._get(a);if(t){let r=W._fromJSON(e,t);n!==i&&(s=r),i=n;break}}catch(e){}let o=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&o.length&&(i=o[0],s&&await i._set(a,s.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(a)}catch(e){}}))),new Y(i,e,n)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Q(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(er(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(ee(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ea(t))return"Blackberry";if(es(t))return"Webos";if(et(t))return"Safari";if((t.includes("chrome/")||en(t))&&!t.includes("edge/"))return"Chrome";if(ei(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function ee(e=(0,i.z$)()){return/firefox\//i.test(e)}function et(e=(0,i.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function en(e=(0,i.z$)()){return/crios\//i.test(e)}function er(e=(0,i.z$)()){return/iemobile/i.test(e)}function ei(e=(0,i.z$)()){return/android/i.test(e)}function ea(e=(0,i.z$)()){return/blackberry/i.test(e)}function es(e=(0,i.z$)()){return/webos/i.test(e)}function eo(e=(0,i.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function eu(e=(0,i.z$)()){return eo(e)||ei(e)||es(e)||ea(e)||/windows phone/i.test(e)||er(e)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ec(e,t=[]){let n;switch(e){case"Browser":n=Q((0,i.z$)());break;case"Worker":n=`${Q((0,i.z$)())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${a.Jn}/${r}`}async function el(e,t){return O(e,"GET","/v2/recaptchaConfig",T(e,t))}function ed(e){return void 0!==e&&void 0!==e.enterprise}class eh{constructor(e){if(this.siteKey="",this.emailPasswordEnabled=!1,void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.emailPasswordEnabled=e.recaptchaEnforcementState.some(e=>"EMAIL_PASSWORD_PROVIDER"===e.provider&&"OFF"!==e.enforcementState)}}function ef(e){return new Promise((t,n)=>{var r,i;let a=document.createElement("script");a.setAttribute("src",e),a.onload=t,a.onerror=e=>{let t=p("internal-error");t.customData=e,n(t)},a.type="text/javascript",a.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(a)})}function ep(e){return`__${e}${Math.floor(1e6*Math.random())}`}class em{constructor(e){this.type="recaptcha-enterprise",this.auth=e_(e)}async verify(e="verify",t=!1){async function n(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{el(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)n(Error("recaptcha Enterprise site key undefined"));else{let n=new eh(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;ed(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&ed(window.grecaptcha))r(n,e,i);else{if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}ef("https://www.google.com/recaptcha/enterprise.js?render="+n).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function eg(e,t,n,r=!1){let i;let a=new em(e);try{i=await a.verify(n)}catch(e){i=await a.verify(n,!0)}let s=Object.assign({},t);return r?Object.assign(s,{captchaResp:i}):Object.assign(s,{captchaResponse:i}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ev{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let r=e(t);n(r)}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ey{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eb(this),this.idTokenSubscription=new eb(this),this.beforeStateQueue=new ev(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=l,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Z(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await Y.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,a=null==r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);(!n||n===a)&&(null==s?void 0:s.user)&&(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(v(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await H(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){let t=e?(0,i.m9)(e):null;return t&&v(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&v(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Z(e))})}async initializeRecaptchaConfig(){let e=new eh(await el(this,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==this.tenantId?this._agentRecaptchaConfig=e:this._tenantRecaptchaConfigs[this.tenantId]=e,e.emailPasswordEnabled&&new em(this).verify()}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new i.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&Z(e)||this._popupRedirectResolver;v(t,this,"argument-error"),this.redirectPersistenceManager=await Y.create(this,[Z(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),a=this._isInitialized?Promise.resolve():this._initializationPromise;return(v(a,this,"internal-error"),a.then(()=>i(this.currentUser)),"function"==typeof t)?e.addObserver(t,n,r):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return v(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ec(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){d.logLevel<=o.in.WARN&&d.warn(`Auth (${a.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function e_(e){return(0,i.m9)(e)}class eb{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,i.ne)(e=>this.observer=e)}get next(){return v(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function ew(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eE(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eI{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return y("not implemented")}_getIdTokenResponse(e){return y("not implemented")}_linkToIdToken(e,t){return y("not implemented")}_getReauthenticationResolver(e){return y("not implemented")}}async function ek(e,t){return O(e,"POST","/v1/accounts:update",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eS(e,t){return C(e,"POST","/v1/accounts:signInWithPassword",T(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eT(e,t){return C(e,"POST","/v1/accounts:signInWithEmailLink",T(e,t))}async function eO(e,t){return C(e,"POST","/v1/accounts:signInWithEmailLink",T(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eA extends eI{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new eA(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new eA(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){var t;switch(this.signInMethod){case"password":let n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};if(null===(t=e._getRecaptchaConfig())||void 0===t||!t.emailPasswordEnabled)return eS(e,n).catch(async t=>{if("auth/missing-recaptcha-token"!==t.code)return Promise.reject(t);{console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.");let t=await eg(e,n,"signInWithPassword");return eS(e,t)}});{let t=await eg(e,n,"signInWithPassword");return eS(e,t)}case"emailLink":return eT(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return ek(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return eO(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eC(e,t){return C(e,"POST","/v1/accounts:signInWithIdp",T(e,t))}class eP extends eI{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eP(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):f("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=(0,s.__rest)(t,["providerId","signInMethod"]);if(!n||!r)return null;let a=new eP(n,r);return a.idToken=i.idToken||void 0,a.accessToken=i.accessToken||void 0,a.secret=i.secret,a.nonce=i.nonce,a.pendingToken=i.pendingToken||null,a}_getIdTokenResponse(e){return eC(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eC(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eC(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,i.xO)(t)}return e}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eR(e,t){return O(e,"POST","/v1/accounts:sendVerificationCode",T(e,t))}async function ex(e,t){return C(e,"POST","/v1/accounts:signInWithPhoneNumber",T(e,t))}async function eN(e,t){let n=await C(e,"POST","/v1/accounts:signInWithPhoneNumber",T(e,t));if(n.temporaryProof)throw x(e,"account-exists-with-different-credential",n);return n}let eD={USER_NOT_FOUND:"user-not-found"};async function eL(e,t){return C(e,"POST","/v1/accounts:signInWithPhoneNumber",T(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eD)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ej extends eI{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new ej({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new ej({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return ex(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return eN(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eL(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new ej({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eM{constructor(e){var t,n,r,a,s,o;let u=(0,i.zd)((0,i.pd)(e)),c=null!==(t=u.apiKey)&&void 0!==t?t:null,l=null!==(n=u.oobCode)&&void 0!==n?n:null,d=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=u.mode)&&void 0!==r?r:null);v(c&&l&&d,"argument-error"),this.apiKey=c,this.operation=d,this.code=l,this.continueUrl=null!==(a=u.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(s=u.languageCode)&&void 0!==s?s:null,this.tenantId=null!==(o=u.tenantId)&&void 0!==o?o:null}static parseLink(e){let t=function(e){let t=(0,i.zd)((0,i.pd)(e)).link,n=t?(0,i.zd)((0,i.pd)(t)).deep_link_id:null,r=(0,i.zd)((0,i.pd)(e)).deep_link_id;return(r?(0,i.zd)((0,i.pd)(r)).link:null)||r||n||t||e}(e);try{return new eM(t)}catch(e){return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eU{constructor(){this.providerId=eU.PROVIDER_ID}static credential(e,t){return eA._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eM.parseLink(t);return v(n,"argument-error"),eA._fromEmailAndCode(e,n.code,n.tenantId)}}eU.PROVIDER_ID="password",eU.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eU.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eF{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e$ extends eF{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class eB extends e${static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return v("providerId"in t&&"signInMethod"in t,"argument-error"),eP._fromParams(t)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return v(e.idToken||e.accessToken,"argument-error"),eP._fromParams(Object.assign(Object.assign({},e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return eB.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return eB.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n,oauthTokenSecret:r,pendingToken:i,nonce:a,providerId:s}=e;if(!n&&!r&&!t&&!i||!s)return null;try{return new eB(s)._credential({idToken:t,accessToken:n,nonce:a,pendingToken:i})}catch(e){return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eH extends e${constructor(){super("facebook.com")}static credential(e){return eP._fromParams({providerId:eH.PROVIDER_ID,signInMethod:eH.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eH.credentialFromTaggedObject(e)}static credentialFromError(e){return eH.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eH.credential(e.oauthAccessToken)}catch(e){return null}}}eH.FACEBOOK_SIGN_IN_METHOD="facebook.com",eH.PROVIDER_ID="facebook.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ez extends e${constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eP._fromParams({providerId:ez.PROVIDER_ID,signInMethod:ez.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return ez.credentialFromTaggedObject(e)}static credentialFromError(e){return ez.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return ez.credential(t,n)}catch(e){return null}}}ez.GOOGLE_SIGN_IN_METHOD="google.com",ez.PROVIDER_ID="google.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eV extends e${constructor(){super("github.com")}static credential(e){return eP._fromParams({providerId:eV.PROVIDER_ID,signInMethod:eV.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eV.credentialFromTaggedObject(e)}static credentialFromError(e){return eV.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eV.credential(e.oauthAccessToken)}catch(e){return null}}}eV.GITHUB_SIGN_IN_METHOD="github.com",eV.PROVIDER_ID="github.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eq extends e${constructor(){super("twitter.com")}static credential(e,t){return eP._fromParams({providerId:eq.PROVIDER_ID,signInMethod:eq.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eq.credentialFromTaggedObject(e)}static credentialFromError(e){return eq.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return eq.credential(t,n)}catch(e){return null}}}eq.TWITTER_SIGN_IN_METHOD="twitter.com",eq.PROVIDER_ID="twitter.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eG{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){return new eG({user:await W._fromIdTokenResponse(e,n,r),providerId:eW(n),_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){return await e._updateTokensIfNecessary(n,!0),new eG({user:e,providerId:eW(n),_tokenResponse:n,operationType:t})}}function eW(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class eK extends i.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,eK.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new eK(e,t,n,r)}}function eZ(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw eK._fromErrorAndOperation(e,n,t,r);throw n})}async function eJ(e,t,n=!1){let r=await F(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return eG._forOperation(e,"link",r)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eX(e,t,n=!1){let{auth:r}=e,i="reauthenticate";try{let a=await F(e,eZ(r,i,t,e),n);v(a.idToken,r,"internal-error");let s=U(a.idToken);v(s,r,"internal-error");let{sub:o}=s;return v(e.uid===o,r,"user-mismatch"),eG._forOperation(e,i,a)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&f(r,"user-mismatch"),e}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function eY(e,t,n=!1){let r="signIn",i=await eZ(e,r,t),a=await eG._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(a.user),a}async function eQ(e,t){return eY(e_(e),t)}function e0(e,t,n){return eQ((0,i.m9)(e),eU.credential(t,n))}class e1{constructor(e,t,n={}){this.isNewUser=e,this.providerId=t,this.profile=n}}class e2 extends e1{constructor(e,t,n,r){super(e,t,n),this.username=r}}class e3 extends e1{constructor(e,t){super(e,"facebook.com",t)}}class e4 extends e2{constructor(e,t){super(e,"github.com",t,"string"==typeof(null==t?void 0:t.login)?null==t?void 0:t.login:null)}}class e5 extends e1{constructor(e,t){super(e,"google.com",t)}}class e6 extends e2{constructor(e,t,n){super(e,"twitter.com",t,n)}}function e9(e){let{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){var t,n;if(!e)return null;let{providerId:r}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},a=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null==e?void 0:e.idToken)){let r=null===(n=null===(t=U(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(r)return new e1(a,"anonymous"!==r&&"custom"!==r?r:null)}if(!r)return null;switch(r){case"facebook.com":return new e3(a,i);case"github.com":return new e4(a,i);case"google.com":return new e5(a,i);case"twitter.com":return new e6(a,i,e.screenName||null);case"custom":case"anonymous":return new e1(a,null);default:return new e1(a,r,i)}}(n)}new WeakMap;let e8="__sak";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class e7{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(e8,"1"),this.storage.removeItem(e8),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class te extends e7{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(){let e=(0,i.z$)();return et(e)||eo(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=eu(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},a=this.storage.getItem(n);(0,i.w1)()&&10===document.documentMode&&a!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}te.type="LOCAL";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tt extends e7{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}tt.type="SESSION";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tn{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new tn(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:n,data:r}=e.data,i=this.handlersMap[n];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:n});let a=Array.from(i).map(async t=>t(e.origin,r)),s=await Promise.all(a.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:n,response:s})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function tr(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}tn.receivers=[];/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ti{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){let r,i;let a="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!a)throw Error("connection_unavailable");return new Promise((s,o)=>{let u=tr("",20);a.port1.start();let c=setTimeout(()=>{o(Error("unsupported_event"))},n);i={messageChannel:a,onMessage(e){if(e.data.eventId===u)switch(e.data.status){case"ack":clearTimeout(c),r=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(r),s(e.data.response);break;default:clearTimeout(c),clearTimeout(r),o(Error("invalid_response"))}}},this.handlers.add(i),a.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:u,data:t},[a.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ta(){return window}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function ts(){return void 0!==ta().WorkerGlobalScope&&"function"==typeof ta().importScripts}async function to(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let tu="firebaseLocalStorageDb",tc="firebaseLocalStorage",tl="fbase_key";class td{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function th(e,t){return e.transaction([tc],t?"readwrite":"readonly").objectStore(tc)}function tf(){let e=indexedDB.open(tu,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(tc,{keyPath:tl})}catch(e){n(e)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(tc)?t(n):(n.close(),await new td(indexedDB.deleteDatabase(tu)).toPromise(),t(await tf()))})})}async function tp(e,t,n){return new td(th(e,!0).put({[tl]:t,value:n})).toPromise()}async function tm(e,t){let n=th(e,!1).get(t),r=await new td(n).toPromise();return void 0===r?null:r.value}function tg(e,t){return new td(th(e,!0).delete(t)).toPromise()}class tv{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await tf()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ts()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=tn._getInstance(ts()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await to(),!this.activeServiceWorker)return;this.sender=new ti(this.activeServiceWorker);let n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await tf();return await tp(e,e8,"1"),await tg(e,e8),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>tp(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tm(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>tg(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new td(th(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}async function ty(e,t,n){var r,i,a;let s=await n.verify();try{let o;if(v("string"==typeof s,e,"argument-error"),v("recaptcha"===n.type,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){let t=o.session;if("phoneNumber"in o)return v("enroll"===t.type,e,"internal-error"),(await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:s}},O(e,"POST","/v2/accounts/mfaEnrollment:start",T(e,i)))).phoneSessionInfo.sessionInfo;{v("signin"===t.type,e,"internal-error");let n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;return v(n,e,"missing-multi-factor-info"),(await (a={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:s}},O(e,"POST","/v2/accounts/mfaSignIn:start",T(e,a)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eR(e,{phoneNumber:o.phoneNumber,recaptchaToken:s});return t}}finally{n._reset()}}tv.type="LOCAL",ep("rcb"),new w(3e4,6e4);/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class t_{constructor(e){this.providerId=t_.PROVIDER_ID,this.auth=e_(e)}verifyPhoneNumber(e,t){return ty(this.auth,e,(0,i.m9)(t))}static credential(e,t){return ej._fromVerification(e,t)}static credentialFromResult(e){return t_.credentialFromTaggedObject(e)}static credentialFromError(e){return t_.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?ej._fromTokenResponse(t,n):null}}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function tb(e,t){return t?Z(t):(v(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}t_.PROVIDER_ID="phone",t_.PHONE_SIGN_IN_METHOD="phone";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tw extends eI{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eC(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eC(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eC(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function tE(e){return eY(e.auth,new tw(e),e.bypassAuthState)}function tI(e){let{auth:t,user:n}=e;return v(n,t,"internal-error"),eX(n,new tw(e),e.bypassAuthState)}async function tk(e){let{auth:t,user:n}=e;return v(n,t,"internal-error"),eJ(n,new tw(e),e.bypassAuthState)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class tS{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:a,type:s}=e;if(a){this.reject(a);return}let o={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tE;case"linkViaPopup":case"linkViaRedirect":return tk;case"reauthViaPopup":case"reauthViaRedirect":return tI;default:f(this.auth,"internal-error")}}resolve(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||y(n),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||y(n),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let tT=new w(2e3,1e4);async function tO(e,t,n){let r=e_(e);!function(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&f(e,"argument-error"),m(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}(e,t,eF);let i=tb(r,n);return new tA(r,"signInViaPopup",t,i).executeNotNull()}class tA extends tS{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,tA.currentPopupAction&&tA.currentPopupAction.cancel(),tA.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return v(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||y(t);let n=tr();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],n),this.authWindow.associatedEvent=n,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(p(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(p(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tA.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(p(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,tT.get())};e()}}tA.currentPopupAction=null;let tC=new Map;class tP extends tS{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=tC.get(this.auth._key());if(!e){try{let t=await tR(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}tC.set(this.auth._key(),e)}return this.bypassAuthState||tC.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tR(e,t){let n=X("pendingRedirect",t.config.apiKey,t.name),r=Z(e._redirectPersistence);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function tx(e,t){tC.set(e._key(),t)}async function tN(e,t,n=!1){let r=e_(e),i=tb(r,t),a=new tP(r,i,n),s=await a.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}class tD{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tj(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!tj(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(p(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(tL(e))}saveEventToCache(e){this.cachedEventUids.add(tL(e)),this.lastProcessedEventTime=Date.now()}}function tL(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tj({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tM(e,t={}){return O(e,"GET","/v1/projects",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let tU=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tF=/^https?/;async function t$(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tM(e);for(let e of t)try{if(function(e){let t=_(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!tF.test(n))return!1;if(tU.test(e))return r===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}(e))return}catch(e){}f(e,"unauthorized-domain")}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let tB=new w(3e4,6e4);function tH(){let e=ta().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let tz=null,tV=new w(5e3,15e3),tq={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},tG=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function tW(e){let t=await (tz=tz||new Promise((t,n)=>{var r,i,a;function s(){tH(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{tH(),n(p(e,"network-request-failed"))},timeout:tB.get()})}if(null===(i=null===(r=ta().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(a=ta().gapi)||void 0===a?void 0:a.load)s();else{let t=ep("iframefcb");return ta()[t]=()=>{gapi.load?s():n(p(e,"network-request-failed"))},ef(`https://apis.google.com/js/api.js?onload=${t}`).catch(e=>n(e))}}).catch(e=>{throw tz=null,e})),n=ta().gapi;return v(n,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;v(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?E(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:a.Jn},s=tG.get(e.config.apiHost);s&&(r.eid=s);let o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${(0,i.xO)(r).slice(1)}`}(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tq,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=p(e,"network-request-failed"),a=ta().setTimeout(()=>{r(i)},tV.get());function s(){ta().clearTimeout(a),n(t)}t.ping(s).then(s,()=>{r(i)})}))}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let tK={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class tZ{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let tJ=encodeURIComponent("fac");async function tX(e,t,n,r,s,o){v(e.config.authDomain,e,"auth-domain-config-required"),v(e.config.apiKey,e,"invalid-api-key");let u={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:a.Jn,eventId:s};if(t instanceof eF)for(let[n,r]of(t.setDefaultLanguage(e.languageCode),u.providerId=t.providerId||"",(0,i.xb)(t.getCustomParameters())||(u.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(o||{})))u[n]=r;if(t instanceof e$){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(u.scopes=e.join(","))}for(let t of(e.tenantId&&(u.tid=e.tenantId),Object.keys(u)))void 0===u[t]&&delete u[t];let c=await e._getAppCheckToken(),l=c?`#${tJ}=${encodeURIComponent(c)}`:"";return`${function({config:e}){return e.emulator?E(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,i.xO)(u).slice(1)}${l}`}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let tY="webStorageSupport";class tQ{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=tt,this._completeRedirectFn=tN,this._overrideRedirectResult=tx}async _openPopup(e,t,n,r){var a,s,o;s=null===(a=this.eventManagers[e._key()])||void 0===a?void 0:a.manager,o="_initialize() not called before _openPopup()",s||y(o);let u=await tX(e,t,n,_(),r);return function(e,t,n,r=500,a=600){let s=Math.max((window.screen.availHeight-a)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),u="",c=Object.assign(Object.assign({},tK),{width:r.toString(),height:a.toString(),top:s,left:o}),l=(0,i.z$)().toLowerCase();n&&(u=en(l)?"_blank":n),ee(l)&&(t=t||"http://localhost",c.scrollbars="yes");let d=Object.entries(c).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=(0,i.z$)()){var t;return eo(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==u)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",u),new tZ(null);let h=window.open(t||"",u,d);v(h,e,"popup-blocked");try{h.focus()}catch(e){}return new tZ(h)}(e,u,tr())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=await tX(e,t,n,_(),r),ta().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var n;let{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(n="If manager is not set, promise should be",r||y(n),r)}let r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){let t=await tW(e),n=new tD(e);return t.register("authEvent",t=>(v(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(tY,{type:tY},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[tY];void 0!==i&&t(!!i),f(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=t$(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eu()||et()||eo()}}class t0{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return y("unexpected MultiFactorSessionType")}}}class t1 extends t0{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new t1(e)}_finalizeEnroll(e,t,n){return O(e,"POST","/v2/accounts/mfaEnrollment:finalize",T(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return O(e,"POST","/v2/accounts/mfaSignIn:finalize",T(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class t2{constructor(){}static assertion(e){return t1._fromCredential(e)}}t2.FACTOR_ID="phone";class t3{static assertionForEnrollment(e,t){return t4._fromSecret(e,t)}static assertionForSignIn(e,t){return t4._fromEnrollmentId(e,t)}static async generateSecret(e){var t;v(void 0!==e.auth,"internal-error");let n=await O(t=e.auth,"POST","/v2/accounts/mfaEnrollment:start",T(t,{idToken:e.credential,totpEnrollmentInfo:{}}));return t5._fromStartTotpMfaEnrollmentResponse(n,e.auth)}}t3.FACTOR_ID="totp";class t4 extends t0{constructor(e,t,n){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(e,t){return new t4(t,void 0,e)}static _fromEnrollmentId(e,t){return new t4(t,e)}async _finalizeEnroll(e,t,n){return v(void 0!==this.secret,e,"argument-error"),O(e,"POST","/v2/accounts/mfaEnrollment:finalize",T(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){v(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let n={verificationCode:this.otp};return O(e,"POST","/v2/accounts/mfaSignIn:finalize",T(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n}))}}class t5{constructor(e,t,n,r,i,a,s){this.sessionInfo=a,this.auth=s,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new t5(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var n;let r=!1;return(t6(e)||t6(t))&&(r=!0),r&&(t6(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),t6(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function t6(e){return void 0===e||(null==e?void 0:e.length)===0}var t9="@firebase/auth",t8="0.23.2";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class t7{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){v(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let ne=(0,i.Pz)("authIdTokenMaxAge")||300,nt=null,nn=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>ne)return;let i=null==n?void 0:n.token;nt!==i&&(nt=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function nr(e=(0,a.Mq)()){let t=(0,a.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let n=/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e,t){let n=(0,a.qX)(e,"auth");if(n.isInitialized()){let e=n.getImmediate(),r=n.getOptions();if((0,i.vZ)(r,null!=t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:tQ,persistence:[tv,te,tt]}),r=(0,i.Pz)("authTokenSyncURL");if(r){var s,o;let e=nn(r);s=()=>e(n.currentUser),(0,i.m9)(n).beforeAuthStateChanged(e,s),o=t=>e(t),(0,i.m9)(n).onIdTokenChanged(o,void 0,void 0)}let u=(0,i.q4)("auth");return u&&function(e,t,n){let r=e_(e);v(r._canInitEmulator,r,"emulator-config-failed"),v(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=ew(t),{host:a,port:s}=function(e){let t=ew(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:eE(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:eE(t)}}}(t),o=null===s?"":`:${s}`;r.config.emulator={url:`${i}//${a}${o}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:s,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:!1})}),function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}(n,`http://${u}`),n}r="Browser",(0,a.Xd)(new u.wA("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),{apiKey:s,authDomain:o}=n.options;v(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});let u=new ey(n,i,a,{apiKey:s,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ec(r)});return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Z);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(u,t),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),(0,a.Xd)(new u.wA("auth-internal",e=>new t7(e_(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,a.KN)(t9,t8,/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(r)),(0,a.KN)(t9,t8,"esm2017")},28543:function(e,t,n){"use strict";let r,i,a;n.r(t),n.d(t,{deleteDB:function(){return g},openDB:function(){return m},unwrap:function(){return p},wrap:function(){return f}});let s=(e,t)=>t.some(t=>e instanceof t),o=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,d=new WeakMap,h={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return u.get(e);if("objectStoreNames"===t)return e.objectStoreNames||c.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return f(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function f(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(f(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)});return t.then(t=>{t instanceof IDBCursor&&o.set(t,e)}).catch(()=>{}),d.set(t,e),t}(e);if(l.has(e))return l.get(e);let n="function"==typeof(t=e)?t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(p(this),e),f(o.get(this))}:function(...e){return f(t.apply(p(this),e))}:function(e,...n){let r=t.call(p(this),e,...n);return c.set(r,e.sort?e.sort():[e]),f(r)}:(t instanceof IDBTransaction&&function(e){if(u.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});u.set(e,t)}(t),s(t,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,h):t;return n!==e&&(l.set(e,n),d.set(n,e)),n}let p=e=>d.get(e);function m(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){let s=indexedDB.open(e,t),o=f(s);return r&&s.addEventListener("upgradeneeded",e=>{r(f(s.result),e.oldVersion,e.newVersion,f(s.transaction),e)}),n&&s.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),o.then(e=>{a&&e.addEventListener("close",()=>a()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),o}function g(e,{blocked:t}={}){let n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",e=>t(e.oldVersion,e)),f(n).then(()=>void 0)}let v=["get","getKey","getAll","getAllKeys","count"],y=["put","add","delete","clear"],_=new Map;function b(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(_.get(t))return _.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=y.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||v.includes(n)))return;let a=async function(e,...t){let a=this.transaction(e,i?"readwrite":"readonly"),s=a.store;return r&&(s=s.index(t.shift())),(await Promise.all([s[n](...t),i&&a.done]))[0]};return _.set(t,a),a}h={...a=h,get:(e,t,n)=>b(e,t)||a.get(e,t,n),has:(e,t)=>!!b(e,t)||a.has(e,t)}},62831:function(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:function(){return D},__assign:function(){return a},__asyncDelegator:function(){return S},__asyncGenerator:function(){return k},__asyncValues:function(){return T},__await:function(){return I},__awaiter:function(){return p},__classPrivateFieldGet:function(){return R},__classPrivateFieldIn:function(){return N},__classPrivateFieldSet:function(){return x},__createBinding:function(){return g},__decorate:function(){return o},__disposeResources:function(){return j},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return i},__generator:function(){return m},__importDefault:function(){return P},__importStar:function(){return C},__makeTemplateObject:function(){return O},__metadata:function(){return f},__param:function(){return u},__propKey:function(){return d},__read:function(){return _},__rest:function(){return s},__runInitializers:function(){return l},__setFunctionName:function(){return h},__spread:function(){return b},__spreadArray:function(){return E},__spreadArrays:function(){return w},__values:function(){return y}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function o(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var o,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),h=!1,f=n.length-1;f>=0;f--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var g=(0,n[f])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(o=s(g.get))&&(d.get=o),(o=s(g.set))&&(d.set=o),(o=s(g.init))&&i.unshift(o)}else(o=s(g))&&("field"===u?i.unshift(o):d[c]=o)}l&&Object.defineProperty(l,r.name,d),h=!0}function l(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function h(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}u((r=r.apply(e,t||[])).next())})}function m(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)r[i]=a[s];return r}function E(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function I(e){return this instanceof I?(this.v=e,this):new I(e)}function k(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||o(e,t)})},t&&(r[e]=t(r[e])))}function o(e,t){try{var n;(n=i[e](t)).value instanceof I?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(e){l(a[0][3],e)}}function u(e){o("next",e)}function c(e){o("throw",e)}function l(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:I(e[r](t)),done:!1}:i?i(t):t}:i}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,i,(t=e[n](t)).done,t.value)})}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var A=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return A(t,e),t}function P(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function x(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function D(e,t,n){if(null!=t){var r,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(n){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var L="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function j(e){function t(t){e.error=e.hasError?new L(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function i(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(e){return t(e),i()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:a,__rest:s,__decorate:o,__param:u,__metadata:f,__awaiter:p,__generator:m,__createBinding:g,__exportStar:v,__values:y,__read:_,__spread:b,__spreadArrays:w,__spreadArray:E,__await:I,__asyncGenerator:k,__asyncDelegator:S,__asyncValues:T,__makeTemplateObject:O,__importStar:C,__importDefault:P,__classPrivateFieldGet:R,__classPrivateFieldSet:x,__classPrivateFieldIn:N,__addDisposableResource:D,__disposeResources:j}},39326:function(e,t,n){"use strict";let r;n.d(t,{z:function(){return to}}),(e8=tt||(tt={})).assertEqual=e=>e,e8.assertIs=function(e){},e8.assertNever=function(e){throw Error()},e8.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e8.getValidEnumValues=e=>{let t=e8.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return e8.objectValues(n)},e8.objectValues=e=>e8.objectKeys(e).map(function(t){return e[t]}),e8.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e8.find=(e,t)=>{for(let n of e)if(t(n))return n},e8.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e8.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e8.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(tn||(tn={})).mergeShapes=(e,t)=>({...e,...t});let i=tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),a=e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":if(Array.isArray(e))return i.array;if(null===e)return i.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return i.promise;if("undefined"!=typeof Map&&e instanceof Map)return i.map;if("undefined"!=typeof Set&&e instanceof Set)return i.set;if("undefined"!=typeof Date&&e instanceof Date)return i.date;return i.object;default:return i.unknown}},s=tt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof o))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,tt.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>new o(e);let u=(e,t)=>{let n;switch(e.code){case s.invalid_type:n=e.received===i.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case s.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,tt.jsonStringifyReplacer)}`;break;case s.unrecognized_keys:n=`Unrecognized key(s) in object: ${tt.joinValues(e.keys,", ")}`;break;case s.invalid_union:n="Invalid input";break;case s.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${tt.joinValues(e.options)}`;break;case s.invalid_enum_value:n=`Invalid enum value. Expected ${tt.joinValues(e.options)}, received '${e.received}'`;break;case s.invalid_arguments:n="Invalid function arguments";break;case s.invalid_return_type:n="Invalid function return type";break;case s.invalid_date:n="Invalid date";break;case s.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:tt.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case s.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case s.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case s.custom:n="Invalid input";break;case s.invalid_intersection_types:n="Intersection results could not be merged";break;case s.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case s.not_finite:n="Number must be finite";break;default:n=t.defaultError,tt.assertNever(e)}return{message:n}},c=u;function l(){return c}let d=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of r.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function h(e,t){let n=l(),r=d({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===u?void 0:u].filter(e=>!!e)});e.common.issues.push(r)}class f{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return p;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return f.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return p;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let p=Object.freeze({status:"aborted"}),m=e=>({status:"dirty",value:e}),g=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,y=e=>"dirty"===e.status,_=e=>"valid"===e.status,b=e=>"undefined"!=typeof Promise&&e instanceof Promise;function w(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function E(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError,(e7=tr||(tr={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},e7.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class I{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let k=(e,t)=>{if(_(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new o(e.common.issues);return this._error=t,this._error}}};function S(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var a,s;let{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:i.defaultError}:void 0===i.data?{message:null!==(a=null!=o?o:r)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(s=null!=o?o:n)&&void 0!==s?s:i.defaultError}},description:i}}class T{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return a(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:a(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f,ctx:{common:e.parent.common,data:e.data,parsedType:a(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(b(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:a(e)},i=this._parseSync({data:e,path:r.path,parent:r});return k(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:a(e)},r=this._parse({data:e,path:n.path,parent:n});return k(n,await (b(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:s.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new eg({schema:this,typeName:ts.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ev.create(this,this._def)}nullable(){return ey.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Q.create(this,this._def)}promise(){return em.create(this,this._def)}or(e){return et.create([this,e],this._def)}and(e){return ei.create(this,e,this._def)}transform(e){return new eg({...S(this._def),schema:this,typeName:ts.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new e_({...S(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:ts.ZodDefault})}brand(){return new eI({typeName:ts.ZodBranded,type:this,...S(this._def)})}catch(e){return new eb({...S(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:ts.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return ek.create(this,e)}readonly(){return eS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let O=/^c[^\s-]{8,}$/i,A=/^[0-9a-z]+$/,C=/^[0-9A-HJKMNP-TV-Z]{26}$/,P=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,R=/^[a-z0-9_-]{21}$/i,x=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,N=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,D=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,L=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,j=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",U=RegExp(`^${M}$`);function F(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function $(e){let t=`${M}T${F(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)}class B extends T{_parse(e){var t,n;let a;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.string){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.string,received:t.parsedType}),p}let o=new f;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(h(a=this._getOrReturnCtx(e,a),{code:s.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if("max"===i.kind)e.data.length>i.value&&(h(a=this._getOrReturnCtx(e,a),{code:s.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if("length"===i.kind){let t=e.data.length>i.value,n=e.data.length<i.value;(t||n)&&(a=this._getOrReturnCtx(e,a),t?h(a,{code:s.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):n&&h(a,{code:s.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if("email"===i.kind)N.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"email",code:s.invalid_string,message:i.message}),o.dirty());else if("emoji"===i.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"emoji",code:s.invalid_string,message:i.message}),o.dirty());else if("uuid"===i.kind)P.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"uuid",code:s.invalid_string,message:i.message}),o.dirty());else if("nanoid"===i.kind)R.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"nanoid",code:s.invalid_string,message:i.message}),o.dirty());else if("cuid"===i.kind)O.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"cuid",code:s.invalid_string,message:i.message}),o.dirty());else if("cuid2"===i.kind)A.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"cuid2",code:s.invalid_string,message:i.message}),o.dirty());else if("ulid"===i.kind)C.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"ulid",code:s.invalid_string,message:i.message}),o.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(t){h(a=this._getOrReturnCtx(e,a),{validation:"url",code:s.invalid_string,message:i.message}),o.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"regex",code:s.invalid_string,message:i.message}),o.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(h(a=this._getOrReturnCtx(e,a),{code:s.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(h(a=this._getOrReturnCtx(e,a),{code:s.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(h(a=this._getOrReturnCtx(e,a),{code:s.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):"datetime"===i.kind?$(i).test(e.data)||(h(a=this._getOrReturnCtx(e,a),{code:s.invalid_string,validation:"datetime",message:i.message}),o.dirty()):"date"===i.kind?U.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{code:s.invalid_string,validation:"date",message:i.message}),o.dirty()):"time"===i.kind?RegExp(`^${F(i)}$`).test(e.data)||(h(a=this._getOrReturnCtx(e,a),{code:s.invalid_string,validation:"time",message:i.message}),o.dirty()):"duration"===i.kind?x.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"duration",code:s.invalid_string,message:i.message}),o.dirty()):"ip"===i.kind?(t=e.data,("v4"===(n=i.version)||!n)&&D.test(t)||("v6"===n||!n)&&L.test(t)||(h(a=this._getOrReturnCtx(e,a),{validation:"ip",code:s.invalid_string,message:i.message}),o.dirty())):"base64"===i.kind?j.test(e.data)||(h(a=this._getOrReturnCtx(e,a),{validation:"base64",code:s.invalid_string,message:i.message}),o.dirty()):tt.assertNever(i);return{status:o.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:s.invalid_string,...tr.errToObj(n)})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...tr.errToObj(e)})}url(e){return this._addCheck({kind:"url",...tr.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...tr.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...tr.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...tr.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...tr.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...tr.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...tr.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...tr.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...tr.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...tr.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...tr.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...tr.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...tr.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...tr.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...tr.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...tr.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...tr.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...tr.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...tr.errToObj(t)})}nonempty(e){return this.min(1,tr.errToObj(e))}trim(){return new B({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new B({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new B({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}B.create=e=>{var t;return new B({checks:[],typeName:ts.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...S(e)})};class H extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.number){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.number,received:t.parsedType}),p}let n=new f;for(let r of this._def.checks)"int"===r.kind?tt.isInteger(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:s.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(h(t=this._getOrReturnCtx(e,t),{code:s.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(h(t=this._getOrReturnCtx(e,t),{code:s.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(h(t=this._getOrReturnCtx(e,t),{code:s.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:s.not_finite,message:r.message}),n.dirty()):tt.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tr.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tr.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tr.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tr.toString(t))}setLimit(e,t,n,r){return new H({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:tr.toString(r)}]})}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:tr.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:tr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:tr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:tr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:tr.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tr.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:tr.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:tr.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:tr.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&tt.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}H.create=e=>new H({checks:[],typeName:ts.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...S(e)});class z extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==i.bigint){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.bigint,received:t.parsedType}),p}let n=new f;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(h(t=this._getOrReturnCtx(e,t),{code:s.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(h(t=this._getOrReturnCtx(e,t),{code:s.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(h(t=this._getOrReturnCtx(e,t),{code:s.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):tt.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,tr.toString(t))}gt(e,t){return this.setLimit("min",e,!1,tr.toString(t))}lte(e,t){return this.setLimit("max",e,!0,tr.toString(t))}lt(e,t){return this.setLimit("max",e,!1,tr.toString(t))}setLimit(e,t,n,r){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:tr.toString(r)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:tr.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:tr.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:tr.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:tr.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:tr.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}z.create=e=>{var t;return new z({checks:[],typeName:ts.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...S(e)})};class V extends T{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==i.boolean){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.boolean,received:t.parsedType}),p}return g(e.data)}}V.create=e=>new V({typeName:ts.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...S(e)});class q extends T{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.date){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.date,received:t.parsedType}),p}if(isNaN(e.data.getTime()))return h(this._getOrReturnCtx(e),{code:s.invalid_date}),p;let n=new f;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(h(t=this._getOrReturnCtx(e,t),{code:s.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(h(t=this._getOrReturnCtx(e,t),{code:s.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):tt.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:tr.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:tr.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}q.create=e=>new q({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ts.ZodDate,...S(e)});class G extends T{_parse(e){if(this._getType(e)!==i.symbol){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.symbol,received:t.parsedType}),p}return g(e.data)}}G.create=e=>new G({typeName:ts.ZodSymbol,...S(e)});class W extends T{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.undefined,received:t.parsedType}),p}return g(e.data)}}W.create=e=>new W({typeName:ts.ZodUndefined,...S(e)});class K extends T{_parse(e){if(this._getType(e)!==i.null){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.null,received:t.parsedType}),p}return g(e.data)}}K.create=e=>new K({typeName:ts.ZodNull,...S(e)});class Z extends T{constructor(){super(...arguments),this._any=!0}_parse(e){return g(e.data)}}Z.create=e=>new Z({typeName:ts.ZodAny,...S(e)});class J extends T{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g(e.data)}}J.create=e=>new J({typeName:ts.ZodUnknown,...S(e)});class X extends T{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.never,received:t.parsedType}),p}}X.create=e=>new X({typeName:ts.ZodNever,...S(e)});class Y extends T{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.void,received:t.parsedType}),p}return g(e.data)}}Y.create=e=>new Y({typeName:ts.ZodVoid,...S(e)});class Q extends T{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==i.array)return h(t,{code:s.invalid_type,expected:i.array,received:t.parsedType}),p;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(h(t,{code:e?s.too_big:s.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(h(t,{code:s.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(h(t,{code:s.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new I(t,e,t.path,n)))).then(e=>f.mergeArray(n,e));let a=[...t.data].map((e,n)=>r.type._parseSync(new I(t,e,t.path,n)));return f.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new Q({...this._def,minLength:{value:e,message:tr.toString(t)}})}max(e,t){return new Q({...this._def,maxLength:{value:e,message:tr.toString(t)}})}length(e,t){return new Q({...this._def,exactLength:{value:e,message:tr.toString(t)}})}nonempty(e){return this.min(1,e)}}Q.create=(e,t)=>new Q({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ts.ZodArray,...S(t)});class ee extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=tt.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.object){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.object,received:t.parsedType}),p}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof X&&"strip"===this._def.unknownKeys))for(let e in n.data)a.includes(e)||o.push(e);let u=[];for(let e of a){let t=r[e],i=n.data[e];u.push({key:{status:"valid",value:e},value:t._parse(new I(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof X){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)u.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&(h(n,{code:s.unrecognized_keys,keys:o}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let r=n.data[t];u.push({key:{status:"valid",value:t},value:e._parse(new I(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of u){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>f.mergeObjectSync(t,e)):f.mergeObjectSync(t,u)}get shape(){return this._def.shape()}strict(e){return tr.errToObj,new ee({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,s;let o=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=tr.errToObj(e).message)&&void 0!==s?s:o}:{message:o}}}:{}})}strip(){return new ee({...this._def,unknownKeys:"strip"})}passthrough(){return new ee({...this._def,unknownKeys:"passthrough"})}extend(e){return new ee({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ee({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ts.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ee({...this._def,catchall:e})}pick(e){let t={};return tt.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new ee({...this._def,shape:()=>t})}omit(e){let t={};return tt.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new ee({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ee){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=ev.create(e(i))}return new ee({...t._def,shape:()=>n})}return t instanceof Q?new Q({...t._def,type:e(t.element)}):t instanceof ev?ev.create(e(t.unwrap())):t instanceof ey?ey.create(e(t.unwrap())):t instanceof ea?ea.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return tt.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new ee({...this._def,shape:()=>t})}required(e){let t={};return tt.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ev;)e=e._def.innerType;t[n]=e}}),new ee({...this._def,shape:()=>t})}keyof(){return eh(tt.objectKeys(this.shape))}}ee.create=(e,t)=>new ee({shape:()=>e,unknownKeys:"strip",catchall:X.create(),typeName:ts.ZodObject,...S(t)}),ee.strictCreate=(e,t)=>new ee({shape:()=>e,unknownKeys:"strict",catchall:X.create(),typeName:ts.ZodObject,...S(t)}),ee.lazycreate=(e,t)=>new ee({shape:e,unknownKeys:"strip",catchall:X.create(),typeName:ts.ZodObject,...S(t)});class et extends T{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new o(e.ctx.common.issues));return h(t,{code:s.invalid_union,unionErrors:n}),p});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new o(e));return h(t,{code:s.invalid_union,unionErrors:i}),p}}get options(){return this._def.options}}et.create=(e,t)=>new et({options:e,typeName:ts.ZodUnion,...S(t)});let en=e=>{if(e instanceof el)return en(e.schema);if(e instanceof eg)return en(e.innerType());if(e instanceof ed)return[e.value];if(e instanceof ef)return e.options;if(e instanceof ep)return tt.objectValues(e.enum);if(e instanceof e_)return en(e._def.innerType);if(e instanceof W)return[void 0];else if(e instanceof K)return[null];else if(e instanceof ev)return[void 0,...en(e.unwrap())];else if(e instanceof ey)return[null,...en(e.unwrap())];else if(e instanceof eI)return en(e.unwrap());else if(e instanceof eS)return en(e.unwrap());else if(e instanceof eb)return en(e._def.innerType);else return[]};class er extends T{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.object)return h(t,{code:s.invalid_type,expected:i.object,received:t.parsedType}),p;let n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:s.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=en(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new er({typeName:ts.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...S(n)})}}class ei extends T{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(v(e)||v(r))return p;let o=function e(t,n){let r=a(t),s=a(n);if(t===n)return{valid:!0,data:t};if(r===i.object&&s===i.object){let r=tt.objectKeys(n),i=tt.objectKeys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};a[r]=i.data}return{valid:!0,data:a}}if(r===i.array&&s===i.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let a=e(t[i],n[i]);if(!a.valid)return{valid:!1};r.push(a.data)}return{valid:!0,data:r}}return r===i.date&&s===i.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}(e.value,r.value);return o.valid?((y(e)||y(r))&&t.dirty(),{status:t.value,value:o.data}):(h(n,{code:s.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ei.create=(e,t,n)=>new ei({left:e,right:t,typeName:ts.ZodIntersection,...S(n)});class ea extends T{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.array)return h(n,{code:s.invalid_type,expected:i.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return h(n,{code:s.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:s.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new I(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>f.mergeArray(t,e)):f.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new ea({...this._def,rest:e})}}ea.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ea({items:e,typeName:ts.ZodTuple,rest:null,...S(t)})};class es extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.object)return h(n,{code:s.invalid_type,expected:i.object,received:n.parsedType}),p;let r=[],a=this._def.keyType,o=this._def.valueType;for(let e in n.data)r.push({key:a._parse(new I(n,e,n.path,e)),value:o._parse(new I(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?f.mergeObjectAsync(t,r):f.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new es(t instanceof T?{keyType:e,valueType:t,typeName:ts.ZodRecord,...S(n)}:{keyType:B.create(),valueType:e,typeName:ts.ZodRecord,...S(t)})}}class eo extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.map)return h(n,{code:s.invalid_type,expected:i.map,received:n.parsedType}),p;let r=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([e,t],i)=>({key:r._parse(new I(n,e,n.path,[i,"key"])),value:a._parse(new I(n,t,n.path,[i,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of o){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return p;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of o){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return p;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}eo.create=(e,t,n)=>new eo({valueType:t,keyType:e,typeName:ts.ZodMap,...S(n)});class eu extends T{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==i.set)return h(n,{code:s.invalid_type,expected:i.set,received:n.parsedType}),p;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(h(n,{code:s.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(h(n,{code:s.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let a=this._def.valueType;function o(e){let n=new Set;for(let r of e){if("aborted"===r.status)return p;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let u=[...n.data.values()].map((e,t)=>a._parse(new I(n,e,n.path,t)));return n.common.async?Promise.all(u).then(e=>o(e)):o(u)}min(e,t){return new eu({...this._def,minSize:{value:e,message:tr.toString(t)}})}max(e,t){return new eu({...this._def,maxSize:{value:e,message:tr.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:ts.ZodSet,...S(t)});class ec extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.function)return h(t,{code:s.invalid_type,expected:i.function,received:t.parsedType}),p;function n(e,n){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),u].filter(e=>!!e),issueData:{code:s.invalid_arguments,argumentsError:n}})}function r(e,n){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),u].filter(e=>!!e),issueData:{code:s.invalid_return_type,returnTypeError:n}})}let a={errorMap:t.common.contextualErrorMap},c=t.data;if(this._def.returns instanceof em){let e=this;return g(async function(...t){let i=new o([]),s=await e._def.args.parseAsync(t,a).catch(e=>{throw i.addIssue(n(t,e)),i}),u=await Reflect.apply(c,this,s);return await e._def.returns._def.type.parseAsync(u,a).catch(e=>{throw i.addIssue(r(u,e)),i})})}{let e=this;return g(function(...t){let i=e._def.args.safeParse(t,a);if(!i.success)throw new o([n(t,i.error)]);let s=Reflect.apply(c,this,i.data),u=e._def.returns.safeParse(s,a);if(!u.success)throw new o([r(s,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ec({...this._def,args:ea.create(e).rest(J.create())})}returns(e){return new ec({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ec({args:e||ea.create([]).rest(J.create()),returns:t||J.create(),typeName:ts.ZodFunction,...S(n)})}}class el extends T{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}el.create=(e,t)=>new el({getter:e,typeName:ts.ZodLazy,...S(t)});class ed extends T{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:s.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eh(e,t){return new ef({values:e,typeName:ts.ZodEnum,...S(t)})}ed.create=(e,t)=>new ed({value:e,typeName:ts.ZodLiteral,...S(t)});class ef extends T{constructor(){super(...arguments),ti.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{expected:tt.joinValues(n),received:t.parsedType,code:s.invalid_type}),p}if(w(this,ti,"f")||E(this,ti,new Set(this._def.values),"f"),!w(this,ti,"f").has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{received:t.data,code:s.invalid_enum_value,options:n}),p}return g(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ef.create(e,{...this._def,...t})}exclude(e,t=this._def){return ef.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ti=new WeakMap,ef.create=eh;class ep extends T{constructor(){super(...arguments),ta.set(this,void 0)}_parse(e){let t=tt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==i.string&&n.parsedType!==i.number){let e=tt.objectValues(t);return h(n,{expected:tt.joinValues(e),received:n.parsedType,code:s.invalid_type}),p}if(w(this,ta,"f")||E(this,ta,new Set(tt.getValidEnumValues(this._def.values)),"f"),!w(this,ta,"f").has(e.data)){let e=tt.objectValues(t);return h(n,{received:n.data,code:s.invalid_enum_value,options:e}),p}return g(e.data)}get enum(){return this._def.values}}ta=new WeakMap,ep.create=(e,t)=>new ep({values:e,typeName:ts.ZodNativeEnum,...S(t)});class em extends T{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==i.promise&&!1===t.common.async?(h(t,{code:s.invalid_type,expected:i.promise,received:t.parsedType}),p):g((t.parsedType===i.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}em.create=(e,t)=>new em({type:e,typeName:ts.ZodPromise,...S(t)});class eg extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ts.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{h(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return p;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?p:"dirty"===r.status||"dirty"===t.value?m(r.value):r});{if("aborted"===t.value)return p;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?p:"dirty"===r.status||"dirty"===t.value?m(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?p:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?p:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>_(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!_(e))return e;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}}tt.assertNever(r)}}eg.create=(e,t,n)=>new eg({schema:e,typeName:ts.ZodEffects,effect:t,...S(n)}),eg.createWithPreprocess=(e,t,n)=>new eg({schema:t,effect:{type:"preprocess",transform:e},typeName:ts.ZodEffects,...S(n)});class ev extends T{_parse(e){return this._getType(e)===i.undefined?g(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:ts.ZodOptional,...S(t)});class ey extends T{_parse(e){return this._getType(e)===i.null?g(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ey.create=(e,t)=>new ey({innerType:e,typeName:ts.ZodNullable,...S(t)});class e_ extends T{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===i.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}e_.create=(e,t)=>new e_({innerType:e,typeName:ts.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...S(t)});class eb extends T{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return b(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new o(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:ts.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...S(t)});class ew extends T{_parse(e){if(this._getType(e)!==i.nan){let t=this._getOrReturnCtx(e);return h(t,{code:s.invalid_type,expected:i.nan,received:t.parsedType}),p}return{status:"valid",value:e.data}}}ew.create=e=>new ew({typeName:ts.ZodNaN,...S(e)});let eE=Symbol("zod_brand");class eI extends T{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class ek extends T{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ek({in:e,out:t,typeName:ts.ZodPipeline})}}class eS extends T{_parse(e){let t=this._def.innerType._parse(e),n=e=>(_(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function eT(e,t={},n){return e?Z.create().superRefine((r,i)=>{var a,s;if(!e(r)){let e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,o=null===(s=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===s||s;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:o})}}):Z.create()}eS.create=(e,t)=>new eS({innerType:e,typeName:ts.ZodReadonly,...S(t)});let eO={object:ee.lazycreate};(te=ts||(ts={})).ZodString="ZodString",te.ZodNumber="ZodNumber",te.ZodNaN="ZodNaN",te.ZodBigInt="ZodBigInt",te.ZodBoolean="ZodBoolean",te.ZodDate="ZodDate",te.ZodSymbol="ZodSymbol",te.ZodUndefined="ZodUndefined",te.ZodNull="ZodNull",te.ZodAny="ZodAny",te.ZodUnknown="ZodUnknown",te.ZodNever="ZodNever",te.ZodVoid="ZodVoid",te.ZodArray="ZodArray",te.ZodObject="ZodObject",te.ZodUnion="ZodUnion",te.ZodDiscriminatedUnion="ZodDiscriminatedUnion",te.ZodIntersection="ZodIntersection",te.ZodTuple="ZodTuple",te.ZodRecord="ZodRecord",te.ZodMap="ZodMap",te.ZodSet="ZodSet",te.ZodFunction="ZodFunction",te.ZodLazy="ZodLazy",te.ZodLiteral="ZodLiteral",te.ZodEnum="ZodEnum",te.ZodEffects="ZodEffects",te.ZodNativeEnum="ZodNativeEnum",te.ZodOptional="ZodOptional",te.ZodNullable="ZodNullable",te.ZodDefault="ZodDefault",te.ZodCatch="ZodCatch",te.ZodPromise="ZodPromise",te.ZodBranded="ZodBranded",te.ZodPipeline="ZodPipeline",te.ZodReadonly="ZodReadonly";let eA=B.create,eC=H.create,eP=ew.create,eR=z.create,ex=V.create,eN=q.create,eD=G.create,eL=W.create,ej=K.create,eM=Z.create,eU=J.create,eF=X.create,e$=Y.create,eB=Q.create,eH=ee.create,ez=ee.strictCreate,eV=et.create,eq=er.create,eG=ei.create,eW=ea.create,eK=es.create,eZ=eo.create,eJ=eu.create,eX=ec.create,eY=el.create,eQ=ed.create,e0=ef.create,e1=ep.create,e2=em.create,e3=eg.create,e4=ev.create,e5=ey.create,e6=eg.createWithPreprocess,e9=ek.create;var e8,e7,te,tt,tn,tr,ti,ta,ts,to=Object.freeze({__proto__:null,defaultErrorMap:u,setErrorMap:function(e){c=e},getErrorMap:l,makeIssue:d,EMPTY_PATH:[],addIssueToContext:h,ParseStatus:f,INVALID:p,DIRTY:m,OK:g,isAborted:v,isDirty:y,isValid:_,isAsync:b,get util(){return tt},get objectUtil(){return tn},ZodParsedType:i,getParsedType:a,ZodType:T,datetimeRegex:$,ZodString:B,ZodNumber:H,ZodBigInt:z,ZodBoolean:V,ZodDate:q,ZodSymbol:G,ZodUndefined:W,ZodNull:K,ZodAny:Z,ZodUnknown:J,ZodNever:X,ZodVoid:Y,ZodArray:Q,ZodObject:ee,ZodUnion:et,ZodDiscriminatedUnion:er,ZodIntersection:ei,ZodTuple:ea,ZodRecord:es,ZodMap:eo,ZodSet:eu,ZodFunction:ec,ZodLazy:el,ZodLiteral:ed,ZodEnum:ef,ZodNativeEnum:ep,ZodPromise:em,ZodEffects:eg,ZodTransformer:eg,ZodOptional:ev,ZodNullable:ey,ZodDefault:e_,ZodCatch:eb,ZodNaN:ew,BRAND:eE,ZodBranded:eI,ZodPipeline:ek,ZodReadonly:eS,custom:eT,Schema:T,ZodSchema:T,late:eO,get ZodFirstPartyTypeKind(){return ts},coerce:{string:e=>B.create({...e,coerce:!0}),number:e=>H.create({...e,coerce:!0}),boolean:e=>V.create({...e,coerce:!0}),bigint:e=>z.create({...e,coerce:!0}),date:e=>q.create({...e,coerce:!0})},any:eM,array:eB,bigint:eR,boolean:ex,date:eN,discriminatedUnion:eq,effect:e3,enum:e0,function:eX,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eT(t=>t instanceof e,t),intersection:eG,lazy:eY,literal:eQ,map:eZ,nan:eP,nativeEnum:e1,never:eF,null:ej,nullable:e5,number:eC,object:eH,oboolean:()=>ex().optional(),onumber:()=>eC().optional(),optional:e4,ostring:()=>eA().optional(),pipeline:e9,preprocess:e6,promise:e2,record:eK,set:eJ,strictObject:ez,string:eA,symbol:eD,transformer:e3,tuple:eW,undefined:eL,union:eV,unknown:eU,void:e$,NEVER:p,ZodIssueCode:s,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o})},61922:function(e,t,n){"use strict";n.d(t,{oR:function(){return c}});var r=n(18381),i=n(20543);let{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:s}=i,o=!1,u=e=>e;function c(e,t=u,n){n&&!o&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),o=!0);let r=s(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return a(r),r}},29514:function(e,t,n){"use strict";n.d(t,{M:function(){return i}});let r=e=>{let t;let n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(r,i,a);return a},i=e=>e?r(e):r},89426:function(e){"use strict";e.exports=JSON.parse('{"id":"google-analytics","description":"Install a Google Analytics tag on your website","website":"https://analytics.google.com/analytics/web/","scripts":[{"url":"https://www.googletagmanager.com/gtag/js","params":["id"],"strategy":"worker","location":"head","action":"append"},{"code":"window.dataLayer=window.dataLayer||[];window.gtag=function gtag(){window.dataLayer.push(arguments);};gtag(\'js\',new Date());gtag(\'config\',\'${args.id}\')","strategy":"worker","location":"head","action":"append"}]}')},27395:function(e){"use strict";e.exports=JSON.parse('{"id":"google-maps-embed","description":"Embed a Google Maps embed on your webpage","website":"https://developers.google.com/maps/documentation/embed/get-started","html":{"element":"iframe","attributes":{"loading":"lazy","src":{"url":"https://www.google.com/maps/embed/v1/place","slugParam":"mode","params":["key","q","center","zoom","maptype","language","region"]},"referrerpolicy":"no-referrer-when-downgrade","frameborder":"0","style":"border:0","allowfullscreen":true,"width":null,"height":null}}}')},88420:function(e){"use strict";e.exports=JSON.parse('{"id":"youtube-embed","description":"Embed a YouTube embed on your webpage.","website":"https://github.com/paulirish/lite-youtube-embed","html":{"element":"lite-youtube","attributes":{"videoid":null,"playlabel":null}},"stylesheets":["https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.css"],"scripts":[{"url":"https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.js","strategy":"idle","location":"head","action":"append"}]}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(49010),t(91118),t(35542)}),_N_E=e.O()}]);