PageSourceSearch

https://www.sososhiki.jp/_nuxt/f389122.js

js sososhiki.jp collected 2026-10-05 04:05:53 UTC 490,124 bytes, 2 lines download raw bytes

1/*! For license information please see LICENSES */
2(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{0:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return A})),n.d(t,"h",(function(){return T})),n.d(t,"i",(function(){return k})),n.d(t,"j",(function(){return N})),n.d(t,"k",(function(){return c})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return f})),n.d(t,"n",(function(){return E})),n.d(t,"o",(function(){return p})),n.d(t,"p",(function(){return v})),n.d(t,"q",(function(){return l})),n.d(t,"r",(function(){return d})),n.d(t,"s",(function(){return m})),n.d(t,"t",(function(){return g})),n.d(t,"u",(function(){return S})),n.d(t,"v",(function(){return O})),n.d(t,"w",(function(){return y}));const r=function(e){const t=[];let 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,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},i={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_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;
2t+=3){const i=e[t],s=t+1<e.length,o=s?e[t+1]:0,a=t+2<e.length,u=a?e[t+2]:0,c=i>>2,l=(3&i)<<4|o>>4;let h=(15&o)<<2|u>>6,d=63&u;a||(d=64,s||(h=64)),r.push(n[c],n[l],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(r(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){const s=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(s>>10)),t[r++]=String.fromCharCode(56320+(1023&s))}else{const s=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){const i=n[e.charAt(t++)],s=t<e.length?n[e.charAt(t)]:0;++t;const o=t<e.length?n[e.charAt(t)]:64;++t;const a=t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==s||null==o||null==a)throw Error();const u=i<<2|s>>4;if(r.push(u),64!==o){const e=s<<4&240|o>>2;if(r.push(e),64!==a){const e=o<<6&192|a;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)}}},s=function(e){return function(e){const t=r(e);return i.encodeByteArray(t,!0)}(e).replace(/\./g,"")},o=function(e){try{return i.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};class a{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))}}}function u(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=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[s(JSON.stringify({alg:"none",type:"JWT"})),s(JSON.stringify(o)),""].join(".")}function c(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function l(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(c())}function h(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function d(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function f(){return c().indexOf("Electron/")>=0}function p(){const e=c();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function g(){return c().indexOf("MSAppHost/")>=0}function m(){return!function(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(e){return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function v(){return"object"==typeof indexedDB}function y(){return new Promise(((e,t)=>{try{let n=!0;const 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)}}))}
2class b extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,b.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,_.prototype.create)}}class _{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],s=i?function(e,t){return e.replace(w,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",o=`${this.serviceName}: ${s} (${r}).`;return new b(r,o,n)}}const w=/\{\$([^}]+)}/g;function E(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function T(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],s=t[i];if(I(n)&&I(s)){if(!T(n,s))return!1}else if(n!==s)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function I(e){return null!==e&&"object"==typeof e}function S(e){const t=[];for(const[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 O(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");
vendor: 1,525 bytes, line 2
2t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function k(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function A(e,t){const n=new C(e,t);return n.subscribe.bind(n)}class C{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 new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=R),void 0===r.error&&(r.error=R),void 0===r.complete&&(r.complete=R);const 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((()=>
2{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 R(){}function N(e){return e&&e._delegate?e._delegate:e}}).call(this,n(49))},112:function(e,t,n){"use strict";n.r(t),n.d(t,"getImage",(function(){return o})),n.d(t,"validateDomains",(function(){return a})),n.d(t,"supportsAlias",(function(){return u}));var r=n(23),i=n(46),s=Object(i.a)({keyMap:{format:"f",fit:"fit",width:"w",height:"h",resize:"s",quality:"q",background:"b"},joinWith:",",formatter:function(e,t){return Object(r.a)(e)+"_"+Object(r.a)(t)}}),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.modifiers,i=void 0===n?{}:n,o=t.baseURL,a=void 0===o?"/_ipx":o,u=arguments.length>2?arguments[2]:void 0,c=u.nuxtContext,l=(c=void 0===c?{}:c).base,h=void 0===l?"/":l;i.width&&i.height&&(i.resize="".concat(i.width,"x").concat(i.height),delete i.width,delete i.height);var d=s(i)||"_";return{url:Object(r.e)(h,a,d,Object(r.b)(e))}},a=!0,u=!0},113:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),i=(n(117),n(45),n(12),n(8),n(10),n(16),n(17),n(46));function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a={props:{src:{type:String,required:!0},format:{type:String,default:void 0},quality:{type:[Number,String],default:void 0},background:{type:String,default:void 0},fit:{type:String,default:void 0},modifiers:{type:Object,default:void 0},preset:{type:String,default:void 0},provider:{type:String,default:void 0},sizes:{type:[Object,String],default:void 0},preload:{type:Boolean,default:void 0},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0},alt:{type:String,default:void 0},referrerpolicy:{type:String,default:void 0},usemap:{type:String,default:void 0},longdesc:{type:String,default:void 0},ismap:{type:Boolean,default:void 0},crossorigin:{type:[Boolean,String],default:void 0,validator:function(e){return["anonymous","use-credentials","",!0,!1].includes(e)}},loading:{type:String,default:void 0},decoding:{type:String,default:void 0,validator:function(e){return["async","auto","sync"].includes(e)}}},computed:{nImgAttrs:function(){return{width:Object(i.c)(this.width),height:Object(i.c)(this.height),alt:this.alt,referrerpolicy:this.referrerpolicy,usemap:this.usemap,longdesc:this.longdesc,ismap:this.ismap,crossorigin:!0===this.crossorigin?"anonymous":this.crossorigin||void 0,loading:this.loading,decoding:this.decoding}},nModifiers:function(){return o(o({},this.modifiers),{},{width:Object(i.c)(this.width),height:Object(i.c)(this.height),format:this.format,quality:this.quality,background:this.background,fit:this.fit})},nOptions:function(){return{provider:this.provider,preset:this.preset}}}}},115:function(e,t,n){"use strict";n(12),n(8),n(10),n(16),n(17);var r=n(5),i=n(113),s=n(46);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u={name:"NuxtImg",mixins:[i.a],head:function(){if(!0===this.preload)return{link:[{rel:"preload",as:"image",href:this.nSrc}]}},computed:{nAttrs:function(){var e=this.nImgAttrs;if(this.sizes){var t=this.nSizes,n=t.sizes,r=t.srcset;e.sizes=n,e.srcset=r}return e},nSrc:function(){return this.sizes?this.nSizes.src:this.$img(this.src,this.nModifiers,this.nOptions)},nSizes:function(){return this.$img.getSizes(this.src,a(a({},this.nOptions),{},{sizes:this.sizes,modifiers:a(a({},this.nModifiers),{},{width:Object(s.c)(this.width),height:Object(s.c)(this.height)})}
2))}},created:function(){0}},c=n(9),l=Object(c.a)(u,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("img",e._g(e._b({key:e.nSrc,attrs:{src:e.nSrc}},"img",e.nAttrs,!1),e.$listeners))}),[],!1,null,null,null);t.a=l.exports},116:function(e,t,n){"use strict";var r=n(5),i=(n(45),n(22),n(12),n(8),n(10),n(16),n(17),n(113)),s=n(46);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u={name:"NuxtPicture",mixins:[i.a],props:{legacyFormat:{type:String,default:null},imgAttrs:{type:Object,default:null}},head:function(){if(!0===this.preload){var e=void 0!==this.nSources[1]?1:0,t={rel:"preload",as:"image",imagesrcset:this.nSources[e].srcset};return void 0!==this.nSources[e].sizes&&(t.imagesizes=this.nSources[e].sizes),{link:[t]}}},computed:{isTransparent:function(){return["png","webp","gif"].includes(this.originalFormat)},originalFormat:function(){return Object(s.b)(this.src)},nFormat:function(){return this.format?this.format:"svg"===this.originalFormat?"svg":"webp"},nLegacyFormat:function(){return this.legacyFormat?this.legacyFormat:{webp:this.isTransparent?"png":"jpeg",svg:"png"}[this.nFormat]||this.originalFormat},nSources:function(){var e=this;return"svg"===this.nFormat?[{srcset:this.src}]:(this.nLegacyFormat!==this.nFormat?[this.nLegacyFormat,this.nFormat]:[this.nFormat]).map((function(t){var n=e.$img.getSizes(e.src,a(a({},e.nOptions),{},{sizes:e.sizes||e.$img.options.screens,modifiers:a(a({},e.nModifiers),{},{format:t})})),r=n.srcset,i=n.sizes;return{src:n.src,type:"image/".concat(t),sizes:i,srcset:r}}))}},created:function(){0}},c=n(9),l=Object(c.a)(u,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("picture",{key:e.nSources[0].src},[e.nSources[1]?n("source",{attrs:{type:e.nSources[1].type,srcset:e.nSources[1].srcset,sizes:e.nSources[1].sizes}}):e._e(),e._v(" "),n("img",e._g(e._b({attrs:{src:e.nSources[0].src,srcset:e.nSources[0].srcset,sizes:e.nSources[0].sizes}},"img",Object.assign({},e.nImgAttrs,e.imgAttrs),!1),e.$listeners))])}),[],!1,null,null,null);t.a=l.exports},118:function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return g}));var r=!1;if("undefined"!=typeof window){var i={get passive(){r=!0}};window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}var s="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),o=[],a=!1,u=-1,c=void 0,l=void 0,h=function(e){return o.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},d=function(e){var t=e||window.event;return!!h(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},f=function(){void 0!==l&&(document.body.style.paddingRight=l,l=void 0),void 0!==c&&(document.body.style.overflow=c,c=void 0)},p=function(e,t){if(e){if(!o.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};o=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o),[n]),s?(e.ontouchstart=function(e){1===e.targetTouches.length&&(u=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-u;!h(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?d(e):e.stopPropagation())}(t,e)},a||(document.addEventListener("touchmove",d,r?{passive:!1}:void 0),a=!0)):function(e){if(void 0===l){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(l=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===c&&(c=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}
2,g=function(){s?(o.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),a&&(document.removeEventListener("touchmove",d,r?{passive:!1}:void 0),a=!1),u=-1):f(),o=[]}},142:function(e){e.exports=JSON.parse('{"code":"ja","messages":{"alpha":"{_field_}はアルファベットのみ使用できます","alpha_num":"{_field_}は英数字のみ使用できます","alpha_dash":"{_field_}は英数字とハイフン、アンダースコアのみ使用できます","alpha_spaces":"{_field_}はアルファベットと空白のみ使用できます","between":"{_field_}は{min}から{max}の間でなければなりません","confirmed":"{_field_}が一致しません","digits":"{_field_}は{length}桁の数字でなければなりません","dimensions":"{_field_}は幅{width}px、高さ{height}px以内でなければなりません","email":"{_field_}は有効なメールアドレスではありません","excluded":"{_field_}は不正な値です","ext":"{_field_}は有効なファイル形式ではありません","image":"{_field_}は有効な画像形式ではありません","integer":"{_field_}は整数のみ使用できます","is":"{_field_}が一致しません","is_not":"{_field_}は無効です ","length":"{_field_}は{length}文字でなければなりません","max_value":"{_field_}は{max}以下でなければなりません","max":"{_field_}は{length}文字以内にしてください","mimes":"{_field_}は有効なファイル形式ではありません","min_value":"{_field_}は{min}以上でなければなりません","min":"{_field_}は{length}文字以上でなければなりません","numeric":"{_field_}は数字のみ使用できます","oneOf":"{_field_}は有効な値ではありません","regex":"{_field_}のフォーマットが正しくありません","required":"{_field_}は必須項目です","required_if":"{_field_}は必須項目です","size":"{_field_}は{size}KB以内でなければなりません","double":"{_field_}フィールドは有効な10進数である必要があります"}}')},143:function(e){e.exports=JSON.parse('{"code":"en","messages":{"alpha":"The {_field_} field may only contain alphabetic characters","alpha_num":"The {_field_} field may only contain alpha-numeric characters","alpha_dash":"The {_field_} field may contain alpha-numeric characters as well as dashes and underscores","alpha_spaces":"The {_field_} field may only contain alphabetic characters as well as spaces","between":"The {_field_} field must be between {min} and {max}","confirmed":"The {_field_} field confirmation does not match","digits":"The {_field_} field must be numeric and exactly contain {length} digits","dimensions":"The {_field_} field must be {width} pixels by {height} pixels","email":"The {_field_} field must be a valid email","excluded":"The {_field_} field is not a valid value","ext":"The {_field_} field is not a valid file","image":"The {_field_} field must be an image","integer":"The {_field_} field must be an integer","length":"The {_field_} field must be {length} long","max_value":"The {_field_} field must be {max} or less","max":"The {_field_} field may not be greater than {length} characters","mimes":"The {_field_} field must have a valid file type","min_value":"The {_field_} field must be {min} or more","min":"The {_field_} field must be at least {length} characters","numeric":"The {_field_} field may only contain numeric characters","oneOf":"The {_field_} field is not a valid value","regex":"The {_field_} field format is invalid","required_if":"The {_field_} field is required","required":"The {_field_} field is required","size":"The {_field_} field size must be less than {size}KB","double":"The {_field_} field must be a valid decimal"}}')},145:function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return w}));var r=n(7),i=n(0),s=n(31);function o(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}function a(e){if(null==e)return null;if(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&isFinite(e))return e;if(!0===e||!1===e)return e;if("[object String]"===Object.prototype.toString.call(e))return e;if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map((e=>a(e)));if("function"==typeof e||"object"==typeof e)return o(e,(e=>a(e)));throw new Error("Data cannot be encoded in JSON: "+e)}function u(e){if(null==e)return e;if(e["@type"])switch(e["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":{const t=Number(e.value);if(isNaN(t))throw new Error("Data cannot be decoded from JSON: "+e);return t}default:throw new Error("Data cannot be decoded from JSON: "+e)}return Array.isArray(e)?e.map((e=>u(e))):"function"==typeof e||"object"==typeof e?o(e,(e=>u(e))):e}const c="functions",l={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
2ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class h extends i.c{constructor(e,t,n){super(`functions/${e}`,t||""),this.details=n}}class d{constructor(e,t,n){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then((e=>this.auth=e),(()=>{})),this.messaging||t.get().then((e=>this.messaging=e),(()=>{})),this.appCheck||n.get().then((e=>this.appCheck=e),(()=>{}))}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return null==e?void 0:e.accessToken}catch(e){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return await this.messaging.getToken()}catch(e){return}}async getAppCheckToken(){if(this.appCheck){const e=await this.appCheck.getToken();return e.error?null:e.token}return null}async getContext(){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken(),appCheckToken:await this.getAppCheckToken()}}}const f="us-central1";class p{constructor(e,t,n,r,i="us-central1",s){this.app=e,this.fetchImpl=s,this.emulatorOrigin=null,this.contextProvider=new d(t,n,r),this.cancelAllRequests=new Promise((e=>{this.deleteService=()=>Promise.resolve(e())}));try{const e=new URL(i);this.customDomain=e.origin,this.region=f}catch(e){this.customDomain=null,this.region=i}}_delete(){return this.deleteService()}_url(e){const t=this.app.options.projectId;if(null!==this.emulatorOrigin){return`${this.emulatorOrigin}/${t}/${this.region}/${e}`}return null!==this.customDomain?`${this.customDomain}/${e}`:`https://${this.region}-${t}.cloudfunctions.net/${e}`}}function g(e,t,n){return r=>function(e,t,n,r){const i=e._url(t);return v(e,i,n,r)}(e,t,r,n||{})}async function m(e,t,n,r){let i;n["Content-Type"]="application/json";try{i=await r(e,{method:"POST",body:JSON.stringify(t),headers:n})}catch(e){return{status:0,json:null}}let s=null;try{s=await i.json()}catch(e){}return{status:i.status,json:s}}async function v(e,t,n,r){const i={data:n=a(n)},s={},o=await e.contextProvider.getContext();o.authToken&&(s.Authorization="Bearer "+o.authToken),o.messagingToken&&(s["Firebase-Instance-ID-Token"]=o.messagingToken),null!==o.appCheckToken&&(s["X-Firebase-AppCheck"]=o.appCheckToken);const c=function(e){let t=null;return{promise:new Promise(((n,r)=>{t=setTimeout((()=>{r(new h("deadline-exceeded","deadline-exceeded"))}),e)})),cancel:()=>{t&&clearTimeout(t)}}}(r.timeout||7e4),d=await Promise.race([m(t,i,s,e.fetchImpl),c.promise,e.cancelAllRequests]);if(c.cancel(),!d)throw new h("cancelled","Firebase Functions instance was deleted.");const f=function(e,t){let n,r=function(e){if(e>=200&&e<300)return"ok";switch(e){case 0:case 500:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(e),i=r;try{const e=t&&t.error;if(e){const t=e.status;if("string"==typeof t){if(!l[t])return new h("internal","internal");r=l[t],i=t}const s=e.message;"string"==typeof s&&(i=s),n=e.details,void 0!==n&&(n=u(n))}}catch(e){}return"ok"===r?null:new h(r,i,n)}(d.status,d.json);if(f)throw f;if(!d.json)throw new h("internal","Response is not valid JSON object.");let p=d.json.data;if(void 0===p&&(p=d.json.result),void 0===p)throw new h("internal","Response is missing data field.");return{data:u(p)}}const y="@firebase/functions",b="0.8.2";function _(e=Object(r.e)(),t="us-central1"){return Object(r.b)(Object(i.j)(e),c).getImmediate({identifier:t})}function w(e,t,n){return g(Object(i.j)(e),t,n)}var E,T;E=fetch.bind(self),Object(r.c)(new s.a(c,((e,{instanceIdentifier:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal"),i=e.getProvider("messaging-internal"),s=e.getProvider("app-check-internal");return new p(n,r,i,s,t,E)}),"PUBLIC").setMultipleInstances(!0)),Object(r.g)(y,b,T),Object(r.g)(y,b,"esm2017")},146:function(e,t,n){"use strict";var r={name:"ClientOnly",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,i=t.props,s=r(),o=s.default;void 0===o&&(o=[]);var a=s.placeholder;return n._isMounted?o:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),i.placeholderTag&&(i.placeholder||a)?e(i.placeholderTag,{class:["client-only-placeholder"]},i.placeholder||a):o.length>0?o.map((function(){return e(!1)})):e(!1))}};e.exports=r},149:function(e,t,n){"use strict";var r=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function i(e,t){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+e),t&&console.warn(t.stack))}var s=Array.isArray;function o(e){return null!==e&&"object"==typeof e}function a(e){return"string"==typeof e}var u=Object.prototype.toString;function c(e){return"[object Object]"===u.call(e)}function l(e){return null==e}function h(e){return"function"==typeof e}function d(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=null,r=null;return 1===e.length?o(e[0])||s(e[0])?r=e[0]:"string"==typeof e[0]&&(n=e[0]):2===e.length&&("string"==typeof e[0]&&(n=e[0]),(o(e[1])||s(e[1]))&&(r=e[1])),{locale:n,params:r}}function f(e){return JSON.parse(JSON.stringify(e))}function p(e,t){return!!~e.indexOf(t)}var g=Object.prototype.hasOwnProperty;function m(e,t){return g.call(e,t)}function v(e){for(var t=arguments,n=Object(e),r=1;r<arguments.length;r++){var i=t[r];
vendor: 24,935 bytes, line 2
2if(null!=i){var s=void 0;for(s in i)m(i,s)&&(o(i[s])?n[s]=v(n[s],i[s]):n[s]=i[s])}}return n}function y(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=s(e),a=s(t);if(i&&a)return e.length===t.length&&e.every((function(e,n){return y(e,t[n])}));if(i||a)return!1;var u=Object.keys(e),c=Object.keys(t);return u.length===c.length&&u.every((function(n){return y(e[n],t[n])}))}catch(e){return!1}}function b(e){return null!=e&&Object.keys(e).forEach((function(t){"string"==typeof e[t]&&(e[t]=e[t].replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"))})),e}var _={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(e,t){var n=t.data,r=t.parent,i=t.props,s=t.slots,o=r.$i18n;if(o){var a=i.path,u=i.locale,c=i.places,l=s(),h=o.i(a,u,function(e){var t;for(t in e)if("default"!==t)return!1;return Boolean(t)}(l)||c?function(e,t){var n=t?function(e){0;return Array.isArray(e)?e.reduce(E,{}):Object.assign({},e)}(t):{};if(!e)return n;var r=(e=e.filter((function(e){return e.tag||""!==e.text.trim()}))).every(T);0;return e.reduce(r?w:E,n)}(l.default,c):l),d=i.tag&&!0!==i.tag||!1===i.tag?i.tag:"span";return d?e(d,n,h):h}}};function w(e,t){return t.data&&t.data.attrs&&t.data.attrs.place&&(e[t.data.attrs.place]=t),e}function E(e,t,n){return e[n]=t,e}function T(e){return Boolean(e.data&&e.data.attrs&&e.data.attrs.place)}var I,S={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(e,t){var n=t.props,i=t.parent,s=t.data,u=i.$i18n;if(!u)return null;var c=null,l=null;a(n.format)?c=n.format:o(n.format)&&(n.format.key&&(c=n.format.key),l=Object.keys(n.format).reduce((function(e,t){var i;return p(r,t)?Object.assign({},e,((i={})[t]=n.format[t],i)):e}),null));var h=n.locale||u.locale,d=u._ntp(n.value,h,c,l),f=d.map((function(e,t){var n,r=s.scopedSlots&&s.scopedSlots[e.type];return r?r(((n={})[e.type]=e.value,n.index=t,n.parts=d,n)):e.value})),g=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return g?e(g,{attrs:s.attrs,class:s.class,staticClass:s.staticClass},f):f}};function O(e,t,n){C(e,n)&&R(e,t,n)}function k(e,t,n,r){if(C(e,n)){var i=n.context.$i18n;(function(e,t){var n=t.context;return e._locale===n.$i18n.locale})(e,n)&&y(t.value,t.oldValue)&&y(e._localeMessage,i.getLocaleMessage(i.locale))||R(e,t,n)}}function A(e,t,n,r){if(n.context){var s=n.context.$i18n||{};t.modifiers.preserve||s.preserveDirectiveContent||(e.textContent=""),e._vt=void 0,delete e._vt,e._locale=void 0,delete e._locale,e._localeMessage=void 0,delete e._localeMessage}else i("Vue instance does not exists in VNode context")}function C(e,t){var n=t.context;return n?!!n.$i18n||(i("VueI18n instance does not exists in Vue instance"),!1):(i("Vue instance does not exists in VNode context"),!1)}function R(e,t,n){var r,s,o=function(e){var t,n,r,i;a(e)?t=e:c(e)&&(t=e.path,n=e.locale,r=e.args,i=e.choice);return{path:t,locale:n,args:r,choice:i}}(t.value),u=o.path,l=o.locale,h=o.args,d=o.choice;if(u||l||h)if(u){var f=n.context;e._vt=e.textContent=null!=d?(r=f.$i18n).tc.apply(r,[u,d].concat(N(l,h))):(s=f.$i18n).t.apply(s,[u].concat(N(l,h))),e._locale=f.$i18n.locale,e._localeMessage=f.$i18n.getLocaleMessage(f.$i18n.locale)}else i("`path` is required in v-t directive");else i("value type not supported")}function N(e,t){var n=[];return e&&n.push(e),t&&(Array.isArray(t)||c(t))&&n.push(t),n}function D(e,t){void 0===t&&(t={bridge:!1}),D.installed=!0;(I=e).version&&Number(I.version.split(".")[0]);(function(e){e.prototype.hasOwnProperty("$i18n")||Object.defineProperty(e.prototype,"$i18n",{get:function(){return this._i18n}}),e.prototype.$t=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[e,r.locale,r._getMessages(),this].concat(t))},e.prototype.$tc=function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var i=this.$i18n;return i._tc.apply(i,[e,i.locale,i._getMessages(),this,t].concat(n))},e.prototype.$te=function(e,t){var n=this.$i18n;return n._te(e,n.locale,n._getMessages(),t)},e.prototype.$d=function(e){for(var t,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(t=this.$i18n).d.apply(t,[e].concat(n))},e.prototype.$n=function(e){for(var t,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(t=this.$i18n).n.apply(t,[e].concat(n))}})(I),I.mixin(function(e){function t(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return void 0===e&&(e=!1),e?{mounted:t}:{beforeCreate:function(){var e=this.$options;if(e.i18n=e.i18n||(e.__i18nBridge||e.__i18n?{}:null),e.i18n){if(e.i18n instanceof G){if(e.__i18nBridge||e.__i18n)try{var t=e.i18n&&e.i18n.messages?e.i18n.messages:{};(e.__i18nBridge||e.__i18n).forEach((function(e){t=v(t,JSON.parse(e))})),Object.keys(t).forEach((function(n){e.i18n.mergeLocaleMessage(n,t[n])}))}catch(e){}this._i18n=e.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(c(e.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof G?this.$root.$i18n:null;if(n&&(e.i18n.root=this.$root,e.i18n.formatter=n.formatter,e.i18n.fallbackLocale=n.fallbackLocale,e.i18n.formatFallbackMessages=n.formatFallbackMessages,e.i18n.silentTranslationWarn=n.silentTranslationWarn,e.i18n.silentFallbackWarn=n.silentFallbackWarn,e.i18n.pluralizationRules=n.pluralizationRules,e.i18n.preserveDirectiveContent=n.preserveDirectiveContent),e.__i18nBridge||e.__i18n)try{var r=e.i18n&&e.i18n.messages?e.i18n.messages:{};(e.__i18nBridge||e.__i18n).forEach((function(e){r=v(r,JSON.parse(e))})),e.i18n.messages=r}catch(e){}var i=e.i18n.sharedMessages;i&&c(i)&&(e.i18n.messages=v(e.i18n.messages,i)),this._i18n=new G(e.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===e.i18n.sync||e.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof G?this._i18n=this.$root.$i18n:e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof G&&(this._i18n=e.parent.$i18n)},beforeMount:function(){var e=this.$options;e.i18n=e.i18n||(e.__i18nBridge||e.__i18n?{}:null),e.i18n?(e.i18n instanceof G||c(e.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof G||e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof G)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},mounted:t,beforeDestroy:function(){if(this._i18n){var e=this;this.$nextTick((function(){e._subscribing&&(e._i18n.unsubscribeDataChanging(e),delete e._subscribing),e._i18nWatcher&&(e._i18nWatcher(),e._i18n.destroyVM(),delete e._i18nWatcher),e._localeWatcher&&(e._localeWatcher(),delete e._localeWatcher)}))}}}}(t.bridge)),I.directive("t",{bind:O,update:k,unbind:A}),I.component(_.name,_),I.component(S.name,S),I.config.optionMergeStrategies.i18n=function(e,t){return void 0===t?e:t}}var x=function(){this._caches=Object.create(null)};x.prototype.interpolate=function(e,t){if(!t)return[e];var n=this._caches[e];return n||(n=function(e){var t=[],n=0,r="";for(;n<e.length;){var i=e[n++];if("{"===i){r&&t.push({type:"text",value:r}),r="";var s="";for(i=e[n++];void 0!==i&&"}"!==i;)s+=i,i=e[n++];var o="}"===i,a=M.test(s)?"list":o&&L.test(s)?"named":"unknown";t.push({value:s,type:a})}else"%"===i?"{"!==e[n]&&(r+=i):r+=i}return r&&t.push({type:"text",value:r}),t}(e),this._caches[e]=n),function(e,t){var n=[],r=0,i=Array.isArray(t)?"list":o(t)?"named":"unknown";if("unknown"===i)return n;for(;r<e.length;){var s=e[r];switch(s.type){case"text":n.push(s.value);break;case"list":n.push(t[parseInt(s.value,10)]);break;case"named":"named"===i&&n.push(t[s.value])}r++}return n}(n,t)};var M=/^(?:\d)+/,L=/^(?:\w)+/;var P=[];P[0]={ws:[0],ident:[3,0],"[":[4],eof:[7]},P[1]={ws:[1],".":[2],"[":[4],eof:[7]},P[2]={ws:[2],ident:[3,0],0:[3,0],number:[3,0]},P[3]={ident:[3,0],0:[3,0],number:[3,0],ws:[1,1],".":[2,1],"[":[4,1],eof:[7,1]},P[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],eof:8,else:[4,0]},P[5]={"'":[4,0],eof:8,else:[5,0]},P[6]={'"':[4,0],eof:8,else:[6,0]};var j=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function F(e){if(null==e)return"eof";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function $(e){var t,n,r,i=e.trim();return("0"!==e.charAt(0)||!isNaN(e))&&(r=i,j.test(r)?(n=(t=i).charCodeAt(0))!==t.charCodeAt(t.length-1)||34!==n&&39!==n?t:t.slice(1,-1):"*"+i)}var U=function(){this._cache=Object.create(null)};U.prototype.parsePath=function(e){var t=this._cache[e];return t||(t=function(e){var t,n,r,i,s,o,a,u=[],c=-1,l=0,h=0,d=[];function f(){var t=e[c+1];if(5===l&&"'"===t||6===l&&'"'===t)return c++,r="\\"+t,d[0](),!0}for(d[1]=function(){void 0!==n&&(u.push(n),n=void 0)},d[0]=function(){void 0===n?n=r:n+=r},d[2]=function(){d[0](),h++},d[3]=function(){if(h>0)h--,l=4,d[0]();else{if(h=0,void 0===n)return!1;if(!1===(n=$(n)))return!1;d[1]()}};null!==l;)if(c++,"\\"!==(t=e[c])||!f()){if(i=F(t),8===(s=(a=P[l])[i]||a.else||8))return;if(l=s[0],(o=d[s[1]])&&(r=void 0===(r=s[2])?t:r,!1===o()))return;if(7===l)return u}}(e),t&&(this._cache[e]=t)),t||[]},U.prototype.getPathValue=function(e,t){if(!o(e))return null;var n=this.parsePath(t);if(0===n.length)return null;for(var r=n.length,i=e,s=0;s<r;){var a=i[n[s]];if(null==a)return null;i=a,s++}return i};var V,B=/<\/?[\w\s="/.':;#-\/]+>/,q=/(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g,H=/^@(?:\.([a-zA-Z]+))?:/,z=/[()]/g,W={upper:function(e){return e.toLocaleUpperCase()},lower:function(e){return e.toLocaleLowerCase()},capitalize:function(e){return""+e.charAt(0).toLocaleUpperCase()+e.substr(1)}},K=new x,G=function(e){var t=this;void 0===e&&(e={}),!I&&"undefined"!=typeof window&&window.Vue&&D(window.Vue);var n=e.locale||"en-US",r=!1!==e.fallbackLocale&&(e.fallbackLocale||"en-US"),i=e.messages||{},s=e.dateTimeFormats||e.datetimeFormats||{},o=e.numberFormats||{};this._vm=null,this._formatter=e.formatter||K,this._modifiers=e.modifiers||{},this._missing=e.missing||null,this._root=e.root||null,this._sync=void 0===e.sync||!!e.sync,this._fallbackRoot=void 0===e.fallbackRoot||!!e.fallbackRoot,this._fallbackRootWithEmptyString=void 0===e.fallbackRootWithEmptyString||!!e.fallbackRootWithEmptyString,this._formatFallbackMessages=void 0!==e.formatFallbackMessages&&!!e.formatFallbackMessages,this._silentTranslationWarn=void 0!==e.silentTranslationWarn&&e.silentTranslationWarn,this._silentFallbackWarn=void 0!==e.silentFallbackWarn&&!!e.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new U,this._dataListeners=new Set,this._componentInstanceCreatedListener=e.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==e.preserveDirectiveContent&&!!e.preserveDirectiveContent,this.pluralizationRules=e.pluralizationRules||{},this._warnHtmlInMessage=e.warnHtmlInMessage||"off",this._postTranslation=e.postTranslation||null,this._escapeParameterHtml=e.escapeParameterHtml||!1,"__VUE_I18N_BRIDGE__"in e&&(this.__VUE_I18N_BRIDGE__=e.__VUE_I18N_BRIDGE__),this.getChoiceIndex=function(e,n){var r=Object.getPrototypeOf(t);if(r&&r.getChoiceIndex)return r.getChoiceIndex.call(t,e,n);var i,s;return t.locale in t.pluralizationRules?t.pluralizationRules[t.locale].apply(t,[e,n]):(i=e,s=n,i=Math.abs(i),2===s?i?i>1?1:0:1:i?Math.min(i,2):0)},this._exist=function(e,n){return!(!e||!n)&&(!l(t._path.getPathValue(e,n))||!!e[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(i).forEach((function(e){t._checkLocaleMessage(e,t._warnHtmlInMessage,i[e])})),this._initVM({locale:n,fallbackLocale:r,messages:i,dateTimeFormats:s,numberFormats:o})},Y={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0},sync:{configurable:!0}};G.prototype._checkLocaleMessage=function(e,t,n){var r=function(e,t,n,o){if(c(n))Object.keys(n).forEach((function(i){var s=n[i];c(s)?(o.push(i),o.push("."),r(e,t,s,o),o.pop(),o.pop()):(o.push(i),r(e,t,s,o),o.pop())}));else if(s(n))n.forEach((function(n,i){c(n)?(o.push("["+i+"]"),o.push("."),r(e,t,n,o),o.pop(),o.pop()):(o.push("["+i+"]"),r(e,t,n,o),o.pop())}));else if(a(n)){if(B.test(n)){var u="Detected HTML in message '"+n+"' of keypath '"+o.join("")+"' at '"+t+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===e?i(u):"error"===e&&function(e,t){"undefined"!=typeof console&&(console.error("[vue-i18n] "+e),t&&console.error(t.stack))}(u)}}};r(t,e,n,[])},G.prototype._initVM=function(e){var t=I.config.silent;I.config.silent=!0,this._vm=new I({data:e,__VUE18N__INSTANCE__:!0}),I.config.silent=t},G.prototype.destroyVM=function(){this._vm.$destroy()},G.prototype.subscribeDataChanging=function(e){this._dataListeners.add(e)},G.prototype.unsubscribeDataChanging=function(e){!function(e,t){if(e.delete(t));}(this._dataListeners,e)},G.prototype.watchI18nData=function(){var e=this;return this._vm.$watch("$data",(function(){for(var t,n,r=(t=e._dataListeners,n=[],t.forEach((function(e){return n.push(e)})),n),i=r.length;i--;)I.nextTick((function(){r[i]&&r[i].$forceUpdate()}))}),{deep:!0})},G.prototype.watchLocale=function(e){if(e){if(!this.__VUE_I18N_BRIDGE__)return null;var t=this,n=this._vm;return this.vm.$watch("locale",(function(r){n.$set(n,"locale",r),t.__VUE_I18N_BRIDGE__&&e&&(e.locale.value=r),n.$forceUpdate()}),{immediate:!0})}if(!this._sync||!this._root)return null;var r=this._vm;return this._root.$i18n.vm.$watch("locale",(function(e){r.$set(r,"locale",e),r.$forceUpdate()}),{immediate:!0})},G.prototype.onComponentInstanceCreated=function(e){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(e,this)},Y.vm.get=function(){return this._vm},Y.messages.get=function(){return f(this._getMessages())},Y.dateTimeFormats.get=function(){return f(this._getDateTimeFormats())},Y.numberFormats.get=function(){return f(this._getNumberFormats())},Y.availableLocales.get=function(){return Object.keys(this.messages).sort()},Y.locale.get=function(){return this._vm.locale},Y.locale.set=function(e){this._vm.$set(this._vm,"locale",e)},Y.fallbackLocale.get=function(){return this._vm.fallbackLocale},Y.fallbackLocale.set=function(e){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",e)},Y.formatFallbackMessages.get=function(){return this._formatFallbackMessages},Y.formatFallbackMessages.set=function(e){this._formatFallbackMessages=e},Y.missing.get=function(){return this._missing},Y.missing.set=function(e){this._missing=e},Y.formatter.get=function(){return this._formatter},Y.formatter.set=function(e){this._formatter=e},Y.silentTranslationWarn.get=function(){return this._silentTranslationWarn},Y.silentTranslationWarn.set=function(e){this._silentTranslationWarn=e},Y.silentFallbackWarn.get=function(){return this._silentFallbackWarn},Y.silentFallbackWarn.set=function(e){this._silentFallbackWarn=e},Y.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},Y.preserveDirectiveContent.set=function(e){this._preserveDirectiveContent=e},Y.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},Y.warnHtmlInMessage.set=function(e){var t=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=e,n!==e&&("warn"===e||"error"===e)){var r=this._getMessages();Object.keys(r).forEach((function(e){t._checkLocaleMessage(e,t._warnHtmlInMessage,r[e])}))}},Y.postTranslation.get=function(){return this._postTranslation},Y.postTranslation.set=function(e){this._postTranslation=e},Y.sync.get=function(){return this._sync},Y.sync.set=function(e){this._sync=e},G.prototype._getMessages=function(){return this._vm.messages},G.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},G.prototype._getNumberFormats=function(){return this._vm.numberFormats},G.prototype._warnDefault=function(e,t,n,r,i,s){if(!l(n))return n;if(this._missing){var o=this._missing.apply(null,[e,t,r,i]);if(a(o))return o}else 0;if(this._formatFallbackMessages){var u=d.apply(void 0,i);return this._render(t,s,u.params,t)}return t},G.prototype._isFallbackRoot=function(e){return(this._fallbackRootWithEmptyString?!e:l(e))&&!l(this._root)&&this._fallbackRoot},G.prototype._isSilentFallbackWarn=function(e){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(e):this._silentFallbackWarn},G.prototype._isSilentFallback=function(e,t){return this._isSilentFallbackWarn(t)&&(this._isFallbackRoot()||e!==this.fallbackLocale)},G.prototype._isSilentTranslationWarn=function(e){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(e):this._silentTranslationWarn},G.prototype._interpolate=function(e,t,n,r,i,o,u){if(!t)return null;var d,f=this._path.getPathValue(t,n);if(s(f)||c(f))return f;if(l(f)){if(!c(t))return null;if(!a(d=t[n])&&!h(d))return null}else{if(!a(f)&&!h(f))return null;d=f}return a(d)&&(d.indexOf("@:")>=0||d.indexOf("@.")>=0)&&(d=this._link(e,t,d,r,"raw",o,u)),this._render(d,i,o,n)},G.prototype._link=function(e,t,n,r,i,o,a){var u=n,c=u.match(q);for(var l in c)if(c.hasOwnProperty(l)){var h=c[l],d=h.match(H),f=d[0],g=d[1],m=h.replace(f,"").replace(z,"");if(p(a,m))return u;a.push(m);var v=this._interpolate(e,t,m,r,"raw"===i?"string":i,"raw"===i?void 0:o,a);if(this._isFallbackRoot(v)){if(!this._root)throw Error("unexpected error");var y=this._root.$i18n;v=y._translate(y._getMessages(),y.locale,y.fallbackLocale,m,r,i,o)}v=this._warnDefault(e,m,v,r,s(o)?o:[o],i),this._modifiers.hasOwnProperty(g)?v=this._modifiers[g](v):W.hasOwnProperty(g)&&(v=W[g](v)),a.pop(),u=v?u.replace(h,v):u}return u},G.prototype._createMessageContext=function(e,t,n,r){var i=this,a=s(e)?e:[],u=o(e)?e:{},c=this._getMessages(),l=this.locale;return{list:function(e){return a[e]},named:function(e){return u[e]},values:e,formatter:t,path:n,messages:c,locale:l,linked:function(e){return i._interpolate(l,c[l]||{},e,null,r,void 0,[e])}}},G.prototype._render=function(e,t,n,r){if(h(e))return e(this._createMessageContext(n,this._formatter||K,r,t));var i=this._formatter.interpolate(e,n,r);return i||(i=K.interpolate(e,n,r)),"string"!==t||a(i)?i:i.join("")},G.prototype._appendItemToChain=function(e,t,n){var r=!1;return p(e,t)||(r=!0,t&&(r="!"!==t[t.length-1],t=t.replace(/!/g,""),e.push(t),n&&n[t]&&(r=n[t]))),r},G.prototype._appendLocaleToChain=function(e,t,n){var r,i=t.split("-");do{var s=i.join("-");r=this._appendItemToChain(e,s,n),i.splice(-1,1)}while(i.length&&!0===r);return r},G.prototype._appendBlockToChain=function(e,t,n){for(var r=!0,i=0;i<t.length&&"boolean"==typeof r;i++){var s=t[i];a(s)&&(r=this._appendLocaleToChain(e,s,n))}return r},G.prototype._getLocaleChain=function(e,t){if(""===e)return[];this._localeChainCache||(this._localeChainCache={});var n=this._localeChainCache[e];if(!n){t||(t=this.fallbackLocale),n=[];for(var r,i=[e];s(i);)i=this._appendBlockToChain(n,i,t);(i=a(r=s(t)?t:o(t)?t.default?t.default:null:t)?[r]:r)&&this._appendBlockToChain(n,i,null),this._localeChainCache[e]=n}return n},G.prototype._translate=function(e,t,n,r,i,s,o){for(var a,u=this._getLocaleChain(t,n),c=0;c<u.length;c++){var h=u[c];if(!l(a=this._interpolate(h,e[h],r,i,s,o,[r])))return a}return null},G.prototype._t=function(e,t,n,r){for(var i,s=[],o=arguments.length-4;o-- >0;)s[o]=arguments[o+4];if(!e)return"";var a=d.apply(void 0,s);this._escapeParameterHtml&&(a.params=b(a.params));var u=a.locale||t,c=this._translate(n,u,this.fallbackLocale,e,r,"string",a.params);if(this._isFallbackRoot(c)){if(!this._root)throw Error("unexpected error");return(i=this._root).$t.apply(i,[e].concat(s))}return c=this._warnDefault(u,e,c,r,s,"string"),this._postTranslation&&null!=c&&(c=this._postTranslation(c,e)),c},G.prototype.t=function(e){for(var t,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(t=this)._t.apply(t,[e,this.locale,this._getMessages(),null].concat(n))},G.prototype._i=function(e,t,n,r,i){var s=this._translate(n,t,this.fallbackLocale,e,r,"raw",i);if(this._isFallbackRoot(s)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(e,t,i)}return this._warnDefault(t,e,s,r,[i],"raw")},G.prototype.i=function(e,t,n){return e?(a(t)||(t=this.locale),this._i(e,t,this._getMessages(),null,n)):""},G.prototype._tc=function(e,t,n,r,i){for(var s,o=[],a=arguments.length-5;a-- >0;)o[a]=arguments[a+5];if(!e)return"";void 0===i&&(i=1);var u={count:i,n:i},c=d.apply(void 0,o);return c.params=Object.assign(u,c.params),o=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((s=this)._t.apply(s,[e,t,n,r].concat(o)),i)},G.prototype.fetchChoice=function(e,t){if(!e||!a(e))return null;var n=e.split("|");return n[t=this.getChoiceIndex(t,n.length)]?n[t].trim():e},G.prototype.tc=function(e,t){for(var n,r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];return(n=this)._tc.apply(n,[e,this.locale,this._getMessages(),null,t].concat(r))},G.prototype._te=function(e,t,n){for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var s=d.apply(void 0,r).locale||t;return this._exist(n[s],e)},G.prototype.te=function(e,t){return this._te(e,this.locale,this._getMessages(),t)},G.prototype.getLocaleMessage=function(e){return f(this._vm.messages[e]||{})},G.prototype.setLocaleMessage=function(e,t){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(e,this._warnHtmlInMessage,t),this._vm.$set(this._vm.messages,e,t)},G.prototype.mergeLocaleMessage=function(e,t){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(e,this._warnHtmlInMessage,t),this._vm.$set(this._vm.messages,e,v(void 0!==this._vm.messages[e]&&Object.keys(this._vm.messages[e]).length?Object.assign({},this._vm.messages[e]):{},t))},G.prototype.getDateTimeFormat=function(e){return f(this._vm.dateTimeFormats[e]||{})},G.prototype.setDateTimeFormat=function(e,t){this._vm.$set(this._vm.dateTimeFormats,e,t),this._clearDateTimeFormat(e,t)},G.prototype.mergeDateTimeFormat=function(e,t){this._vm.$set(this._vm.dateTimeFormats,e,v(this._vm.dateTimeFormats[e]||{},t)),this._clearDateTimeFormat(e,t)},G.prototype._clearDateTimeFormat=function(e,t){for(var n in t){var r=e+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},G.prototype._localizeDateTime=function(e,t,n,r,i){for(var s=t,o=r[s],a=this._getLocaleChain(t,n),u=0;u<a.length;u++){var c=a[u];if(s=c,!l(o=r[c])&&!l(o[i]))break}if(l(o)||l(o[i]))return null;var h=o[i],d=s+"__"+i,f=this._dateTimeFormatters[d];return f||(f=this._dateTimeFormatters[d]=new Intl.DateTimeFormat(s,h)),f.format(e)},G.prototype._d=function(e,t,n){if(!n)return new Intl.DateTimeFormat(t).format(e);var r=this._localizeDateTime(e,t,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(e,n,t)}return r||""},G.prototype.d=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=this.locale,i=null;return 1===t.length?a(t[0])?i=t[0]:o(t[0])&&(t[0].locale&&(r=t[0].locale),t[0].key&&(i=t[0].key)):2===t.length&&(a(t[0])&&(i=t[0]),a(t[1])&&(r=t[1])),this._d(e,r,i)},G.prototype.getNumberFormat=function(e){return f(this._vm.numberFormats[e]||{})},G.prototype.setNumberFormat=function(e,t){this._vm.$set(this._vm.numberFormats,e,t),this._clearNumberFormat(e,t)},G.prototype.mergeNumberFormat=function(e,t){this._vm.$set(this._vm.numberFormats,e,v(this._vm.numberFormats[e]||{},t)),this._clearNumberFormat(e,t)},G.prototype._clearNumberFormat=function(e,t){for(var n in t){var r=e+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},G.prototype._getNumberFormatter=function(e,t,n,r,i,s){for(var o=t,a=r[o],u=this._getLocaleChain(t,n),c=0;c<u.length;c++){var h=u[c];if(o=h,!l(a=r[h])&&!l(a[i]))break}if(l(a)||l(a[i]))return null;var d,f=a[i];if(s)d=new Intl.NumberFormat(o,Object.assign({},f,s));else{var p=o+"__"+i;(d=this._numberFormatters[p])||(d=this._numberFormatters[p]=new Intl.NumberFormat(o,f))}return d},G.prototype._n=function(e,t,n,r){if(!G.availabilities.numberFormat)return"";if(!n)return(r?new Intl.NumberFormat(t,r):new Intl.NumberFormat(t)).format(e);var i=this._getNumberFormatter(e,t,this.fallbackLocale,this._getNumberFormats(),n,r),s=i&&i.format(e);
2if(this._isFallbackRoot(s)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(e,Object.assign({},{key:n,locale:t},r))}return s||""},G.prototype.n=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var i=this.locale,s=null,u=null;return 1===t.length?a(t[0])?s=t[0]:o(t[0])&&(t[0].locale&&(i=t[0].locale),t[0].key&&(s=t[0].key),u=Object.keys(t[0]).reduce((function(e,n){var i;return p(r,n)?Object.assign({},e,((i={})[n]=t[0][n],i)):e}),null)):2===t.length&&(a(t[0])&&(s=t[0]),a(t[1])&&(i=t[1])),this._n(e,i,s,u)},G.prototype._ntp=function(e,t,n,r){if(!G.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(t,r):new Intl.NumberFormat(t)).formatToParts(e);var i=this._getNumberFormatter(e,t,this.fallbackLocale,this._getNumberFormats(),n,r),s=i&&i.formatToParts(e);if(this._isFallbackRoot(s)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(e,t,n,r)}return s||[]},Object.defineProperties(G.prototype,Y),Object.defineProperty(G,"availabilities",{get:function(){if(!V){var e="undefined"!=typeof Intl;V={dateTimeFormat:e&&void 0!==Intl.DateTimeFormat,numberFormat:e&&void 0!==Intl.NumberFormat}}return V}}),G.install=D,G.version="8.27.2",t.a=G},150:function(e,t,n){"use strict";n.r(t),n.d(t,"alpha",(function(){return a})),n.d(t,"alpha_dash",(function(){return u})),n.d(t,"alpha_num",(function(){return c})),n.d(t,"alpha_spaces",(function(){return l})),n.d(t,"between",(function(){return h})),n.d(t,"confirmed",(function(){return d})),n.d(t,"digits",(function(){return f})),n.d(t,"dimensions",(function(){return p})),n.d(t,"double",(function(){return V})),n.d(t,"email",(function(){return g})),n.d(t,"excluded",(function(){return w})),n.d(t,"ext",(function(){return E})),n.d(t,"image",(function(){return T})),n.d(t,"integer",(function(){return I})),n.d(t,"is",(function(){return S})),n.d(t,"is_not",(function(){return O})),n.d(t,"length",(function(){return k})),n.d(t,"max",(function(){return A})),n.d(t,"max_value",(function(){return C})),n.d(t,"mimes",(function(){return R})),n.d(t,"min",(function(){return N})),n.d(t,"min_value",(function(){return D})),n.d(t,"numeric",(function(){return L})),n.d(t,"oneOf",(function(){return _})),n.d(t,"regex",(function(){return P})),n.d(t,"required",(function(){return j})),n.d(t,"required_if",(function(){return $})),n.d(t,"size",(function(){return U}));n(12),n(117),n(15),n(20),n(25),n(26),n(22),n(53),n(8),n(34),n(137),n(47);var r={en:/^[A-Z]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[A-ZÆØÅ]*$/i,de:/^[A-ZÄÖÜß]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[A-Z\xC0-\xFF]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,nl:/^[A-ZÉËÏÓÖÜ]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ro:/^[A-ZĂÂÎŞŢ]*$/i,ru:/^[А-ЯЁ]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[A-ZČĆŽŠĐ]*$/i,sv:/^[A-ZÅÄÖ]*$/i,tr:/^[A-ZÇĞİıÖŞÜ]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[A-ZÇƏĞİıÖŞÜ]*$/i,el:/^[Α-ώ]*$/i,ja:/^[A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF]*$/i,he:/^[A-Z\u05D0-\u05EA']*$/i},i={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ro:/^[A-ZĂÂÎŞŢ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,sv:/^[A-ZÅÄÖ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/,az:/^[A-ZÇƏĞİıÖŞÜ\s]*$/i,el:/^[Α-ώ\s]*$/i,ja:/^[A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\s]*$/i,he:/^[A-Z\u05D0-\u05EA'\s]*$/i},s={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ro:/^[0-9A-ZĂÂÎŞŢ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,sv:/^[0-9A-ZÅÄÖ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ]*$/i,el:/^[0-9Α-ώ]*$/i,ja:/^[0-9A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF]*$/i,he:/^[0-9A-Z\u05D0-\u05EA']*$/i},o={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ro:/^[0-9A-ZĂÂÎŞŢ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,sv:/^[0-9A-ZÅÄÖ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i,el:/^[0-9Α-ώ_-]*$/i,ja:/^[0-9A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF_-]*$/i,he:/^[0-9A-Z\u05D0-\u05EA'_-]*$/i},a={validate:function e(t,n){var i=(void 0===n?{}:n).locale,s=void 0===i?"":i;return Array.isArray(t)?t.every((function(t){return e(t,{locale:s})})):s?(r[s]||r.en).test(t):Object.keys(r).some((function(e){return r[e].test(t)}))},params:[{name:"locale"}]},u={validate:function e(t,n){var r=(void 0===n?{}:n).locale,i=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return e(t,{locale:i})}
2)):i?(o[i]||o.en).test(t):Object.keys(o).some((function(e){return o[e].test(t)}))},params:[{name:"locale"}]},c={validate:function e(t,n){var r=(void 0===n?{}:n).locale,i=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return e(t,{locale:i})})):i?(s[i]||s.en).test(t):Object.keys(s).some((function(e){return s[e].test(t)}))},params:[{name:"locale"}]},l={validate:function e(t,n){var r=(void 0===n?{}:n).locale,s=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return e(t,{locale:s})})):s?(i[s]||i.en).test(t):Object.keys(i).some((function(e){return i[e].test(t)}))},params:[{name:"locale"}]},h={validate:function e(t,n){var r=void 0===n?{}:n,i=r.min,s=r.max;return Array.isArray(t)?t.every((function(t){return!!e(t,{min:i,max:s})})):Number(i)<=t&&Number(s)>=t},params:[{name:"min"},{name:"max"}]},d={validate:function(e,t){var n=t.target;return String(e)===String(n)},params:[{name:"target",isTarget:!0}]},f={validate:function e(t,n){var r=n.length;if(Array.isArray(t))return t.every((function(t){return e(t,{length:r})}));var i=String(t);return/^[0-9]*$/.test(i)&&i.length===r},params:[{name:"length",cast:function(e){return Number(e)}}]},p={validate:function(e,t){var n=t.width,r=t.height,i=[];e=Array.isArray(e)?e:[e];for(var s=0;s<e.length;s++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[s].name))return Promise.resolve(!1);i.push(e[s])}return Promise.all(i.map((function(e){return function(e,t,n){var r=window.URL||window.webkitURL;return new Promise((function(i){var s=new Image;s.onerror=function(){return i(!1)},s.onload=function(){return i(s.width===t&&s.height===n)},s.src=r.createObjectURL(e)}))}(e,n,r)}))).then((function(e){return e.every((function(e){return e}))}))},params:[{name:"width",cast:function(e){return Number(e)}},{name:"height",cast:function(e){return Number(e)}}]},g={validate:function(e,t){var n=(void 0===t?{}:t).multiple,r=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return n&&!Array.isArray(e)&&(e=String(e).split(",").map((function(e){return e.trim()}))),Array.isArray(e)?e.every((function(e){return r.test(String(e))})):r.test(String(e))},params:[{name:"multiple",default:!1}]};function m(e){return null==e}function v(e){return Array.isArray(e)&&0===e.length}function y(e){return"function"==typeof Array.from?Array.from(e):function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}(e)}var b=function e(t,n){return Array.isArray(t)?t.every((function(t){return e(t,n)})):y(n).some((function(e){return e==t}))},_={validate:b},w={validate:function(e,t){return!b(e,t)}},E={validate:function(e,t){var n=new RegExp(".("+t.join("|")+")$","i");return Array.isArray(e)?e.every((function(e){return n.test(e.name)})):n.test(e.name)}},T={validate:function(e){var t=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return Array.isArray(e)?e.every((function(e){return t.test(e.name)})):t.test(e.name)}},I={validate:function(e){return Array.isArray(e)?e.every((function(e){return/^-?[0-9]+$/.test(String(e))})):/^-?[0-9]+$/.test(String(e))}},S={validate:function(e,t){return e===t.other},params:[{name:"other"}]},O={validate:function(e,t){return e!==t.other},params:[{name:"other"}]},k={validate:function(e,t){var n=t.length;return!m(e)&&("string"==typeof e&&(e=y(e)),"number"==typeof e&&(e=String(e)),e.length||(e=y(e)),e.length===n)},params:[{name:"length",cast:function(e){return Number(e)}}]},A={validate:function e(t,n){var r=n.length;return m(t)?r>=0:Array.isArray(t)?t.every((function(t){return e(t,{length:r})})):String(t).length<=r},params:[{name:"length",cast:function(e){return Number(e)}}]},C={validate:function e(t,n){var r=n.max;return!m(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return e(t,{max:r})})):Number(t)<=r)},params:[{name:"max",cast:function(e){return Number(e)}}]},R={validate:function(e,t){var n=new RegExp(t.join("|").replace("*",".+")+"$","i");return Array.isArray(e)?e.every((function(e){return n.test(e.type)})):n.test(e.type)}},N={validate:function e(t,n){var r=n.length;return!m(t)&&(Array.isArray(t)?t.every((function(t){return e(t,{length:r})})):String(t).length>=r)},params:[{name:"length",cast:function(e){return Number(e)}}]},D={validate:function e(t,n){var r=n.min;return!m(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return e(t,{min:r})})):Number(t)>=r)},params:[{name:"min",cast:function(e){return Number(e)}}]},x=/^[٠١٢٣٤٥٦٧٨٩]+$/,M=/^[0-9]+$/,L={validate:function(e){var t=function(e){var t=String(e);return M.test(t)||x.test(t)};return Array.isArray(e)?e.every(t):t(e)}},P={validate:function e(t,n){var r=n.regex;return Array.isArray(t)?t.every((function(t){return e(t,{regex:r})})):r.test(String(t))},params:[{name:"regex",cast:function(e){return"string"==typeof e?new RegExp(e):e}}]}
2,j={validate:function(e,t){var n=(void 0===t?{allowFalse:!0}:t).allowFalse,r={valid:!1,required:!0};return m(e)||v(e)?r:!1!==e||n?(r.valid=!!String(e).trim().length,r):r},params:[{name:"allowFalse",default:!0}],computesRequired:!0},F=function(e){return v(e)||-1!==[!1,null,void 0].indexOf(e)||!String(e).trim().length},$={validate:function(e,t){var n,r=t.target,i=t.values;return i&&i.length?(Array.isArray(i)||"string"!=typeof i||(i=[i]),n=i.some((function(e){return e==String(r).trim()}))):n=!F(r),n?{valid:!F(e),required:n}:{valid:!0,required:n}},params:[{name:"target",isTarget:!0},{name:"values"}],computesRequired:!0},U={validate:function(e,t){var n=t.size;if(isNaN(n))return!1;var r=1024*n;if(!Array.isArray(e))return e.size<=r;for(var i=0;i<e.length;i++)if(e[i].size>r)return!1;return!0},params:[{name:"size",cast:function(e){return Number(e)}}]},V={validate:function(e,t){var n=t||{},r=n.decimals,i=void 0===r?0:r,s=n.separator,o=new RegExp("^-?\\d+"+("comma"===(void 0===s?"dot":s)?",?":"\\.?")+(0===i?"\\d*":"(\\d{"+i+"})?")+"$");return Array.isArray(e)?e.every((function(e){return o.test(String(e))})):o.test(String(e))},params:[{name:"decimals",default:0},{name:"separator",default:"dot"}]}},185:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return Yo})),n.d(t,"c",(function(){return ea})),n.d(t,"d",(function(){return Bs})),n.d(t,"e",(function(){return Fs})),n.d(t,"f",(function(){return Go})),n.d(t,"g",(function(){return qs})),n.d(t,"h",(function(){return qo})),n.d(t,"i",(function(){return zo})),n.d(t,"j",(function(){return Ks})),n.d(t,"k",(function(){return Xo})),n.d(t,"l",(function(){return Lo})),n.d(t,"m",(function(){return Jo})),n.d(t,"n",(function(){return Wo})),n.d(t,"o",(function(){return Ko})),n.d(t,"p",(function(){return jo}));var r=n(7),i=n(31),s=n(32),o=n(0),a=n(33);const u="@firebase/firestore";class c{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}c.UNAUTHENTICATED=new c(null),c.GOOGLE_CREDENTIALS=new c("google-credentials-uid"),c.FIRST_PARTY=new c("first-party-uid"),c.MOCK_USER=new c("mock-user");let l="9.8.3";const h=new s.b("@firebase/firestore");function d(){return h.logLevel}function f(e,...t){if(h.logLevel<=s.a.DEBUG){const n=t.map(m);h.debug(`Firestore (${l}): ${e}`,...n)}}function p(e,...t){if(h.logLevel<=s.a.ERROR){const n=t.map(m);h.error(`Firestore (${l}): ${e}`,...n)}}function g(e,...t){if(h.logLevel<=s.a.WARN){const n=t.map(m);h.warn(`Firestore (${l}): ${e}`,...n)}}function m(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function v(e="Unexpected state"){const t=`FIRESTORE (${l}) INTERNAL ASSERTION FAILED: `+e;throw p(t),new Error(t)}function y(e,t){e||v()}function b(e,t){return e}const _={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class w extends o.c{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class E{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}class T{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class I{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable((()=>t(c.UNAUTHENTICATED)))}shutdown(){}}class S{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}shutdown(){this.changeListener=null}}class O{constructor(e){this.t=e,this.currentUser=c.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let n=this.i;const r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve();let i=new E;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new E,e.enqueueRetryable((()=>r(this.currentUser)))};const s=()=>{const t=i;e.enqueueRetryable((async()=>{await t.promise,await r(this.currentUser)}))},o=e=>{f("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit((e=>o(e))),setTimeout((()=>
2{if(!this.auth){const e=this.t.getImmediate({optional:!0});e?o(e):(f("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new E)}}),0),s()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((t=>this.i!==e?(f("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(y("string"==typeof t.accessToken),new T(t.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return y(null===e||"string"==typeof e),new c(e)}}class k{constructor(e,t,n){this.type="FirstParty",this.user=c.FIRST_PARTY,this.headers=new Map,this.headers.set("X-Goog-AuthUser",t);const r=e.auth.getAuthHeaderValueForFirstParty([]);r&&this.headers.set("Authorization",r),n&&this.headers.set("X-Goog-Iam-Authorization-Token",n)}}class A{constructor(e,t,n){this.h=e,this.l=t,this.m=n}getToken(){return Promise.resolve(new k(this.h,this.l,this.m))}start(e,t){e.enqueueRetryable((()=>t(c.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class C{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class R{constructor(e){this.g=e,this.forceRefresh=!1,this.appCheck=null,this.p=null}start(e,t){const n=e=>{null!=e.error&&f("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);const n=e.token!==this.p;return this.p=e.token,f("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable((()=>n(t)))};const r=e=>{f("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.g.onInit((e=>r(e))),setTimeout((()=>{if(!this.appCheck){const e=this.g.getImmediate({optional:!0});e?r(e):f("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((e=>e?(y("string"==typeof e.token),this.p=e.token,new C(e.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function N(e){const t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}class D{static I(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length;let n="";for(;n.length<20;){const r=N(40);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length))}return n}}function x(e,t){return e<t?-1:e>t?1:0}function M(e,t,n){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}class L{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return L.fromMillis(Date.now())}static fromDate(e){return L.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor(1e6*(e-1e3*t));return new L(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?x(this.nanoseconds,e.nanoseconds):x(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
2}class P{constructor(e){this.timestamp=e}static fromTimestamp(e){return new P(e)}static min(){return new P(new L(0,0))}static max(){return new P(new L(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class j{constructor(e,t,n){void 0===t?t=0:t>e.length&&v(),void 0===n?n=e.length-t:n>e.length-t&&v(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===j.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof j?e.forEach((e=>{t.push(e)})):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=e.get(r),i=t.get(r);if(n<i)return-1;if(n>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class F extends j{construct(e,t,n){return new F(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const t=[];for(const n of e){if(n.indexOf("//")>=0)throw new w(_.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter((e=>e.length>0)))}return new F(t)}static emptyPath(){return new F([])}}const $=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class U extends j{construct(e,t,n){return new U(e,t,n)}static isValidIdentifier(e){return $.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),U.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new U(["__name__"])}static fromServerFormat(e){const t=[];let n="",r=0;const i=()=>{if(0===n.length)throw new w(_.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let s=!1;for(;r<e.length;){const t=e[r];if("\\"===t){if(r+1===e.length)throw new w(_.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new w(_.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(s=!s,r++):"."!==t||s?(n+=t,r++):(i(),r++)}if(i(),s)throw new w(_.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new U(t)}static emptyPath(){return new U([])}}class V{constructor(e){this.path=e}static fromPath(e){return new V(F.fromString(e))}static fromName(e){return new V(F.fromString(e).popFirst(5))}static empty(){return new V(F.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===F.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return F.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new V(new F(e.slice()))}}class B{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}B.UNKNOWN_ID=-1;function q(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=P.fromTimestamp(1e9===r?new L(n+1,0):new L(n,r));return new z(i,V.empty(),t)}function H(e){return new z(e.readTime,e.key,-1)}class z{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new z(P.min(),V.empty(),-1)}static max(){return new z(P.max(),V.empty(),-1)}}function W(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:(n=V.comparator(e.documentKey,t.documentKey),0!==n?n:x(e.largestBatchId,t.largestBatchId))}const K="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class G{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}
vendor: 4,641 bytes, line 2
2raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}async function Y(e){if(e.code!==_.FAILED_PRECONDITION||e.message!==K)throw e;f("LocalStore","Unexpectedly lost primary lease")}class X{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)}),(e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)}))}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&v(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new X(((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(e){try{const t=e();return t instanceof X?t:X.resolve(t)}catch(e){return X.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction((()=>e(t))):X.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction((()=>e(t))):X.reject(t)}static resolve(e){return new X(((t,n)=>{t(e)}))}static reject(e){return new X(((t,n)=>{n(e)}))}static waitFor(e){return new X(((t,n)=>{let r=0,i=0,s=!1;e.forEach((e=>{++r,e.next((()=>{++i,s&&i===r&&t()}),(e=>n(e)))})),s=!0,i===r&&t()}))}static or(e){let t=X.resolve(!1);for(const n of e)t=t.next((e=>e?X.resolve(e):n()));return t}static forEach(e,t){const n=[];return e.forEach(((e,r)=>{n.push(t.call(this,e,r))})),this.waitFor(n)}static mapArray(e,t){return new X(((n,r)=>{const i=e.length,s=new Array(i);let o=0;for(let a=0;a<i;a++){const u=a;t(e[u]).next((e=>{s[u]=e,++o,o===i&&n(s)}),(e=>r(e)))}}))}static doWhile(e,t){return new X(((n,r)=>{const i=()=>{!0===e()?t().next((()=>{i()}),r):n()};i()}))}}function Q(e){return"IndexedDbTransactionError"===e.name}class Z{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.it(e),this.rt=e=>t.writeSequenceNumber(e))}it(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.rt&&this.rt(e),e}}function J(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function ee(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function te(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}Z.ot=-1;class ne{constructor(e,t){this.comparator=e,this.root=t||ie.EMPTY}insert(e,t){return new ne(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,ie.BLACK,null,null))}remove(e){return new ne(this.comparator,this.root.remove(e,this.comparator).copy(null,null,ie.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,n)=>(e(t,n),!1)))}toString(){const e=[];return this.inorderTraversal(((t,n)=>(e.push(`${t}:${n}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new re(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new re(this.root,e,this.comparator,!1)}getReverseIterator(){return new re(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new re(this.root,e,this.comparator,!0)}}class re{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class ie{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:ie.RED,this.left=null!=r?r:ie.EMPTY,this.right=null!=i?i:ie.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new ie(null!=e?e:this.key,null!=t?t:this.value,
vendor: 4,421 bytes, line 2
2null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return ie.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let n,r=this;if(t(e,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return ie.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,ie.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,ie.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw v();if(this.right.isRed())throw v();const e=this.left.check();if(e!==this.right.check())throw v();return e+(this.isRed()?0:1)}}ie.EMPTY=null,ie.RED=!0,ie.BLACK=!1,ie.EMPTY=new class{constructor(){this.size=0}get key(){throw v()}get value(){throw v()}get color(){throw v()}get left(){throw v()}get right(){throw v()}copy(e,t,n,r,i){return this}insert(e,t,n){return new ie(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class se{constructor(e){this.comparator=e,this.data=new ne(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,n)=>(e(t),!1)))}forEachInRange(e,t){const n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new oe(this.data.getIterator())}getIteratorFrom(e){return new oe(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((e=>{t=t.add(e)})),t}isEqual(e){if(!(e instanceof se))return!1;if(this.size!==e.size)return!1;const t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){const e=[];return this.forEach((t=>{e.push(t)})),e}toString(){const e=[];return this.forEach((t=>e.push(t))),"SortedSet("+e.toString()+")"}copy(e){const t=new se(this.comparator);return t.data=e,t}}
2class oe{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class ae{constructor(e){this.fields=e,e.sort(U.comparator)}static empty(){return new ae([])}unionWith(e){let t=new se(U.comparator);for(const e of this.fields)t=t.add(e);for(const n of e)t=t.add(n);return new ae(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return M(this.fields,e.fields,((e,t)=>e.isEqual(t)))}}class ue{constructor(e){this.binaryString=e}static fromBase64String(e){const t=atob(e);return new ue(t)}static fromUint8Array(e){const t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new ue(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return e=this.binaryString,btoa(e);var e}toUint8Array(){return function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return x(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}ue.EMPTY_BYTE_STRING=new ue("");const ce=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function le(e){if(y(!!e),"string"==typeof e){let t=0;const n=ce.exec(e);if(y(!!n),n[1]){let e=n[1];e=(e+"000000000").substr(0,9),t=Number(e)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:he(e.seconds),nanos:he(e.nanos)}}function he(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function de(e){return"string"==typeof e?ue.fromBase64String(e):ue.fromUint8Array(e)}function fe(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function pe(e){const t=e.mapValue.fields.__previous_value__;return fe(t)?pe(t):t}function ge(e){const t=le(e.mapValue.fields.__local_write_time__.timestampValue);return new L(t.seconds,t.nanos)}class me{constructor(e,t,n,r,i,s,o,a){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=o,this.useFetchStreams=a}}class ve{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new ve("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof ve&&e.projectId===this.projectId&&e.database===this.database}}function ye(e){return null==e}function be(e){return 0===e&&1/e==-1/0}function _e(e){return"number"==typeof e&&Number.isInteger(e)&&!be(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}const we={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Ee(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?fe(e)?4:Pe(e)?9007199254740991:10:v()}function Te(e,t){if(e===t)return!0;const n=Ee(e);if(n!==Ee(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return ge(e).isEqual(ge(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;const n=le(e.timestampValue),r=le(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return de(e.bytesValue).isEqual(de(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return he(e.geoPointValue.latitude)===he(t.geoPointValue.latitude)&&he(e.geoPointValue.longitude)===he(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return he(e.integerValue)===he(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){const n=he(e.doubleValue),r=he(t.doubleValue);return n===r?be(n)===be(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return M(e.arrayValue.values||[],t.arrayValue.values||[],Te);case 10:return function(e,t){const n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(J(n)!==J(r))return!1;for(const e in n)if(n.hasOwnProperty(e)&&(void 0===r[e]||!Te(n[e],r[e])))return!1;return!0}(e,t);default:return v()}}function Ie(e,t){return void 0!==(e.values||[]).find((e=>Te(e,t)))}function Se(e,t){if(e===t)return 0;const n=Ee(e),r=Ee(t);if(n!==r)return x(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return x(e.booleanValue,t.booleanValue);case 2:return function(e,t){const n=he(e.integerValue||e.doubleValue),r=he(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return Oe(e.timestampValue,t.timestampValue);case 4:return Oe(ge(e),ge(t));case 5:return x(e.stringValue,t.stringValue);case 6:return function(e,t){const n=de(e),r=de(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){const n=e.split("/"),r=t.split("/");for(let e=0;e<n.length&&e<r.length;e++){const t=x(n[e],r[e]);if(0!==t)return t}return x(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){const n=x(he(e.latitude),he(t.latitude));return 0!==n?n:x(he(e.longitude),he(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){const n=e.values||[],r=t.values||[];for(let e=0;e<n.length&&e<r.length;++e){const t=Se(n[e],r[e]);if(t)return t}return x(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===we.mapValue&&t===we.mapValue)return 0;if(e===we.mapValue)return 1;if(t===we.mapValue)return-1;const n=e.fields||{},r=Object.keys(n),i=t.fields||{},s=Object.keys(i);r.sort(),s.sort();for(let e=0;e<r.length&&e<s.length;++e){const t=x(r[e],s[e]);if(0!==t)return t;const o=Se(n[r[e]],i[s[e]]);if(0!==o)return o}return x(r.length,s.length)}(e.mapValue,t.mapValue);default:throw v()}}function Oe(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return x(e,t);const n=le(e),r=le(t),i=x(n.seconds,r.seconds);return 0!==i?i:x(n.nanos,r.nanos)}function ke(e){return Ae(e)}function Ae(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){const t=le(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?de(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,V.fromName(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(e){let t="[",n=!0;for(const r of e.values||[])n?n=!1:t+=",",t+=Ae(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){const t=Object.keys(e.fields||{}).sort();let n="{",r=!0;for(const i of t)r?r=!1:n+=",",n+=`${i}:${Ae(e.fields[i])}`;return n+"}"}(e.mapValue):v();var t,n}function Ce(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function Re(e){return!!e&&"integerValue"in e}function Ne(e){return!!e&&"arrayValue"in e}function De(e){return!!e&&"nullValue"in e}function xe(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Me(e){return!!e&&"mapValue"in e}function Le(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return ee(e.mapValue.fields,((e,n)=>t.mapValue.fields[e]=Le(n))),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=Le(e.arrayValue.values[n]);return t}return Object.assign({},e)}function Pe(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class je{constructor(e){this.value=e}static empty(){return new je({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(t=(t.mapValue.fields||{})[e.get(n)],!Me(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Le(t)}setAll(e){let t=U.emptyPath(),n={},r=[];e.forEach(((e,i)=>{if(!t.isImmediateParentOf(i)){const e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=Le(e):r.push(i.lastSegment())}
vendor: 2,572 bytes, line 2
2));const i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){const t=this.field(e.popLast());Me(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Te(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];Me(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){ee(t,((t,n)=>e[t]=n));for(const t of n)delete e[t]}clone(){return new je(Le(this.value))}}function Fe(e){const t=[];return ee(e.fields,((e,n)=>{const r=new U([e]);if(Me(n)){const e=Fe(n.mapValue).fields;if(0===e.length)t.push(r);else for(const n of e)t.push(r.child(n))}else t.push(r)})),new ae(t)}class $e{constructor(e,t,n,r,i,s){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.data=i,this.documentState=s}static newInvalidDocument(e){return new $e(e,0,P.min(),P.min(),je.empty(),0)}static newFoundDocument(e,t,n){return new $e(e,1,t,P.min(),n,0)}static newNoDocument(e,t){return new $e(e,2,t,P.min(),je.empty(),0)}static newUnknownDocument(e,t){return new $e(e,3,t,P.min(),je.empty(),2)}convertToFoundDocument(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=je.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=je.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=P.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof $e&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new $e(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}
2class Ue{constructor(e,t=null,n=[],r=[],i=null,s=null,o=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=s,this.endAt=o,this.ut=null}}function Ve(e,t=null,n=[],r=[],i=null,s=null,o=null){return new Ue(e,t,n,r,i,s,o)}function Be(e){const t=b(e);if(null===t.ut){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map((e=>{return(t=e).field.canonicalString()+t.op.toString()+ke(t.value);var t})).join(","),e+="|ob:",e+=t.orderBy.map((e=>function(e){return e.field.canonicalString()+e.dir}(e))).join(","),ye(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map((e=>ke(e))).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map((e=>ke(e))).join(",")),t.ut=e}return t.ut}function qe(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!nt(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let i=0;i<e.filters.length;i++)if(n=e.filters[i],r=t.filters[i],n.op!==r.op||!n.field.isEqual(r.field)||!Te(n.value,r.value))return!1;var n,r;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!it(e.startAt,t.startAt)&&it(e.endAt,t.endAt)}function He(e){return V.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class ze extends class{}{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.ct(e,t,n):new We(e,t,n):"array-contains"===t?new Xe(e,n):"in"===t?new Qe(e,n):"not-in"===t?new Ze(e,n):"array-contains-any"===t?new Je(e,n):new ze(e,t,n)}static ct(e,t,n){return"in"===t?new Ke(e,n):new Ge(e,n)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&this.at(Se(t,this.value)):null!==t&&Ee(this.value)===Ee(t)&&this.at(Se(t,this.value))}at(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return v()}}ht(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class We extends ze{constructor(e,t,n){super(e,t,n),this.key=V.fromName(n.referenceValue)}matches(e){const t=V.comparator(e.key,this.key);return this.at(t)}}class Ke extends ze{constructor(e,t){super(e,"in",t),this.keys=Ye("in",t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}}class Ge extends ze{constructor(e,t){super(e,"not-in",t),this.keys=Ye("not-in",t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}}function Ye(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((e=>V.fromName(e.referenceValue)))}class Xe extends ze{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return Ne(t)&&Ie(t.arrayValue,this.value)}}class Qe extends ze{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&Ie(this.value.arrayValue,t)}}class Ze extends ze{constructor(e,t){super(e,"not-in",t)}matches(e){if(Ie(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!Ie(this.value.arrayValue,t)}}class Je extends ze{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!Ne(t)||!t.arrayValue.values)&&t.arrayValue.values.some((e=>Ie(this.value.arrayValue,e)))}}class et{constructor(e,t){this.position=e,this.inclusive=t}}class tt{constructor(e,t="asc"){this.field=e,this.dir=t}}function nt(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function rt(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const s=t[i],o=e.position[i];if(r=s.field.isKeyField()?V.comparator(V.fromName(o.referenceValue),n.key):Se(o,n.data.field(s.field)),"desc"===s.dir&&(r*=-1),0!==r)break}return r}function it(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!Te(e.position[n],t.position[n]))return!1;return!0}class st{constructor(e,t=null,n=[],r=[],i=null,s="F",o=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=s,this.startAt=o,this.endAt=a,this.lt=null,this.ft=null,this.startAt,this.endAt}}function ot(e,t,n,r,i,s,o,a){return new st(e,t,n,r,i,s,o,a)}function at(e){return new st(e)}function ut(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function ct(e){for(const t of e.filters)if(t.ht())return t.field;return null}function lt(e){return null!==e.collectionGroup}function ht(e){const t=b(e);
2if(null===t.lt){t.lt=[];const e=ct(t),n=ut(t);if(null!==e&&null===n)e.isKeyField()||t.lt.push(new tt(e)),t.lt.push(new tt(U.keyField(),"asc"));else{let e=!1;for(const n of t.explicitOrderBy)t.lt.push(n),n.field.isKeyField()&&(e=!0);if(!e){const e=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.lt.push(new tt(U.keyField(),e))}}}return t.lt}function dt(e){const t=b(e);if(!t.ft)if("F"===t.limitType)t.ft=Ve(t.path,t.collectionGroup,ht(t),t.filters,t.limit,t.startAt,t.endAt);else{const e=[];for(const n of ht(t)){const t="desc"===n.dir?"asc":"desc";e.push(new tt(n.field,t))}const n=t.endAt?new et(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new et(t.startAt.position,t.startAt.inclusive):null;t.ft=Ve(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}return t.ft}function ft(e,t,n){return new st(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function pt(e,t){return qe(dt(e),dt(t))&&e.limitType===t.limitType}function gt(e){return`${Be(dt(e))}|lt:${e.limitType}`}function mt(e){return`Query(target=${function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map((e=>{return`${(t=e).field.canonicalString()} ${t.op} ${ke(t.value)}`;var t})).join(", ")}]`),ye(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map((e=>function(e){return`${e.field.canonicalString()} (${e.dir})`}(e))).join(", ")}]`),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((e=>ke(e))).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((e=>ke(e))).join(",")),`Target(${t})`}(dt(e))}; limitType=${e.limitType})`}function vt(e,t){return t.isFoundDocument()&&function(e,t){const n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):V.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(const n of e.explicitOrderBy)if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(const n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){const r=rt(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,ht(e),t))&&!(e.endAt&&!function(e,t,n){const r=rt(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,ht(e),t))}(e,t)}function yt(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function bt(e){return(t,n)=>{let r=!1;for(const i of ht(e)){const e=_t(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}function _t(e,t,n){const r=e.field.isKeyField()?V.comparator(t.key,n.key):function(e,t,n){const r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Se(r,i):v()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return v()}}function wt(e,t){if(e.dt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:be(t)?"-0":t}}function Et(e){return{integerValue:""+e}}function Tt(e,t){return _e(t)?Et(t):wt(e,t)}class It{constructor(){this._=void 0}}function St(e,t,n){return e instanceof At?function(e,t){const n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof Ct?Rt(e,t):e instanceof Nt?Dt(e,t):function(e,t){const n=kt(e,t),r=Mt(n)+Mt(e._t);return Re(n)&&Re(e._t)?Et(r):wt(e.wt,r)}(e,t)}function Ot(e,t,n){return e instanceof Ct?Rt(e,t):e instanceof Nt?Dt(e,t):n}function kt(e,t){return e instanceof xt?Re(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}class At extends It{}class Ct extends It{constructor(e){super(),this.elements=e}}function Rt(e,t){const n=Lt(t);for(const t of e.elements)n.some((e=>Te(e,t)))||n.push(t);return{arrayValue:{values:n}}}class Nt extends It{constructor(e){super(),this.elements=e}}function Dt(e,t){let n=Lt(t);for(const t of e.elements)n=n.filter((e=>!Te(e,t)));return{arrayValue:{values:n}}}class xt extends It{constructor(e,t){super(),this.wt=e,this._t=t}}function Mt(e){return he(e.integerValue||e.doubleValue)}function Lt(e){return Ne(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class Pt{constructor(e,t){this.field=e,this.transform=t}}class jt{constructor(e,t){this.version=e,this.transformResults=t}}class Ft{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Ft}static exists(e){return new Ft(void 0,e)}static updateTime(e){return new Ft(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function $t(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class Ut{}function Vt(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new Qt(e.key,Ft.none()):new Wt(e.key,e.data,Ft.none());{const n=e.data,r=je.empty();let i=new se(U.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new Kt(e.key,r,new ae(i.toArray()),Ft.none())}}function Bt(e,t,n){e instanceof Wt?function(e,t,n){const r=e.value.clone(),i=Yt(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}
2(e,t,n):e instanceof Kt?function(e,t,n){if(!$t(e.precondition,t))return void t.convertToUnknownDocument(n.version);const r=Yt(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Gt(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function qt(e,t,n,r){return e instanceof Wt?function(e,t,n,r){if(!$t(e.precondition,t))return n;const i=e.value.clone(),s=Xt(e.fieldTransforms,r,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof Kt?function(e,t,n,r){if(!$t(e.precondition,t))return n;const i=Xt(e.fieldTransforms,r,t),s=t.data;return s.setAll(Gt(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((e=>e.field)))}(e,t,n,r):function(e,t,n){return $t(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function Ht(e,t){let n=null;for(const r of e.fieldTransforms){const e=t.data.field(r.field),i=kt(r.transform,e||null);null!=i&&(null===n&&(n=je.empty()),n.set(r.field,i))}return n||null}function zt(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&M(e,t,((e,t)=>function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Ct&&t instanceof Ct||e instanceof Nt&&t instanceof Nt?M(e.elements,t.elements,Te):e instanceof xt&&t instanceof xt?Te(e._t,t._t):e instanceof At&&t instanceof At}(e.transform,t.transform)}(e,t)))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class Wt extends Ut{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Kt extends Ut{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function Gt(e){const t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}})),t}function Yt(e,t,n){const r=new Map;y(e.length===n.length);for(let i=0;i<n.length;i++){const s=e[i],o=s.transform,a=t.data.field(s.field);r.set(s.field,Ot(o,a,n[i]))}return r}function Xt(e,t,n){const r=new Map;for(const i of e){const e=i.transform,s=n.data.field(i.field);r.set(i.field,St(e,s,t))}return r}class Qt extends Ut{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class Zt extends Ut{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class Jt{constructor(e){this.count=e}}var en,tn;function nn(e){switch(e){default:return v();case _.CANCELLED:case _.UNKNOWN:case _.DEADLINE_EXCEEDED:case _.RESOURCE_EXHAUSTED:case _.INTERNAL:case _.UNAVAILABLE:case _.UNAUTHENTICATED:return!1;case _.INVALID_ARGUMENT:case _.NOT_FOUND:case _.ALREADY_EXISTS:case _.PERMISSION_DENIED:case _.FAILED_PRECONDITION:case _.ABORTED:case _.OUT_OF_RANGE:case _.UNIMPLEMENTED:case _.DATA_LOSS:return!0}}function rn(e){if(void 0===e)return p("GRPC error has no .code"),_.UNKNOWN;switch(e){case en.OK:return _.OK;case en.CANCELLED:return _.CANCELLED;case en.UNKNOWN:return _.UNKNOWN;case en.DEADLINE_EXCEEDED:return _.DEADLINE_EXCEEDED;case en.RESOURCE_EXHAUSTED:return _.RESOURCE_EXHAUSTED;case en.INTERNAL:return _.INTERNAL;case en.UNAVAILABLE:return _.UNAVAILABLE;case en.UNAUTHENTICATED:return _.UNAUTHENTICATED;case en.INVALID_ARGUMENT:return _.INVALID_ARGUMENT;case en.NOT_FOUND:return _.NOT_FOUND;case en.ALREADY_EXISTS:return _.ALREADY_EXISTS;case en.PERMISSION_DENIED:return _.PERMISSION_DENIED;case en.FAILED_PRECONDITION:return _.FAILED_PRECONDITION;case en.ABORTED:return _.ABORTED;case en.OUT_OF_RANGE:return _.OUT_OF_RANGE;case en.UNIMPLEMENTED:return _.UNIMPLEMENTED;case en.DATA_LOSS:return _.DATA_LOSS;default:return v()}}(tn=en||(en={}))[tn.OK=0]="OK",tn[tn.CANCELLED=1]="CANCELLED",tn[tn.UNKNOWN=2]="UNKNOWN",tn[tn.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",tn[tn.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",tn[tn.NOT_FOUND=5]="NOT_FOUND",tn[tn.ALREADY_EXISTS=6]="ALREADY_EXISTS",tn[tn.PERMISSION_DENIED=7]="PERMISSION_DENIED",tn[tn.UNAUTHENTICATED=16]="UNAUTHENTICATED",tn[tn.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",tn[tn.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",tn[tn.ABORTED=10]="ABORTED",tn[tn.OUT_OF_RANGE=11]="OUT_OF_RANGE",tn[tn.UNIMPLEMENT
2ED=12]="UNIMPLEMENTED",tn[tn.INTERNAL=13]="INTERNAL",tn[tn.UNAVAILABLE=14]="UNAVAILABLE",tn[tn.DATA_LOSS=15]="DATA_LOSS";class sn{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(const[t,r]of n)if(this.equalsFn(t,e))return r}has(e){return void 0!==this.get(e)}set(e,t){const n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return void(r[n]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){ee(this.inner,((t,n)=>{for(const[t,r]of n)e(t,r)}))}isEmpty(){return te(this.inner)}size(){return this.innerSize}}const on=new ne(V.comparator);function an(){return on}const un=new ne(V.comparator);function cn(...e){let t=un;for(const n of e)t=t.insert(n.key,n);return t}function ln(e){let t=un;return e.forEach(((e,n)=>t=t.insert(e,n.overlayedDocument))),t}function hn(){return fn()}function dn(){return fn()}function fn(){return new sn((e=>e.toString()),((e,t)=>e.isEqual(t)))}const pn=new ne(V.comparator),gn=new se(V.comparator);function mn(...e){let t=gn;for(const n of e)t=t.add(n);return t}const vn=new se(x);function yn(){return vn}class bn{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t){const n=new Map;return n.set(e,_n.createSynthesizedTargetChangeForCurrentChange(e,t)),new bn(P.min(),n,yn(),an(),mn())}}class _n{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t){return new _n(ue.EMPTY_BYTE_STRING,t,mn(),mn(),mn())}}class wn{constructor(e,t,n,r){this.gt=e,this.removedTargetIds=t,this.key=n,this.yt=r}}class En{constructor(e,t){this.targetId=e,this.It=t}}class Tn{constructor(e,t,n=ue.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class In{constructor(){this.Tt=0,this.Et=kn(),this.At=ue.EMPTY_BYTE_STRING,this.Rt=!1,this.bt=!0}get current(){return this.Rt}get resumeToken(){return this.At}get Pt(){return 0!==this.Tt}get vt(){return this.bt}Vt(e){e.approximateByteSize()>0&&(this.bt=!0,this.At=e)}St(){let e=mn(),t=mn(),n=mn();return this.Et.forEach(((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:v()}})),new _n(this.At,this.Rt,e,t,n)}Dt(){this.bt=!1,this.Et=kn()}Ct(e,t){this.bt=!0,this.Et=this.Et.insert(e,t)}xt(e){this.bt=!0,this.Et=this.Et.remove(e)}Nt(){this.Tt+=1}kt(){this.Tt-=1}Ot(){this.bt=!0,this.Rt=!0}}class Sn{constructor(e){this.Mt=e,this.Ft=new Map,this.$t=an(),this.Bt=On(),this.Lt=new se(x)}Ut(e){for(const t of e.gt)e.yt&&e.yt.isFoundDocument()?this.qt(t,e.yt):this.Kt(t,e.key,e.yt);for(const t of e.removedTargetIds)this.Kt(t,e.key,e.yt)}Gt(e){this.forEachTarget(e,(t=>{const n=this.Qt(t);switch(e.state){case 0:this.jt(t)&&n.Vt(e.resumeToken);break;case 1:n.kt(),n.Pt||n.Dt(),n.Vt(e.resumeToken);break;case 2:n.kt(),n.Pt||this.removeTarget(t);break;case 3:this.jt(t)&&(n.Ot(),n.Vt(e.resumeToken));break;case 4:this.jt(t)&&(this.Wt(t),n.Vt(e.resumeToken));break;default:v()}}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Ft.forEach(((e,n)=>{this.jt(n)&&t(n)}))}zt(e){const t=e.targetId,n=e.It.count,r=this.Ht(t);if(r){const e=r.target;if(He(e))if(0===n){const n=new V(e.path);this.Kt(t,n,$e.newNoDocument(n,P.min()))}else y(1===n);else this.Jt(t)!==n&&(this.Wt(t),this.Lt=this.Lt.add(t))}}Yt(e){const t=new Map;this.Ft.forEach(((n,r)=>{const i=this.Ht(r);if(i){if(n.current&&He(i.target)){const t=new V(i.target.path);null!==this.$t.get(t)||this.Xt(r,t)||this.Kt(r,t,$e.newNoDocument(t,e))}n.vt&&(t.set(r,n.St()),n.Dt())}}));let n=mn();this.Bt.forEach(((e,t)=>{let r=!0;
2t.forEachWhile((e=>{const t=this.Ht(e);return!t||2===t.purpose||(r=!1,!1)})),r&&(n=n.add(e))})),this.$t.forEach(((t,n)=>n.setReadTime(e)));const r=new bn(e,t,this.Lt,this.$t,n);return this.$t=an(),this.Bt=On(),this.Lt=new se(x),r}qt(e,t){if(!this.jt(e))return;const n=this.Xt(e,t.key)?2:0;this.Qt(e).Ct(t.key,n),this.$t=this.$t.insert(t.key,t),this.Bt=this.Bt.insert(t.key,this.Zt(t.key).add(e))}Kt(e,t,n){if(!this.jt(e))return;const r=this.Qt(e);this.Xt(e,t)?r.Ct(t,1):r.xt(t),this.Bt=this.Bt.insert(t,this.Zt(t).delete(e)),n&&(this.$t=this.$t.insert(t,n))}removeTarget(e){this.Ft.delete(e)}Jt(e){const t=this.Qt(e).St();return this.Mt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Nt(e){this.Qt(e).Nt()}Qt(e){let t=this.Ft.get(e);return t||(t=new In,this.Ft.set(e,t)),t}Zt(e){let t=this.Bt.get(e);return t||(t=new se(x),this.Bt=this.Bt.insert(e,t)),t}jt(e){const t=null!==this.Ht(e);return t||f("WatchChangeAggregator","Detected inactive target",e),t}Ht(e){const t=this.Ft.get(e);return t&&t.Pt?null:this.Mt.te(e)}Wt(e){this.Ft.set(e,new In),this.Mt.getRemoteKeysForTarget(e).forEach((t=>{this.Kt(e,t,null)}))}Xt(e,t){return this.Mt.getRemoteKeysForTarget(e).has(t)}}
2function On(){return new ne(V.comparator)}function kn(){return new ne(V.comparator)}const An={asc:"ASCENDING",desc:"DESCENDING"},Cn={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"};class Rn{constructor(e,t){this.databaseId=e,this.dt=t}}function Nn(e,t){return e.dt?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function Dn(e,t){return e.dt?t.toBase64():t.toUint8Array()}function xn(e,t){return Nn(e,t.toTimestamp())}function Mn(e){return y(!!e),P.fromTimestamp(function(e){const t=le(e);return new L(t.seconds,t.nanos)}(e))}function Ln(e,t){return function(e){return new F(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Pn(e){const t=F.fromString(e);return y(nr(t)),t}function jn(e,t){return Ln(e.databaseId,t.path)}function Fn(e,t){const n=Pn(t);if(n.get(1)!==e.databaseId.projectId)throw new w(_.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new w(_.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new V(Bn(n))}function $n(e,t){return Ln(e.databaseId,t)}function Un(e){const t=Pn(e);return 4===t.length?F.emptyPath():Bn(t)}function Vn(e){return new F(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Bn(e){return y(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function qn(e,t,n){return{name:jn(e,t),fields:n.value.mapValue.fields}}function Hn(e,t){let n;if(t instanceof Wt)n={update:qn(e,t.key,t.value)};else if(t instanceof Qt)n={delete:jn(e,t.key)};else if(t instanceof Kt)n={update:qn(e,t.key,t.data),updateMask:tr(t.fieldMask)};else{if(!(t instanceof Zt))return v();n={verify:jn(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((e=>function(e,t){const n=t.transform;if(n instanceof At)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof Ct)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof Nt)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof xt)return{fieldPath:t.field.canonicalString(),increment:n._t};throw v()}(0,e)))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:xn(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:v()}(e,t.precondition)),n}function zn(e,t){return{documents:[$n(e,t.path)]}}function Wn(e,t){const n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=$n(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=$n(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(e){if(0===e.length)return;const t=e.map((e=>function(e){if("=="===e.op){if(xe(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NAN"}};if(De(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(xe(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NOT_NAN"}};if(De(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Qn(e.field),op:Xn(e.op),value:e.value}}}(e)));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}(t.filters);i&&(n.structuredQuery.where=i);const s=function(e){if(0!==e.length)return e.map((e=>function(e){return{field:Qn(e.field),direction:Yn(e.dir)}}(e)))}(t.orderBy);s&&(n.structuredQuery.orderBy=s);const o=function(e,t){return e.dt||ye(t)?t:{value:t}}(e,t.limit);var a;return null!==o&&(n.structuredQuery.limit=o),t.startAt&&(n.structuredQuery.startAt={before:(a=t.startAt).inclusive,values:a.position}),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}function Kn(e){let t=Un(e.parent);
2const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){y(1===r);const e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let s=[];n.where&&(s=Gn(n.where));let o=[];n.orderBy&&(o=n.orderBy.map((e=>function(e){return new tt(Zn(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e))));let a=null;n.limit&&(a=function(e){let t;return t="object"==typeof e?e.value:e,ye(t)?null:t}(n.limit));let u=null;n.startAt&&(u=function(e){const t=!!e.before,n=e.values||[];return new et(n,t)}(n.startAt));let c=null;return n.endAt&&(c=function(e){const t=!e.before,n=e.values||[];return new et(n,t)}(n.endAt)),ot(t,i,o,s,a,"F",u,c)}function Gn(e){return e?void 0!==e.unaryFilter?[er(e)]:void 0!==e.fieldFilter?[Jn(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((e=>Gn(e))).reduce(((e,t)=>e.concat(t))):v():[]}function Yn(e){return An[e]}function Xn(e){return Cn[e]}function Qn(e){return{fieldPath:e.canonicalString()}}function Zn(e){return U.fromServerFormat(e.fieldPath)}function Jn(e){return ze.create(Zn(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return v()}}(e.fieldFilter.op),e.fieldFilter.value)}function er(e){switch(e.unaryFilter.op){case"IS_NAN":const t=Zn(e.unaryFilter.field);return ze.create(t,"==",{doubleValue:NaN});case"IS_NULL":const n=Zn(e.unaryFilter.field);return ze.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const r=Zn(e.unaryFilter.field);return ze.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const i=Zn(e.unaryFilter.field);return ze.create(i,"!=",{nullValue:"NULL_VALUE"});default:return v()}}function tr(e){const t=[];return e.fields.forEach((e=>t.push(e.canonicalString()))),{fieldPaths:t}}function nr(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}const rr=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],ir=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],sr=ir;class or{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){const n=t.mutationResults;for(let t=0;t<this.mutations.length;t++){const r=this.mutations[t];r.key.isEqual(e.key)&&Bt(r,e,n[t])}}applyToLocalView(e,t){for(const n of this.baseMutations)n.key.isEqual(e.key)&&(t=qt(n,e,t,this.localWriteTime));for(const n of this.mutations)n.key.isEqual(e.key)&&(t=qt(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const n=dn();return this.mutations.forEach((r=>{const i=e.get(r.key),s=i.overlayedDocument;let o=this.applyToLocalView(s,i.mutatedFields);o=t.has(r.key)?null:o;const a=Vt(s,o);null!==a&&n.set(r.key,a),s.isValidDocument()||s.convertToNoDocument(P.min())})),n}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),mn())}isEqual(e){return this.batchId===e.batchId&&M(this.mutations,e.mutations,((e,t)=>zt(e,t)))&&M(this.baseMutations,e.baseMutations,((e,t)=>zt(e,t)))}}class ar{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){y(e.mutations.length===n.length);let r=pn;const i=e.mutations;for(let e=0;e<i.length;e++)r=r.insert(i[e].key,n[e].version);return new ar(e,t,n,r)}}class ur{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{\n      largestBatchId: ${this.largestBatchId},\n      mutation: ${this.mutation.toString()}\n    }`}}class cr{constructor(e,t,n,r,i=P.min(),s=P.min(),o=ue.EMPTY_BYTE_STRING){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o}withSequenceNumber(e){return new cr(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}withResumeToken(e,t){return new cr(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e)}withLastLimboFreeSnapshotVersion(e){return new cr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken)}}class lr{constructor(e){this.ne=e}}function hr(e){const t=Kn({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?ft(t,t.limit,"L"):t}class dr{constructor(){}re(e,t){this.oe(e,t),t.ue()}oe(e,t){if("nullValue"in e)this.ce(t,5);else if("booleanValue"in e)this.ce(t,10),t.ae(e.booleanValue?1:0);else if("integerValue"in e)this.ce(t,15),t.ae(he(e.integerValue));else if("doubleValue"in e){const n=he(e.doubleValue);isNaN(n)?this.ce(t,13):(this.ce(t,15),be(n)?t.ae(0):t.ae(n))}else if("timestampValue"in e){const n=e.timestampValue;this.ce(t,20),"string"==typeof n?t.he(n):(t.he(`${n.seconds||""}`),t.ae(n.nanos||0))}else if("stringValue"in e)this.le(e.stringValue,t),this.fe(t);else if("bytesValue"in e)this.ce(t,30),t.de(de(e.bytesValue)),this.fe(t);else if("referenceValue"in e)this._e(e.referenceValue,t);else if("geoPointValue"in e){const n=e.geoPointValue;this.ce(t,45),t.ae(n.latitude||0),t.ae(n.longitude||0)}else"mapValue"in e?Pe(e)?this.ce(t,Number.MAX_SAFE_INTEGER):(this.we(e.mapValue,t),this.fe(t)):"arrayValue"in e?(this.me(e.arrayValue,t),this.fe(t)):v()}le(e,t){this.ce(t,25),this.ge(e,t)}ge(e,t){t.he(e)}we(e,t){const n=e.fields||{};this.ce(t,55);for(const e of Object.keys(n))this.le(e,t),this.oe(n[e],t)}me(e,t){const n=e.values||[];this.ce(t,50);for(const e of n)this.oe(e,t)}_e(e,t){this.ce(t,37),V.fromName(e).path.forEach((e=>{this.ce(t,60),this.ge(e,t)}))}ce(e,t){e.ae(t)}fe(e){e.ae(2)}}dr.ye=new dr;
2class fr{constructor(){this.ze=new pr}addToCollectionParentIndex(e,t){return this.ze.add(t),X.resolve()}getCollectionParents(e,t){return X.resolve(this.ze.getEntries(t))}addFieldIndex(e,t){return X.resolve()}deleteFieldIndex(e,t){return X.resolve()}getDocumentsMatchingTarget(e,t){return X.resolve(null)}getIndexType(e,t){return X.resolve(0)}getFieldIndexes(e,t){return X.resolve([])}getNextCollectionGroupToUpdate(e){return X.resolve(null)}getMinOffset(e,t){return X.resolve(z.min())}getMinOffsetFromCollectionGroup(e,t){return X.resolve(z.min())}updateCollectionGroup(e,t,n){return X.resolve()}updateIndexEntries(e,t){return X.resolve()}}class pr{constructor(){this.index={}}add(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new se(F.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new se(F.comparator)).toArray()}}new Uint8Array(0);class gr{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new gr(e,gr.DEFAULT_COLLECTION_PERCENTILE,gr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}gr.DEFAULT_COLLECTION_PERCENTILE=10,gr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,gr.DEFAULT=new gr(41943040,gr.DEFAULT_COLLECTION_PERCENTILE,gr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),gr.DISABLED=new gr(-1,0,0);class mr{constructor(e){this.En=e}next(){return this.En+=2,this.En}static An(){return new mr(0)}static Rn(){return new mr(-1)}}class vr{constructor(){this.changes=new sn((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,$e.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?X.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class yr{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class br{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next((r=>(n=r,this.getBaseDocument(e,t,n)))).next((e=>(null!==n&&qt(n.mutation,e,ae.empty(),L.now()),e)))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.getLocalViewOfDocuments(e,t,mn()).next((()=>t))))}getLocalViewOfDocuments(e,t,n=mn()){const r=hn();return this.populateOverlays(e,r,t).next((()=>this.computeViews(e,t,r,n).next((e=>{let t=cn();return e.forEach(((e,n)=>{t=t.insert(e,n.overlayedDocument)})),t}))))}getOverlayedDocuments(e,t){const n=hn();return this.populateOverlays(e,n,t).next((()=>this.computeViews(e,t,n,mn())))}populateOverlays(e,t,n){const r=[];return n.forEach((e=>{t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((e=>{e.forEach(((e,n)=>{t.set(e,n)}))}))}computeViews(e,t,n,r){let i=an();const s=fn(),o=fn();return t.forEach(((e,t)=>{const o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof Kt)?i=i.insert(t.key,t):void 0!==o&&(s.set(t.key,o.mutation.getFieldMask()),qt(o.mutation,t,o.mutation.getFieldMask(),L.now()))})),this.recalculateAndSaveOverlays(e,i).next((e=>(e.forEach(((e,t)=>s.set(e,t))),t.forEach(((e,t)=>{var n;return o.set(e,new yr(t,null!==(n=s.get(e))&&void 0!==n?n:null))})),o)))}recalculateAndSaveOverlays(e,t){const n=fn();let r=new ne(((e,t)=>e-t)),i=mn();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((e=>{for(const i of e)i.keys().forEach((e=>{const s=t.get(e);if(null===s)return;let o=n.get(e)||ae.empty();o=i.applyToLocalView(s,o),n.set(e,o);const a=(r.get(i.batchId)||mn()).add(e);r=r.insert(i.batchId,a)}))})).next((()=>{const s=[],o=r.getReverseIterator();for(;o.hasNext();){const r=o.getNext(),a=r.key,u=r.value,c=dn();u.forEach((e=>{if(!i.has(e)){const r=Vt(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}})),s.push(this.documentOverlayCache.saveOverlays(e,a,c))}return X.waitFor(s)})).next((()=>n))}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.recalculateAndSaveOverlays(e,t)))}getDocumentsMatchingQuery(e,t,n){return function(e){return V.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):lt(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((i=>{const s=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):X.resolve(hn());let o=-1,a=i;return s.next((t=>X.forEach(t,((t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?X.resolve():this.getBaseDocument(e,t,n).next((e=>{a=a.insert(t,e)}))))).next((()=>this.populateOverlays(e,t,i))).next((()=>this.computeViews(e,a,t,mn()))).next((e=>({batchId:o,changes:ln(e)})))))}))}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new V(t)).next((e=>{let t=cn();
vendor: 12,779 bytes, line 2
2return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}getDocumentsMatchingCollectionGroupQuery(e,t,n){const r=t.collectionGroup;let i=cn();return this.indexManager.getCollectionParents(e,r).next((s=>X.forEach(s,(s=>{const o=function(e,t){return new st(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,s.child(r));return this.getDocumentsMatchingCollectionQuery(e,o,n).next((e=>{e.forEach(((e,t)=>{i=i.insert(e,t)}))}))})).next((()=>i))))}getDocumentsMatchingCollectionQuery(e,t,n){let r;return this.remoteDocumentCache.getAllFromCollection(e,t.path,n).next((i=>(r=i,this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId)))).next((e=>{e.forEach(((e,t)=>{const n=t.getKey();null===r.get(n)&&(r=r.insert(n,$e.newInvalidDocument(n)))}));let n=cn();return r.forEach(((r,i)=>{const s=e.get(r);void 0!==s&&qt(s.mutation,i,ae.empty(),L.now()),vt(t,i)&&(n=n.insert(r,i))})),n}))}getBaseDocument(e,t,n){return null===n||1===n.mutation.type?this.remoteDocumentCache.getEntry(e,t):X.resolve($e.newInvalidDocument(t))}}class _r{constructor(e){this.wt=e,this.Jn=new Map,this.Yn=new Map}getBundleMetadata(e,t){return X.resolve(this.Jn.get(t))}saveBundleMetadata(e,t){var n;return this.Jn.set(t.id,{id:(n=t).id,version:n.version,createTime:Mn(n.createTime)}),X.resolve()}getNamedQuery(e,t){return X.resolve(this.Yn.get(t))}saveNamedQuery(e,t){return this.Yn.set(t.name,function(e){return{name:e.name,query:hr(e.bundledQuery),readTime:Mn(e.readTime)}}(t)),X.resolve()}}class wr{constructor(){this.overlays=new ne(V.comparator),this.Xn=new Map}getOverlay(e,t){return X.resolve(this.overlays.get(t))}getOverlays(e,t){const n=hn();return X.forEach(t,(t=>this.getOverlay(e,t).next((e=>{null!==e&&n.set(t,e)})))).next((()=>n))}saveOverlays(e,t,n){return n.forEach(((n,r)=>{this.ie(e,t,r)})),X.resolve()}removeOverlaysForBatchId(e,t,n){const r=this.Xn.get(n);return void 0!==r&&(r.forEach((e=>this.overlays=this.overlays.remove(e))),this.Xn.delete(n)),X.resolve()}getOverlaysForCollection(e,t,n){const r=hn(),i=t.length+1,s=new V(t.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){const e=o.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return X.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new ne(((e,t)=>e-t));const s=this.overlays.getIterator();for(;s.hasNext();){const e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=hn(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}const o=hn(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach(((e,t)=>o.set(e,t))),!(o.size()>=r)););return X.resolve(o)}ie(e,t,n){const r=this.overlays.get(n.key);if(null!==r){const e=this.Xn.get(r.largestBatchId).delete(n.key);this.Xn.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new ur(t,n));let i=this.Xn.get(t);void 0===i&&(i=mn(),this.Xn.set(t,i)),this.Xn.set(t,i.add(n.key))}}class Er{constructor(){this.Zn=new se(Tr.ts),this.es=new se(Tr.ns)}isEmpty(){return this.Zn.isEmpty()}addReference(e,t){const n=new Tr(e,t);this.Zn=this.Zn.add(n),this.es=this.es.add(n)}ss(e,t){e.forEach((e=>this.addReference(e,t)))}removeReference(e,t){this.rs(new Tr(e,t))}os(e,t){e.forEach((e=>this.removeReference(e,t)))}us(e){const t=new V(new F([])),n=new Tr(t,e),r=new Tr(t,e+1),i=[];return this.es.forEachInRange([n,r],(e=>{this.rs(e),i.push(e.key)})),i}cs(){this.Zn.forEach((e=>this.rs(e)))}rs(e){this.Zn=this.Zn.delete(e),this.es=this.es.delete(e)}hs(e){const t=new V(new F([])),n=new Tr(t,e),r=new Tr(t,e+1);let i=mn();return this.es.forEachInRange([n,r],(e=>{i=i.add(e.key)})),i}containsKey(e){const t=new Tr(e,0),n=this.Zn.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class Tr{constructor(e,t){this.key=e,this.ls=t}static ts(e,t){return V.comparator(e.key,t.key)||x(e.ls,t.ls)}static ns(e,t){return x(e.ls,t.ls)||V.comparator(e.key,t.key)}}class Ir{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.fs=1,this.ds=new se(Tr.ts)}checkEmpty(e){return X.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){const i=this.fs;this.fs++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const s=new or(i,t,n,r);this.mutationQueue.push(s);for(const t of r)this.ds=this.ds.add(new Tr(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return X.resolve(s)}lookupMutationBatch(e,t){return X.resolve(this._s(t))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=this.ws(n),i=r<0?0:r;return X.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return X.resolve(0===this.mutationQueue.length?-1:this.fs-1)}getAllMutationBatches(e){return X.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const n=new Tr(t,0),r=new Tr(t,Number.POSITIVE_INFINITY),i=[];return this.ds.forEachInRange([n,r],(e=>{const t=this._s(e.ls);i.push(t)})),X.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new se(x);return t.forEach((e=>{const t=new Tr(e,0),r=new Tr(e,Number.POSITIVE_INFINITY);this.ds.forEachInRange([t,r],(e=>{n=n.add(e.ls)}))})),X.resolve(this.gs(n))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1;let i=n;V.isDocumentKey(i)||(i=i.child(""));const s=new Tr(new V(i),0);let o=new se(x);return this.ds.forEachWhile((e=>{const t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.ls)),!0)}),s),X.resolve(this.gs(o))}gs(e){const t=[];return e.forEach((e=>{const n=this._s(e);null!==n&&t.push(n)})),t}removeMutationBatch(e,t){y(0===this.ys(t.batchId,"removed")),this.mutationQueue.shift();let n=this.ds;return X.forEach(t.mutations,(r=>{const i=new Tr(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)})).next((()=>{this.ds=n}))}In(e){}containsKey(e,t){const n=new Tr(t,0),r=this.ds.firstAfterOrEqual(n);return X.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,X.resolve()}ys(e,t){return this.ws(e)}ws(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}_s(e){const t=this.ws(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class Sr{constructor(e){this.ps=e,this.docs=new ne(V.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const n=t.key,r=this.docs.get(n),i=r?r.size:0,s=this.ps(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const n=this.docs.get(t);return X.resolve(n?n.document.mutableCopy():$e.newInvalidDocument(t))}getEntries(e,t){let n=an();return t.forEach((e=>{const t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():$e.newInvalidDocument(e))})),X.resolve(n)}getAllFromCollection(e,t,n){let r=an();const i=new V(t.child("")),s=this.docs.getIteratorFrom(i);for(;s.hasNext();){const{key:e,value:{document:i}}=s.getNext();if(!t.isPrefixOf(e.path))break;e.path.length>t.length+1||W(H(i),n)<=0||(r=r.insert(i.key,i.mutableCopy()))}return X.resolve(r)}getAllFromCollectionGroup(e,t,n,r){v()}Is(e,t){return X.forEach(this.docs,(e=>t(e)))}newChangeBuffer(e){return new Or(this)}getSize(e){return X.resolve(this.size)}}class Or extends vr{constructor(e){super(),this.zn=e}applyChanges(e){const t=[];return this.changes.forEach(((n,r)=>{r.isValidDocument()?t.push(this.zn.addEntry(e,r)):this.zn.removeEntry(n)})),X.waitFor(t)}getFromCache(e,t){return this.zn.getEntry(e,t)}getAllFromCache(e,t){return this.zn.getEntries(e,t)}}class kr{constructor(e){this.persistence=e,this.Ts=new sn((e=>Be(e)),qe),this.lastRemoteSnapshotVersion=P.min(),this.highestTargetId=0,this.Es=0,this.As=new Er,this.targetCount=0,this.Rs=mr.An()}forEachTarget(e,t){return this.Ts.forEach(((e,n)=>t(n))),X.resolve()}getLastRemoteSnapshotVersion(e){return X.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return X.resolve(this.Es)}allocateTargetId(e){return this.highestTargetId=this.Rs.next(),X.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Es&&(this.Es=t),X.resolve()}vn(e){this.Ts.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.Rs=new mr(t),this.highestTargetId=t),e.sequenceNumber>this.Es&&(this.Es=e.sequenceNumber)}addTargetData(e,t){return this.vn(t),this.targetCount+=1,X.resolve()}updateTargetData(e,t){return this.vn(t),X.resolve()}removeTargetData(e,t){return this.Ts.delete(t.target),this.As.us(t.targetId),this.targetCount-=1,X.resolve()}removeTargets(e,t,n){let r=0;const i=[];return this.Ts.forEach(((s,o)=>{o.sequenceNumber<=t&&null===n.get(o.targetId)&&(this.Ts.delete(s),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)})),X.waitFor(i).next((()=>r))}getTargetCount(e){return X.resolve(this.targetCount)}getTargetData(e,t){const n=this.Ts.get(t)||null;return X.resolve(n)}addMatchingKeys(e,t,n){return this.As.ss(t,n),X.resolve()}removeMatchingKeys(e,t,n){this.As.os(t,n);const r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((t=>{i.push(r.markPotentiallyOrphaned(e,t))})),X.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.As.us(t),X.resolve()}getMatchingKeysForTargetId(e,t){const n=this.As.hs(t);return X.resolve(n)}containsKey(e,t){return X.resolve(this.As.containsKey(t))}}class Ar{constructor(e,t){this.bs={},this.overlays={},this.Ps=new Z(0),this.vs=!1,this.vs=!0,this.referenceDelegate=e(this),this.Vs=new kr(this),this.indexManager=new fr,this.remoteDocumentCache=function(e){return new Sr(e)}((e=>this.referenceDelegate.Ss(e))),this.wt=new lr(t),this.Ds=new _r(this.wt)}start(){return Promise.resolve()}shutdown(){return this.vs=!1,Promise.resolve()}get started(){return this.vs}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new wr,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.bs[e.toKey()];return n||(n=new Ir(t,this.referenceDelegate),this.bs[e.toKey()]=n),n}getTargetCache(){return this.Vs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ds}runTransaction(e,t,n){f("MemoryPersistence","Starting transaction:",e);const r=new Cr(this.Ps.next());return this.referenceDelegate.Cs(),n(r).next((e=>this.referenceDelegate.xs(r).next((()=>e)))).toPromise().then((e=>(r.raiseOnCommittedEvent(),e)))}Ns(e,t){return X.or(Object.values(this.bs).map((n=>()=>n.containsKey(e,t))))}}class Cr extends G{constructor(e){super(),this.currentSequenceNumber=e}}class Rr{constructor(e){this.persistence=e,this.ks=new Er,this.Os=null}static Ms(e){return new Rr(e)}get Fs(){if(this.Os)return this.Os;throw v()}addReference(e,t,n){return this.ks.addReference(n,t),this.Fs.delete(n.toString()),X.resolve()}removeReference(e,t,n){return this.ks.removeReference(n,t),this.Fs.add(n.toString()),X.resolve()}markPotentiallyOrphaned(e,t){return this.Fs.add(t.toString()),X.resolve()}removeTarget(e,t){this.ks.us(t.targetId).forEach((e=>this.Fs.add(e.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next((e=>{e.forEach((e=>this.Fs.add(e.toString())))})).next((()=>n.removeTargetData(e,t)))}Cs(){this.Os=new Set}xs(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return X.forEach(this.Fs,(n=>{const r=V.fromPath(n);return this.$s(e,r).next((e=>{e||t.removeEntry(r,P.min())}))})).next((()=>(this.Os=null,t.apply(e))))}updateLimboDocument(e,t){return this.$s(e,t).next((e=>{e?this.Fs.delete(t.toString()):this.Fs.add(t.toString())}))}Ss(e){return 0}$s(e,t){return X.or([()=>X.resolve(this.ks.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ns(e,t)])}}class Nr{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Pi=n,this.vi=r}static Vi(e,t){let n=mn(),r=mn();for(const e of t.docChanges)switch(e.type){case 0:n=n.add(e.doc.key);break;case 1:r=r.add(e.doc.key)}return new Nr(e,t.fromCache,n,r)}}class Dr{constructor(){this.Si=!1}initialize(e,t){this.Di=e,this.indexManager=t,this.Si=!0}getDocumentsMatchingQuery(e,t,n,r){return this.Ci(e,t).next((i=>i||this.xi(e,t,r,n))).next((n=>n||this.Ni(e,t)))}Ci(e,t){return X.resolve(null)}xi(e,t,n,r){return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||r.isEqual(P.min())?this.Ni(e,t):this.Di.getDocuments(e,n).next((i=>{const o=this.ki(t,i);
2return this.Oi(t,o,n,r)?this.Ni(e,t):(d()<=s.a.DEBUG&&f("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),mt(t)),this.Mi(e,o,t,q(r,-1)))}))}ki(e,t){let n=new se(bt(e));return t.forEach(((t,r)=>{vt(e,r)&&(n=n.add(r))})),n}Oi(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;const i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Ni(e,t){return d()<=s.a.DEBUG&&f("QueryEngine","Using full collection scan to execute query:",mt(t)),this.Di.getDocumentsMatchingQuery(e,t,z.min())}Mi(e,t,n,r){return this.Di.getDocumentsMatchingQuery(e,n,r).next((e=>(t.forEach((t=>{e=e.insert(t.key,t)})),e)))}}class xr{constructor(e,t,n,r){this.persistence=e,this.Fi=t,this.wt=r,this.$i=new ne(x),this.Bi=new sn((e=>Be(e)),qe),this.Li=new Map,this.Ui=e.getRemoteDocumentCache(),this.Vs=e.getTargetCache(),this.Ds=e.getBundleCache(),this.qi(n)}qi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new br(this.Ui,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Ui.setIndexManager(this.indexManager),this.Fi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(t=>e.collect(t,this.$i)))}}function Mr(e,t,n,r){return new xr(e,t,n,r)}async function Lr(e,t){const n=b(e);return await n.persistence.runTransaction("Handle user change","readonly",(e=>{let r;
2return n.mutationQueue.getAllMutationBatches(e).next((i=>(r=i,n.qi(t),n.mutationQueue.getAllMutationBatches(e)))).next((t=>{const i=[],s=[];let o=mn();for(const e of r){i.push(e.batchId);for(const t of e.mutations)o=o.add(t.key)}for(const e of t){s.push(e.batchId);for(const t of e.mutations)o=o.add(t.key)}return n.localDocuments.getDocuments(e,o).next((e=>({Ki:e,removedBatchIds:i,addedBatchIds:s})))}))}))}function Pr(e){const t=b(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(e=>t.Vs.getLastRemoteSnapshotVersion(e)))}function jr(e,t,n){let r=mn(),i=mn();return n.forEach((e=>r=r.add(e))),t.getEntries(e,r).next((e=>{let r=an();return n.forEach(((n,s)=>{const o=e.get(n);s.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),s.isNoDocument()&&s.version.isEqual(P.min())?(t.removeEntry(n,s.readTime),r=r.insert(n,s)):!o.isValidDocument()||s.version.compareTo(o.version)>0||0===s.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(s),r=r.insert(n,s)):f("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",s.version)})),{Gi:r,Qi:i}}))}function Fr(e,t){const n=b(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(e=>(void 0===t&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t))))}function $r(e,t){const n=b(e);return n.persistence.runTransaction("Allocate target","readwrite",(e=>{let r;return n.Vs.getTargetData(e,t).next((i=>i?(r=i,X.resolve(r)):n.Vs.allocateTargetId(e).next((i=>(r=new cr(t,i,0,e.currentSequenceNumber),n.Vs.addTargetData(e,r).next((()=>r)))))))})).then((e=>{const r=n.$i.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.$i=n.$i.insert(e.targetId,e),n.Bi.set(t,e.targetId)),e}))}async function Ur(e,t,n){const r=b(e),i=r.$i.get(t),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,(e=>r.persistence.referenceDelegate.removeTarget(e,i)))}catch(e){if(!Q(e))throw e;f("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}r.$i=r.$i.remove(t),r.Bi.delete(i.target)}function Vr(e,t,n){const r=b(e);let i=P.min(),s=mn();return r.persistence.runTransaction("Execute query","readonly",(e=>function(e,t,n){const r=b(e),i=r.Bi.get(n);return void 0!==i?X.resolve(r.$i.get(i)):r.Vs.getTargetData(t,n)}(r,e,dt(t)).next((t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.Vs.getMatchingKeysForTargetId(e,t.targetId).next((e=>{s=e}))})).next((()=>r.Fi.getDocumentsMatchingQuery(e,t,n?i:P.min(),n?s:mn()))).next((e=>(Br(r,yt(t),e),{documents:e,ji:s})))))}function Br(e,t,n){let r=P.min();n.forEach(((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Li.set(t,r)}class qr{constructor(){this.activeTargetIds=yn()}Xi(e){this.activeTargetIds=this.activeTargetIds.add(e)}Zi(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Yi(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Hr{constructor(){this.Fr=new qr,this.$r={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.Fr.Xi(e),this.$r[e]||"not-current"}updateQueryState(e,t,n){this.$r[e]=t}removeLocalQueryTarget(e){this.Fr.Zi(e)}isLocalQueryTarget(e){return this.Fr.activeTargetIds.has(e)}clearQueryState(e){delete this.$r[e]}getAllActiveQueryTargets(){return this.Fr.activeTargetIds}isActiveQueryTarget(e){return this.Fr.activeTargetIds.has(e)}start(){return this.Fr=new qr,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class zr{Br(e){}shutdown(){}}class Wr{constructor(){this.Lr=()=>this.Ur(),this.qr=()=>this.Kr(),this.Gr=[],this.Qr()}Br(e){this.Gr.push(e)}shutdown(){window.removeEventListener("online",this.Lr),window.removeEventListener("offline",this.qr)}Qr(){window.addEventListener("online",this.Lr),window.addEventListener("offline",this.qr)}Ur(){f("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.Gr)e(0)}Kr(){f("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.Gr)e(1)}static V(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}const Kr={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"};class Gr{constructor(e){this.jr=e.jr,this.Wr=e.Wr}zr(e){this.Hr=e}Jr(e){this.Yr=e}onMessage(e){this.Xr=e}close(){this.Wr()}send(e){this.jr(e)}Zr(){this.Hr()}eo(e){this.Yr(e)}no(e){this.Xr(e)}}class Yr extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http";this.so=t+"://"+e.host,this.io="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}ro(e,t,n,r,i){const s=this.oo(e,t);f("RestConnection","Sending: ",s,n);const o={};return this.uo(o,r,i),this.co(e,s,o,n).then((e=>(f("RestConnection","Received: ",e),e)),(t=>{throw g("RestConnection",`${e} failed with error: `,t,"url: ",s,"request:",n),t}))}ao(e,t,n,r,i){return this.ro(e,t,n,r,i)}uo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+l,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEac
2h(((t,n)=>e[n]=t)),n&&n.headers.forEach(((t,n)=>e[n]=t))}oo(e,t){const n=Kr[e];return`${this.so}/v1/${t}:${n}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}co(e,t,n,r){return new Promise(((i,s)=>{const o=new a.g;o.listenOnce(a.c.COMPLETE,(()=>{try{switch(o.getLastErrorCode()){case a.a.NO_ERROR:const t=o.getResponseJson();f("Connection","XHR received:",JSON.stringify(t)),i(t);break;case a.a.TIMEOUT:f("Connection",'RPC "'+e+'" timed out'),s(new w(_.DEADLINE_EXCEEDED,"Request time out"));break;case a.a.HTTP_ERROR:const n=o.getStatus();if(f("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){const e=o.getResponseJson().error;if(e&&e.status&&e.message){const t=function(e){const t=e.toLowerCase().replace(/_/g,"-");return Object.values(_).indexOf(t)>=0?t:_.UNKNOWN}(e.status);s(new w(t,e.message))}else s(new w(_.UNKNOWN,"Server responded with status "+o.getStatus()))}else s(new w(_.UNAVAILABLE,"Connection failed."));break;default:v()}}finally{f("Connection",'RPC "'+e+'" completed.')}}));const u=JSON.stringify(r);o.send(t,"POST",u,n,15)}))}ho(e,t,n){const r=[this.so,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=Object(a.h)(),s=Object(a.i)(),u={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(u.xmlHttpFactory=new a.d({})),this.uo(u.initMessageHeaders,t,n),Object(o.q)()||Object(o.r)()||Object(o.m)()||Object(o.o)()||Object(o.t)()||Object(o.l)()||(u.httpHeadersOverwriteParam="$httpHeaders");const c=r.join("");f("Connection","Creating WebChannel: "+c,u);const l=i.createWebChannel(c,u);let h=!1,d=!1;const p=new Gr({jr:e=>{d?f("Connection","Not sending because WebChannel is closed:",e):(h||(f("Connection","Opening WebChannel transport."),l.open(),h=!0),f("Connection","WebChannel sending:",e),l.send(e))},Wr:()=>l.close()}),m=(e,t,n)=>{e.listen(t,(e=>{try{n(e)}catch(e){setTimeout((()=>{throw e}),0)}}))};return m(l,a.f.EventType.OPEN,(()=>{d||f("Connection","WebChannel transport opened.")})),m(l,a.f.EventType.CLOSE,(()=>{d||(d=!0,f("Connection","WebChannel transport closed"),p.eo())})),m(l,a.f.EventType.ERROR,(e=>{d||(d=!0,g("Connection","WebChannel transport errored:",e),p.eo(new w(_.UNAVAILABLE,"The operation could not be completed")))})),m(l,a.f.EventType.MESSAGE,(e=>{var t;if(!d){const n=e.data[0];y(!!n);const r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){f("Connection","WebChannel received error:",i);const e=i.status;let t=function(e){const t=en[e];if(void 0!==t)return rn(t)}(e),n=i.message;void 0===t&&(t=_.INTERNAL,n="Unknown error status: "+e+" with message "+i.message),d=!0,p.eo(new w(t,n)),l.close()}else f("Connection","WebChannel received:",n),p.no(n)}})),m(s,a.b.STAT_EVENT,(e=>{e.stat===a.e.PROXY?f("Connection","Detected buffering proxy"):e.stat===a.e.NOPROXY&&f("Connection","Detected no buffering proxy")})),setTimeout((()=>{p.Zr()}),0),p}}function Xr(){return"undefined"!=typeof document?document:null}function Qr(e){return new Rn(e,!0)}class Zr{constructor(e,t,n=1e3,r=1.5,i=6e4){this.js=e,this.timerId=t,this.lo=n,this.fo=r,this._o=i,this.wo=0,this.mo=null,this.yo=Date.now(),this.reset()}reset(){this.wo=0}po(){this.wo=this._o}Io(e){this.cancel();const t=Math.floor(this.wo+this.To()),n=Math.max(0,Date.now()-this.yo),r=Math.max(0,t-n);r>0&&f("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.wo} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.mo=this.js.enqueueAfterDelay(this.timerId,r,(()=>(this.yo=Date.now(),e()))),this.wo*=this.fo,this.wo<this.lo&&(this.wo=this.lo),this.wo>this._o&&(this.wo=this._o)}Eo(){null!==this.mo&&(this.mo.skipDelay(),this.mo=null)}cancel(){null!==this.mo&&(this.mo.cancel(),this.mo=null)}To(){return(Math.random()-.5)*this.wo}}class Jr{constructor(e,t,n,r,i,s,o,a){this.js=e,this.Ao=n,this.Ro=r,this.bo=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=a,this.state=0,this.Po=0,this.vo=null,this.Vo=null,this.stream=null,this.So=new Zr(e,t)}Do(){return 1===this.state||5===this.state||this.Co()}Co(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.xo()}async stop(){this.Do()&&await this.close(0)}No(){this.state=0,this.So.reset()}ko(){this.Co()&&null===this.vo&&(this.vo=this.js.enqueueAfterDelay(this.Ao,6e4,(()=>this.Oo())))}Mo(e){this.Fo(),this.stream.send(e)}async Oo(){if(this.Co())return this.close(0)}Fo(){this.vo&&(this.vo.cancel(),this.vo=null)}$o(){this.Vo&&(this.Vo.cancel(),this.Vo=null)}async close(e,t){this.Fo(),this.$o(),this.So.cancel(),this.Po++,4!==e?this.So.reset():t&&t.code===_.RESOURCE_EXHAUSTED?(p(t.toString()),p("Using maximum backoff delay to prevent overloading the backend."),this.So.po()):t&&t.code===_.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Bo(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Jr(t)}Bo(){}auth(){this.state=1;const e=this.Lo(this.Po),t=this.Po;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([e,n])=>{this.Po===t&&this.Uo(e,n)}),(t=>{e((()=>{const e=new w(_.UNKNOWN,"Fetching auth token failed: "+t.message);return this.qo(e)}))}))}Uo(e,t){const n=this.Lo(this.Po);this.stream=this.Ko(e,t),this.stream.zr((()=>{n((()=>(this.state=2,this.Vo=this.js.enqueueAfterDelay(this.Ro,1e4,(()=>(this.Co()&&(this.state=3),Promise.resolve()))),this.listener.zr())))}
2)),this.stream.Jr((e=>{n((()=>this.qo(e)))})),this.stream.onMessage((e=>{n((()=>this.onMessage(e)))}))}xo(){this.state=5,this.So.Io((async()=>{this.state=0,this.start()}))}qo(e){return f("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Lo(e){return t=>{this.js.enqueueAndForget((()=>this.Po===e?t():(f("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class ei extends Jr{constructor(e,t,n,r,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,s),this.wt=i}Ko(e,t){return this.bo.ho("Listen",e,t)}onMessage(e){this.So.reset();const t=function(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:v()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],s=function(e,t){return e.dt?(y(void 0===t||"string"==typeof t),ue.fromBase64String(t||"")):(y(void 0===t||t instanceof Uint8Array),ue.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,a=o&&function(e){const t=void 0===e.code?_.UNKNOWN:rn(e.code);return new w(t,e.message||"")}(o);n=new Tn(r,i,s,a||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=Fn(e,r.document.name),s=Mn(r.document.updateTime),o=new je({mapValue:{fields:r.document.fields}}),a=$e.newFoundDocument(i,s,o),u=r.targetIds||[],c=r.removedTargetIds||[];n=new wn(u,c,a.key,a)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=Fn(e,r.document),s=r.readTime?Mn(r.readTime):P.min(),o=$e.newNoDocument(i,s),a=r.removedTargetIds||[];n=new wn([],a,o.key,o)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=Fn(e,r.document),s=r.removedTargetIds||[];n=new wn([],s,i,null)}else{if(!("filter"in t))return v();{t.filter;const e=t.filter;e.targetId;const r=e.count||0,i=new Jt(r),s=e.targetId;n=new En(s,i)}}return n}(this.wt,e),n=function(e){if(!("targetChange"in e))return P.min();const t=e.targetChange;return t.targetIds&&t.targetIds.length?P.min():t.readTime?Mn(t.readTime):P.min()}(e);return this.listener.Go(t,n)}Qo(e){const t={};t.database=Vn(this.wt),t.addTarget=function(e,t){let n;const r=t.target;return n=He(r)?{documents:zn(e,r)}:{query:Wn(e,r)},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=Dn(e,t.resumeToken):t.snapshotVersion.compareTo(P.min())>0&&(n.readTime=Nn(e,t.snapshotVersion.toTimestamp())),n}(this.wt,e);const n=function(e,t){const n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return v()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.wt,e);n&&(t.labels=n),this.Mo(t)}jo(e){const t={};t.database=Vn(this.wt),t.removeTarget=e,this.Mo(t)}}class ti extends Jr{constructor(e,t,n,r,i,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,s),this.wt=i,this.Wo=!1}get zo(){return this.Wo}start(){this.Wo=!1,this.lastStreamToken=void 0,super.start()}Bo(){this.Wo&&this.Ho([])}Ko(e,t){return this.bo.ho("Write",e,t)}onMessage(e){if(y(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Wo){this.So.reset();const t=function(e,t){return e&&e.length>0?(y(void 0!==t),e.map((e=>function(e,t){let n=e.updateTime?Mn(e.updateTime):Mn(t);return n.isEqual(P.min())&&(n=Mn(t)),new jt(n,e.transformResults||[])}(e,t)))):[]}(e.writeResults,e.commitTime),n=Mn(e.commitTime);return this.listener.Jo(n,t)}return y(!e.writeResults||0===e.writeResults.length),this.Wo=!0,this.listener.Yo()}Xo(){const e={};e.database=Vn(this.wt),this.Mo(e)}Ho(e){const t={streamToken:this.lastStreamToken,writes:e.map((e=>Hn(this.wt,e)))};this.Mo(t)}}class ni extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.bo=n,this.wt=r,this.Zo=!1}tu(){if(this.Zo)throw new w(_.FAILED_PRECONDITION,"The client has already been terminated.")}ro(e,t,n){return this.tu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([r,i])=>
2this.bo.ro(e,t,n,r,i))).catch((e=>{throw"FirebaseError"===e.name?(e.code===_.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new w(_.UNKNOWN,e.toString())}))}ao(e,t,n){return this.tu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([r,i])=>this.bo.ao(e,t,n,r,i))).catch((e=>{throw"FirebaseError"===e.name?(e.code===_.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new w(_.UNKNOWN,e.toString())}))}terminate(){this.Zo=!0}}class ri{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.eu=0,this.nu=null,this.su=!0}iu(){0===this.eu&&(this.ru("Unknown"),this.nu=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.nu=null,this.ou("Backend didn't respond within 10 seconds."),this.ru("Offline"),Promise.resolve()))))}uu(e){"Online"===this.state?this.ru("Unknown"):(this.eu++,this.eu>=1&&(this.cu(),this.ou(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ru("Offline")))}set(e){this.cu(),this.eu=0,"Online"===e&&(this.su=!1),this.ru(e)}ru(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ou(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.su?(p(t),this.su=!1):f("OnlineStateTracker",t)}cu(){null!==this.nu&&(this.nu.cancel(),this.nu=null)}}class ii{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.au=[],this.hu=new Map,this.lu=new Set,this.fu=[],this.du=i,this.du.Br((e=>{n.enqueueAndForget((async()=>{fi(this)&&(f("RemoteStore","Restarting streams for network reachability change."),await async function(e){const t=b(e);t.lu.add(4),await oi(t),t._u.set("Unknown"),t.lu.delete(4),await si(t)}(this))}))})),this._u=new ri(n,r)}}async function si(e){if(fi(e))for(const t of e.fu)await t(!0)}async function oi(e){for(const t of e.fu)await t(!1)}function ai(e,t){const n=b(e);n.hu.has(t.targetId)||(n.hu.set(t.targetId,t),di(n)?hi(n):Ni(n).Co()&&ci(n,t))}function ui(e,t){const n=b(e),r=Ni(n);n.hu.delete(t),r.Co()&&li(n,t),0===n.hu.size&&(r.Co()?r.ko():fi(n)&&n._u.set("Unknown"))}function ci(e,t){e.wu.Nt(t.targetId),Ni(e).Qo(t)}function li(e,t){e.wu.Nt(t),Ni(e).jo(t)}function hi(e){e.wu=new Sn({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),te:t=>e.hu.get(t)||null}),Ni(e).start(),e._u.iu()}function di(e){return fi(e)&&!Ni(e).Do()&&e.hu.size>0}function fi(e){return 0===b(e).lu.size}function pi(e){e.wu=void 0}async function gi(e){e.hu.forEach(((t,n)=>{ci(e,t)}))}async function mi(e,t){pi(e),di(e)?(e._u.uu(t),hi(e)):e._u.set("Unknown")}async function vi(e,t,n){if(e._u.set("Online"),t instanceof Tn&&2===t.state&&t.cause)try{await async function(e,t){const n=t.cause;for(const r of t.targetIds)e.hu.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.hu.delete(r),e.wu.removeTarget(r))}(e,t)}catch(n){f("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await yi(e,n)}else if(t instanceof wn?e.wu.Ut(t):t instanceof En?e.wu.zt(t):e.wu.Gt(t),!n.isEqual(P.min()))try{const t=await Pr(e.localStore);n.compareTo(t)>=0&&await function(e,t){const n=e.wu.Yt(t);
vendor: 5,054 bytes, line 2
2return n.targetChanges.forEach(((n,r)=>{if(n.resumeToken.approximateByteSize()>0){const i=e.hu.get(r);i&&e.hu.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((t=>{const n=e.hu.get(t);if(!n)return;e.hu.set(t,n.withResumeToken(ue.EMPTY_BYTE_STRING,n.snapshotVersion)),li(e,t);const r=new cr(n.target,t,1,n.sequenceNumber);ci(e,r)})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){f("RemoteStore","Failed to raise snapshot:",t),await yi(e,t)}}async function yi(e,t,n){if(!Q(t))throw t;e.lu.add(1),await oi(e),e._u.set("Offline"),n||(n=()=>Pr(e.localStore)),e.asyncQueue.enqueueRetryable((async()=>{f("RemoteStore","Retrying IndexedDB access"),await n(),e.lu.delete(1),await si(e)}))}function bi(e,t){return t().catch((n=>yi(e,n,t)))}async function _i(e){const t=b(e),n=Di(t);let r=t.au.length>0?t.au[t.au.length-1].batchId:-1;for(;wi(t);)try{const e=await Fr(t.localStore,r);if(null===e){0===t.au.length&&n.ko();break}r=e.batchId,Ei(t,e)}catch(e){await yi(t,e)}Ti(t)&&Ii(t)}function wi(e){return fi(e)&&e.au.length<10}function Ei(e,t){e.au.push(t);const n=Di(e);n.Co()&&n.zo&&n.Ho(t.mutations)}function Ti(e){return fi(e)&&!Di(e).Do()&&e.au.length>0}function Ii(e){Di(e).start()}async function Si(e){Di(e).Xo()}async function Oi(e){const t=Di(e);for(const n of e.au)t.Ho(n.mutations)}async function ki(e,t,n){const r=e.au.shift(),i=ar.from(r,t,n);await bi(e,(()=>e.remoteSyncer.applySuccessfulWrite(i))),await _i(e)}async function Ai(e,t){t&&Di(e).zo&&await async function(e,t){if(nn(n=t.code)&&n!==_.ABORTED){const n=e.au.shift();Di(e).No(),await bi(e,(()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t))),await _i(e)}var n}(e,t),Ti(e)&&Ii(e)}async function Ci(e,t){const n=b(e);n.asyncQueue.verifyOperationInProgress(),f("RemoteStore","RemoteStore received new credentials");const r=fi(n);n.lu.add(3),await oi(n),r&&n._u.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.lu.delete(3),await si(n)}async function Ri(e,t){const n=b(e);t?(n.lu.delete(2),await si(n)):t||(n.lu.add(2),await oi(n),n._u.set("Unknown"))}function Ni(e){return e.mu||(e.mu=function(e,t,n){const r=b(e);return r.tu(),new ei(t,r.bo,r.authCredentials,r.appCheckCredentials,r.wt,n)}(e.datastore,e.asyncQueue,{zr:gi.bind(null,e),Jr:mi.bind(null,e),Go:vi.bind(null,e)}),e.fu.push((async t=>{t?(e.mu.No(),di(e)?hi(e):e._u.set("Unknown")):(await e.mu.stop(),pi(e))}))),e.mu}function Di(e){return e.gu||(e.gu=function(e,t,n){const r=b(e);return r.tu(),new ti(t,r.bo,r.authCredentials,r.appCheckCredentials,r.wt,n)}(e.datastore,e.asyncQueue,{zr:Si.bind(null,e),Jr:Ai.bind(null,e),Yo:Oi.bind(null,e),Jo:ki.bind(null,e)}),e.fu.push((async t=>{t?(e.gu.No(),await _i(e)):(await e.gu.stop(),e.au.length>0&&(f("RemoteStore",`Stopping write stream with ${e.au.length} pending writes`),e.au=[]))}))),e.gu}class xi{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new E,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((e=>{}))}static createAndSchedule(e,t,n,r,i){const s=Date.now()+n,o=new xi(e,t,s,r,i);return o.start(n),o}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new w(_.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Mi(e,t){if(p("AsyncQueue",`${t}: ${e}`),Q(e))return new w(_.UNAVAILABLE,`${t}: ${e}`);throw e}class Li{constructor(e){this.comparator=e?(t,n)=>e(t,n)||V.comparator(t.key,n.key):(e,t)=>V.comparator(e.key,t.key),this.keyedMap=cn(),this.sortedSet=new ne(this.comparator)}static emptySet(e){return new Li(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,n)=>(e(t),!1)))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof Li))return!1;if(this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){const e=[];return this.forEach((t=>{e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}copy(e,t){const n=new Li;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}
2class Pi{constructor(){this.yu=new ne(V.comparator)}track(e){const t=e.doc.key,n=this.yu.get(t);n?0!==e.type&&3===n.type?this.yu=this.yu.insert(t,e):3===e.type&&1!==n.type?this.yu=this.yu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.yu=this.yu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.yu=this.yu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.yu=this.yu.remove(t):1===e.type&&2===n.type?this.yu=this.yu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.yu=this.yu.insert(t,{type:2,doc:e.doc}):v():this.yu=this.yu.insert(t,e)}pu(){const e=[];return this.yu.inorderTraversal(((t,n)=>{e.push(n)})),e}}class ji{constructor(e,t,n,r,i,s,o,a){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=a}static fromInitialDocuments(e,t,n,r){const i=[];return t.forEach((e=>{i.push({type:0,doc:e})})),new ji(e,t,Li.emptySet(t),i,n,r,!0,!1)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&pt(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==n[e].type||!t[e].doc.isEqual(n[e].doc))return!1;return!0}}class Fi{constructor(){this.Iu=void 0,this.listeners=[]}}class $i{constructor(){this.queries=new sn((e=>gt(e)),pt),this.onlineState="Unknown",this.Tu=new Set}}async function Ui(e,t){const n=b(e),r=t.query;let i=!1,s=n.queries.get(r);if(s||(i=!0,s=new Fi),i)try{s.Iu=await n.onListen(r)}catch(e){const n=Mi(e,`Initialization of query '${mt(t.query)}' failed`);return void t.onError(n)}n.queries.set(r,s),s.listeners.push(t),t.Eu(n.onlineState),s.Iu&&t.Au(s.Iu)&&Hi(n)}async function Vi(e,t){const n=b(e),r=t.query;let i=!1;const s=n.queries.get(r);if(s){const e=s.listeners.indexOf(t);e>=0&&(s.listeners.splice(e,1),i=0===s.listeners.length)}if(i)return n.queries.delete(r),n.onUnlisten(r)}function Bi(e,t){const n=b(e);let r=!1;for(const e of t){const t=e.query,i=n.queries.get(t);if(i){for(const t of i.listeners)t.Au(e)&&(r=!0);i.Iu=e}}r&&Hi(n)}function qi(e,t,n){const r=b(e),i=r.queries.get(t);if(i)for(const e of i.listeners)e.onError(n);r.queries.delete(t)}function Hi(e){e.Tu.forEach((e=>{e.next()}))}class zi{constructor(e,t,n){this.query=e,this.Ru=t,this.bu=!1,this.Pu=null,this.onlineState="Unknown",this.options=n||{}}Au(e){if(!this.options.includeMetadataChanges){const t=[];for(const n of e.docChanges)3!==n.type&&t.push(n);e=new ji(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}let t=!1;return this.bu?this.vu(e)&&(this.Ru.next(e),t=!0):this.Vu(e,this.onlineState)&&(this.Su(e),t=!0),this.Pu=e,t}onError(e){this.Ru.error(e)}Eu(e){this.onlineState=e;let t=!1;return this.Pu&&!this.bu&&this.Vu(this.Pu,e)&&(this.Su(this.Pu),t=!0),t}Vu(e,t){if(!e.fromCache)return!0;const n="Offline"!==t;return!(this.options.Du&&n||e.docs.isEmpty()&&"Offline"!==t)}vu(e){if(e.docChanges.length>0)return!0;const t=this.Pu&&this.Pu.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Su(e){e=ji.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.bu=!0,this.Ru.next(e)}}class Wi{constructor(e){this.key=e}}class Ki{constructor(e){this.key=e}}class Gi{constructor(e,t){this.query=e,this.Fu=t,this.$u=null,this.current=!1,this.Bu=mn(),this.mutatedKeys=mn(),this.Lu=bt(e),this.Uu=new Li(this.Lu)}get qu(){return this.Fu}Ku(e,t){const n=t?t.Gu:new Pi,r=t?t.Uu:this.Uu;let i=t?t.mutatedKeys:this.mutatedKeys,s=r,o=!1;const a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,u="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal(((e,t)=>{const c=r.get(e),l=vt(this.query,t)?t:null,h=!!c&&this.mutatedKeys.has(c.key),d=!!l&&(l.hasLocalMutations||this.mutatedKeys.has(l.key)&&l.hasCommittedMutations);let f=!1;c&&l?c.data.isEqual(l.data)?h!==d&&(n.track({type:3,doc:l}),f=!0):this.Qu(c,l)||(n.track({type:2,doc:l}),f=!0,(a&&this.Lu(l,a)>0||u&&this.Lu(l,u)<0)&&(o=!0)):!c&&l?(n.track({type:0,doc:l}),f=!0):c&&!l&&(n.track({type:1,doc:c}),f=!0,(a||u)&&(o=!0)),f&&(l?(s=s.add(l),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))})),null!==this.query.limit)for(;s.size>this.query.limit;
2){const e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{Uu:s,Gu:n,Oi:o,mutatedKeys:i}}Qu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n){const r=this.Uu;this.Uu=e.Uu,this.mutatedKeys=e.mutatedKeys;const i=e.Gu.pu();i.sort(((e,t)=>function(e,t){const n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return v()}};return n(e)-n(t)}(e.type,t.type)||this.Lu(e.doc,t.doc))),this.ju(n);const s=t?this.Wu():[],o=0===this.Bu.size&&this.current?1:0,a=o!==this.$u;return this.$u=o,0!==i.length||a?{snapshot:new ji(this.query,e.Uu,r,i,e.mutatedKeys,0===o,a,!1),zu:s}:{zu:s}}Eu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Uu:this.Uu,Gu:new Pi,mutatedKeys:this.mutatedKeys,Oi:!1},!1)):{zu:[]}}Hu(e){return!this.Fu.has(e)&&!!this.Uu.has(e)&&!this.Uu.get(e).hasLocalMutations}ju(e){e&&(e.addedDocuments.forEach((e=>this.Fu=this.Fu.add(e))),e.modifiedDocuments.forEach((e=>{})),e.removedDocuments.forEach((e=>this.Fu=this.Fu.delete(e))),this.current=e.current)}Wu(){if(!this.current)return[];const e=this.Bu;this.Bu=mn(),this.Uu.forEach((e=>{this.Hu(e.key)&&(this.Bu=this.Bu.add(e.key))}));const t=[];return e.forEach((e=>{this.Bu.has(e)||t.push(new Ki(e))})),this.Bu.forEach((n=>{e.has(n)||t.push(new Wi(n))})),t}Ju(e){this.Fu=e.ji,this.Bu=mn();const t=this.Ku(e.documents);return this.applyChanges(t,!0)}Yu(){return ji.fromInitialDocuments(this.query,this.Uu,this.mutatedKeys,0===this.$u)}}class Yi{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class Xi{constructor(e){this.key=e,this.Xu=!1}}class Qi{constructor(e,t,n,r,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.Zu={},this.tc=new sn((e=>gt(e)),pt),this.ec=new Map,this.nc=new Set,this.sc=new ne(V.comparator),this.ic=new Map,this.rc=new Er,this.oc={},this.uc=new Map,this.cc=mr.Rn(),this.onlineState="Unknown",this.ac=void 0}get isPrimaryClient(){return!0===this.ac}}async function Zi(e,t){const n=ms(e);let r,i;const s=n.tc.get(t);if(s)r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.Yu();else{const e=await $r(n.localStore,dt(t));n.isPrimaryClient&&ai(n.remoteStore,e);const s=n.sharedClientState.addLocalQueryTarget(e.targetId);r=e.targetId,i=await Ji(n,t,r,"current"===s)}return i}async function Ji(e,t,n,r){e.hc=(t,n,r)=>async function(e,t,n,r){let i=t.view.Ku(n);i.Oi&&(i=await Vr(e.localStore,t.query,!1).then((({documents:e})=>t.view.Ku(e,i))));const s=r&&r.targetChanges.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s);return ls(e,t.targetId,o.zu),o.snapshot}(e,t,n,r);const i=await Vr(e.localStore,t,!0),s=new Gi(t,i.ji),o=s.Ku(i.documents),a=_n.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState),u=s.applyChanges(o,e.isPrimaryClient,a);ls(e,n,u.zu);const c=new Yi(t,n,s);return e.tc.set(t,c),e.ec.has(n)?e.ec.get(n).push(t):e.ec.set(n,[t]),u.snapshot}async function es(e,t){const n=b(e),r=n.tc.get(t),i=n.ec.get(r.targetId);if(i.length>1)return n.ec.set(r.targetId,i.filter((e=>!pt(e,t)))),void n.tc.delete(t);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Ur(n.localStore,r.targetId,!1).then((()=>{n.sharedClientState.clearQueryState(r.targetId),ui(n.remoteStore,r.targetId),us(n,r.targetId)})).catch(Y)):(us(n,r.targetId),await Ur(n.localStore,r.targetId,!0))}async function ts(e,t){const n=b(e);try{const e=await function(e,t){const n=b(e),r=t.snapshotVersion;let i=n.$i;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(e=>{const s=n.Ui.newChangeBuffer({trackRemovals:!0});i=n.$i;const o=[];
2t.targetChanges.forEach(((s,a)=>{const u=i.get(a);if(!u)return;o.push(n.Vs.removeMatchingKeys(e,s.removedDocuments,a).next((()=>n.Vs.addMatchingKeys(e,s.addedDocuments,a))));let c=u.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(a)?c=c.withResumeToken(ue.EMPTY_BYTE_STRING,P.min()).withLastLimboFreeSnapshotVersion(P.min()):s.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(s.resumeToken,r)),i=i.insert(a,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(u,c,s)&&o.push(n.Vs.updateTargetData(e,c))}));let a=an(),u=mn();if(t.documentUpdates.forEach((r=>{t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(jr(e,s,t.documentUpdates).next((e=>{a=e.Gi,u=e.Qi}))),!r.isEqual(P.min())){const t=n.Vs.getLastRemoteSnapshotVersion(e).next((t=>n.Vs.setTargetsMetadata(e,e.currentSequenceNumber,r)));o.push(t)}return X.waitFor(o).next((()=>s.apply(e))).next((()=>n.localDocuments.getLocalViewOfDocuments(e,a,u))).next((()=>a))})).then((e=>(n.$i=i,e)))}(n.localStore,t);
2t.targetChanges.forEach(((e,t)=>{const r=n.ic.get(t);r&&(y(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?r.Xu=!0:e.modifiedDocuments.size>0?y(r.Xu):e.removedDocuments.size>0&&(y(r.Xu),r.Xu=!1))})),await fs(n,e,t)}catch(e){await Y(e)}}function ns(e,t,n){const r=b(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){const e=[];r.tc.forEach(((n,r)=>{const i=r.view.Eu(t);i.snapshot&&e.push(i.snapshot)})),function(e,t){const n=b(e);n.onlineState=t;let r=!1;n.queries.forEach(((e,n)=>{for(const e of n.listeners)e.Eu(t)&&(r=!0)})),r&&Hi(n)}(r.eventManager,t),e.length&&r.Zu.Go(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function rs(e,t,n){const r=b(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.ic.get(t),s=i&&i.key;if(s){let e=new ne(V.comparator);e=e.insert(s,$e.newNoDocument(s,P.min()));const n=mn().add(s),i=new bn(P.min(),new Map,new se(x),e,n);await ts(r,i),r.sc=r.sc.remove(s),r.ic.delete(t),ds(r)}else await Ur(r.localStore,t,!1).then((()=>us(r,t,n))).catch(Y)}async function is(e,t){const n=b(e),r=t.batch.batchId;try{const e=await function(e,t){const n=b(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(e=>{const r=t.batch.keys(),i=n.Ui.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){const i=n.batch,s=i.keys();let o=X.resolve();return s.forEach((e=>{o=o.next((()=>r.getEntry(t,e))).next((t=>{const s=n.docVersions.get(e);y(null!==s),t.version.compareTo(s)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((()=>e.mutationQueue.removeMutationBatch(t,i)))}(n,e,t,i).next((()=>i.apply(e))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=mn();for(let n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t)))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(n.localStore,t);as(n,r,null),os(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await fs(n,e)}catch(e){await Y(e)}}async function ss(e,t,n){const r=b(e);try{const e=await function(e,t){const n=b(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(e=>{let r;
2return n.mutationQueue.lookupMutationBatch(e,t).next((t=>(y(null!==t),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(r.localStore,t);as(r,t,n),os(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await fs(r,e)}catch(n){await Y(n)}}function os(e,t){(e.uc.get(t)||[]).forEach((e=>{e.resolve()})),e.uc.delete(t)}function as(e,t,n){const r=b(e);let i=r.oc[r.currentUser.toKey()];if(i){const e=i.get(t);e&&(n?e.reject(n):e.resolve(),i=i.remove(t)),r.oc[r.currentUser.toKey()]=i}}function us(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.ec.get(t))e.tc.delete(r),n&&e.Zu.lc(r,n);e.ec.delete(t),e.isPrimaryClient&&e.rc.us(t).forEach((t=>{e.rc.containsKey(t)||cs(e,t)}))}function cs(e,t){e.nc.delete(t.path.canonicalString());const n=e.sc.get(t);null!==n&&(ui(e.remoteStore,n),e.sc=e.sc.remove(t),e.ic.delete(n),ds(e))}function ls(e,t,n){for(const r of n)r instanceof Wi?(e.rc.addReference(r.key,t),hs(e,r)):r instanceof Ki?(f("SyncEngine","Document no longer in limbo: "+r.key),e.rc.removeReference(r.key,t),e.rc.containsKey(r.key)||cs(e,r.key)):v()}function hs(e,t){const n=t.key,r=n.path.canonicalString();e.sc.get(n)||e.nc.has(r)||(f("SyncEngine","New document in limbo: "+n),e.nc.add(r),ds(e))}function ds(e){for(;e.nc.size>0&&e.sc.size<e.maxConcurrentLimboResolutions;){const t=e.nc.values().next().value;e.nc.delete(t);const n=new V(F.fromString(t)),r=e.cc.next();e.ic.set(r,new Xi(n)),e.sc=e.sc.insert(n,r),ai(e.remoteStore,new cr(dt(at(n.path)),r,2,Z.ot))}}async function fs(e,t,n){const r=b(e),i=[],s=[],o=[];
2r.tc.isEmpty()||(r.tc.forEach(((e,a)=>{o.push(r.hc(a,t,n).then((e=>{if(e){r.isPrimaryClient&&r.sharedClientState.updateQueryState(a.targetId,e.fromCache?"not-current":"current"),i.push(e);const t=Nr.Vi(a.targetId,e);s.push(t)}})))})),await Promise.all(o),r.Zu.Go(i),await async function(e,t){const n=b(e);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(e=>X.forEach(t,(t=>X.forEach(t.Pi,(r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r))).next((()=>X.forEach(t.vi,(r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))))))}catch(e){if(!Q(e))throw e;f("LocalStore","Failed to update sequence numbers: "+e)}for(const e of t){const t=e.targetId;if(!e.fromCache){const e=n.$i.get(t),r=e.snapshotVersion,i=e.withLastLimboFreeSnapshotVersion(r);n.$i=n.$i.insert(t,i)}}}(r.localStore,s))}async function ps(e,t){const n=b(e);if(!n.currentUser.isEqual(t)){f("SyncEngine","User change. New user:",t.toKey());const e=await Lr(n.localStore,t);n.currentUser=t,function(e,t){e.uc.forEach((e=>{e.forEach((e=>{e.reject(new w(_.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.uc.clear()}(n),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await fs(n,e.Ki)}}function gs(e,t){const n=b(e),r=n.ic.get(t);if(r&&r.Xu)return mn().add(r.key);{let e=mn();const r=n.ec.get(t);if(!r)return e;for(const t of r){const r=n.tc.get(t);e=e.unionWith(r.view.qu)}return e}}function ms(e){const t=b(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=ts.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=gs.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=rs.bind(null,t),t.Zu.Go=Bi.bind(null,t.eventManager),t.Zu.lc=qi.bind(null,t.eventManager),t}function vs(e){const t=b(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=is.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=ss.bind(null,t),t}class ys{constructor(){this.synchronizeTabs=!1}async initialize(e){this.wt=Qr(e.databaseInfo.databaseId),this.sharedClientState=this.dc(e),this.persistence=this._c(e),await this.persistence.start(),this.localStore=this.wc(e),this.gcScheduler=this.mc(e,this.localStore),this.indexBackfillerScheduler=this.gc(e,this.localStore)}mc(e,t){return null}gc(e,t){return null}wc(e){return Mr(this.persistence,new Dr,e.initialUser,this.wt)}_c(e){return new Ar(Rr.Ms,this.wt)}dc(e){return new Hr}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class bs{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>ns(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=ps.bind(null,this.syncEngine),await Ri(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new $i}createDatastore(e){const t=Qr(e.databaseInfo.databaseId),n=(r=e.databaseInfo,new Yr(r));var r;return function(e,t,n,r){return new ni(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=e=>ns(this.syncEngine,e,0),s=Wr.V()?new Wr:new zr,new ii(t,n,r,i,s);var t,n,r,i,s}createSyncEngine(e,t){return function(e,t,n,r,i,s,o){const a=new Qi(e,t,n,r,i,s);return o&&(a.ac=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return async function(e){const t=b(e);f("RemoteStore","RemoteStore shutting down."),t.lu.add(5),await oi(t),t.du.shutdown(),t._u.set("Unknown")}(this.remoteStore)}}class _s{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ic(this.observer.next,e)}error(e){this.observer.error?this.Ic(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)}Tc(){this.muted=!0}Ic(e,t){this.muted||setTimeout((()=>{this.muted||e(t)}),0)}}class ws{constructor(e,t,n,r){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=c.UNAUTHENTICATED,this.clientId=D.I(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,(async e=>{f("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e})),this.appCheckCredentials.start(n,(e=>(f("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user))))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new w(_.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new E;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const n=Mi(t,"Failed to shutdown persistence");e.reject(n)}})),e.promise}}async function Es(e,t){e.asyncQueue.verifyOperationInProgress(),f("FirestoreClient","Initializing OfflineComponentProvider");const n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async e=>{r.isEqual(e)||(await Lr(t.localStore,e),r=e)})),t.persistence.setDatabaseDeletedListener((()=>e.terminate())),e.offlineComponents=t}async function Ts(e,t){e.asyncQueue.verifyOperationInProgress();const n=await Is(e);f("FirestoreClient","Initializing OnlineComponentProvider");const r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener((e=>Ci(t.remoteStore,e))),e.setAppCheckTokenChangeListener(((e,n)=>Ci(t.remoteStore,n))),e.onlineComponents=t}async function Is(e){return e.offlineComponents||(f("FirestoreClient","Using default OfflineComponentProvider"),await Es(e,new ys)),e.offlineComponents}async function Ss(e){return e.onlineComponents||(f("FirestoreClient","Using default OnlineComponentProvider"),await Ts(e,new bs)),e.onlineComponents}function Os(e){return Ss(e).then((e=>e.syncEngine))}async function ks(e){const t=await Ss(e),n=t.eventManager;return n.onListen=Zi.bind(null,t.syncEngine),n.onUnlisten=es.bind(null,t.syncEngine),n}function As(e,t,n={}){const r=new E;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const s=new _s({next:s=>{t.enqueueAndForget((()=>
2Vi(e,o)));const a=s.docs.has(n);!a&&s.fromCache?i.reject(new w(_.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&s.fromCache&&r&&"server"===r.source?i.reject(new w(_.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(s)},error:e=>i.reject(e)}),o=new zi(at(n.path),s,{includeMetadataChanges:!0,Du:!0});return Ui(e,o)}(await ks(e),e.asyncQueue,t,n,r))),r.promise}function Cs(e,t,n={}){const r=new E;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const s=new _s({next:n=>{t.enqueueAndForget((()=>Vi(e,o))),n.fromCache&&"server"===r.source?i.reject(new w(_.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),o=new zi(n,s,{includeMetadataChanges:!0,Du:!0});return Ui(e,o)}(await ks(e),e.asyncQueue,t,n,r))),r.promise}const Rs=new Map;function Ns(e,t,n){if(!n)throw new w(_.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function Ds(e){if(!V.isDocumentKey(e))throw new w(_.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function xs(e){if(V.isDocumentKey(e))throw new w(_.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function Ms(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const t=function(e){return e.constructor?e.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return"function"==typeof e?"a function":v()}function Ls(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new w(_.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Ms(e);throw new w(_.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}class Ps{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new w(_.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new w(_.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new w(_.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class js{constructor(e,t,n){this._authCredentials=t,this._appCheckCredentials=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Ps({}),this._settingsFrozen=!1,e instanceof ve?this._databaseId=e:(this._app=e,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new w(_.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new ve(e.options.projectId)}(e))}get app(){if(!this._app)throw new w(_.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Ps(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new I;switch(e.type){case"gapi":const t=e.client;return y(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new A(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;
2default:throw new w(_.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=Rs.get(e);t&&(f("ComponentProvider","Removing Datastore"),Rs.delete(e),t.terminate())}(this),Promise.resolve()}}function Fs(e,t,n,r={}){var i;const s=(e=Ls(e,js))._getSettings();if("firestore.googleapis.com"!==s.host&&s.host!==t&&g("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},s),{host:`${t}:${n}`,ssl:!1})),r.mockUserToken){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=c.MOCK_USER;else{t=Object(o.f)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);const s=r.mockUserToken.sub||r.mockUserToken.user_id;if(!s)throw new w(_.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new c(s)}e._authCredentials=new S(new T(t,n))}}class $s{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Vs(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new $s(this.firestore,e,this._key)}}class Us{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new Us(this.firestore,e,this._query)}}class Vs extends Us{constructor(e,t,n){super(e,t,at(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new $s(this.firestore,null,new V(e))}withConverter(e){return new Vs(this.firestore,e,this._path)}}function Bs(e,t,...n){if(e=Object(o.j)(e),Ns("collection","path",t),e instanceof js){const r=F.fromString(t,...n);return xs(r),new Vs(e,null,r)}{if(!(e instanceof $s||e instanceof Vs))throw new w(_.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(F.fromString(t,...n));return xs(r),new Vs(e.firestore,null,r)}}function qs(e,t,...n){if(e=Object(o.j)(e),1===arguments.length&&(t=D.I()),Ns("doc","path",t),e instanceof js){const r=F.fromString(t,...n);return Ds(r),new $s(e,null,new V(r))}{if(!(e instanceof $s||e instanceof Vs))throw new w(_.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(F.fromString(t,...n));return Ds(r),new $s(e.firestore,e instanceof Vs?e.converter:null,new V(r))}}class Hs{constructor(){this.Oc=Promise.resolve(),this.Mc=[],this.Fc=!1,this.$c=[],this.Bc=null,this.Lc=!1,this.Uc=!1,this.qc=[],this.So=new Zr(this,"async_queue_retry"),this.Kc=()=>{const e=Xr();e&&f("AsyncQueue","Visibility state changed to "+e.visibilityState),this.So.Eo()};const e=Xr();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Kc)}get isShuttingDown(){return this.Fc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Gc(),this.Qc(e)}enterRestrictedMode(e){if(!this.Fc){this.Fc=!0,this.Uc=e||!1;const t=Xr();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Kc)}}enqueue(e){if(this.Gc(),this.Fc)return new Promise((()=>{}));const t=new E;return this.Qc((()=>this.Fc&&this.Uc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise))).then((()=>t.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Mc.push(e),this.jc())))}async jc(){if(0!==this.Mc.length){try{await this.Mc[0](),this.Mc.shift(),this.So.reset()}catch(e){if(!Q(e))throw e;f("AsyncQueue","Operation failed with retryable error: "+e)}this.Mc.length>0&&this.So.Io((()=>this.jc()))}}Qc(e){const t=this.Oc.then((()=>(this.Lc=!0,e().catch((e=>{this.Bc=e,this.Lc=!1;const t=function(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e);throw p("INTERNAL UNHANDLED ERROR: ",t),e})).then((e=>(this.Lc=!1,e))))));return this.Oc=t,t}enqueueAfterDelay(e,t,n){this.Gc(),this.qc.indexOf(e)>-1&&(t=0);const r=xi.createAndSchedule(this,e,t,n,(e=>this.Wc(e)));return this.$c.push(r),r}Gc(){this.Bc&&v()}verifyOperationInProgress(){}async zc(){let e;do{e=this.Oc,await e}while(e!==this.Oc)}Hc(e){for(const t of this.$c)if(t.timerId===e)return!0;return!1}Jc(e){return this.zc().then((()=>{this.$c.sort(((e,t)=>e.targetTimeMs-t.targetTimeMs));for(const t of this.$c)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.zc()}))}Yc(e){this.qc.push(e)}Wc(e){const t=this.$c.indexOf(e);this.$c.splice(t,1)}}function zs(e){return function(e,t){if("object"!=typeof e||null===e)return!1;const n=e;for(const e of["next","error","complete"])if(e in n&&"function"==typeof n[e])return!0;return!1}(e)}class Ws extends js{constructor(e,t,n){super(e,t,n),this.type="firestore",this._queue=new Hs,this._persistenceKey="name"in e?e.name:"[DEFAULT]"}_terminate(){return this._firestoreClient||Ys(this),this._firestoreClient.terminate()}}function Ks(e=Object(r.e)()){return Object(r.b)(e,"firestore").getImmediate()}function Gs(e){return e._firestoreClient||Ys(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function Ys(e){var t;const n=e._freezeSettings(),r=function(e,t,n,r){return new me(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new ws(e._authCredentials,e._appCheckCredentials,e._queue,r)}class Xs{constructor(...e){for(let t=0;t<e.length;
vendor: 4,523 bytes, line 2
2++t)if(0===e[t].length)throw new w(_.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new U(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class Qs{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Qs(ue.fromBase64String(e))}catch(e){throw new w(_.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new Qs(ue.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class Zs{constructor(e){this._methodName=e}}class Js{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new w(_.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new w(_.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return x(this._lat,e._lat)||x(this._long,e._long)}}const eo=/^__.*__$/;class to{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return null!==this.fieldMask?new Kt(e,this.data,this.fieldMask,t,this.fieldTransforms):new Wt(e,this.data,t,this.fieldTransforms)}}class no{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return new Kt(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function ro(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw v()}}class io{constructor(e,t,n,r,i,s){this.settings=e,this.databaseId=t,this.wt=n,this.ignoreUndefinedProperties=r,void 0===i&&this.Xc(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get Zc(){return this.settings.Zc}ta(e){return new io(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.wt,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ea(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ta({path:n,na:!1});return r.sa(e),r}ia(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ta({path:n,na:!1});return r.Xc(),r}ra(e){return this.ta({path:void 0,na:!0})}oa(e){return To(e,this.settings.methodName,this.settings.ua||!1,this.path,this.settings.ca)}contains(e){return void 0!==this.fieldMask.find((t=>e.isPrefixOf(t)))||void 0!==this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))}Xc(){if(this.path)for(let e=0;e<this.path.length;e++)this.sa(this.path.get(e))}sa(e){if(0===e.length)throw this.oa("Document fields must not be empty");if(ro(this.Zc)&&eo.test(e))throw this.oa('Document fields cannot begin and end with "__"')}}class so{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.wt=n||Qr(e)}aa(e,t,n,r=!1){return new io({Zc:e,methodName:t,ca:n,path:U.emptyPath(),na:!1,ua:r},this.databaseId,this.wt,this.ignoreUndefinedProperties)}}function oo(e){const t=e._freezeSettings(),n=Qr(e._databaseId);return new so(e._databaseId,!!t.ignoreUndefinedProperties,n)}function ao(e,t,n,r,i,s={}){const o=e.aa(s.merge||s.mergeFields?2:0,t,n,i);bo("Data must be an object, but it was:",o,r);const a=vo(r,o);let u,c;if(s.merge)u=new ae(o.fieldMask),c=o.fieldTransforms;else if(s.mergeFields){const e=[];for(const r of s.mergeFields){const i=_o(t,r,n);if(!o.contains(i))throw new w(_.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);Io(e,i)||e.push(i)}u=new ae(e),c=o.fieldTransforms.filter((e=>u.covers(e.field)))}else u=null,c=o.fieldTransforms;return new to(new je(a),u,c)}class uo extends Zs{_toFieldTransform(e){if(2!==e.Zc)throw 1===e.Zc?e.oa(`${this._methodName}() can only appear at the top level of your update data`):e.oa(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof uo}}function co(e,t,n){return new io({Zc:3,ca:t.settings.ca,methodName:e._methodName,na:n},t.databaseId,t.wt,t.ignoreUndefinedProperties)}class lo extends Zs{_toFieldTransform(e){return new Pt(e.path,new At)}isEqual(e){return e instanceof lo}}class ho extends Zs{constructor(e,t){super(e),this.ha=t}_toFieldTransform(e){const t=co(this,e,!0),n=this.ha.map((e=>
2mo(e,t))),r=new Ct(n);return new Pt(e.path,r)}isEqual(e){return this===e}}function fo(e,t,n,r){const i=e.aa(1,t,n);bo("Data must be an object, but it was:",i,r);const s=[],a=je.empty();ee(r,((e,r)=>{const u=Eo(t,e,n);r=Object(o.j)(r);const c=i.ia(u);if(r instanceof uo)s.push(u);else{const e=mo(r,c);null!=e&&(s.push(u),a.set(u,e))}}));const u=new ae(s);return new no(a,u,i.fieldTransforms)}function po(e,t,n,r,i,s){const a=e.aa(1,t,n),u=[_o(t,r,n)],c=[i];if(s.length%2!=0)throw new w(_.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let e=0;e<s.length;e+=2)u.push(_o(t,s[e])),c.push(s[e+1]);const l=[],h=je.empty();for(let e=u.length-1;e>=0;--e)if(!Io(l,u[e])){const t=u[e];let n=c[e];n=Object(o.j)(n);const r=a.ia(t);if(n instanceof uo)l.push(t);else{const e=mo(n,r);null!=e&&(l.push(t),h.set(t,e))}}const d=new ae(l);return new no(h,d,a.fieldTransforms)}function go(e,t,n,r=!1){return mo(n,e.aa(r?4:3,t))}function mo(e,t){if(yo(e=Object(o.j)(e)))return bo("Unsupported field value:",t,e),vo(e,t);if(e instanceof Zs)return function(e,t){if(!ro(t.Zc))throw t.oa(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.oa(`${e._methodName}() is not currently supported inside arrays`);const n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.na&&4!==t.Zc)throw t.oa("Nested arrays are not supported");return function(e,t){const n=[];let r=0;for(const i of e){let e=mo(i,t.ra(r));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=Object(o.j)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return Tt(t.wt,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){const n=L.fromDate(e);return{timestampValue:Nn(t.wt,n)}}if(e instanceof L){const n=new L(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:Nn(t.wt,n)}}if(e instanceof Js)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof Qs)return{bytesValue:Dn(t.wt,e._byteString)};if(e instanceof $s){const n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.oa(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:Ln(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.oa(`Unsupported field value: ${Ms(e)}`)}(e,t)}function vo(e,t){const n={};return te(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):ee(e,((e,r)=>{const i=mo(r,t.ea(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function yo(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof L||e instanceof Js||e instanceof Qs||e instanceof $s||e instanceof Zs)}function bo(e,t,n){if(!yo(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){const r=Ms(n);throw"an object"===r?t.oa(e+" a custom object"):t.oa(e+" "+r)}}function _o(e,t,n){if((t=Object(o.j)(t))instanceof Xs)return t._internalPath;if("string"==typeof t)return Eo(e,t);throw To("Field path arguments must be of type string or ",e,!1,void 0,n)}const wo=new RegExp("[~\\*/\\[\\]]");function Eo(e,t,n){if(t.search(wo)>=0)throw To(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new Xs(...t.split("."))._internalPath}catch(r){throw To(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function To(e,t,n,r,i){const s=r&&!r.isEmpty(),o=void 0!==i;let a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let u="";return(s||o)&&(u+=" (found",s&&(u+=` in field ${r}`),o&&(u+=` in document ${i}`),u+=")"),new w(_.INVALID_ARGUMENT,a+e+u)}function Io(e,t){return e.some((e=>e.isEqual(t)))}class So{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new $s(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new Oo(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(ko("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class Oo extends So{data(){return super.data()}}function ko(e,t){return"string"==typeof t?Eo(e,t):t instanceof Xs?t._internalPath:t._delegate._internalPath}class Ao{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}
2class Co extends So{constructor(e,t,n,r,i,s){super(e,t,n,r,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Ro(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const n=this._document.data.field(ko("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class Ro extends Co{data(e={}){return super.data(e)}}class No{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new Ao(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach((n=>{e.call(t,new Ro(this._firestore,this._userDataWriter,n.key,n,new Ao(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new w(_.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map((n=>({type:"added",doc:new Ro(e._firestore,e._userDataWriter,n.doc.key,n.doc,new Ao(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter),oldIndex:-1,newIndex:t++})))}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((e=>t||3!==e.type)).map((t=>{const r=new Ro(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Ao(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let i=-1,s=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(n=n.add(t.doc),s=n.indexOf(t.doc.key)),{type:Do(t.type),doc:r,oldIndex:i,newIndex:s}}))}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function Do(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return v()}}function xo(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new w(_.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Mo{}function Lo(e,...t){for(const n of t)e=n._apply(e);return e}class Po extends Mo{constructor(e,t,n){super(),this.fa=e,this.da=t,this._a=n,this.type="where"}_apply(e){const t=oo(e.firestore),n=function(e,t,n,r,i,s,o){let a;if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new w(_.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){$o(o,s);const t=[];for(const n of o)t.push(Fo(r,e,n));a={arrayValue:{values:t}}}else a=Fo(r,e,o)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||$o(o,s),a=go(n,"where",o,"in"===s||"not-in"===s);const u=ze.create(i,s,a);return function(e,t){if(t.ht()){const n=ct(e);if(null!==n&&!n.isEqual(t.field))throw new w(_.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${t.field.toString()}'`);const r=ut(e);null!==r&&Uo(e,t.field,r)}const n=function(e,t){for(const n of e.filters)if(t.indexOf(n.op)>=0)return n.op;return null}(e,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==n)throw n===t.op?new w(_.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}
2' filter.`):new w(_.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}(e,u),u}(e._query,0,t,e.firestore._databaseId,this.fa,this.da,this._a);return new Us(e.firestore,e.converter,function(e,t){const n=e.filters.concat([t]);return new st(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))}}function jo(e,t,n){const r=t,i=ko("where",e);return new Po(i,r,n)}function Fo(e,t,n){if("string"==typeof(n=Object(o.j)(n))){if(""===n)throw new w(_.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!lt(t)&&-1!==n.indexOf("/"))throw new w(_.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=t.path.child(F.fromString(n));if(!V.isDocumentKey(r))throw new w(_.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return Ce(e,new V(r))}if(n instanceof $s)return Ce(e,n._key);throw new w(_.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Ms(n)}.`)}function $o(e,t){if(!Array.isArray(e)||0===e.length)throw new w(_.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);if(e.length>10)throw new w(_.INVALID_ARGUMENT,`Invalid Query. '${t.toString()}' filters support a maximum of 10 elements in the value array.`)}function Uo(e,t,n){if(!n.isEqual(t))throw new w(_.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${t.toString()}' and so you must also use '${t.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}class Vo{convertValue(e,t="none"){switch(Ee(e)){case 0:return null;case 1:return e.booleanValue;case 2:return he(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(de(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw v()}}convertObject(e,t){const n={};return ee(e.fields,((e,r)=>{n[e]=this.convertValue(r,t)})),n}convertGeoPoint(e){return new Js(he(e.latitude),he(e.longitude))}convertArray(e,t){return(e.values||[]).map((e=>this.convertValue(e,t)))}convertServerTimestamp(e,t){switch(t){case"previous":const n=pe(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(ge(e));default:return null}}convertTimestamp(e){const t=le(e);return new L(t.seconds,t.nanos)}convertDocumentKey(e,t){const n=F.fromString(e);y(nr(n));const r=new ve(n.get(1),n.get(3)),i=new V(n.popFirst(5));return r.isEqual(t)||p(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}function Bo(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}function qo(e){e=Ls(e,$s);const t=Ls(e.firestore,Ws);return As(Gs(t),e._key).then((n=>Zo(t,e,n)))}class Ho extends Vo{constructor(e){super(),this.firestore=e}convertBytes(e){return new Qs(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new $s(this.firestore,null,t)}}function zo(e){e=Ls(e,Us);const t=Ls(e.firestore,Ws),n=Gs(t),r=new Ho(t);return xo(e._query),Cs(n,e._query).then((n=>new No(t,r,e,n)))}function Wo(e,t,n){e=Ls(e,$s);const r=Ls(e.firestore,Ws),i=Bo(e.converter,t,n);return Qo(r,[ao(oo(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,Ft.none())])}function Ko(e,t,n,...r){e=Ls(e,$s);const i=Ls(e.firestore,Ws),s=oo(i);let a;
2return a="string"==typeof(t=Object(o.j)(t))||t instanceof Xs?po(s,"updateDoc",e._key,t,n,r):fo(s,"updateDoc",e._key,t),Qo(i,[a.toMutation(e._key,Ft.exists(!0))])}function Go(e){return Qo(Ls(e.firestore,Ws),[new Qt(e._key,Ft.none())])}function Yo(e,t){const n=Ls(e.firestore,Ws),r=qs(e),i=Bo(e.converter,t);return Qo(n,[ao(oo(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,Ft.exists(!1))]).then((()=>r))}function Xo(e,...t){var n,r,i;e=Object(o.j)(e);let s={includeMetadataChanges:!1},a=0;"object"!=typeof t[a]||zs(t[a])||(s=t[a],a++);const u={includeMetadataChanges:s.includeMetadataChanges};if(zs(t[a])){const e=t[a];t[a]=null===(n=e.next)||void 0===n?void 0:n.bind(e),t[a+1]=null===(r=e.error)||void 0===r?void 0:r.bind(e),t[a+2]=null===(i=e.complete)||void 0===i?void 0:i.bind(e)}let c,l,h;if(e instanceof $s)l=Ls(e.firestore,Ws),h=at(e._key.path),c={next:n=>{t[a]&&t[a](Zo(l,e,n))},error:t[a+1],complete:t[a+2]};else{const n=Ls(e,Us);l=Ls(n.firestore,Ws),h=n._query;const r=new Ho(l);c={next:e=>{t[a]&&t[a](new No(l,r,n,e))},error:t[a+1],complete:t[a+2]},xo(e._query)}return function(e,t,n,r){const i=new _s(r),s=new zi(t,i,n);return e.asyncQueue.enqueueAndForget((async()=>Ui(await ks(e),s))),()=>{i.Tc(),e.asyncQueue.enqueueAndForget((async()=>Vi(await ks(e),s)))}}(Gs(l),h,u,c)}function Qo(e,t){return function(e,t){const n=new E;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t,n){const r=vs(e);try{const e=await function(e,t){const n=b(e),r=L.now(),i=t.reduce(((e,t)=>e.add(t.key)),mn());let s,o;return n.persistence.runTransaction("Locally write mutations","readwrite",(e=>{let a=an(),u=mn();return n.Ui.getEntries(e,i).next((e=>{a=e,a.forEach(((e,t)=>{t.isValidDocument()||(u=u.add(e))}))})).next((()=>n.localDocuments.getOverlayedDocuments(e,a))).next((i=>{s=i;const o=[];for(const e of t){const t=Ht(e,s.get(e.key).overlayedDocument);null!=t&&o.push(new Kt(e.key,t,Fe(t.value.mapValue),Ft.exists(!0)))}
2return n.mutationQueue.addMutationBatch(e,r,o,t)})).next((t=>{o=t;const r=t.applyToLocalDocumentSet(s,u);return n.documentOverlayCache.saveOverlays(e,t.batchId,r)}))})).then((()=>({batchId:o.batchId,changes:ln(s)})))}(r.localStore,t);r.sharedClientState.addPendingMutation(e.batchId),function(e,t,n){let r=e.oc[e.currentUser.toKey()];r||(r=new ne(x)),r=r.insert(t,n),e.oc[e.currentUser.toKey()]=r}(r,e.batchId,n),await fs(r,e.changes),await _i(r.remoteStore)}catch(e){const t=Mi(e,"Failed to persist write");n.reject(t)}}(await Os(e),t,n))),n.promise}(Gs(e),t)}function Zo(e,t,n){const r=n.docs.get(t._key),i=new Ho(e);return new Co(e,i,t._key,r,new Ao(n.hasPendingWrites,n.fromCache),t.converter)}function Jo(){return new lo("serverTimestamp")}function ea(...e){return new ho("arrayUnion",e)}!function(e,t=!0){!function(e){l=e}(r.a),Object(r.c)(new i.a("firestore",((e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=new Ws(r,new O(e.getProvider("auth-internal")),new R(e.getProvider("app-check-internal")));return n=Object.assign({useFetchStreams:t},n),i._setSettings(n),i}),"PUBLIC")),Object(r.g)(u,"3.4.10",e),Object(r.g)(u,"3.4.10","esm2017")}()}).call(this,n(96))},200:function(e,t,n){"use strict";t.a=function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,s=[],o=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return s},entries:function(){return o},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){s.push(t=t.toLowerCase()),o.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}},201:function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function o(e,t,n){return e.concat(t).map((function(e){return s(e,n)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function u(e,t){try{return t in e}catch(e){return!1}}function c(e,t,n){var r={};return n.isMergeableObject(e)&&a(e).forEach((function(t){r[t]=s(e[t],n)})),a(t).forEach((function(i){(function(e,t){return u(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(u(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(i,n)(e[i],t[i],n):r[i]=s(t[i],n))})),r}function l(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||o,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=s;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):c(e,t,n):s(t,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var h=l;e.exports=h},206:function(e,t,n){"use strict";var r=n(7);n.d(t,"a",(function(){return r.f}));Object(r.g)("firebase","9.8.3","app")},207:function(e,t,n){e.exports=function(){var e,t=this,n=function(e,n){var i=e.config.errorHandler,s=function(e,s,a){var u={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},c=n.Event.create(e,!0,u,"vue error handler",1);c.addMetadata("vue",{errorInfo:o[a]||a,component:s?r(s,!0):void 0,props:s&&s.$options?s.$options.propsData:void 0}),n._notify(c),"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e),"function"==typeof i&&i.call(t,e,s,a)};e.config.errorHandler=s};
2function r(e){return null===e.$parent?"App":e.$options&&e.$options.name?e.$options.name:"Anonymous"}var i={BEFORE_CREATE:"bc",CREATED:"c",BEFORE_MOUNT:"bm",MOUNTED:"m",BEFORE_UPDATE:"bu",UPDATED:"u",BEFORE_UNMOUNT:"bum",UNMOUNTED:"um",DEACTIVATED:"da",ACTIVATED:"a",RENDER_TRIGGERED:"rtg",RENDER_TRACKED:"rtc",ERROR_CAPTURED:"ec"},s={SETUP_FUNCTION:0,RENDER_FUNCTION:1,WATCH_GETTER:2,WATCH_CALLBACK:3,WATCH_CLEANUP:4,NATIVE_EVENT_HANDLER:5,COMPONENT_EVENT_HANDLER:6,VNODE_HOOK:7,DIRECTIVE_HOOK:8,TRANSITION_HOOK:9,APP_ERROR_HANDLER:10,APP_WARN_HANDLER:11,FUNCTION_REF:12,ASYNC_COMPONENT_LOADER:13,SCHEDULER:14},o=((e={})[i.BEFORE_CREATE]="beforeCreate hook",e[i.CREATED]="created hook",e[i.BEFORE_MOUNT]="beforeMount hook",e[i.MOUNTED]="mounted hook",e[i.BEFORE_UPDATE]="beforeUpdate hook",e[i.UPDATED]="updated",e[i.BEFORE_UNMOUNT]="beforeUnmount hook",e[i.UNMOUNTED]="unmounted hook",e[i.ACTIVATED]="activated hook",e[i.DEACTIVATED]="deactivated hook",e[i.ERROR_CAPTURED]="errorCaptured hook",e[i.RENDER_TRACKED]="renderTracked hook",e[i.RENDER_TRIGGERED]="renderTriggered hook",e[s.SETUP_FUNCTION]="setup function",e[s.RENDER_FUNCTION]="render function",e[s.WATCH_GETTER]="watcher getter",e[s.WATCH_CALLBACK]="watcher callback",e[s.WATCH_CLEANUP]="watcher cleanup function",e[s.NATIVE_EVENT_HANDLER]="native event handler",e[s.COMPONENT_EVENT_HANDLER]="component event handler",e[s.VNODE_HOOK]="vnode hook",e[s.DIRECTIVE_HOOK]="directive hook",e[s.TRANSITION_HOOK]="transition hook",e[s.APP_ERROR_HANDLER]="app errorHandler",e[s.APP_WARN_HANDLER]="app warnHandler",e[s.FUNCTION_REF]="ref function",e[s.ASYNC_COMPONENT_LOADER]="async component loader",e[s.SCHEDULER]="scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next",e),a={},u=this;a=function(e,t){var n=e.config.errorHandler,r=function(e,r,i){var s={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},o=t.Event.create(e,!0,s,"vue error handler",1);o.addMetadata("vue",{errorInfo:i,component:r?c(r,!0):void 0,props:r?r.$options.propsData:void 0}),t._notify(o),"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e),"function"==typeof n&&n.call(u,e,r,i)};e.config.errorHandler=r};var c=function(e,t){if(e.$root===e)return"<Root>";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e||{},r=n.name||n._componentTag,i=n.__file;if(!r&&i){var s=i.match(/([^/\\]+)\.vue$/);r=s&&s[1]}return(r?"<"+l(r)+">":"<Anonymous>")+(i&&!1!==t?" at "+i:"")},l=a.classify=function(e){return e.replace(/(?:^|[-_])(\w)/g,(function(e){return e.toUpperCase()})).replace(/[-_]/g,"")},h={};return h=function(){function e(){var e="undefined"!=typeof window&&window.Vue;if(this.name="vue",this.lazy=0===arguments.length&&!e,!this.lazy&&(this.Vue=(arguments.length<=0?void 0:arguments[0])||e,!this.Vue))throw new Error("@bugsnag/plugin-vue reference to `Vue` was undefined")}return e.prototype.load=function(e){return this.Vue?(a(this.Vue,e),{installVueErrorHandler:function(){return e._logger.warn("installVueErrorHandler() was called unnecessarily")}}):{install:function(t){t||e._logger.error(new Error("@bugsnag/plugin-vue reference to Vue `app` was undefined")),n(t,e)},installVueErrorHandler:function(t){t||e._logger.error(new Error("@bugsnag/plugin-vue reference to `Vue` was undefined")),a(t,e)}}},e}(),h.default=h,h}()},210:function(e,t,n){"use strict";n.r(t),n.d(t,"getImage",(function(){return a})),n.d(t,"supportsAlias",(function(){return u}));n(12),n(8),n(10),n(16),n(17);var r=n(5),i=n(112);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a=function(e,t,n){return o(o({},Object(i.getImage)(e,t,n)),{},{isStatic:!0})},u=!0},211:function(e,t,n){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var i=n.prototype,s=i.format;r.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var s=i&&i.toUpperCase();return r||n[i]||e[i]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return s.call(this,r)}}}()},212:function(e,t,n){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var s,o=function(e,n,r){void 0===r&&(r={});var i=new Date(e),s=function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",i=e+"|"+r,s=t[i];return s||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,
2year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[i]=s),s}(n,r);return s.formatToParts(i)},a=function(t,n){for(var r=o(t,n),s=[],a=0;a<r.length;a+=1){var u=r[a],c=u.type,l=u.value,h=e[c];h>=0&&(s[h]=parseInt(l,10))}var d=s[3],f=24===d?0:d,p=s[0]+"-"+s[1]+"-"+s[2]+" "+f+":"+s[4]+":"+s[5]+":000",g=+t;return(i.utc(p).valueOf()-(g-=g%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=s);var n=this.utcOffset(),r=this.toDate(),o=r.toLocaleString("en-US",{timeZone:e}),a=Math.round((r-new Date(o))/1e3/60),u=i(o).$set("millisecond",this.$ms).utcOffset(15*-Math.round(r.getTimezoneOffset()/15)-a,!0);if(t){var c=u.utcOffset();u=u.add(n-c,"minute")}return u.$x.$timezone=e,u},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return c.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,o=n||t||s,u=a(+i(),o);if("string"!=typeof e)return i(e).tz(o);var c=function(e,t,n){var r=e-60*t*1e3,i=a(r,n);if(t===i)return[r,t];var s=a(r-=60*(i-t)*1e3,n);return i===s?[r,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}(i.utc(e,r).valueOf(),u,o),l=c[0],h=c[1],d=i(l).utcOffset(h);return d.$x.$timezone=o,d},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){s=e}}}()},216:function(e,t,n){!function(){"use strict";e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||a,scrollIntoView:r.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,o=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(u(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var n=d(this),r=n.getBoundingClientRect(),s=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+s.left-r.left,n.scrollTop+s.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:s.left,top:s.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(e,t){this.scrollLeft=e,this.scrollTop=t}function u(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;
2if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+o<e.scrollHeight:"X"===t?e.clientWidth+o<e.scrollWidth:void 0}function l(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function h(e){var t=c(e,"Y")&&l(e,"Y"),n=c(e,"X")&&l(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===h(e);)e=e.parentNode||e.host;return e}function f(t){var n,r,i,o,a=(s()-t.startTime)/468;o=a=a>1?1:a,n=.5*(1-Math.cos(Math.PI*o)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function p(n,r,o){var u,c,l,h,d=s();n===t.body?(u=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,h=i.scroll):(u=n,c=n.scrollLeft,l=n.scrollTop,h=a),f({scrollable:u,method:h,startTime:d,startX:c,startY:l,x:r,y:o})}}}}()},218:function(e,t,n){(function(e){e.installComponents=function(e,n){var r="function"==typeof e.exports?e.exports.extendOptions:e.options;for(var i in"function"==typeof e.exports&&(r.components=e.exports.options.components),r.components=r.components||{},n)r.components[i]=r.components[i]||n[i];r.functional&&function(e,n){if(e.exports[t])return;e.exports[t]=!0;var r=e.exports.render;e.exports.render=function(e,t){return r(e,Object.assign({},t,{_c:function(e,r,i){return t._c(n[e]||e,r,i)}}))}}(e,r.components)};var t="_functionalComponents"}).call(this,n(49))},247:function(e,t,n){var r,i,s;!function(n,o){"use strict";i=[],r=function(){var e,t,n,r,i,s=!1,o=window.navigator.userAgent,a=/([+-]?[0-9.]+)(vh|vw|vmin|vmax)/g,u=/(https?:)?\/\//,c=[].forEach,l=/MSIE [0-9]\./i.test(o),h=/MSIE [0-8]\./i.test(o),d=o.indexOf("Opera Mini")>-1,f=/(iPhone|iPod|iPad).+AppleWebKit/i.test(o)&&((i=o.match(/OS (\d)/))&&i.length>1&&parseInt(i[1])<10),p=o.indexOf(" Android ")>-1&&o.indexOf("Version/")>-1&&parseFloat((o.match("Android ([0-9.]+)")||[])[1])<=4.4;l||(l=!!navigator.userAgent.match(/MSIE 10\.|Trident.*rv[ :]*1[01]\.| Edge\/1\d\./));try{new g("test")}catch(e){var g=function(e,t){var n;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n};g.prototype=window.Event.prototype,window.CustomEvent=g}function m(e,t){var n;return function(){var r=this,i=arguments,s=function(){e.apply(r,i)};clearTimeout(n),n=setTimeout(s,t)}}function v(){try{return window.self!==window.top}catch(e){return!0}}function y(t){if(!s){if(!0===t&&(t={force:!0}),(e=t||{}).isMobileSafari=f,e.isBadStockAndroid=p,!e.ignoreVmax||e.force||h||(l=!1),h||!e.force&&!f&&!l&&!p&&!d&&(!e.hacks||!e.hacks.required(e)))return window.console&&h&&console.info("viewport-units-buggyfill requires a proper CSSOM and basic viewport unit support, which are not available in IE8 and below"),{init:function(){}};window.dispatchEvent(new g("viewport-units-buggyfill-init")),e.hacks&&e.hacks.initialize(e),s=!0,(r=document.createElement("style")).id="patched-viewport",document[e.appendToBody?"body":"head"].appendChild(r),A((function(){var t=m(_,e.refreshDebounceWait||100);window.addEventListener("orientationchange",t,!0),window.addEventListener("pageshow",t,!0),(e.force||l||v())&&(window.addEventListener("resize",t,!0),e._listeningToResize=!0),e.hacks&&e.hacks.initializeEvents(e,_,t),_()}))}}function b(){r.textContent=I(),r.parentNode.appendChild(r),window.dispatchEvent(new g("viewport-units-buggyfill-style"))}function _(){s&&(E(),setTimeout((function(){b()}),1))}function w(e){try{if(!e.cssRules)return}catch(e){if("SecurityError"!==e.name)throw e;return}for(var t=[],n=0;n<e.cssRules.length;n++){var r=e.cssRules[n];t.push(r)}return t}function E(){return n=[],c.call(document.styleSheets,(function(e){var t=w(e);t&&"patched-viewport"!==e.ownerNode.id&&"ignore"!==e.ownerNode.getAttribute("data-viewport-units-buggyfill")&&(e.media&&e.media.mediaText&&window.matchMedia&&!window.matchMedia(e.media.mediaText).matches||c.call(t,T))})),n}function T(t){if(7===t.type){var r;try{r=t.cssText}catch(e){return}return a.lastIndex=0,void(a.test(r)&&!u.test(r)&&(n.push([t,null,r]),e.hacks&&e.hacks.findDeclarations(n,t,null,r)))}if(t.style)c.call(t.style,(function(r){var i=t.style.getPropertyValue(r);t.style.getPropertyPriority(r)&&(i+=" !important"),a.lastIndex=0,a.test(i)&&(n.push([t,r,i]),e.hacks&&e.hacks.findDeclarations(n,t,r,i))}));else{if(!t.cssRules)return;c.call(t.cssRules,(function(e){T(e)}))}}function I(){t=k();var e,r,i=[],s=[];
2return n.forEach((function(t){var n=S.apply(null,t),o=n.selector.length?n.selector.join(" {\n")+" {\n":"",a=new Array(n.selector.length+1).join("\n}");if(!o||o!==e)return s.length&&(i.push(e+s.join("\n")+r),s.length=0),void(o?(e=o,r=a,s.push(n.content)):(i.push(n.content),e=null,r=null));o&&!e&&(e=o,r=a),s.push(n.content)})),s.length&&i.push(e+s.join("\n")+r),d&&i.push("* { content: normal !important; }"),i.join("\n\n")}function S(t,n,r){var i,s=[];i=r.replace(a,O),e.hacks&&(i=e.hacks.overwriteDeclaration(t,n,i)),n&&(s.push(t.selectorText),i=n+": "+i+";");for(var o=t.parentRule;o;)o.media?s.unshift("@media "+o.media.mediaText):o.conditionText&&s.unshift("@supports "+o.conditionText),o=o.parentRule;return{selector:s,content:i}}function O(e,n,r){var i=t[r];return parseFloat(n)/100*i+"px"}function k(){var e=window.innerHeight,t=window.innerWidth;return{vh:e,vw:t,vmax:Math.max(t,e),vmin:Math.min(t,e)}}function A(e){var t=0,n=function(){--t||e()};c.call(document.styleSheets,(function(e){e.href&&C(e.href)!==C(location.href)&&"ignore"!==e.ownerNode.getAttribute("data-viewport-units-buggyfill")&&(t++,R(e.ownerNode,n))})),t||e()}function C(e){return e.slice(0,e.indexOf("/",e.indexOf("://")+3))}function R(e,t){N(e.href,(function(){var n=document.createElement("style");n.media=e.media,n.setAttribute("data-href",e.href),n.textContent=this.responseText,e.parentNode.replaceChild(n,e),t()}),t)}function N(e,t,n){var r=new XMLHttpRequest;if("withCredentials"in r)r.open("GET",e,!0);else{if("undefined"==typeof XDomainRequest)throw new Error("cross-domain XHR not supported");(r=new XDomainRequest).open("GET",e)}return r.onload=t,r.onerror=n,r.send(),r}return{version:"0.6.1",findProperties:E,getCss:I,init:y,refresh:_}},void 0===(s="function"==typeof r?r.apply(t,i):r)||(e.exports=s)}()},309:function(e,t,n){e.exports=function(){var e,t=["navigation","request","process","log","user","state","error","manual"],n=function(e,t,n){for(var r=n,i=0,s=e.length;i<s;i++)r=t(r,e[i],i,e);return r},r=function(e,t){return n(e,(function(e,n,r,i){return t(n,r,i)?e.concat(n):e}),[])},i=function(e,t){return n(e,(function(e,n,r,i){return!0===e||n===t}),!1)},s=function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=!{toString:null}.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!o)return n;for(var r=0,i=a.length;r<i;r++)Object.prototype.hasOwnProperty.call(e,a[r])&&n.push(a[r]);return n},c=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1/0),function(n){return"number"==typeof n&&parseInt(""+n,10)===n&&n>=e&&n<=t}},l=function(e){return"function"==typeof e||s(e)&&r(e,(function(e){return"function"==typeof e})).length===e.length},h=function(e){return"string"==typeof e&&!!e.length},d={},f=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};d.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:h},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||h(e)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||h(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return f()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(e){if("object"!=typeof e||!e)return!1;var t=u(e),n=u(f());return!(r(t,(function(e){return i(n,e)})).length<t.length||r(u(e),(function(t){return"boolean"!=typeof e[t]})).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:l},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:l},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:l},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}}
2,message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&h(e.notify)&&h(e.sessions)&&0===r(u(e),(function(e){return!i(["notify","sessions"],e)})).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||s(e)&&r(e,(function(e){return"string"==typeof e})).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(e){return c(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return t},message:"should be null or a list of available breadcrumb types ("+t.join(",")+")",validate:function(e){return null===e||s(e)&&n(e,(function(e,n){return!1===e?e:i(t,n)}),!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&n(u(e),(function(e,t){return e&&i(["id","email","name"],t)}),!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(e){return!e||e&&n(["debug","info","warn","error"],(function(t,n){return t&&"function"==typeof e[n]}),!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return s(e)&&e.length===r(e,(function(e){return"string"==typeof e||e&&"function"==typeof e.test})).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return s(e)&&e.length===r(e,(function(e){return e&&"object"==typeof e&&"function"==typeof e.load})).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(e){return s(e)&&e.length===r(e,(function(e){return e&&"object"==typeof e&&"string"==typeof e.name})).length}}};var p=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},g=function(e,t){return n(e,(function(e,n,r,i){return e.concat(t(n,r,i))}),[])};function m(){return m=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},m.apply(this,arguments)}var v=d.schema,y={releaseStage:p({},v.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:m({},v.appType,{defaultValue:function(){return"browser"}}),logger:p({},v.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?b():void 0}})},b=function(){var e={},t=console.log;return g(["debug","info","warn","error"],(function(n){var r=console[n];e[n]="function"==typeof r?r.bind(console,"[bugsnag]"):t.bind(console,"[bugsnag]")})),e},_=function(){function e(e,t,n,r){void 0===r&&(r=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=r}return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),w={};!function(t,n){"use strict";"function"==typeof e&&e.amd?e("stackframe",[],n):"object"==typeof w?w=n():t.StackFrame=n()}(this,(function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function n(e){return function(){return this[e]}}var r=["isConstructor","isEval","isNative","isToplevel"],i=["columnNumber","lineNumber"],s=["fileName","functionName","source"],o=["args"],a=r.concat(i,s,o);function u(e){if(e instanceof Object)for(var n=0;n<a.length;n++)e.hasOwnProperty(a[n])&&void 0!==e[a[n]]&&this["set"+t(a[n])](e[a[n]])}u.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof u)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new u(e)}},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(e(this.getLineNumber())?":"+this.getLineNumber():"")+(e(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var c=0;c<r.length;c++)u.prototype["get"+t(r[c])]=n(r[c]),u.prototype["set"+t(r[c])]=function(e){return function(t){this[e]=Boolean(t)}}(r[c]);for(var l=0;l<i.length;l++)u.prototype["get"+t(i[l])]=n(i[l]),u.prototype["set"+t(i[l])]=function(t){return function(n){if(!e(n))throw new TypeError(t+" must be a Number");this[t]=Number(n)}}(i[l]);for(var h=0;h<s.length;h++)u.prototype["get"+t(s[h])]=n(s[h]),u.prototype["set"+t(s[h])]=function(e){return function(t){this[e]=String(t)}}(s[h]);return u}));var E={};!function(t,n){"use strict";
2"function"==typeof e&&e.amd?e("error-stack-parser",["stackframe"],n):"object"==typeof E?E=n(w):t.ErrorStackParser=n(t.StackFrame)}(this,(function(e){"use strict";var t=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(e){return!!e.match(n)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(n=r?n.replace(r[0],""):n).split(/\s+/).slice(1),s=this.extractLocation(r?r[1]:i.pop()),o=i.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0];return new e({functionName:o,fileName:a,lineNumber:s[1],columnNumber:s[2],source:t})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(e){return!e.match(r)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),i=r&&r[1]?r[1]:void 0,s=this.extractLocation(t.replace(n,""));return new e({functionName:i,fileName:s[0],lineNumber:s[1],columnNumber:s[2],source:t})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],s=2,o=r.length;s<o;s+=2){var a=n.exec(r[s]);a&&i.push(new e({fileName:a[2],lineNumber:a[1],source:r[s]}))}return i},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],s=0,o=r.length;s<o;s+=2){var a=n.exec(r[s]);a&&i.push(new e({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:r[s]}))}return i},parseOpera11:function(n){return n.stack.split("\n").filter((function(e){return!!e.match(t)&&!e.match(/^Error created at/)}),this).map((function(t){var n,r=t.split("@"),i=this.extractLocation(r.pop()),s=r.shift()||"",o=s.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;s.match(/\(([^\)]*)\)/)&&(n=s.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var a=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e({functionName:o,args:a,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})}),this)}}}));var T=E,I=function(e,t,n,r){var i=r&&r.redactedKeys?r.redactedKeys:[],s=r&&r.redactedPaths?r.redactedPaths:[];return JSON.stringify(P(e,i,s),t,n)},S=20,O=25e3,k=8,A="...";function C(e){return e instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(e))}function R(e){return"[Throws: "+(e?e.message:"?")+"]"}function N(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(0===t.indexOf(e[n]))return!0;return!1}function x(e,t){for(var n=0,r=e.length;n<r;n++){if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase())return!0;if(e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0}return!1}function M(e){return"[object Array]"===Object.prototype.toString.call(e)}function L(e,t){try{return e[t]}catch(e){return R(e)}}function P(e,t,n){var r=[],i=0;function s(e,o){function a(){return o.length>k&&i>O}if(i++,o.length>S)return A;if(a())return A;if(null===e||"object"!=typeof e)return e;if(N(r,e))return"[Circular]";if(r.push(e),"function"==typeof e.toJSON)try{i--;var u=s(e.toJSON(),o);return r.pop(),u}catch(e){return R(e)}if(C(e)){i--;
2var c=s({name:e.name,message:e.message},o);return r.pop(),c}if(M(e)){for(var l=[],h=0,d=e.length;h<d;h++){if(a()){l.push(A);break}l.push(s(e[h],o.concat("[]")))}return r.pop(),l}var f={};try{for(var p in e)if(Object.prototype.hasOwnProperty.call(e,p))if(D(n,o.join("."))&&x(t,p))f[p]="[REDACTED]";else{if(a()){f[p]=A;break}f[p]=s(L(e,p),o.concat(p))}}catch(e){}return r.pop(),f}return s(e,[])}function j(e,t,n,r){if("string"==typeof n){void 0===r?r=null:null!==r&&"string"!=typeof r&&(r=I(r));var i=t[n];"number"!=typeof i?(e.push({name:n,variant:r}),t[n]=e.length-1):e[i]={name:n,variant:r}}}function F(e,t,n){if(s(t)){for(var r=0;r<t.length;++r){var i=t[r];null!==i&&"object"==typeof i&&j(e,n,i.name,i.variant)}return e}}function $(e){return g(r(e,Boolean),(function(e){var t=e.name,n=e.variant,r={featureFlag:t};return"string"==typeof n&&(r.variant=n),r}))}function U(e,t,n){var r=t[n];"number"==typeof r&&(e[r]=null,delete t[n])}var V={add:j,clear:U,merge:F,toEventApi:$},B=function(e){return!(!e||!e.stack&&!e.stacktrace&&!e["opera#sourceloc"]||"string"!=typeof(e.stack||e.stacktrace||e["opera#sourceloc"])||e.stack===e.name+": "+e.message)};function q(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}var H=q,z=function(e,t,n,r){var i;if(t){var s;if(null===n)return W(e,t);"object"==typeof n&&(s=n),"string"==typeof n&&((i={})[n]=r,s=i),s&&(e[t]||(e[t]={}),e[t]=p({},e[t],s))}},W=function(e,t,n){"string"==typeof t&&(n?e[t]&&delete e[t][n]:delete e[t])},K={add:z,get:function(e,t,n){if("string"==typeof t)return n?e[t]?e[t][n]:void 0:e[t]},clear:W},G={};!function(t,n){"use strict";"function"==typeof e&&e.amd?e("stack-generator",["stackframe"],n):"object"==typeof G?G=n(w):t.StackGenerator=n(t.StackFrame)}(this,(function(e){return{backtrace:function(t){var n=[],r=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(r=t.maxStackSize);for(var i=arguments.callee;i&&n.length<r&&i.arguments;){for(var s=new Array(i.arguments.length),o=0;o<s.length;++o)s[o]=i.arguments[o];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:s})):n.push(new e({args:s}));try{i=i.caller}catch(e){break}}return n}}}));var Y=function(){function e(t,n,r,i,s){void 0===r&&(r=[]),void 0===i&&(i=Z()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=s,this._handledState=i,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this.errors=[ee(t,n,e.__type,r)]}var t=e.prototype;return t.addMetadata=function(e,t,n){return K.add(this._metadata,e,t,n)},t.getMetadata=function(e,t){return K.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return K.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){void 0===t&&(t=null),V.add(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){V.merge(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return V.toEventApi(this._features)},t.clearFeatureFlag=function(e){V.clear(this._features,this._featuresIndex,e)},t.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{payloadVersion:"4",exceptions:g(this.errors,(function(e){return p({},e,{message:e.errorMessage})})),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags()}},e}(),X=function(e){var t={file:e.fileName,method:Q(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:void 0,inProject:void 0};return t.lineNumber>-1&&!t.file&&!t.method&&(t.file="global code"),t},Q=function(e){return/^global code$/i.test(e)?"global code":e},Z=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},J=function(e){return"string"==typeof e?e:""};
2function ee(e,t,r,i){return{errorClass:J(e),errorMessage:J(t),type:r,stacktrace:n(i,(function(e,t){var n=X(t);try{return"{}"===JSON.stringify(n)?e:e.concat(n)}catch(t){return e}}),[])}}function te(e){return e.cause?[e].concat(te(e.cause)):[e]}Y.getStacktrace=function(e,t,n){if(B(e))return T.parse(e).slice(t);try{return r(G.backtrace(),(function(e){return-1===(e.functionName||"").indexOf("StackGenerator$$")})).slice(1+n)}catch(e){return[]}},Y.create=function(e,t,n,r,i,s){void 0===i&&(i=0);var o,a=re(e,t,r,s),u=a[0],c=a[1];try{var l=Y.getStacktrace(u,c>0?1+c+i:0,1+i);o=new Y(u.name,u.message,l,n,e)}catch(t){o=new Y(u.name,u.message,[],n,e)}if("InvalidError"===u.name&&o.addMetadata(""+r,"non-error parameter",ne(e)),u.cause){var h,d=te(u).slice(1),f=g(d,(function(e){var t=H(e)&&B(e)?T.parse(e):[],n=re(e,!0,"error cause")[0];return"InvalidError"===n.name&&o.addMetadata("error cause",ne(e)),ee(n.name,n.message,Y.__type,t)}));(h=o.errors).push.apply(h,f)}return o};var ne=function(e){return null===e?"null":void 0===e?"undefined":e},re=function(e,t,n,r){var i,s=0,o=function(e){var t="error cause"===n?"was":"received";r&&r.warn(n+" "+t+' a non-error: "'+e+'"');var i=new Error(n+" "+t+' a non-error. See "'+n+'" tab for more detail.');return i.name="InvalidError",i};if(t)switch(typeof e){case"string":case"number":case"boolean":i=new Error(String(e)),s+=1;break;case"function":i=o("function"),s+=2;break;case"object":null!==e&&H(e)?i=e:null!==e&&ie(e)?((i=new Error(e.message||e.errorMessage)).name=e.name||e.errorClass,s+=1):(i=o(null===e?"null":"unsupported object"),s+=2);break;default:i=o("nothing"),s+=2}else H(e)?i=e:(i=o(typeof e),s+=2);if(!B(i))try{throw i}catch(e){B(e)&&(i=e,s=1)}return[i,s]};Y.__type="browserjs";var ie=function(e){return!("string"!=typeof e.name&&"string"!=typeof e.errorClass||"string"!=typeof e.message&&"string"!=typeof e.errorMessage)},se=Y,oe=function(e,t,n){var r=0,i=function(){if(r>=e.length)return n(null,!0);t(e[r],(function(e,t){return e?n(e):!1===t?n(null,!1):(r++,void i())}))};i()},ae=function(e,t,n,r){var i=function(e,r){if("function"!=typeof e)return r(null);try{if(2!==e.length){var i=e(t);return i&&"function"==typeof i.then?i.then((function(e){return setTimeout((function(){return r(null,e)}))}),(function(e){setTimeout((function(){return n(e),r(null,!0)}))})):r(null,i)}e(t,(function(e,t){if(e)return n(e),r(null);r(null,t)}))}catch(e){n(e),r(null)}};oe(e,i,r)},ue=function(e,t,n,r){for(var i=!1,s=e.slice();!i&&s.length;)try{i=!1===s.pop()(t)}catch(e){r.error("Error occurred in "+n+" callback, continuing anyway…"),r.error(e)}return i},ce=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},le="object"==typeof window?window:self,he=0;for(var de in le)Object.hasOwnProperty.call(le,de)&&he++;var fe=navigator.mimeTypes?navigator.mimeTypes.length:0,pe=ce((fe+navigator.userAgent.length).toString(36)+he.toString(36),4),ge=function(){return pe},me=0,ve=4,ye=36,be=Math.pow(ye,ve);function _e(){return ce((Math.random()*be<<0).toString(ye),ve)}function we(){return me=me<be?me:0,++me-1}function Ee(){return"c"+(new Date).getTime().toString(ye)+ce(we().toString(ye),ve)+ge()+(_e()+_e())}Ee.fingerprint=ge;var Te=Ee,Ie=function(){function e(){this.id=Te(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),Se=Ie,Oe=V.add,ke=V.clear,Ae=V.merge,Ce=function(){},Re=function(){function e(t,n,r,i){var s=this;void 0===n&&(n=d.schema),void 0===r&&(r=[]),this._notifier=i,this._config={},this._schema=n,this._delivery={sendSession:Ce,sendEvent:Ce},this._logger={debug:Ce,info:Ce,warn:Ce,error:Ce},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=e,this.Event=se,this.Breadcrumb=_,this.Session=Se,this._config=this._configure(t,r),g(r.concat(this._config.plugins),(function(e){e&&s._loadPlugin(e)})),this._depth=1;var o=this,a=this.notify;this.notify=function(){return a.apply(o,arguments)}}var s=e.prototype;return s.addMetadata=function(e,t,n){return K.add(this._metadata,e,t,n)},s.getMetadata=function(e,t){return K.get(this._metadata,e,t)},s.clearMetadata=function(e,t){return K.clear(this._metadata,e,t)},s.addFeatureFlag=function(e,t){void 0===t&&(t=null),Oe(this._features,this._featuresIndex,e,t)},s.addFeatureFlags=function(e){Ae(this._features,e,this._featuresIndex)},s.clearFeatureFlag=function(e){ke(this._features,this._featuresIndex,e)},s.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},s.getContext=function(){return this._context},s.setContext=function(e){this._context=e},s._configure=function(e,t){var r=n(t,(function(e,t){return t&&t.configSchema?p({},e,t.configSchema):e}),this._schema),i=n(u(r),(function(t,n){var i=r[n].defaultValue(e[
2n]);return void 0!==e[n]?r[n].validate(e[n])?r[n].allowPartialObject?t.config[n]=p(i,e[n]):t.config[n]=e[n]:(t.errors[n]=r[n].message,t.config[n]=i):t.config[n]=i,t}),{errors:{},config:{}}),s=i.errors,o=i.config;if(r.apiKey){if(!o.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(o.apiKey)||(s.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=p({},o.metadata),Ae(this._features,o.featureFlags,this._featuresIndex),this._user=p({},o.user),this._context=o.context,o.logger&&(this._logger=o.logger),o.onError&&(this._cbs.e=this._cbs.e.concat(o.onError)),o.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(o.onBreadcrumb)),o.onSession&&(this._cbs.s=this._cbs.s.concat(o.onSession)),u(s).length&&this._logger.warn(Ne(s,e)),o},s.getUser=function(){return this._user},s.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},s._loadPlugin=function(e){var t=e.load(this);return e.name&&(this._plugins["~"+e.name+"~"]=t),this},s.getPlugin=function(e){return this._plugins["~"+e+"~"]},s._setDelivery=function(e){this._delivery=e(this)},s.startSession=function(){var e=new Se;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=p({},this._user),ue(this._cbs.s,e,"onSession",this._logger)?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},s.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},s.removeOnError=function(e){this._cbs.e=r(this._cbs.e,(function(t){return t!==e}))},s._addOnSessionPayload=function(e){this._cbs.sp.push(e)},s.addOnSession=function(e){this._cbs.s.push(e)},s.removeOnSession=function(e){this._cbs.s=r(this._cbs.s,(function(t){return t!==e}))},s.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},s.removeOnBreadcrumb=function(e){this._cbs.b=r(this._cbs.b,(function(t){return t!==e}))},s.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},s.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},s.leaveBreadcrumb=function(e,n,r){if(e="string"==typeof e?e:"",r="string"==typeof r&&i(t,r)?r:"manual",n="object"==typeof n&&null!==n?n:{},e){var s=new _(e,n,r);ue(this._cbs.b,s,"onBreadcrumb",this._logger)?this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback"):(this._breadcrumbs.push(s),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs)))}},s._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||i(t,e)},s.notify=function(e,t,n){void 0===n&&(n=Ce);var r=se.create(e,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(r,t,n)},s._notify=function(t,n,r){var s=this;if(void 0===r&&(r=Ce),t.app=p({},t.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),t.context=t.context||this._context,t._metadata=p({},t._metadata,this._metadata),t._user=p({},t._user,this._user),t.breadcrumbs=this._breadcrumbs.slice(),Ae(t._features,this._features,t._featuresIndex),null!==this._config.enabledReleaseStages&&!i(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),r(null,t);var o=t.severity,a=function(e){s._logger.error("Error occurred in onError callback, continuing anyway…"),s._logger.error(e)},u=[].concat(this._cbs.e).concat(n);ae(u,t,a,(function(n,i){if(n&&a(n),!i)return s._logger.debug("Event not sent due to onError callback"),r(null,t);s._isBreadcrumbTypeEnabled("error")&&e.prototype.leaveBreadcrumb.call(s,t.errors[0].errorClass,{errorClass:t.errors[0].errorClass,errorMessage:t.errors[0].errorMessage,severity:t.severity},"error"),o!==t.severity&&(t._handledState.severityReason={type:"userCallbackSetSeverity"}),t.unhandled!==t._handledState.unhandled&&(t._handledState.severityReason.unhandledOverridden=!0,t._handledState.unhandled=t.unhandled),s._session&&(s._session._track(t),t._session=s._session),s._delivery.sendEvent({apiKey:t.apiKey||s._config.apiKey,notifier:s._notifier,events:[t]},(function(e){return r(e,t)}))}))},e}(),Ne=function(e,t){return new Error("Invalid configuration\n"+g(u(e),(function(n){return"  - "+n+" "+e[n]+", got "+De(t[n])})).join("\n\n"))},De=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},xe=Re,Me={},Le=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];Me.event=function(e,t){var n=I(e,null,null,{redactedPaths:Le,redactedKeys:t});return n.length>1e6&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},n=I(e,null,null,{redactedPaths:Le,redactedKeys:t})),n},Me.session=function(e,t){return I(e,null,null)};var Pe={};Pe=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){void 0===r&&(r=function(){});var i=je(e._config,"notify","4",t),s=Me.event(n,e._config.redactedKeys),o=new t.XDomainRequest;o.onload=function(){r(null)},o.onerror=function(){var t=new Error("Event failed to send");e._logger.error("Event failed to send…",t),s.length>1e6&&e._logger.warn("Event oversized ("+(s.length/1e6).toFixed(2)+" MB)"),r(t)},o.open("POST",i),setTimeout((function(){try{o.send(s)}catch(t){e._logger.error(t),r(t)}}),0)},sendSession:function(n,r){void 0===r&&(r=function(){});var i=je(e._config,"sessions","1",t),s=new t.XDomainRequest;s.onload=function(){r(null)}
2,s.open("POST",i),setTimeout((function(){try{s.send(Me.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}}),0)}}};var je=function(e,t,n,r){var i=JSON.parse(JSON.stringify(new Date));return Fe(e.endpoints[t],r.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(i)},Fe=Pe._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e},$e=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){void 0===r&&(r=function(){});try{var i=e._config.endpoints.notify,s=new t.XMLHttpRequest,o=Me.event(n,e._config.redactedKeys);s.onreadystatechange=function(){if(s.readyState===t.XMLHttpRequest.DONE){var n=s.status;if(0===n||n>=400){var i=new Error("Request failed with status "+n);e._logger.error("Event failed to send…",i),o.length>1e6&&e._logger.warn("Event oversized ("+(o.length/1e6).toFixed(2)+" MB)"),r(i)}else r(null)}},s.open("POST",i),s.setRequestHeader("Content-Type","application/json"),s.setRequestHeader("Bugsnag-Api-Key",n.apiKey||e._config.apiKey),s.setRequestHeader("Bugsnag-Payload-Version","4"),s.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),s.send(o)}catch(t){e._logger.error(t)}},sendSession:function(n,r){void 0===r&&(r=function(){});try{var i=e._config.endpoints.sessions,s=new t.XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===t.XMLHttpRequest.DONE){var n=s.status;if(0===n||n>=400){var i=new Error("Request failed with status "+n);e._logger.error("Session failed to send…",i),r(i)}else r(null)}},s.open("POST",i),s.setRequestHeader("Content-Type","application/json"),s.setRequestHeader("Bugsnag-Api-Key",e._config.apiKey),s.setRequestHeader("Bugsnag-Payload-Version","1"),s.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),s.send(Me.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t)}}}},Ue=new Date,Ve=function(){Ue=new Date},Be={name:"appDuration",load:function(e){return e.addOnError((function(e){var t=new Date;e.app.duration=t-Ue}),!0),{reset:Ve}}},qe=function(e){return void 0===e&&(e=window),{load:function(t){t.addOnError((function(t){void 0===t.context&&(t.context=e.location.pathname)}),!0)}}},He=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},ze="object"==typeof window?window:self,We=0;for(var Ke in ze)Object.hasOwnProperty.call(ze,Ke)&&We++;var Ge=navigator.mimeTypes?navigator.mimeTypes.length:0,Ye=He((Ge+navigator.userAgent.length).toString(36)+We.toString(36),4),Xe=function(){return Ye},Qe=0,Ze=4,Je=36,et=Math.pow(Je,Ze);function tt(){return He((Math.random()*et<<0).toString(Je),Ze)}function nt(){return Qe=Qe<et?Qe:0,++Qe-1}function rt(){return"c"+(new Date).getTime().toString(Je)+He(nt().toString(Je),Ze)+Xe()+(tt()+tt())}rt.fingerprint=Xe;var it=rt,st="bugsnag-anonymous-id",ot=function(e){try{var t=e.localStorage,n=t.getItem(st);return n&&/^c[a-z0-9]{20,32}$/.test(n)||(n=it(),t.setItem(st,n)),n}catch(e){}},at=function(e,t){return void 0===e&&(e=navigator),void 0===t&&(t=window),{load:function(n){var r={locale:e.browserLanguage||e.systemLanguage||e.userLanguage||e.language,userAgent:e.userAgent};t&&t.screen&&t.screen.orientation&&t.screen.orientation.type?r.orientation=t.screen.orientation.type:t&&t.document&&(r.orientation=t.document.documentElement.clientWidth>t.document.documentElement.clientHeight?"landscape":"portrait"),n._config.generateAnonymousId&&(r.id=ot(t)),n.addOnSession((function(e){e.device=p({},e.device,r),n._config.collectUserIp||ut(e)})),n.addOnError((function(e){e.device=p({},e.device,r,{time:new Date}),n._config.collectUserIp||ut(e)}),!0)},configSchema:{generateAnonymousId:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}},ut=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},ct=function(e){return void 0===e&&(e=window),{load:function(t){t.addOnError((function(t){t.request&&t.request.url||(t.request=p({},t.request,{url:e.location.href}))}),!0)}}},lt={load:function(e){e._sessionDelegate=ht}},ht={startSession:function(e,t){var n=e;return n._session=t,n._pausedSession=null,null===n._config.enabledReleaseStages||i(n._config.enabledReleaseStages,n._config.releaseStage)?(n._delivery.sendSession({notifier:n._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}),n):(n._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),n)},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()},pauseSession:function(e){e._pausedSession=e._session,e._session=null}},dt={load:function(e){e._config.collectUserIp||e.addOnError((function(e){e._user&&void 0===e._user.id&&delete e._user.id,e._user=p({id:"[REDACTED]"},e._user),e.request=p({clientIp:"[REDACTED]"},e.request)}))},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}}}}
2,ft={load:function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled("log")&&g(pt,(function(t){var r=console[t];console[t]=function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];e.leaveBreadcrumb("Console output",n(s,(function(e,t,n){var r="[Unknown value]";try{r=String(t)}catch(e){}if("[object Object]"===r)try{r=JSON.stringify(t)}catch(e){}return e["["+n+"]"]=r,e}),{severity:0===t.indexOf("group")?"log":t}),"log"),r.apply(console,s)},console[t]._restore=function(){console[t]=r}}))}},pt=r(["log","debug","info","warn","error"],(function(e){return"undefined"!=typeof console&&"function"==typeof console[e]})),gt=200,mt=5e5,vt=function(e,t){return void 0===e&&(e=document),void 0===t&&(t=window),{load:function(i){if(i._config.trackInlineScripts){var s=t.location.href,o="",a=e.attachEvent?"complete"===e.readyState:"loading"!==e.readyState,u=function(){return e.documentElement.outerHTML};o=u();var c=e.onreadystatechange;e.onreadystatechange=function(){"interactive"===e.readyState&&(o=u(),a=!0);try{c.apply(this,arguments)}catch(e){}};var l=null,h=function(e){l=e},d=function(){var t=e.currentScript||l;if(!t&&!a){var n=e.scripts||e.getElementsByTagName("script");t=n[n.length-1]}return t},f=function(e){a&&o||(o=u());var t=["\x3c!-- DOC START --\x3e"].concat(o.split("\n")),r=e-1,i=Math.max(r-3,0),s=Math.min(r+3,t.length);return n(t.slice(i,s),(function(e,t,n){return e[i+1+n]=t.length<=gt?t:t.substr(0,gt),e}),{})};i.addOnError((function(e){e.errors[0].stacktrace=r(e.errors[0].stacktrace,(function(e){return!/__trace__$/.test(e.method)}));var t=e.errors[0].stacktrace[0];if(!t||!t.file||t.file.replace(/#.*$/,"")===s.replace(/#.*$/,"")){var n=d();if(n){var i=n.innerHTML;e.addMetadata("script","content",i.length<=mt?i:i.substr(0,mt)),t&&t.lineNumber&&(t.code=f(t.lineNumber))}}}),!0);var p=g(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],(function(e){return yt(t,e,(function(e){return m(e,(function(e){return{get:function(){return e[0]},replace:function(t){e[0]=t}}}))}))}))[0];g(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],(function(e){t[e]&&t[e].prototype&&Object.prototype.hasOwnProperty.call(t[e].prototype,"addEventListener")&&(yt(t[e].prototype,"addEventListener",(function(e){return m(e,bt)})),yt(t[e].prototype,"removeEventListener",(function(e){return m(e,bt,!0)})))}))}function m(e,t,n){return void 0===n&&(n=!1),function(){var r=[].slice.call(arguments);try{var i=t(r),s=i.get();if(n&&e.apply(this,r),"function"!=typeof s)return e.apply(this,r);if(s.__trace__)i.replace(s.__trace__);else{var o=d();s.__trace__=function(){h(o),p((function(){h(null)}),0);var e=s.apply(this,arguments);return h(null),e},s.__trace__.__trace__=s.__trace__,i.replace(s.__trace__)}}catch(e){}if(e.apply)return e.apply(this,r);switch(r.length){case 1:return e(r[0]);case 2:return e(r[0],r[1]);default:return e()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}};function yt(e,t,n){var r=e[t];if(!r)return r;var i=n(r);return e[t]=i,r}function bt(e){var t=!!e[1]&&"function"==typeof e[1].handleEvent;return{get:function(){return t?e[1].handleEvent:e[1]},replace:function(n){t?e[1].handleEvent=n:e[1]=n}}}var _t=function(e){return void 0===e&&(e=window),{load:function(t){"addEventListener"in e&&t._isBreadcrumbTypeEnabled("user")&&e.addEventListener("click",(function(n){var r,i;try{r=Tt(n.target),i=It(n.target,e)}catch(e){r="[hidden]",i="[hidden]",t._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}t.leaveBreadcrumb("UI click",{targetText:r,targetSelector:i},"user")}),!0)}}},wt=/^\s+/,Et=/(^|[^\s])\s+$/;function Tt(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),(t=t.replace(wt,"").replace(Et,"$1")).length>140?t.slice(0,135)+"(...)":t}function It(e,t){var n=[e.tagName];if(e.id&&n.push("#"+e.id),e.className&&e.className.length&&n.push("."+e.className.split(" ").join(".")),!t.document.querySelectorAll||!Array.prototype.indexOf)return n.join("");try{if(1===t.document.querySelectorAll(n.join("")).length)return n.join("")}catch(e){return n.join("")}if(e.parentNode.childNodes.length>1){var r=Array.prototype.indexOf.call(e.parentNode.childNodes,e)+1;n.push(":nth-child("+r+")")}return 1===t.document.querySelectorAll(n.join("")).length?n.join(""):e.parentNode?It(e.parentNode,t)+" > "+n.join(""):n.join("")}var St={};St=function(e){void 0===e&&(e=window);var t={load:function(t){if("addEventListener"in e&&t._isBreadcrumbTypeEnabled("navigation")){var n=function(e){return function(){return t.leaveBreadcrumb(e,{},"navigation")}};e.addEventListener("pagehide",n("Page hidden"),!0),e.addEventListener("pageshow",n("Page shown"),!0),e.addEventListener("load",n("Page loaded"),!0),e.document.addEventListener("DOMContentLoaded",n("DOMContentLoaded"),!0),e.addEventListener("load",(function(){return e.addEventListener("popstate",n("Navigated back"),!0)})),e.addEventListener("hashchange",(function(n){var r=n.oldURL?{from:Ot(n.oldURL,e),to:Ot(n.newURL,e),state:Ct(e)}:{to:Ot(e.location.href,e)};t.leaveBreadcrumb("Hash changed",r,"navigation")}),!0),e.history.replaceState&&At(t,e.history,"replaceState",e),e.history.pushState&&At(t,e.history,"pushState",e)}}};return t};var Ot=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},kt=function(e,t,n,r){var i=Ot(e.location.href,e);return{title:n,state:t,prevState:Ct(e),to:r||i,from:i}},At=function(e,t,n,r){var i=t[n];t[n]=function(s,o,a){e.leaveBreadcrumb("History "+n,kt(r,s,o,a),"navigation"),"function"==typeof e.resetEventCount&&e.resetEventCount(),e._config.autoTrackSessions&&e.startSession(),i.apply(t,[s,o].concat(void 0!==a?a:[]))}},Ct=function(e){try{return e.history.state}catch(e){}},Rt="request",Nt=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=window);var n={load:function(n){if(n._isBreadcrumbTypeEnabled("request")){var r=[n._config.endpoints.notify,n._config.endpoints.sessions].concat(e);a(),l();var s=function(e,t,r){var i={status:e.status,request:t+" "+r};e.status>=400?n.leaveBreadcrumb("fetch() failed",i,Rt):n.leaveBreadcrumb("fetch() succeeded",i,Rt)},o=function(e,t){n.leaveBreadcrumb("fetch() error",{request:e+" "+t},Rt)}}function a(){if("addEventListener"in t.XMLHttpRequest.prototype){var e=t.XMLHttpRequest.prototype.open;t.XMLHttpRequest.prototype.open=function(t,n){var r=this,i=!1,s=function(){return c(t,n)},o=function(){return u(t,n,r.status)};i&&(this.removeEventListener("load",o),this.removeEventListener("error",s)),this.addEventListener("load",o),this.addEventListener("error",s),i=!0,e.apply(this,arguments)}}}function u(e,t,s){if(void 0!==t){if("string"!=typeof t||!i(r,t.replace(/\?.*$/,""))){var o={status:s,request:e+" "+t};s>=400?n.leaveBreadcrumb("XMLHttpRequest failed",o,Rt):n.leaveBreadcrumb("XMLHttpRequest succeeded",o,Rt)}}else n._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.")}function c(e,t){void 0!==t?"string"==typeof t&&i(r,t.replace(/\?.*$/,""))||n.leaveBreadcrumb("XMLHttpRequest error",{request:e+" "+t},Rt):n._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.")}function l(){if("fetch"in t&&!t.fetch.polyfill){var e=t.fetch;t.fetch=function(){var t,n=arguments,r=arguments[0],i=arguments[1],a=null;return r&&"object"==typeof r?(a=r.url,i&&"method"in i?t=i.method:r&&"method"in r&&(t=r.method)):(a=r,i&&"method"in i&&(t=i.method)),void 0===t&&(t="GET"),new Promise((function(r,i){e.apply(void 0,n).then((function(e){s(e,t,a),r(e)})).catch((function(e){o(t,a),i(e)}))}))}}}}};return n},Dt={load:function(e){var t=0;e.addOnError((function(n){if(t>=e._config.maxEvents)return e._logger.warn("Cancelling event send due to maxEvents per session limit of "+e._config.maxEvents+" being reached"),!1;t++})),e.resetEventCount=function(){t=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return c(1,100)(e)}}}},xt={},Mt=(xt={load:function(e){e.addOnError((function(e){var t=n(e.errors,(function(e,t){return e.concat(t.stacktrace)}),[]);g(t,(function(e){e.file=Mt(e.file)}))}
2))}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},Lt=function(e,t){return void 0===e&&(e=window),void 0===t&&(t="window onerror"),{load:function(n){if(n._config.autoDetectErrors&&n._config.enabledErrorTypes.unhandledExceptions){var r=e.onerror;e.onerror=i}function i(e,i,s,o,a){if(0===s&&/Script error\.?/.test(e))n._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var u,c={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(a)u=n.Event.create(a,!0,c,t,1),Pt(u.errors[0].stacktrace,i,s,o);else if("object"!=typeof e||null===e||i&&"string"==typeof i||s||o||a)u=n.Event.create(e,!0,c,t,1),Pt(u.errors[0].stacktrace,i,s,o);else{var l=e.type?"Event: "+e.type:"Error",h=e.message||e.detail||"";(u=n.Event.create({name:l,message:h},!0,c,t,1)).originalError=e,u.addMetadata(t,{event:e,extraParameters:i})}n._notify(u)}"function"==typeof r&&r.apply(this,arguments)}}}},Pt=function(e,t,n,r){e[0]||e.push({});var i=e[0];i.file||"string"!=typeof t||(i.file=t),!i.lineNumber&&jt(n)&&(i.lineNumber=n),i.columnNumber||(jt(r)?i.columnNumber=r:window.event&&jt(window.event.errorCharacter)&&(i.columnNumber=window.event.errorCharacter))},jt=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},Ft=function(e){return void 0===e&&(e=window),{load:function(t){if(t._config.autoDetectErrors&&t._config.enabledErrorTypes.unhandledRejections){var n=function(e){var n=e.reason,r=!1;try{e.detail&&e.detail.reason&&(n=e.detail.reason,r=!0)}catch(e){}var i=t.Event.create(n,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,t._logger);r&&g(i.errors[0].stacktrace,$t(n)),t._notify(i,(function(e){var t;H(e.originalError)&&!e.originalError.stack&&e.addMetadata("unhandledRejection handler",((t={})[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))}))};"addEventListener"in e?e.addEventListener("unhandledrejection",n):e.onunhandledrejection=function(e,t){n({detail:{reason:e,promise:t}})}}}}},$t=function(e){return function(t){t.file!==e.toString()&&t.method&&(t.method=t.method.replace(/^\s+/,""))}},Ut={},Vt="Bugsnag JavaScript",Bt="7.20.0",qt="https://github.com/bugsnag/bugsnag-js",Ht=p({},d.schema,y),zt={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t=[Be,at(),qe(),ct(),Dt,lt,dt,xt,Lt(),Ft(),St(),_t(),Nt(),ft,vt()],n=new xe(e,Ht,t,{name:Vt,version:Bt,url:qt});return n._setDelivery(window.XDomainRequest?Pe:$e),n._logger.debug("Loaded!"),n.leaveBreadcrumb("Bugsnag loaded",{},"state"),n._config.autoTrackSessions?n.startSession():n},start:function(e){return zt._client?(zt._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),zt._client):(zt._client=zt.createClient(e),zt._client)},isStarted:function(){return null!=zt._client}};return g(["resetEventCount"].concat(u(xe.prototype)),(function(e){/^_/.test(e)||(zt[e]=function(){if(!zt._client)return console.log("Bugsnag."+e+"() was called before Bugsnag.start()");zt._client._depth+=1;var t=zt._client[e].apply(zt._client,arguments);return zt._client._depth-=1,t})})),(Ut=zt).Client=xe,Ut.Event=se,Ut.Session=Se,Ut.Breadcrumb=_,Ut.default=zt,Ut}()},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(0);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}}const s="[DEFAULT]";class o{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){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new r.a;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const 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()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}}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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:s})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e="[DEFAULT]"){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const 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="[DEFAULT]"){return this.instances.has(e)}getOptions(e="[DEFAULT]"){return this.instancesOptions.get(e)||{}}initialize(e={}){const{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`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(r)}return r}onInit(e,t){var n;const 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);const s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const 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:(r=e,r===s?void 0:r),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){}var r;return n||null}normalizeInstanceIdentifier(e="[DEFAULT]"){return this.component?this.component.multipleInstances?e:s:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new 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);const t=new o(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},32:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return h}));const r=[];var i;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.E
2RROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));const s={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},o=i.INFO,a={[i.DEBUG]:"log",[i.VERBOSE]:"log",[i.INFO]:"info",[i.WARN]:"warn",[i.ERROR]:"error"},u=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=a[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}]  ${e.name}:`,...n)};class c{constructor(e){this.name=e,this._logLevel=o,this._logHandler=u,this._userLogHandler=null,r.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in i))throw new 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 new 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,i.DEBUG,...e),this._logHandler(this,i.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,i.VERBOSE,...e),this._logHandler(this,i.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,i.INFO,...e),this._logHandler(this,i.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,i.WARN,...e),this._logHandler(this,i.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,i.ERROR,...e),this._logHandler(this,i.ERROR,...e)}}function l(e){r.forEach((t=>{t.setLogLevel(e)}))}function h(e,t){for(const n of r){let r=null;t&&t.level&&(r=s[t.level]),n.userLogHandler=null===e?null:(t,n,...s)=>{const o=s.map((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((e=>e)).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:i[n].toLowerCase(),message:o,args:s,type:t.name})}}}},33:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ur})),n.d(t,"b",(function(){return lr})),n.d(t,"c",(function(){return cr})),n.d(t,"d",(function(){return dr})),n.d(t,"e",(function(){return hr})),n.d(t,"f",(function(){return fr})),n.d(t,"g",(function(){return pr})),n.d(t,"h",(function(){return or})),n.d(t,"i",(function(){return ar}));var r,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},s={},o=o||{},a=i||self;function u(){}function c(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function l(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var h="closure_uid_"+(1e9*Math.random()>>>0),d=0;function f(e,t,n){return e.call.apply(e.bind,arguments)}function p(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function g(e,t,n){return(g=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?f:p).apply(null,arguments)}function m(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function v(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Vb=function(e,n,r){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}function y(){this.s=this.s,this.o=this.o}var b={};y.prototype.s=!1,y.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0)){var e=function(e){return Object.prototype.hasOwnProperty.call(e,h)&&e[h]||(e[h]=++d)}(this);delete b[e]}},y.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const _=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},w=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){const r=e.length,i="string"==typeof e?e.split(""):e;for(let s=0;s<r;s++)s in i&&t.call(n,i[s],s,e)};function E(e){return Array.prototype.concat.apply([],arguments)}function T(e){const t=e.length;if(0<t){const n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function I(e){return/^[\s\xa0]*$/.test(e)}
vendor: 35,619 bytes, line 2
2var S,O=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function k(e,t){return-1!=e.indexOf(t)}function A(e,t){return e<t?-1:e>t?1:0}e:{var C=a.navigator;if(C){var R=C.userAgent;if(R){S=R;break e}}S=""}function N(e,t,n){for(const r in e)t.call(n,e[r],r,e)}function D(e){const t={};for(const n in e)t[n]=e[n];return t}var x="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function M(e,t){let n,r;for(let t=1;t<arguments.length;t++){for(n in r=arguments[t],r)e[n]=r[n];for(let t=0;t<x.length;t++)n=x[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function L(e){return L[" "](e),e}L[" "]=u;var P,j,F=k(S,"Opera"),$=k(S,"Trident")||k(S,"MSIE"),U=k(S,"Edge"),V=U||$,B=k(S,"Gecko")&&!(k(S.toLowerCase(),"webkit")&&!k(S,"Edge"))&&!(k(S,"Trident")||k(S,"MSIE"))&&!k(S,"Edge"),q=k(S.toLowerCase(),"webkit")&&!k(S,"Edge");function H(){var e=a.document;return e?e.documentMode:void 0}e:{var z="",W=(j=S,B?/rv:([^\);]+)(\)|;)/.exec(j):U?/Edge\/([\d\.]+)/.exec(j):$?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(j):q?/WebKit\/(\S+)/.exec(j):F?/(?:Version)[ \/]?(\S+)/.exec(j):void 0);if(W&&(z=W?W[1]:""),$){var K=H();if(null!=K&&K>parseFloat(z)){P=String(K);break e}}P=z}var G,Y={};function X(){return function(e){var t=Y;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){let e=0;const t=O(String(P)).split("."),n=O("9").split("."),r=Math.max(t.length,n.length);for(let o=0;0==e&&o<r;o++){var i=t[o]||"",s=n[o]||"";do{if(i=/(\d*)(\D*)(.*)/.exec(i)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==i[0].length&&0==s[0].length)break;e=A(0==i[1].length?0:parseInt(i[1],10),0==s[1].length?0:parseInt(s[1],10))||A(0==i[2].length,0==s[2].length)||A(i[2],s[2]),i=i[3],s=s[3]}while(0==e)}return 0<=e}))}if(a.document&&$){var Q=H();G=Q||(parseInt(P,10)||void 0)}else G=void 0;var Z=G,J=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{a.addEventListener("test",u,t),a.removeEventListener("test",u,t)}catch(e){}return e}();function ee(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}function te(e,t){if(ee.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(B){e:{try{L(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:ne[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&te.Z.h.call(this)}}ee.prototype.h=function(){this.defaultPrevented=!0},v(te,ee);var ne={2:"touch",3:"pen",4:"mouse"};te.prototype.h=function(){te.Z.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var re="closure_listenable_"+(1e6*Math.random()|0),ie=0;function se(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ia=i,this.key=++ie,this.ca=this.fa=!1}function oe(e){e.ca=!0,e.listener=null,e.proxy=null,e.src=null,e.ia=null}function ae(e){this.src=e,this.g={},this.h=0}function ue(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],s=_(i,t);(r=0<=s)&&Array.prototype.splice.call(i,s,1),r&&(oe(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ce(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i];if(!s.ca&&s.listener==t&&s.capture==!!n&&s.ia==r)return i}return-1}ae.prototype.add=function(e,t,n,r,i){var s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);var o=ce(e,t,r,i);return-1<o?(t=e[o],n||(t.fa=!1)):((t=new se(t,this.src,s,!!r,i)).fa=n,e.push(t)),t};var le="closure_lm_"+(1e6*Math.random()|0),he={};function de(e,t,n,r,i){if(r&&r.once)return pe(e,t,n,r,i);if(Array.isArray(t)){for(var s=0;s<t.length;s++)de(e,t[s],n,r,i);return null}return n=we(n),e&&e[re]?e.N(t,n,l(r)?!!r.capture:!!r,i):fe(e,t,n,!1,r,i)}function fe(e,t,n,r,i,s){if(!t)throw Error("Invalid event type");var o=l(i)?!!i.capture:!!i,a=be(e);if(a||(e[le]=a=new ae(e)),(n=a.add(t,n,r,o,s)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=ye;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)J||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(ve(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function pe(e,t,n,r,i){if(Array.isArray(t)){for(var s=0;s<t.length;s++)pe(e,t[s],n,r,i);return null}return n=we(n),e&&e[re]?e.O(t,n,l(r)?!!r.capture:!!r,i):fe(e,t,n,!0,r,i)}function ge(e,t,n,r,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)ge(e,t[s],n,r,i);else r=l(r)?!!r.capture:!!r,n=we(n),e&&e[re]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=ce(s=e.g[t],n,r,i))&&(oe(s[n]),Array.prototype.splice.call(s,n,1),0==s.length&&(delete e.g[t],e.h--)))):e&&(e=be(e))&&(t=e.g[t.toString()],e=-1,t&&(e=ce(t,n,r,i)),(n=-1<e?t[e]:null)&&me(n))}function me(e){if("number"!=typeof e&&e&&!e.ca){var t=e.src;if(t&&t[re])ue(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(ve(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=be(t))?(ue(n,e),0==n.h&&(n.src=null,t[le]=null)):oe(e)}}}function ve(e){return e in he?he[e]:he[e]="on"+e}function ye(e,t){if(e.ca)e=!0;else{t=new te(t,this);var n=e.listener,r=e.ia||e.src;e.fa&&me(e),e=n.call(r,t)}return e}function be(e){return(e=e[le])instanceof ae?e:null}var _e="__closure_events_fn_"+(1e9*Math.random()>>>0);function we(e){return"function"==typeof e?e:(e[_e]||(e[_e]=function(t){return e.handleEvent(t)}),e[_e])}function Ee(){y.call(this),this.i=new ae(this),this.P=this,this.I=null}function Te(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"==typeof t)t=new ee(t,e);else if(t instanceof ee)t.target=t.target||e;else{var i=t;M(t=new ee(r,e),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=t.g=n[s];i=Ie(o,r,!0,t)&&i}if(i=Ie(o=t.g=e,r,!0,t)&&i,i=Ie(o,r,!1,t)&&i,n)for(s=0;s<n.length;s++)i=Ie(o=t.g=n[s],r,!1,t)&&i}function Ie(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,s=0;s<t.length;++s){var o=t[s];if(o&&!o.ca&&o.capture==n){var a=o.listener,u=o.ia||o.src;o.fa&&ue(e.i,o),i=!1!==a.call(u,r)&&i}}return i&&!r.defaultPrevented}v(Ee,y),Ee.prototype[re]=!0,Ee.prototype.removeEventListener=function(e,t,n,r){ge(this,e,t,n,r)},Ee.prototype.M=function(){if(Ee.Z.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)oe(n[r]);delete t.g[e],t.h--}}this.I=null},Ee.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Ee.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Se=a.JSON.stringify;function Oe(){var e=xe;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var ke,Ae=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}((()=>new Ce),(e=>e.reset()));class Ce{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}function Re(e){a.setTimeout((()=>{throw e}),0)}function Ne(e,t){ke||function(){var e=a.Promise.resolve(void 0);ke=function(){e.then(Me)}}(),De||(ke(),De=!0),xe.add(e,t)}var De=!1,xe=new class{constructor(){this.h=this.g=null}add(e,t){const n=Ae.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}};function Me(){for(var e;e=Oe();){try{e.h.call(e.g)}catch(e){Re(e)}var t=Ae;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}De=!1}function Le(e,t){Ee.call(this),this.h=e||1,this.g=t||a,this.j=g(this.kb,this),this.l=Date.now()}function Pe(e){e.da=!1,e.S&&(e.g.clearTimeout(e.S),e.S=null)}function je(e,t,n){if("function"==typeof e)n&&(e=g(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=g(e.handleEvent,e)}return 2147483647<Number(t)?-1:a.setTimeout(e,t||0)}function Fe(e){e.g=je((()=>{e.g=null,e.i&&(e.i=!1,Fe(e))}),e.j);const t=e.h;e.h=null,e.m.apply(null,t)}v(Le,Ee),(r=Le.prototype).da=!1,r.S=null,r.kb=function(){if(this.da){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.S=this.g.setTimeout(this.j,this.h-e):(this.S&&(this.g.clearTimeout(this.S),this.S=null),Te(this,"tick"),this.da&&(Pe(this),this.start()))}},r.start=function(){this.da=!0,this.S||(this.S=this.g.setTimeout(this.j,this.h),this.l=Date.now())},r.M=function(){Le.Z.M.call(this),Pe(this),delete this.g};class $e extends y{constructor(e,t){super(),this.m=e,this.j=t,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:Fe(this)}M(){super.M(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Ue(e){y.call(this),this.h=e,this.g={}}v(Ue,y);var Ve=[];function Be(e,t,n,r){Array.isArray(n)||(n&&(Ve[0]=n.toString()),n=Ve);for(var i=0;i<n.length;i++){var s=de(t,n[i],r||e.handleEvent,!1,e.h||e);if(!s)break;e.g[s.key]=s}}function qe(e){N(e.g,(function(e,t){this.g.hasOwnProperty(t)&&me(e)}),e),e.g={}}function He(){this.g=!0}function ze(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}return Se(n)}catch(e){return t}}(e,n)+(r?" "+r:"")}))}Ue.prototype.M=function(){Ue.Z.M.call(this),qe(this)},Ue.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},He.prototype.Aa=function(){this.g=!1},He.prototype.info=function(){};var We={},Ke=null;function Ge(){return Ke=Ke||new Ee}function Ye(e){ee.call(this,We.Ma,e)}function Xe(e){const t=Ge();Te(t,new Ye(t,e))}function Qe(e,t){ee.call(this,We.STAT_EVENT,e),this.stat=t}function Ze(e){const t=Ge();Te(t,new Qe(t,e))}function Je(e,t){ee.call(this,We.Na,e),this.size=t}function et(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return a.setTimeout((function(){e()}),t)}We.Ma="serverreachability",v(Ye,ee),We.STAT_EVENT="statevent",v(Qe,ee),We.Na="timingevent",v(Je,ee);var tt={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,Ja:7,TIMEOUT:8,Cb:9},nt={qb:"complete",Mb:"success",Ka:"error",Ja:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function rt(){}function it(e){return e.h||(e.h=e.i())}function st(){}rt.prototype.h=null;var ot,at={OPEN:"a",pb:"b",Ka:"c",Bb:"d"};function ut(){ee.call(this,"d")}function ct(){ee.call(this,"c")}function lt(){}function ht(e,t,n,r){this.l=e,this.j=t,this.m=n,this.X=r||1,this.V=new Ue(this),this.P=ft,e=V?125:void 0,this.W=new Le(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.Y=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.N=-1,this.I=!1,this.O=0,this.L=null,this.aa=this.J=this.$=this.U=!1,this.h=new dt}function dt(){this.i=null,this.g="",this.h=!1}v(ut,ee),v(ct,ee),v(lt,rt),lt.prototype.g=function(){return new XMLHttpRequest},lt.prototype.i=function(){return{}},ot=new lt;var ft=45e3,pt={},gt={};function mt(e,t,n){e.K=1,e.v=$t(xt(t)),e.s=n,e.U=!0,vt(e,null)}function vt(e,t){e.F=Date.now(),wt(e),e.A=xt(e.v);var n=e.A,r=e.X;Array.isArray(r)||(r=[String(r)]),Zt(n.h,"t",r),e.C=0,n=e.l.H,e.h=new dt,e.g=Jn(e.l,n?t:null,!e.s),0<e.O&&(e.L=new $e(g(e.Ia,e,e.g),e.O)),Be(e.V,e.g,"readystatechange",e.gb),t=e.H?D(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.s,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),Xe(1),function(e,t,n,r,i,s){e.info((function(){if(e.g)if(s)for(var o="",a=s.split("&"),u=0;u<a.length;u++){var c=a[u].split("=");if(1<c.length){var l=c[0];c=c[1];var h=l.split("_");o=2<=h.length&&"type"==h[1]?o+(l+"=")+c+"&":o+(l+"=redacted&")}}else o=null;else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.X,e.s)}function yt(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Ba)}function bt(e,t,n){let r,i=!0;for(;!e.I&&e.C<n.length;){if(r=_t(e,n),r==gt){4==t&&(e.o=4,Ze(14),i=!1),ze(e.j,e.m,null,"[Incomplete Response]");break}if(r==pt){e.o=4,Ze(15),ze(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}ze(e.j,e.m,r,null),Ot(e,r)}yt(e)&&r!=gt&&r!=pt&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,Ze(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.aa&&(e.aa=!0,(t=e.l).g==e&&t.$&&!t.L&&(t.h.info("Great, no buffering proxy detected. Bytes received: "+n.length),zn(t),t.L=!0,Ze(11))):(ze(e.j,e.m,n,"[Invalid Chunked Response]"),St(e),It(e))}function _t(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?gt:(n=Number(t.substring(n,r)),isNaN(n)?pt:(r+=1)+n>t.length?gt:(t=t.substr(r,n),e.C=r+n,t))}function wt(e){e.Y=Date.now()+e.P,Et(e,e.P)}function Et(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=et(g(e.eb,e),t)}function Tt(e){e.B&&(a.clearTimeout(e.B),e.B=null)}function It(e){0==e.l.G||e.I||Gn(e.l,e)}function St(e){Tt(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,Pe(e.W),qe(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Ot(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||sn(n.i,e)))if(n.I=e.N,!e.J&&sn(n.i,e)&&3==n.G){try{var r=n.Ca.g.parse(t)}catch(e){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;Kn(n),Pn(n)}Hn(n),Ze(18)}}else n.ta=i[1],0<n.ta-n.U&&37500>i[2]&&n.N&&0==n.A&&!n.v&&(n.v=et(g(n.ab,n),6e3));if(1>=rn(n.i)&&n.ka){try{n.ka()}catch(e){}n.ka=void 0}}else Xn(n,11)}else if((e.J||n.g==e)&&Kn(n),!I(t))for(i=n.Ca.g.parse(t),t=0;t<i.length;t++){let c=i[t];if(n.U=c[0],c=c[1],2==n.G)if("c"==c[0]){n.J=c[1],n.la=c[2];const t=c[3];null!=t&&(n.ma=t,n.h.info("VER="+n.ma));const i=c[4];null!=i&&(n.za=i,n.h.info("SVER="+n.za));const l=c[5];null!=l&&"number"==typeof l&&0<l&&(r=1.5*l,n.K=r,n.h.info("backChannelRequestTimeoutMs_="+r)),r=n;const h=e.g;if(h){const e=h.g?h.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var s=r.i;!s.g&&(k(e,"spdy")||k(e,"quic")||k(e,"h2"))&&(s.j=s.l,s.g=new Set,s.h&&(on(s,s.h),s.h=null))}if(r.D){const e=h.g?h.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(r.sa=e,Ft(r.F,r.D,e))}}n.G=3,n.j&&n.j.xa(),n.$&&(n.O=Date.now()-e.F,n.h.info("Handshake RTT: "+n.O+"ms"));var o=e;if((r=n).oa=Zn(r,r.H?r.la:null,r.W),o.J){an(r.i,o);var a=o,u=r.K;u&&a.setTimeout(u),a.B&&(Tt(a),wt(a)),r.g=o}else qn(r);0<n.l.length&&$n(n)}else"stop"!=c[0]&&"close"!=c[0]||Xn(n,7);else 3==n.G&&("stop"==c[0]||"close"==c[0]?"stop"==c[0]?Xn(n,7):Ln(n):"noop"!=c[0]&&n.j&&n.j.wa(c),n.A=0)}Xe(4)}catch(e){}}function kt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(c(e)||"string"==typeof e)w(e,t,void 0);else{if(e.T&&"function"==typeof e.T)var n=e.T();else if(e.R&&"function"==typeof e.R)n=void 0;else if(c(e)||"string"==typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;r=function(e){if(e.R&&"function"==typeof e.R)return e.R();if("string"==typeof e)return e.split("");if(c(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length;for(var s=0;s<i;s++)t.call(void 0,r[s],n&&n[s],e)}}function At(e,t){this.h={},this.g=[],this.i=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof At)for(n=e.T(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Ct(e){if(e.i!=e.g.length){for(var t=0,n=0;t<e.g.length;){var r=e.g[t];Rt(e.h,r)&&(e.g[n++]=r),t++}e.g.length=n}if(e.i!=e.g.length){var i={};for(n=t=0;t<e.g.length;)Rt(i,r=e.g[t])||(e.g[n++]=r,i[r]=1),t++;e.g.length=n}}function Rt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(r=ht.prototype).setTimeout=function(e){this.P=e},r.gb=function(e){e=e.target;const t=this.L;t&&3==Rn(e)?t.l():this.Ia(e)},r.Ia=function(e){try{if(e==this.g)e:{const h=Rn(this.g);var t=this.g.Da();const d=this.g.ba();if(!(3>h)&&(3!=h||V||this.g&&(this.h.h||this.g.ga()||Nn(this.g)))){this.I||4!=h||7==t||Xe(8==t||0>=d?3:2),Tt(this);var n=this.g.ba();this.N=n;t:if(yt(this)){var r=Nn(this.g);e="";var i=r.length,s=4==Rn(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){St(this),It(this);var o="";break t}this.h.i=new a.TextDecoder}for(t=0;t<i;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:s&&t==i-1});r.splice(0,i),this.h.g+=e,this.C=0,o=this.h.g}else o=this.g.ga();if(this.i=200==n,function(e,t,n,r,i,s,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+s+" "+o}))}(this.j,this.u,this.A,this.m,this.X,h,n),this.i){if(this.$&&!this.J){t:{if(this.g){var u,c=this.g;if((u=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!I(u)){var l=u;break t}}l=null}if(!(n=l)){this.i=!1,this.o=3,Ze(12),St(this),It(this);break e}ze(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Ot(this,n)}this.U?(bt(this,h,o),V&&this.i&&3==h&&(Be(this.V,this.W,"tick",this.fb),this.W.start())):(ze(this.j,this.m,o,null),Ot(this,o)),4==h&&St(this),this.i&&!this.I&&(4==h?Gn(this.l,this):(this.i=!1,wt(this)))}else 400==n&&0<o.indexOf("Unknown SID")?(this.o=3,Ze(12)):(this.o=0,Ze(13)),St(this),It(this)}}}catch(e){}},r.fb=function(){if(this.g){var e=Rn(this.g),t=this.g.ga();this.C<t.length&&(Tt(this),bt(this,e,t),this.i&&4!=e&&wt(this))}},r.cancel=function(){this.I=!0,St(this)},r.eb=function(){this.B=null;const e=Date.now();0<=e-this.Y?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(Xe(3),Ze(17)),St(this),this.o=2,It(this)):Et(this,this.Y-e)},(r=At.prototype).R=function(){Ct(this);for(var e=[],t=0;t<this.g.length;t++)e.push(this.h[this.g[t]]);return e},r.T=function(){return Ct(this),this.g.concat()},r.get=function(e,t){return Rt(this.h,e)?this.h[e]:t},r.set=function(e,t){Rt(this.h,e)||(this.i++,this.g.push(e)),this.h[e]=t},r.forEach=function(e,t){for(var n=this.T(),r=0;r<n.length;r++){var i=n[r],s=this.get(i);e.call(t,s,i,this)}};var Nt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Dt(e,t){if(this.i=this.s=this.j="",this.m=null,this.o=this.l="",this.g=!1,e instanceof Dt){this.g=void 0!==t?t:e.g,Mt(this,e.j),this.s=e.s,Lt(this,e.i),Pt(this,e.m),this.l=e.l,t=e.h;var n=new Gt;n.i=t.i,t.g&&(n.g=new At(t.g),n.h=t.h),jt(this,n),this.o=e.o}else e&&(n=String(e).match(Nt))?(this.g=!!t,Mt(this,n[1]||"",!0),this.s=Ut(n[2]||""),Lt(this,n[3]||"",!0),Pt(this,n[4]),this.l=Ut(n[5]||"",!0),jt(this,n[6]||"",!0),this.o=Ut(n[7]||"")):(this.g=!!t,this.h=new Gt(null,this.g))}function xt(e){return new Dt(e)}function Mt(e,t,n){e.j=n?Ut(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Lt(e,t,n){e.i=n?Ut(t,!0):t}function Pt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function jt(e,t,n){t instanceof Gt?(e.h=t,function(e,t){t&&!e.j&&(Yt(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Xt(this,t),Zt(this,n,e))}),e)),e.j=t}(e.h,e.g)):(n||(t=Vt(t,Wt)),e.h=new Gt(t,e.g))}function Ft(e,t,n){e.h.set(t,n)}function $t(e){return Ft(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Ut(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Vt(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,Bt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Bt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Dt.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Vt(t,qt,!0),":");var n=this.i;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Vt(t,qt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&e.push("/"),e.push(Vt(n,"/"==n.charAt(0)?zt:Ht,!0))),(n=this.h.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Vt(n,Kt)),e.join("")};var qt=/[#\/\?@]/g,Ht=/[#\?:]/g,zt=/[#\?]/g,Wt=/[#\?@]/g,Kt=/#/g;function Gt(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Yt(e){e.g||(e.g=new At,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var s=e[n].substring(0,r);i=e[n].substring(r+1)}else s=e[n];t(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Xt(e,t){Yt(e),t=Jt(e,t),Rt(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,Rt((e=e.g).h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&Ct(e)))}function Qt(e,t){return Yt(e),t=Jt(e,t),Rt(e.g.h,t)}function Zt(e,t,n){Xt(e,t),0<n.length&&(e.i=null,e.g.set(Jt(e,t),T(n)),e.h+=n.length)}function Jt(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(r=Gt.prototype).add=function(e,t){Yt(this),this.i=null,e=Jt(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},r.forEach=function(e,t){Yt(this),this.g.forEach((function(n,r){w(n,(function(n){e.call(t,n,r,this)}),this)}),this)},r.T=function(){Yt(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r<t.length;r++)for(var i=e[r],s=0;s<i.length;s++)n.push(t[r]);return n},r.R=function(e){Yt(this);var t=[];if("string"==typeof e)Qt(this,e)&&(t=E(t,this.g.get(Jt(this,e))));else{e=this.g.R();for(var n=0;n<e.length;n++)t=E(t,e[n])}return t},r.set=function(e,t){return Yt(this),this.i=null,Qt(this,e=Jt(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},r.get=function(e,t){return e&&0<(e=this.R(e)).length?String(e[0]):t},r.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=this.g.T(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.R(r);for(var s=0;s<r.length;s++){var o=i;""!==r[s]&&(o+="="+encodeURIComponent(String(r[s]))),e.push(o)}}return this.i=e.join("&")};function en(e){this.l=e||tn,a.PerformanceNavigationTiming?e=0<(e=a.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(a.g&&a.g.Ea&&a.g.Ea()&&a.g.Ea().Zb),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var tn=10;function nn(e){return!!e.h||!!e.g&&e.g.size>=e.j}function rn(e){return e.h?1:e.g?e.g.size:0}function sn(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function on(e,t){e.g?e.g.add(t):e.h=t}function an(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function un(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){let t=e.i;for(const n of e.g.values())t=t.concat(n.D);return t}return T(e.i)}function cn(){}function ln(){this.g=new cn}function hn(e,t,n){const r=n||"";try{kt(e,(function(e,n){let i=e;l(e)&&(i=Se(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}function dn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(e){}}function fn(e){this.l=e.$b||null,this.j=e.ib||!1}function pn(e,t){Ee.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=gn,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}en.prototype.cancel=function(){if(this.i=un(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const e of this.g.values())e.cancel();this.g.clear()}},cn.prototype.stringify=function(e){return a.JSON.stringify(e,void 0)},cn.prototype.parse=function(e){return a.JSON.parse(e,void 0)},v(fn,rt),fn.prototype.g=function(){return new pn(this.l,this.j)},fn.prototype.i=function(e){return function(){return e}}({}),v(pn,Ee);var gn=0;function mn(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}function vn(e){e.readyState=4,e.l=null,e.j=null,e.A=null,yn(e)}function yn(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(r=pn.prototype).open=function(e,t){if(this.readyState!=gn)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,yn(this)},r.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||a).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))},r.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,vn(this)),this.readyState=gn},r.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,yn(this)),this.g&&(this.readyState=3,yn(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(void 0!==a.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;mn(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))},r.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?vn(this):yn(this),3==this.readyState&&mn(this)}},r.Ua=function(e){this.g&&(this.response=this.responseText=e,vn(this))},r.Ta=function(e){this.g&&(this.response=e,vn(this))},r.ha=function(){this.g&&vn(this)},r.setRequestHeader=function(e,t){this.v.append(e,t)},r.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},r.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(pn.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var bn=a.JSON.parse;function _n(e){Ee.call(this),this.headers=new At,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=wn,this.K=this.L=!1}v(_n,Ee);var wn="",En=/^https?$/i,Tn=["POST","PUT"];function In(e){return"content-type"==e.toLowerCase()}function Sn(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,On(e),An(e)}function On(e){e.D||(e.D=!0,Te(e,"complete"),Te(e,"error"))}function kn(e){if(e.h&&void 0!==o&&(!e.C[1]||4!=Rn(e)||2!=e.ba()))if(e.v&&4==Rn(e))je(e.Fa,0,e);else if(Te(e,"readystatechange"),4==Rn(e)){e.h=!1;try{const o=e.ba();e:switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var r;if(r=0===o){var i=String(e.H).match(Nt)[1]||null;if(!i&&a.self&&a.self.location){var s=a.self.location.protocol;i=s.substr(0,s.length-1)}r=!En.test(i?i.toLowerCase():"")}n=r}if(n)Te(e,"complete"),Te(e,"success");else{e.m=6;try{var u=2<Rn(e)?e.g.statusText:""}catch(e){u=""}e.j=u+" ["+e.ba()+"]",On(e)}}finally{An(e)}}}function An(e,t){if(e.g){Cn(e);const n=e.g,r=e.C[0]?u:null;e.g=null,e.C=null,t||Te(e,"ready");try{n.onreadystatechange=r}catch(e){}}}function Cn(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(a.clearTimeout(e.A),e.A=null)}function Rn(e){return e.g?e.g.readyState:0}function Nn(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case wn:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function Dn(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){let t="";return N(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):Ft(e,t,n))}function xn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Mn(e){this.za=0,this.l=[],this.h=new He,this.la=this.oa=this.F=this.W=this.g=this.sa=this.D=this.aa=this.o=this.P=this.s=null,this.Za=this.V=0,this.Xa=xn("failFast",!1,e),this.N=this.v=this.u=this.m=this.j=null,this.X=!0,this.I=this.ta=this.U=-1,this.Y=this.A=this.C=0,this.Pa=xn("baseRetryDelayMs",5e3,e),this.$a=xn("retryDelaySeedMs",1e4,e),this.Ya=xn("forwardChannelMaxRetries",2,e),this.ra=xn("forwardChannelRequestTimeoutMs",2e4,e),this.qa=e&&e.xmlHttpFactory||void 0,this.Ba=e&&e.Yb||!1,this.K=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.J="",this.i=new en(e&&e.concurrentRequestLimit),this.Ca=new ln,this.ja=e&&e.fastHandshake||!1,this.Ra=e&&e.Wb||!1,e&&e.Aa&&this.h.Aa(),e&&e.forceLongPolling&&(this.X=!1),this.$=!this.ja&&this.X&&e&&e.detectBufferingProxy||!1,this.ka=void 0,this.O=0,this.L=!1,this.B=null,this.Wa=!e||!1!==e.Xb}function Ln(e){if(jn(e),3==e.G){var t=e.V++,n=xt(e.F);Ft(n,"SID",e.J),Ft(n,"RID",t),Ft(n,"TYPE","terminate"),Vn(e,n),(t=new ht(e,e.h,t,void 0)).K=2,t.v=$t(xt(n)),n=!1,a.navigator&&a.navigator.sendBeacon&&(n=a.navigator.sendBeacon(t.v.toString(),"")),!n&&a.Image&&((new Image).src=t.v,n=!0),n||(t.g=Jn(t.l,null),t.g.ea(t.v)),t.F=Date.now(),wt(t)}Qn(e)}function Pn(e){e.g&&(zn(e),e.g.cancel(),e.g=null)}function jn(e){Pn(e),e.u&&(a.clearTimeout(e.u),e.u=null),Kn(e),e.i.cancel(),e.m&&("number"==typeof e.m&&a.clearTimeout(e.m),e.m=null)}function Fn(e,t){e.l.push(new class{constructor(e,t){this.h=e,this.g=t}}(e.Za++,t)),3==e.G&&$n(e)}function $n(e){nn(e.i)||e.m||(e.m=!0,Ne(e.Ha,e),e.C=0)}function Un(e,t){var n;n=t?t.m:e.V++;const r=xt(e.F);Ft(r,"SID",e.J),Ft(r,"RID",n),Ft(r,"AID",e.U),Vn(e,r),e.o&&e.s&&Dn(r,e.o,e.s),n=new ht(e,e.h,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.l=t.D.concat(e.l)),t=Bn(e,n,1e3),n.setTimeout(Math.round(.5*e.ra)+Math.round(.5*e.ra*Math.random())),on(e.i,n),mt(n,r,t)}function Vn(e,t){e.j&&kt({},(function(e,n){Ft(t,n,e)}))}function Bn(e,t,n){n=Math.min(e.l.length,n);var r=e.j?g(e.j.Oa,e.j,e):null;e:{var i=e.l;let t=-1;for(;;){const e=["count="+n];-1==t?0<n?(t=i[0].h,e.push("ofs="+t)):t=0:e.push("ofs="+t);let s=!0;for(let o=0;o<n;o++){let n=i[o].h;const a=i[o].g;if(n-=t,0>n)t=Math.max(0,i[o].h-100),s=!1;else try{hn(a,e,"req"+n+"_")}catch(e){r&&r(a)}}if(s){r=e.join("&");break e}}}return e=e.l.splice(0,n),t.D=e,r}function qn(e){e.g||e.u||(e.Y=1,Ne(e.Ga,e),e.A=0)}function Hn(e){return!(e.g||e.u||3<=e.A)&&(e.Y++,e.u=et(g(e.Ga,e),Yn(e,e.A)),e.A++,!0)}function zn(e){null!=e.B&&(a.clearTimeout(e.B),e.B=null)}function Wn(e){e.g=new ht(e,e.h,"rpc",e.Y),null===e.o&&(e.g.H=e.s),e.g.O=0;var t=xt(e.oa);Ft(t,"RID","rpc"),Ft(t,"SID",e.J),Ft(t,"CI",e.N?"0":"1"),Ft(t,"AID",e.U),Vn(e,t),Ft(t,"TYPE","xmlhttp"),e.o&&e.s&&Dn(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=$t(xt(t)),n.s=null,n.U=!0,vt(n,e)}function Kn(e){null!=e.v&&(a.clearTimeout(e.v),e.v=null)}function Gn(e,t){var n=null;if(e.g==t){Kn(e),zn(e),e.g=null;var r=2}else{if(!sn(e.i,t))return;n=t.D,an(e.i,t),r=1}if(e.I=t.N,0!=e.G)if(t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;Te(r=Ge(),new Je(r,n,t,i)),$n(e)}else qn(e);else if(3==(i=t.o)||0==i&&0<e.I||!(1==r&&function(e,t){return!(rn(e.i)>=e.i.j-(e.m?1:0)||(e.m?(e.l=t.D.concat(e.l),0):1==e.G||2==e.G||e.C>=(e.Xa?0:e.Ya)||(e.m=et(g(e.Ha,e,t),Yn(e,e.C)),e.C++,0)))}(e,t)||2==r&&Hn(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:Xn(e,5);break;case 4:Xn(e,10);break;case 3:Xn(e,6);break;default:Xn(e,2)}}function Yn(e,t){let n=e.Pa+Math.floor(Math.random()*e.$a);return e.j||(n*=2),n*t}function Xn(e,t){if(e.h.info("Error code "+t),2==t){var n=null;e.j&&(n=null);var r=g(e.jb,e);n||(n=new Dt("//www.google.com/images/cleardot.gif"),a.location&&"http"==a.location.protocol||Mt(n,"https"),$t(n)),function(e,t){const n=new He;if(a.Image){const r=new Image;r.onload=m(dn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=m(dn,n,r,"TestLoadImage: error",!1,t),r.onabort=m(dn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=m(dn,n,r,"TestLoadImage: timeout",!1,t),a.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else Ze(2);e.G=0,e.j&&e.j.va(t),Qn(e),jn(e)}function Qn(e){e.G=0,e.I=-1,e.j&&(0==un(e.i).length&&0==e.l.length||(e.i.i.length=0,T(e.l),e.l.length=0),e.j.ua())}function Zn(e,t,n){let r=function(e){return e instanceof Dt?xt(e):new Dt(e,void 0)}(n);if(""!=r.i)t&&Lt(r,t+"."+r.i),Pt(r,r.m);else{const e=a.location;r=function(e,t,n,r){var i=new Dt(null,void 0);return e&&Mt(i,e),t&&Lt(i,t),n&&Pt(i,n),r&&(i.l=r),i}(e.protocol,t?t+"."+e.hostname:e.hostname,+e.port,n)}return e.aa&&N(e.aa,(function(e,t){Ft(r,t,e)})),t=e.D,n=e.sa,t&&n&&Ft(r,t,n),Ft(r,"VER",e.ma),Vn(e,r),r}function Jn(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ba&&!e.qa?new _n(new fn({ib:!0})):new _n(e.qa)).L=e.H,t}function er(){}function tr(){if($&&!(10<=Number(Z)))throw Error("Environmental error: no available transport.")}function nr(e,t){Ee.call(this),this.g=new Mn(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.P=e,(e=t&&t.httpHeadersOverwriteParam)&&!I(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!I(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new sr(this)}function rr(e){ut.call(this);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function ir(){ct.call(this),this.status=1}function sr(e){this.g=e}(r=_n.prototype).ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():ot.g(),this.C=this.u?it(this.u):it(ot),this.g.onreadystatechange=g(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(e){return void Sn(this,e)}e=n||"";const i=new At(this.headers);r&&kt(r,(function(e,t){i.set(t,e)})),r=function(e){e:{var t=In;const n=e.length,r="string"==typeof e?e.split(""):e;for(let i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"==typeof e?e.charAt(t):e[t]}(i.T()),n=a.FormData&&e instanceof a.FormData,!(0<=_(Tn,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(e,t){this.g.setRequestHeader(t,e)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Cn(this),0<this.B&&((this.K=function(e){return $&&X()&&"number"==typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=g(this.pa,this)):this.A=je(this.pa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(e){Sn(this,e)}},r.pa=function(){void 0!==o&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Te(this,"timeout"),this.abort(8))},r.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Te(this,"complete"),Te(this,"abort"),An(this))},r.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),An(this,!0)),_n.Z.M.call(this)},r.Fa=function(){this.s||(this.F||this.v||this.l?kn(this):this.cb())},r.cb=function(){kn(this)},r.ba=function(){try{return 2<Rn(this)?this.g.status:-1}catch(e){return-1}},r.ga=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},r.Qa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),bn(t)}},r.Da=function(){return this.m},r.La=function(){return"string"==typeof this.j?this.j:String(this.j)},(r=Mn.prototype).ma=8,r.G=1,r.hb=function(e){try{this.h.info("Origin Trials invoked: "+e)}catch(e){}},r.Ha=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;const i=new ht(this,this.h,e,void 0);let s=this.s;if(this.P&&(s?(s=D(s),M(s,this.P)):s=this.P),null===this.o&&(i.H=s),this.ja)e:{for(var t=0,n=0;n<this.l.length;n++){var r=this.l[n];if(void 0===(r="__data__"in r.g&&"string"==typeof(r=r.g.__data__)?r.length:void 0))break;if(4096<(t+=r)){t=n;break e}if(4096===t||n===this.l.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=Bn(this,i,t),Ft(n=xt(this.F),"RID",e),Ft(n,"CVER",22),this.D&&Ft(n,"X-HTTP-Session-Id",this.D),Vn(this,n),this.o&&s&&Dn(n,this.o,s),on(this.i,i),this.Ra&&Ft(n,"TYPE","init"),this.ja?(Ft(n,"$req",t),Ft(n,"SID","null"),i.$=!0,mt(i,n,null)):mt(i,n,t),this.G=2}}else 3==this.G&&(e?Un(this,e):0==this.l.length||nn(this.i)||Un(this))},r.Ga=function(){if(this.u=null,Wn(this),this.$&&!(this.L||null==this.g||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=et(g(this.bb,this),e)}},r.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,Ze(10),Pn(this),Wn(this))},r.ab=function(){null!=this.v&&(this.v=null,Pn(this),Hn(this),Ze(19))},r.jb=function(e){e?(this.h.info("Successfully pinged google.com"),Ze(2)):(this.h.info("Failed to ping google.com"),Ze(1))},(r=er.prototype).xa=function(){}
2,r.wa=function(){},r.va=function(){},r.ua=function(){},r.Oa=function(){},tr.prototype.g=function(e,t){return new nr(e,t)},v(nr,Ee),nr.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;e.Wa&&(e.h.info("Origin Trials enabled."),Ne(g(e.hb,e,t))),Ze(0),e.W=t,e.aa=n||{},e.N=e.X,e.F=Zn(e,null,e.W),$n(e)},nr.prototype.close=function(){Ln(this.g)},nr.prototype.u=function(e){if("string"==typeof e){var t={};t.__data__=e,Fn(this.g,t)}else this.v?((t={}).__data__=Se(e),Fn(this.g,t)):Fn(this.g,e)},nr.prototype.M=function(){this.g.j=null,delete this.j,Ln(this.g),delete this.g,nr.Z.M.call(this)},v(rr,ut),v(ir,ct),v(sr,er),sr.prototype.xa=function(){Te(this.g,"a")},sr.prototype.wa=function(e){Te(this.g,new rr(e))},sr.prototype.va=function(e){Te(this.g,new ir(e))},sr.prototype.ua=function(){Te(this.g,"b")},tr.prototype.createWebChannel=tr.prototype.g,nr.prototype.send=nr.prototype.u,nr.prototype.open=nr.prototype.m,nr.prototype.close=nr.prototype.close,tt.NO_ERROR=0,tt.TIMEOUT=8,tt.HTTP_ERROR=6,nt.COMPLETE="complete",st.EventType=at,at.OPEN="a",at.CLOSE="b",at.ERROR="c",at.MESSAGE="d",Ee.prototype.listen=Ee.prototype.N,_n.prototype.listenOnce=_n.prototype.O,_n.prototype.getLastError=_n.prototype.La,_n.prototype.getLastErrorCode=_n.prototype.Da,_n.prototype.getStatus=_n.prototype.ba,_n.prototype.getResponseJson=_n.prototype.Qa,_n.prototype.getResponseText=_n.prototype.ga,_n.prototype.send=_n.prototype.ea;var or=s.createWebChannelTransport=function(){return new tr},ar=s.getStatEventTarget=function(){return Ge()},ur=s.ErrorCode=tt,cr=s.EventType=nt,lr=s.Event=We,hr=s.Stat={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},dr=s.FetchXmlHttpFactory=fn,fr=s.WebChannel=st,pr=s.XhrIo=_n}).call(this,n(49))},332:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e){return e+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(e){return e<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return n.default.locale(r,null,!0),r}(n(61))},392:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));n(12),n(8),n(16),n(17),n(37),n(15),n(20),n(34),n(25),n(26);var r=n(30),i=n(2),s=n(5),o=(n(14),n(108),n(56),n(10),n(53),n(168),n(22),n(91)),a=n(23);function u(e,t){return c.apply(this,arguments)}function c(){return(c=Object(i.a)(regeneratorRuntime.mark((function e(t,n){var r,i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d(t),i="image:meta:"+n,!r.has(i)){e.next=4;break}return e.abrupt("return",r.get(i));case 4:return e.next=6,l(n).catch((function(e){return console.error("Failed to get image meta for "+n,e+""),{width:0,height:0,ratio:0}}));case 6:return s=e.sent,r.set(i,s),e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return h.apply(this,arguments)}function h(){return(h=Object(i.a)(regeneratorRuntime.mark((function e(t){var n,r,i,s,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=13;break;case 3:return n=e.sent,e.next=6,fetch(t).then((function(e){return e.buffer()}));case 6:if(r=e.sent,i=n(r)){e.next=10;break}throw new Error("No metadata could be extracted from the image `".concat(t,"`."));case 10:return s=i.width,o=i.height,a={width:s,height:o,ratio:s&&o?s/o:void 0},e.abrupt("return",a);case 13:if("undefined"!=typeof Image){e.next=15;break}throw new TypeError("Image not supported");case 15:return e.abrupt("return",new Promise((function(e,n){var r=new Image;r.onload=function(){var t={width:r.width,height:r.height,ratio:r.width/r.height};e(t)},r.onerror=function(e){return n(e)},r.src=t})));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){if(!e.nuxtContext.cache)if(e.nuxtContext.ssrContext&&e.nuxtContext.ssrContext.cache)e.nuxtContext.cache=e.nuxtContext.ssrContext.cache;else{var t={};e.nuxtContext.cache={get:function(e){return t[e]}
2,set:function(e,n){t[e]=n},has:function(e){return void 0!==t[e]}}}return e.nuxtContext.cache}var f=n(46);function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){var n={options:e,nuxtContext:t},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=_(n,e,t);return r.isStatic&&s(r,e),r},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r(e,v(v({},n),{},{modifiers:Object(o.a)(t,n.modifiers||{})})).url};function s(e,t){e.url=t}var a=function(t){i[t]=function(n,r,s){return i(n,r,v(v({},e.presets[t]),s))}};for(var u in e.presets)a(u);return i.options=e,i.getImage=r,i.getMeta=function(e,t){return function(e,t,n){return b.apply(this,arguments)}(n,e,t)},i.getSizes=function(e,t){return function(e,t,n){var r,i,s=Object(f.c)(null===(r=n.modifiers)||void 0===r?void 0:r.width),o=Object(f.c)(null===(i=n.modifiers)||void 0===i?void 0:i.height),a=s&&o?o/s:0,u=[],c={};if("string"==typeof n.sizes){var l,h=p(n.sizes.split(/[\s,]+/).filter((function(e){return e})));try{for(h.s();!(l=h.n()).done;){var d=l.value.split(":");2===d.length&&(c[d[0].trim()]=d[1].trim())}}catch(e){h.e(e)}finally{h.f()}}else Object.assign(c,n.sizes);for(var g in c){var m=e.options.screens&&e.options.screens[g]||parseInt(g),y=String(c[g]),b=y.endsWith("vw");if(!b&&/^\d+$/.test(y)&&(y+="px"),b||y.endsWith("px")){var _=parseInt(y);if(m&&_){b&&(_=Math.round(_/100*m));var w=a?Math.round(_*a):o;u.push({width:_,size:y,screenMaxWidth:m,media:"(max-width: ".concat(m,"px)"),src:e.$img(t,v(v({},n.modifiers),{},{width:_,height:w}),n)})}}}u.sort((function(e,t){return e.screenMaxWidth-t.screenMaxWidth}));var E=u[u.length-1];E&&(E.media="");return{sizes:u.map((function(e){return"".concat(e.media?e.media+" ":"").concat(e.size)})).join(", "),srcset:u.map((function(e){return"".concat(e.src," ").concat(e.width,"w")})).join(", "),src:null==E?void 0:E.src}}(n,e,t)},n.$img=i,i}function b(){return(b=Object(i.a)(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(i=_(t,n,v({},r))).getMeta){e.next=7;break}return e.next=4,i.getMeta();case 4:case 9:return e.abrupt("return",e.sent);case 7:return e.next=9,u(t,i.url);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,t,n){var i,s;if("string"!=typeof t||""===t)throw new TypeError("input must be a string (received ".concat(Object(r.a)(t),": ").concat(JSON.stringify(t),")"));if(t.startsWith("data:"))return{url:t};var u=function(e,t){var n=e.options.providers[t];if(!n)throw new Error("Unknown provider: "+t);return n}(e,n.provider||e.options.provider),c=u.provider,l=u.defaults,h=function(e,t){if(!t)return{};if(!e.options.presets[t])throw new Error("Unknown preset: "+t);return e.options.presets[t]}(e,n.preset);if(t=Object(a.c)(t)?t:Object(a.h)(t),!c.supportsAlias)for(var d in e.options.alias)t.startsWith(d)&&(t=Object(a.e)(e.options.alias[d],t.substr(d.length)));if(c.validateDomains&&Object(a.c)(t)){var p=Object(a.g)(t).host;if(!e.options.domains.find((function(e){return e===p})))return{url:t}}var g=Object(o.a)(n,h,l);g.modifiers=v({},g.modifiers);var m=g.modifiers.format;null!==(i=g.modifiers)&&void 0!==i&&i.width&&(g.modifiers.width=Object(f.c)(g.modifiers.width)),null!==(s=g.modifiers)&&void 0!==s&&s.height&&(g.modifiers.height=Object(f.c)(g.modifiers.height));var y=c.getImage(t,g,e);return y.format=y.format||m||"",y}},40:function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(u," */")),s=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(s).concat([i]).join("\n")}var o,a,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(i[o]=!0)}for(var a=0;a<e.length;a++){var u=[].concat(e[a]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},41:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var s=t[i],o=s[0],a={id:e+":"+i,css:s[1],media:s[2],sourceMap:s[3]};r[o]?r[o].parts.push(a):n.push(r[o]={id:o,parts:[a]})}return n}n.r(t),n.d(t,"default",(function(){return p}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s={},o=i&&(document.head||document.getElementsByTagName("head")[0]),a=null,u=0,c=!1,l=function(){},h=null,d="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,i){c=n,h=i||{};var o=r(e,t);return g(o),function(t){for(var n=[],i=0;i<o.length;i++){var a=o[i];(u=s[a.id]).refs--,n.push(u)}t?g(o=r(e,t)):o=[];for(i=0;i<n.length;i++){var u;if(0===(u=n[i]).refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete s[u.id]}}}}function g(e){for(var t=0;t<e.length;t++){var n=e[t],r=s[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;
2i++)r.parts.push(v(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(i=0;i<n.parts.length;i++)o.push(v(n.parts[i]));s[n.id]={id:n.id,refs:1,parts:o}}}}function m(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function v(e){var t,n,r=document.querySelector("style["+d+'~="'+e.id+'"]');if(r){if(c)return l;r.parentNode.removeChild(r)}if(f){var i=u++;r=a||(a=m()),t=_.bind(null,r,i,!1),n=_.bind(null,r,i,!0)}else r=m(),t=w.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var y,b=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var s=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function w(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),h.ssrId&&e.setAttribute(d,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},43:function(e,t,n){"use strict";n.d(t,"a",(function(){return le})),n.d(t,"b",(function(){return oe})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return U}));var r=n(3),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},i.apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{u(r.next(e))}catch(e){s(e)}}function a(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}u((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function a(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,i++)r[i]=s[o];return r}function u(e){return e!=e}function c(e){return null==e}var l=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)};function h(e){return""!==e&&!c(e)}function d(e){return"function"==typeof e}function f(e){return d(e)&&!!e.__locatorRef}function p(e,t){var n=Array.isArray(e)?e:m(e);if(d(n.findIndex))return n.findIndex(t);for(var r=0;r<n.length;r++)if(t(n[r],r))return r;return-1}function g(e,t){return-1!==e.indexOf(t)}function m(e){return d(Array.from)?Array.from(e):function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}(e)}function v(e){return d(Object.values)?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function y(e,t){return Object.keys(t).forEach((function(n){if(l(t[n]))return e[n]||(e[n]={}),void y(e[n],t[n]);e[n]=t[n]})),e}function b(e,t,n){return void 0===t&&(t=0),void 0===n&&(n={cancelled:!1}),0===t?e:function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var o=function(){r=void 0,n.cancelled||e.apply(void 0,i)};clearTimeout(r),r=setTimeout(o,t)};var r}function _(e,t){return e.replace(/{([^}]+)}/g,(function(e,n){return n in t?t[n]:"{"+n+"}"}))}var w={};var E=function(){function e(){}return e.extend=function(e,t){var n=function(e){var t;return(null===(t=e.params)||void 0===t?void 0:t.length)&&(e.params=e.params.map((function(e){return"string"==typeof e?{name:e}:e}))),e}(t);w[e]?w[e]=y(w[e],t):w[e]=i({lazy:!1,computesRequired:!1},n)},e.isLazy=function(e){var t;return!!(null===(t=w[e])||void 0===t?void 0:t.lazy)},e.isRequireRule=function(e){var t;return!!(null===(t=w[e])||void 0===t?void 0:t.computesRequired)},e.getRuleDefinition=function(e){return w[e]},e}();function T(e,t){!function(e,t){if(d(t))return;if(d(t.validate))return;if(E.getRuleDefinition(e))return;throw new Error("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")}(e,t),"object"!=typeof t?E.extend(e,{validate:t}):E.extend(e,t)}var I=i({},{defaultMessage:"{_field_}
2 is not valid.",skipOptional:!0,classes:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},bails:!0,mode:"aggressive",useConstraintAttrs:!0}),S=function(){return I},O=function(e){I=i(i({},I),e)};function k(e){var t,n={};return Object.defineProperty(n,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),e?l(e)&&e._$$isNormalized?e:l(e)?Object.keys(e).reduce((function(t,n){var r=[];return r=!0===e[n]?[]:Array.isArray(e[n])||l(e[n])?e[n]:[e[n]],!1!==e[n]&&(t[n]=A(n,r)),t}),n):"string"!=typeof e?(t="rules must be either a string or an object.",console.warn("[vee-validate] "+t),n):e.split("|").reduce((function(e,t){var n=C(t);return n.name?(e[n.name]=A(n.name,n.params),e):e}),n):n}function A(e,t){var n=E.getRuleDefinition(e);if(!n)return t;var r,i,s={};if(!n.params&&!Array.isArray(t))throw new Error("You provided an object params to a rule that has no defined schema.");if(Array.isArray(t)&&!n.params)return t;!n.params||n.params.length<t.length&&Array.isArray(t)?r=t.map((function(e,t){var r,s=null===(r=n.params)||void 0===r?void 0:r[t];return i=s||i,s||(s=i),s})):r=n.params;for(var o=0;o<r.length;o++){var a=r[o],u=a.default;Array.isArray(t)?o in t&&(u=t[o]):a.name in t?u=t[a.name]:1===r.length&&(u=t),a.isTarget&&(u=R(u,a.cast)),"string"==typeof u&&"@"===u[0]&&(u=R(u.slice(1),a.cast)),!f(u)&&a.cast&&(u=a.cast(u)),s[a.name]?(s[a.name]=Array.isArray(s[a.name])?s[a.name]:[s[a.name]],s[a.name].push(u)):s[a.name]=u}return s}var C=function(e){var t=[],n=e.split(":")[0];return g(e,":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:n,params:t}};function R(e,t){var n=function(n){var r=n[e];return t?t(r):r};return n.__locatorRef=e,n}function N(e,t,n){return void 0===n&&(n={}),s(this,void 0,void 0,(function(){var r,i,s,a,u,c;return o(this,(function(o){switch(o.label){case 0:return r=null==n?void 0:n.bails,i=null==n?void 0:n.skipIfEmpty,[4,D({name:(null==n?void 0:n.name)||"{field}",rules:k(t),bails:null==r||r,skipIfEmpty:null==i||i,forceRequired:!1,crossTable:(null==n?void 0:n.values)||{},names:(null==n?void 0:n.names)||{},customMessages:(null==n?void 0:n.customMessages)||{}},e,n)];case 1:return s=o.sent(),a=[],u={},c={},s.errors.forEach((function(e){var t=e.msg();a.push(t),u[e.rule]=t,c[e.rule]=e.msg})),[2,{valid:s.valid,required:s.required,errors:a,failedRules:u,regenerateMap:c}]}}))}))}function D(e,t,n){var r=(void 0===n?{}:n).isInitial,i=void 0!==r&&r;return s(this,void 0,void 0,(function(){var n,r,s,a,u,c,l,h,d;return o(this,(function(o){switch(o.label){case 0:return[4,x(e,t)];case 1:if(n=o.sent(),r=n.shouldSkip,s=n.required,a=n.errors,r)return[2,{valid:!a.length,required:s,errors:a}];u=Object.keys(e.rules).filter((function(e){return!E.isRequireRule(e)})),c=u.length,l=0,o.label=2;case 2:return l<c?i&&E.isLazy(u[l])?[3,4]:(h=u[l],[4,M(e,t,{name:h,params:e.rules[h]})]):[3,5];case 3:if(!(d=o.sent()).valid&&d.error&&(a.push(d.error),e.bails))return[2,{valid:!1,required:s,errors:a}];o.label=4;case 4:return l++,[3,2];case 5:return[2,{valid:!a.length,required:s,errors:a}]}}))}))}function x(e,t){return s(this,void 0,void 0,(function(){var n,r,i,s,a,u,h,d,f;return o(this,(function(o){switch(o.label){case 0:n=Object.keys(e.rules).filter(E.isRequireRule),r=n.length,i=[],s=c(t)||""===t||(p=t,Array.isArray(p)&&0===p.length),a=s&&e.skipIfEmpty,h=0,o.label=1;case 1:return h<r?(d=n[h],[4,M(e,t,{name:d,params:e.rules[d]})]):[3,4];case 2:if(f=o.sent(),!l(f))throw new Error("Require rules has to return an object (see docs)");if(void 0!==f.required&&(u=f.required),!f.valid&&f.error&&(i.push(f.error),e.bails))return[2,{shouldSkip:!0,required:f.required,errors:i}];o.label=3;case 3:return h++,[3,1];case 4:return(!s||u||e.skipIfEmpty)&&(e.bails||a)?[2,{shouldSkip:!u&&s,required:u,errors:i}]:[2,{shouldSkip:!1,required:u,errors:i}]}var p}))}))}function M(e,t,n){return s(this,void 0,void 0,(function(){var r,s,a,u,c;return o(this,(function(o){switch(o.label){case 0:if(!(r=E.getRuleDefinition(n.name))||!r.validate)throw new Error("No such validator '"+n.name+"' exists.");return s=r.castValue?r.castValue(t):t,a=function(e,t){if(Array.isArray(e))return e.map((function(e){var n="string"==typeof e&&"@"===e[0]?e.slice(1):e;return n in t?t[n]:e}));var n={},r=function(e){return f(e)?e(t):e};return Object.keys(e).forEach((function(t){n[t]=r(e[t])})),n}(n.params,e.crossTable),[4,r.validate(s,a)];case 1:return"string"==typeof(u=o.sent())?(c=i(i({},a||{}),{_field_:e.name,_value_:t,_rule_:n.name}),[2,{valid:!1,error:{rule:n.name,msg:function(){return _(u,c)}}}]):(l(u)||(u={valid:u}),[2,{valid:u.valid,required:u.required,error:u.valid?void 0:L(e,t,r,n.name,a)}])}}))}))}
2function L(e,t,n,r,s){var o,a=null!==(o=e.customMessages[r])&&void 0!==o?o:n.message,u=function(e,t,n){var r=t.params;if(!r)return{};var i=r.filter((function(e){return e.isTarget})).length;if(i<=0)return{};var s={},o=e.rules[n];!Array.isArray(o)&&l(o)&&(o=r.map((function(e){return o[e.name]})));for(var a=0;a<r.length;a++){var u=r[a],c=o[a];if(f(c)){c=c.__locatorRef;var h=e.names[c]||c;s[u.name]=h,s["_"+u.name+"_"]=e.crossTable[c]}}return s}(e,n,r),c=function(e,t,n,r){var i={},s=e.rules[n],o=t.params||[];if(!s)return{};return Object.keys(s).forEach((function(t,n){var r=s[t];if(!f(r))return{};var a=o[n];if(!a)return{};var u=r.__locatorRef;i[a.name]=e.names[u]||u,i["_"+a.name+"_"]=e.crossTable[u]})),{userTargets:i,userMessage:r}}(e,n,r,a),h=c.userTargets,d=c.userMessage,p=i(i(i(i({},s||{}),{_field_:e.name,_value_:t,_rule_:r}),u),h);return{msg:function(){return function(e,t,n){if("function"==typeof e)return e(t,n);return _(e,i(i({},n),{_field_:t}))}(d||S().defaultMessage,e.name,p)},rule:r}}var P={aggressive:function(){return{on:["input","blur"]}},eager:function(e){return e.errors.length?{on:["input","change"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change","blur"]}}},j=new r.default;var F,$=function(){function e(e,t){this.container={},this.locale=e,this.merge(t)}return e.prototype.resolve=function(e,t,n){return this.format(this.locale,e,t,n)},e.prototype.format=function(e,t,n,r){var s,o,a,u,c,l,h,f,p,g=null===(a=null===(o=null===(s=this.container[e])||void 0===s?void 0:s.fields)||void 0===o?void 0:o[t])||void 0===a?void 0:a[n],m=null===(c=null===(u=this.container[e])||void 0===u?void 0:u.messages)||void 0===c?void 0:c[n];return(p=g||m||"")||(p="{_field_} is not valid"),t=null!==(f=null===(h=null===(l=this.container[e])||void 0===l?void 0:l.names)||void 0===h?void 0:h[t])&&void 0!==f?f:t,d(p)?p(t,r):_(p,i(i({},r),{_field_:t}))},e.prototype.merge=function(e){y(this.container,e)},e.prototype.hasRule=function(e){var t,n;return!!(null===(n=null===(t=this.container[this.locale])||void 0===t?void 0:t.messages)||void 0===n?void 0:n[e])},e}();function U(e,t){var n;if(F||(F=new $("en",{}),O({defaultMessage:function(e,t){return F.resolve(e,null==t?void 0:t._rule_,t||{})}})),"string"==typeof e)return F.locale=e,t&&F.merge(((n={})[e]=t,n)),void j.$emit("change:locale");F.merge(e)}var V=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;0!=i--;){var o=s[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n};function B(e){var t,n,r;if(!(r=e)||!("undefined"!=typeof Event&&d(Event)&&r instanceof Event||r&&r.srcElement))return e;var i=e.target;if("file"===i.type&&i.files)return m(i.files);if(null===(t=i._vModifiers)||void 0===t?void 0:t.number){var s=parseFloat(i.value);return u(s)?i.value:s}return(null===(n=i._vModifiers)||void 0===n?void 0:n.trim)&&"string"==typeof i.value?i.value.trim():i.value}var q=function(e){var t,n=(null===(t=e.data)||void 0===t?void 0:t.attrs)||e.elm;return!("input"!==e.tag||n&&n.type)||("textarea"===e.tag||g(["text","password","search","email","tel","url","number"],null==n?void 0:n.type))};function H(e){if(e.data){var t,n,r,i,s=e.data;if("model"in s)return s.model;if(e.data.directives)return t=e.data.directives,n=function(e){return"model"===e.name},r=Array.isArray(t)?t:m(t),-1===(i=p(r,n))?void 0:r[i]}}function z(e){var t,n,r=H(e);if(r)return{value:r.value};var i=K(e),s=(null==i?void 0:i.prop)||"value";return(null===(t=e.componentOptions)||void 0===t?void 0:t.propsData)&&s in e.componentOptions.propsData?{value:e.componentOptions.propsData[s]}:(null===(n=e.data)||void 0===n?void 0:n.domProps)&&"value"in e.data.domProps?{value:e.data.domProps.value}:void 0}function W(e){if(!Array.isArray(e)&&void 0!==z(e))return[e];var t=function(e){return Array.isArray(e)?e:Array.isArray(e.children)?e.children:e.componentOptions&&Array.isArray(e.componentOptions.children)?e.componentOptions.children:[]}(e);return t.reduce((function(e,t){var n=W(t);return n.length&&e.push.apply(e,n),e}),[])}function K(e){return e.componentOptions?e.componentOptions.Ctor.options.model:null}function G(e,t,n){if(c(e[t]))e[t]=[n];else{if(d(e[t])&&e[t].fns){var r=e[t];return r.fns=Array.isArray(r.fns)?r.fns:[r.fns],void(g(r.fns,n)||r.fns.push(n))}if(d(e[t])){var i=e[t];e[t]=[i]}Array.isArray(e[t])&&!g(e[t],n)&&e[t].push(n)}}function Y(e,t,n){e.componentOptions?function(e,t,n){e.componentOptions&&(e.componentOptions.listeners||(e.componentOptions.listeners={}),G(e.componentOptions.listeners,t,n))}
2(e,t,n):function(e,t,n){e.data||(e.data={}),c(e.data.on)&&(e.data.on={}),G(e.data.on,t,n)}(e,t,n)}function X(e,t){var n;return e.componentOptions?(K(e)||{event:"input"}).event:(null===(n=null==t?void 0:t.modifiers)||void 0===n?void 0:n.lazy)?"change":q(e)?"input":"change"}function Q(e){var t,n=null===(t=e.data)||void 0===t?void 0:t.attrs;if(!g(["input","select","textarea"],e.tag)||!n)return{};var r={};return"required"in n&&!1!==n.required&&E.getRuleDefinition("required")&&(r.required="checkbox"!==n.type||[!0]),q(e)?k(i(i({},r),function(e){var t,n=null===(t=e.data)||void 0===t?void 0:t.attrs,r={};return n?("email"===n.type&&E.getRuleDefinition("email")&&(r.email=["multiple"in n]),n.pattern&&E.getRuleDefinition("regex")&&(r.regex=n.pattern),n.maxlength>=0&&E.getRuleDefinition("max")&&(r.max=n.maxlength),n.minlength>=0&&E.getRuleDefinition("min")&&(r.min=n.minlength),"number"===n.type&&(h(n.min)&&E.getRuleDefinition("min_value")&&(r.min_value=Number(n.min)),h(n.max)&&E.getRuleDefinition("max_value")&&(r.max_value=Number(n.max))),r):r}(e))):k(r)}function Z(e,t){return e.$scopedSlots.default?e.$scopedSlots.default(t)||[]:e.$slots.default||[]}function J(e,t){return!(e._ignoreImmediate||!e.immediate)||(n=e.value,r=t,!(u(n)&&u(r)||n===r||!e.normalizedEvents.length)||(!!e._needsValidation||!e.initialized&&void 0===t));var n,r}function ee(e){return i(i({},e.flags),{errors:e.errors,classes:e.classes,failedRules:e.failedRules,reset:function(){return e.reset()},validate:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.validate.apply(e,t)},ariaInput:{"aria-invalid":e.flags.invalid?"true":"false","aria-required":e.isRequired?"true":"false","aria-errormessage":"vee_"+e.id},ariaMsg:{id:"vee_"+e.id,"aria-live":e.errors.length?"assertive":"off"}})}function te(e,t){e.initialized||(e.initialValue=t);var n=J(e,t);if(e._needsValidation=!1,e.value=t,e._ignoreImmediate=!0,n){var r=function(){if(e.immediate||e.flags.validated)return re(e);e.validateSilent()};e.initialized?r():e.$once("hook:mounted",(function(){return r()}))}}function ne(e){return(d(e.mode)?e.mode:P[e.mode])(e)}function re(e){var t=e.validateSilent();return e._pendingValidation=t,t.then((function(n){return t===e._pendingValidation&&(e.applyResult(n),e._pendingValidation=void 0),n}))}function ie(e){e.$veeOnInput||(e.$veeOnInput=function(t){e.syncValue(t),e.setFlags({dirty:!0,pristine:!1})});var t=e.$veeOnInput;e.$veeOnBlur||(e.$veeOnBlur=function(){e.setFlags({touched:!0,untouched:!1})});var n=e.$veeOnBlur,r=e.$veeHandler,i=ne(e);return r&&e.$veeDebounce===e.debounce||(r=b((function(){e.$nextTick((function(){e._pendingReset||re(e),e._pendingReset=!1}))}),i.debounce||e.debounce),e.$veeHandler=r,e.$veeDebounce=e.debounce),{onInput:t,onBlur:n,onValidate:r}}var se=0;var oe=r.default.extend({name:"ValidationProvider",inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver={refs:{},observe:function(e){this.refs[e.id]=e},unobserve:function(e){delete this.refs[e]}}),this.$vnode.context.$_veeObserver}}},props:{vid:{type:String,default:""},name:{type:String,default:null},mode:{type:[String,Function],default:function(){return S().mode}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return S().bails}},skipIfEmpty:{type:Boolean,default:function(){return S().skipOptional}},debounce:{type:Number,default:0},tag:{type:String,default:"span"},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},customMessages:{type:Object,default:function(){return{}}},detectInput:{type:Boolean,default:!0}},watch:{rules:{deep:!0,handler:function(e,t){this._needsValidation=!V(e,t)}}},data:function(){return{errors:[],value:void 0,initialized:!1,initialValue:void 0,flags:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:!1,invalid:!1,validated:!1,pending:!1,required:!1,changed:!1,passed:!1,failed:!1},failedRules:{},isActive:!0,fieldName:"",id:""}},computed:{fieldDeps:function(){var e=this;return Object.keys(this.normalizedRules).reduce((function(t,n){var r,i=(r=e.normalizedRules[n],Array.isArray(r)?r.filter((function(e){return f(e)||"string"==typeof e&&"@"===e[0]})):Object.keys(r).filter((function(e){return f(r[e])})).map((function(e){return r[e]}))).map((function(e){return f(e)?e.__locatorRef:e.slice(1)}));
2return t.push.apply(t,i),i.forEach((function(t){ae(e,t)})),t}),[])},normalizedEvents:function(){var e=this;return(ne(this).on||[]).map((function(t){return"input"===t?e._inputEventName:t}))},isRequired:function(){var e=i(i({},this._resolvedRules),this.normalizedRules),t=Object.keys(e).some(E.isRequireRule);return this.flags.required=!!t,t},classes:function(){return function(e,t){for(var n={},r=Object.keys(t),i=r.length,s=function(i){var s=r[i],o=e&&e[s]||s,a=t[s];return c(a)?"continue":"valid"!==s&&"invalid"!==s||t.validated?void("string"==typeof o?n[o]=a:Array.isArray(o)&&o.forEach((function(e){n[e]=a}))):"continue"},o=0;o<i;o++)s(o);return n}(S().classes,this.flags)},normalizedRules:function(){return k(this.rules)}},mounted:function(){var e=this,t=function(){if(e.flags.validated){var t=e._regenerateMap;if(t){var n=[],r={};return Object.keys(t).forEach((function(e){var i=t[e]();n.push(i),r[e]=i})),void e.applyResult({errors:n,failedRules:r,regenerateMap:t})}e.validate()}};j.$on("change:locale",t),this.$on("hook:beforeDestroy",(function(){j.$off("change:locale",t)}))},render:function(e){var t=this;this.registerField();var n=Z(this,ee(this));if(this.detectInput){var r=W(n);r.length&&r.forEach((function(e,n){var r,i,s,o,a,u;if(g(["checkbox","radio"],null===(i=null===(r=e.data)||void 0===r?void 0:r.attrs)||void 0===i?void 0:i.type)||!(n>0)){var c=S().useConstraintAttrs?Q(e):{};V(t._resolvedRules,c)||(t._needsValidation=!0),g(["input","select","textarea"],e.tag)&&(t.fieldName=(null===(o=null===(s=e.data)||void 0===s?void 0:s.attrs)||void 0===o?void 0:o.name)||(null===(u=null===(a=e.data)||void 0===a?void 0:a.attrs)||void 0===u?void 0:u.id)),t._resolvedRules=c,function(e,t){var n=z(t);e._inputEventName=e._inputEventName||X(t,H(t)),te(e,null==n?void 0:n.value);var r=ie(e),i=r.onInput,s=r.onBlur,o=r.onValidate;Y(t,e._inputEventName,i),Y(t,"blur",s),e.normalizedEvents.forEach((function(e){Y(t,e,o)})),e.initialized=!0}(t,e)}}))}return this.slim&&n.length<=1?n[0]:e(this.tag,n)},beforeDestroy:function(){this.$_veeObserver.unobserve(this.id)},activated:function(){this.isActive=!0},deactivated:function(){this.isActive=!1},methods:{setFlags:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags[n]=e[n]}))},syncValue:function(e){var t=B(e);this.value=t,this.flags.changed=!V(this.initialValue,t)},reset:function(){var e=this;this.errors=[],this.initialValue=this.value;var t={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:!1,invalid:!1,validated:!1,pending:!1,required:!1,changed:!1,passed:!1,failed:!1};t.required=this.isRequired,this.setFlags(t),this.failedRules={},this.validateSilent(),this._pendingValidation=void 0,this._pendingReset=!0,setTimeout((function(){e._pendingReset=!1}),this.debounce)},validate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s(this,void 0,void 0,(function(){return o(this,(function(t){return e.length>0&&this.syncValue(e[0]),[2,re(this)]}))}))},validateSilent:function(){return s(this,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:return this.setFlags({pending:!0}),e=i(i({},this._resolvedRules),this.normalizedRules),Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),[4,N(this.value,e,i(i({name:this.name||this.fieldName},(r=this,s=r.$_veeObserver.refs,{names:{},values:{}},r.fieldDeps.reduce((function(e,t){return s[t]?(e.values[t]=s[t].value,e.names[t]=s[t].name,e):e}),{names:{},values:{}}))),{bails:this.bails,skipIfEmpty:this.skipIfEmpty,isInitial:!this.initialized,customMessages:this.customMessages}))];case 1:return t=n.sent(),this.setFlags({pending:!1,valid:t.valid,invalid:!t.valid}),void 0!==t.required&&this.setFlags({required:t.required}),[2,t]}var r,s}))}))},setErrors:function(e){this.applyResult({errors:e,failedRules:{}})},applyResult:function(e){var t=e.errors,n=e.failedRules,r=e.regenerateMap;this.errors=t,this._regenerateMap=r,this.failedRules=i({},n||{}),this.setFlags({valid:!t.length,passed:!t.length,invalid:!!t.length,failed:!!t.length,validated:!0,changed:!V(this.value,this.initialValue)})},registerField:function(){!function(e){var t=function(e){if(e.vid)return e.vid;if(e.name)return e.name;if(e.id)return e.id;if(e.fieldName)return e.fieldName;return"_vee_"+ ++se}(e),n=e.id;if(!e.isActive||n===t&&e.$_veeObserver.refs[n])return;n!==t&&e.$_veeObserver.refs[n]===e&&e.$_veeObserver.unobserve(n);e.id=t,e.$_veeObserver.observe(e)}(this)},checkComputesRequiredState:function(){var e=i(i({},this._resolvedRules),this.normalizedRules);return Object.keys(e).some(E.isRequireRule)}}});function ae(e,t,n){void 0===n&&(n=!0);var r=e.$_veeObserver.refs;
2if(e._veeWatchers||(e._veeWatchers={}),!r[t]&&n)return e.$once("hook:mounted",(function(){ae(e,t,!1)}));!d(e._veeWatchers[t])&&r[t]&&(e._veeWatchers[t]=r[t].$watch("value",(function(){var t=e.checkComputesRequiredState();e.flags.validated&&(e._needsValidation=!0,e.validate()),t&&!e.flags.validated&&e.validateSilent()})))}var ue=[["pristine","every"],["dirty","some"],["touched","some"],["untouched","every"],["valid","every"],["invalid","some"],["pending","some"],["validated","every"],["changed","some"],["passed","every"],["failed","some"]],ce=0;var le=r.default.extend({name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"},vid:{type:String,default:function(){return"obs_"+ce++}},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{id:"",refs:{},observers:[],errors:{},flags:fe(),fields:{}}},created:function(){var e=this;this.id=this.vid,de(this);var t=b((function(t){var n=t.errors,r=t.flags,i=t.fields;e.errors=n,e.flags=r,e.fields=i}),16);this.$watch(pe,t)},activated:function(){de(this)},deactivated:function(){he(this)},beforeDestroy:function(){he(this)},render:function(e){var t,n=Z(this,i(i({},(t=this).flags),{errors:t.errors,fields:t.fields,validate:t.validate,validateWithInfo:t.validateWithInfo,passes:t.handleSubmit,handleSubmit:t.handleSubmit,reset:t.reset}));return this.slim&&n.length<=1?n[0]:e(this.tag,{on:this.$listeners},n)},methods:{observe:function(e,t){var n;void 0===t&&(t="provider"),"observer"!==t?this.refs=i(i({},this.refs),((n={})[e.id]=e,n)):this.observers.push(e)},unobserve:function(e,t){if(void 0===t&&(t="provider"),"provider"!==t){var n=p(this.observers,(function(t){return t.id===e}));-1!==n&&this.observers.splice(n,1)}else{if(!this.refs[e])return;this.$delete(this.refs,e)}},validateWithInfo:function(e){var t=(void 0===e?{}:e).silent,n=void 0!==t&&t;return s(this,void 0,void 0,(function(){var e,t,r,i,s,u;return o(this,(function(o){switch(o.label){case 0:return[4,Promise.all(a(v(this.refs).filter((function(e){return!e.disabled})).map((function(e){return e[n?"validateSilent":"validate"]().then((function(e){return e.valid}))})),this.observers.filter((function(e){return!e.disabled})).map((function(e){return e.validate({silent:n})}))))];case 1:return e=o.sent(),t=e.every((function(e){return e})),r=pe.call(this),i=r.errors,s=r.flags,u=r.fields,this.errors=i,this.flags=s,this.fields=u,[2,{errors:i,flags:s,fields:u,isValid:t}]}}))}))},validate:function(e){var t=(void 0===e?{}:e).silent,n=void 0!==t&&t;return s(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.validateWithInfo({silent:n})];case 1:return[2,e.sent().isValid]}}))}))},handleSubmit:function(e){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.validate()];case 1:return t.sent()&&e?[2,e()]:[2]}}))}))},reset:function(){return a(v(this.refs),this.observers).forEach((function(e){return e.reset()}))},setErrors:function(e){var t=this;Object.keys(e).forEach((function(n){var r=t.refs[n];if(r){var i=e[n]||[];i="string"==typeof i?[i]:i,r.setErrors(i)}})),this.observers.forEach((function(t){t.setErrors(e)}))}}});function he(e){e.$_veeObserver&&e.$_veeObserver.unobserve(e.id,"observer")}function de(e){e.$_veeObserver&&e.$_veeObserver.observe(e,"observer")}function fe(){return i(i({},{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:!1,invalid:!1,validated:!1,pending:!1,required:!1,changed:!1,passed:!1,failed:!1}),{valid:!0,invalid:!1})}function pe(){for(var e=a(v(this.refs),this.observers.filter((function(e){return!e.disabled}))),t={},n=fe(),r={},s=e.length,o=0;o<s;o++){var u=e[o];Array.isArray(u.errors)?(t[u.id]=u.errors,r[u.id]=i({id:u.id,name:u.name,failedRules:u.failedRules},u.flags)):(t=i(i({},t),u.errors),r=i(i({},r),u.fields))}return ue.forEach((function(t){var r=t[0],i=t[1];n[r]=e[i]((function(e){return e.flags[r]}))})),{errors:t,flags:n,fields:r}}},46:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}
2)),n.d(t,"c",(function(){return a}));var r=n(11);n(53),n(47),n(12),n(22),n(10),n(104),n(70);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split(/[?#]/).shift().split("/").pop().split(".").pop();return t}function s(e){return function(t){return t?e[t]||t:e.missingValue}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.formatter,n=e.keyMap,i=e.joinWith,o=void 0===i?"/":i,a=e.valueMap;t||(t=function(e,t){return"".concat(e,"=").concat(t)}),n&&"function"!=typeof n&&(n=s(n));var u=a||{};return Object.keys(u).forEach((function(e){"function"!=typeof u[e]&&(u[e]=s(u[e]))})),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=Object.entries(e).filter((function(e){var t=Object(r.a)(e,2);t[0];return void 0!==t[1]})).map((function(i){var s=Object(r.a)(i,2),o=s[0],a=s[1],c=u[o];return"function"==typeof c&&(a=c(e[o])),o="function"==typeof n?n(o):o,t(o,a)}));return i.join(o)}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"number"==typeof e?e:"string"==typeof e&&e.replace("px","").match(/^\d+$/g)?parseInt(e,10):void 0}},54:function(e,t,n){"use strict";n.d(t,"a",(function(){return we})),n.d(t,"b",(function(){return _e})),n.d(t,"c",(function(){return be})),n.d(t,"d",(function(){return Te})),n.d(t,"e",(function(){return Ee})),n.d(t,"f",(function(){return ye}));var r=n(7),i=n(0),s=n(31);const o="firebasestorage.googleapis.com";class a extends i.c{constructor(e,t){super(u(e),`Firebase Storage: ${t} (${u(e)})`),this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,a.prototype)}_codeEquals(e){return u(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}}function u(e){return"storage/"+e}function c(){return new a("unknown","An unknown error occurred, please check the error payload for server response.")}function l(){return new a("canceled","User canceled the upload/download.")}function h(){return new a("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function d(e){return new a("invalid-argument",e)}function f(){return new a("app-deleted","The Firebase app was deleted.")}function p(e,t){return new a("invalid-format","String does not match format '"+e+"': "+t)}function g(e){throw new a("internal-error","Internal error: "+e)}class m{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=m.makeFromUrl(e,t)}catch(t){return new m(e,"")}if(""===n.path)return n;throw new a("invalid-default-bucket","Invalid default bucket '"+e+"'.")}static makeFromUrl(e,t){let n=null;const r="([A-Za-z0-9.\\-_]+)";const i=new RegExp("^gs://"+r+"(/(.*))?$","i");function s(e){e.path_=decodeURIComponent(e.path)}const u=t.replace(/[.]/g,"\\."),c=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp(`^https?://${u}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:s},{regex:new RegExp(`^https?://${t===o?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:s}];for(let t=0;t<c.length;t++){const r=c[t],i=r.regex.exec(e);if(i){const e=i[r.indices.bucket];let t=i[r.indices.path];t||(t=""),n=new m(e,t),r.postModify(n);break}}if(null==n)throw function(e){return new a("invalid-url","Invalid URL '"+e+"'.")}(e);return n}}class v{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function y(e){return"string"==typeof e||e instanceof String}function b(e){return _()&&e instanceof Blob}function _(){return"undefined"!=typeof Blob}function w(e,t,n,r){if(r<t)throw d(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw d(`Invalid value for '${e}'. Expected ${n} or less.`)}function E(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function T(e){const t=encodeURIComponent;let n="?";for(const r in e)if(e.hasOwnProperty(r)){n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1),n}var I;
2!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(I||(I={}));class S{constructor(e,t,n,r,i,s,o,a,u,c,l){this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=u,this.progressCallback_=c,this.connectionFactory_=l,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise(((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()}))}start_(){const e=(e,t)=>{if(t)return void e(!1,new O(!1,null,!0));const n=this.connectionFactory_();this.pendingConnection_=n;const r=e=>{const t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then((()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;const t=n.getErrorCode()===I.NO_ERROR,i=n.getStatus();if(!t||this.isRetryStatusCode_(i)){const t=n.getErrorCode()===I.ABORT;return void e(!1,new O(!1,null,t))}const s=-1!==this.successCodes_.indexOf(i);e(!0,new O(s,n))}))},t=(e,t)=>{const n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(i,i.getResponse());void 0!==e?n(e):n()}catch(e){r(e)}else if(null!==i){const e=c();e.serverResponse=i.getErrorText(),this.errorCallback_?r(this.errorCallback_(i,e)):r(e)}else if(t.canceled){r(this.appDelete_?f():l())}else{r(new a("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}};this.canceled_?t(0,new O(!1,null,!0)):this.backoffId_=function(e,t,n){let r=1,i=null,s=null,o=!1,a=0;function u(){return 2===a}let c=!1;function l(...e){c||(c=!0,t.apply(null,e))}function h(t){i=setTimeout((()=>{i=null,e(f,u())}),t)}function d(){s&&clearTimeout(s)}function f(e,...t){if(c)return void d();if(e)return d(),void l.call(null,e,...t);if(u()||o)return d(),void l.call(null,e,...t);let n;r<64&&(r*=2),1===a?(a=2,n=0):n=1e3*(r+Math.random()),h(n)}let p=!1;function g(e){p||(p=!0,d(),c||(null!==i?(e||(a=2),clearTimeout(i),h(0)):e||(a=1)))}return h(0),s=setTimeout((()=>{o=!0,g(!0)}),n),g}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}isRetryStatusCode_(e){const t=e>=500&&e<600,n=-1!==[408,429].indexOf(e),r=-1!==this.additionalRetryCodes_.indexOf(e);return t||n||r}}class O{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function k(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function A(...e){const t=k();if(void 0!==t){const n=new t;for(let t=0;t<e.length;t++)n.append(e[t]);return n.getBlob()}if(_())return new Blob(e);throw new a("unsupported-environment","This browser doesn't seem to support creating Blobs")}const C="raw",R="base64",N="base64url",D="data_url";class x{constructor(e,t){this.data=e,this.contentType=t||null}}function M(e,t){switch(e){case C:return new x(L(t));case R:case N:return new x(P(e,t));case D:return new x(function(e){const t=new j(e);return t.base64?P(R,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(e){throw p(D,"Malformed data URL.")}return L(t)}(t.rest)}(t),new j(t).contentType)}throw c()}function L(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296==(64512&r)){if(n<e.length-1&&56320==(64512&e.charCodeAt(n+1))){r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else 56320==(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function P(e,t){switch(e){case R:{const n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){throw p(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?")}break}case N:{const n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r){throw p(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=atob(t)}catch(t){throw p(e,"Invalid character found")}
2const r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}class j{constructor(e){this.base64=!1,this.contentType=null;const t=e.match(/^data:([^,]+)?,/);if(null===t)throw p(D,"Must be formatted 'data:[<mediatype>][;base64],<data>");const n=t[1]||null;null!=n&&(this.base64=function(e,t){if(!(e.length>=t.length))return!1;return e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1)}}class F{constructor(e,t){let n=0,r="";b(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(b(this.data_)){const n=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,e,t);return null===n?null:new F(n)}{const n=new Uint8Array(this.data_.buffer,e,t-e);return new F(n,!0)}}static getBlob(...e){if(_()){const t=e.map((e=>e instanceof F?e.data_:e));return new F(A.apply(null,t))}{const t=e.map((e=>y(e)?M(C,e).data:e.data_));let n=0;t.forEach((e=>{n+=e.byteLength}));const r=new Uint8Array(n);let i=0;return t.forEach((e=>{for(let t=0;t<e.length;t++)r[i++]=e[t]})),new F(r,!0)}}uploadData(){return this.data_}}function $(e){let t;try{t=JSON.parse(e)}catch(e){return null}return"object"!=typeof(n=t)||Array.isArray(n)?null:t;var n}function U(e){const t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function V(e,t){return t}class B{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||V}}let q=null;function H(){if(q)return q;const e=[];e.push(new B("bucket")),e.push(new B("generation")),e.push(new B("metageneration")),e.push(new B("name","fullPath",!0));const t=new B("name");t.xform=function(e,t){return function(e){return!y(e)||e.length<2?e:U(e)}(t)},e.push(t);const n=new B("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new B("timeCreated")),e.push(new B("updated")),e.push(new B("md5Hash",null,!0)),e.push(new B("cacheControl",null,!0)),e.push(new B("contentDisposition",null,!0)),e.push(new B("contentEncoding",null,!0)),e.push(new B("contentLanguage",null,!0)),e.push(new B("contentType",null,!0)),e.push(new B("metadata","customMetadata",!0)),q=e,q}function z(e,t,n){const r={type:"file"},i=n.length;for(let e=0;e<i;e++){const i=n[e];r[i.local]=i.xform(r,t[i.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){const n=e.bucket,r=e.fullPath,i=new m(n,r);return t._makeStorageReference(i)}})}(r,e),r}function W(e,t,n){const r=$(t);if(null===r)return null;return z(e,r,n)}function K(e,t){const n={},r=t.length;for(let i=0;i<r;i++){const r=t[i];r.writable&&(n[r.server]=e[r.local])}return JSON.stringify(n)}class G{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}function Y(e){if(!e)throw c()}function X(e,t){return function(n,r){const i=W(e,r,t);return Y(null!==i),i}}function Q(e,t){return function(n,r){const i=W(e,r,t);return Y(null!==i),function(e,t,n,r){const i=$(t);if(null===i)return null;if(!y(i.downloadTokens))return null;const s=i.downloadTokens;if(0===s.length)return null;const o=encodeURIComponent;return s.split(",").map((t=>{const i=e.bucket,s=e.fullPath;return E("/b/"+o(i)+"/o/"+o(s),n,r)+T({alt:"media",token:t})}))[0]}(i,r,e.host,e._protocol)}}function Z(e){return function(t,n){let r;var i,s;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invalid")?new a("unauthorized-app","This app does not have permission to access Firebase Storage on this project."):new a("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(s=e.bucket,r=new a("quota-exceeded","Quota for bucket '"+s+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new a("unauthorized","User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function J(e){const t=Z(e);return function(n,r){let i=t(n,r);var s;
2return 404===n.getStatus()&&(s=e.path,i=new a("object-not-found","Object '"+s+"' does not exist.")),i.serverResponse=r.serverResponse,i}}function ee(e,t,n){const r=E(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,s=new G(r,"GET",X(e,n),i);return s.errorHandler=J(t),s}function te(e,t,n){const r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}function ne(e,t,n,r,i){const s=t.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};const a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();o["Content-Type"]="multipart/related; boundary="+a;const u=te(t,r,i),c="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+K(u,n)+"\r\n--"+a+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+a+"--",d=F.getBlob(c,r,l);if(null===d)throw h();const f={name:u.fullPath},p=E(s,e.host,e._protocol),g=e.maxUploadRetryTime,m=new G(p,"POST",X(e,n),g);return m.urlParams=f,m.headers=o,m.body=d.uploadData(),m.errorHandler=Z(t),m}class re{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=I.NO_ERROR,this.sendPromise_=new Promise((e=>{this.xhr_.addEventListener("abort",(()=>{this.errorCode_=I.ABORT,e()})),this.xhr_.addEventListener("error",(()=>{this.errorCode_=I.NETWORK_ERROR,e()})),this.xhr_.addEventListener("load",(()=>{e()}))}))}send(e,t,n,r){if(this.sent_)throw g("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(const e in r)r.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,r[e].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw g("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw g("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}getResponse(){if(!this.sent_)throw g("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw g("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class ie extends re{initXhr(){this.xhr_.responseType="text"}}function se(){return new ie}class oe{constructor(e,t){this._service=e,this._location=t instanceof m?t:m.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new oe(e,t)}get root(){const e=new m(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return U(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new m(this._location.bucket,e);return new oe(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new a("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}function ae(e,t,n){e._throwIfRoot("uploadBytes");const r=ne(e.storage,e._location,H(),new F(t,!0),n);return e.storage.makeRequestWithTokens(r,se).then((t=>({metadata:t,ref:e})))}function ue(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,n){const r=E(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,s=new G(r,"GET",Q(e,n),i);return s.errorHandler=J(t),s}(e.storage,e._location,H());return e.storage.makeRequestWithTokens(t,se).then((e=>{if(null===e)throw new a("no-download-url","The given file does not have any download URLs.");return e}))}function ce(e){e._throwIfRoot("deleteObject");const t=function(e,t){const n=E(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,i=new G(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=J(t),i}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,se)}function le(e,t){const n=function(e,t){const n=t.split("/").filter((e=>e.length>0)).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new m(e._location.bucket,n);return new oe(e.storage,r)}function he(e,t){if(e instanceof pe){const n=e;if(null==n._bucket)throw new a("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");const r=new oe(n,n._bucket);return null!=t?he(r,t):r}return void 0!==t?le(e,t):e}function de(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof pe)return new oe(e,t);throw d("To use ref(service, url), the first argument must be a Storage instance.")}return he(e,t)}function fe(e,t){const n=null==t?void 0:t.storageBucket;return null==n?null:m.makeFromBucketSpec(n,e)}class pe{constructor(e,t,n,r,i){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=o,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?m.makeFromBucketSpec(r,this._host):fe(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=m.makeFromBucketSpec(this._url,e):this._bucket=fe(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){w("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){w("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});if(e){return(await e.getToken()).token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEac
2h((e=>e.cancel())),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new oe(this,e)}_makeRequest(e,t,n,r){if(this._deleted)return new v(f());{const i=function(e,t,n,r,i,s){const o=T(e.urlParams),a=e.url+o,u=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(u,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(u,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!=t?t:"AppManager")}(u,s),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(u,r),new S(a,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i)}(e,this._appId,n,r,t,this._firebaseVersion);return this._requests.add(i),i.getPromise().then((()=>this._requests.delete(i)),(()=>this._requests.delete(i))),i}}async makeRequestWithTokens(e,t){const[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}}const ge="@firebase/storage",me="0.9.7",ve="storage";function ye(e,t,n){return ae(e=Object(i.j)(e),t,n)}function be(e){return function(e){e._throwIfRoot("getMetadata");const t=ee(e.storage,e._location,H());return e.storage.makeRequestWithTokens(t,se)}(e=Object(i.j)(e))}function _e(e){return ue(e=Object(i.j)(e))}function we(e){return ce(e=Object(i.j)(e))}function Ee(e,t){return de(e=Object(i.j)(e),t)}function Te(e=Object(r.e)(),t){e=Object(i.j)(e);return Object(r.b)(e,ve).getImmediate({identifier:t})}function Ie(e,{instanceIdentifier:t}){const n=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),s=e.getProvider("app-check-internal");return new pe(n,i,s,t,r.a)}Object(r.c)(new s.a(ve,Ie,"PUBLIC").setMultipleInstances(!0)),Object(r.g)(ge,me,""),Object(r.g)(ge,me,"esm2017")},6:function(e,t,n){"use strict";var r=n(185);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),n.d(t,"e",(function(){return r.e})),n.d(t,"f",(function(){return r.f})),n.d(t,"g",(function(){return r.g})),n.d(t,"h",(function(){return r.h})),n.d(t,"i",(function(){return r.i})),n.d(t,"j",(function(){return r.j})),n.d(t,"k",(function(){return r.k})),n.d(t,"l",(function(){return r.l})),n.d(t,"m",(function(){return r.m})),n.d(t,"n",(function(){return r.n})),n.d(t,"o",(function(){return r.o})),n.d(t,"p",(function(){return r.p}))},61:function(e,t,n){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",s="minute",o="hour",a="day",u="week",c="month",l="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,c),s=n-i<0,o=t.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:u,d:a,D:d,h:o,m:s,s:i,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",_={};_[b]=m;var w=function(e){return e instanceof S},E=function e(t,n,r){var i;if(!t)return b;if("string"==typeof t){var s=t.toLowerCase();_[s]&&(i=s),n&&(_[s]=n,i=s);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var a=t.name;_[a]=t,i=a}return!r&&i&&(b=i),i||!r&&b},T=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},I=y;I.l=E,I.i=w,I.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function m(e){this.$L=E(e.locale,null,!0),this.parse(e)}var v=m.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(I.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return I},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<T(e)},v.$g=function(e,t,n){return I.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!I.u(t)||t,l=I.p(e),f=function(e,t){var i=I.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(a)},p=function(e,t){return I.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,m=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case h:return r?f(1,0):f(31,11);case c:return r?f(1,m):f(0,m+1);case u:var b=this.$locale().weekStart||0,_=(g<b?g+7:g)-b;return f(r?v-_:v+(6-_),m);case a:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case s:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,u=I.p(e),l="set"+(this.$u?"UTC":""),f=(n={},n[a]=l+"Date",n[d]=l+"Date",n[c]=l+"Month",n[h]=l+"FullYear",n[o]=l+"Hours",n[s]=l+"Minutes",n[i]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],p=u===a?this.$D+(t-this.$W):t;if(u===c||u===h){var g=this.clone().set(d,1);g.$d[f](p),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[I.p(e)]()},v.add=function(r,l){var d,f=this;r=Number(r);var p=I.p(l),g=function(e){var t=T(f);return I.w(t.date(t.date()+Math.round(e*r)),f)};if(p===c)return this.set(c,this.$M+r);if(p===h)return this.set(h,this.$y+r);if(p===a)return g(1);if(p===u)return g(7);var m=(d={},d[s]=t,d[o]=n,d[i]=e,d)[p]||1,v=this.$d.getTime()+r*m;return I.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=I.z(this),s=this.$H,o=this.$m,a=this.$M,u=n.weekdays,c=n.months,l=function(e,n,i,s){return e&&(e[
2n]||e(t,r))||i[n].slice(0,s)},h=function(e){return I.s(s%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:I.s(a+1,2,"0"),MMM:l(n.monthsShort,a,c,3),MMMM:l(c,a),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(s),HH:I.s(s,2,"0"),h:h(1),hh:h(2),a:d(s,o,!0),A:d(s,o,!1),m:String(o),mm:I.s(o,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:i};return r.replace(g,(function(e,t){return t||p[e]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,d,f){var p,g=I.p(d),m=T(r),v=(m.utcOffset()-this.utcOffset())*t,y=this-m,b=I.m(this,m);return b=(p={},p[h]=b/12,p[c]=b,p[l]=b/3,p[u]=(y-v)/6048e5,p[a]=(y-v)/864e5,p[o]=y/n,p[s]=y/t,p[i]=y/e,p)[g]||y,f?b:I.a(b)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return _[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return I.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),O=S.prototype;return T.prototype=O,[["$ms",r],["$s",i],["$m",s],["$H",o],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||(e(t,S,T),e.$i=!0),T},T.locale=E,T.isDayjs=w,T.unix=function(e){return T(1e3*e)},T.en=_[b],T.Ls=_,T.p={},T}()},67:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ue})),n.d(t,"b",(function(){return nn})),n.d(t,"c",(function(){return Be})),n.d(t,"d",(function(){return $e})),n.d(t,"e",(function(){return Ne})),n.d(t,"f",(function(){return Ve}));var r=n(0),i=n(7);function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;var o=n(32),a=n(31);function u(){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."}}const c=u,l=new r.b("auth","Firebase",{"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."}),h=new o.b("@firebase/auth");function d(e,...t){h.logLevel<=o.a.ERROR&&h.error(`Auth (${i.a}): ${e}`,...t)}function f(e,...t){throw m(e,...t)}function p(e,...t){return m(e,...t)}function g(e,t,n){const i=Object.assign(Object.assign({},c()),{[t]:n});return new r.b("auth","Firebase",i).create(t,{appName:e.name})}function m(e,...t){if("string"!=typeof e){const 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 m(t,...n)}function y(e){const t="INTERNAL ASSERTION FAILED: "+e;throw d(t),new Error(t)}function b(e,t){e||y(t)}const _=new Map;function w(e){b(e instanceof Function,"Expected a class definition");let t=_.get(e);return t?(b(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,_.set(e,t),t)}function E(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function T(){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}class S{constructor(e,t){this.shortDelay=e,this.longDelay=t,b(t>e,"Short delay should be less than long delay!"),this.isMobile=Object(r.q)()||Object(r.r)()}get(){return"undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(T()||Object(r.l)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function O(e,t){b(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class k{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 FetchProvi
2der.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")}}const A={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:"internal-error",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"},C=new S(3e4,6e4);function R(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function N(e,t,n,i,s={}){return D(e,s,(async()=>{let s={},o={};i&&("GET"===t?o=i:s={body:JSON.stringify(i)});const a=Object(r.u)(Object.assign({key:e.config.apiKey},o)).slice(1),u=await e._getAdditionalHeaders();return u["Content-Type"]="application/json",e.languageCode&&(u["X-Firebase-Locale"]=e.languageCode),k.fetch()(M(e,e.config.apiHost,n,a),Object.assign({method:t,headers:u,referrerPolicy:"no-referrer"},s))}))}async function D(e,t,n){e._canInitEmulator=!1;const i=Object.assign(Object.assign({},A),t);try{const t=new L(e),r=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const s=await r.json();if("needConfirmation"in s)throw P(e,"account-exists-with-different-credential",s);if(r.ok&&!("errorMessage"in s))return s;{const t=r.ok?s.errorMessage:s.error.message,[n,o]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw P(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===n)throw P(e,"email-already-in-use",s);if("USER_DISABLED"===n)throw P(e,"user-disabled",s);const a=i[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(o)throw g(e,a,o);f(e,a)}}catch(t){if(t instanceof r.c)throw t;f(e,"network-request-failed")}}async function x(e,t,n,r,i={}){const s=await N(e,t,n,r,i);return"mfaPendingCredential"in s&&f(e,"multi-factor-auth-required",{_serverResponse:s}),s}function M(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?O(e.config,i):`${e.config.apiScheme}://${i}`}class L{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(p(this.auth,"network-request-failed"))),C.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function P(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=p(e,t,r);return i.customData._tokenResponse=n,i}function j(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}function F(e){return 1e3*Number(e)}function $(e){const[t,n,i]=e.split(".");if(void 0===t||void 0===n||void 0===i)return d("JWT malformed, contained fewer than 3 sections"),null;try{const e=Object(r.d)(n);return e?JSON.parse(e):(d("Failed to decode base64 JWT payload"),null)}catch(e){return d("Caught error parsing JWT payload as JSON",e),null}}async function U(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof r.c&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}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){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){return void("auth/network-request-failed"===e.code&&this.schedule(!0))}this.schedule()}}class B{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=j(this.lastLoginAt),this.creationTime=j(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function q(e){var t;const n=e.auth,r=await e.getIdToken(),i=await U(e,async function(e,t){return N(e,"POST","/v1/accounts:lookup",t)}(n,{idToken:r}));v(null==i?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const a=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?o.providerUserInfo.map((e=>{var{providerId:t}=e,n=s(e,["providerId"]);
vendor: 14,463 bytes, line 2
2return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[];const u=(c=e.providerData,l=a,[...c.filter((e=>!l.some((t=>t.providerId===e.providerId)))),...l]);var c,l;const h=e.isAnonymous,d=!(e.email&&o.passwordHash||(null==u?void 0:u.length)),f=!!h&&d,p={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:u,metadata:new B(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(e,p)}class H{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");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=$(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){const{accessToken:n,refreshToken:i,expiresIn:s}=await async function(e,t){const n=await D(e,{},(async()=>{const n=Object(r.u)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:s}=e.config,o=M(e,i,"/v1/token",`key=${s}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",k.fetch()(o,{method:"POST",headers:a,body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,i,Number(s))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,s=new H;return n&&(v("string"==typeof n,"internal-error",{appName:e}),s.refreshToken=n),r&&(v("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),i&&(v("number"==typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}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 H,this.toJSON())}_performRefresh(){return y("not implemented")}}function z(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=s(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 B(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await U(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 async function(e,t=!1){const n=Object(r.j)(e),i=await n.getIdToken(t),s=$(i);v(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");const o="object"==typeof s.firebase?s.firebase:void 0,a=null==o?void 0:o.sign_in_provider;return{claims:s,token:i,authTime:j(F(s.auth_time)),issuedAtTime:j(F(s.iat)),expirationTime:j(F(s.exp)),signInProvider:a||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=Object(r.j)(e);await q(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(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){return new W(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_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 q(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await U(this,async function(e,t){return N(e,"POST","/v1/accounts:delete",t)}(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,s,o,a,u,c;const l=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(s=t.photoURL)&&void 0!==s?s:void 0,p=null!==(o=t.tenantId)&&void 0!==o?o:void 0,g=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,m=null!==(u=t.createdAt)&&void 0!==u?u:void 0,y=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:b,emailVerified:_,isAnonymous:w,providerData:E,stsTokenManager:T}=t;v(b&&T,e,"internal-error");const I=H.fromJSON(this.name,T);v("string"==typeof b,e,"internal-error"),z(l,e.name),z(h,e.name),v("boolean"==typeof _,e,"internal-error"),v("boolean"==typeof w,e,"internal-error"),z(d,e.name),z(f,e.name),z(p,e.name),z(g,e.name),z(m,e.name),z(y,e.name);const S=new W({uid:b,auth:e,email:h,emailVerified:_,displayName:l,isAnonymous:w,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:I,createdAt:m,lastLoginAt:y});return E&&Array.isArray(E)&&(S.providerData=E.map((e=>Object.assign({},e)))),g&&(S._redirectEventId=g),S}static async _fromIdTokenResponse(e,t,n=!1){const r=new H;r.updateFromServerResponse(t);const i=new W({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await q(i),i}}class K{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}K.type="NONE";const G=K;function Y(e,t,n){return`firebase:${e}:${t}:${n}`}class X{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=Y(this.userKey,r.apiKey,i),this.fullPersistenceKey=Y("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(){const 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;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new X(w(G),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||w(G);const s=Y(n,e.config.apiKey,e.name);let o=null;for(const n of t)try{const t=await n._get(s);if(t){const r=W._fromJSON(e,t);n!==i&&(o=r),i=n;break}}catch(e){}const a=r.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],o&&await i._set(s,o.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(s)}catch(e){}}))),new X(i,e,n)):new X(i,e,n)}}function Q(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(te(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Z(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(re(t))return"Blackberry";if(ie(t))return"Webos";if(J(t))return"Safari";if((t.includes("chrome/")||ee(t))&&!t.includes("edge/"))return"Chrome";if(ne(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null==n?void 0:n.length))return n[1]}return"Other"}function Z(e=Object(r.k)()){return/firefox\//i.test(e)}function J(e=Object(r.k)()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ee(e=Object(r.k)()){return/crios\//i.test(e)}function te(e=Object(r.k)()){return/iemobile/i.test(e)}function ne(e=Object(r.k)()){return/android/i.test(e)}function re(e=Object(r.k)()){return/blackberry/i.test(e)}function ie(e=Object(r.k)()){return/webos/i.test(e)}function se(e=Object(r.k)()){return/iphone|ipad|ipod/i.test(e)}function oe(e=Object(r.k)()){return se(e)||ne(e)||ie(e)||re(e)||/windows phone/i.test(e)||te(e)}function ae(e,t=[]){let n;switch(e){case"Browser":n=Q(Object(r.k)());break;case"Worker":n=`${Q(Object(r.k)())}-${e}`;break;default:n=e}const s=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${i.a}/${s}`}class ue{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(e){r(e)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){var t;if(this.auth.currentUser===e)return;const n=[];try{for(const t of this.queue)await t(e),t.onAbort&&n.push(t.onAbort)}catch(e){n.reverse();for(const e of n)try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===(t=e)||void 0===t?void 0:t.message})}}}class ce{constructor(e,t,n){this.app=e,this.heartbeatServiceProvider=t,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new he(this),this.idTokenSubscription=new he(this),this.beforeStateQueue=new ue(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.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=w(t)),this._initializationPromise=this.queue((async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await X.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;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUser(e){var t;const n=await this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,s=null==r?void 0:r._redirectEventId,o=await this.tryRedirectSignIn(e);n&&n!==s||!(null==o?void 0:o.user)||(r=o.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 q(e)}catch(e){if("auth/network-request-failed"!==e.code)return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}
2async updateCurrentUser(e){const t=e?Object(r.j)(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(w(e))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new r.b("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){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&w(e)||this._popupRedirectResolver;v(t,this,"argument-error"),this.redirectPersistenceManager=await X.create(this,[w(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);const 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()=>{};const i="function"==typeof t?t:t.next.bind(t),s=this._isInitialized?Promise.resolve():this._initializationPromise;return v(s,this,"internal-error"),s.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=ae(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());return n&&(t["X-Firebase-Client"]=n),t}}function le(e){return Object(r.j)(e)}class he{constructor(e){this.auth=e,this.observer=null,this.addObserver=Object(r.g)((e=>this.observer=e))}get next(){return v(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}class de{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 fe(e,t){return N(e,"POST","/v1/accounts:update",t)}async function pe(e,t){return N(e,"POST","/v1/accounts:sendOobCode",R(e,t))}class ge extends de{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new ge(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new ge(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const 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){switch(this.signInMethod){case"password":return async function(e,t){return x(e,"POST","/v1/accounts:signInWithPassword",R(e,t))}(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return x(e,"POST","/v1/accounts:signInWithEmailLink",R(e,t))}(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return fe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return x(e,"POST","/v1/accounts:signInWithEmailLink",R(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function me(e,t){return x(e,"POST","/v1/accounts:signInWithIdp",R(e,t))}class ve extends de{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new ve(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&&
2(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){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=s(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new ve(n,r);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return me(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,me(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,me(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const 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=Object(r.u)(t)}return e}}const ye={USER_NOT_FOUND:"user-not-found"};class be extends de{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new be({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new be({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return x(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await x(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,t));if(n.temporaryProof)throw P(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return x(e,"POST","/v1/accounts:signInWithPhoneNumber",R(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),ye)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const 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));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new be({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class _e{constructor(e){var t,n,i,s,o,a;const u=Object(r.v)(Object(r.i)(e)),c=null!==(t=u.apiKey)&&void 0!==t?t:null,l=null!==(n=u.oobCode)&&void 0!==n?n:null,h=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!==(i=u.mode)&&void 0!==i?i:null);v(c&&l&&h,"argument-error"),this.apiKey=c,this.operation=h,this.code=l,this.continueUrl=null!==(s=u.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(o=u.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(a=u.tenantId)&&void 0!==a?a:null}static parseLink(e){const t=function(e){const t=Object(r.v)(Object(r.i)(e)).link,n=t?Object(r.v)(Object(r.i)(t)).deep_link_id:null,i=Object(r.v)(Object(r.i)(e)).deep_link_id;return(i?Object(r.v)(Object(r.i)(i)).link:null)||i||n||t||e}(e);try{return new _e(t)}catch(e){return null}}}class we{constructor(){this.providerId=we.PROVIDER_ID}static credential(e,t){return ge._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=_e.parseLink(t);return v(n,"argument-error"),ge._fromEmailAndCode(e,n.code,n.tenantId)}}we.PROVIDER_ID="password",we.EMAIL_PASSWORD_SIGN_IN_METHOD="password",we.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class Ee{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}}
2class Te extends Ee{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Ie extends Te{constructor(){super("facebook.com")}static credential(e){return ve._fromParams({providerId:Ie.PROVIDER_ID,signInMethod:Ie.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ie.credentialFromTaggedObject(e)}static credentialFromError(e){return Ie.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Ie.credential(e.oauthAccessToken)}catch(e){return null}}}Ie.FACEBOOK_SIGN_IN_METHOD="facebook.com",Ie.PROVIDER_ID="facebook.com";class Se extends Te{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return ve._fromParams({providerId:Se.PROVIDER_ID,signInMethod:Se.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Se.credentialFromTaggedObject(e)}static credentialFromError(e){return Se.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return Se.credential(t,n)}catch(e){return null}}}Se.GOOGLE_SIGN_IN_METHOD="google.com",Se.PROVIDER_ID="google.com";class Oe extends Te{constructor(){super("github.com")}static credential(e){return ve._fromParams({providerId:Oe.PROVIDER_ID,signInMethod:Oe.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Oe.credentialFromTaggedObject(e)}static credentialFromError(e){return Oe.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Oe.credential(e.oauthAccessToken)}catch(e){return null}}}Oe.GITHUB_SIGN_IN_METHOD="github.com",Oe.PROVIDER_ID="github.com";class ke extends Te{constructor(){super("twitter.com")}static credential(e,t){return ve._fromParams({providerId:ke.PROVIDER_ID,signInMethod:ke.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return ke.credentialFromTaggedObject(e)}static credentialFromError(e){return ke.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return ke.credential(t,n)}catch(e){return null}}}async function Ae(e,t){return x(e,"POST","/v1/accounts:signUp",R(e,t))}ke.TWITTER_SIGN_IN_METHOD="twitter.com",ke.PROVIDER_ID="twitter.com";class Ce{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){const i=await W._fromIdTokenResponse(e,n,r),s=Re(n);return new Ce({user:i,providerId:s,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=Re(n);return new Ce({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function Re(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}async function Ne(e){var t;const n=le(e);if(await n._initializationPromise,null===(t=n.currentUser)||void 0===t?void 0:t.isAnonymous)return new Ce({user:n.currentUser,providerId:null,operationType:"signIn"});const r=await Ae(n,{returnSecureToken:!0}),i=await Ce._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}class De extends r.c{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,De.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 De(e,t,n,r)}}function xe(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>
2{if("auth/multi-factor-auth-required"===n.code)throw De._fromErrorAndOperation(e,n,t,r);throw n}))}async function Me(e,t,n=!1){const r=await U(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Ce._forOperation(e,"link",r)}async function Le(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const s=await U(e,xe(r,i,t,e),n);v(s.idToken,r,"internal-error");const o=$(s.idToken);v(o,r,"internal-error");const{sub:a}=o;return v(e.uid===a,r,"user-mismatch"),Ce._forOperation(e,i,s)}catch(e){throw"auth/user-not-found"===(null==e?void 0:e.code)&&f(r,"user-mismatch"),e}}async function Pe(e,t,n=!1){const r="signIn",i=await xe(e,r,t),s=await Ce._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(s.user),s}async function je(e,t){return Pe(le(e),t)}function Fe(e,t,n){var r;v((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),v(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&&(v(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(v(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)}async function $e(e,t,n){const i=Object(r.j)(e),s={requestType:"PASSWORD_RESET",email:t};n&&Fe(i,s,n),await async function(e,t){return pe(e,t)}(i,s)}async function Ue(e,t,n){const r=le(e),i=await Ae(r,{returnSecureToken:!0,email:t,password:n}),s=await Ce._fromIdTokenResponse(r,"signIn",i);return await r._updateCurrentUser(s.user),s}function Ve(e,t,n){return je(Object(r.j)(e),we.credential(t,n))}function Be(e,t,n,i){return Object(r.j)(e).onAuthStateChanged(t,n,i)}new WeakMap;const qe="__sak";class He{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(qe,"1"),this.storage.removeItem(qe),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const 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 ze extends He{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=Object(r.k)();return J(e)||se(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),this.fallbackToPolling=oe(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const 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}const i=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},s=this.storage.getItem(n);Object(r.o)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,10):i()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const 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){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}ze.type="LOCAL";const We=ze;class Ke extends He{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Ke.type="SESSION";const Ge=Ke;class Ye{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new Ye(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,s=this.handlersMap[r];if(!(null==s?void 0:s.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const o=Array.from(s).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}})))}(o);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:a})}_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)}}function Xe(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}Ye.receivers=[];class Qe{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){const r="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,s;return new Promise(((o,a)=>{const u=Xe("",20);r.port1.start();const c=setTimeout((()=>{a(new Error("unsupported_event"))}),n);s={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===u)switch(t.data.status){case"ack":clearTimeout(c),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),o(t.data.response);break;default:clearTimeout(c),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(s),r.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:u,data:t},[r.port2])})).finally((()=>{s&&this.removeMessageHandler(s)}))}}function Ze(){return window}
vendor: 5,332 bytes, line 2
2function Je(){return void 0!==Ze().WorkerGlobalScope&&"function"==typeof Ze().importScripts}const et="firebaseLocalStorageDb",tt="firebaseLocalStorage",nt="fbase_key";class rt{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 it(e,t){return e.transaction([tt],t?"readwrite":"readonly").objectStore(tt)}function st(){const e=indexedDB.open(et,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(tt,{keyPath:nt})}catch(e){n(e)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(tt)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(et);return new rt(e).toPromise()}(),t(await st()))}))}))}async function ot(e,t,n){const r=it(e,!0).put({[nt]:t,value:n});return new rt(r).toPromise()}function at(e,t){const n=it(e,!0).delete(t);return new rt(n).toPromise()}class ut{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 st()),this.db}async _withRetries(e){let t=0;for(;;)try{const 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 Je()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Ye._getInstance(Je()?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 async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Qe(this.activeServiceWorker);const 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?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(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await st();return await ot(e,qe,"1"),await at(e,qe),!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=>ot(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=it(e,!1).get(t),r=await new rt(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>at(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=it(e,!1).getAll();return new rt(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;for(const{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(const 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;const n=this.listeners[e];if(n)for(const 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()}}ut.type="LOCAL";const ct=ut;function lt(e){return new Promise(((t,n)=>{const r=document.createElement("script");var i,s;r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=p("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",(null!==(s=null===(i=document.getElementsByTagName("head"))||void 0===i?void 0:i[0])&&void 0!==s?s:document).appendChild(r)}))}function ht(e){return`__${e}${Math.floor(1e6*Math.random())}`}ht("rcb"),new S(3e4,6e4);const dt="recaptcha";async function ft(e,t,n){var r;const i=await n.verify();try{let s;if(v("string"==typeof i,e,"argument-error"),v(n.type===dt,e,"argument-error"),s="string"==typeof t?{phoneNumber:t}
vendor: 10,068 bytes, line 2
2:t,"session"in s){const t=s.session;if("phoneNumber"in s){v("enroll"===t.type,e,"internal-error");const n=await function(e,t){return N(e,"POST","/v2/accounts/mfaEnrollment:start",R(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:s.phoneNumber,recaptchaToken:i}});return n.phoneSessionInfo.sessionInfo}{v("signin"===t.type,e,"internal-error");const n=(null===(r=s.multiFactorHint)||void 0===r?void 0:r.uid)||s.multiFactorUid;v(n,e,"missing-multi-factor-info");const o=await function(e,t){return N(e,"POST","/v2/accounts/mfaSignIn:start",R(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:i}});return o.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return N(e,"POST","/v1/accounts:sendVerificationCode",R(e,t))}(e,{phoneNumber:s.phoneNumber,recaptchaToken:i});return t}}finally{n._reset()}}class pt{constructor(e){this.providerId=pt.PROVIDER_ID,this.auth=le(e)}verifyPhoneNumber(e,t){return ft(this.auth,e,Object(r.j)(t))}static credential(e,t){return be._fromVerification(e,t)}static credentialFromResult(e){const t=e;return pt.credentialFromTaggedObject(t)}static credentialFromError(e){return pt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:n}=e;return t&&n?be._fromTokenResponse(t,n):null}}function gt(e,t){return t?w(t):(v(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}pt.PROVIDER_ID="phone",pt.PHONE_SIGN_IN_METHOD="phone";class mt extends de{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return me(e,this._buildIdpRequest())}_linkToIdToken(e,t){return me(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return me(e,this._buildIdpRequest())}_buildIdpRequest(e){const 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 vt(e){return Pe(e.auth,new mt(e),e.bypassAuthState)}function yt(e){const{auth:t,user:n}=e;return v(n,t,"internal-error"),Le(n,new mt(e),e.bypassAuthState)}async function bt(e){const{auth:t,user:n}=e;return v(n,t,"internal-error"),Me(n,new mt(e),e.bypassAuthState)}class _t{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){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:s,type:o}=e;if(s)return void this.reject(s);const a={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(o)(a))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return vt;case"linkViaPopup":case"linkViaRedirect":return bt;case"reauthViaPopup":case"reauthViaRedirect":return yt;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()}}const wt=new S(2e3,1e4);class Et extends _t{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,Et.currentPopupAction&&Et.currentPopupAction.cancel(),Et.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return v(e,this.auth,"internal-error"),e}async onExecution(){b(1===this.filter.length,"Popup operations only handle one event");const e=Xe();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,Et.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(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"))}),2e3):this.pollId=window.setTimeout(e,wt.get())};e()}}Et.currentPopupAction=null;const Tt=new Map;class It extends _t{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=Tt.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=kt(t),r=Ot(e);if(!await r._isAvailable())return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}Tt.set(this.auth._key(),e)}return this.bypassAuthState||Tt.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function St(e,t){Tt.set(e._key(),t)}function Ot(e){return w(e._redirectPersistence)}function kt(e){return Y("pendingRedirect",e.config.apiKey,e.name)}async function At(e,t,n=!1){const r=le(e),i=gt(r,t),s=new It(r,i,n),o=await s.execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,t)),o}class Ct{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 Nt(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!Nt(e)){const 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){const 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(Rt(e))}saveEventToCache(e){this.cachedEventUids.add(Rt(e)),this.lastProcessedEventTime=Date.now()}}function Rt(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function Nt({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}const Dt=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,xt=/^https?/;async function Mt(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return N(e,"GET","/v1/projects",t)}(e);for(const e of t)try{if(Lt(e))return}catch(e){}f(e,"unauthorized-domain")}function Lt(e){const t=E(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const 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(!xt.test(n))return!1;if(Dt.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}const Pt=new S(3e4,6e4);function jt(){const e=Ze().___jsl;if(null==e?void 0:e.H)for(const 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 Ft=null;function $t(e){return Ft=Ft||function(e){return new Promise(((t,n)=>{var r,i,s;function o(){jt(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{jt(),n(p(e,"network-request-failed"))},timeout:Pt.get()})}if(null===(i=null===(r=Ze().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(s=Ze().gapi)||void 0===s?void 0:s.load)){const t=ht("iframefcb");return Ze()[t]=()=>{gapi.load?o():n(p(e,"network-request-failed"))},lt(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>n(e)))}o()}})).catch((e=>{throw Ft=null,e}))}(e),Ft}const Ut=new S(5e3,15e3),Vt={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Bt=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function qt(e){const t=e.config;v(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?O(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
2/__/auth/iframe`,s={apiKey:t.apiKey,appName:e.name,v:i.a},o=Bt.get(e.config.apiHost);o&&(s.eid=o);const a=e._getFrameworks();return a.length&&(s.fw=a.join(",")),`${n}?${Object(r.u)(s).slice(1)}`}const Ht={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class zt{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function Wt(e,t,n,i=500,s=600){const o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-i)/2,0).toString();let u="";const c=Object.assign(Object.assign({},Ht),{width:i.toString(),height:s.toString(),top:o,left:a}),l=Object(r.k)().toLowerCase();n&&(u=ee(l)?"_blank":n),Z(l)&&(t=t||"http://localhost",c.scrollbars="yes");const h=Object.entries(c).reduce(((e,[t,n])=>`${e}${t}=${n},`),"");if(function(e=Object(r.k)()){var t;return se(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==u)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const 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 zt(null);const d=window.open(t||"",u,h);v(d,e,"popup-blocked");try{d.focus()}catch(e){}return new zt(d)}const Kt="__/auth/handler",Gt="emulator/auth/handler";function Yt(e,t,n,s,o,a){v(e.config.authDomain,e,"auth-domain-config-required"),v(e.config.apiKey,e,"invalid-api-key");const u={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:s,v:i.a,eventId:o};if(t instanceof Ee){t.setDefaultLanguage(e.languageCode),u.providerId=t.providerId||"",Object(r.n)(t.getCustomParameters())||(u.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(a||{}))u[e]=t}if(t instanceof Te){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(u.scopes=e.join(","))}e.tenantId&&(u.tid=e.tenantId);const c=u;for(const e of Object.keys(c))void 0===c[e]&&delete c[e];return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${Kt}`;return O(e,Gt)}(e)}?${Object(r.u)(c).slice(1)}`}const Xt="webStorageSupport";const Qt=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Ge,this._completeRedirectFn=At,this._overrideRedirectResult=St}async _openPopup(e,t,n,r){var i;b(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Wt(e,Yt(e,t,n,E(),r),Xe())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=Yt(e,t,n,E(),r),Ze().location.href=i,new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(b(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const t=await async function(e){const t=await $t(e),n=Ze().gapi;return v(n,e,"internal-error"),t.open({where:document.body,url:qt(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Vt,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=p(e,"network-request-failed"),s=Ze().setTimeout((()=>{r(i)}),Ut.get());function o(){Ze().clearTimeout(s),n(t)}t.ping(o).then(o,(()=>{r(i)}))}))))}(e),n=new Ct(e);return t.register("authEvent",(t=>{v(null==t?void 0:t.authEvent,e,"invalid-auth-event");return{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(Xt,{type:Xt},(n=>{var r;const i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==i&&t(!!i),f(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Mt(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return oe()||J()||se()}};var Zt,Jt="@firebase/auth",en="0.20.3";class tn{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){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{var n;e((null===(n=t)||void 0===n?void 0:n.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const 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()}}function nn(e=Object(i.e)()){const t=Object(i.b)(e,"auth");return t.isInitialized()?t.getImmediate():function(e,t){const n=Object(i.b)(e,"auth");if(n.isInitialized()){const e=n.getImmediate(),i=n.getOptions();if(Object(r.h)(i,null!=t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Qt,persistence:[ct,We,Ge]})}Zt="Browser",Object(i.c)(new a.a("auth",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),{apiKey:i,authDomain:s}=n.options;return((e,n)=>
vendor: 6,073 bytes, line 2
2{v(i&&!i.includes(":"),"invalid-api-key",{appName:e.name}),v(!(null==s?void 0:s.includes(":")),"argument-error",{appName:e.name});const r={apiKey:i,authDomain:s,clientPlatform:Zt,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ae(Zt)},o=new ce(e,n,r);return function(e,t){const n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(w);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(o,t),o})(n,r)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),Object(i.c)(new a.a("auth-internal",(e=>(e=>new tn(e))(le(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),Object(i.g)(Jt,en,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(Zt)),Object(i.g)(Jt,en,"esm2017")},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return x})),n.d(t,"e",(function(){return $})),n.d(t,"f",(function(){return F})),n.d(t,"g",(function(){return U}));var r=n(31),i=n(32),s=n(0);let o,a;const u=new WeakMap,c=new WeakMap,l=new WeakMap,h=new WeakMap,d=new WeakMap;let f={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return c.get(e);if("objectStoreNames"===t)return e.objectStoreNames||l.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function p(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(v(this),t),m(u.get(this))}:function(...t){return m(e.apply(v(this),t))}:function(t,...n){const r=e.call(v(this),t,...n);return l.set(r,t.sort?t.sort():[t]),m(r)}}function g(e){return"function"==typeof e?p(e):(e instanceof IDBTransaction&&function(e){if(c.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)}));c.set(e,t)}(e),t=e,(o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,f):e);var t}function m(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(m(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)}));return t.then((t=>{t instanceof IDBCursor&&u.set(t,e)})).catch((()=>{})),d.set(t,e),t}(e);if(h.has(e))return h.get(e);const t=g(e);return t!==e&&(h.set(e,t),d.set(t,e)),t}const v=e=>d.get(e);const y=["get","getKey","getAll","getAllKeys","count"],b=["put","add","delete","clear"],_=new Map;function w(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_.get(t))return _.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=b.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!y.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,i?"readwrite":"readonly");let o=s.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&s.done]))[0]};return _.set(t,s),s}f=(e=>({...e,get:(t,n,r)=>w(t,n)||e.get(t,n,r),has:(t,n)=>!!w(t,n)||e.has(t,n)}))(f);class E{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const T="@firebase/app",I="0.7.26",S=new i.b("@firebase/app"),O="[DEFAULT]",k={[T]:"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"},A=new Map,C=new Map;function R(e,t){try{e.container.addComponent(t)}catch(n){S.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function N(e){const t=e.name;if(C.has(t))return S.debug(`There were multiple attempts to register component ${t}.`),!1;C.set(t,e);for(const t of A.values())R(t,e);return!0}function D(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function x(e,t,n="[DEFAULT]"){D(e,t).clearInstance(n)}const M={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","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}
2' already deleted","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.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","storage-delete":"Error thrown when deleting from storage. Original error: {$originalErrorMessage}."},L=new s.b("app","Firebase",M);class P{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.a("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 L.create("app-deleted",{appName:this._name})}}const j="9.8.3";function F(e,t={}){if("object"!=typeof t){t={name:t}}const n=Object.assign({name:O,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw L.create("bad-app-name",{appName:String(i)});const o=A.get(i);if(o){if(Object(s.h)(e,o.options)&&Object(s.h)(n,o.config))return o;throw L.create("duplicate-app",{appName:i})}const a=new r.b(i);for(const e of C.values())a.addComponent(e);const u=new P(e,n,a);return A.set(i,u),u}function $(e="[DEFAULT]"){const t=A.get(e);if(!t)throw L.create("no-app",{appName:e});return t}function U(e,t,n){var i;let s=null!==(i=k[e])&&void 0!==i?i:e;n&&(s+=`-${n}`);const o=s.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${s}" with version "${t}":`];return o&&e.push(`library name "${s}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void S.warn(e.join(" "))}N(new r.a(`${s}-version`,(()=>({library:s,version:t})),"VERSION"))}const V="firebase-heartbeat-store";let B=null;function q(){return B||(B=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(e,t),a=m(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(m(o.result),e.oldVersion,e.newVersion,m(o.transaction))})),n&&o.addEventListener("blocked",(()=>n())),a.then((e=>{s&&e.addEventListener("close",(()=>s())),i&&e.addEventListener("versionchange",(()=>i()))})).catch((()=>{})),a}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(V)}}).catch((e=>{throw L.create("storage-open",{originalErrorMessage:e.message})}))),B}async function H(e,t){var n;try{const n=(await q()).transaction(V,"readwrite"),r=n.objectStore(V);return await r.put(t,z(e)),n.done}catch(e){throw L.create("storage-set",{originalErrorMessage:null===(n=e)||void 0===n?void 0:n.message})}}function z(e){return`${e.name}!${e.options.appId}`}class W{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new G(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=K();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}
2async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=K(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Y(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Y(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=Object(s.e)(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 K(){return(new Date).toISOString().substring(0,10)}class G{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!Object(s.p)()&&Object(s.w)().then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){var t;try{return(await q()).transaction(V).objectStore(V).get(z(e))}catch(e){throw L.create("storage-get",{originalErrorMessage:null===(t=e)||void 0===t?void 0:t.message})}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return H(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){const n=await this.read();return H(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Y(e){return Object(s.e)(JSON.stringify({version:2,heartbeats:e})).length}var X;X="",N(new r.a("platform-logger",(e=>new E(e)),"PRIVATE")),N(new r.a("heartbeat",(e=>new W(e)),"PRIVATE")),U(T,I,X),U(T,I,"esm2017"),U("fire-js","")},76:function(e,t,n){"use strict";var r={name:"NoSsr",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,i=t.props,s=r(),o=s.default;void 0===o&&(o=[]);var a=s.placeholder;return n._isMounted?o:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),i.placeholderTag&&(i.placeholder||a)?e(i.placeholderTag,{class:["no-ssr-placeholder"]},i.placeholder||a):o.length>0?o.map((function(){return e(!1)})):e(!1))}};e.exports=r},77:function(e,t,n){"use strict";function r(e,t,n){"object"==typeof n.value&&(n.value=i(n.value)),n.enumerable&&!n.get&&!n.set&&n.configurable&&n.writable&&"__proto__"!==t?e[t]=n.value:Object.defineProperty(e,t,n)}function i(e){if("object"!=typeof e)return e;var t,n,s,o=0,a=Object.prototype.toString.call(e);if("[object Object]"===a?s=Object.create(e.__proto__||null):"[object Array]"===a?s=Array(e.length):"[object Set]"===a?(s=new Set,e.forEach((function(e){s.add(i(e))}))):"[object Map]"===a?(s=new Map,e.forEach((function(e,t){s.set(i(t),i(e))}))):"[object Date]"===a?s=new Date(+e):"[object RegExp]"===a?s=new RegExp(e.source,e.flags):"[object DataView]"===a?s=new e.constructor(i(e.buffer)):"[object ArrayBuffer]"===a?s=e.slice(0):"Array]"===a.slice(-6)&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r(s,n[o],Object.getOwnPropertyDescriptor(e,n[o]));for(o=0,n=Object.getOwnPropertyNames(e);o<n.length;o++)Object.hasOwnProperty.call(s,t=n[o])&&s[t]===e[t]||r(s,t,Object.getOwnPropertyDescriptor(e,t))}return s||e}n.d(t,"a",(function(){return i}))},91:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(30);n(15),n(86),n(87);function i(e){return null!==e&&"object"===Object(r.a)(e)}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",r=arguments.length>3?arguments[3]:void 0;if(!i(t))return s(e,{},n,r);var o=Object.assign({},t);for(var a in e)if("__proto__"!==a&&"constructor"!==a){var u=e[a];null!=u&&(r&&r(o,a,u,n)||(Array.isArray(u)&&Array.isArray(o[a])?o[a]=o[a].concat(u):i(u)&&i(o[a])?o[a]=s(u,o[a],(n?"".concat(n,"."):"")+a.toString(),r):o[a]=u))}return o}function o(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return s(t,n,"",e)}),{})}}var a=o();a.fn=o((function(e,t,n,r){if(void 0!==e[t]&&"function"==typeof n)return e[t]=n(e[t]),!0})),a.arrayFn=o((function(e,t,n,r){if(Array.isArray(e[t])&&"function"==typeof n)return e[t]=n(e[t]),!0})),a.extend=o},93:function(e,t,n){e.exports=n(309)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.