PageSourceSearch

https://a1constructorscompanyllc.com/static/js/main.81aefd89.js

js a1constructorscompanyllc.com collected 2026-10-08 17:32:12 UTC 1,275,663 bytes, 3 lines download raw bytes

1/*! For license information please see main.81aefd89.js.LICENSE.txt */
2!function(){var e={4569:function(e,t,n){e.exports=n(8036)},3381:function(e,t,n){"use strict";var r=n(3589),i=n(7297),a=n(9301),o=n(9774),s=n(1804),u=n(9145),l=n(5411),c=n(6789),f=n(4531),h=n(6569),d=n(6261);e.exports=function(e){return new Promise((function(t,n){var p,v=e.data,m=e.headers,y=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(v)&&r.isStandardBrowserEnv()&&delete m["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+x)}var k=s(e.baseURL,e.url);function _(){if(b){var r="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,a={data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};i((function(e){t(e),g()}),(function(e){n(e),g()}),a),b=null}}if(b.open(e.method.toUpperCase(),o(k,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=_:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(_)},b.onabort=function(){b&&(n(new f("Request aborted",f.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new f("Network Error",f.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new f(t,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||l(k))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;C&&(m[e.xsrfHeaderName]=C)}"setRequestHeader"in b&&r.forEach(m,(function(e,t){"undefined"===typeof v&&"content-type"===t.toLowerCase()?delete m[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),y&&"json"!==y&&(b.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){b&&(n(!e||e&&e.type?new h:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),v||(v=null);var E=d(k);E&&-1===["http","https","file"].indexOf(E)?n(new f("Unsupported protocol "+E+":",f.ERR_BAD_REQUEST,e)):b.send(v)}))}},8036:function(e,t,n){"use strict";var r=n(3589),i=n(4049),a=n(3773),o=n(777);var s=function e(t){var n=new a(t),s=i(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(o(t,n))},s}(n(1709));s.Axios=a,s.CanceledError=n(6569),s.CancelToken=n(6857),s.isCancel=n(5517),s.VERSION=n(7600).version,s.toFormData=n(1397),s.AxiosError=n(4531),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(8089),s.isAxiosError=n(9580),e.exports=s,e.exports.default=s},6857:function(e,t,n){"use strict";var r=n(6569);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6569:function(e,t,n){"use strict";var r=n(4531);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(3589).inherits(i,r,{__CANCEL__:!0}),e.exports=i},5517:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},3773:function(e,t,n){"use strict";var r=n(3589),i=n(9774),a=n(7470),o=n(2733),s=n(777),u=n(1804),l=n(7835),c=l.validators;function f(e){this.defaults=e,this.interceptors={request:new a,response:new a}}f.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var a,u=[];
vendor: 4,453 bytes, line 2
2if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!i){var f=[o,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(u),a=Promise.resolve(t);f.length;)a=a.then(f.shift(),f.shift());return a}for(var h=t;r.length;){var d=r.shift(),p=r.shift();try{h=d(h)}catch(v){p(v);break}}try{a=o(h)}catch(v){return Promise.reject(v)}for(;u.length;)a=a.then(u.shift(),u.shift());return a},f.prototype.getUri=function(e){e=s(this.defaults,e);var t=u(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)})),e.exports=f},4531:function(e,t,n){"use strict";var r=n(3589);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var a=i.prototype,o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){o[e]={value:e}})),Object.defineProperties(i,o),Object.defineProperty(a,"isAxiosError",{value:!0}),i.from=function(e,t,n,o,s,u){var l=Object.create(a);return r.toFlatObject(e,l,(function(e){return e!==Error.prototype})),i.call(l,e.message,t,n,o,s),l.name=e.name,u&&Object.assign(l,u),l},e.exports=i},7470:function(e,t,n){"use strict";var r=n(3589);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},1804:function(e,t,n){"use strict";var r=n(4044),i=n(9549);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},2733:function(e,t,n){"use strict";var r=n(3589),i=n(2693),a=n(5517),o=n(1709),s=n(6569);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},777:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function o(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function u(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||a,i=t(e);r.isUndefined(i)&&t!==u||(n[e]=i)})),n}},7297:function(e,t,n){"use strict";var r=n(4531);e.exports=function(e,t,n){var i=n.config.validateStatus;
2n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},2693:function(e,t,n){"use strict";var r=n(3589),i=n(1709);e.exports=function(e,t,n){var a=this||i;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},1709:function(e,t,n){"use strict";var r=n(3589),i=n(4341),a=n(4531),o=n(6789),s=n(1397),u={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c={transitional:o,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(3381)),e}(),transformRequest:[function(e,t){if(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,a=r.isObject(e),o=t&&t["Content-Type"];if((n=r.isFileList(e))||a&&"multipart/form-data"===o){var u=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,u&&new u)}return a||"application/json"===o?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o){if("SyntaxError"===s.name)throw a.from(s,a.ERR_BAD_RESPONSE,this,null,this.response);throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(3035)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(u)})),e.exports=c},6789:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7600:function(e){e.exports={version:"0.27.2"}},4049:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},9774:function(e,t,n){"use strict";var r=n(3589);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},9549:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},9301:function(e,t,n){"use strict";var r=n(3589);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4044:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},9580:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},5411:function(e,t,n){"use strict";var r=n(3589);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4341:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},3035:function(e){e.exports=null},9145:function(e,t,n){"use strict";var r=n(3589),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},6261:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8089:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},1397:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(a,o){if(r.isPlainObject(a)||r.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+o);n.push(a),r.forEach(a,(function(n,a){if(!r.isUndefined(n)){var s,u=o?o+"."+a:a;if(n&&!o&&"object"===typeof n)if(r.endsWith(a,"{}"))n=JSON.stringify(n);else if(r.endsWith(a,"[]")&&(s=r.toArray(n)))return void s.forEac
2h((function(e){!r.isUndefined(e)&&t.append(u,i(e))}));e(n,u)}})),n.pop()}else t.append(o,i(a))}(e),t}},7835:function(e,t,n){"use strict";var r=n(7600).version,i=n(4531),a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};a.transitional=function(e,t,n){function a(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new i(a(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),a=r.length;a-- >0;){var o=r[a],s=t[o];if(s){var u=e[o],l=void 0===u||s(u,o,e);if(!0!==l)throw new i("option "+o+" must be "+l,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+o,i.ERR_BAD_OPTION)}},validators:a}},3589:function(e,t,n){"use strict";var r,i=n(4049),a=Object.prototype.toString,o=(r=Object.create(null),function(e){var t=a.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function u(e){return Array.isArray(e)}function l(e){return"undefined"===typeof e}var c=s("ArrayBuffer");function f(e){return null!==e&&"object"===typeof e}function h(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var d=s("Date"),p=s("File"),v=s("Blob"),m=s("FileList");function y(e){return"[object Function]"===a.call(e)}var g=s("URLSearchParams");function b(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),u(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var w,x=(w="undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return w&&e instanceof w});e.exports={isArray:u,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||a.call(e)===t||y(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:f,isPlainObject:h,isUndefined:l,isDate:d,isFile:p,isBlob:v,isFunction:y,isStream:function(e){return f(e)&&y(e.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:b,merge:function e(){var t={};function n(n,r){h(t[r])&&h(n)?t[r]=e(t[r],n):h(n)?t[r]=e({},n):u(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&"function"===typeof t?i(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,a,o={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)o[a=r[i]]||(t[a]=e[a],o[a]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:x,isFileList:m}},7340:function(e,t,n){"use strict";n.r(t),n.d(t,{CountUp:function(){return i}});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=function(){function e(e,t,n){var i=this;this.endVal=t,this.options=n,this.version="2.3.2",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,smartEasingThreshold:999,smartEasingAmou
vendor: 4,501 bytes, line 2
2nt:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(e){i.startTime||(i.startTime=e);var t=e-i.startTime;i.remaining=i.duration-t,i.useEasing?i.countDown?i.frameVal=i.startVal-i.easingFn(t,0,i.startVal-i.endVal,i.duration):i.frameVal=i.easingFn(t,i.startVal,i.endVal-i.startVal,i.duration):i.frameVal=i.startVal+(i.endVal-i.startVal)*(t/i.duration);var n=i.countDown?i.frameVal<i.endVal:i.frameVal>i.endVal;i.frameVal=n?i.endVal:i.frameVal,i.frameVal=Number(i.frameVal.toFixed(i.options.decimalPlaces)),i.printValue(i.frameVal),t<i.duration?i.rAF=requestAnimationFrame(i.count):null!==i.finalEndVal?i.update(i.finalEndVal):i.callback&&i.callback()},this.formatNumber=function(e){var t,n,r,a,o=e<0?"-":"";t=Math.abs(e).toFixed(i.options.decimalPlaces);var s=(t+="").split(".");if(n=s[0],r=s.length>1?i.options.decimal+s[1]:"",i.options.useGrouping){a="";for(var u=0,l=n.length;u<l;++u)0!==u&&u%3==0&&(a=i.options.separator+a),a=n[l-u-1]+a;n=a}return i.options.numerals&&i.options.numerals.length&&(n=n.replace(/[0-9]/g,(function(e){return i.options.numerals[+e]})),r=r.replace(/[0-9]/g,(function(e){return i.options.numerals[+e]}))),o+i.options.prefix+n+r+i.options.suffix},this.easeOutExpo=function(e,t,n,r){return n*(1-Math.pow(2,-10*e/r))*1024/1023+t},this.options=r(r({},this.defaults),n),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(t),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof e?document.getElementById(e):e,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined","undefined"!=typeof window&&this.options.enableScrollSpy&&(this.error?console.error(this.error,e):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push((function(){return i.handleScroll(i)})),window.onscroll=function(){window.onScrollFns.forEach((function(e){return e()}))},this.handleScroll(this)))}return e.prototype.handleScroll=function(e){if(e&&window&&!e.once){var t=window.innerHeight+window.scrollY,n=e.el.getBoundingClientRect(),r=n.top+n.height+window.pageYOffset;r<t&&r>window.scrollY&&e.paused?(e.paused=!1,setTimeout((function(){return e.start()}),e.options.scrollSpyDelay),e.options.scrollSpyOnce&&(e.once=!0)):window.scrollY>r&&!e.paused&&e.reset()}},e.prototype.determineDirectionAndSmartEasing=function(){var e=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>e;var t=e-this.startVal;if(Math.abs(t)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=e;var n=this.countDown?1:-1;this.endVal=e+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(e){this.error||(this.callback=e,this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},e.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(e){var t=this.formattingFn(e);"INPUT"===this.el.tagName?this.el.value=t:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=t:this.el.
2innerHTML=t},e.prototype.ensureNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: ".concat(e),null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e}()},3457:function(e){"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,i="undefined"!==typeof Element;function a(e,o){if(e===o)return!0;if(e&&o&&"object"==typeof e&&"object"==typeof o){var s,u,l,c=t(e),f=t(o);if(c&&f){if((u=e.length)!=o.length)return!1;for(s=u;0!==s--;)if(!a(e[s],o[s]))return!1;return!0}if(c!=f)return!1;var h=e instanceof Date,d=o instanceof Date;if(h!=d)return!1;if(h&&d)return e.getTime()==o.getTime();var p=e instanceof RegExp,v=o instanceof RegExp;if(p!=v)return!1;if(p&&v)return e.toString()==o.toString();var m=n(e);if((u=m.length)!==n(o).length)return!1;for(s=u;0!==s--;)if(!r.call(o,m[s]))return!1;if(i&&e instanceof Element&&o instanceof Element)return e===o;for(s=u;0!==s--;)if(("_owner"!==(l=m[s])||!e.$$typeof)&&!a(e[l],o[l]))return!1;return!0}return e!==e&&o!==o}e.exports=function(e,t){try{return a(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},2110:function(e,t,n){"use strict";var r=n(8309),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var l=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var o=c(n);f&&(o=o.concat(f(n)));for(var s=u(t),v=u(n),m=0;m<o.length;++m){var y=o[m];if(!a[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var g=h(n,y);try{l(t,y,g)}catch(b){}}}}return t}},746:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case f:case a:case s:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case h:case m:case v:case u:return e;default:return t}}case i:return t}}}function k(e){return x(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=u,t.Element=r,t.ForwardRef=h,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=i,t.Profiler=s,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return k(e)||x(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===h},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===o},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===f||e===s||e===o||e===d||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===g||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=x},8309:function(e,t,n){"use strict";e.exports=n(746)},1725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;
vendor: 1,128 bytes, line 2
2if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,a){for(var o,s,u=i(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))n.call(o,c)&&(u[c]=o[c]);if(t){s=t(o);for(var f=0;f<s.length;f++)r.call(o,s[f])&&(u[s[f]]=o[s[f]])}}return u}},888:function(e,t,n){"use strict";var r=n(9047);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
2;return n.PropTypes=n,n}},2007:function(e,t,n){e.exports=n(888)()},9047:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2758:function(e){"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,s=new t(512),u=new t(512),l=new t(512);function c(e){return s.get(e)||s.set(e,f(e).map((function(e){return e.replace(o,"$2")})))}function f(e){return e.match(n)||[""]}function h(e){return"string"===typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function d(e){return!h(e)&&(function(e){return e.match(i)&&!e.match(r)}(e)||function(e){return a.test(e)}(e))}e.exports={Cache:t,split:f,normalizePath:c,setter:function(e){var t=c(e);return u.get(e)||u.set(e,(function(e,n){for(var r=0,i=t.length,a=e;r<i-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;a=a[t[r++]]}a[t[r]]=n}))},getter:function(e,t){var n=c(e);return l.get(e)||l.set(e,(function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e}))},join:function(e){return e.reduce((function(e,t){return e+(h(t)||r.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){!function(e,t,n){var r,i,a,o,s=e.length;for(i=0;i<s;i++)(r=e[i])&&(d(r)&&(r='"'+r+'"'),a=!(o=h(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}(Array.isArray(e)?e:f(e),t,n)}}},835:function(e,t,n){"use strict";var r=n(2791),i=n(7340);function a(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var o=a(r);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 u(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){l(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}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return c=Object.assign?Object.assign.bind():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},c.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var h="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect;function d(e){var t=r.useRef(e);return h((function(){t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}var p=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],v={decimal:".",delay:null,prefix:"",suffix:"",duration:2,start:0,startOnMount:!0,enableReinitialize:!0},m=function(e){var t=r.useMemo((function(){return u(u({},v),e)}),[e]),n=t.ref,a=t.startOnMount,o=t.enableReinitialize,s=t.delay,l=t.onEnd,c=t.onStart,h=t.onPauseResume,m=t.onReset,y=t.onUpdate,g=f(t,p),b=r.useRef(),w=r.useRef(),x=r.useRef(!1),k=d((function(){return function(e,t){var n=t.decimal,r=t.decimals,a=t.duration,o=t.easingFn,s=t.end,u=t.formattingFn,l=t.numerals,c=t.prefix,f=t.separator,h=t.start,d=t.suffix,p=t.useEasing,v=t.enableScrollSpy,m=t.scrollSpyDelay,y=t.scrollSpyOnce;
2return new i.CountUp(e,s,{startVal:h,duration:a,decimal:n,decimalPlaces:r,easingFn:o,formattingFn:u,numerals:l,separator:f,prefix:c,suffix:d,useEasing:p,useGrouping:!!f,enableScrollSpy:v,scrollSpyDelay:m,scrollSpyOnce:y})}("string"===typeof n?n:n.current,g)})),_=d((function(e){var t=b.current;if(t&&!e)return t;var n=k();return b.current=n,n})),C=d((function(){var e=function(){return _(!0).start((function(){null===l||void 0===l||l({pauseResume:E,reset:S,start:I,update:T})}))};s&&s>0?w.current=setTimeout(e,1e3*s):e(),null===c||void 0===c||c({pauseResume:E,reset:S,update:T})})),E=d((function(){_().pauseResume(),null===h||void 0===h||h({reset:S,start:I,update:T})})),S=d((function(){w.current&&clearTimeout(w.current),_().reset(),null===m||void 0===m||m({pauseResume:E,start:I,update:T})})),T=d((function(e){_().update(e),null===y||void 0===y||y({pauseResume:E,reset:S,start:I})})),I=d((function(){S(),C()})),N=d((function(e){a&&(e&&S(),C())}));return r.useEffect((function(){x.current?o&&N(!0):(x.current=!0,N())}),[o,x,N,s,e.start,e.suffix,e.prefix,e.duration,e.separator,e.decimals,e.decimal,e.formattingFn]),r.useEffect((function(){return function(){S()}}),[S]),{start:I,pauseResume:E,reset:S,update:T,getCountUp:_}},y=["className","redraw","containerProps","children","style"];t.ZP=function(e){var t=e.className,n=e.redraw,i=e.containerProps,a=e.children,s=e.style,l=f(e,y),h=o.default.useRef(null),p=o.default.useRef(!1),v=m(u(u({},l),{},{ref:h,startOnMount:"function"!==typeof a||0===e.delay,enableReinitialize:!1})),g=v.start,b=v.reset,w=v.update,x=v.pauseResume,k=v.getCountUp,_=d((function(){g()})),C=d((function(t){e.preserveValue||b(),w(t)})),E=d((function(){"function"!==typeof e.children||h.current instanceof Element?k():console.error('Couldn\'t find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.')}));r.useEffect((function(){E()}),[E]),r.useEffect((function(){p.current&&C(e.end)}),[e.end,C]);var S=n&&e;return r.useEffect((function(){n&&p.current&&_()}),[_,n,S]),r.useEffect((function(){!n&&p.current&&_()}),[_,n,e.start,e.suffix,e.prefix,e.duration,e.separator,e.decimals,e.decimal,e.className,e.formattingFn]),r.useEffect((function(){p.current=!0}),[]),"function"===typeof a?a({countUpRef:h,start:g,reset:b,update:w,pauseResume:x,getCountUp:k}):o.default.createElement("span",c({className:t,ref:h,style:s},i),e.start?k().formattingFn(e.start):"")}},4463:function(e,t,n){"use strict";var r=n(2791),i=n(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function u(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function v(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new v(t,1,!1,e[1],null,!1,!1)}
vendor: 34,419 bytes, line 2
2)),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(p,e)||!f.call(d,e)&&(h.test(e)?p[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,g);m[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,g);m[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,g);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),k=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),T=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function D(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=R&&e[R]||e["@@iterator"])?e:null}var F,L=Object.assign;function M(e){if(void 0===F)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var V=!1;function B(e,t){if(!e||V)return"";V=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var u="\n"+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=o&&0<=s);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?M(e):""}function z(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case k:return"Portal";case E:return"Profiler";case C:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case S:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(t=e.displayName||null)?t:q(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function K(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function $(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){X(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ce,fe=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var de={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(de).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var ye=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ge(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ke=null,_e=null,Ce=null;function Ee(e){if(e=bi(e)){if("function"!==typeof ke)throw Error(a(280));var t=e.stateNode;t&&(t=xi(t),ke(e.stateNode,e.type,t))}}function Se(e){_e?Ce?Ce.push(e):Ce=[e]:_e=e}function Te(){if(_e){var e=_e,t=Ce;if(Ce=_e=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ie(e,t){return e(t)}function Ne(){}var Ae=!1;function je(e,t,n){if(Ae)return e(t,n);Ae=!0;try{return Ie(e,t,n)}finally{Ae=!1,(null!==_e||null!==Ce)&&(Ne(),Te())}}function Oe(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Pe=!1;if(c)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(ce){Pe=!1}function De(e,t,n,r,i,a,o,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var Fe=!1,Le=null,Me=!1,Ve=null,Be={onError:function(e){Fe=!0,Le=e}};function ze(e,t,n,r,i,a,o,s,u){Fe=!1,Le=null,De.apply(Be,arguments)}function qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ue(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(qe(e)!==e)throw Error(a(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=qe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return He(i),e;if(o===r)return He(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Qe=i.unstable_shouldYield,$e=i.unstable_requestPaint,Xe=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/ut|0)|0},st=Math.log,ut=Math.LN2;var lt=64,ct=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=ft(s):0!==(a&=o)&&(r=ft(a))}else 0!==(o=n&~i)?r=ft(o):0!==a&&(r=ft(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function dt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var xt,kt,_t,Ct,Et,St=!1,Tt=[],It=null,Nt=null,At=null,jt=new Map,Ot=new Map,Pt=[],Rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":jt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Ft(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&kt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Lt(e){var t=gi(e.target);if(null!==t){var n=qe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ue(n)))return e.blockedOn=t,void Et(e.priority,(function(){_t(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&kt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Vt(e,t,n){Mt(e)&&n.delete(t)}function Bt(){St=!1,null!==It&&Mt(It)&&(It=null),null!==Nt&&Mt(Nt)&&(Nt=null),null!==At&&Mt(At)&&(At=null),jt.forEach(Vt),Ot.forEach(Vt)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,St||(St=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function qt(e){function t(t){return zt(t,e)}if(0<Tt.length){zt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&zt(It,e),null!==Nt&&zt(Nt,e),null!==At&&zt(At,e),jt.forEach(t),Ot.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)Lt(n),null===n.blockedOn&&Pt.shift()}var Ut=w.ReactCurrentBatchConfig,Ht=!0;function Wt(e,t,n,r){var i=bt,a=Ut.transition;Ut.transition=null;try{bt=1,Gt(e,t,n,r)}finally{bt=i,Ut.transition=a}}function Kt(e,t,n,r){var i=bt,a=Ut.transition;Ut.transition=null;try{bt=4,Gt(e,t,n,r)}finally{bt=i,Ut.transition=a}}function Gt(e,t,n,r){if(Ht){var i=Qt(e,t,n,r);if(null===i)Hr(e,t,r,Yt,n),Dt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return It=Ft(It,e,t,n,r,i),!0;case"dragenter":return Nt=Ft(Nt,e,t,n,r,i),!0;case"mouseover":return At=Ft(At,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return jt.set(a,Ft(jt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Ot.set(a,Ft(Ot.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Rt.indexOf(e)){for(;null!==i;){var a=bi(i);if(null!==a&&xt(a),null===(a=Qt(e,t,n,r))&&Hr(e,t,r,Yt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Yt=null;function Qt(e,t,n,r){if(Yt=null,null!==(e=gi(e=xe(r))))if(null===(t=qe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ue(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function $t(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,un,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(ln),fn=L({},ln,{view:0,detail:0}),hn=an(fn),dn=L({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(on=e.screenX-un.screenX,sn=e.screenY-un.screenY):sn=on=0,un=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=an(dn),vn=an(L({},dn,{dataTransfer:0})),mn=an(L({},fn,{relatedTarget:0})),yn=an(L({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),gn=L({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(gn),wn=an(L({},ln,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function En(){return Cn}var Sn=L({},fn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(Sn),In=an(L({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=an(L({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),An=an(L({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=L({},dn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),On=an(jn),Pn=[9,13,27,32],Rn=c&&"CompositionEvent"in window,Dn=null;c&&"documentMode"in document&&(Dn=document.documentMode);var Fn=c&&"TextEvent"in window&&!Dn,Ln=c&&(!Rn||Dn&&8<Dn&&11>=Dn),Mn=String.fromCharCode(32),Vn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Wn(e,t,n,r){Se(r),0<(t=Kr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Gn=null;function Yn(e){Mr(e,0)}function Qn(e){if(G(wi(e)))return e}function $n(e,t){if("change"===e)return t}var Xn=!1;if(c){var Jn;if(c){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Xn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Kn&&(Kn.detachEvent("onpropertychange",nr),Gn=Kn=null)}function nr(e){if("value"===e.propertyName&&Qn(Gn)){var t=[];Wn(t,Gn,e,xe(e)),je(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Kn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Gn)}function ar(e,t){if("click"===e)return Qn(t)}function or(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function ur(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!f.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&dr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var o=cr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vr=c&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,gr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==Y(r)||("selectionStart"in(r=mr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&ur(gr,r)||(gr=r,0<(r=Kr(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},_r={},Cr={};function Er(e){if(_r[e])return _r[e];if(!kr[e])return e;var t,n=kr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return _r[e]=n[t];return e}c&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);var Sr=Er("animationend"),Tr=Er("animationiteration"),Ir=Er("animationstart"),Nr=Er("transitionend"),Ar=new Map,jr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){Ar.set(e,t),u(t,[e])}for(var Pr=0;Pr<jr.length;Pr++){var Rr=jr[Pr];Or(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Or(Sr,"onAnimationEnd"),Or(Tr,"onAnimationIteration"),Or(Ir,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Nr,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focu
2sin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function Lr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,u,l){if(ze.apply(this,arguments),Fe){if(!Fe)throw Error(a(198));var c=Le;Fe=!1,Le=null,Me||(Me=!0,Ve=c)}}(r,t,void 0,e),e.currentTarget=null}function Mr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==a&&i.isPropagationStopped())break e;Lr(i,s,l),a=u}else for(o=0;o<r.length;o++){if(u=(s=r[o]).instance,l=s.currentTarget,s=s.listener,u!==a&&i.isPropagationStopped())break e;Lr(i,s,l),a=u}}}if(Me)throw e=Ve,Me=!1,Ve=null,e}function Vr(e,t){var n=t[vi];void 0===n&&(n=t[vi]=new Set);var r=e+"__bubble";n.has(r)||(Ur(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Ur(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function qr(e){if(!e[zr]){e[zr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Fr.has(t)||Br(t,!1,e),Br(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Br("selectionchange",!1,t))}}function Ur(e,t,n,r){switch($t(t)){case 1:var i=Wt;break;case 4:i=Kt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=gi(s)))return;if(5===(u=o.tag)||6===u){r=a=o;continue e}s=s.parentNode}}r=r.return}je((function(){var r=a,i=xe(n),o=[];e:{var s=Ar.get(e);if(void 0!==s){var u=cn,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":u=Tn;break;case"focusin":l="focus",u=mn;break;case"focusout":l="blur",u=mn;break;case"beforeblur":case"afterblur":u=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case Sr:case Tr:case Ir:u=yn;break;case Nr:u=An;break;case"scroll":u=hn;break;case"wheel":u=On;break;case"copy":case"cut":case"paste":u=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=In}var c=0!==(4&t),f=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Oe(p,h))&&c.push(Wr(p,v,d)))),f)break;p=p.return}0<c.length&&(s=new u(s,l,null,n,i),o.push({event:s,listeners:c}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(l=n.relatedTarget||n.fromElement)||!gi(l)&&!l[pi])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?gi(l):null)&&(l!==(f=qe(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=pn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=In,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:wi(u),d=null==l?s:wi(l),(s=new c(v,p+"leave",u,n,i)).target=f,s.relatedTarget=d,v=null,gi(i)===r&&((c=new c(h,p+"enter",l,n,i)).target=d,c.relatedTarget=f,v=c),f=v,u&&l)e:{for(h=l,p=0,d=c=u;d;d=Gr(d))p++;for(d=0,v=h;v;v=Gr(v))d++;for(;0<p-d;)c=Gr(c),p--;for(;0<d-p;)h=Gr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=Gr(c),h=Gr(h)}c=null}else c=null;null!==u&&Yr(o,s,u,c,!1),null!==l&&null!==f&&Yr(o,f,l,c,!0)}if("select"===(u=(s=r?wi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=$n;else if(Hn(s))if(Xn)m=or;else{m=ir;var y=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ar);
vendor: 88,985 bytes, line 2
2switch(m&&(m=m(e,r))?Wn(o,m,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=r?wi(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(mr=y,yr=r,gr=null);break;case"focusout":gr=yr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":wr(o,n,i)}var g;if(Rn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?Bn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Ln&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=en()):(Jt="value"in(Xt=i)?Xt.value:Xt.textContent,qn=!0)),0<(y=Kr(r,b)).length&&(b=new wn(b,e,null,n,i),o.push({event:b,listeners:y}),g?b.data=g:null!==(g=zn(n))&&(b.data=g))),(g=Fn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Vn=!0,Mn);case"textInput":return(e=t.data)===Mn&&Vn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Rn&&Bn(e,t)?(e=en(),Zt=Jt=Xt=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ln&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Kr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=g))}Mr(o,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Oe(e,n))&&r.unshift(Wr(e,a,i)),null!=(a=Oe(e,t))&&r.push(Wr(e,a,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,i?null!=(u=Oe(n,a))&&o.unshift(Wr(n,u,s)):i||null!=(u=Oe(n,a))&&o.push(Wr(n,u,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Qr=/\r\n?/g,$r=/\u0000|\uFFFD/g;function Xr(e){return("string"===typeof e?e:""+e).replace(Qr,"\n").replace($r,"")}function Jr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(a(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,ai="function"===typeof Promise?Promise:void 0,oi="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ai?function(e){return ai.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function ui(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void qt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);qt(t)}function li(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),hi="__reactFiber$"+fi,di="__reactProps$"+fi,pi="__reactContainer$"+fi,vi="__reactEvents$"+fi,mi="__reactListeners$"+fi,yi="__reactHandles$"+fi;function gi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[hi])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function xi(e){return e[di]||null}var ki=[],_i=-1;function Ci(e){return{current:e}}function Ei(e){0>_i||(e.current=ki[_i],ki[_i]=null,_i--)}function Si(e,t){_i++,ki[_i]=e.current,e.current=t}var Ti={},Ii=Ci(Ti),Ni=Ci(!1),Ai=Ti;function ji(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Oi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Pi(){Ei(Ni),Ei(Ii)}function Ri(e,t,n){if(Ii.current!==Ti)throw Error(a(168));Si(Ii,t),Si(Ni,n)}function Di(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,U(e)||"Unknown",i));return L({},n,r)}function Fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ai=Ii.current,Si(Ii,e),Si(Ni,Ni.current),!0}function Li(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Di(e,t,Ai),r.__reactInternalMemoizedMergedChildContext=e,Ei(Ni),Ei(Ii),Si(Ii,e)):Ei(Ni),Si(Ni,n)}var Mi=null,Vi=!1,Bi=!1;function zi(e){null===Mi?Mi=[e]:Mi.push(e)}function qi(){if(!Bi&&null!==Mi){Bi=!0;var e=0,t=bt;try{var n=Mi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Mi=null,Vi=!1}catch(i){throw null!==Mi&&(Mi=Mi.slice(e+1)),Ge(Ze,qi),i}finally{bt=t,Bi=!1}}return null}var Ui=[],Hi=0,Wi=null,Ki=0,Gi=[],Yi=0,Qi=null,$i=1,Xi="";function Ji(e,t){Ui[Hi++]=Ki,Ui[Hi++]=Wi,Wi=e,Ki=t}function Zi(e,t,n){Gi[Yi++]=$i,Gi[Yi++]=Xi,Gi[Yi++]=Qi,Qi=e;var r=$i;e=Xi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$i=1<<32-ot(t)+i|n<<i|r,Xi=a+e}else $i=1<<a|n<<i|r,Xi=e}function ea(e){null!==e.return&&(Ji(e,1),Zi(e,1,0))}function ta(e){for(;e===Wi;)Wi=Ui[--Hi],Ui[Hi]=null,Ki=Ui[--Hi],Ui[Hi]=null;for(;e===Qi;)Qi=Gi[--Yi],Gi[Yi]=null,Xi=Gi[--Yi],Gi[Yi]=null,$i=Gi[--Yi],Gi[Yi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=jl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=li(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Qi?{id:$i,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=jl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function ua(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function la(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(ua(e))throw Error(a(418));t=li(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(ua(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function fa(e){if(e!==na)return!1;if(!ia)return ca(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(ua(e))throw ha(),Error(a(418));for(;t;)oa(e,t),t=li(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=li(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?li(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ra;e;)e=li(e.nextSibling)}function da(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var va=w.ReactCurrentBatchConfig;function ma(e,t){if(e&&e.defaultProps){for(var n in t=L({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ya=Ci(null),ga=null,ba=null,wa=null;function xa(){wa=ba=ga=null}function ka(e){var t=ya.current;Ei(ya),e._currentValue=t}function _a(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ca(e,t){ga=e,wa=ba=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ws=!0),e.firstContext=null)}function Ea(e){var t=e._currentValue;if(wa!==e)if(e={context:e,memoizedValue:t,next:null},null===ba){if(null===ga)throw Error(a(308));ba=e,ga.dependencies={lanes:0,firstContext:e}}else ba=ba.next=e;return t}var Sa=null;function Ta(e){null===Sa?Sa=[e]:Sa.push(e)}function Ia(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ta(t)):(n.next=i.next,i.next=n),t.interleaved=n,Na(e,r)}function Na(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Oa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Iu)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Na(e,n)}return null===(i=r.interleaved)?(t.next=t,Ta(r)):(t.next=i.next,i.next=t),r.interleaved=t,Na(e,n)}function Da(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}function Fa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function La(e,t,n,r){var i=e.updateQueue;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,l=u.next;u.next=null,null===o?a=l:o.next=l,o=u;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===s?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(null!==a){var f=i.baseState;for(o=0,c=l=u=null,s=a;;){var h=s.lane,d=s.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;switch(h=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=v.payload)?p.call(d,f,h):p)||void 0===h)break e;f=L({},f,h);break e;case 2:Aa=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(l=c=d,u=f):c=c.next=d,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Fu|=o,e.lanes=o,e.memoizedState=f}}function Ma(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var Va=(new r.Component).refs;function Ba(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:L({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var za={isMounted:function(e){return!!(e=e._reactInternals)&&qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=el(),i=tl(e),a=Pa(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Ra(e,a,i))&&(nl(t,e,i,r),Da(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=el(),i=tl(e),a=Pa(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Ra(e,a,i))&&(nl(t,e,i,r),Da(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=el(),r=tl(e),i=Pa(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Ra(e,i,r))&&(nl(t,e,r,n),Da(t,e,r))}};function qa(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(i,a))}function Ua(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"===typeof a&&null!==a?a=Ea(a):(i=Oi(t)?Ai:Ii.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?ji(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=za,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&za.enqueueReplaceState(t,t.state,null)}function Wa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Va,ja(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Ea(a):(a=Oi(t)?Ai:Ii.current,i.context=ji(e,a)),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(Ba(e,t,a,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&za.enqueueReplaceState(i,i.state,null),La(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Ka(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Va&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ga(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ya(e){return(0,e._init)(e._payload)}function Qa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Pl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ll(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===O&&Ya(a)===t.type)?((r=i(t,n.props)).ref=Ka(e,t,n),r.return=e,r):((r=Rl(n.type,n.key,n.props,null,e.mode,r)).ref=Ka(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ml(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=Dl(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Ll(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Rl(t.type,t.key,t.props,null,e.mode,n)).ref=Ka(e,null,t),n.return=e,n;case k:return(t=Ml(t,e.mode,n)).return=e,t;case O:return h(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Dl(t,e.mode,n,null)).return=e,t;Ga(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?l(e,t,n,r):null;case k:return n.key===i?c(e,t,n,r):null;case O:return d(e,t,(i=n._init)(n._payload),r)}if(te(n)||D(n))return null!==i?null:f(e,t,n,r,null);Ga(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case O:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||D(r))return f(t,e=e.get(n)||null,r,i,null);Ga(t,r)}return null}function v(i,a,s,u){for(var l=null,c=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=d(i,f,s[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(i,f),a=o(y,a,v),null===c?l=y:c.sibling=y,c=y,f=m}if(v===s.length)return n(i,f),ia&&Ji(i,v),l;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(a=o(f,a,v),null===c?l=f:c.sibling=f,c=f);return ia&&Ji(i,v),l}for(f=r(i,f);v<s.length;v++)null!==(m=p(f,i,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=o(m,a,v),null===c?l=m:c.sibling=m,c=m);return e&&f.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),l}function m(i,s,u,l){var c=D(u);if("function"!==typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=d(i,v,g.value,l);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v),s=o(b,s,m),null===f?c=b:f.sibling=b,f=b,v=y}if(g.done)return n(i,v),ia&&Ji(i,m),c;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=h(i,g.value,l))&&(s=o(g,s,m),null===f?c=g:f.sibling=g,f=g);return ia&&Ji(i,m),c}for(v=r(i,v);!g.done;m++,g=u.next())null!==(g=p(v,i,m,g.value,l))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=o(g,s,m),null===f?c=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),ia&&Ji(i,m),c}return function e(r,a,o,u){if("object"===typeof o&&null!==o&&o.type===_&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case x:e:{for(var l=o.key,c=a;null!==c;){if(c.key===l){if((l=o.type)===_){if(7===c.tag){n(r,c.sibling),(a=i(c,o.props.children)).return=r,r=a;break e}}else if(c.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===O&&Ya(l)===c.type){n(r,c.sibling),(a=i(c,o.props)).ref=Ka(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===_?((a=Dl(o.props.children,r.mode,u,o.key)).return=r,r=a):((u=Rl(o.type,o.key,o.props,null,r.mode,u)).ref=Ka(r,a,o),u.return=r,r=u)}return s(r);case k:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Ml(o,r.mode,u)).return=r,r=a}return s(r);case O:return e(r,a,(c=o._init)(o._payload),u)}if(te(o))return v(r,a,o,u);if(D(o))return m(r,a,o,u);Ga(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Ll(o,r.mode,u)).return=r,r=a),s(r)):n(r,a)}}var $a=Qa(!0),Xa=Qa(!1),Ja={},Za=Ci(Ja),eo=Ci(Ja),to=Ci(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function ro(e,t){switch(Si(to,t),Si(eo,e),Si(Za,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ei(Za),Si(Za,t)}function io(){Ei(Za),Ei(eo),Ei(to)}function ao(e){no(to.current);var t=no(Za.current),n=ue(t,e.type);t!==n&&(Si(eo,e),Si(Za,n))}function oo(e){eo.current===e&&(Ei(Za),Ei(eo))}var so=Ci(0);function uo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=[];function co(){for(var e=0;e<lo.length;e++)lo[e]._workInProgressVersionPrimary=null;lo.length=0}var fo=w.ReactCurrentDispatcher,ho=w.ReactCurrentBatchConfig,po=0,vo=null,mo=null,yo=null,go=!1,bo=!1,wo=0,xo=0;function ko(){throw Error(a(321))}function _o(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,o){if(po=o,vo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fo.current=null===e||null===e.memoizedState?ss:us,e=n(r,i),bo){o=0;do{if(bo=!1,wo=0,25<=o)throw Error(a(301));o+=1,yo=mo=null,t.updateQueue=null,fo.current=ls,e=n(r,i)}while(bo)}if(fo.current=os,t=null!==mo&&null!==mo.next,po=0,yo=mo=vo=null,go=!1,t)throw Error(a(300));return e}function Eo(){var e=0!==wo;return wo=0,e}function So(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===yo?vo.memoizedState=yo=e:yo=yo.next=e,yo}function To(){if(null===mo){var e=vo.alternate;e=null!==e?e.memoizedState:null}else e=mo.next;var t=null===yo?vo.memoizedState:yo.next;if(null!==t)yo=t,mo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(mo=e).memoizedState,baseState:mo.baseState,baseQueue:mo.baseQueue,queue:mo.queue,next:null},null===yo?vo.memoizedState=yo=e:yo=yo.next=e}return yo}function Io(e,t){return"function"===typeof t?t(e):t}function No(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=mo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var u=s=null,l=null,c=o;do{var f=c.lane;if((po&f)===f)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(u=l=h,s=r):l=l.next=h,vo.lanes|=f,Fu|=f}c=c.next}while(null!==c&&c!==o);null===l?s=r:l.next=u,sr(r,t.memoizedState)||(ws=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,vo.lanes|=o,Fu|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ao(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(ws=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function jo(){}function Oo(e,t){var n=vo,r=To(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,ws=!0),r=r.queue,Ho(Do.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==yo&&1&yo.memoizedState.tag){if(n.flags|=2048,Vo(9,Ro.bind(null,n,r,i,t),void 0,null),null===Nu)throw Error(a(349));0!==(30&po)||Po(n,t,i)}return i}function Po(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=vo.updateQueue)?(t={lastEffect:null,stores:null},vo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Fo(t)&&Lo(e)}function Do(e,t,n){return n((function(){Fo(t)&&Lo(e)}))}function Fo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Lo(e){var t=Na(e,1);null!==t&&nl(t,e,1,-1)}function Mo(e){var t=So();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,vo,e),[t.memoizedState,e]}function Vo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=vo.updateQueue)?(t={lastEffect:null,stores:null},vo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bo(){return To().memoizedState}function zo(e,t,n,r){var i=So();vo.flags|=e,i.memoizedState=Vo(1|t,n,void 0,void 0===r?null:r)}function qo(e,t,n,r){var i=To();r=void 0===r?null:r;var a=void 0;if(null!==mo){var o=mo.memoizedState;if(a=o.destroy,null!==r&&_o(r,o.deps))return void(i.memoizedState=Vo(t,n,a,r))}vo.flags|=e,i.memoizedState=Vo(1|t,n,a,r)}function Uo(e,t){return zo(8390656,8,e,t)}function Ho(e,t){return qo(2048,8,e,t)}function Wo(e,t){return qo(4,2,e,t)}function Ko(e,t){return qo(4,4,e,t)}function Go(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Yo(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,qo(4,4,Go.bind(null,t,e),n)}function Qo(){}function $o(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_o(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Jo(e,t,n){return 0===(21&po)?(e.baseState&&(e.baseState=!1,ws=!0),e.memoizedState=n):(sr(n,t)||(n=vt(),vo.lanes|=n,Fu|=n,e.baseState=!0),t)}function Zo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{bt=n,ho.transition=r}}function es(){return To().memoizedState}function ts(e,t,n){var r=tl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))is(t,n);else if(null!==(n=Ia(e,t,n,r))){nl(n,e,r,el()),as(n,t,r)}}function ns(e,t,n){var r=tl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var u=t.interleaved;return null===u?(i.next=i,Ta(t)):(i.next=u.next,u.next=i),void(t.interleaved=i)}}catch(l){}null!==(n=Ia(e,t,i,r))&&(nl(n,e,r,i=el()),as(n,t,r))}}function rs(e){var t=e.alternate;return e===vo||null!==t&&t===vo}function is(e,t){bo=go=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}var os={readContext:Ea,useCallback:ko,useContext:ko,useEffect:ko,useImperativeHandle:ko,useInsertionEffect:ko,useLayoutEffect:ko,useMemo:ko,useReducer:ko,useRef:ko,useState:ko,useDebugValue:ko,useDeferredValue:ko,useTransition:ko,useMutableSource:ko,useSyncExternalStore:ko,useId:ko,unstable_isNewReconciler:!1},ss={readContext:Ea,useCallback:function(e,t){return So().memoizedState=[e,void 0===t?null:t],e},useContext:Ea,useEffect:Uo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4194308,4,Go.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return zo(4,2,e,t)},useMemo:function(e,t){var n=So();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=So();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,vo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},So().memoizedState=e},useState:Mo,useDebugValue:Qo,useDeferredValue:function(e){return So().memoizedState=e},useTransition:function(){var e=Mo(!1),t=e[0];return e=Zo.bind(null,e[1]),So().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=vo,i=So();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Nu)throw Error(a(349));0!==(30&po)||Po(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Uo(Do.bind(null,r,o,e),[e]),r.flags|=2048,Vo(9,Ro.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=So(),t=Nu.identifierPrefix;if(ia){var n=Xi;t=":"+t+"R"+(n=($i&~(1<<32-ot($i)-1)).toString(32)+n),0<(n=wo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=xo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},us={readContext:Ea,useCallback:$o,useContext:Ea,useEffect:Ho,useImperativeHandle:Yo,useInsertionEffect:Wo,useLayoutEffect:Ko,useMemo:Xo,useReducer:No,useRef:Bo,useState:function(){return No(Io)},useDebugValue:Qo,useDeferredValue:function(e){return Jo(To(),mo.memoizedState,e)},useTransition:function(){return[No(Io)[0],To().memoizedState]},useMutableSource:jo,useSyncExternalStore:Oo,useId:es,unstable_isNewReconciler:!1},ls={readContext:Ea,useCallback:$o,useContext:Ea,useEffect:Ho,useImperativeHandle:Yo,useInsertionEffect:Wo,useLayoutEffect:Ko,useMemo:Xo,useReducer:Ao,useRef:Bo,useState:function(){return Ao(Io)},useDebugValue:Qo,useDeferredValue:function(e){var t=To();return null===mo?t.memoizedState=e:Jo(t,mo.memoizedState,e)},useTransition:function(){return[Ao(Io)[0],To().memoizedState]},useMutableSource:jo,useSyncExternalStore:Oo,useId:es,unstable_isNewReconciler:!1};function cs(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function fs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Pa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hu||(Hu=!0,Wu=r),hs(0,t)},n}function vs(e,t,n){(n=Pa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hs(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Ku?Ku=new Set([this]):Ku.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ds;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=El.bind(null,e,t,n),t.then(e,e))}function ys(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function gs(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Pa(-1,1)).tag=2,Ra(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bs=w.ReactCurrentOwner,ws=!1;function xs(e,t,n,r){t.child=null===e?Xa(t,null,n,r):$a(t,e.child,n,r)}function ks(e,t,n,r,i){n=n.render;var a=t.ref;return Ca(t,i),r=Co(e,t,n,r,a,i),n=Eo(),null===e||ws?(ia&&n&&ea(t),t.flags|=1,xs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hs(e,t,i))}function _s(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Ol(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Rl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Cs(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(o,r)&&e.ref===t.ref)return Hs(e,t,i)}return t.flags|=1,(e=Pl(a,r)).ref=t.ref,e.return=t,t.child=e}function Cs(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(ur(a,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Hs(e,t,i);0!==(131072&e.flags)&&(ws=!0)}}return Ts(e,t,n,r,i)}function Es(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Si(Pu,Ou),Ou|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Si(Pu,Ou),Ou|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Si(Pu,Ou),Ou|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Si(Pu,Ou),Ou|=r;return xs(e,t,i,n),t.child}function Ss(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,r,i){var a=Oi(n)?Ai:Ii.current;return a=ji(t,a),Ca(t,i),n=Co(e,t,n,r,a,i),r=Eo(),null===e||ws?(ia&&r&&ea(t),t.flags|=1,xs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hs(e,t,i))}function Is(e,t,n,r,i){if(Oi(n)){var a=!0;Fi(t)}else a=!1;if(Ca(t,i),null===t.stateNode)Us(e,t),Ua(t,n,r),Wa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,l=n.contextType;"object"===typeof l&&null!==l?l=Ea(l):l=ji(t,l=Oi(n)?Ai:Ii.current);var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||u!==l)&&Ha(t,o,r,l),Aa=!1;var h=t.memoizedState;o.state=h,La(t,r,o,i),u=t.memoizedState,s!==r||h!==u||Ni.current||Aa?("function"===typeof c&&(Ba(t,n,c,r),u=t.memoizedState),(s=Aa||qa(t,n,s,r,h,u,l))?(f||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=l,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Oa(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:ma(t.type,s),o.props=l,f=t.pendingProps,h=o.context,"object"===typeof(u=n.contextType)&&null!==u?u=Ea(u):u=ji(t,u=Oi(n)?Ai:Ii.current);var d=n.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==f||h!==u)&&Ha(t,o,r,u),Aa=!1,h=t.memoizedState,o.state=h,La(t,r,o,i);var p=t.memoizedState;s!==f||h!==p||Ni.current||Aa?("function"===typeof d&&(Ba(t,n,d,r),p=t.memoizedState),(l=Aa||qa(t,n,l,r,h,p,u)||!1)?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=u,r=l):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ns(e,t,n,r,a,i)}function Ns(e,t,n,r,i,a){Ss(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Li(t,n,!1),Hs(e,t,a);r=t.stateNode,bs.current=t;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=$a(t,e.child,null,a),t.child=$a(t,null,s,a)):xs(e,t,s,a),t.memoizedState=r.state,i&&Li(t,n,!0),t.child}function As(e){var t=e.stateNode;t.pendingContext?Ri(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ri(0,t.context,!1),ro(e,t.containerInfo)}function js(e,t,n,r,i){return da(),pa(i),t.flags|=256,xs(e,t,n,r),t.child}var Os,Ps,Rs,Ds={dehydrated:null,treeContext:null,retryLane:0};function Fs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ls(e,t,n){var r,i=t.pendingProps,o=so.current,s=!1,u=0!==(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Si(so,1&o),null===e)return la(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=i.children,e=i.fallback,s?(i=t.mode,s=t.child,u={mode:"hidden",children:u},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Fl(u,i,0,null),e=Dl(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Fs(n),t.memoizedState=Ds,e):Ms(t,u));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Vs(e,t,s,r=fs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Fl({mode:"visible",children:r.children},i,0,null),(o=Dl(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&$a(t,e.child,null,s),t.child.memoizedState=Fs(s),t.memoizedState=Ds,o);if(0===(1&t.mode))return Vs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var u=r.dgst;return r=u,Vs(e,t,s,r=fs(o=Error(a(419)),r,void 0))}if(u=0!==(s&e.childLanes),ws||u){if(null!==(r=Nu)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Na(e,i),nl(r,e,i,-1))}return vl(),Vs(e,t,s,r=fs(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tl.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=li(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Gi[Yi++]=$i,Gi[Yi++]=Xi,Gi[Yi++]=Qi,$i=e.id,Xi=e.overflow,Qi=t),(t=Ms(t,r.children)).flags|=4096,t)}(e,t,u,i,r,o,n);if(s){s=i.fallback,u=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&u)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=Pl(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Pl(r,s):(s=Dl(s,u,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,u=null===(u=e.child.memoizedState)?Fs(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=e.childLanes&~n,t.memoizedState=Ds,i}return e=(s=e.child).sibling,i=Pl(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ms(e,t){return(t=Fl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Vs(e,t,n,r){return null!==r&&pa(r),$a(t,e.child,null,n),(e=Ms(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),_a(e.return,t,n)}function zs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function qs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(xs(e,t,r.children,n),0!==(2&(r=so.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Si(so,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===uo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===uo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zs(t,!0,n,null,a);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Us(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fu|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Pl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Pl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ws(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ks(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gs(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ks(t),null;case 1:case 17:return Oi(t.type)&&Pi(),Ks(t),null;case 3:return r=t.stateNode,io(),Ei(Ni),Ei(Ii),co(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(ol(aa),aa=null))),Ks(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ps(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Ks(t),null}if(e=no(Za.current),fa(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hi]=t,r[di]=o,e=0!==(1&t.mode),n){case"dialog":Vr("cancel",r),Vr("close",r);break;case"iframe":case"object":case"embed":Vr("load",r);break;case"video":case"audio":for(i=0;i<Dr.length;i++)Vr(Dr[i],r);break;case"source":Vr("error",r);break;case"img":case"image":case"link":Vr("error",r),Vr("load",r);break;case"details":Vr("toggle",r);break;case"input":$(r,o),Vr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Vr("invalid",r);break;case"textarea":ie(r,o),Vr("invalid",r)}for(var u in ge(n,o),i=null,o)if(o.hasOwnProperty(u)){var l=o[u];"children"===u?"string"===typeof l?r.textContent!==l&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,l,e),i=["children",l]):"number"===typeof l&&r.textContent!==""+l&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,l,e),i=["children",""+l]):s.hasOwnProperty(u)&&null!=l&&"onScroll"===u&&Vr("scroll",r)}switch(n){case"input":K(r),Z(r,o,!0);break;case"textarea":K(r),oe(r);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{u=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[hi]=t,e[di]=r,Os(e,t),t.stateNode=e;e:{switch(u=be(n,r),n){case"dialog":Vr("cancel",e),Vr("close",e),i=r;break;case"iframe":case"object":case"embed":Vr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Dr.length;i++)Vr(Dr[i],e);i=r;break;case"source":Vr("error",e),i=r;break;case"img":case"image":case"link":Vr("error",e),Vr("load",e),i=r;break;case"details":Vr("toggle",e),i=r;break;case"input":$(e,r),i=Q(e,r),Vr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=L({},r,{value:void 0}),Vr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Vr("invalid",e)}for(o in ge(n,i),l=i)if(l.hasOwnProperty(o)){var c=l[o];"style"===o?me(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===o?"string"===typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"===typeof c&&he(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=c&&"onScroll"===o&&Vr("scroll",e):null!=c&&b(e,o,c,u))}switch(n){case"input":K(e),Z(e,r,!1);break;case"textarea":K(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ks(t),null;case 6:if(e&&null!=t.stateNode)Rs(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Za.current),fa(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Ks(t),null;case 13:if(Ei(so),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!==(1&t.mode)&&0===(128&t.flags))ha(),da(),t.flags|=98560,o=!1;else if(o=fa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[hi]=t}else da(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ks(t),o=!1}else null!==aa&&(ol(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&so.current)?0===Ru&&(Ru=3):vl())),null!==t.updateQueue&&(t.flags|=4),Ks(t),null);case 4:return io(),null===e&&qr(t.stateNode.containerInfo),Ks(t),null;case 10:return ka(t.type._context),Ks(t),null;case 19:if(Ei(so),null===(o=t.memoizedState))return Ks(t),null;if(r=0!==(128&t.flags),null===(u=o.rendering))if(r)Ws(o,!1);else{if(0!==Ru||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(u=uo(e))){for(t.flags|=128,Ws(o,!1),null!==(r=u.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(u=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,e=u.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Si(so,1&so.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>qu&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=uo(u))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ws(o,!0),null===o.tail&&"hidden"===o.tailMode&&!u.alternate&&!ia)return Ks(t),null}else 2*Xe()-o.renderingStartTime>qu&&1073741824!==n&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=o.last)?n.sibling=u:t.child=u,o.last=u)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=so.current,Si(so,r?1&n|2:1&n),t):(Ks(t),null);case 22:case 23:return fl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ou)&&(Ks(t),6&t.subtreeFlags&&(t.flags|=8192)):Ks(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ys(e,t){switch(ta(t),t.tag){case 1:return Oi(t.type)&&Pi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Ei(Ni),Ei(Ii),co(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Ei(so),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));da()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ei(so),null;case 4:return io(),null;case 10:return ka(t.type._context),null;case 22:case 23:return fl(),null;default:return null}}Os=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Za.current);var a,o=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),o=[];break;case"select":i=L({},i,{value:void 0}),r=L({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(c in ge(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var u=i[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(u=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==u&&(null!=l||null!=u))if("style"===c)if(u){for(a in u)!u.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&u[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(o=o||[]).push(c,l)):"children"===c?"string"!==typeof l&&"number"!==typeof l||(o=o||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Vr("scroll",e),o||u===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},Rs=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qs=!1,$s=!1,Xs="function"===typeof WeakSet?WeakSet:Set,Js=null;function Zs(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cl(e,t,r)}else n.current=null}function eu(e,t,n){try{n()}catch(r){Cl(e,t,r)}}var tu=!1;function nu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&eu(t,n,a)}i=i.next}while(i!==r)}}function ru(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function iu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function au(e){var t=e.alternate;null!==t&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[di],delete t[vi],delete t[mi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ou(e){return 5===e.tag||3===e.tag||4===e.tag}function su(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ou(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function uu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(uu(e,t,n),e=e.sibling;null!==e;)uu(e,t,n),e=e.sibling}function lu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(lu(e,t,n),e=e.sibling;null!==e;)lu(e,t,n),e=e.sibling}var cu=null,fu=!1;function hu(e,t,n){for(n=n.child;null!==n;)du(e,t,n),n=n.sibling}function du(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:$s||Zs(n,t);case 6:var r=cu,i=fu;cu=null,hu(e,t,n),fu=i,null!==(cu=r)&&(fu?(e=cu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cu.removeChild(n.stateNode));break;case 18:null!==cu&&(fu?(e=cu,n=n.stateNode,8===e.nodeType?ui(e.parentNode,n):1===e.nodeType&&ui(e,n),qt(e)):ui(cu,n.stateNode));break;case 4:r=cu,i=fu,cu=n.stateNode.containerInfo,fu=!0,hu(e,t,n),cu=r,fu=i;break;case 0:case 11:case 14:case 15:if(!$s&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&eu(n,t,o),i=i.next}while(i!==r)}hu(e,t,n);break;case 1:if(!$s&&(Zs(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Cl(n,t,s)}hu(e,t,n);break;case 21:hu(e,t,n);break;case 22:1&n.mode?($s=(r=$s)||null!==n.memoizedState,hu(e,t,n),$s=r):hu(e,t,n);break;default:hu(e,t,n)}}function pu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach((function(t){var r=Il.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 5:cu=u.stateNode,fu=!1;break e;case 3:case 4:cu=u.stateNode.containerInfo,fu=!0;break e}u=u.return}if(null===cu)throw Error(a(160));du(o,s,i),cu=null,fu=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(c){Cl(i,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)mu(t,e),t=t.sibling}function mu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vu(t,e),yu(e),4&r){try{nu(3,e,e.return),ru(3,e)}catch(m){Cl(e,e.return,m)}try{nu(5,e,e.return)}catch(m){Cl(e,e.return,m)}}break;case 1:vu(t,e),yu(e),512&r&&null!==n&&Zs(n,n.return);break;case 5:if(vu(t,e),yu(e),512&r&&null!==n&&Zs(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(m){Cl(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,u=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===u&&"radio"===o.type&&null!=o.name&&X(i,o),be(u,s);var c=be(u,o);for(s=0;s<l.length;s+=2){var f=l[s],h=l[s+1];"style"===f?me(i,h):"dangerouslySetInnerHTML"===f?fe(i,h):"children"===f?he(i,h):b(i,f,h,c)}switch(u){case"input":J(i,o);break;case"textarea":ae(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?ne(i,!!o.multiple,p,!1):d!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[di]=o}catch(m){Cl(e,e.return,m)}}break;case 6:if(vu(t,e),yu(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Cl(e,e.return,m)}}break;case 3:if(vu(t,e),yu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{qt(t.containerInfo)}catch(m){Cl(e,e.return,m)}break;case 4:default:vu(t,e),yu(e);break;case 13:vu(t,e),yu(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(zu=Xe())),4&r&&pu(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?($s=(c=$s)||f,vu(t,e),$s=c):vu(t,e),yu(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&0!==(1&e.mode))for(Js=e,f=e.child;null!==f;){for(h=Js=f;null!==Js;){switch(p=(d=Js).child,d.tag){case 0:case 11:case 14:case 15:nu(4,d,d.return);break;case 1:Zs(d,d.return);var v=d.stateNode;if("function"===typeof v.componentWillUnmount){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){Cl(r,n,m)}}break;case 5:Zs(d,d.return);break;case 22:if(null!==d.memoizedState){xu(h);continue}}null!==p?(p.return=d,Js=p):xu(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,c?"function"===typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(u=h.stateNode,s=void 0!==(l=h.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,u.style.display=ve("display",s))}catch(m){Cl(e,e.return,m)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(m){Cl(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:vu(t,e),yu(e),4&r&&pu(e);case 21:}}function yu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ou(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),lu(e,su(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;uu(e,su(e),o);break;default:throw Error(a(161))}}catch(s){Cl(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gu(e,t,n){Js=e,bu(e,t,n)}function bu(e,t,n){for(var r=0!==(1&e.mode);null!==Js;){var i=Js,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Qs;if(!o){var s=i.alternate,u=null!==s&&null!==s.memoizedState||$s;s=Qs;var l=$s;if(Qs=o,($s=u)&&!l)for(Js=i;null!==Js;)u=(o=Js).child,22===o.tag&&null!==o.memoizedState?ku(i):null!==u?(u.return=o,Js=u):ku(i);for(;null!==a;)Js=a,bu(a,t,n),a=a.sibling;Js=i,Qs=s,$s=l}wu(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,Js=a):wu(e)}}function wu(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:$s||ru(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!$s)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ma(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ma(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ma(t,s,n)}break;case 5:var u=t.stateNode;if(null===n&&4&t.flags){n=u;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&qt(h)}}}break;default:throw Error(a(163))}$s||512&t.flags&&iu(t)}catch(d){Cl(t,t.return,d)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function xu(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function ku(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ru(4,t)}catch(u){Cl(t,n,u)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(u){Cl(t,i,u)}}var a=t.return;try{iu(t)}catch(u){Cl(t,a,u)}break;case 5:var o=t.return;try{iu(t)}catch(u){Cl(t,o,u)}}}catch(u){Cl(t,t.return,u)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var _u,Cu=Math.ceil,Eu=w.ReactCurrentDispatcher,Su=w.ReactCurrentOwner,Tu=w.ReactCurrentBatchConfig,Iu=0,Nu=null,Au=null,ju=0,Ou=0,Pu=Ci(0),Ru=0,Du=null,Fu=0,Lu=0,Mu=0,Vu=null,Bu=null,zu=0,qu=1/0,Uu=null,Hu=!1,Wu=null,Ku=null,Gu=!1,Yu=null,Qu=0,$u=0,Xu=null,Ju=-1,Zu=0;function el(){return 0!==(6&Iu)?Xe():-1!==Ju?Ju:Ju=Xe()}function tl(e){return 0===(1&e.mode)?1:0!==(2&Iu)&&0!==ju?ju&-ju:null!==va.transition?(0===Zu&&(Zu=vt()),Zu):0!==(e=bt)?e:e=void 0===(e=window.event)?16:$t(e.type)}function nl(e,t,n,r){if(50<$u)throw $u=0,Xu=null,Error(a(185));yt(e,n,r),0!==(2&Iu)&&e===Nu||(e===Nu&&(0===(2&Iu)&&(Lu|=n),4===Ru&&sl(e,ju)),rl(e,r),1===n&&0===Iu&&0===(1&t.mode)&&(qu=Xe()+500,Vi&&qi()))}function rl(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,u=i[o];-1===u?0!==(s&n)&&0===(s&r)||(i[o]=dt(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ht(e,e===Nu?ju:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Vi=!0,zi(e)}(ul.bind(null,e)):zi(ul.bind(null,e)),oi((function(){0===(6&Iu)&&qi()})),n=null;else{switch(wt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Nl(n,il.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function il(e,t){if(Ju=-1,Zu=0,0!==(6&Iu))throw Error(a(327));var n=e.callbackNode;if(kl()&&e.callbackNode!==n)return null;var r=ht(e,e===Nu?ju:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=ml(e,r);else{t=r;var i=Iu;Iu|=2;var o=pl();for(Nu===e&&ju===t||(Uu=null,qu=Xe()+500,hl(e,t));;)try{gl();break}catch(u){dl(e,u)}xa(),Eu.current=o,Iu=i,null!==Au?t=0:(Nu=null,ju=0,t=Ru)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=al(e,i))),1===t)throw n=Du,hl(e,0),sl(e,r),rl(e,Xe()),n;if(6===t)sl(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!sr(a(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=ml(e,r))&&(0!==(o=pt(e))&&(r=o,t=al(e,o))),1===t))throw n=Du,hl(e,0),sl(e,r),rl(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:xl(e,Bu,Uu);break;case 3:if(sl(e,r),(130023424&r)===r&&10<(t=zu+500-Xe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){el(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(xl.bind(null,e,Bu,Uu),t);break}xl(e,Bu,Uu);break;case 4:if(sl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cu(r/1960))-r)){e.timeoutHandle=ri(xl.bind(null,e,Bu,Uu),r);break}xl(e,Bu,Uu);break;default:throw Error(a(329))}}}return rl(e,Xe()),e.callbackNode===n?il.bind(null,e):null}function al(e,t){var n=Vu;return e.current.memoizedState.isDehydrated&&(hl(e,t).flags|=256),2!==(e=ml(e,t))&&(t=Bu,Bu=n,null!==t&&ol(t)),e}function ol(e){null===Bu?Bu=e:Bu.push.apply(Bu,e)}function sl(e,t){for(t&=~Mu,t&=~Lu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function ul(e){if(0!==(6&Iu))throw Error(a(327));kl();var t=ht(e,0);if(0===(1&t))return rl(e,Xe()),null;var n=ml(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=al(e,r))}if(1===n)throw n=Du,hl(e,0),sl(e,t),rl(e,Xe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xl(e,Bu,Uu),rl(e,Xe()),null}function ll(e,t){var n=Iu;Iu|=1;try{return e(t)}finally{0===(Iu=n)&&(qu=Xe()+500,Vi&&qi())}}function cl(e){null!==Yu&&0===Yu.tag&&0===(6&Iu)&&kl();var t=Iu;Iu|=1;var n=Tu.transition,r=bt;try{if(Tu.transition=null,bt=1,e)return e()}finally{bt=r,Tu.transition=n,0===(6&(Iu=t))&&qi()}}function fl(){Ou=Pu.current,Ei(Pu)}function hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Au)for(n=Au.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Pi();break;case 3:io(),Ei(Ni),Ei(Ii),co();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Ei(so);break;case 10:ka(r.type._context);break;case 22:case 23:fl()}n=n.return}if(Nu=e,Au=e=Pl(e.current,null),ju=Ou=t,Ru=0,Du=null,Mu=Lu=Fu=0,Bu=Vu=null,null!==Sa){for(t=0;t<Sa.length;t++)if(null!==(r=(n=Sa[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Sa=null}return e}function dl(e,t){for(;;){var n=Au;try{if(xa(),fo.current=os,go){for(var r=vo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}go=!1}if(po=0,yo=mo=vo=null,bo=!1,wo=0,Su.current=null,null===n||null===n.return){Ru=1,Du=t,Au=null;break}e:{var o=e,s=n.return,u=n,l=t;if(t=ju,u.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l,f=u,h=f.tag;if(0===(1&f.mode)&&(0===h||11===h||15===h)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=ys(s);if(null!==p){p.flags&=-257,gs(p,s,u,0,t),1&p.mode&&ms(o,c,t),l=c;var v=(t=p).updateQueue;if(null===v){var m=new Set;m.add(l),t.updateQueue=m}else v.add(l);break e}if(0===(1&t)){ms(o,c,t),vl();break e}l=Error(a(426))}else if(ia&&1&u.mode){var y=ys(s);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),gs(y,s,u,0,t),pa(cs(l,u));break e}}o=l=cs(l,u),4!==Ru&&(Ru=2),null===Vu?Vu=[o]:Vu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Fa(o,ps(0,l,t));break e;case 1:u=l;var g=o.type,b=o.stateNode;if(0===(128&o.flags)&&("function"===typeof g.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Ku||!Ku.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Fa(o,vs(o,u,t));break e}}o=o.return}while(null!==o)}wl(n)}catch(w){t=w,Au===n&&null!==n&&(Au=n=n.return);continue}break}}function pl(){var e=Eu.current;return Eu.current=os,null===e?os:e}function vl(){0!==Ru&&3!==Ru&&2!==Ru||(Ru=4),null===Nu||0===(268435455&Fu)&&0===(268435455&Lu)||sl(Nu,ju)}function ml(e,t){var n=Iu;Iu|=2;var r=pl();for(Nu===e&&ju===t||(Uu=null,hl(e,t));;)try{yl();break}catch(i){dl(e,i)}if(xa(),Iu=n,Eu.current=r,null!==Au)throw Error(a(261));return Nu=null,ju=0,Ru}function yl(){for(;null!==Au;)bl(Au)}function gl(){for(;null!==Au&&!Qe();)bl(Au)}function bl(e){var t=_u(e.alternate,e,Ou);e.memoizedProps=e.pendingProps,null===t?wl(e):Au=t,Su.current=null}function wl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Gs(n,t,Ou)))return void(Au=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Au=n);if(null===e)return Ru=6,void(Au=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Au=t);Au=t=e}while(null!==t);0===Ru&&(Ru=5)}function xl(e,t,n){var r=bt,i=Tu.transition;try{Tu.transition=null,bt=1,function(e,t,n,r){do{kl()}while(null!==Yu);if(0!==(6&Iu))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===Nu&&(Au=Nu=null,ju=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Gu||(Gu=!0,Nl(tt,(function(){return kl(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Tu.transition,Tu.transition=null;var s=bt;bt=1;var u=Iu;Iu|=4,Su.current=null,function(e,t){if(ei=Ht,dr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(x){n=null;break e}var s=0,u=-1,l=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(u=s+i),h!==o||0!==r&&3!==h.nodeType||(l=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++c===i&&(u=s),d===o&&++f===r&&(l=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===u||-1===l?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var v=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var m=v.memoizedProps,y=v.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:ma(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(a(163))}}catch(x){Cl(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}v=tu,tu=!1}(e,n),mu(n,e),pr(ti),Ht=!!ei,ti=ei=null,e.current=n,gu(n,e,i),$e(),Iu=u,bt=s,Tu.transition=o}else e.current=n;if(Gu&&(Gu=!1,Yu=e,Qu=i),0===(o=e.pendingLanes)&&(Ku=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rl(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Hu)throw Hu=!1,e=Wu,Wu=null,e;0!==(1&Qu)&&0!==e.tag&&kl(),0!==(1&(o=e.pendingLanes))?e===Xu?$u++:($u=0,Xu=e):$u=0,qi()}(e,t,n,r)}finally{Tu.transition=i,bt=r}return null}function kl(){if(null!==Yu){var e=wt(Qu),t=Tu.transition,n=bt;try{if(Tu.transition=null,bt=16>e?16:e,null===Yu)var r=!1;else{if(e=Yu,Yu=null,Qu=0,0!==(6&Iu))throw Error(a(331));var i=Iu;for(Iu|=4,Js=e.current;null!==Js;){var o=Js,s=o.child;if(0!==(16&Js.flags)){var u=o.deletions;if(null!==u){for(var l=0;l<u.length;l++){var c=u[l];for(Js=c;null!==Js;){var f=Js;switch(f.tag){case 0:case 11:case 15:nu(8,f,o)}var h=f.child;if(null!==h)h.return=f,Js=h;else for(;null!==Js;){var d=(f=Js).sibling,p=f.return;if(au(f),f===c){Js=null;break}if(null!==d){d.return=p,Js=d;break}Js=p}}}var v=o.alternate;if(null!==v){var m=v.child;if(null!==m){v.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Js=o}}if(0!==(2064&o.subtreeFlags)&&null!==s)s.return=o,Js=s;else e:for(;null!==Js;){if(0!==(2048&(o=Js).flags))switch(o.tag){case 0:case 11:case 15:nu(9,o,o.return)}var g=o.sibling;if(null!==g){g.return=o.return,Js=g;break e}Js=o.return}}var b=e.current;for(Js=b;null!==Js;){var w=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==w)w.return=s,Js=w;else e:for(s=b;null!==Js;){if(0!==(2048&(u=Js).flags))try{switch(u.tag){case 0:case 11:case 15:ru(9,u)}}catch(k){Cl(u,u.return,k)}if(u===s){Js=null;break e}var x=u.sibling;if(null!==x){x.return=u.return,Js=x;break e}Js=u.return}}if(Iu=i,qi(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(k){}r=!0}return r}finally{bt=n,Tu.transition=t}}return!1}function _l(e,t,n){e=Ra(e,t=ps(0,t=cs(n,t),1),1),t=el(),null!==e&&(yt(e,1,t),rl(e,t))}function Cl(e,t,n){if(3===e.tag)_l(e,e,n);else for(;null!==t;){if(3===t.tag){_l(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ku||!Ku.has(r))){t=Ra(t,e=vs(t,e=cs(n,e),1),1),e=el(),null!==t&&(yt(t,1,e),rl(t,e));break}}t=t.return}}function El(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=el(),e.pingedLanes|=e.suspendedLanes&n,Nu===e&&(ju&n)===n&&(4===Ru||3===Ru&&(130023424&ju)===ju&&500>Xe()-zu?hl(e,0):Mu|=n),rl(e,t)}function Sl(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=el();null!==(e=Na(e,t))&&(yt(e,t,n),rl(e,n))}function Tl(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Sl(e,n)}function Il(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Sl(e,n)}function Nl(e,t){return Ge(e,t)}function Al(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jl(e,t,n,r){return new Al(e,t,n,r)}function Ol(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pl(e,t){var n=e.alternate;return null===n?((n=jl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Rl(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Ol(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case _:return Dl(n.children,i,o,t);case C:s=8,i|=8;break;case E:return(e=jl(12,n,t,2|i)).elementType=E,e.lanes=o,e;case N:return(e=jl(13,n,t,i)).elementType=N,e.lanes=o,e;case A:return(e=jl(19,n,t,i)).elementType=A,e.lanes=o,e;case P:return Fl(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case S:s=10;break e;case T:s=9;break e;case I:s=11;break e;case j:s=14;break e;case O:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=jl(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Dl(e,t,n,r){return(e=jl(7,e,r,t)).lanes=n,e}function Fl(e,t,n,r){return(e=jl(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Ll(e,t,n){return(e=jl(6,e,null,t)).lanes=n,e}function Ml(e,t,n){return(t=jl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vl(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bl(e,t,n,r,i,a,o,s,u){return e=new Vl(e,t,n,s,u),1===t?(t=1,!0===a&&(t|=8)):t=0,a=jl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ja(a),e}function zl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ql(e){if(!e)return Ti;e:{if(qe(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Oi(n))return Di(e,n,t)}return t}function Ul(e,t,n,r,i,a,o,s,u){return(e=Bl(n,r,!0,e,0,a,0,s,u)).context=ql(null),n=e.current,(a=Pa(r=el(),i=tl(n))).callback=void 0!==t&&null!==t?t:null,Ra(n,a,i),e.current.lanes=i,yt(e,i,r),rl(e,r),e}function Hl(e,t,n,r){var i=t.current,a=el(),o=tl(i);return n=ql(n),null===t.context?t.context=n:t.pendingContext=n,(t=Pa(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ra(i,t,o))&&(nl(e,i,o,a),Da(e,i,o)),o}function Wl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gl(e,t){Kl(e,t),(e=e.alternate)&&Kl(e,t)}_u=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)ws=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ws=!1,function(e,t,n){switch(t.tag){case 3:As(t),da();break;case 5:ao(t);break;case 1:Oi(t.type)&&Fi(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Si(ya,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Si(so,1&so.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ls(e,t,n):(Si(so,1&so.current),null!==(e=Hs(e,t,n))?e.sibling:null);Si(so,1&so.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return qs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Si(so,so.current),r)break;return null;case 22:case 23:return t.lanes=0,Es(e,t,n)}return Hs(e,t,n)}(e,t,n);ws=0!==(131072&e.flags)}else ws=!1,ia&&0!==(1048576&t.flags)&&Zi(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Us(e,t),e=t.pendingProps;var i=ji(t,Ii.current);Ca(t,n),i=Co(null,t,r,e,i,n);var o=Eo();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oi(r)?(o=!0,Fi(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ja(t),i.updater=za,t.stateNode=i,i._reactInternals=t,Wa(t,r,e,n),t=Ns(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),xs(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Us(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Ol(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===j)return 14}return 2}(r),e=ma(r,e),i){case 0:t=Ts(null,t,r,e,n);break e;case 1:t=Is(null,t,r,e,n);break e;case 11:t=ks(null,t,r,e,n);break e;case 14:t=_s(null,t,r,ma(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 1:return r=t.type,i=t.pendingProps,Is(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 3:e:{if(As(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Oa(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=js(e,t,r,n,i=cs(Error(a(423)),t));break e}if(r!==i){t=js(e,t,r,n,i=cs(Error(a(424)),t));break e}for(ra=li(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(da(),r===i){t=Hs(e,t,n);break e}xs(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&la(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Ss(e,t),xs(e,t,s,n),t.child;case 6:return null===e&&la(t),null;case 13:return Ls(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=$a(t,null,r,n):xs(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ks(e,t,r,i=t.elementType===r?i:ma(r,i),n);case 7:return xs(e,t,t.pendingProps,n),t.child;case 8:case 12:return xs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Si(ya,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Ni.current){t=Hs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){s=o.child;for(var l=u.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Pa(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),_a(o.return,n,t),u.lanes|=n;break}l=l.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),_a(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}xs(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ca(t,n),r=r(i=Ea(i)),t.flags|=1,xs(e,t,r,n),t.child;case 14:return i=ma(r=t.type,t.pendingProps),_s(e,t,r,i=ma(r.type,i),n);case 15:return Cs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ma(r,i),Us(e,t),t.tag=1,Oi(r)?(e=!0,Fi(t)):e=!1,Ca(t,n),Ua(t,r,i),Wa(t,r,i,n),Ns(null,t,r,!0,e,n);case 19:return qs(e,t,n);case 22:return Es(e,t,n)}throw Error(a(156,t.tag))};var Yl="function"===typeof reportError?reportError:function(e){console.error(e)};function Ql(e){this._internalRoot=e}function $l(e){this._internalRoot=e}function Xl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zl(){}function ec(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"===typeof i){var s=i;i=function(){var e=Wl(o);s.call(e)}}Hl(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"===typeof r){var a=r;r=function(){var e=Wl(o);a.call(e)}}var o=Ul(t,r,e,0,null,!1,0,"",Zl);return e._reactRootContainer=o,e[pi]=o.current,qr(8===e.nodeType?e.parentNode:e),cl(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=Wl(u);s.call(e)}}var u=Bl(e,0,!1,null,0,!1,0,"",Zl);return e._reactRootContainer=u,e[pi]=u.current,qr(8===e.nodeType?e.parentNode:e),cl((function(){Hl(t,u,n,r)})),u}(n,t,e,i,r);return Wl(o)}$l.prototype.render=Ql.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hl(e,t,null,null)},$l.prototype.unmount=Ql.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cl((function(){Hl(null,e,null,null)})),t[pi]=null}},$l.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&Lt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(gt(t,1|n),rl(t,Xe()),0===(6&Iu)&&(qu=Xe()+500,qi()))}break;case 13:cl((function(){var t=Na(e,1);if(null!==t){var n=el();nl(t,e,1,n)}})),Gl(e,1)}},kt=function(e){if(13===e.tag){var t=Na(e,134217728);if(null!==t)nl(t,e,134217728,el());Gl(e,134217728)}},_t=function(e){if(13===e.tag){var t=tl(e),n=Na(e,t);if(null!==n)nl(n,e,t,el());Gl(e,t)}},Ct=function(){return bt},Et=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},ke=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xi(r);if(!i)throw Error(a(90));G(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ie=ll,Ne=cl;var tc={usingClientEntryPoint:!1,Events:[bi,wi,xi,Se,Te,ll]},nc={findFiberByHostInstance:gi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{it=ic.inject(rc),at=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xl(t))throw Error(a(200));return zl(e,t,null,n)},t.createRoot=function(e,t){if(!Xl(e))throw Error(a(299));var n=!1,r="",i=Yl;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bl(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,qr(8===e.nodeType?e.parentNode:e),new Ql(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return cl(e)},t.hydrate=function(e,t,n){if(!Jl(t))throw Error(a(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xl(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Yl;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Ul(t,null,e,1,null!=n?n:null,i,0,o,s),e[pi]=t.current,qr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $l(t)},t.render=function(e,t,n){if(!Jl(t))throw Error(a(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(a(40));return!!e._reactRootContainer&&(cl((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=ll,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jl(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},1250:function(e,t,n){"use strict";var r=n(4164);t.s=r.createRoot,r.hydrateRoot},4164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4463)},77:function(e){var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,i="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,o){if(e===o)return!0;
2if(e&&o&&"object"==typeof e&&"object"==typeof o){if(e.constructor!==o.constructor)return!1;var s,u,l,c;if(Array.isArray(e)){if((s=e.length)!=o.length)return!1;for(u=s;0!==u--;)if(!a(e[u],o[u]))return!1;return!0}if(n&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!o.has(u.value[0]))return!1;for(c=e.entries();!(u=c.next()).done;)if(!a(u.value[1],o.get(u.value[0])))return!1;return!0}if(r&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!o.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if((s=e.length)!=o.length)return!1;for(u=s;0!==u--;)if(e[u]!==o[u])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===o.toString();if((s=(l=Object.keys(e)).length)!==Object.keys(o).length)return!1;for(u=s;0!==u--;)if(!Object.prototype.hasOwnProperty.call(o,l[u]))return!1;if(t&&e instanceof Element)return!1;for(u=s;0!==u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!e.$$typeof)&&!a(e[l[u]],o[l[u]]))return!1;return!0}return e!==e&&o!==o}e.exports=function(e,t){try{return a(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},9475:function(e,t,n){"use strict";var r,i=n(2791),a=(r=i)&&"object"===typeof r&&"default"in r?r.default:r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=!("undefined"===typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!==typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!==typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if("undefined"!==typeof n&&"function"!==typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!==typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,l=[];function c(){u=e(l.map((function(e){return e.props}))),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return u},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,l=[],e};var o=i.prototype;return o.UNSAFE_componentWillMount=function(){l.push(this),c()},o.componentDidUpdate=function(){c()},o.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),c()},o.render=function(){return a.createElement(r,this.props)},i}(i.PureComponent);return o(f,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),o(f,"canUseDOM",s),f}}},3587:function(e,t,n){var r;e.exports=(r=n(2791),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
2Object.defineProperty(t,"__esModule",{value:!0}),t.conformToMask=void 0;var u=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},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(3);Object.defineProperty(t,"conformToMask",{enumerable:!0,get:function(){return r(c).default}});var f=r(n(11)),h=r(n(9)),d=r(n(5)),p=n(2),v=function(e){function t(){var e;a(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return s.setRef=s.setRef.bind(s),s.onBlur=s.onBlur.bind(s),s.onChange=s.onChange.bind(s),s}return s(t,e),l(t,[{key:"setRef",value:function(e){this.inputElement=e}},{key:"initTextMask",value:function(){var e=this.props,t=this.props.value;this.textMaskInputElement=(0,d.default)(u({inputElement:this.inputElement},e)),this.textMaskInputElement.update(t)}},{key:"componentDidMount",value:function(){this.initTextMask()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.pipe,i=t.mask,a={guide:t.guide,placeholderChar:t.placeholderChar,showMask:t.showMask},o="function"==typeof r&&"function"==typeof e.pipe?r.toString()!==e.pipe.toString():(0,p.isNil)(r)&&!(0,p.isNil)(e.pipe)||!(0,p.isNil)(r)&&(0,p.isNil)(e.pipe),s=i.toString()!==e.mask.toString(),u=Object.keys(a).some((function(t){return a[t]!==e[t]}))||s||o;(n!==this.inputElement.value||u)&&this.initTextMask()}},{key:"render",value:function(){var e=this.props,t=e.render,n=i(e,["render"]);return delete n.mask,delete n.guide,delete n.pipe,delete n.placeholderChar,delete n.keepCharPositions,delete n.value,delete n.onBlur,delete n.onChange,delete n.showMask,t(this.setRef,u({onBlur:this.onBlur,onChange:this.onChange,defaultValue:this.props.value},n))}},{key:"onChange",value:function(e){this.textMaskInputElement.update(),"function"==typeof this.props.onChange&&this.props.onChange(e)}},{key:"onBlur",value:function(e){"function"==typeof this.props.onBlur&&this.props.onBlur(e)}}]),t}(f.default.PureComponent);t.default=v,v.propTypes={mask:h.default.oneOfType([h.default.array,h.default.func,h.default.bool,h.default.shape({mask:h.default.oneOfType([h.default.array,h.default.func]),pipe:h.default.func})]).isRequired,guide:h.default.bool,value:h.default.oneOfType([h.default.string,h.default.number]),pipe:h.default.func,placeholderChar:h.default.string,keepCharPositions:h.default.bool,showMask:h.default.bool},v.defaultProps={render:function(e,t){return f.default.createElement("input",u({ref:e},t))}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placeholderChar="_",t.strFunction="function"},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.placeholderChar;if(!i(e))throw new Error("Text-mask:convertMaskToPlaceholder; The mask property must be an array.");if(-1!==e.indexOf(t))throw new Error("Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.\n\nThe placeholder character that was received is: "+JSON.stringify(t)+"\n\nThe mask that was received is: "+JSON.stringify(e));return e.map((function(e){return e instanceof RegExp?t:e})).join("")}function i(e){return Array.isArray&&Array.isArray(e)||e instanceof Array}function a(e){return"string"==typeof e||e instanceof String}function o(e){return"number"==typeof e&&void 0===e.length&&!isNaN(e)}function s(e){return"undefined"==typeof e||null===e}function u(e){for(var t=[],n=void 0;-1!==(n=e.indexOf(f));)t.push(n),e.splice(n,1);return{maskWithoutCaretTraps:e,indexes:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.convertMaskToPlaceholder=r,t.isArray=i,t.isString=a,t.isNumber=o,t.isNil=s,t.processCaretTraps=u;var l=n(1),c=[],f="[]"},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(0,a.isArray)(t)){if(("undefined"==typeof t?"undefined":i(t))!==o.strFunction)throw new Error("Text-mask:conformToMask; The mask property must be an array.");t=t(e,n),t=(0,a.processCaretTraps)(t).maskWithoutCaretTraps}var r=n.guide,l=void 0===r||r,c=n.previousConformedValue,f=void 0===c?u:c,h=n.placeholderChar,d=void 0===h?o.placeholderChar:h,p=n.placeholder,v=void 0===p?(0,a.convertMaskToPlaceholder)(t,d):p,m=n.currentCaretPosition,y=n.keepCharPositions,g=!1===l&&void 0!==f,b=e.length,w=f.length,x=v.length,k=t.length,_=b-w,C=_>0,E=m+(C?-_:0),S=E+Math.abs(_);if(!0===y&&!C){for(var T=u,I=E;I<S;I++)v[I]===d&&(T+=d);e=e.slice(0,E)+T+e.slice(E,b)}for(var N=e.split(u).map((function(e,t){return{char:e,isNew:t>=E&&t<S}})),A=b-1;A>=0;A--){var j=N[A].char;j!==d&&j===v[A>=E&&w===k?A-_:A]&&N.splice(A,1)}var O=u,P=!1;e:for(var R=0;R<x;R++){var D=v[R];if(D===d){if(N.length>0)for(;N.length>0;){var F=N.shift(),L=F.char,M=F.isNew;if(L===d&&!0!==g){O+=d;continue e}
vendor: 4,372 bytes, line 2
2if(t[R].test(L)){if(!0===y&&!1!==M&&f!==u&&!1!==l&&C){for(var V=N.length,B=null,z=0;z<V;z++){var q=N[z];if(q.char!==d&&!1===q.isNew)break;if(q.char===d){B=z;break}}null!==B?(O+=L,N.splice(B,1)):R--}else O+=L;continue e}P=!0}!1===g&&(O+=v.substr(R,x));break}O+=D}if(g&&!1===C){for(var U=null,H=0;H<O.length;H++)v[H]===d&&(U=H);O=null!==U?O.substr(0,U+1):u}return{conformedValue:O,meta:{someCharsRejected:P}}}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var a=n(2),o=n(1),s=[],u=""},function(e,t){"use strict";function n(e){var t=e.previousConformedValue,n=void 0===t?i:t,a=e.previousPlaceholder,o=void 0===a?i:a,s=e.currentCaretPosition,u=void 0===s?0:s,l=e.conformedValue,c=e.rawValue,f=e.placeholderChar,h=e.placeholder,d=e.indexesOfPipedChars,p=void 0===d?r:d,v=e.caretTrapIndexes,m=void 0===v?r:v;if(0===u||!c.length)return 0;var y=c.length,g=n.length,b=h.length,w=l.length,x=y-g,k=x>0;if(x>1&&!k&&0!==g)return u;var _=0,C=void 0,E=void 0;if(!k||n!==l&&l!==h){var S=l.toLowerCase(),T=c.toLowerCase().substr(0,u).split(i).filter((function(e){return-1!==S.indexOf(e)}));E=T[T.length-1];var I=o.substr(0,T.length).split(i).filter((function(e){return e!==f})).length,N=h.substr(0,T.length).split(i).filter((function(e){return e!==f})).length,A=N!==I,j=void 0!==o[T.length-1]&&void 0!==h[T.length-2]&&o[T.length-1]!==f&&o[T.length-1]!==h[T.length-1]&&o[T.length-1]===h[T.length-2];!k&&(A||j)&&I>0&&h.indexOf(E)>-1&&void 0!==c[u]&&(C=!0,E=c[u]);for(var O=p.map((function(e){return S[e]})),P=O.filter((function(e){return e===E})).length,R=T.filter((function(e){return e===E})).length,D=h.substr(0,h.indexOf(f)).split(i).filter((function(e,t){return e===E&&c[t]!==e})).length,F=D+R+P+(C?1:0),L=0,M=0;M<w&&(_=M+1,S[M]===E&&L++,!(L>=F));M++);}else _=u-x;if(k){for(var V=_,B=_;B<=b;B++)if(h[B]===f&&(V=B),h[B]===f||-1!==m.indexOf(B)||B===b)return V}else if(C){for(var z=_-1;z>=0;z--)if(l[z]===E||-1!==m.indexOf(z)||0===z)return z}else for(var q=_;q>=0;q--)if(h[q-1]===f||-1!==m.indexOf(q)||0===q)return q}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=[],i=""},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t={previousConformedValue:void 0,previousPlaceholder:void 0};return{state:t,update:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=r.inputElement,p=r.mask,m=r.guide,y=r.pipe,g=r.placeholderChar,b=void 0===g?h.placeholderChar:g,w=r.keepCharPositions,x=void 0!==w&&w,k=r.showMask,_=void 0!==k&&k;if("undefined"==typeof n&&(n=i.value),n!==t.previousConformedValue){("undefined"==typeof p?"undefined":u(p))===v&&void 0!==p.pipe&&void 0!==p.mask&&(y=p.pipe,p=p.mask);var C=void 0,E=void 0;if(p instanceof Array&&(C=(0,f.convertMaskToPlaceholder)(p,b)),!1!==p){var S=o(n),T=i.selectionEnd,I=t.previousConformedValue,N=t.previousPlaceholder,A=void 0;if(("undefined"==typeof p?"undefined":u(p))===h.strFunction){if(!1===(E=p(S,{currentCaretPosition:T,previousConformedValue:I,placeholderChar:b})))return;var j=(0,f.processCaretTraps)(E);E=j.maskWithoutCaretTraps,A=j.indexes,C=(0,f.convertMaskToPlaceholder)(E,b)}else E=p;var O={previousConformedValue:I,guide:m,placeholderChar:b,pipe:y,placeholder:C,currentCaretPosition:T,keepCharPositions:x},P=(0,c.default)(S,E,O).conformedValue,R=("undefined"==typeof y?"undefined":u(y))===h.strFunction,D={};R&&(!1===(D=y(P,s({rawValue:S},O)))?D={value:I,rejected:!0}:(0,f.isString)(D)&&(D={value:D}));var F=R?D.value:P,L=(0,l.default)({previousConformedValue:I,previousPlaceholder:N,conformedValue:F,placeholder:C,rawValue:S,currentCaretPosition:T,placeholderChar:b,indexesOfPipedChars:D.indexesOfPipedChars,caretTrapIndexes:A}),M=F===C&&0===L?_?C:d:F;t.previousConformedValue=M,t.previousPlaceholder=C,i.value!==M&&(i.value=M,a(i,L))}}}}}function a(e,t){document.activeElement===e&&(m?y((function(){return e.setSelectionRange(t,t,p)}),0):e.setSelectionRange(t,t,p))}function o(e){if((0,f.isString)(e))return e;if((0,f.isNumber)(e))return String(e);if(void 0===e||null===e)return d;throw new Error("The 'value' provided to Text Mask needs to be a string or a number. The value received was:\n\n "+JSON.stringify(e))}
2Object.defineProperty(t,"__esModule",{value:!0});var s=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},u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=i;var l=r(n(4)),c=r(n(3)),f=n(2),h=n(1),d="",p="none",v="object",m="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),y="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:setTimeout},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,a,o,s,u){if(i(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,s,u],f=0;(l=new Error(t.replace(/%s/g,(function(){return c[f++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";var r=n(6),i=n(7),a=n(10);e.exports=function(){function e(e,t,n,r,o,s){s!==a&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";"function"==typeof Symbol&&Symbol.iterator,e.exports=n(8)()},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t){e.exports=r}]))},6374:function(e,t,n){"use strict";var r=n(2791),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,r)&&!u.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:a,_owner:s.current}}t.Fragment=a,t.jsx=l,t.jsxs=l},9117:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function g(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=y.prototype;var w=b.prototype=new g;w.constructor=b,v(w,y.prototype),w.isPureReactComponent=!0;var x=Array.isArray,k=Object.prototype.hasOwnProperty,_={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,i)&&!C.hasOwnProperty(i)&&(a[i]=t[i]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}if(e&&e.defaultProps)for(i in u=e.defaultProps)void 0===a[i]&&(a[i]=u[i]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:_.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function N(e,t,i,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u)return o=o(u=e),e=""===a?"."+I(u,0):a,x(o)?(i="",null!=e&&(i=e.replace(T,"$&/")+"/"),N(o,t,i,"",(function(e){return e}))):null!=o&&(S(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(u=0,a=""===a?".":a+":",x(e))for(var l=0;l<e.length;l++){var c=a+I(s=e[l],l);u+=N(s,t,i,c,o)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(s=e.next()).done;)u+=N(s=s.value,t,i,c=a+I(s,l++),o);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function A(e,t,n){if(null==e)return e;var r=[],i=0;return N(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function j(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},P={transition:null},R={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:P,ReactCurrentOwner:_};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=o,t.PureComponent=b,t.StrictMode=a,t.Suspense=c,t.__SECRET_INT
vendor: 7,214 bytes, line 2
2ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),a=e.key,o=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=_.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)k.call(t,l)&&!C.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==u?u[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.2.0"},2791:function(e,t,n){"use strict";e.exports=n(9117)},184:function(e,t,n){"use strict";e.exports=n(6374)},6813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,u=e[s],l=s+1,c=e[l];if(0>a(u,n))l<i&&0>a(c,u)?(e[r]=c,e[l]=n,r=l):(e[r]=u,e[s]=n,r=s);else{if(!(l<i&&0>a(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var l=[],c=[],f=1,h=null,d=3,p=!1,v=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,g="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(l,t)}t=r(c)}}function x(e){if(m=!1,w(e),!v)if(null!==r(l))v=!0,P(k);else{var t=r(c);null!==t&&R(x,t.startTime-e)}}function k(e,n){v=!1,m&&(m=!1,g(S),S=-1),p=!0;var a=d;try{for(w(n),h=r(l);null!==h&&(!(h.expirationTime>n)||e&&!N());){var o=h.callback;if("function"===typeof o){h.callback=null,d=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(l)&&i(l),w(n)}else i(l);h=r(l)}if(null!==h)var u=!0;else{var f=r(c);null!==f&&R(x,f.startTime-n),u=!1}return u}finally{h=null,d=a,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,C=!1,E=null,S=-1,T=5,I=-1;function N(){return!(t.unstable_now()-I<T)}function A(){if(null!==E){var e=t.unstable_now();I=e;var n=!0;try{n=E(!0,e)}finally{n?_():(C=!1,E=null)}}else C=!1}if("function"===typeof b)_=function(){b(A)};else if("undefined"!==typeof MessageChannel){var j=new MessageChannel,O=j.port2;j.port1.onmessage=A,_=function(){O.postMessage(null)}}else _=function(){y(A,0)};function P(e){E=e,C||(C=!0,_())}function R(e,n){S=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,P(k))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?o+a:o:a=o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(l)&&e===r(c)&&(m?(g(S),S=-1):m=!0,R(x,a-o))):(e.sortIndex=s,n(l,e),v||p||(v=!0,P(k))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},1830:function(e,t,n){var r=n(6690).default,i=n(9728).default,a=n(1588).default,o=n(3808).default,s=n(1655).default,u=n(6389).default,l=n(3515).default;e.exports=function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},t="swal2-",n=function(e){var n={};for(var r in e)n[e[r]]=t+e[r];return n},c=n(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","to
2p-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),f=n(["success","warning","info","question","error"]),h="SweetAlert2:",d=function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t},p=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},v=function(e){console.warn("".concat(h," ").concat("object"===typeof e?e.join(" "):e))},m=function(e){console.error("".concat(h," ").concat(e))},y=[],g=function(e){y.includes(e)||(y.push(e),v(e))},b=function(e,t){g('"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'))},w=function(e){return"function"===typeof e?e():e},x=function(e){return e&&"function"===typeof e.toPromise},k=function(e){return x(e)?e.toPromise():Promise.resolve(e)},_=function(e){return e&&Promise.resolve(e)===e},C=function(){return document.body.querySelector(".".concat(c.container))},E=function(e){var t=C();return t?t.querySelector(e):null},S=function(e){return E(".".concat(e))},T=function(){return S(c.popup)},I=function(){return S(c.icon)},N=function(){return S(c["icon-content"])},A=function(){return S(c.title)},j=function(){return S(c["html-container"])},O=function(){return S(c.image)},P=function(){return S(c["progress-steps"])},R=function(){return S(c["validation-message"])},D=function(){return E(".".concat(c.actions," .").concat(c.confirm))},F=function(){return E(".".concat(c.actions," .").concat(c.cancel))},L=function(){return E(".".concat(c.actions," .").concat(c.deny))},M=function(){return S(c["input-label"])},V=function(){return E(".".concat(c.loader))},B=function(){return S(c.actions)},z=function(){return S(c.footer)},q=function(){return S(c["timer-progress-bar"])},U=function(){return S(c.close)},H='\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n',W=function(){var e=Array.from(T().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((function(e,t){var n=parseInt(e.getAttribute("tabindex")),r=parseInt(t.getAttribute("tabindex"));return n>r?1:n<r?-1:0})),t=Array.from(T().querySelectorAll(H)).filter((function(e){return"-1"!==e.getAttribute("tabindex")}));return d(e.concat(t)).filter((function(e){return fe(e)}))},K=function(){return X(document.body,c.shown)&&!X(document.body,c["toast-shown"])&&!X(document.body,c["no-backdrop"])},G=function(){return T()&&X(T(),c.toast)},Y=function(){return T().hasAttribute("data-loading")},Q={previousBodyPadding:null},$=function(e,t){if(e.textContent="",t){var n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((function(t){e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((function(t){t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},X=function(e,t){if(!t)return!1;for(var n=t.split(/\s+/),r=0;r<n.length;r++)if(!e.classList.contains(n[r]))return!1;return!0},J=function(e,t){Array.from(e.classList).forEach((function(n){Object.values(c).includes(n)||Object.values(f).includes(n)||Object.values(t.showClass).includes(n)||e.classList.remove(n)}))},Z=function(e,t,n){if(J(e,t),t.customClass&&t.customClass[n]){if("string"!==typeof t.customClass[n]&&!t.customClass[n].forEach)return void v("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));re(e,t.customClass[n])}},ee=function(e,t){if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(".".concat(c.popup," > .").concat(c[t]));case"checkbox":return e.querySelector(".".concat(c.popup," > .").concat(c.checkbox," input"));case"radio":return e.querySelector(".".concat(c.popup," > .").concat(c.radio," input:checked"))||e.querySelector(".".concat(c.popup," > .").concat(c.radio," input:first-child"));case"range":return e.querySelector(".".concat(c.popup," > .").concat(c.range," input"));default:return e.querySelector(".".concat(c.popup," > .").concat(c.input))}},te=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},ne=function(e,t,n){e&&t&&("string"===typeof t&&(t=t.split(/\s+/).filter(
2Boolean)),t.forEach((function(t){Array.isArray(e)?e.forEach((function(e){n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},re=function(e,t){ne(e,t,!0)},ie=function(e,t){ne(e,t,!1)},ae=function(e,t){for(var n=Array.from(e.children),r=0;r<n.length;r++){var i=n[r];if(i instanceof HTMLElement&&X(i,t))return i}},oe=function(e,t,n){n==="".concat(parseInt(n))&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"===typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},ue=function(e){e.style.display="none"},le=function(e,t,n,r){var i=e.querySelector(t);i&&(i.style[n]=r)},ce=function(e,t){t?se(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):ue(e)},fe=function(e){return!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))},he=function(){return!fe(D())&&!fe(L())&&!fe(F())},de=function(e){return!!(e.scrollHeight>e.clientHeight)},pe=function(e){var t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),r=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||r>0},ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=q();fe(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((function(){n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"}),10))},me=function(){var e=q(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width="".concat(n,"%")},ye=100,ge={},be=function(){ge.previousActiveElement instanceof HTMLElement?(ge.previousActiveElement.focus(),ge.previousActiveElement=null):document.body&&document.body.focus()},we=function(e){return new Promise((function(t){if(!e)return t();var n=window.scrollX,r=window.scrollY;ge.restoreFocusTimeout=setTimeout((function(){be(),t()}),ye),window.scrollTo(n,r)}))},xe=function(){return"undefined"===typeof window||"undefined"===typeof document},ke='\n <div aria-labelledby="'.concat(c.title,'" aria-describedby="').concat(c["html-container"],'" class="').concat(c.popup,'" tabindex="-1">\n   <button type="button" class="').concat(c.close,'"></button>\n   <ul class="').concat(c["progress-steps"],'"></ul>\n   <div class="').concat(c.icon,'"></div>\n   <img class="').concat(c.image,'" />\n   <h2 class="').concat(c.title,'" id="').concat(c.title,'"></h2>\n   <div class="').concat(c["html-container"],'" id="').concat(c["html-container"],'"></div>\n   <input class="').concat(c.input,'" />\n   <input type="file" class="').concat(c.file,'" />\n   <div class="').concat(c.range,'">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="').concat(c.select,'"></select>\n   <div class="').concat(c.radio,'"></div>\n   <label for="').concat(c.checkbox,'" class="').concat(c.checkbox,'">\n     <input type="checkbox" />\n     <span class="').concat(c.label,'"></span>\n   </label>\n   <textarea class="').concat(c.textarea,'"></textarea>\n   <div class="').concat(c["validation-message"],'" id="').concat(c["validation-message"],'"></div>\n   <div class="').concat(c.actions,'">\n     <div class="').concat(c.loader,'"></div>\n     <button type="button" class="').concat(c.confirm,'"></button>\n     <button type="button" class="').concat(c.deny,'"></button>\n     <button type="button" class="').concat(c.cancel,'"></button>\n   </div>\n   <div class="').concat(c.footer,'"></div>\n   <div class="').concat(c["timer-progress-bar-container"],'">\n     <div class="').concat(c["timer-progress-bar"],'"></div>\n   </div>\n </div>\n').replace(/(^|\n)\s*/g,""),_e=function(){var e=C();return!!e&&(e.remove(),ie([document.documentElement,document.body],[c["no-backdrop"],c["toast-shown"],c["has-column"]]),!0)},Ce=function(){ge.currentInstance.resetValidationMessage()},Ee=function(){var e=T(),t=ae(e,c.input),n=ae(e,c.file),r=e.querySelector(".".concat(c.range," input")),i=e.querySelector(".".concat(c.range," output")),a=ae(e,c.select),o=e.querySelector(".".concat(c.checkbox," input")),s=ae(e,c.textarea);t.oninput=Ce,n.onchange=Ce,a.onchange=Ce,o.onchange=Ce,s.oninput=Ce,r.oninput=function(){Ce(),i.value=r.value},r.onchange=function(){Ce(),i.value=r.value}},Se=function(e){return"string"===typeof e?document.querySelector(e):e},Te=function(e){var t=T();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")},Ie=function(e){"rtl"===window.getComputedStyle(e).direction&&re(C(),c.rtl)},Ne=function(e){var t=_e();if(xe())m("SweetAlert2 requires document to initialize");else{var n=document.createElement("div");n.className=c.container,t&&re(n,c["no-transition"]),$(n,ke);var r=Se(e.target);r.appendChild(n),Te(e),Ie(r),Ee()}},Ae=function(e,t){e instanceof HTMLElement?t.appendChild(e):"object"===typeof e?je(e,t):e&&$(t,e)},je=function(e,t){e.jquery?Oe(t,e):$(t,e.toString())},Oe=function(e,t){if(e.textContent="",0 in t)for(var n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},Pe=function(){if(xe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&"undefined"!==typeof e.style[n])return t[n];return!1}(),Re=function(){var e=document.createElement("div");e.className=c["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},De=function(e,t){var n=B(),r=V();t.showConfirmButton||t.showDenyButton||t.showCancelButton?se(n):ue(n),Z(n,t,"actions"),Fe(n,r,t),$(r,t.loaderHtml),Z(r,t,"loader")};function Fe(e,t,n){var r=D(),i=L(),a=F();Me(r,"confirm",n),Me(i,"deny",n),Me(a,"cancel",n),Le(r,i,a,n),n.reverseButtons&&(n.toast?(e.insertBefore(a,r),e.insertBefore(i,r)):(e.insertBefore(a,t),e.insertBefore(i,t),e.insertBefore(r,t)))}function Le(e,t,n,r){r.buttonsStyling?(re([e,t,n],c.styled),r.confirmButtonColor&&(e.style.backgroundColor=r.confirmButtonColor,re(e,c["default-outline"])),r.denyButtonColor&&(t.style.backgroundColor=r.denyButtonColor,re(t,c["default-outline"])),r.cancelButtonColor&&(n.style.backgroundColor=r.cancelButtonColor,re(n,c["default-outline"]))):ie([e,t,n],c.styled)}function Me(e,t,n){ce(e,n["show".concat(p(t),"Button")],"inline-block"),$(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=c[t],Z(e,n,"".concat(t,"Button")),re(e,n["".concat(t,"ButtonClass")])}var Ve=function(e,t){var n=U();$(n,t.closeButtonHtml),Z(n,t,"closeButton"),ce(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)},Be=function(e,t){var n=C();n&&(ze(n,t.backdrop),qe(n,t.position),Ue(n,t.grow),Z(n,t,"container"))};function ze(e,t){"string"===typeof t?e.style.background=t:t||re([document.documentElement,document.body],c["no-backdrop"])}function qe(e,t){t in c?re(e,c[t]):(v('The "position" parameter is not val
2id, defaulting to "center"'),re(e,c.center))}function Ue(e,t){if(t&&"string"===typeof t){var n="grow-".concat(t);n in c&&re(e,c[n])}}var He=["input","file","range","select","radio","checkbox","textarea"],We=function(t,n){var r=T(),i=e.innerParams.get(t),a=!i||n.input!==i.input;He.forEach((function(e){var t=ae(r,c[e]);Ye(e,n.inputAttributes),t.className=c[e],a&&ue(t)})),n.input&&(a&&Ke(n),Qe(n))},Ke=function(e){if(et[e.input]){var t=Je(e.input),n=et[e.input](t,e);se(t),e.inputAutoFocus&&setTimeout((function(){te(n)}))}else m('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'))},Ge=function(e){for(var t=0;t<e.attributes.length;t++){var n=e.attributes[t].name;["type","value","style"].includes(n)||e.removeAttribute(n)}},Ye=function(e,t){var n=ee(T(),e);if(n)for(var r in Ge(n),t)n.setAttribute(r,t[r])},Qe=function(e){var t=Je(e.input);"object"===typeof e.customClass&&re(t,e.customClass.input)},$e=function(e,t){e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},Xe=function(e,t,n){if(n.inputLabel){e.id=c.input;var r=document.createElement("label"),i=c["input-label"];r.setAttribute("for",e.id),r.className=i,"object"===typeof n.customClass&&re(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",r)}},Je=function(e){return ae(T(),c[e]||c.input)},Ze=function(e,t){["string","number"].includes(typeof t)?e.value="".concat(t):_(t)||v('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t,'"'))},et={};et.text=et.email=et.password=et.number=et.tel=et.url=function(e,t){return Ze(e,t.inputValue),Xe(e,e,t),$e(e,t),e.type=t.input,e},et.file=function(e,t){return Xe(e,e,t),$e(e,t),e},et.range=function(e,t){var n=e.querySelector("input"),r=e.querySelector("output");return Ze(n,t.inputValue),n.type=t.input,Ze(r,t.inputValue),Xe(n,e,t),e},et.select=function(e,t){if(e.textContent="",t.inputPlaceholder){var n=document.createElement("option");$(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return Xe(e,e,t),e},et.radio=function(e){return e.textContent="",e},et.checkbox=function(e,t){var n=ee(T(),"checkbox");n.value="1",n.id=c.checkbox,n.checked=Boolean(t.inputValue);var r=e.querySelector("span");return $(r,t.inputPlaceholder),n},et.textarea=function(e,t){Ze(e,t.inputValue),$e(e,t),Xe(e,e,t);var n=function(e){return parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight)};return setTimeout((function(){if("MutationObserver"in window){var t=parseInt(window.getComputedStyle(T()).width);new MutationObserver((function(){var r=e.offsetWidth+n(e);T().style.width=r>t?"".concat(r,"px"):null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};var tt=function(e,t){var n=j();Z(n,t,"htmlContainer"),t.html?(Ae(t.html,n),se(n,"block")):t.text?(n.textContent=t.text,se(n,"block")):ue(n),We(e,t)},nt=function(e,t){var n=z();ce(n,t.footer),t.footer&&Ae(t.footer,n),Z(n,t,"footer")},rt=function(t,n){var r=e.innerParams.get(t),i=I();if(r&&n.icon===r.icon)return ut(i,n),void it(i,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(f).indexOf(n.icon))return m('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),void ue(i);se(i),ut(i,n),it(i,n),re(i,n.showClass.icon)}else ue(i)},it=function(e,t){for(var n in f)t.icon!==n&&ie(e,f[n]);re(e,f[t.icon]),lt(e,t),at(),Z(e,t,"icon")},at=function(){for(var e=T(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),r=0;r<n.length;r++)n[r].style.backgroundColor=t},ot='\n  <div class="swal2-success-circular-line-left"></div>\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n  <div class="swal2-success-circular-line-right"></div>\n',st='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n',ut=function(e,t){var n,r=e.innerHTML;t.iconHtml?n=ct(t.iconHtml):"success"===t.icon?(n=ot,r=r.replace(/ style=".*?"/g,"")):n="error"===t.icon?st:ct({question:"?",warning:"!",info:"i"}[t.icon]),r.trim()!==n.trim()&&$(e,n)},lt=function(e,t){if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(var n=0,r=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n<r.length;n++){var i=r[n];le(e,i,"backgroundColor",t.iconColor)}le(e,".swal2-success-ring","borderColor",t.iconColor)}},ct=function(e){return'<div class="'.concat(c["icon-content"],'">').concat(e,"</div>")},ft=function(e,t){var n=O();t.imageUrl?(se(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt),oe(n,"width",t.imageWidth),oe(n,"height",t.imageHeight),n.className=c.image,Z(n,t,"image")):ue(n)},ht=function(e,t){var n=C(),r=T();t.toast?(oe(n,"width",t.width),r.style.width="100%",r.insertBefore(V(),I())):oe(r,"width",t.width),oe(r,"padding",t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),ue(R()),dt(r,t)},dt=function(e,t){e.className="".concat(c.popup," ").concat(fe(e)?t.showClass.popup:""),t.toast?(re([document.documentElement,document.body],c["toast-shown"]),re(e,c.toast)):re(e,c.modal),Z(e,t,"popup"),"string"===typeof t.customClass&&re(e,t.customClass),t.icon&&re(e,c["icon-".concat(t.icon)])},pt=function(e,t){var n=P();t.progressSteps&&0!==t.progressSteps.length?(se(n),n.textContent="",t.currentProgressStep>=t.progressSteps.length&&v("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach((function(e,r){var i=vt(e);if(n.appendChild(i),r===t.currentProgressStep&&re(i,c["active-progress-step"]),r!==t.progressSteps.length-1){var a=mt(t);n.appendChild(a)}}))):ue(n)},vt=function(e){var t=document.createElement("li");return re(t,c["progress-step"]),$(t,e),t},mt=function(e){var t=document.createElement("li");return re(t,c["progress-step-line"]),e.progressStepsDistance&&oe(t,"width",e.progressStepsDistance),t},yt=function(e,t){var n=A();ce(n,t.title||t.titleText,"block"),t.title&&Ae(t.title,n),t.titleText&&(n.innerText=t.titleText),Z(n,t,"title")},gt=function(e,t){ht(e,t),Be(e,t),pt(e,t),rt(e,t),ft(e,t),yt(e,t),Ve(e,t),tt(e,t),De(e,t),nt(e,t),"function"===typeof t.didRender&&t.didRender(T())};function bt(){var t=e.innerParams.get(this);if(t){var n=e.domCache.get(this);ue(n.loader),G()?t.icon&&se(I()):wt(n),ie([n.popup,n.actions],c.loading),n.popup.removeAttribute("aria-busy"),n.popup.removeAttribute("data-loading"),n.confirmButton.disabled=!1,n.denyButton.disabled=!1,n.cancelButton.disabled=!1}}var wt=function(e){var t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?se(t[0],"inline-block"):he()&&ue(e.actions)};function xt(t){var n=e.innerParams.get(t||this),r=e.domCache.get(t||this);return r?ee(r.popup,n.input):null}var kt=function(){return fe(T())},_t=function(){return D()&&D().click()},Ct=function(){return L()&&L().click()},Et=function(){return F()&&F().click()},St=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Tt=function(e){e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},It=function(e,t,n,r){Tt(t),n.toast||(t.keydownHandler=function(t){return Ot(e,t,r)},t.keydownTarget=n.keydownListenerCapture?window:T(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},Nt=function(e,t){var n=W();if(n.length)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();T().focus()},At=["ArrowRight","ArrowDown"],jt=["ArrowLeft","ArrowUp"],Ot=function(t,n,r){var i=e.innerParams.get(t);i&&(n.isComposing||229===n.keyCode||(i.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Pt(t,n,i):"Tab"===n.key?Rt(n):[].concat(At,jt).includes(n.key)?Dt(n.key):"Escape"===n.key&&Ft(n,i,r)))},Pt=function(e,t,n){if(w(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;_t(),t.preventDefault()}},Rt=function(e){for(var t=e.target,n=W(),r=-1,i=0;i<n.length;i++)if(t===n[i]){r=i;break}e.shiftKey?Nt(r,-1):Nt(r,1),e.stopPropagation(),e.preventDefault()},Dt=function(e){var t=[D(),L(),F()];if(!(document.activeElement instanceof HTMLElement)||t.includes(document.activeElement)){for(var n=At.includes(e)?"nextElementSibling":"previousElementSibling",r=document.activeElement,i=0;i<B().children.length;i++){if(!(r=r[n]))return;if(r instanceof HTMLButtonElement&&fe(r))break}r instanceof HTMLButtonElement&&r.focus()}},Ft=function(e,t,n){w(t.allowEscapeKey)&&(e.preventDefault(),n(St.esc))}
2,Lt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},Mt=function(){Array.from(document.body.children).forEach((function(e){e===C()||e.contains(C())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))},Vt=function(){Array.from(document.body.children).forEach((function(e){e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},Bt=function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!X(document.body,c.iosfix)){var e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),re(document.body,c.iosfix),qt(),zt()}},zt=function(){var e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){var r=44;T().scrollHeight>window.innerHeight-r&&(C().style.paddingBottom="".concat(r,"px"))}},qt=function(){var e,t=C();t.ontouchstart=function(t){e=Ut(t)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},Ut=function(e){var t=e.target,n=C();return!Ht(e)&&!Wt(e)&&(t===n||!de(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!de(j())||!j().contains(t)))},Ht=function(e){return e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType},Wt=function(e){return e.touches&&e.touches.length>1},Kt=function(){if(X(document.body,c.iosfix)){var e=parseInt(document.body.style.top,10);ie(document.body,c.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},Gt=function(){null===Q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(Q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Q.previousBodyPadding+Re(),"px"))},Yt=function(){null!==Q.previousBodyPadding&&(document.body.style.paddingRight="".concat(Q.previousBodyPadding,"px"),Q.previousBodyPadding=null)};function Qt(e,t,n,r){G()?on(e,r):(we(n).then((function(){return on(e,r)})),Tt(ge)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),K()&&(Yt(),Kt(),Vt()),$t()}function $t(){ie([document.documentElement,document.body],[c.shown,c["height-auto"],c["no-backdrop"],c["toast-shown"]])}function Xt(e){e=nn(e);var t=Lt.swalPromiseResolve.get(this),n=Zt(this);this.isAwaitingPromise()?e.isDismissed||(tn(this),t(e)):n&&t(e)}function Jt(){return!!e.awaitingPromise.get(this)}var Zt=function(t){var n=T();if(!n)return!1;var r=e.innerParams.get(t);if(!r||X(n,r.hideClass.popup))return!1;ie(n,r.showClass.popup),re(n,r.hideClass.popup);var i=C();return ie(i,r.showClass.backdrop),re(i,r.hideClass.backdrop),rn(t,n,r),!0};function en(e){var t=Lt.swalPromiseReject.get(this);tn(this),t&&t(e)}var tn=function(t){t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},nn=function(e){return"undefined"===typeof e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e)},rn=function(e,t,n){var r=C(),i=Pe&&pe(t);"function"===typeof n.willClose&&n.willClose(t),i?an(e,t,r,n.returnFocus,n.didClose):Qt(e,r,n.returnFocus,n.didClose)},an=function(e,t,n,r,i){ge.swalCloseEventFinishedCallback=Qt.bind(null,e,n,r,i),t.addEventListener(Pe,(function(e){e.target===t&&(ge.swalCloseEventFinishedCallback(),delete ge.swalCloseEventFinishedCallback)}))},on=function(e,t){setTimeout((function(){"function"===typeof t&&t.bind(e.params)(),e._destroy()}))};function sn(t,n,r){var i=e.domCache.get(t);n.forEach((function(e){i[e].disabled=r}))}function un(e,t){if(e)if("radio"===e.type)for(var n=e.parentNode.parentNode.querySelectorAll("input"),r=0;r<n.length;r++)n[r].disabled=t;else e.disabled=t}function ln(){sn(this,["confirmButton","denyButton","cancelButton"],!1)}function cn(){sn(this,["confirmButton","denyButton","cancelButton"],!0)}function fn(){un(this.getInput(),!1)}function hn(){un(this.getInput(),!0)}function dn(t){var n=e.domCache.get(this),r=e.innerParams.get(this);$(n.validationMessage,t),n.validationMessage.className=c["validation-message"],r.customClass&&r.customClass.validationMessage&&re(n.validationMessage,r.customClass.validationMessage),se(n.validationMessage);var i=this.getInput();i&&(i.setAttribute("aria-invalid",!0),i.setAttribute("aria-describedby",c["validation-message"]),te(i),re(i,c.inputerror))}function pn(){var t=e.domCache.get(this);t.validationMessage&&ue(t.validationMessage);var n=this.getInput();n&&(n.removeAttribute("aria-invalid"),n.removeAttribute("aria-describedby"),ie(n,c.inputerror))}var vn={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose
2:void 0,didDestroy:void 0,scrollbarPadding:!0},mn=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],yn={},gn=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],bn=function(e){return Object.prototype.hasOwnProperty.call(vn,e)},wn=function(e){return-1!==mn.indexOf(e)},xn=function(e){return yn[e]},kn=function(e){bn(e)||v('Unknown parameter "'.concat(e,'"'))},_n=function(e){gn.includes(e)&&v('The parameter "'.concat(e,'" is incompatible with toasts'))},Cn=function(e){xn(e)&&b(e,xn(e))},En=function(e){for(var t in!1===e.backdrop&&e.allowOutsideClick&&v('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e)kn(t),e.toast&&_n(t),Cn(t)};function Sn(t){var n=T(),r=e.innerParams.get(this);if(n&&!X(n,r.hideClass.popup)){var i=Tn(t),a=Object.assign({},r,i);gt(this,a),e.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}else v("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.")}var Tn=function(e){var t={};return Object.keys(e).forEach((function(n){wn(n)?t[n]=e[n]:v("Invalid parameter to update: ".concat(n))})),t};function In(){var t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&ge.swalCloseEventFinishedCallback&&(ge.swalCloseEventFinishedCallback(),delete ge.swalCloseEventFinishedCallback),"function"===typeof n.didDestroy&&n.didDestroy(),Nn(this)):An(this)}var Nn=function(e){An(e),delete e.params,delete ge.keydownHandler,delete ge.keydownTarget,delete ge.currentInstance},An=function(t){t.isAwaitingPromise()?(jn(e,t),e.awaitingPromise.set(t,!0)):(jn(Lt,t),jn(e,t))},jn=function(e,t){for(var n in e)e[n].delete(t)},On=Object.freeze({__proto__:null,_destroy:In,close:Xt,closeModal:Xt,closePopup:Xt,closeToast:Xt,disableButtons:cn,disableInput:hn,disableLoading:bt,enableButtons:ln,enableInput:fn,getInput:xt,handleAwaitingPromise:tn,hideLoading:bt,isAwaitingPromise:Jt,rejectPromise:en,resetValidationMessage:pn,showValidationMessage:dn,update:Sn}),Pn=function(e){var t=T();t||new ni,t=T();var n=V();G()?ue(I()):Rn(t,e),se(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},Rn=function(e,t){var n=B(),r=V();!t&&fe(D())&&(t=D()),se(n),t&&(ue(t),r.setAttribute("data-button-to-replace",t.className)),r.parentNode.insertBefore(r,t),re([e,n],c.loading)},Dn=function(e,t){"select"===t.input||"radio"===t.input?Bn(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(x(t.inputValue)||_(t.inputValue))&&(Pn(D()),zn(e,t))},Fn=function(e,t){var n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Ln(n);case"radio":return Mn(n);case"file":return Vn(n);default:return t.inputAutoTrim?n.value.trim():n.value}},Ln=function(e){return e.checked?1:0},Mn=function(e){return e.checked?e.value:null},Vn=function(e){return e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null},Bn=function(e,t){var n=T(),r=function(e){qn[t.input](n,Un(e),t)};x(t.inputOptions)||_(t.inputOptions)?(Pn(D()),k(t.inputOptions).then((function(t){e.hideLoading(),r(t)}))):"object"===typeof t.inputOptions?r(t.inputOptions):m("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions))},zn=function(e,t){var n=e.getInput();ue(n),k(t.inputValue).then((function(r){n.value="number"===t.input?"".concat(parseFloat(r)||0):"".concat(r),se(n),n.focus(),e.hideLoading()})).catch((function(t){m("Error in inputValue promise: ".concat(t)),n.value="",se(n),n.focus(),e.hideLoading()}))},qn={select:function(e,t,n){var r=ae(e,c.select),i=function(e,t,r){var i=document.createElement("option");i.value=r,$(i,t),i.selected=Hn(r,n.inputValue),e.appendChild(i)};t.forEach((function(e){var t=e[0],n=e[1];if(Array.isArray(n)){var a=document.createElement("optgroup");
2a.label=t,a.disabled=!1,r.appendChild(a),n.forEach((function(e){return i(a,e[1],e[0])}))}else i(r,n,t)})),r.focus()},radio:function(e,t,n){var r=ae(e,c.radio);t.forEach((function(e){var t=e[0],i=e[1],a=document.createElement("input"),o=document.createElement("label");a.type="radio",a.name=c.radio,a.value=t,Hn(t,n.inputValue)&&(a.checked=!0);var s=document.createElement("span");$(s,i),s.className=c.label,o.appendChild(a),o.appendChild(s),r.appendChild(o)}));var i=r.querySelectorAll("input");i.length&&i[0].focus()}},Un=function e(t){var n=[];return"undefined"!==typeof Map&&t instanceof Map?t.forEach((function(t,r){var i=t;"object"===typeof i&&(i=e(i)),n.push([r,i])})):Object.keys(t).forEach((function(r){var i=t[r];"object"===typeof i&&(i=e(i)),n.push([r,i])})),n},Hn=function(e,t){return t&&t.toString()===e.toString()},Wn=function(t){var n=e.innerParams.get(t);t.disableButtons(),n.input?Yn(t,"confirm"):Zn(t,!0)},Kn=function(t){var n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?Yn(t,"deny"):$n(t,!1)},Gn=function(e,t){e.disableButtons(),t(St.cancel)},Yn=function(t,n){var r=e.innerParams.get(t);if(r.input){var i=Fn(t,r);r.inputValidator?Qn(t,i,n):t.getInput().checkValidity()?"deny"===n?$n(t,i):Zn(t,i):(t.enableButtons(),t.showValidationMessage(r.validationMessage))}else m('The "input" parameter is needed to be set when using returnInputValueOn'.concat(p(n)))},Qn=function(t,n,r){var i=e.innerParams.get(t);t.disableInput(),Promise.resolve().then((function(){return k(i.inputValidator(n,i.validationMessage))})).then((function(e){t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===r?$n(t,n):Zn(t,n)}))},$n=function(t,n){var r=e.innerParams.get(t||void 0);r.showLoaderOnDeny&&Pn(L()),r.preDeny?(e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((function(){return k(r.preDeny(n,r.validationMessage))})).then((function(e){!1===e?(t.hideLoading(),tn(t)):t.close({isDenied:!0,value:"undefined"===typeof e?n:e})})).catch((function(e){return Jn(t||void 0,e)}))):t.close({isDenied:!0,value:n})},Xn=function(e,t){e.close({isConfirmed:!0,value:t})},Jn=function(e,t){e.rejectPromise(t)},Zn=function(t,n){var r=e.innerParams.get(t||void 0);r.showLoaderOnConfirm&&Pn(),r.preConfirm?(t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((function(){return k(r.preConfirm(n,r.validationMessage))})).then((function(e){fe(R())||!1===e?(t.hideLoading(),tn(t)):Xn(t,"undefined"===typeof e?n:e)})).catch((function(e){return Jn(t||void 0,e)}))):Xn(t,n)},er=function(t,n,r){e.innerParams.get(t).toast?tr(t,n,r):(ir(n),ar(n),or(t,n,r))},tr=function(t,n,r){n.popup.onclick=function(){var n=e.innerParams.get(t);n&&(nr(n)||n.timer||n.input)||r(St.close)}},nr=function(e){return e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton},rr=!1,ir=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(rr=!0)}}},ar=function(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(rr=!0)}}},or=function(t,n,r){n.container.onclick=function(i){var a=e.innerParams.get(t);rr?rr=!1:i.target===n.container&&w(a.allowOutsideClick)&&r(St.backdrop)}},sr=function(e){return"object"===typeof e&&e.jquery},ur=function(e){return e instanceof Element||sr(e)},lr=function(e){var t={};return"object"!==typeof e[0]||ur(e[0])?["title","html","icon"].forEach((function(n,r){var i=e[r];"string"===typeof i||ur(i)?t[n]=i:void 0!==i&&m("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof i))})):Object.assign(t,e[0]),t};function cr(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return l(e,n)}function fr(e){var t=function(t){s(l,t);var n=u(l);function l(){return r(this,l),n.apply(this,arguments)}return i(l,[{key:"_main",value:function(t,n){return a(o(l.prototype),"_main",this).call(this,t,Object.assign({},e,n))}}]),l}(this);return t}var hr=function(){return ge.timeout&&ge.timeout.getTimerLeft()},dr=function(){if(ge.timeout)return me(),ge.timeout.stop()},pr=function(){if(ge.timeout){var e=ge.timeout.start();return ve(e),e}},vr=function(){var e=ge.timeout;return e&&(e.running?dr():pr())},mr=function(e){if(ge.timeout){var t=ge.timeout.increase(e);return ve(t,!0),t}},yr=function(){return ge.timeout&&ge.timeout.isRunning()},gr=!1,br={};function wr(){br[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,gr||(document.body.addEventListener("click",kr),gr=!0)}var xr,kr=function(e){for(var t=e.target;t&&t!==document;t=t.parentNode)for(var n in br){var r=t.getAttribute(n);if(r)return void br[n].fire({template:r})}},_r=Object.freeze({__proto__:null,argsToParams:lr,bindClickHandler:wr,clickCancel:Et,clickConfirm:_t,clickDeny:Ct,enableLoading:Pn,fire:cr,getActions:B,getCancelButton:F,getCloseButton:U,getConfirmButton:D,getContainer:C,getDenyButton:L,getFocusableElements:W,getFooter:z,getHtmlContainer:j,getIcon:I,getIconContent:N,getImage:O,getIn
2putLabel:M,getLoader:V,getPopup:T,getProgressSteps:P,getTimerLeft:hr,getTimerProgressBar:q,getTitle:A,getValidationMessage:R,increaseTimer:mr,isDeprecatedParameter:xn,isLoading:Y,isTimerRunning:yr,isUpdatableParameter:wn,isValidParameter:bn,isVisible:kt,mixin:fr,resumeTimer:pr,showLoading:Pn,stopTimer:dr,toggleTimer:vr}),Cr=function(){function e(t,n){r(this,e),this.callback=t,this.remaining=n,this.running=!1,this.start()}return i(e,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(e){var t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),e}(),Er=["swal-title","swal-html","swal-footer"],Sr=function(e){var t="string"===typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};var n=t.content;return Rr(n),Object.assign(Tr(n),Ir(n),Nr(n),Ar(n),jr(n),Or(n),Pr(n,Er))},Tr=function(e){var t={};return Array.from(e.querySelectorAll("swal-param")).forEach((function(e){Dr(e,["name","value"]);var n=e.getAttribute("name"),r=e.getAttribute("value");"boolean"===typeof vn[n]?t[n]="false"!==r:"object"===typeof vn[n]?t[n]=JSON.parse(r):t[n]=r})),t},Ir=function(e){var t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((function(e){var n=e.getAttribute("name"),r=e.getAttribute("value");t[n]=new Function("return ".concat(r))()})),t},Nr=function(e){var t={};return Array.from(e.querySelectorAll("swal-button")).forEach((function(e){Dr(e,["type","color","aria-label"]);var n=e.getAttribute("type");t["".concat(n,"ButtonText")]=e.innerHTML,t["show".concat(p(n),"Button")]=!0,e.hasAttribute("color")&&(t["".concat(n,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t["".concat(n,"ButtonAriaLabel")]=e.getAttribute("aria-label"))})),t},Ar=function(e){var t={},n=e.querySelector("swal-image");return n&&(Dr(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},jr=function(e){var t={},n=e.querySelector("swal-icon");return n&&(Dr(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},Or=function(e){var t={},n=e.querySelector("swal-input");n&&(Dr(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));var r=Array.from(e.querySelectorAll("swal-input-option"));return r.length&&(t.inputOptions={},r.forEach((function(e){Dr(e,["value"]);var n=e.getAttribute("value"),r=e.innerHTML;t.inputOptions[n]=r}))),t},Pr=function(e,t){var n={};for(var r in t){var i=t[r],a=e.querySelector(i);a&&(Dr(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},Rr=function(e){var t=Er.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((function(e){var n=e.tagName.toLowerCase();t.includes(n)||v("Unrecognized element <".concat(n,">"))}))},Dr=function(e,t){Array.from(e.attributes).forEach((function(n){-1===t.indexOf(n.name)&&v(['Unrecognized attribute "'.concat(n.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(t.length?"Allowed attributes are: ".concat(t.join(", ")):"To set the value, use HTML within the element.")])}))},Fr=10,Lr=function(e){var t=C(),n=T();"function"===typeof e.willOpen&&e.willOpen(n);var r=window.getComputedStyle(document.body).overflowY;zr(t,n,e),setTimeout((function(){Vr(t,n)}),Fr),K()&&(Br(t,e.scrollbarPadding,r),Mt()),G()||ge.previousActiveElement||(ge.previousActiveElement=document.activeElement),"function"===typeof e.didOpen&&setTimeout((function(){return e.didOpen(n)})),ie(t,c["no-transition"])},Mr=function e(t){var n=T();if(t.target===n){var r=C();n.removeEventListener(Pe,e),r.style.overflowY="auto"}},Vr=function(e,t){Pe&&pe(t)?(e.style.overflowY="hidden",t.addEventListener(Pe,Mr)):e.style.overflowY="auto"}
2,Br=function(e,t,n){Bt(),t&&"hidden"!==n&&Gt(),setTimeout((function(){e.scrollTop=0}))},zr=function(e,t,n){re(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),se(t,"grid"),setTimeout((function(){re(t,n.showClass.popup),t.style.removeProperty("opacity")}),Fr),re([document.documentElement,document.body],c.shown),n.heightAuto&&n.backdrop&&!n.toast&&re([document.documentElement,document.body],c["height-auto"])},qr={email:function(e,t){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address")},url:function(e,t){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")}};function Ur(e){e.inputValidator||Object.keys(qr).forEach((function(t){e.input===t&&(e.inputValidator=qr[t])}))}function Hr(e){(!e.target||"string"===typeof e.target&&!document.querySelector(e.target)||"string"!==typeof e.target&&!e.target.appendChild)&&(v('Target parameter is not valid, defaulting to "body"'),e.target="body")}function Wr(e){Ur(e),e.showLoaderOnConfirm&&!e.preConfirm&&v("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),Hr(e),"string"===typeof e.title&&(e.title=e.title.split("\n").join("<br />")),Ne(e)}var Kr=function(){function t(){if(r(this,t),"undefined"!==typeof window){xr=this;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=Object.freeze(this.constructor.argsToParams(i));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});var s=xr._main(xr.params);e.promise.set(this,s)}}return i(t,[{key:"_main",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};En(Object.assign({},n,t)),ge.currentInstance&&(ge.currentInstance._destroy(),K()&&Vt()),ge.currentInstance=xr;var r=Yr(t,n);Wr(r),Object.freeze(r),ge.timeout&&(ge.timeout.stop(),delete ge.timeout),clearTimeout(ge.restoreFocusTimeout);var i=Qr(xr);return gt(xr,r),e.innerParams.set(xr,r),Gr(xr,i,r)}},{key:"then",value:function(t){return e.promise.get(this).then(t)}},{key:"finally",value:function(t){return e.promise.get(this).finally(t)}}]),t}(),Gr=function(e,t,n){return new Promise((function(r,i){var a=function(t){e.close({isDismissed:!0,dismiss:t})};Lt.swalPromiseResolve.set(e,r),Lt.swalPromiseReject.set(e,i),t.confirmButton.onclick=function(){Wn(e)},t.denyButton.onclick=function(){Kn(e)},t.cancelButton.onclick=function(){Gn(e,a)},t.closeButton.onclick=function(){a(St.close)},er(e,t,a),It(e,ge,n,a),Dn(e,n),Lr(n),$r(ge,n,a),Xr(t,n),setTimeout((function(){t.container.scrollTop=0}))}))},Yr=function(e,t){var n=Sr(e),r=Object.assign({},vn,t,n,e);return r.showClass=Object.assign({},vn.showClass,r.showClass),r.hideClass=Object.assign({},vn.hideClass,r.hideClass),r},Qr=function(t){var n={popup:T(),container:C(),actions:B(),confirmButton:D(),denyButton:L(),cancelButton:F(),loader:V(),closeButton:U(),validationMessage:R(),progressSteps:P()};return e.domCache.set(t,n),n},$r=function(e,t,n){var r=q();ue(r),t.timer&&(e.timeout=new Cr((function(){n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(se(r),Z(r,t,"timerProgressBar"),setTimeout((function(){e.timeout&&e.timeout.running&&ve(t.timer)}))))},Xr=function(e,t){t.toast||(w(t.allowEnterKey)?Jr(e,t)||Nt(-1,1):Zr())},Jr=function(e,t){return t.focusDeny&&fe(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&fe(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!fe(e.confirmButton))&&(e.confirmButton.focus(),!0)},Zr=function(){document.activeElement instanceof HTMLElement&&"function"===typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!==typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){var ei=new Date,ti=localStorage.getItem("swal-initiation");ti?(ei.getTime()-Date.parse(ti))/864e5>3&&setTimeout((function(){document.body.style.pointerEvents="none";var e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((function(){e.play().catch((function(){}))}),2500)}),500):localStorage.setItem("swal-initiation","".concat(ei))}Object.assign(Kr.prototype,On),Object.assign(Kr,_r),Object.keys(On).forEac
2h((function(e){Kr[e]=function(){var t;if(xr)return(t=xr)[e].apply(t,arguments)}})),Kr.DismissReason=St,Kr.version="11.7.2";var ni=Kr;return ni.default=ni,ni}(),"undefined"!==typeof this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;
2top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;
2left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4
vendor: 3,603 bytes, line 2
2}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{
2top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')},1564:function(e){var t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,n=function(e){return e.match(t)||[]},r=function(e){return e[0].toUpperCase()+e.slice(1)},i=function(e,t){return n(e).join(t).toLowerCase()},a=function(e){return n(e).reduce((function(e,t){return"".concat(e).concat(e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase())}),"")};e.exports={words:n,upperFirst:r,camelCase:a,pascalCase:function(e){return r(a(e))},snakeCase:function(e){return i(e,"_")},kebabCase:function(e){return i(e,"-")},sentenceCase:function(e){return r(i(e," "))},titleCase:function(e){return n(e).map(r).join(" ")}}},6514:function(e){function t(e,t){var n=e.length,r=new Array(n),i={},a=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)i[a]||u(e[a],a,new Set);return r;function u(e,t,a){if(a.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(h){l=""}throw new Error("Cyclic dependency"+l)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=o.get(e)||new Set;if(t=(c=Array.from(c)).length){a.add(e);do{var f=c[--t];u(f,s.get(f),a)}while(t);a.delete(e)}r[--n]=e}}}
2e.exports=function(e){return t(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=t},6115:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},6690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3515:function(e,t,n){var r=n(6015),i=n(9617);function a(t,n,o){return i()?(e.exports=a=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports),a.apply(null,arguments)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},9728:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},6389:function(e,t,n){var r=n(3808),i=n(9617),a=n(4993);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},1588:function(e,t,n){var r=n(1753);function i(){return"undefined"!==typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var i=r(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},3808:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1655:function(e,t,n){var r=n(6015);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},9617:function(e){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},4993:function(e,t,n){var r=n(8698).default,i=n(6115);e.exports=function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1753:function(e,t,n){var r=n(3808);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var i=t[r];
vendor: 5,479 bytes, line 2
2if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){"use strict";var e=n(1250);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(){r=function(){return e};var e={},n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(I){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),o=new E(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return T()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(I){return{type:"throw",arg:I}}}e.wrap=c;var h={};function d(){}function p(){}function v(){}var m={};l(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==n&&i.call(g,o)&&(m=g);var b=v.prototype=d.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,n){function r(a,o,s,u){var l=f(e[a],e,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==t(h)&&i.call(h,"__await")?n.resolve(h.__await).then((function(e){r("next",e,s,u)}),(function(e){r("throw",e,s,u)})):n.resolve(h).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,u)}))}u(l.arg)}var a;this._invoke=function(e,t){function i(){return new n((function(n,i){r(e,t,n,i)}))}return a=a?a.then(i,i):i()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=v,l(b,"constructor",v),l(v,"constructor",p),p.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},w(x.prototype),l(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new x(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},w(b),l(b,u,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(C),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function i(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(ch){return void n(ch)}s.done?t(u):Promise.resolve(u).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function s(e){i(o,r,a,s,u,"next",e)}function u(e){i(o,r,a,s,u,"throw",e)}s(void 0)}))}}function o(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 s(e,t){if(e){if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(u){s=!0,i=u}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l,c=n(2791);function f(){return f=Object.assign?Object.assign.bind():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},f.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(l||(l={}));var h=function(e){return e};var d="beforeunload",p="popstate";function v(e){e.preventDefault(),e.returnValue=""}function m(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function y(){return Math.random().toString(36).substr(2,8)}function g(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,a=e.hash,o=void 0===a?"":a;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function b(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var w=(0,c.createContext)(null);var x=(0,c.createContext)(null);var k=(0,c.createContext)({outlet:null,matches:[]});function _(e,t){if(!e)throw new Error(t)}
2function C(e,t,n){void 0===n&&(n="/");var r=O(("string"===typeof t?b(t):t).pathname||"/",n);if(null==r)return null;var i=E(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var a=null,o=0;null==a&&o<i.length;++o)a=N(i[o],r);return a}function E(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach((function(e,i){var a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(r)||_(!1),a.relativePath=a.relativePath.slice(r.length));var o=P([r,a.relativePath]),s=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&_(!1),E(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:I(o,e.index),routesMeta:s})})),t}var S=/^:\w+$/,T=function(e){return"*"===e};function I(e,t){var n=e.split("/"),r=n.length;return n.some(T)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!T(e)})).reduce((function(e,t){return e+(S.test(t)?3:""===t?1:10)}),r)}function N(e,t){for(var n=e.routesMeta,r={},i="/",a=[],o=0;o<n.length;++o){var s=n[o],u=o===n.length-1,l="/"===i?t:t.slice(i.length)||"/",c=A({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!c)return null;
2Object.assign(r,c.params);var f=s.route;a.push({params:r,pathname:P([i,c.pathname]),pathnameBase:R(P([i,c.pathnameBase])),route:f}),"/"!==c.pathnameBase&&(i=P([i,c.pathnameBase]))}return a}function A(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(function(e,t){return r.push(t),"([^\\/]+)"}));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";return[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),r=u(n,2),i=r[0],a=r[1],o=t.match(i);if(!o)return null;var s=o[0],l=s.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:a.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";l=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(ch){return e}}(c[n]||""),e}),{}),pathname:s,pathnameBase:l,pattern:e}}function j(e,t,n){var r,i="string"===typeof e?b(e):e,a=""===e||""===i.pathname?"/":i.pathname;if(null==a)r=n;else{var o=t.length-1;if(a.startsWith("..")){for(var s=a.split("/");".."===s[0];)s.shift(),o-=1;i.pathname=s.join("/")}r=o>=0?t[o]:"/"}var u=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?b(e):e,r=n.pathname,i=n.search,a=void 0===i?"":i,o=n.hash,s=void 0===o?"":o,u=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:u,search:D(a),hash:F(s)}}(i,r);return a&&"/"!==a&&a.endsWith("/")&&!u.pathname.endsWith("/")&&(u.pathname+="/"),u}function O(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}var P=function(e){return e.join("/").replace(/\/\/+/g,"/")},R=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},D=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},F=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};function L(e){M()||_(!1);var t=(0,c.useContext)(w),n=t.basename,r=t.navigator,i=q(e),a=i.hash,o=i.pathname,s=i.search,u=o;if("/"!==n){var l=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?b(e).pathname:e.pathname}(e),f=null!=l&&l.endsWith("/");u="/"===o?n+(f?"/":""):P([n,o])}return r.createHref({pathname:u,search:s,hash:a})}function M(){return null!=(0,c.useContext)(x)}function V(){return M()||_(!1),(0,c.useContext)(x).location}function B(){M()||_(!1);var e=(0,c.useContext)(w),t=e.basename,n=e.navigator,r=(0,c.useContext)(k).matches,i=V().pathname,a=JSON.stringify(r.map((function(e){return e.pathnameBase}))),o=(0,c.useRef)(!1);(0,c.useEffect)((function(){o.current=!0}));var s=(0,c.useCallback)((function(e,r){if(void 0===r&&(r={}),o.current)if("number"!==typeof e){var s=j(e,JSON.parse(a),i);"/"!==t&&(s.pathname=P([t,s.pathname])),(r.replace?n.replace:n.push)(s,r.state)}else n.go(e)}),[t,n,a,i]);return s}function z(){var e=(0,c.useContext)(k).matches,t=e[e.length-1];return t?t.params:{}}function q(e){var t=(0,c.useContext)(k).matches,n=V().pathname,r=JSON.stringify(t.map((function(e){return e.pathnameBase})));return(0,c.useMemo)((function(){return j(e,JSON.parse(r),n)}),[e,r,n])}function U(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight((function(n,r,i){return(0,c.createElement)(k.Provider,{children:void 0!==r.route.element?r.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,i+1))}})}),null)}function H(e){_(!1)}function W(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,a=e.location,o=e.navigationType,s=void 0===o?l.Pop:o,u=e.navigator,f=e.static,h=void 0!==f&&f;M()&&_(!1);var d=R(n),p=(0,c.useMemo)((function(){return{basename:d,navigator:u,static:h}}),[d,u,h]);"string"===typeof a&&(a=b(a));var v=a,m=v.pathname,y=void 0===m?"/":m,g=v.search,k=void 0===g?"":g,C=v.hash,E=void 0===C?"":C,S=v.state,T=void 0===S?null:S,I=v.key,N=void 0===I?"default":I,A=(0,c.useMemo)((function(){var e=O(y,d);return null==e?null:{pathname:e,search:k,hash:E,state:T,key:N}}),[d,y,k,E,T,N]);return null==A?null:(0,c.createElement)(w.Provider,{value:p},(0,c.createElement)(x.Provider,{children:i,value:{location:A,navigationType:s}}))}function K(e){var t=e.children,n=e.location;return function(e,t){M()||_(!1);var n,r=(0,c.useContext)(k).matches,i=r[r.length-1],a=i?i.params:{},o=(i&&i.pathname,i?i.pathnameBase:"/"),s=(i&&i.route,V());if(t){var u,l="string"===typeof t?b(t):t;"/"===o||(null==(u=l.pathname)?void 0:u.startsWith(o))||_(!1),n=l}else n=s;var f=n.pathname||"/",h=C(e,{pathname:"/"===o?f:f.slice(o.length)||"/"});return U(h&&h.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:P([o,e.pathname]),pathnameBase:"/"===e.pathnameBase?o:P([o,e.pathnameBase])})})),r)}(G(t),n)}function G(e){var t=[];
2return c.Children.forEach(e,(function(e){if((0,c.isValidElement)(e))if(e.type!==c.Fragment){e.type!==H&&_(!1);var n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=G(e.props.children)),t.push(n)}else t.push.apply(t,G(e.props.children))})),t}function Y(){return Y=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},Y.apply(this,arguments)}function Q(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var $=["onClick","reloadDocument","replace","state","target","to"],X=["aria-current","caseSensitive","className","end","style","to","children"];function J(e){var t=e.basename,n=e.children,r=e.window,i=(0,c.useRef)();null==i.current&&(i.current=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function i(){var e=n.location,t=e.pathname,i=e.search,a=e.hash,o=r.state||{};return[o.idx,h({pathname:t,search:i,hash:a,state:o.usr||null,key:o.key||"default"})]}var a=null;n.addEventListener(p,(function(){if(a)x.call(a),a=null;else{var e=l.Pop,t=i(),n=t[0],r=t[1];if(x.length){if(null!=n){var o=u-n;o&&(a={action:e,location:r,retry:function(){T(-1*o)}},T(o))}}else S(e)}}));var o=l.Pop,s=i(),u=s[0],c=s[1],w=m(),x=m();function k(e){return"string"===typeof e?e:g(e)}function _(e,t){return void 0===t&&(t=null),h(f({pathname:c.pathname,hash:"",search:""},"string"===typeof e?b(e):e,{state:t,key:y()}))}function C(e,t){return[{usr:e.state,key:e.key,idx:t},k(e)]}function E(e,t,n){return!x.length||(x.call({action:e,location:t,retry:n}),!1)}function S(e){o=e;var t=i();u=t[0],c=t[1],w.call({action:o,location:c})}function T(e){r.go(e)}null==u&&(u=0,r.replaceState(f({},r.state,{idx:u}),""));var I={get action(){return o},get location(){return c},createHref:k,push:function e(t,i){var a=l.Push,o=_(t,i);if(E(a,o,(function(){e(t,i)}))){var s=C(o,u+1),c=s[0],f=s[1];try{r.pushState(c,"",f)}catch(ch){n.location.assign(f)}S(a)}},replace:function e(t,n){var i=l.Replace,a=_(t,n);if(E(i,a,(function(){e(t,n)}))){var o=C(a,u),s=o[0],c=o[1];r.replaceState(s,"",c),S(i)}},go:T,back:function(){T(-1)},forward:function(){T(1)},listen:function(e){return w.push(e)},block:function(e){var t=x.push(e);return 1===x.length&&n.addEventListener(d,v),function(){t(),x.length||n.removeEventListener(d,v)}}};return I}({window:r}));var a=i.current,o=u((0,c.useState)({action:a.action,location:a.location}),2),s=o[0],w=o[1];return(0,c.useLayoutEffect)((function(){return a.listen(w)}),[a]),(0,c.createElement)(W,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}var Z=(0,c.forwardRef)((function(e,t){var n=e.onClick,r=e.reloadDocument,i=e.replace,a=void 0!==i&&i,o=e.state,s=e.target,u=e.to,l=Q(e,$),f=L(u),h=function(e,t){var n=void 0===t?{}:t,r=n.target,i=n.replace,a=n.state,o=B(),s=V(),u=q(e);return(0,c.useCallback)((function(t){if(0===t.button&&(!r||"_self"===r)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();var n=!!i||g(s)===g(u);o(e,{replace:n,state:a})}}),[s,o,u,i,a,r,e])}(u,{replace:a,state:o,target:s});return(0,c.createElement)("a",Y({},l,{href:f,onClick:function(e){n&&n(e),e.defaultPrevented||r||h(e)},ref:t,target:s}))}));var ee=(0,c.forwardRef)((function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,i=e.caseSensitive,a=void 0!==i&&i,o=e.className,s=void 0===o?"":o,u=e.end,l=void 0!==u&&u,f=e.style,h=e.to,d=e.children,p=Q(e,X),v=V(),m=q(h),y=v.pathname,g=m.pathname;a||(y=y.toLowerCase(),g=g.toLowerCase());var b,w=y===g||!l&&y.startsWith(g)&&"/"===y.charAt(g.length),x=w?r:void 0;b="function"===typeof s?s({isActive:w}):[s,w?"active":null].filter(Boolean).join(" ");var k="function"===typeof f?f({isActive:w}):f;return(0,c.createElement)(Z,Y({},p,{"aria-current":x,className:b,ref:t,style:k,to:h}),"function"===typeof d?d({isActive:w}):d)}));var te=(0,c.createContext)({}),ne=n(184);var re=function(){var e,t,n,r,i,a,o,s,u,l=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{children:(0,ne.jsxs)("div",{className:"px-4 py-8",children:[(0,ne.jsx)("div",{className:"flex justify-center items-center pb-5",children:(null===l||void 0===l||null===(e=l.gmb)||void 0===e?void 0:e.link.length)>1?(0,ne.jsx)("a",{href:null===l||void 0===l||null===(t=l.gmb)||void 0===t?void 0:t.link,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("img",{src:null===l||void 0===l||null===(n=l.gmb)||void 0===n?void 0:n.img,alt:"Not found",width:"250px"})}):null}),(null===l||void 0===l||null===(r=l.dbSocialMedia)||void 0===r?void 0:r.redes.length)>0||(null===l||void 0===l||null===(i=l.dbSocialMedia)||void 0===i?void 0:i.directorios.length)>0?(0,ne.jsx)("h2",{className:"text-center pb-5",children:"Find Us On"}):null,(0,ne.jsxs)("div",{className:"w-4/5 mx-auto flex flex-wrap justify-center items-center gap-4 pb-5",children:[(null===l||void 0===l||null===(a=l.dbSocialMedia)||void 0===a?void 0:a.directorios.length)>0?null===l||void 0===l||null===(o=l.dbSocialMedia)||void 0===o?void 0:o.directorios.map((function(e,t){return(0,ne.jsx)("div",{className:"text-center content-directorios",children:(0,ne.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("img",{src:e.image,alt:"Not found",width:"250px"})})},t)})):null,(null===l||void 0===l||null===(s=l.dbSocialMedia)||void 0===s?void 0:s.redes.length)>0?null===l||void 0===l||null===(u=l.dbSocialMedia)||void 0===u?void 0:u.redes.map((function(e,t){return(0,ne.jsx)("div",{className:"text-center content-directorios",children:(0,ne.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("img",{src:e.image,alt:"Not Found",width:"250px"})})},t)})):null]})]})})},ie=function(e){var t,n,r,i,a,o,s,u,l,f,h,d,p,v,m,y,g,b,w,x,k,_,C,E,S,T,I,N,A=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{className:"",children:(0,ne.jsx)("form-contact",{to:null===A||void 0===A||null===(t=A.dbPrincipal)||void 0===t||null===(n=t.emails)||void 0===n?void 0:n[0].email,services:null===A||void 0===A||null===(r=A.dbServices)||void 0===r?void 0:r.slice(0,6).map((function(e,t){return e.name})),server:null===A||void 0===A?void 0:A.linkPostEmail,img:null===A||void 0===A||null===(i=A.dbPrincipal)||void 0===i?void 0:i.logo,emailcolor:"
21",tname:null===A||void 0===A||null===(a=A.labels)||void 0===a||null===(o=a.formLabel)||void 0===o?void 0:o.tname,tlname:null===A||void 0===A||null===(s=A.labels)||void 0===s||null===(u=s.formLabel)||void 0===u?void 0:u.tlname,temail:null===A||void 0===A||null===(l=A.labels)||void 0===l||null===(f=l.formLabel)||void 0===f?void 0:f.temail,tphone:null===A||void 0===A||null===(h=A.labels)||void 0===h||null===(d=h.formLabel)||void 0===d?void 0:d.tphone,taddress:null===A||void 0===A||null===(p=A.labels)||void 0===p||null===(v=p.formLabel)||void 0===v?void 0:v.taddress,ttypeservice:null===A||void 0===A||null===(m=A.labels)||void 0===m||null===(y=m.formLabel)||void 0===y?void 0:y.ttypeservice,tbestway:null===A||void 0===A||null===(g=A.labels)||void 0===g||null===(b=g.formLabel)||void 0===b?void 0:b.tbestway,tcheckphone:null===A||void 0===A||null===(w=A.labels)||void 0===w||null===(x=w.formLabel)||void 0===x?void 0:x.tcheckphone,tcheckcorreo:null===A||void 0===A||null===(k=A.labels)||void 0===k||null===(_=k.formLabel)||void 0===_?void 0:_.tcheckcorreo,tmessage:null===A||void 0===A||null===(C=A.labels)||void 0===C||null===(E=C.formLabel)||void 0===E?void 0:E.tmessage,tbutton:null===A||void 0===A||null===(S=A.labels)||void 0===S||null===(T=S.formLabel)||void 0===T?void 0:T.tbutton,isenglish:null===A||void 0===A||null===(I=A.labels)||void 0===I||null===(N=I.formLabel)||void 0===N?void 0:N.isenglish})})};var ae=function(){return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsx)("div",{className:"w-full flex justify-center",children:(0,ne.jsxs)("div",{className:"max-w-2xl p-5 mx-5 bg-white shadow-lg ",children:[(0,ne.jsx)("h2",{className:"text-center",children:"Send Us A Message"}),(0,ne.jsx)("div",{className:"p-4",children:(0,ne.jsx)(ie,{})})]})})})};function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(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 ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var ce=le("Tab"),fe=le("TabList"),he=le("TabPanel");function de(e,t){return c.Children.map(e,(function(e){return null===e?null:function(e){return ce(e)||fe(e)||he(e)}(e)?t(e):e.props&&e.props.children&&"object"===typeof e.props.children?(0,c.cloneElement)(e,ue(ue({},e.props),{},{children:de(e.props.children,t)})):e}))}function pe(e,t){return c.Children.forEach(e,(function(e){null!==e&&(ce(e)||he(e)?t(e):e.props&&e.props.children&&"object"===typeof e.props.children&&(fe(e)&&t(e),pe(e.props.children,t)))}))}function ve(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function me(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=me(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var ye=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=me(e))&&(r&&(r+=" "),r+=t);return r};function ge(e){var t=0;return pe(e,(function(e){ce(e)&&t++})),t}var be,we=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function xe(e){return e&&"getAttribute"in e}function ke(e){return xe(e)&&e.getAttribute("data-rttab")}function _e(e){return xe(e)&&"true"===e.getAttribute("aria-disabled")}var Ce=function(e){var t=(0,c.useRef)([]),n=(0,c.useRef)([]),r=(0,c.useRef)();function i(t,n){t<0||t>=s()||(0,e.onSelect)(t,e.selectedIndex,n)}function a(e){for(var t=s(),n=e+1;n<t;n++)if(!_e(u(n)))return n;for(var r=0;r<e;r++)if(!_e(u(r)))return r;return e}function o(e){for(var t=e;t--;)if(!_e(u(t)))return t;for(t=s();t-- >e;)if(!_e(u(t)))return t;return e}function s(){return ge(e.children)}
2function u(e){return t.current["tabs-".concat(e)]}function l(e){var t=e.target;do{if(f(t)){if(_e(t))return;return void i([].slice.call(t.parentNode.children).filter(ke).indexOf(t),e)}}while(null!=(t=t.parentNode))}function f(e){if(!ke(e))return!1;var t=e.parentElement;do{if(t===r.current)return!0;if(t.getAttribute("data-rttabs"))break;t=t.parentElement}while(t);return!1}e.children;var h=e.className,d=(e.disabledTabClassName,e.domRef),p=(e.focus,e.forceRenderTabPanel,e.onSelect,e.selectedIndex,e.selectedTabClassName,e.selectedTabPanelClassName,e.environment,e.disableUpDownKeys,e.disableLeftRightKeys,ve(e,we));return c.createElement("div",Object.assign({},p,{className:ye(h),onClick:l,onKeyDown:function(t){var n=e.direction,r=e.disableUpDownKeys,c=e.disableLeftRightKeys;if(f(t.target)){var h=e.selectedIndex,d=!1,p=!1;"Space"!==t.code&&32!==t.keyCode&&"Enter"!==t.code&&13!==t.keyCode||(d=!0,p=!1,l(t)),(c||37!==t.keyCode&&"ArrowLeft"!==t.code)&&(r||38!==t.keyCode&&"ArrowUp"!==t.code)?(c||39!==t.keyCode&&"ArrowRight"!==t.code)&&(r||40!==t.keyCode&&"ArrowDown"!==t.code)?35===t.keyCode||"End"===t.code?(h=function(){for(var e=s();e--;)if(!_e(u(e)))return e;return null}(),d=!0,p=!0):36!==t.keyCode&&"Home"!==t.code||(h=function(){for(var e=s(),t=0;t<e;t++)if(!_e(u(t)))return t;return null}(),d=!0,p=!0):(h="rtl"===n?o(h):a(h),d=!0,p=!0):(h="rtl"===n?a(h):o(h),d=!0,p=!0),d&&t.preventDefault(),p&&i(h,t)}},ref:function(e){r.current=e,d&&d(e)},"data-rttabs":!0}),function(){var r=0,i=e.children,a=e.disabledTabClassName,o=e.focus,l=e.forceRenderTabPanel,f=e.selectedIndex,h=e.selectedTabClassName,d=e.selectedTabPanelClassName,p=e.environment;n.current=n.current||[];for(var v=n.current.length-s(),m=(0,c.useId)();v++<0;)n.current.push("".concat(m).concat(n.current.length));return de(i,(function(e){var i=e;if(fe(e)){var s=0,v=!1;null==be&&function(e){var t=e||("undefined"!==typeof window?window:void 0);try{be=!("undefined"===typeof t||!t.document||!t.document.activeElement)}catch(AF){be=!1}}(p);var m=p||("undefined"!==typeof window?window:void 0);be&&m&&(v=c.Children.toArray(e.props.children).filter(ce).some((function(e,t){return m.document.activeElement===u(t)}))),i=(0,c.cloneElement)(e,{children:de(e.props.children,(function(e){var r="tabs-".concat(s),i=f===s,u={tabRef:function(e){t.current[r]=e},id:n.current[s],selected:i,focus:i&&(o||v)};return h&&(u.selectedClassName=h),a&&(u.disabledClassName=a),s++,(0,c.cloneElement)(e,u)}))})}else if(he(e)){var y={id:n.current[r],selected:f===r};l&&(y.forceRender=l),d&&(y.selectedClassName=d),r++,i=(0,c.cloneElement)(e,y)}return i}))}())};Ce.defaultProps={className:"react-tabs",focus:!1},Ce.propTypes={};var Ee=Ce,Se=function(e){var t=e.children,n=e.defaultFocus,r=e.defaultIndex,i=e.focusTabOnClick,a=e.onSelect,o=u((0,c.useState)(n),2),s=o[0],l=o[1],f=(0,c.useState)(function(e){return null===e.selectedIndex?1:0}(e)),h=u(f,1)[0],d=u((0,c.useState)(1===h?r||0:null),2),p=d[0],v=d[1];if((0,c.useEffect)((function(){l(!1)}),[]),1===h){var m=ge(t);(0,c.useEffect)((function(){if(null!=p){var e=Math.max(0,m-1);v(Math.min(p,e))}}),[m])}var y=ue({},e);return y.focus=s,y.onSelect=function(e,t,n){"function"===typeof a&&!1===a(e,t,n)||(i&&l(!0),1===h&&v(e))},null!=p&&(y.selectedIndex=p),delete y.defaultFocus,delete y.defaultIndex,delete y.focusTabOnClick,c.createElement(Ee,y,t)};
2Se.propTypes={},Se.defaultProps={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},Se.tabsRole="Tabs";var Te=Se,Ie=["children","className"],Ne=function(e){var t=e.children,n=e.className,r=ve(e,Ie);return c.createElement("ul",Object.assign({},r,{className:ye(n),role:"tablist"}),t)};Ne.tabsRole="TabList",Ne.propTypes={},Ne.defaultProps={className:"react-tabs__tab-list"};var Ae=Ne,je=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"],Oe="react-tabs__tab",Pe={className:Oe,disabledClassName:"".concat(Oe,"--disabled"),focus:!1,id:null,selected:!1,selectedClassName:"".concat(Oe,"--selected")},Re=function(e){var t,n=(0,c.useRef)(),r=e.children,i=e.className,a=e.disabled,o=e.disabledClassName,s=e.focus,u=e.id,l=e.selected,f=e.selectedClassName,h=e.tabIndex,d=e.tabRef,p=ve(e,je);return(0,c.useEffect)((function(){l&&s&&n.current.focus()}),[l,s]),c.createElement("li",Object.assign({},p,{className:ye(i,(t={},oe(t,f,l),oe(t,o,a),t)),ref:function(e){n.current=e,d&&d(e)},role:"tab",id:"tab".concat(u),"aria-selected":l?"true":"false","aria-disabled":a?"true":"false","aria-controls":"panel".concat(u),tabIndex:h||(l?"0":null),"data-rttab":!0}),r)};Re.propTypes={},Re.tabsRole="Tab",Re.defaultProps=Pe;var De=Re,Fe=["children","className","forceRender","id","selected","selectedClassName"],Le="react-tabs__tab-panel",Me={className:Le,forceRender:!1,selectedClassName:"".concat(Le,"--selected")},Ve=function(e){var t=e.children,n=e.className,r=e.forceRender,i=e.id,a=e.selected,o=e.selectedClassName,s=ve(e,Fe);return c.createElement("div",Object.assign({},s,{className:ye(n,oe({},o,a)),role:"tabpanel",id:"panel".concat(i),"aria-labelledby":"tab".concat(i)}),r||a?t:null)};Ve.tabsRole="TabPanel",Ve.propTypes={},Ve.defaultProps=Me;var Be=Ve,ze=function(){var e,t,n,r,i,a,o,s,u,l,f,h,d,p,v=(0,c.useContext)(te).rpdata;return(0,ne.jsxs)("div",{children:[(0,ne.jsx)("div",{className:"md:w-[95%] mx-auto mt-[60px]",children:null!==v&&void 0!==v&&null!==(e=v.labels)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.titleMap?(0,ne.jsx)("h2",{className:"text-center pb-5",children:null===v||void 0===v||null===(n=v.labels)||void 0===n||null===(r=n.general)||void 0===r?void 0:r.titleMap}):(0,ne.jsxs)("h2",{className:"text-center pb-5",children:["We Cover ",null===v||void 0===v||null===(i=v.dbPrincipal)||void 0===i?void 0:i.miles," Miles Around ",null===v||void 0===v||null===(a=v.dbPrincipal)||void 0===a||null===(o=a.location)||void 0===o?void 0:o[0].address]})}),(null===v||void 0===v||null===(s=v.dbPrincipal)||void 0===s?void 0:s.location.length)>1?(0,ne.jsxs)(Te,{children:[(0,ne.jsx)(Ae,{children:(0,ne.jsx)("div",{className:"flex flex-col md:flex-row justify-center text-center",children:null===v||void 0===v||null===(u=v.dbPrincipal)||void 0===u||null===(l=u.location)||void 0===l?void 0:l.map((function(e,t){return(0,ne.jsx)(De,{children:e.address},t)}))})}),null===v||void 0===v||null===(f=v.dbPrincipal)||void 0===f||null===(h=f.location)||void 0===h?void 0:h.map((function(e,t){return(0,ne.jsx)(Be,{children:(0,ne.jsx)("iframe",{loading:"lazy",title:"Cover Locations",src:e.url,style:{width:"100%",height:"400px"}})},t)}))]}):(0,ne.jsx)("iframe",{src:null===v||void 0===v||null===(d=v.dbPrincipal)||void 0===d||null===(p=d.location)||void 0===p?void 0:p[0].url,loading:"lazy",title:"Cover Locations",className:"w-full h-[500px]"})]})},qe=function(){var e,t=u((0,c.useState)(!0),2),n=t[0],r=t[1],i=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(ne.Fragment,{children:n?(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsxs)("div",{className:"relative z-50","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[(0,ne.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-75 transition-opacity"}),(0,ne.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,ne.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,ne.jsxs)("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[(0,ne.jsx)("div",{className:"bg-white pt-5",children:(0,ne.jsxs)("div",{className:"sm:flex sm:items-start",children:[(0,ne.jsx)("button",{className:"absolute top-3 right-3 px-2 rounded-full text-[#000] hover:text-[#00B3B3]",id:"modal-title",onClick:function(){return r(!1)},children:(0,ne.jsx)("i",{className:"fa fa-times"})}),(0,ne.jsx)("div",{className:"w-full flex justify-center item-center flex-col ",children:(0,ne.jsx)("div",{className:"w-full flex justify-center ",children:(0,ne.jsx)("img",{src:null===i||void 0===i||null===(e=i.dbPrincipal)||void 0===e?void 0:e.logo,className:"md:w-[50%] w-[70%]",alt:"Not Found",loading:"lazy"})})})]})}),(0,ne.jsx)("h4",{className:"text-center",children:"Request An Estimate Now"}),(0,ne.jsx)(ie,{})]})})})]})}):null})},Ue=n(2007),He=n.n(Ue),We=n(9475),Ke=n.n(We),Ge=n(77),Ye=n.n(Ge),Qe=n(1725),$e=n.n(Qe),Xe="bodyAttributes",Je="htmlAttributes",Ze="titleAttributes",et={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},tt=(Object.keys(et).map((function(e){return et[e]})),"charset"),nt="cssText",rt="href",it="http-equiv",at="innerHTML",ot="itemprop",st="name",ut="property",lt="rel",ct="src",ft="target",ht={accesskey:"accessKey",charset
2:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},dt="defaultTitle",pt="defer",vt="encodeSpecialCharacters",mt="onChangeClientState",yt="titleTemplate",gt=Object.keys(ht).reduce((function(e,t){return e[ht[t]]=t,e}),{}),bt=[et.NOSCRIPT,et.SCRIPT,et.STYLE],wt="data-react-helmet",xt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ct=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},Et=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},St=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},Tt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},It=function(e){var t=Pt(e,et.TITLE),n=Pt(e,yt);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=Pt(e,dt);return t||r||void 0},Nt=function(e){return Pt(e,mt)||function(){}},At=function(e,t){return t.filter((function(t){return"undefined"!==typeof t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return Ct({},e,t)}),{})},jt=function(e,t){return t.filter((function(e){return"undefined"!==typeof e[et.BASE]})).map((function(e){return e[et.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var a=r[i].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}return t}),[])},Ot=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||("undefined"!==typeof t[e]&&Mt("Helmet: "+e+' should be of type "Array". Instead found type "'+xt(t[e])+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var i={};n.filter((function(e){for(var n=void 0,a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],u=s.toLowerCase();-1===t.indexOf(u)||n===lt&&"canonical"===e[n].toLowerCase()||u===lt&&"stylesheet"===e[u].toLowerCase()||(n=u),-1===t.indexOf(s)||s!==at&&s!==nt&&s!==ot||(n=s)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][l]&&(i[n][l]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],u=$e()({},r[s],i[s]);r[s]=u}return e}),[]).reverse()},Pt=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},Rt=function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout((function(){Rt(t)}),0)}}(),Dt=function(e){return clearTimeout(e)},Ft="undefined"!==typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Rt:n.g.requestAnimationFrame||Rt,Lt="undefined"!==typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Dt:n.g.cancelAnimationFrame||Dt,Mt=function(e){return console&&"function"===typeof console.warn&&console.warn(e)},Vt=null,Bt=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,u=e.onChangeClientState,l=e.scriptTags,c=e.styleTags,f=e.title,h=e.titleAttributes;Ut(et.BODY,r),Ut(et.HTML,i),qt(f,h);var d={baseTag:Ht(et.BASE,n),linkTags:Ht(et.LINK,a),metaTags:Ht(et.META,o),noscriptTags:Ht(et.NOSCRIPT,s),scriptTags:Ht(et.SCRIPT,l),styleTags:Ht(et.STYLE,c)},p={},v={};
2Object.keys(d).forEach((function(e){var t=d[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(v[e]=d[e].oldTags)})),t&&t(),u(e,p,v)},zt=function(e){return Array.isArray(e)?e.join(""):e},qt=function(e,t){"undefined"!==typeof e&&document.title!==e&&(document.title=zt(e)),Ut(et.TITLE,t)},Ut=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(wt),i=r?r.split(","):[],a=[].concat(i),o=Object.keys(t),s=0;s<o.length;s++){var u=o[s],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===i.indexOf(u)&&i.push(u);var c=a.indexOf(u);-1!==c&&a.splice(c,1)}for(var f=a.length-1;f>=0;f--)n.removeAttribute(a[f]);i.length===a.length?n.removeAttribute(wt):n.getAttribute(wt)!==o.join(",")&&n.setAttribute(wt,o.join(","))}},Ht=function(e,t){var n=document.head||document.querySelector(et.HEAD),r=n.querySelectorAll(e+"["+"data-react-helmet]"),i=Array.prototype.slice.call(r),a=[],o=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===at)n.innerHTML=t.innerHTML;else if(r===nt)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var s="undefined"===typeof t[r]?"":t[r];n.setAttribute(r,s)}n.setAttribute(wt,"true"),i.some((function(e,t){return o=t,n.isEqualNode(e)}))?i.splice(o,1):a.push(n)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),a.forEach((function(e){return n.appendChild(e)})),{oldTags:i,newTags:a}},Wt=function(e){return Object.keys(e).reduce((function(t,n){var r="undefined"!==typeof e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},Kt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[ht[n]||n]=e[n],t}),t)},Gt=function(e,t,n){switch(e){case et.TITLE:return{toComponent:function(){return function(e,t,n){var r,i=((r={key:t})[wt]=!0,r),a=Kt(n,i);return[c.createElement(et.TITLE,a,t)]}(0,t.title,t.titleAttributes)},toString:function(){return function(e,t,n,r){var i=Wt(n),a=zt(t);return i?"<"+e+' data-react-helmet="true" '+i+">"+Tt(a,r)+"</"+e+">":"<"+e+' data-react-helmet="true">'+Tt(a,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case Xe:case Je:return{toComponent:function(){return Kt(t)},toString:function(){return Wt(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,i=((r={key:n})[wt]=!0,r);return Object.keys(t).forEach((function(e){var n=ht[e]||e;if(n===at||n===nt){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]})),c.createElement(e,i)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!(e===at||e===nt)})).reduce((function(e,t){var i="undefined"===typeof r[t]?t:t+'="'+Tt(r[t],n)+'"';return e?e+" "+i:i}),""),a=r.innerHTML||r.cssText||"",o=-1===bt.indexOf(e);return t+"<"+e+' data-react-helmet="true" '+i+(o?"/>":">"+a+"</"+e+">")}),"")}(e,t,n)}}}},Yt=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,u=e.scriptTags,l=e.styleTags,c=e.title,f=void 0===c?"":c,h=e.titleAttributes;return{base:Gt(et.BASE,t,r),bodyAttributes:Gt(Xe,n,r),htmlAttributes:Gt(Je,i,r),link:Gt(et.LINK,a,r),meta:Gt(et.META,o,r),noscript:Gt(et.NOSCRIPT,s,r),script:Gt(et.SCRIPT,u,r),style:Gt(et.STYLE,l,r),title:Gt(et.TITLE,{title:f,titleAttributes:h},r)}},Qt=function(e){var t,n;return n=t=function(t){function n(){return kt(this,n),St(this,t.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.shouldComponentUpdate=function(e){return!Ye()(this.props,e)},n.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case et.SCRIPT:case et.NOSCRIPT:return{innerHTML:t};case et.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},n.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,i=e.newChildProps,a=e.nestedChildren;return Ct({},r,((t={})[n.type]=[].concat(r[n.type]||[],[Ct({},i,this.mapNestedChildrenToProps(n,a))]),t))},n.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,a=e.newChildProps,o=e.nestedChildren;switch(r.type){case et.TITLE:return Ct({},i,((t={})[r.type]=o,t.titleAttributes=Ct({},a),t));case et.BODY:return Ct({},i,{bodyAttributes:Ct({},a)});case et.HTML:return Ct({},i,{htmlAttributes:Ct({},a)})}return Ct({},i,((n={})[r.type]=Ct({},a),n))},n.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=Ct({},t);return Object.keys(e).forEach((function(t){var r;n=Ct({},n,((r={})[t]=e[t],r))})),n}
2,n.prototype.warnOnInvalidChildren=function(e,t){return!0},n.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return c.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,a=i.children,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[gt[n]||n]=e[n],t}),t)}(Et(i,["children"]));switch(n.warnOnInvalidChildren(e,a),e.type){case et.LINK:case et.META:case et.NOSCRIPT:case et.SCRIPT:case et.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:o,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:o,nestedChildren:a})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},n.prototype.render=function(){var t=this.props,n=t.children,r=Et(t,["children"]),i=Ct({},r);return n&&(i=this.mapChildrenToProps(n,i)),c.createElement(e,i)},_t(n,null,[{key:"canUseDOM",set:function(t){e.canUseDOM=t}}]),n}(c.Component),t.propTypes={base:He().object,bodyAttributes:He().object,children:He().oneOfType([He().arrayOf(He().node),He().node]),defaultTitle:He().string,defer:He().bool,encodeSpecialCharacters:He().bool,htmlAttributes:He().object,link:He().arrayOf(He().object),meta:He().arrayOf(He().object),noscript:He().arrayOf(He().object),onChangeClientState:He().func,script:He().arrayOf(He().object),style:He().arrayOf(He().object),title:He().string,titleAttributes:He().object,titleTemplate:He().string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=e.peek,t.rewind=function(){var t=e.rewind();return t||(t=Yt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},n}(Ke()((function(e){return{baseTag:jt([rt,ft],e),bodyAttributes:At(Xe,e),defer:Pt(e,pt),encode:Pt(e,vt),htmlAttributes:At(Je,e),linkTags:Ot(et.LINK,[lt,rt],e),metaTags:Ot(et.META,[st,tt,it,ut,ot],e),noscriptTags:Ot(et.NOSCRIPT,[at],e),onChangeClientState:Nt(e),scriptTags:Ot(et.SCRIPT,[ct,at],e),styleTags:Ot(et.STYLE,[nt],e),title:It(e),titleAttributes:At(Ze,e)}}),(function(e){Vt&&Lt(Vt),e.defer?Vt=Ft((function(){Bt(e,(function(){Vt=null}))})):(Bt(e),Vt=null)}),Yt)((function(){return null})));Qt.renderStatic=Qt.rewind;var $t=function(e){var t,n,r,i,a,o=e.btnName,s=e.btnphone,u=e.btnStyle,l=e.btnLink,f=e.btnUrl,h=(0,c.useContext)(te).rpdata,d=function(){window.scrollTo({top:0,behavior:"smooth"})};return s||f?(0,ne.jsx)("a",{className:"\n                boton\n                my-3\n                ".concat(u,"\n                px-6\n                py-4\n                w-52\n                rounded-lg\n            "),href:f||"tel:+1".concat(s),children:(0,ne.jsx)("span",{children:f?o||"Order Now":s})}):null!==h&&void 0!==h&&null!==(t=h.simpleWidgets)&&void 0!==t&&null!==(n=t[3])&&void 0!==n&&n.activo?(0,ne.jsx)("a",{className:"\n                        boton\n                        my-3\n                        ".concat(u||"one","\n                        px-6\n                        py-4\n                        w-52\n                        rounded-lg\n                    "),href:l?"".concat(l):"tel:+1".concat(null===h||void 0===h||null===(r=h.dbPrincipal)||void 0===r||null===(i=r.phones)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.phone),onClick:d,children:(0,ne.jsx)("span",{className:"capitalize",children:o||"Contact us"})}):(0,ne.jsx)(Z,{className:"\n                        boton\n                        my-3\n                        ".concat(u||"one","\n                        px-6\n                        py-4\n                        w-52\n                        rounded-lg\n                    "),to:"/".concat(o?l:"contact"),onClick:d,children:(0,ne.jsx)("span",{className:"capitalize",children:o||"free estimate"})})},Xt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Jt=c.createContext&&c.createContext(Xt),Zt=function(){return Zt=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},Zt.apply(this,arguments)},en=function(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};function tn(e){return e&&e.map((function(e,t){return c.createElement(e.tag,Zt({key:t},e.attr),tn(e.child))}))}function nn(e){return function(t){return c.createElement(rn,Zt({attr:Zt({},e.attr)},t),tn(e.child))}}function rn(e){var t=function(t){var n,r=e.attr,i=e.size,a=e.title,o=en(e,["attr","size","title"]),s=i||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),c.createElement("svg",Zt({stroke:"currentColor",fill:"
2currentColor",strokeWidth:"0"},t.attr,r,o,{className:n,style:Zt(Zt({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&c.createElement("title",null,a),e.children)};return void 0!==Jt?c.createElement(Jt.Consumer,null,(function(e){return t(e)})):t(Xt)}function an(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7 11h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"}},{tag:"path",attr:{d:"M5 22h14c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2h-2V2h-2v2H9V2H7v2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zM19 8l.001 12H5V8h14z"}}]})(e)}function on(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 3H4a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zM9 9H5V5h4v4zm11 4h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1zm-1 6h-4v-4h4v4zM17 3c-2.206 0-4 1.794-4 4s1.794 4 4 4 4-1.794 4-4-1.794-4-4-4zm0 6c-1.103 0-2-.897-2-2s.897-2 2-2 2 .897 2 2-.897 2-2 2zM7 13c-2.206 0-4 1.794-4 4s1.794 4 4 4 4-1.794 4-4-1.794-4-4-4zm0 6c-1.103 0-2-.897-2-2s.897-2 2-2 2 .897 2 2-.897 2-2 2z"}}]})(e)}function sn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 4H4c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm0 2v.511l-8 6.223-8-6.222V6h16zM4 18V9.044l7.386 5.745a.994.994 0 0 0 1.228 0L20 9.044 20.002 18H4z"}}]})(e)}function un(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m10.998 16 5-4-5-4v3h-9v2h9z"}},{tag:"path",attr:{d:"M12.999 2.999a8.938 8.938 0 0 0-6.364 2.637L8.049 7.05c1.322-1.322 3.08-2.051 4.95-2.051s3.628.729 4.95 2.051S20 10.13 20 12s-.729 3.628-2.051 4.95-3.08 2.051-4.95 2.051-3.628-.729-4.95-2.051l-1.414 1.414c1.699 1.7 3.959 2.637 6.364 2.637s4.665-.937 6.364-2.637C21.063 16.665 22 14.405 22 12s-.937-4.665-2.637-6.364a8.938 8.938 0 0 0-6.364-2.637z"}}]})(e)}function ln(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m13 16 5-4-5-4v3H4v2h9z"}},{tag:"path",attr:{d:"M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z"}}]})(e)}function cn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.57 22a2 2 0 0 0 1.43-.59l2.71-2.71a1 1 0 0 0 0-1.41l-4-4a1 1 0 0 0-1.41 0l-1.6 1.59a7.55 7.55 0 0 1-3-1.59 7.62 7.62 0 0 1-1.59-3l1.59-1.6a1 1 0 0 0 0-1.41l-4-4a1 1 0 0 0-1.41 0L2.59 6A2 2 0 0 0 2 7.43 15.28 15.28 0 0 0 6.3 17.7 15.28 15.28 0 0 0 16.57 22zM6 5.41 8.59 8 7.3 9.29a1 1 0 0 0-.3.91 10.12 10.12 0 0 0 2.3 4.5 10.08 10.08 0 0 0 4.5 2.3 1 1 0 0 0 .91-.27L16 15.41 18.59 18l-2 2a13.28 13.28 0 0 1-8.87-3.71A13.28 13.28 0 0 1 4 7.41zM20 11h2a8.81 8.81 0 0 0-9-9v2a6.77 6.77 0 0 1 7 7z"}},{tag:"path",attr:{d:"M13 8c2.1 0 3 .9 3 3h2c0-3.22-1.78-5-5-5z"}}]})(e)}function fn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M17.707 12.293a.999.999 0 0 0-1.414 0l-1.594 1.594c-.739-.22-2.118-.72-2.992-1.594s-1.374-2.253-1.594-2.992l1.594-1.594a.999.999 0 0 0 0-1.414l-4-4a.999.999 0 0 0-1.414 0L3.581 5.005c-.38.38-.594.902-.586 1.435.023 1.424.4 6.37 4.298 10.268s8.844 4.274 10.269 4.298h.028c.528 0 1.027-.208 1.405-.586l2.712-2.712a.999.999 0 0 0 0-1.414l-4-4.001zm-.127 6.712c-1.248-.021-5.518-.356-8.873-3.712-3.366-3.366-3.692-7.651-3.712-8.874L7 4.414 9.586 7 8.293 8.293a1 1 0 0 0-.272.912c.024.115.611 2.842 2.271 4.502s4.387 2.247 4.502 2.271a.991.991 0 0 0 .912-.271L17 14.414 19.586 17l-2.006 2.005z"}}]})(e)}function hn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 8a8 8 0 1 0 16 0A8 8 0 0 0 0 8zm5.904 2.803a.5.5 0 1 1-.707-.707L9.293 6H6.525a.5.5 0 1 1 0-1H10.5a.5.5 0 0 1 .5.5v3.975a.5.5 0 0 1-1 0V6.707l-4.096 4.096z"}}]})(e)}function dn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1H2zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5z"}},{tag:"path",attr:{d:"M9 7.5a.5.5 0 0 1 .5-.5H15v2H9.5a.5.5 0 0 1-.5-.5v-1zm-2 3v1a.5.5 0 0 1-.5.5H1v-2h5.5a.5.5 0 0 1 .5.5z"}}]})(e)}function pn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"}}]})(e)}function vn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.
2023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"}},{tag:"path",attr:{d:"M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"}},{tag:"path",attr:{d:"M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"}}]})(e)}function mn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7 8a3.5 3.5 0 0 1 3.5 3.555.5.5 0 0 0 .624.492A1.503 1.503 0 0 1 13 13.5a1.5 1.5 0 0 1-1.5 1.5H3a2 2 0 1 1 .1-3.998.5.5 0 0 0 .51-.375A3.502 3.502 0 0 1 7 8zm4.473 3a4.5 4.5 0 0 0-8.72-.99A3 3 0 0 0 3 16h8.5a2.5 2.5 0 0 0 0-5h-.027z"}},{tag:"path",attr:{d:"M10.5 1.5a.5.5 0 0 0-1 0v1a.5.5 0 0 0 1 0v-1zm3.743 1.964a.5.5 0 1 0-.707-.707l-.708.707a.5.5 0 0 0 .708.708l.707-.708zm-7.779-.707a.5.5 0 0 0-.707.707l.707.708a.5.5 0 1 0 .708-.708l-.708-.707zm1.734 3.374a2 2 0 1 1 3.296 2.198c.199.281.372.582.516.898a3 3 0 1 0-4.84-3.225c.352.011.696.055 1.028.129zm4.484 4.074c.6.215 1.125.59 1.522 1.072a.5.5 0 0 0 .039-.742l-.707-.707a.5.5 0 0 0-.854.377zM14.5 6.5a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z"}}]})(e)}function yn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511zm10.762.135a.5.5 0 0 1 .708 0l2.5 2.5a.5.5 0 0 1 0 .708l-2.5 2.5a.5.5 0 0 1-.708-.708L14.293 4H9.5a.5.5 0 0 1 0-1h4.793l-1.647-1.646a.5.5 0 0 1 0-.708z"}}]})(e)}function gn(e){return nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511zM11 .5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V1.707l-4.146 4.147a.5.5 0 0 1-.708-.708L14.293 1H11.5a.5.5 0 0 1-.5-.5z"}}]})(e)}function bn(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wn(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"}}]})(e)}function xn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2a7.2 7.2 0 01-6-3.22c.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08a7.2 7.2 0 01-6 3.22z"}}]})(e)}function kn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM22 7h-2V4h-3V2h5v5zm0 15v-5h-2v3h-3v2h
25zM2 22h5v-2H4v-3H2v5zM2 2v5h2V4h3V2H2z"}}]})(e)}function _n(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}}]})(e)}function Cn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 18h-2v-2h2v2zm2-4H9v6h6v-6zm4-4.7V4h-3v2.6L12 3 2 12h3l7-6.31L19 12h3l-3-2.7z"}}]})(e)}function En(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}}]})(e)}function Sn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}}]})(e)}function Tn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"}}]})(e)}function In(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}}]})(e)}function Nn(e){return nn({tag:"svg",attr:{viewBox:"0 0 14 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M13 2h-1v1.5c0 .28-.22.5-.5.5h-2c-.28 0-.5-.22-.5-.5V2H6v1.5c0 .28-.22.5-.5.5h-2c-.28 0-.5-.22-.5-.5V2H2c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h11c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm0 12H2V5h11v9zM5 3H4V1h1v2zm6 0h-1V1h1v2zM6 7H5V6h1v1zm2 0H7V6h1v1zm2 0H9V6h1v1zm2 0h-1V6h1v1zM4 9H3V8h1v1zm2 0H5V8h1v1zm2 0H7V8h1v1zm2 0H9V8h1v1zm2 0h-1V8h1v1zm-8 2H3v-1h1v1zm2 0H5v-1h1v1zm2 0H7v-1h1v1zm2 0H9v-1h1v1zm2 0h-1v-1h1v1zm-8 2H3v-1h1v1zm2 0H5v-1h1v1zm2 0H7v-1h1v1zm2 0H9v-1h1v1z"}}]})(e)}function An(e){return nn({tag:"svg",attr:{viewBox:"0 0 10 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5 11L0 6l1.5-1.5L5 8.25 8.5 4.5 10 6l-5 5z"}}]})(e)}function jn(e){return nn({tag:"svg",attr:{viewBox:"0 0 10 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10 10l-1.5 1.5L5 7.75 1.5 11.5 0 10l5-5 5 5z"}}]})(e)}function On(e){return nn({tag:"svg",attr:{viewBox:"0 0 8 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M0 8c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4z"}}]})(e)}var Pn=function(){var e,t,n,r,i,a=(0,c.useContext)(te).rpdata,o=u((0,c.useState)(!1),2),s=o[0],l=o[1],f=u((0,c.useState)(!1),2),h=f[0],d=f[1],p=u((0,c.useState)(!1),2),v=p[0],m=p[1],y=null===a||void 0===a||null===(e=a.dbServices)||void 0===e?void 0:e.map((function(e){return{subname:e.name,sublink:"/".concat(e.name.replaceAll(/[\^*@!"#$%&/()=?\xa1!\xbf'\\ ]/g,"-").toLowerCase())}})),g=null===a||void 0===a||null===(t=a.landings)||void 0===t?void 0:t.map((function(e,t){return{subname:e.name,sublink:"/gallery/".concat(e.name.replaceAll(/[\^*@!"#$%&/()=?\xa1!\xbf'\\ ]/g,"-").toLowerCase())}})),b=[{name:"Home",link:"/",child:!1},{name:"About",link:"/about",child:!1},{name:"Services",link:"/services",child:null===a||void 0===a?void 0:a.autoGntLandingFromService,submenu:bn(y||[]),click:function(){return d(!h)},opens:h},{name:"Gallery",link:"/gallery",child:null===a||void 0===a?void 0:a.customLinks,submenu:bn(g||[]),click:function(){return m(!v)},opens:v},{name:"Contact",link:"/contact",child:!1}];if(null!==a&&void 0!==a&&null!==(n=a.ytGallery)&&void 0!==n&&n.linkCanalYT){var w=b.length-1;b.splice(w,0,{name:"Our Videos",link:"/our-videos",child:!1})}if(null!==a&&void 0!==a&&null!==(r=a.reviews)&&void 0!==r&&r.activo&&!1===(null===a||void 0===a||null===(i=a.reviews)||void 0===i?void 0:i.isHomeOnly)){var x=b.length-1;b.splice(x,0,{name:"Reviews",link:"/reviews",child:!1})}return(0,ne.jsxs)("div",{className:"w-full",children:[(0,ne.jsx)("ul",{className:"hidden md:flex menuContent",children:b.map((function(e,t){return e.child?(0,ne.jsxs)("li",{className:"menuContent__items text-[19px]",children:[(0,ne.jsxs)("div",{className:"flex items-center",children:[e.name,(0,ne.jsx)(An,{className:"ml-1"})]}),(0,ne.jsx)("ul",{className:e.child&&"Gallery"===e.name?"menuContent__subMenu h-[200px]":"menuContent__subMenu h-[300px]",children:e.submenu.map((function(e,t){return(0,ne.jsx)(ee,{to:e.sublink,children:(0,ne.jsx)("li",{className:"text-[17px]",children:e.subname})},t)}))})]},t):(0,ne.jsx)(ee,{to:e.link,children:(0,ne.jsx)("li",{className:"menuContent__items text-[19px]",children:e.name})})}))}),(0,ne.jsx)("div",{className:"flex justify-center md:hidden bgBtnMenu rounded-lg p-2 mx-1 cursor-pointer",onClick:function(){return l(!s)},children:s?(0,ne.jsx)(_n,{fontSize:30,color:"white"}):(0,ne.jsx)(wn,{fontSize:30,color:"white"})}),(0,ne.jsx)("div",{className:"\n                ".concat(s?"w-full block absolute z-50 transition duration-500 ease-in-out":"hidden","\n            "),children:(0,ne.jsx)("ul",{className:"mobilMenuHeader",children:b.map((function(e,t){return e.child?(0,ne.jsxs)("li",{className:"menuContent__subItems",onClick:e.click,children:[(0,ne.jsxs)("div",{className:"flex items-center",children:[e.name,e.opens?(0,ne.jsx)(jn,{className:"ml-1"}):(0,ne.jsx)(An,{className:"ml-1"})]}),(0,ne.jsx)("ul",{className:e.opens?"block mt-3 menuContent__subMenuMobil":"hidden",children:e.submenu.map((function(e,t){return(0,ne.jsx)(ee,{to:e.sublink,children:(0,ne.jsx)("li",{className:"p-2",children:e.subname})},t)}))})]},t):(0,ne.jsx)(ee,{to:e.link,children:(0,ne.jsx)("li",{className:"menuContent__subItems",children:e.name})})}))})})]})},Rn=function(){var e,t,n,r,i,a,o,s,u,l,f,h,d,p,v,m,y,g,b,w=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("header",{className:"absolute right-[3%] left-[3%] z-20",children:(0,ne.jsxs)("div",{className:"flex justify-center md:flex-row flex-col py-3",children:[(0,ne.jsx)("div",{className:"w-full md:w-[20%] flex self-center",children:(0,ne.jsx)("img",{src:null===w||void 0===w||null===(e=w.dbPrincipal)||void 0===e?void 0:e.logo,alt:"logo",loading:"lazy",className:"md:w-[80%] w-[90%] py-2 mx-auto"})}),(0,ne.jsxs)("div",{className:"block md:w-[80%] lg:w-[75%] w-full self
2-center",children:[(0,ne.jsxs)("div",{className:"flex px-4 bg-white bg-opacity-30",children:[(0,ne.jsx)("div",{className:"w-[55%] lg:w-[70%] py-4 hidden md:block",children:(0,ne.jsxs)("div",{className:"flex justify-between",children:[(0,ne.jsxs)("div",{className:"flex  text-white",children:[(0,ne.jsx)("div",{className:"w-[15%] self-center mr-3",children:(0,ne.jsx)(cn,{color:"white",fontSize:30})}),(0,ne.jsx)("div",{children:(0,ne.jsxs)("a",{href:"tel:+1".concat(null===w||void 0===w||null===(t=w.dbPrincipal)||void 0===t||null===(n=t.phones)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.phone),children:[(0,ne.jsx)("p",{className:"-mb-3",children:"Phone Number"}),(0,ne.jsx)("h5",{className:"text-[16px]",children:null===w||void 0===w||null===(i=w.dbPrincipal)||void 0===i||null===(a=i.phones)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.phone})]})})]}),(0,ne.jsxs)("div",{className:"hidden text-white  lg:flex",children:[(0,ne.jsx)("div",{className:"w-[15%] self-center mr-3",children:(0,ne.jsx)(dn,{color:"white",fontSize:30})}),(0,ne.jsxs)("div",{children:[(0,ne.jsx)("p",{className:"-mb-3",children:"Workdays"}),(0,ne.jsx)("h5",{className:"text-[16px]",children:null===w||void 0===w||null===(s=w.dbPrincipal)||void 0===s||null===(u=s.workdays)||void 0===u||null===(l=u[0])||void 0===l?void 0:l.day})]})]}),(0,ne.jsxs)("div",{className:"hidden lg:flex justify-end text-white",children:[(0,ne.jsx)("div",{className:"w-[15%] self-center mr-3",children:(0,ne.jsx)(vn,{color:"white",fontSize:30})}),(0,ne.jsxs)("div",{children:[(0,ne.jsx)("p",{className:"-mb-3",children:"Work Hours"}),(0,ne.jsx)("h5",{className:"text-[16px]",children:null===w||void 0===w||null===(f=w.dbPrincipal)||void 0===f||null===(h=f.workHours)||void 0===h||null===(d=h[0])||void 0===d?void 0:d.hour})]})]})]})}),(0,ne.jsx)("div",{className:"w-[30%] md:flex justify-center self-center hidden",children:(0,ne.jsx)("ul",{className:"flex justify-center space-x-7 pr-5",children:null===w||void 0===w||null===(p=w.dbSocialMedia)||void 0===p?void 0:p.redes.map((function(e,t){return(0,ne.jsx)("li",{className:"text-white",children:(0,ne.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("i",{className:"fab fa-".concat(e.icon),"aria-hidden":"true"})})},t)}))})})]}),(0,ne.jsx)("div",{className:"bg-2 px-3 py-1",children:(0,ne.jsxs)("div",{className:"flex justify-between items-center",children:[null!==w&&void 0!==w&&null!==(v=w.simpleWidgets)&&void 0!==v&&null!==(m=v[3])&&void 0!==m&&m.activo?(0,ne.jsx)("div",{className:"md:w-auto px-2 hidden md:block",children:(0,ne.jsx)("h4",{className:"text-white ",children:null===w||void 0===w||null===(y=w.dbPrincipal)||void 0===y?void 0:y.name})}):(0,ne.jsx)("nav",{className:"md:w-auto w-[20%] px-2",children:(0,ne.jsx)(Pn,{})}),null!==w&&void 0!==w&&null!==(g=w.simpleWidgets)&&void 0!==g&&null!==(b=g[3])&&void 0!==b&&b.activo?(0,ne.jsx)("div",{className:"md:w-[45%] lg:w-[25%] w-[100%] text-center md:text-end border-0 md:border-l ml-0 lg:ml-7",children:(0,ne.jsx)($t,{})}):(0,ne.jsx)("div",{className:"md:w-[45%] lg:w-[25%] w-[80%] text-end border-0 md:border-l ml-0 lg:ml-7",children:(0,ne.jsx)($t,{})})]})})]})]})})};function Dn(e){return nn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"}}]})(e)}function Fn(e){return nn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"}}]})(e)}function Ln(e){return nn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function Mn(e){return nn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function Vn(e){return nn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm320-196c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM192 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM64 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"}}]})(e)}function Bn(e){return nn({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284
2L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"}}]})(e)}function zn(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"}}]})(e)}function qn(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z"}}]})(e)}function Un(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z"}}]})(e)}function Hn(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"}}]})(e)}function Wn(e){return nn({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V256H0v176zm192-68c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-40zm-128 0c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM576 80v48H0V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48z"}}]})(e)}function Kn(e){return nn({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M434.7 64h-85.9c-8 0-15.7 3-21.6 8.4l-98.3 90c-.1.1-.2.3-.3.4-16.6 15.6-16.3 40.5-2.1 56 12.7 13.9 39.4 17.6 56.1 2.7.1-.1.3-.1.4-.2l79.9-73.2c6.5-5.9 16.7-5.5 22.6 1 6 6.5 5.5 16.6-1 22.6l-26.1 23.9L504 313.8c2.9 2.4 5.5 5 7.9 7.7V128l-54.6-54.6c-5.9-6-14.1-9.4-22.6-9.4zM544 128.2v223.9c0 17.7 14.3 32 32 32h64V128.2h-96zm48 223.9c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM0 384h64c17.7 0 32-14.3 32-32V128.2H0V384zm48-63.9c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16c0-8.9 7.2-16 16-16zm435.9 18.6L334.6 217.5l-30 27.5c-29.7 27.1-75.2 24.5-101.7-4.4-26.9-29.4-24.8-74.9 4.4-101.7L289.1 64h-83.8c-8.5 0-16.6 3.4-22.6 9.4L128 128v223.9h18.3l90.5 81.9c27.4 22.3 67.7 18.1 90-9.3l.2-.2 17.9 15.5c15.9 13 39.4 10.5 52.3-5.4l31.4-38.6 5.4 4.4c13.7 11.1 33.9 9.1 45-4.7l9.5-11.7c11.2-13.8 9.1-33.9-4.6-45.1z"}}]})(e)}function Gn(e){return nn({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"}}]})(e)}function Yn(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function Qn(e){return nn({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19
2-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"}}]})(e)}function $n(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"}}]})(e)}function Xn(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"}}]})(e)}function Jn(e){return nn({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560.02 32c-1.96 0-3.98.37-5.96 1.16L384.01 96H384L212 35.28A64.252 64.252 0 0 0 191.76 32c-6.69 0-13.37 1.05-19.81 3.14L20.12 87.95A32.006 32.006 0 0 0 0 117.66v346.32C0 473.17 7.53 480 15.99 480c1.96 0 3.97-.37 5.96-1.16L192 416l172 60.71a63.98 63.98 0 0 0 40.05.15l151.83-52.81A31.996 31.996 0 0 0 576 394.34V48.02c0-9.19-7.53-16.02-15.98-16.02zM224 90.42l128 45.19v285.97l-128-45.19V90.42zM48 418.05V129.07l128-44.53v286.2l-.64.23L48 418.05zm480-35.13l-128 44.53V141.26l.64-.24L528 93.95v288.97z"}}]})(e)}function Zn(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"polyline",attr:{points:"12 6 12 12 16 14"}}]})(e)}function er(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"}}]})(e)}function tr(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"}}]})(e)}function nr(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"circle",attr:{cx:"12",cy:"12",r:"6"}},{tag:"circle",attr:{cx:"12",cy:"12",r:"2"}}]})(e)}var rr=function(){var e,t,n,r,i,a,o,s,u,l,f,h,d,p,v,m,y,g,b,w,x,k,_,C,E,S,T,I,N,A,j,O,P,R,D,F,L,M,V,B=(0,c.useContext)(te).rpdata,z=new Date,q=[{name:"Home",link:"/"},{name:"About",link:"/about"},{name:"Services",link:"/services"},{name:"Gallery",link:"/gallery"},{name:"Contact",link:"/contact"}];if(null!==B&&void 0!==B&&null!==(e=B.reviews)&&void 0!==e&&e.activo&&!1===(null===B||void 0===B||null===(t=B.reviews)||void 0===t?void 0:t.isHomeOnly)){var U=q.length-1;q.splice(U,0,{name:"Reviews",link:"/reviews",child:!1})}var H=function(){window.scrollTo({top:0,behavior:"smooth"})};return(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsxs)("div",{className:"w-full flex flex-col justify-center bg-gray-400 bg-opacity-5 p-8 py-14 bg-footer text-white",children:[(0,ne.jsxs)("div",{className:"md:w-3/4 mx-auto text-center flex justify-center mb-4 md:flex-row flex-col-reverse",children:[(0,ne.jsxs)("div",{className:"w-full md:w-[70%] text-start self-center md:px-10",children:[(0,ne.jsx)("h2",{className:"text-white md:pt-0 pt-6",children:null===B||void 0===B||null===(n=B.dbSlogan)||void 0===n?void 0:n[3].slogan}),(0,ne.jsx)($t,{btnStyle:"three"})]}),(0,ne.jsx)("div",{className:"md:w-[30%] flex justify-center items-center",children:(0,ne.jsx)("img",{src:null===B||void 0===B||null===(r=B.dbPrincipal)||void 0===r?void 0:r.logo,className:"w-full",alt:"Not Found"})})]}),(0,ne.jsx)("div",{className:"md:w-4/5 mx-auto text-center flex justify-center"}),(0,ne.jsx)("div",{className:"md:w-4/5 mx-auto",children:(0,ne.jsxs)("div",{className:"flex md:flex-row flex-col",children:[(0,ne.jsx)("div",{className:"pt-10 ".concat(null!==B&&void 0!==B&&null!==(i=B.simpleWidgets)&&void 0!==i&&null!==(a=i[3])&&void 0!==a&&a.activo?"md:w-[55%]":"md:w-[40%]"),children:(0,ne.jsxs)("div",{className:"bg-2 my-2 md:mx-6 p-6 rounded-2xl text-white",children:[(0,ne.jsx)("h5",{children:"About"}),(0,ne.jsx)("p",{className:"pb-4",children:null!==B&&void 0!==B&&null!==(o=B.simpleWidgets)&&void 0!==o&&null!==(s=o[3])&&void 0!==s&&s.activo?null===B||void 0===B||null===(u=B.dbAbout)||void 0===u?void 0:u[1].text:null===B||void 0===B||null===(l=B.dbAbout)||void 0===l?void 0:l[1].text.substring(0,265)})]})}),(0,ne.jsxs)("div",{className:"pt-10 md:w-[20%]",children:[(0,ne.jsx)("h5",{children:"Services"}),(0,ne.jsx)("ul",{className:"pl-1",children:null===B||void 0===B||null===(f=B.dbServices)||void 0===f?void 0:f.slice(0,6).map((function(e,t){var n,r,i,a,o;return null!==B&&void 0!==B&&null!==(n=B.simpleWidgets)&&void 0!==n&&null!==(r=n[3])&&void 0!==r&&r.activo?(0,ne.jsx)("li",{className:"py-2",onClick:H,children:(0,ne.jsxs)("a",{href:"tel:+1".concat(null===B||void 0===B||null===(i=B.dbPrincipal)||void 0===i||null===(a=i.phones)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.phone),className:"flex",children:[(0,ne.jsx)(Mn,{className:"self-center"}),(0,ne.jsx)("span",{className:"pl-2",children:e.name})]})},t):(0,ne.jsx)("li",{className:"py-2",onClick:H,children:(0,ne.jsxs)(Z,{to:"/services",className:"flex",children:[(0,ne.jsx)(Mn,{className:"self-center"}),(0,ne.jsx)("span",{className:"pl-2",children:e.name})]})},t)}))})]}),null!==B&&void 0!==B&&null!==(h=B.simpleWidgets)&&void 0!==h&&null!==(d=h[3])&&void 0!==d&&d.activo?null:(0,ne.jsxs)("div",{className:"pt-10 md:w-[15%]",children:[(0,ne.jsx)("h5",{children:"Navigation"}),(0,ne.jsx)("ul",{className:"pb-3",children:q.map((function(e,t){return(0,ne.jsx)("li",{className:"py-2 mx-3",onClick:H,children:(0,ne.jsxs)(Z,{to:e.link,className:"flex",children:[(0,ne.jsx)(Mn,{className:"self-center"}),(0,ne.jsx)("span",{className:"pl-2",children:e.name})]})},t)}))})]}),(0,ne.jsxs)("div",{className:"pt-10 md:w-[30%]",children:[(0,ne.jsx)("h5",{children:"Contact"}),(0,ne.jsxs)("ul",{className:"pl-2",children:[null===B||void 0===B||null===(p=B.dbPrincipal)||void 0===p||null===(v=p.location)||void 0===v?void 0:v.slice(0,1).map((function(e,t){return(0,ne.jsx)(Z,{to:"/contact",children:(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(er,{fontSize:25}),(0,ne.jsx)("span",{className:"pl-3",children:e.address})]})},t)})),null===B||void 0===B||null===(m=B.dbPrincipal)||void 0===m?void 0:m.ph
2ones.map((function(e,t){return(0,ne.jsx)("a",{href:"tel:+1".concat(e.phone),children:(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(tr,{fontSize:25}),(0,ne.jsxs)("span",{className:"pl-3",children:[e.phone," ",e.name]})]})},t)})),(0,ne.jsx)("a",{href:"mailto:".concat(null===B||void 0===B||null===(y=B.dbPrincipal)||void 0===y?void 0:y.emails[0].email),children:(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Xn,{fontSize:25}),(0,ne.jsx)("span",{className:"pl-3",children:null===B||void 0===B||null===(g=B.dbPrincipal)||void 0===g?void 0:g.emails[0].email})]})}),(null===B||void 0===B||null===(b=B.dbPrincipal)||void 0===b?void 0:b.workdays.length)>1?(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Nn,{fontSize:25}),(0,ne.jsxs)("div",{className:"flex flex-col",children:[(0,ne.jsx)("span",{className:"pl-3",children:null===B||void 0===B||null===(w=B.dbPrincipal)||void 0===w||null===(x=w.workdays)||void 0===x?void 0:x[0].day}),(0,ne.jsx)("span",{className:"pl-3",children:null===B||void 0===B||null===(k=B.dbPrincipal)||void 0===k||null===(_=k.workHours)||void 0===_?void 0:_[0].hour})]})]}):(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Nn,{fontSize:25}),(0,ne.jsx)("span",{className:"pl-3",children:null===B||void 0===B||null===(C=B.dbPrincipal)||void 0===C||null===(E=C.workdays)||void 0===E?void 0:E[0].day})]}),(null===B||void 0===B||null===(S=B.dbPrincipal)||void 0===S?void 0:S.workdays.length)>1?(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Zn,{fontSize:25}),(0,ne.jsxs)("div",{className:"flex flex-col",children:[(0,ne.jsx)("span",{className:"pl-3",children:null===B||void 0===B||null===(T=B.dbPrincipal)||void 0===T||null===(I=T.workdays)||void 0===I?void 0:I[1].day}),(0,ne.jsx)("span",{className:"pl-3",children:null===B||void 0===B||null===(N=B.dbPrincipal)||void 0===N||null===(A=N.workHours)||void 0===A?void 0:A[1].hour})]})]}):(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Zn,{fontSize:25}),(0,ne.jsxs)("span",{className:"pl-3",children:[" ",null===B||void 0===B||null===(j=B.dbPrincipal)||void 0===j||null===(O=j.workHours)||void 0===O?void 0:O[0].hour]})]}),(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Wn,{}),(0,ne.jsx)("span",{className:"pl-3 capitalize",children:null===B||void 0===B||null===(P=B.dbPrincipal)||void 0===P?void 0:P.paymentMethod})]}),null!==B&&void 0!==B&&null!==(R=B.tiposPago)&&void 0!==R&&null!==(D=R[0])&&void 0!==D&&D.activo?(0,ne.jsx)("li",{children:(0,ne.jsx)("img",{src:null===B||void 0===B||null===(F=B.tiposPago)||void 0===F||null===(L=F[0])||void 0===L?void 0:L.img,width:"70%",alt:"no found"})}):null]})]})]})})]}),(0,ne.jsxs)("div",{className:"w-full flex justify-around md:flex-row items-center flex-col-reverse text-center text-white  py-4 bg-2",children:[(0,ne.jsxs)("p",{children:["\xa9",z.getFullYear(),", Copyright By ",null===B||void 0===B||null===(M=B.dbPrincipal)||void 0===M?void 0:M.name,". All Rights Reserved"]}),(0,ne.jsx)("ul",{className:"flex",children:null===B||void 0===B||null===(V=B.dbSocialMedia)||void 0===V?void 0:V.redes.map((function(e,t){return(0,ne.jsx)("li",{className:"mr-7",children:(0,ne.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("i",{className:"fab fa-".concat(e.icon),"aria-hidden":"true"})})},t)}))})]})]})};var ir=function(){var e=u((0,c.useState)(0),2),t=e[0],n=e[1];return(0,c.useEffect)((function(){var e=function(){var e=document.documentElement.scrollTop,t=document.documentElement.scrollHeight-document.documentElement.clientHeight,r="".concat(e/t);n(r)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}})),(0,ne.jsx)("div",{id:"progressBarContainer",children:(0,ne.jsx)("div",{id:"progressBar",style:{transform:"scale(".concat(t,", 1)")}})})},ar={float:"btnwhatsapp_float__+JB7W",my_float:"btnwhatsapp_my_float__vynrg",pulse:"btnwhatsapp_pulse__hqjhM",nav_bottom:"btnwhatsapp_nav_bottom__uSrZV",whatsapp_button:"btnwhatsapp_whatsapp_button__mJf2V",circle_anime:"btnwhatsapp_circle_anime__c1azB",popup_whatsapp:"btnwhatsapp_popup_whatsapp__Xblp+",slideInRight:"btnwhatsapp_slideInRight__4OOhv",content_whatsapp:"btnwhatsapp_content_whatsapp__We8F2",_top:"btnwhatsapp__top__w2X4E",content_whatsapp_header:"btnwhatsapp_content_whatsapp_header__QLPUh",_bottom:"btnwhatsapp__bottom__r3NVd",closePopup:"btnwhatsapp_closePopup__LmOrV",send_msPopup:"btnwhatsapp_send_msPopup__l7+S+",is_active_whatsapp_popup:"btnwhatsapp_is_active_whatsapp_popup__Up556",whats_input:"btnwhatsapp_whats_input__MZ9iZ",icon_whatsapp_small:"btnwhatsapp_icon_whatsapp_small__ZsTSo",icon_whatsapp:"btnwhatsapp_icon_whatsapp__UNq1X",icon_font_color:"btnwhatsapp_icon_font_color__cxznY",icon_font_color__black:"btnwhatsapp_icon_font_color__black__0fPm-",text_typically:"btnwhatsapp_text_typically__5xflF",online:"btnwhatsapp_online__OF95o",chat_box_body:"btnwhatsapp_chat_box_body__Q0rRE",chat_box_message:"btnwhatsapp_chat_box_message__4AmfY",text_name_body:"btnwhatsapp_text_name_body__hVc3F",before_img:"btnwhatsapp_before_img__xK3m7",self_content:"btnwhatsapp_self_
2content__oTAUW",loader:"btnwhatsapp_loader__2sxqt"};function or(e){return nn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 448l416-192L48 64v149.333L346 256 48 298.667z"}}]})(e)}var sr=function(){var e,t=u((0,c.useState)(!0),2),n=t[0],r=t[1],i=(0,c.useContext)(te).rpdata;return(0,c.useEffect)((function(){var e=setTimeout((function(){r(!1)}),3e3);return function(){return clearTimeout(e)}}),[]),n?(0,ne.jsx)("div",{className:"relative",children:(0,ne.jsxs)("div",{className:"".concat(ar.loader),children:[(0,ne.jsx)("span",{}),(0,ne.jsx)("span",{}),(0,ne.jsx)("span",{})]})}):(0,ne.jsx)("div",{className:"",children:(0,ne.jsxs)("div",{className:"".concat(ar.chat_box_message),children:[(0,ne.jsx)("span",{className:"".concat(ar.text_name_body),children:null===i||void 0===i||null===(e=i.dbPrincipal)||void 0===e?void 0:e.name})," ",(0,ne.jsx)("br",{}),(0,ne.jsxs)("span",{children:["Hi there \ud83d\udc4b",(0,ne.jsx)("br",{}),"How can we help you?"]})]})})};var ur=function(e){var t,n,r=e.stateChat,i=e.closeBtn,a=(0,c.useContext)(te).rpdata,o=u((0,c.useState)(""),2),s=o[0],l=o[1],f=u((0,c.useState)(!1),1)[0];return(0,ne.jsx)("div",{children:(0,ne.jsxs)("div",{className:"".concat(ar.popup_whatsapp," ").concat(ar.fadeIn," ").concat(r?ar.is_active_whatsapp_popup:""),children:[(0,ne.jsx)("div",{className:"".concat(ar.content_whatsapp_header," ").concat(ar._top),children:(0,ne.jsxs)("div",{className:"".concat(ar.self_content),children:[(0,ne.jsx)("div",{className:"".concat(ar.online)}),(0,ne.jsx)("img",{src:null===a||void 0===a||null===(t=a.dbPrincipal)||void 0===t?void 0:t.favicon,width:"80",alt:"logo",className:"".concat(ar.before_img)}),(0,ne.jsxs)("div",{className:"flex flex-col",children:[(0,ne.jsx)("span",{className:"text-white text_name_company",children:null===a||void 0===a||null===(n=a.dbPrincipal)||void 0===n?void 0:n.name}),(0,ne.jsx)("span",{className:"".concat(ar.text_typically),children:"Typically replies in minutes"})]}),(0,ne.jsx)("div",{className:ar.contentClose,children:(0,ne.jsx)("button",{type:"button",className:"".concat(ar.closePopup," bg-black "),onClick:i,children:"X"})})]})}),(0,ne.jsx)("div",{className:"".concat(ar.chat_box_body),children:(0,ne.jsx)(sr,{})}),(0,ne.jsxs)("div",{className:"".concat(ar.content_whatsapp," ").concat(ar._bottom),children:[(0,ne.jsx)("input",{className:ar.whats_input,type:"text",placeholder:"Send Message...",value:s,onChange:function(e){return l(e.target.value)}}),(0,ne.jsx)("button",{className:ar.send_msPopup,id:"send_btn",type:"button",onClick:function(){return function(){var e,t=s.replace(/ /g,"%20"),n=null===a||void 0===a||null===(e=a.dbPrincipal)||void 0===e?void 0:e.phones[0].phone.replace("-","").replace("-","");window.open("https://wa.me/1".concat(n,"?text=")+t,"_blank"),l(""),f(!1)}()},children:(0,ne.jsx)(or,{className:"".concat(ar.icon_font_color__black)})})]})]})})};var lr=function(){return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsxs)("div",{className:"loaderTyping w-auto",children:[(0,ne.jsx)("span",{}),(0,ne.jsx)("span",{}),(0,ne.jsx)("span",{})]})})};var cr=function(){return(0,ne.jsxs)("div",{className:"absolute top-3 right-12",children:[(0,ne.jsx)(lr,{}),(0,ne.jsx)("div",{className:"absolute bottom-1 right-2",children:(0,ne.jsx)("div",{className:"elfsight-app-b8a56f1e-13f0-420d-a542-091d4e218b2d"})})]})};var fr=function(){return(0,ne.jsxs)("div",{className:"absolute top-3 right-12",children:[(0,ne.jsx)(lr,{}),(0,ne.jsx)("div",{className:"absolute bottom-1 right-2",children:(0,ne.jsx)("div",{className:"elfsight-app-7d747bc5-0ab4-4b1c-b88f-cc05d20bbf43"})})]})};var hr=function(){var e,t,n,r,i=u((0,c.useState)(!0),2),a=i[0],o=i[1],s=(0,c.useContext)(te).rpdata;return(0,c.useEffect)((function(){var e=setTimeout((function(){o(!1)}),1e3);return function(){return clearTimeout(e)}}),[]),a?(0,ne.jsx)("div",{className:"absolute top-2 right-10",children:(0,ne.jsx)(lr,{})}):(0,ne.jsx)("div",{className:"absolute bottom-0 right-12",children:(0,ne.jsx)("span",{class:"glass-button-content w-[200px]",children:(0,ne.jsxs)("div",{className:"glass-button flex flex-row self-center align-middle justify-center items-center",children:[(0,ne.jsx)(gn,{className:"mr-2"}),(0,ne.jsx)("a",{href:"tel:+1".concat(null===s||void 0===s||null===(e=s.dbPrincipal)||void 0===e||null===(t=e.phones)||void 0===t?void 0:t[0].phone),children:null===s||void 0===s||null===(n=s.dbPrincipal)||void 0===n||null===(r=n.phones)||void 0===r?void 0:r[0].phone})]})})})};var dr=function(e){var t=e.stateQr,n=e.closeBtn,r=(0,c.useContext)(te).rpdata;return t?(0,ne.jsx)("div",{className:"fixed z-50 inset-0 bg-black bg-opacity-25 backdrop-blur-sm flex justify-center items-center",children:(0,ne.jsxs)("div",{className:"w-auto flex flex-col",children:[(0,ne.jsx)("button",{className:"text-white text-[30px] place-self-end",onClick:function(){return n()},children:"X"}),(0,ne.jsx)("div",{className:"flex justify-center p-2 rounded",children:(0,ne.jsx)("img",{src:null===r||void 0===r?void 0:r.qrImg,alt:"qr images",className:"rounded-lg"})})]})}):null};
2var pr=function(){var e,t=u((0,c.useState)(!1),2),n=t[0],r=t[1],i=u((0,c.useState)(!0),2),a=i[0],o=i[1],s=u((0,c.useState)(!1),2),l=s[0],f=s[1],h=u((0,c.useState)(!1),2),d=h[0],p=h[1],v=u((0,c.useState)(!1),2),m=v[0],y=v[1],g=u((0,c.useState)(!1),2),b=g[0],w=g[1],x=(0,c.useContext)(te).rpdata,k=function(){r(!1),f(!1),p(!1),y(!1),w(!1),o(!a)};return(0,ne.jsx)("div",{children:(0,ne.jsxs)("div",{className:"container-floating-widget",children:[a?(0,ne.jsxs)("div",{className:"fixed bottom-[80px] md:bottom-[95px] right-[35px] z-10 flex flex-col justify-between",children:[null===x||void 0===x||null===(e=x.simpleWidgets)||void 0===e?void 0:e.map((function(e,t){return"WhatsappBtn"===e.val&&!0===e.activo?(0,ne.jsxs)("div",{className:"relative",children:[(0,ne.jsx)("div",{className:"nd1 nds my-1",onClick:function(){return r(!n),w(!1),y(!1),f(!1),void p(!1)},children:(0,ne.jsx)(Dn,{className:"item-widget text-white"})}),(0,ne.jsx)(ur,{stateChat:n,closeBtn:function(){return r(!1)}})]},t):"VisitsCounter"===e.val&&!0===e.activo?(0,ne.jsxs)("div",{className:"relative",children:[(0,ne.jsx)("div",{className:"nd2 nds my-1",onClick:function(){return r(!1),p(!1),y(!1),w(!1),void f(!l)},children:(0,ne.jsx)(zn,{className:"item-widget text-white"})}),l?(0,ne.jsx)(cr,{}):null]}):"CallUsNow"===e.val&&!0===e.activo?(0,ne.jsxs)("div",{className:"relative",children:[(0,ne.jsx)("div",{className:"nd4 nds my-1",onClick:function(){return w(!b),r(!1),y(!1),f(!1),void p(!1)},children:(0,ne.jsx)(yn,{className:"item-widget text-white"})}),b?(0,ne.jsx)(hr,{}):null]}):"Wheather"===e.val&&!0===e.activo?(0,ne.jsxs)("div",{className:"relative",children:[(0,ne.jsx)("div",{className:"nd3 nds my-1 relative",children:(0,ne.jsx)(mn,{className:"item-widget text-white",onClick:function(){return r(!1),w(!1),y(!1),f(!1),void p(!d)}})}),d?(0,ne.jsx)(fr,{}):null]}):null})),null!==x&&void 0!==x&&x.qrImg?(0,ne.jsxs)("div",{className:"relative",children:[(0,ne.jsx)("div",{className:"nd5 nds my-1",onClick:function(){return y(!m),r(!1),f(!1),p(!1),void w(!1)},children:(0,ne.jsx)(kn,{className:"item-widget text-white"})}),!0===m?(0,ne.jsx)(dr,{stateQr:m,closeBtn:function(){return y(!1)}}):null]}):null]}):null,(0,ne.jsxs)("div",{className:"floating-button-widgets text-white",children:[(0,ne.jsx)(on,{className:"principal-btn text-white",onClick:function(){return k()}}),(0,ne.jsx)(on,{className:"edit text-white",onClick:function(){return k()}})]})]})})};function vr(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 mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){wr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function br(e,t,n){return t&&gr(e.prototype,t),n&&gr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(){return xr=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},xr.apply(this,arguments)}function kr(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cr(e,t)}function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_r(e)}function Cr(e,t){return Cr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Cr(e,t)}function Er(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tr(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sr(e)}function Ir(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(AF){return!1}}();return function(){var n,r=_r(e);if(t){var i=_r(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tr(this,n)}}function Nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(u){s=!0,i=u}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||jr(e,t)||function(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ar(e){return function(e){if(Array.isArray(e))return Or(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jr(e,t){if(e){if("string"===typeof e)return Or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}function Or(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}var Pr=br((function e(t){var n=this,r=t.expanded,i=void 0===r?[]:r,a=t.allowMultipleExpanded,o=void 0!==a&&a,s=t.allowZeroExpanded,u=void 0!==s&&s;yr(this,e),wr(this,"expanded",void 0),wr(this,"allowMultipleExpanded",void 0),wr(this,"allowZeroExpanded",void 0),wr(this,"toggleExpanded",(function(e){return n.isItemDisabled(e)?n:n.isItemExpanded(e)?n.augment({expanded:n.expanded.filter((function(t){return t!==e}))}):n.augment({expanded:n.allowMultipleExpanded?[].concat(Ar(n.expanded),[e]):[e]})})),wr(this,"isItemDisabled",(function(e){var t=n.isItemExpanded(e),r=1===n.expanded.length;return Boolean(t&&!n.allowZeroExpanded&&r)})),wr(this,"isItemExpanded",(function(e){return-1!==n.expanded.indexOf(e)})),wr(this,"getPanelAttributes",(function(e,t){var r=null!==t&&void 0!==t?t:n.isItemExpanded(e);return{role:n.allowMultipleExpanded?void 0:"region","aria-hidden":n.allowMultipleExpanded?!r:void 0,"aria-labelledby":n.getButtonId(e),id:n.getPanelId(e),hidden:!r||void 0}})),wr(this,"getHeadingAttributes",(function(){return{role:"heading"}})),wr(this,"getButtonAttributes",(function(e,t){var r=null!==t&&void 0!==t?t:n.isItemExpanded(e),i=n.isItemDisabled(e);return{id:n.getButtonId(e),"aria-disabled":i,"aria-expanded":r,"aria-controls":n.getPanelId(e),role:"button",tabIndex:0}})),wr(this,"getPanelId",(function(e){return"accordion__panel-".concat(e)})),wr(this,"getButtonId",(function(e){return"accordion__heading-".concat(e)})),wr(this,"augment",(function(t){return new e(mr({expanded:n.expanded,allowMultipleExpanded:n.allowMultipleExpanded,allowZeroExpanded:n.allowZeroExpanded},t))})),this.expanded=i,this.allowMultipleExpanded=o,this.allowZeroExpanded=u})),Rr=(0,c.createContext)(null),Dr=function(e){kr(n,e);var t=Ir(n);function n(){var e;yr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wr(Sr(e=t.call.apply(t,[this].concat(i))),"state",new Pr({expanded:e.props.preExpanded,allowMultipleExpanded:e.props.allowMultipleExpanded,allowZeroExpanded:e.props.allowZeroExpanded})),wr(Sr(e),"toggleExpanded",(function(t){e.setState((function(e){return e.toggleExpanded(t)}),(function(){e.props.onChange&&e.props.onChange(e.state.expanded)}))})),wr(Sr(e),"isItemDisabled",(function(t){return e.state.isItemDisabled(t)})),wr(Sr(e),"isItemExpanded",(function(t){return e.state.isItemExpanded(t)})),wr(Sr(e),"getPanelAttributes",(function(t,n){return e.state.getPanelAttributes(t,n)})),wr(Sr(e),"getHeadingAttributes",(function(){return e.state.getHeadingAttributes()})),wr(Sr(e),"getButtonAttributes",(function(t,n){return e.state.getButtonAttributes(t,n)})),e}return br(n,[{key:"render",value:function(){var e=this.state,t=e.allowZeroExpanded,n=e.allowMultipleExpanded;return(0,c.createElement)(Rr.Provider,{value:{allowMultipleExpanded:n,allowZeroExpanded:t,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),n}(c.PureComponent);wr(Dr,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var Fr,Lr=function(e){kr(n,e);var t=Ir(n);function n(){var e;yr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wr(Sr(e=t.call.apply(t,[this].concat(i))),"renderChildren",(function(t){return t?e.props.children(t):null})),e}return br(n,[{key:"render",value:function(){return(0,c.createElement)(Rr.Consumer,null,this.renderChildren)}}]),n}(c.PureComponent),Mr=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],Vr=function(e){var t=e.className,n=void 0===t?"accordion":t,r=e.allowMultipleExpanded,i=e.allowZeroExpanded,a=e.onChange,o=e.preExpanded,s=Er(e,Mr);return(0,c.createElement)(Dr,{preExpanded:o,allowMultipleExpanded:r,allowZeroExpanded:i,onChange:a},(0,c.createElement)("div",xr({"data-accordion-component":"Accordion",className:n},s)))};!function(e){e.Accordion="Accordion",e.AccordionItem="AccordionItem",e.AccordionItemButton="AccordionItemButton",e.AccordionItemHeading="AccordionItemHeading",e.AccordionItemPanel="AccordionItemPanel"}(Fr||(Fr={}));var Br=Fr,zr=0;var qr=c.useId||function(){var e=zr;return zr+=1,"raa-".concat(e)},Ur=/[\u0009\u000a\u000c\u000d\u0020]/g;function Hr(e){return""!==e&&!Ur.test(e)||(console.error('uuid must be a valid HTML5 id but was given "'.concat(e,'", ASCII whitespace
2s are forbidden')),!1)}var Wr=(0,c.createContext)(null),Kr=function(e){var t=e.children,n=e.uuid,r=e.accordionContext,i=e.dangerouslySetExpanded,a=function(){r.toggleExpanded(n)},o=function(e){var r=null!==i&&void 0!==i?i:e.isItemExpanded(n),o=e.isItemDisabled(n),s=e.getPanelAttributes(n,i),u=e.getHeadingAttributes(n),l=e.getButtonAttributes(n,i);return(0,c.createElement)(Wr.Provider,{value:{uuid:n,expanded:r,disabled:o,toggleExpanded:a,panelAttributes:s,headingAttributes:u,buttonAttributes:l}},t)};return(0,c.createElement)(Lr,null,o)},Gr=function(e){return(0,c.createElement)(Lr,null,(function(t){return(0,c.createElement)(Kr,xr({},e,{accordionContext:t}))}))},Yr=function(e){var t=e.children,n=function(e){return e?t(e):null};return(0,c.createElement)(Wr.Consumer,null,n)},Qr=["uuid","dangerouslySetExpanded","className","activeClassName"],$r=function(e){var t=e.uuid,n=e.dangerouslySetExpanded,r=e.className,i=void 0===r?"accordion__item":r,a=e.activeClassName,o=Er(e,Qr),s=Nr((0,c.useState)(qr()),1)[0],u=null!==t&&void 0!==t?t:s,l=function(e){var t=e.expanded&&a?a:i;return(0,c.createElement)("div",xr({"data-accordion-component":"AccordionItem",className:t},o))};return Hr(u.toString()),o.id&&Hr(o.id),(0,c.createElement)(Gr,{uuid:u,dangerouslySetExpanded:n},(0,c.createElement)(Yr,null,l))};function Xr(e){return e&&(e.matches('[data-accordion-component="Accordion"]')?e:Xr(e.parentElement))}function Jr(e){var t=Xr(e);return t&&Array.from(t.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}$r.displayName=Br.AccordionItem;var Zr="End",ei="Enter",ti="Home",ni=" ",ri="Spacebar",ii="ArrowUp",ai="ArrowDown",oi="ArrowLeft",si="ArrowRight",ui=["toggleExpanded","className"],li=function(e){var t=e.toggleExpanded,n=e.className,r=void 0===n?"accordion__button":n,i=Er(e,ui);return i.id&&Hr(i.id),(0,c.createElement)("div",xr({className:r},i,{role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){var n=e.key;if(n!==ei&&n!==ni&&n!==ri||(e.preventDefault(),t()),e.target instanceof HTMLElement)switch(n){case ti:e.preventDefault(),function(e){var t=(Jr(e)||[])[0];t&&t.focus()}(e.target);break;case Zr:e.preventDefault(),function(e){var t=Jr(e)||[],n=t[t.length-1];n&&n.focus()}(e.target);break;case oi:case ii:e.preventDefault(),function(e){var t=Jr(e)||[],n=t.indexOf(e);if(-1!==n){var r=t[n-1];r&&r.focus()}}(e.target);break;case si:case ai:e.preventDefault(),function(e){var t=Jr(e)||[],n=t.indexOf(e);if(-1!==n){var r=t[n+1];r&&r.focus()}}(e.target)}},"data-accordion-component":"AccordionItemButton"}))},ci=function(e){return(0,c.createElement)(Yr,null,(function(t){var n=t.toggleExpanded,r=t.buttonAttributes;return(0,c.createElement)(li,xr({toggleExpanded:n},e,r))}))},fi=function(e){kr(n,e);var t=Ir(n);function n(){var e;yr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wr(Sr(e=t.call.apply(t,[this].concat(i))),"ref",void 0),wr(Sr(e),"setRef",(function(t){e.ref=t})),e}return br(n,[{key:"componentDidUpdate",value:function(){n.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){n.VALIDATE(this.ref)}},{key:"render",value:function(){return(0,c.createElement)("div",xr({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(e){if(void 0===e)throw new Error("ref is undefined");if(1!==e.childElementCount||!e.firstElementChild||"AccordionItemButton"!==e.firstElementChild.getAttribute("data-accordion-component"))throw new Error("AccordionItemButton may contain only one child element, which must be an instance of AccordionItemButton.\n\nFrom the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):\n\n\u201cThe button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.\u201d\n\n")}}]),n}(c.PureComponent);wr(fi,"defaultProps",{className:"accordion__heading","aria-level":3});var hi=function(e){return(0,c.createElement)(Yr,null,(function(t){var n=t.headingAttributes;return e.id&&Hr(e.id),(0,c.createElement)(fi,xr({},e,n))}
2))};hi.displayName=Br.AccordionItemHeading;var di=["className","region","id"],pi=function(e){var t=e.className,n=void 0===t?"accordion__panel":t,r=e.region,i=e.id,a=Er(e,di),o=function(e){var t=e.panelAttributes;i&&Hr(i);var o=mr(mr({},t),{},{"aria-labelledby":r?t["aria-labelledby"]:void 0});return(0,c.createElement)("div",xr({"data-accordion-component":"AccordionItemPanel",className:n},a,o,{role:r?"region":void 0}))};return(0,c.createElement)(Yr,null,o)},vi=[{name:"Pink",paleta:[{nameColor:"Pink",hex:"#FFC0CB"},{nameColor:"LightPink",hex:"#FFB6C1"},{nameColor:"HotPink",hex:"#FF69B4"},{nameColor:"DeepPink",hex:"#FF1493"},{nameColor:"PaleVioletRed",hex:"#DB7093"},{nameColor:"MediumVioletRed",hex:"#C71585"}]},{name:"CYAN COLORS",paleta:[{nameColor:"Aqua",hex:"#00FFFF"},{nameColor:"Cyan",hex:"#00FFFF"},{nameColor:"LightCyan",hex:"#E0FFFF"},{nameColor:"PaleTurquoise",hex:"#AFEEEE"},{nameColor:"Aquamarine",hex:"#7FFFD4"},{nameColor:"Turquoise",hex:"#40E0D0"},{nameColor:"MediumTurquoise",hex:"#48D1CC"},{nameColor:"DarkTurquoise",hex:"#00CED1"}]},{name:"PURPLE COLORS",paleta:[{nameColor:"Lavender",hex:"#E6E6FA"},{nameColor:"Thistle",hex:"#D8BFD8"},{nameColor:"Plum",hex:"#DDA0DD"},{nameColor:"Orchid",hex:"#DA70D6"},{nameColor:"Violet",hex:"#EE82EE"},{nameColor:"Fuchsia",hex:"#FF00FF"},{nameColor:"MediumOrchid",hex:"#BA55D3"},{nameColor:"DarkOrchid",hex:"#9932CC"},{nameColor:"BlueViolet",hex:"#8A2BE2"},{nameColor:"DarkMagenta",hex:"#8B008B"},{nameColor:"Purple",hex:"#800080"},{nameColor:"MediumPurple",hex:"#9370DB"},{nameColor:"MediumSlateBlue",hex:"#7B68EE"},{nameColor:"SlateBlue",hex:"#6A5ACD"},{nameColor:"DarkSlateBlue",hex:"#483D8B"},{nameColor:"RebeccaPurple",hex:"#663399"},{nameColor:"Indigo",hex:"#4B0082"}]},{name:"BLUE COLORS",paleta:[{nameColor:"Aqua",hex:"#00FFFF"},{nameColor:"LightCyan",hex:"#E0FFFF"},{nameColor:"PaleTurquoise",hex:"#AFEEEE"},{nameColor:"Aquamarine",hex:"#7FFFD4"},{nameColor:"Turquoise",hex:"#40E0D0"},{nameColor:"MediumTurquoise",hex:"#48D1CC"},{nameColor:"CadetBlue",hex:"#5F9EA0"},{nameColor:"SteelBlue",hex:"#4682B4"},{nameColor:"LightSteelBlue",hex:"#B0C4DE"},{nameColor:"LightBlue",hex:"#ADD8E6"},{nameColor:"PowderBlue",hex:"#B0E0E6"},{nameColor:"LightSkyBlue",hex:"#87CEFA"},{nameColor:"SkyBlue",hex:"#87CEEB"},{nameColor:"CornflowerBlue",hex:"#6495ED"},{nameColor:"DeepSkyBlue",hex:"#00BFFF"},{nameColor:"DodgerBlue",hex:"#1E90FF"},{nameColor:"RoyalBlue",hex:"#4169E1"},{nameColor:"Blue",hex:"#0000FF"},{nameColor:"MediumBlue",hex:"#0000CD"},{nameColor:"DarkBlue",hex:"#00008B"},{nameColor:"Navy",hex:"#000080"},{nameColor:"MidnightBlue",hex:"#191970"}]},{name:"RED COLORS",paleta:[{nameColor:"LightSalmon",hex:"#FFA07A"},{nameColor:"Salmon",hex:"#FA8072"},{nameColor:"DarkSalmon",hex:"#E9967A"},{nameColor:"LightCoral",hex:"#F08080"},{nameColor:"IndianRed",hex:"#CD5C5C"},{nameColor:"Crimson",hex:"#DC143C"},{nameColor:"Red",hex:"#FF0000"},{nameColor:"FireBrick",hex:"#B22222"},{nameColor:"DarkRed",hex:"#8B0000"}]},{name:"BROWN COLORS",paleta:[{nameColor:"Cornsilk",hex:"#FFF8DC"},{nameColor:"BlanchedAlmond",hex:"#FFEBCD"},{nameColor:"Bisque",hex:"#FFE4C4"},{nameColor:"NavajoWhite",hex:"#FFDEAD"},{nameColor:"Wheat",hex:"#F5DEB3"},{nameColor:"BurlyWood",hex:"#DEB887"},{nameColor:"Tan",hex:"#D2B48C"},{nameColor:"RosyBrown",hex:"#BC8F8F"},{nameColor:"SandyBrown",hex:"#F4A460"},{nameColor:"GoldenRod",hex:"#DAA520"},{nameColor:"DarkGoldenRod",hex:"#B8860B"},{nameColor:"Peru",hex:"#CD853F"},{nameColor:"Chocolate",hex:"#D2691E"},{nameColor:"Olive",hex:"#808000"},{nameColor:"SaddleBrown",hex:"#8B4513"},{nameColor:"Sienna",hex:"#A0522D"},{nameColor:"Brown",hex:"#A52A2A"},{nameColor:"Maroon",hex:"#800000"}]},{name:"ORANGE COLORS",paleta:[{nameColor:"Orange",hex:"#FFA500"},{nameColor:"DarkOrange",hex:"#FF8C00"},{nameColor:"Coral",hex:"#FF7F50"},{nameColor:"Tomato",hex:"#FF6347"},{nameColor:"OrangeRed",hex:"#FF4500"}]},{name:"WHITE COLORS",paleta:[{nameColor:"White",hex:"#FFFFFF"},{nameColor:"Snow",hex:"#FFFAFA"},{nameColor:"HoneyDew",hex:"#F0FFF0"},{nameColor:"MintCream",hex:"#F5FFFA"},{nameColor:"Azure",hex:"#F0FFFF"},{nameColor:"AliceBlue",hex:"#F0F8FF"},{nameColor:"GhostWhite",hex:"#F8F8FF"},{nameColor:"WhiteSmoke",hex:"#F5F5F5"},{nameColor:"SeaShell",hex:"#FFF5EE"},{nameColor:"Beige",hex:"#F5F5DC"},{nameColor:"OldLace",hex:"#FDF5E6"},{nameColor:"FloralWhite",hex:"#FFFAF0"},{nameColor:"Ivory",hex:"#FFFFF0"},{nameColor:"AntiqueWhite",hex:"#FAEBD7"},{nameColor:"Linen",hex:"#FAF0E6"},{nameColor:"LavenderBlush",hex:"#FFF0F5"},{nameColor:"MistyRose",hex:"#FFE4E1"}]},{name:"YELLOW COLORS",paleta:[{nameColor:"Gold",hex:"#FFD700"},{nameColor:"Yellow",hex:"#FFFF00"},{nameColor:"LightYellow",hex:"#FFFFE0"},{nameColor:"LemonChiffon",hex:"#FFFACD"},{nameColor:"LightGoldenRodYellow",hex:"#FAFAD2"},{nameColor:"PapayaWhip",hex:"#FFEFD5"},{nameColor:"Moccasin",hex:"#FFE4B5"},{nameColor:"PeachPuff",hex:"#FFDAB9"},{nameColor:"PaleGoldenRod",hex:"#EEE8AA"},{nameColor:"Khaki",hex:"#F0E68C"},{nameColor:"DarkKhaki",hex:"#BDB76B"}]},{name:"GREY COLORS",paleta:[{nameColor:"Gainsboro",hex:"#DCDCDC"},{nameColor:"LightGray",hex:"#D3D3D3"},{nameColor:"Silver",hex:"#C0C0C0"},{nameColor:"DarkGray",hex:"#A9A9A9"},{nameColor:"DimGray",hex:"#696969"},{nameColor:"Gray",hex:"#808080"},{nameColor:"LightSlateGray",hex:"#778899"},{nameColor:"SlateGray",hex:"#708090"},{nameColor:"DarkSlateGray",hex:"#2F4F4F"},{nameColor:"Black",hex:"#000000"}]},{name:"GREEN COLORS",paleta:[{nameColor:"GreenYellow",hex:"#ADFF2F"},{nameColor:"Chartreuse",hex:"#7FFF00"},{nameColor:"LawnGreen",hex:"#7CFC00"},{nameColor:"Lime",hex:"#00FF00"},{nameColor:"LimeGreen",hex:"#32CD32"},{nameColor:"PaleGreen",hex:"#98FB98"},{nameColor:"LightGreen",hex:"#90EE90"},{nameColor:"MediumSpringGreen",hex:"#00FA9A"},{nameColor:"SpringGreen",hex:"#00FF7F"},{nameColor:"MediumSeaGreen",hex:"#3CB371"},{nameColor:"SeaGreen",hex:"#2E8B57"},{nameColor:"ForestGreen",hex:"#228B22"},{nameColor:"Green",hex:"#008000"},{nameColor:"DarkGreen",hex:"#006400"},{nameColor:"YellowGreen",hex:"#9ACD32"},{nameColor:"OliveDrab",hex:"#6B8E23"},{nameColor:"DarkOliveGreen",hex:"#556B2F"},{nameColor:"MediumAquaMarine",hex:"#66CDAA"},{nameColor:"DarkSeaGreen",hex:"#8FBC8F"},{nameColor:"LightSeaGreen",hex:"#20B2AA"},{nameColor:"DarkCyan",hex:"#008B8B"},{nameColor:"Teal",hex:"#008080"}]}],mi=function(){return(0,ne.jsx)(Vr,{className:"grid grid-cols-1 md:grid-cols-2 gap-x-0 md:gap-x-5 gap-y-3",allowZeroExpanded:!0,children:vi.map((function(e,t){return(0,ne.jsxs)($r,{className:"w-full md:w-[450px]",children:[(0,ne.jsx)(hi,{children:(0,ne.jsx)(ci,{children:(0,ne.jsx)("span",{className:"font-semibold text-[20px]",children:e.name})})}),(0,ne.jsx)(pi,{children:(0,ne.jsxs)("table",{className:"tableColorContent",children:[(0,ne.jsxs)("tr",{children:[(0,ne.jsx)("th",{children:"Color Name"}),(0,ne.jsx)("th",{children:"HEX"}),(0,ne.jsx)("th",{children:"Color"})]}),e.paleta.map((function(e,t){return(0,ne.jsxs)("tr",{children:[(0,ne.jsx)("td",{className:"px-2 md:px-5",children:e.nameColor}),(0,ne.jsx)("td",{className:"px-2 md:px-5",children:e.hex}),(0,ne.jsx)("td",{children:(0,ne.jsx)("div",{className:"h-8",style:{backgroundColor:"".concat(e.hex)}})})]},t)}))]})})]},t)}))})};var yi=function(){var e=u((0,c.useState)(!1),2),t=e[0],n=e[1];return(0,c.useEffect)((function(){window.addEventListener("scroll",(function(){window.scrollY>
2400?n(!0):n(!1)}))}),[]),(0,ne.jsxs)("div",{className:"top-to-btm",children:[" ",t&&(0,ne.jsx)(Fn,{className:"icon-position icon-style",onClick:function(){window.scrollTo({top:0,behavior:"smooth"})}})," "]})},gi=n(4569),bi=n.n(gi);var wi=function(e){var t,n,i,o,s,l,f,h,d,p,v=(0,c.useContext)(te).rpdata,m=u(c.useState(!1),2),y=m[0],g=m[1],b=u((0,c.useState)([]),2),w=b[0],x=b[1],k=null===v||void 0===v?void 0:v.docId;(0,c.useEffect)((function(){var e=function(){var e=a(r().mark((function e(){var t,n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="https://apireviews.herokuapp.com/api/reviews/".concat(k),e.next=3,bi().get(t);case 3:n=e.sent,x(n.data),i=n.data.sort((function(e,t){return new Date(t.Date)-new Date(e.Date)})),x(i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[k]);var _=(w.map((function(e){return e.ReviewsStars>=3?e.ReviewsStars:0})).reduce((function(e,t){return e+t}),0)/w.length).toFixed(2);return console.log("total",_),(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsxs)(Qt,{children:[(0,ne.jsxs)("title",{children:[e.PageName," | ","".concat(null===v||void 0===v||null===(t=v.dbPrincipal)||void 0===t?void 0:t.name)]}),(0,ne.jsx)("meta",{name:"description",content:"".concat((null===v||void 0===v||null===(n=v.dbAbout)||void 0===n?void 0:n[0].text.substring(0,150))+"...")}),(0,ne.jsx)("meta",{name:" ".concat(null===v||void 0===v||null===(i=v.dbPrincipal)||void 0===i?void 0:i.name),content:" ".concat(null===v||void 0===v||null===(o=v.dbPrincipal)||void 0===o?void 0:o.name)}),(0,ne.jsx)("meta",{name:"robots",content:"index,follow"}),(0,ne.jsx)("meta",{name:"googlebot",content:"index,follow"}),(0,ne.jsx)("link",{rel:"icon",href:null===v||void 0===v||null===(s=v.dbPrincipal)||void 0===s?void 0:s.favicon})]}),(0,ne.jsx)(Rn,{}),(0,ne.jsx)(ir,{}),(0,ne.jsx)("main",{children:e.children}),null!==v&&void 0!==v&&null!==(l=v.simpleWidgets)&&void 0!==l&&null!==(f=l[3])&&void 0!==f&&f.activo?null:(0,ne.jsx)(pr,{}),null!==v&&void 0!==v&&null!==(h=v.simpleWidgets)&&void 0!==h&&null!==(d=h[4])&&void 0!==d&&d.activo?(0,ne.jsxs)(Z,{to:"/reviews",onClick:function(){window.scrollTo({top:0,behavior:"smooth"})},className:"fixed right-0 bottom-[50%] bg2 pr-1 pl-5 rounded-tl-[10px] rounded-bl-[10px]",children:[(0,ne.jsxs)("div",{className:"flex ".concat(_>=1?"flex-row":"flex-col"," py-2 justify-start items-center gap-2"),children:[(0,ne.jsx)("p",{className:"text-white font-bold capitalize leading-tight ",children:_>=1?_:(0,ne.jsxs)("span",{children:[" leave ",(0,ne.jsx)("br",{}),"Reviews"]})}),(0,ne.jsxs)("div",{className:"flex",children:[(0,ne.jsx)(Sn,{className:"text-yellow-500 text-[18px]"}),(0,ne.jsx)(Sn,{className:"text-yellow-500 text-[18px] ".concat(_>=1?"-ml-3":"")}),(0,ne.jsx)(Sn,{className:"text-yellow-500 text-[18px] ".concat(_>=1?"-ml-3":"")}),(0,ne.jsx)(Sn,{className:"text-yellow-500 text-[18px] ".concat(_>=1?"-ml-3":"")}),(0,ne.jsx)(Sn,{className:"text-yellow-500 text-[18px] ".concat(_>=1?"-ml-3":"")})]})]}),_>=1?(0,ne.jsxs)("p",{className:"text-[14px] text-white",children:[w.length," ",(0,ne.jsx)("span",{className:"text-[12px]",children:"Reviews"})]}):null]}):null,null===v||void 0===v||null===(p=v.simpleWidgets)||void 0===p?void 0:p.map((function(e){return"ModalColores"===e.val&&!0===e.activo?(0,ne.jsxs)("div",{children:[(0,ne.jsx)("button",{className:"fixed right-0 bottom-[40%] bgbotonFlotante p-4",onClick:function(){return g(!0)},children:(0,ne.jsx)(Yn,{fontSize:25})}),y?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none",children:(0,ne.jsx)("div",{className:"relative w-auto my-6 mx-auto max-w-6xl",children:(0,ne.jsxs)("div",{className:"border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",children:[(0,ne.jsxs)("div",{className:"flex items-start justify-between p-5 border-b border-solid border-slate-200 rounded-t",children:[(0,ne.jsx)("h3",{className:"text-3xl font-semibold",children:"Color Palettes"}),(0,ne.jsx)("button",{className:"p-1 ml-auto bg-transparent border-0 text-black  float-right text-3xl leading-none font-semibold outline-none focus:outline-none",onClick:function(){return g(!1)},children:(0,ne.jsx)(In,{})})]}),(0,ne.jsx)("div",{className:"relative p-6 flex-auto overflow-y-auto h-[70vh] md:h-[500px]",children:(0,ne.jsx)(m
2i,{})})]})})}),(0,ne.jsx)("div",{className:"opacity-25 fixed inset-0 z-40 bg-black"})]}):null]}):null})),(0,ne.jsx)(rr,{}),(0,ne.jsx)(yi,{})]})},xi=n(835),ki=function(e){var t,n,r,i,a,o,s,u,l,f,h,d,p=e.image,v=(0,c.useContext)(te).rpdata,m=[{title:null!==v&&void 0!==v&&null!==(t=v.dbPrincipal)&&void 0!==t&&t.exprYears?"Years Of Experience":"Best Service",number:null!==v&&void 0!==v&&null!==(n=v.dbPrincipal)&&void 0!==n&&n.exprYears?null===v||void 0===v||null===(r=v.dbPrincipal)||void 0===r?void 0:r.exprYears:"100",simbolo:null!==v&&void 0!==v&&null!==(i=v.dbPrincipal)&&void 0!==i&&i.exprYears?"+":"%"},{title:"Professionals",number:100,simbolo:"%"},{title:null!==v&&void 0!==v&&null!==(a=v.dbPrincipal)&&void 0!==a&&a.miles?"Miles Around ".concat(null===v||void 0===v||null===(o=v.dbPrincipal)||void 0===o||null===(s=o.location[0])||void 0===s?void 0:s.address):"Cost-Effectiveness",number:null!==v&&void 0!==v&&null!==(u=v.dbPrincipal)&&void 0!==u&&u.miles?null===v||void 0===v||null===(l=v.dbPrincipal)||void 0===l?void 0:l.miles:"100",simbolo:null!==v&&void 0!==v&&null!==(f=v.dbPrincipal)&&void 0!==f&&f.miles?"+":"%"},{title:"On Time",number:100,simbolo:"%"}];return(0,ne.jsxs)("div",{className:"bgCountent",style:{backgroundImage:'url("'.concat(p||(null===v||void 0===v||null===(h=v.stock)||void 0===h?void 0:h[1]),'")')},children:[(0,ne.jsx)("h2",{className:"text-center py-4 relative text-white",children:null===v||void 0===v||null===(d=v.dbSlogan)||void 0===d?void 0:d[4].slogan}),(0,ne.jsxs)("div",{className:"w-4/5 mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4",children:[m.map((function(e,t){var n=t%2===0?"bgColor1":"bgColor2";return(0,ne.jsxs)("div",{className:"text-center p-3 relative ".concat(n),children:[(0,ne.jsxs)("div",{children:[(0,ne.jsx)(xi.ZP,{end:e.number,duration:5,className:"text-white text-[69px]"}),(0,ne.jsx)("span",{className:"text-white text-[69px]",children:e.simbolo})]}),(0,ne.jsx)("p",{className:"text-white text-[18px]",children:e.title})]},t)})),(0,ne.jsx)("div",{})]})]})};var _i=function(e){var t,n,r,i=e.bgImg,a=e.serviceName,o=e.serviceText,s=(0,c.useContext)(te).rpdata;return(0,ne.jsxs)("div",{className:"w-[90%] h-[280px] mx-auto bg-cover bg-center p-4  my-6 relative before:bg-black before:bg-opacity-50 before:absolute before:inset-0 hover:transform hover:rotate-1 hover:scale-105 transition-all duration-500",style:{backgroundImage:'url("'.concat(i,'")')},children:[(0,ne.jsxs)("div",{className:"flex justify-between relative",children:[(0,ne.jsxs)("a",{href:"tel:+1".concat(null===s||void 0===s||null===(t=s.dbPrincipal)||void 0===t||null===(n=t.phones)||void 0===n?void 0:n[0].phone),className:"py-1 px-3 bg-2 flex self-center text-white rounded-full",rel:"noopener noreferrer",children:[(0,ne.jsx)(tr,{className:"self-center mr-2"}),"Call Us Now"]}),(0,ne.jsx)("img",{src:null===s||void 0===s||null===(r=s.dbPrincipal)||void 0===r?void 0:r.favicon,alt:"Not Found",className:"relative w-[60px] h-[60px] rounded-full object-cover bg-white"})]}),(0,ne.jsxs)("div",{className:"flex flex-col self-center py-4 w-full relative md:text-start text-center",children:[(0,ne.jsx)("h5",{className:"text-[20px] leading-[24px] text-white",children:a}),(0,ne.jsx)("p",{className:"text-[15px] leading-[24px] pt-2 text-gray-200",children:o})]}),(0,ne.jsx)(ee,{to:null!==s&&void 0!==s&&s.autoGntLandingFromService?"/".concat(a.replaceAll(/[\^*@!"#$%&/()=?\xa1!\xbf'\\ ]/g,"-").toLowerCase()):"/services",className:"relative",children:(0,ne.jsx)(hn,{className:"bg-2 p-1 text-[32px] text-white rounded-full"})})]})};var Ci=function(){var e,t,n,r=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsxs)("div",{className:"md:w-[98%] mx-auto my-12 text-center",children:[(0,ne.jsx)("h2",{className:"text-center py-4",children:null===r||void 0===r||null===(e=r.labels)||void 0===e||null===(t=e.general)||void 0===t?void 0:t.titleServices}),(0,ne.jsx)($t,{btnStyle:"three",btnName:"view all services",btnLink:"services"}),(0,ne.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3  gap-5",children:null===r||void 0===r||null===(n=r.dbServices)||void 0===n?void 0:n.map((function(e,t){return(0,ne.jsx)(_i,{bgImg:e.description[0].img,serviceName:e.name,serviceText:e.description[0].text.substring(0,160)+"..."},t)}))})]})})};var Ei=function(){var e,t,n,r,i,a,o=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsxs)("div",{className:"pic-wrapper",children:[(0,ne.jsx)("figure",{className:"pic-1",style:{background:'url("'.concat(null===o||void 0===o||null===(e=o.gallery)||void 0===e?void 0:e[6],'")')}}),(0,ne.jsx)("figure",{className:"pic-2",style:{background:'url("'.concat(null===o||void 0===o||null===(t=o.gallery)||void 0===t?void 0:t[13],'")')}}),(0,ne.jsx)("figure",{className:"pic-3",style:{background:'url("'.concat(null===o||void 0===o||null===(n=o.gallery)||void 0===n?void 0:n[5],'")')}}),(0,ne.jsx)("figure",{className:"pic-4",style:{background:'url("'.concat(null===o||void 0===o||null===(r=o.gallery)||void 0===r?void 0:r[15],'")')}}),(0,ne.jsxs)("div",{className:"z-10 relative w-4/5 mx-auto pt-[450px] pb-[100px] md:pb-[150px] md:pt-[380px]  ",children:[(0,ne.jsxs)("div",{className:"w-full flex flex-col justify-center items-center",children:[(0,ne.jsx)("h1",{className:"text-white text-center",children:null===o||void 0===o||null===(i=o.dbSlogan)||void 0===i?void 0:i[0].slogan}),(0,ne.jsx)("p",{className:"text-white text-center",children:null===o||void 0===o||null===(a=o.dbValues)||void 0===a?void 0:a[1].description}),(0,ne.jsx)("div",{className:"flex justify-center md:block",children:(0,ne.jsx)($t,{})})]}),(0,ne.jsx)("div",{className:"w-1/2"})]})]})})},Si=function(){var e,t,n,r,i,a=(0,c.useContext)(te).rpdata;return(0,ne.jsxs)("div",{className:"w-4/5 mx-auto mt-0 md:mt-10 py-10 border-t-[10px] borderColor",children:[(0,ne.jsx)("h2",{className:"capitalize text-center",children:null!==a&&void 0!==a&&null!==(e=a.labels)&&void 0!==e&&null!==(t=e.general)&&void 0!==t&&t.titleBranding?null===a||void 0===a||null===(n=a.labels)||void 0===n||null===(r=n.general)||void 0===r?void 0:r.titleBranding:"Cho
2ose your favorite color through the following color palettes"}),(0,ne.jsx)("div",{className:"flex flex-wrap justify-center items-center gap-8 py-10",children:null===a||void 0===a||null===(i=a.brandingExtra)||void 0===i?void 0:i.map((function(e,t){return(0,ne.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",children:(0,ne.jsx)("img",{src:e.img,alt:"no found"})},t)}))})]})},Ti=n.p+"static/media/dots.b0d221c1085adef4fbbc.png";function Ii(e){return nn({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12.238 8l-2.31 4H5.31L3 8l2.31-4h4.618l2.31 4z"}}]})(e)}var Ni="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAMgCAMAAAAEPmswAAAANlBMVEXx8/XCy9LFztXu8PPs7/Lp7e/W3OHL0tnZ3+PN1NrS2d7i5urn6u7f5OjI0Nfc4ebP1tzk6excnoRZAAAXh0lEQVR42uzUAQ0AAAzDoN+/6eloAiK4B4gQFpAhLCBDWECGsIAMYQEZwgIyhAVkCAvIEBaQISwgQ1hAhrCADGEBGcICMoQFZAgLyBAWkCEsIENYQIawgAxhARnCAjKEBWQIC8gQFpAhLCBDWECGsIAMYQEZwgIyhAVkCAvIEBaQISwgQ1hAhrCADGEBGcICMoQFZAgLyBAWkCEsIENYQIawgAxhARnCAjKEBWQIC8gQFpAhLGDs1AEJAAAAgKD/r9sR6Ag3hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBbETh2QAAAAAAj6/7odgY6QDWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoRF7NQBCQAAAICg/6/bEegIYUNYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hxc6dJtcKAgEURgREwGn/m32Vd1Op/Ih3cO72fIs4BU0rADEIFgAxCBYAMQgWADEIFgAxCBbwm+3bFOKQ8zSV4r13zvky5a4bYgxjYyuch2ABD7ZJMRdnXnIlDyE1FY5HsADbhmFy5lM+x7GvcCSChXtrQufNCnXpQlvhIAQLt2XHONVmE2VIzLaOQLBwT230ZlsuBy6IeyNYuB+bOmd24TpOWrsiWLiZJhazKz8w09oNwcKd9NGbA9SZg9Y+CBZuw4ZijlMiE63tESzcg02TOZqnWVsjWLiDpqvNKXxkI35LBAv6pWJO5APzrM0QLChnozNnm5jBb4RgQbU2m0uoO3Ydt
2kCwoFjy5jp85Ji1GsGCWpfK1X95rLAKwYJS4XK54pi1HsGCSuH8SfucjkWH5QgWFLpwrr6UVGEZggV10rVz9cVxM1yGYEGZthgJ6oHPdhYgWFClv8jeFcOsfRAsKGIHI8rENumHCBb0iLWRhvn7ZwgWtGgvuXj1kidZHyBY0MF2RiqS9T6CBRWCvNsgyVqAYEGBRsYqA8lajWBBPGlvg38rvBi+gWBBuvb6i+3vmdjLeolgQTYdx6tvme33FwgWRBO6yzBr4BvDpwgWJNN0vHqo+Sz6GYIFuRplx6sHx4PhPIIFsaJRigfDWQQLQvXid6+Yvn+OYEGmUfRq+2uMsv5EsCCSvmk7o6x3ECwIpPo6yCLpEwQL8iTl10G2smYRLIij/zrIvXAOwYIwvcrlq1kT74W/ESzIMmr51Plddazwg2BBlGDux7NH+oNgQRK5/0Fm+L4JgvWPvbvRSRiGAjBaBoqK+PP+L2s0xGSj3QiQ9I57zkN86brblvVItn1l8/2cYLEar1mmGWoOFlm/BIu1yLh9ZZE1IVisRNLtK4usEcFiFYbvwtYiS7BYg7zb7WPfFlmCRXj7bNOiFlkNgkV8j373lZ2siwkW4SX/PTi1+9pkJljEluhyhgsdMy+yBIvQDoWpXeLThYJFYMYZ6vJe4SBYxDWkuAv5Gu9Z78kSLMIajF8ZcBgRLOL6MH5l731MsAhrb/zK3vuEYBFV6ttk7L3XCRZBvRUcLpwSLGLSK3PvFYJFSHrls7BGsIhIr3wWVgkWATnu7G9hnWARj175LGwQLMLRK5+FLYJFNHp1jd1+k4NgEYpeXel5k4JgEYleXe24yUCwCESvXDkzR7CIxPzVTbYJxt4FizD0ynzDPMEiDr3yCtgCwSKMr8Ltnh58I0uwiOG1cA/bxz6oI1iE4L4+E1nLBIsY3IdsIusCgkUI3pu4q/fH3XoXLPob9OqXo4VLBIsAvD944tnCBYJFAN53PjFDukCw6O9Q+GPrfYlg0d2x8M+tfrMEi94+CyOm3tsEi65cKDNl6n2OYNGTA89Vpt5bBIuOHCCs8rOwSbDoaW9gtMbPwhbBohsD7k1+FjYIFv0MBkbb/CysESx6MTA6z8nCCsGiEwNYS7xOcU6w6OWlsMB4ww9794LdJgyEUXgwAsfFL/a/2Z4+T2zjWCMgnl/cbwttbxppNNwjWHgLBrByMN5wj2Ct4HztL+OxS621qTuOp/5a06HnItgw+v0uTRUI1qL2/dDao3b8qO+RRDkGGt5haGpAsJZzPbX2XDvUc/I5ExuwsrE4+QbBWsz+I9kr6VLR/XI5Nsq8SVdBsQjWIg6D5Rn5bxYbGpwYyPqPYC3iMFq+4+aTxSeevdg38xfBWsB5MJ+j/s+5Oc5cEDoxQvoPwZrvozW3SwWHCWX4RM67iX9Oh2DNc+isRFL/QVduNBRg6P0XgjVTv/nJYx9eEAYgXSyCNcNu2PpUjBMXhCEo/7AkWKVm78tM8jc2XqxEDkL4mQ7BKnZot35j48QFYRi6z3QIVqlru/kbGx8uCAORLRbBKvSD808nVoxGorrpnWCVuTIV48TKvlhEL30IVoEl1zlt5xyLlX2xaBaLYJU4J153+bCyLx7J5Q0Ey23hw+Ok+NfGiwP3iBSLRbAKDLaksdkCDtwDSnrLuwmWX29mDB57MOEelF6xCJbTGocx9R9jMeEelNxKP4Ll1tlvHGPl4psTgbVixSJYXr39wS+FuVgpE5lYsQiW0661FcgdJTiwUiY2rd8KCZbTyf7ipjAPO9yjk/o/FsHy2dstBt5fYEVDfErFIlg+g63j2FSLidHwhJ5bECyXs33GaMNLfDRVgk6xCJbLyT7jFOsVJkZFyBSLYHnsbD1C5wgOe4MElWIRLI/e7rFn+ws8eRYiUiyC5dHZelJTIZ4869C4KyRYDnu7x2TDF9gxqkWiWATL4WJrOjW14cmzFoViESyHZGtqm8rw5FmNwCsdgpXvbI8YxXqGJ8+C4heLYOXr7RE7G57gAEtS+I1+BCvfyaYwOzqFAyxR0YtFsPIle8Qh1iQOsGQFLxbByrazCQy7T2ICS1fsb+kQrGwHe4rPQN/iCaGy0MUiWNl6m8Kp+yN2YGmL/E1ogpXtYtMYHb3HDixxgYtFsLIN9gRb/G6xxF1e3AtrgpXtaM/w/vkzlrhXYGiCIljZOntAsKbsOMDSF7VYBCtbsrVV8ofBk5waBD1QreTfyPoIVh6e5NQi5kbJOv6NfAtbX9zLmVw8yanHT/buBDt1GIbCsJwRCOP+N/t62vNaphLbSZEs/98O2gOXyJFkk102BFYkAisGIzmeDMEeAitaK09REl5hJMcVg6MXHr4jb8EZVgRGcpyxl1gOviPv0stzrGv4MdLR4Iu5pZIEViQaR+cxkuOOucu/CKxIjObMYiTHIWsXUxBY0TbynPtevUiM5LhkbKEfgRWJ9TIz6GhwytZ6LAIrEgv8ZtDR4JWpZTMEViRWJM/ZCXyytGyGwIrFJRSvsGTUM0OHqwRWLK75eoUdDa7ZGYQmsOLt5CnO3EOgxd05M59NAisWV9W/MgpcszIITWAl6OUeR1ifaHH37xxMILASnOSBz5NNY/8ZGGBkSIfASjDKDZ8/YelY2lcFG0M6BFaKXh4w+UyLeyU6Cw2kBFaKQW75fHOc7CCogYUhHQIrRSN3aHMPtLjXw0CnIIGV5CT3vN8DN4eCsCb6L4YIrCRHuUYTVgi0uFdFvYGUwEpzkP/cPWxnocW9MkPQRGClGuUKPQ1sca/OOSgisJId5BsnWB/2gqqoNpASWMmaVv6ArTW00biXvkLtMaghsNIN8snXUWYeZp6rpNiORWBl2Mva+lAqZp5rtA9aCKxk36s1aWlg5rlWU1BCYOXYyQcKQmae63UKOgisLAcRoQWLgrBiQ1BBYGVpem8z8BkoCKt2DhoIrDzHztmWoXQUhHXT+dwSWJnGtvoDd2ae66ZSGRBYubbVX/ZMQVg5jXYsAivbueyzSyN/Pwo2hbcjsPJt25qfrygIodDcQGAtMHZlj5EuwFZkqBQIBNYSx16W6Ip9P0hBCJ3mBgJrkeYg+S7F9l9REEKpuYHAWmiobx4nBApCKDU3EFhLjb3k6As+vuKaHGhtbiCwlhvayh6vKAihdZEOgbWCZpI0l2L3i36ZBFD59SWwVjFOKXFVdDUYKAih101IYK0iIbKm0uMqNFyTA615WAJrNcdNL3O6TcGtV18oCKH4qpDAWtP21MnvukOxdw/+oCCE5qtCAmtlx2Hq5FE7DQ6erUKgIITqHDSB9Qea7XCaLvu+a7u+30+nYVtwT/stCkKovioksJCAgvAfe3eU6ygMBFG0GhtCSAxh/5udUWby8Z4COGCgI92ziJLLuBuc+6mQwEI+nozi9KlCAgu5KIQ4/VMhgYVMFEKc/6mQwEIeCiEcTBUSWMhDIYSDBaQEFrJQCOFhASmBhRwUQiwLve2LwEIetozCxb8KCSxk4LcT8DGjQ2BhGYUQTmZ0CCwsoxDCyYwOgYVFFEJ4mdEhsLCEQgg3MzoEFpZQCPGJ0XZDYGERhRCfGWwvBBaWUAjh6OKdwMI8CiE+drF9EFhYQCGEp4t3AgtzKIRwdfFOYGEOhRCuLt4JLMy6CvBz8U5gYU5VC/Dz4p3AwpxBgKNVMwQWJlEI4W3VDIGFGRRC+Fo1Q2BhCoUQ7na8E1iYdBHga8c7gYUJFEL4u3gnsDClFeDs4p3AwjsUQrj8uarsCP21a4Z0G+sYQwiSQoixvo9paJvHpTI4RCFEAVcrSrar/tEMY9SCeL+1zaM3OEIhhMPFDbK9VF07Bn2kTs2V45YPFEJ4XNwg20PfpKgJOallONtdgL/FDbLSqi7V2qpOHUetU1AI8eR0cYOsqKq7BRVybzlpHY5CiH+cvh+VlVN1o8oKt4ar+CNRCPHi8/2orJRrCtpDTA/DISiE2EeyUmRFVG3UfgKZdQAKIX7y+H5UVkA/BP1GZn0vCiGeHP74S7bZJek9Mus7NQL+8vh+VLZRlXSckC6GnfUCnhyOQcu2aYOOVTc80CqOQoj33O0flW3RRR0vJN5nlUUhxAR3Y9Cy9aqb8nHM+g59EPDi7hpLtloXdCKOWYVQCDHP1Ri0LJOf49VL3Rm2ohBiga9rLFkeX8er/yLNcBsKIXI4+o2ObAU//38KA7OGJY0CfvM0Bi1bofd00cHTrLUohDja3TaSfe4R5crIC/gVKIR/2Lvb5NRhGArD54RvCC3sf7N3Op07UyhJ7PQHsvU+W4BxIvlIQbkw2/zkMrFH+em/V6MgRKlIbSy50hDzX82RVYeCEMUitbHkOh9hP/60ozAsRkGIGoHaWHKVQ7D21YORI6sCkVGUC9PGkqcFTV9xZP0RBSGqRWljyb+1/J/myKrAllG8w2bwavKEwGnReXdyWXMoCPF2o1eTi719eLDUlYGdOa1kVdCvo9eSH/RwXkmbI0fWSxSEiOHmleRnTcWvpmz3RoWwYRX0afVuLLnI0FyLg1jWMwpCxHH3OnKJocUn8Ej3/QcKQoRy9Cryt/7OK7rvDygIEcvJa8hf+jyvaGX91HpcBZ1Z18aS7W7PK0kjq9+XnAS8wcUryO75vKIutE1BiJD2rifb7ut+8NmGupCCEBEdXE3dn1eSdtSFFISIZze4lvxf10soqQsnDJH3BaF3V9dSivNK2rKR9KWrgPc5u5LcyfzgogsfBPvtJuB96hcmK08/luY7BSGi2bmOMk2YMazT8Rs02vTpKvKks/pzNPr+hdGam2soWXuDhAOfyUEodSM68oRTr//mTxIOvV0Bo2l3V5BfO/R6XvGS1dAnRZDC3uWU8fro02AJFsI4uJhSfkNlx3UhM88Io2JER0nzz+mvC/vK2KFtV5dSigAWL1nMPCOyswspbzwn80tW3z1KNKd4REeJH75j3ulCIu6IZXQZ+dlHnofvJusKhyTv0GjI0UXU20bkOpeUKVIi7ojn5BJKXixsM6ZIOw+toEllIzpKeEGYPUWa7zdGC64uIJob2XrvaS5V0JizlynLBCGb/Ug0ILbN4EXK23BP2ntP1qREQ+5eJPaNfNmmyb2zowFx7b1ENGO/JSkLcxb9aMXBC5S74Z6uLMxa9KMNOy8Qz95MkSx2NCC2q+cpfcM90zh0n3v60ZObZ4nLox/ufZeFQ/aXaMS3EHgXl0d5ysK8t8Box8VzRPo5zW1h6ltgNGPvGSL9nOW2kAYWmjC7zE80sJIsT+ahhEaMniZqhSR7/f
26xdy+4iQNBEEDdQYEA4Xf/y+5ukk2AYAkFKXKX3ztEWe6p6THAoouXGjUYYM1j5YyPEn2saszgX2EWK2cMsGhk/KHCwb/CTYtjJfFRopVDjRj8K8yh9m4pMr0c67bBAGsG/QZXCGlmrPA++FcY9ZwyyJr5Hg462tZNA/GDLK960dCmvhNYMxhk2cNBR7cK7wJrBoOs3QANneobgZU/yLKHg6aWdU1gxQ+ynALT1qquCKz0jTMao/T1WlcE1l121ZbGKI291CWBdZ/XrqN3A3daW9UFgZX90KqBO7091wWBFb0jy8Cd7g51TmAld0g13OlvXWcEVnCHVMOdABe3oAVW8Ojdon4S7OqLwModvdtzRoZjfRJYsaN3K2UIcfZTKLBSR+8OCImxrf8EVmjr3QEhQTb1QWBljt4dEJJk8VTvBFbm6N1DSETZ1juBFblwxpsThNnUG4GVuHBGoYE0Hz+FAivwsNCNZ/Js6x+B9VPbmiqP0pNoWX8JrLjDwpVCA4nefgoFVtph4d5KZDKdqkpgPWCxrslRwCLWskpgPWRyNwufrHAn1mJfAivqsFBekexUAivqZqGCO9GWAutRpwkdFtrYR7bFXmDlPGXvSS/SnQRWTL1BXpHPNY6Uu9AuPDMDatEhd6HlFdCl3iCvgC71BnkFdLkLbd4OdKk3yCugS71BXgFd6g367UCTeoP7zsAPHeoe9l8BU7CrX7WyXxRoUm9Yu6gA/GHvDnMThmEwgNZpF9LQUrj/ZfdvmmBMDEabSu8dIkrsz85O4g3VeQW8ZhjjPv+lAk3pa9whzgA0J8ePxBmABs3xZqP2ILCTVe/2LgI7aRYm04NA1+1iFvog3Q503S6ahZ6DwJe2FycnaQbgLY4p/lnVHQS+abj07noFXGl2TsfsIHCrydS76xVwq8lCViquV8D7fRwU24HdyPGa0aQzsJrpFM8bFa+ANfUlnnS+dADrGmo8oZobBLYwLKf4k1NRagc2M9UUD0rZWxDYVj8/cmalOotdAS2Yyhi/OBcpBqAh/WXJY4or6ZwXhxXQpGE6znMpOZdlmY+TVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDJHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwBwcCAAAAAED+r42gqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqirswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cCAAAAAAIMjfepArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKcAnTNeiLeG1rEAAAAASUVORK5CYII=",Ai=function(e){var t,n,r,i,a,o,s,u=e.title,l=e.text,f=e.listsAbout,h=e.listsServices,d=e.image,p=e.sloganPrincipal,v=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{className:"bgContent-3 w-full py-36",children:(0,ne.jsxs)("div",{className:"w-4/5 mx-auto block lg:flex ",children:[(0,ne.jsxs)("div",{className:"w-full lg:w-[60%] bg-white pt-20 pb-[150px] lg:py-10 px-5 md:pl-14 md:pr-40 flex flex-col justify-center text-center md:text-start",children:[p?null!==v&&void 0!==v&&null!==(t=v.dbPrincipal)&&void 0!==t&&t.licensed?(0,ne.jsx)("h2",{className:"pb-3 capitalize",children:null===v||void 0===v||null===(n=v.dbPrincipal)||void 0===n?void 0:n.licensed}):(0,ne.jsx)("h3",{className:"pb-10 capitalize",children:null!==v&&void 0!==v&&null!==(r=v.dbPrincipal)&&void 0!==r&&r.exprYears?"we have ".concat(null===v||void 0===v||null===(i=v.dbPrincipal)||void 0===i?void 0:i.exprYears," years of experience"):"we have many years of experience"}):(0,ne.jsx)("h2",{className:"pb-5 capitalize",children:u||(0,ne.jsxs)("span",{className:"lowercase text-[18px]",children:["default title={'frase'}"," o"," agregar licencia o a\xf1os de experienceias sloganPrincipal={true}"]})}),(0,ne.jsx)("p",{className:"pb-5",children:l||(0,ne.jsxs)("span",{children:["para agregar el texto -> text={'description'}",(0,ne.jsx)("br",{}),"para agregar lista de about -> listsAbout={true}",(0,ne.jsx)("br",{}),"para agregar lista de servicios -> listsServices={true}"]})}),f?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:(null===v||void 0===v||null===(a=v.dbAbout)||void 0===a?void 0:a[0].list.length)>1?null===v||void 0===v||null===(o=v.dbAbout)||void 0===o?void 0:o[0].list.map((function(e,t){return(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Ii,{}),(0,ne.jsx)("span",{className:"pl-2",children:e})]},t)})):null}):null,h?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:null===v||void 0===v||null===(s=v.dbServices)||void 0===s?void 0:s.slice(0,6).map((function(e,t){return(0,ne.jsxs)("li",{className:"py-1 flex items-center",children:[(0,ne.jsx)(Ii,{}),(0,ne.jsx)("span",{children:e.name})]},t)}))}):null,(0,ne.jsx)("div",{children:(0,ne.jsx)($t,{})})]}),(0,ne.jsx)("div",{className:"w-[80%] lg:w-[40%] bgBloque ml-auto lg:ml-0 -my-20 lg:-my-10 h-[400px] md:h-[100vh] pt-[80px]",children:(0,ne.jsxs)("div",{className:"relative ",children:[(0,ne.jsx)("img",{src:d||Ni,alt:"no found",loading:"lazy",className:"relative z-10 w-[90%] h-[300px] md:h-[70vh] -ml-10 object-cover"}),(0,ne.jsx)("img",{src:Ti,alt:"no found",loading:"lazy",className:"absolute -bottom-10 -left-20 w-[80%] h-[90%]"})]})})]})})};var ji=function(e){var t,n,r,i,a,o,s,u=e.image1,l=e.image2,f=e.image3,h=e.title,d=e.text,p=e.listAbout,v=e.listServices,m=e.sloganPrincipal,y=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsx)("section",{className:"w-4/5 mx-auto md:py-32 py-10",children:(0,ne.jsxs)("div",{className:"md:flex md:flex-row flex flex-col md:p-0 px-2 content-reverse",children:[(0,ne.jsxs)("div",{className:"md:w-[50%] relative",children:[(0,ne.jsx)("div",{className:"md:w-full md:md:h-[600px] w-[300px] h-[300px] bg-cover bg-center rounded-full",style:{backgroundImage:'url("'.concat(u||Ni,'")')}}),(0,ne.jsx)("div",{className:"w-[50%] h-[50%]  absolute bottom-0 right-0 border-white border-[15px] z-10 bg-cover bg-center rounded-full",style:{backgroundImage:'url("'.concat(l||Ni,'")')}}),(0,ne.jsx)("div",{className:"w-[50%] h-[50%]  absolute md:bottom-[-100px] md:block hidden md:right-[210px] border-white border-[15px] z-10 bg-cover bg-center rounded-full",style:{backgroundImage:'url("'.concat(f||Ni,'")')}})]}),(0,ne.jsxs)("div",{className:"md:w-[50%] py-4 md:px-8 px-3 self-center md:text-start text-center",children:[m?null!==y&&void 0!==y&&null!==(t=y.dbPrincipal)&&void 0!==t&&t.licensed?(0,ne.jsx)("h2",{className:"pb-3 capitalize",children:null===y||void 0===y||null===(n=y.dbPrincipal)||void 0===n?void 0:n.licensed}):(0,ne.jsx)("h3",{className:"pb-10 capitalize",children:null!==y&&void 0!==y&&null!==(r=y.dbPrincipal)&&void 0!==r&&r.exprYears?"we have ".concat(null===y||void 0===y||null===(i=y.dbPrincipal)||void 0===i?void 0:i.exprYears," years of experience"):"we have many years of experience"}):(0,ne.jsx)("h2",{className:"separator-about capitalize",children:h||(0,ne.jsxs)("span",{className:"lowercase text-[18px]",children:["default title={'frase'}"," o"," agregar licencia o a\xf1os de experienceias sloganPrincipal={true}"]})}),(0,ne.jsx)("p",{className:"pb-4",children:d||(0,ne.jsxs)("span",{children:["para agregar el texto -> text={'description'}",(0,ne.jsx)("br",{}),"para agregar lista de about -> listsAbout={true}",(0,ne.jsx)("br",{}),"para agregar lista de servicios -> listsServices={true}"]})}),p?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:(null===y||void 0===y||null===(a=y.dbAbout)||void 0===a?void 0:a[0].list.length)>1?null===y||void 0===y||null===(o=y.dbAbout)||void 0===o?void 0:o[0].list.map((function(e,t){return(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Ii,{}),(0,ne.jsx)("span",{className:"pl-2",children:e})]},t)})):null}):null,v?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:null===y||void 0===y||null===(s=y.dbServices)||void 0===s?void 0:s.slice(0,6).map((function(e,t){return(0,ne.jsxs)("li",{className:"py-1 flex items-center",children:[(0,ne.jsx)(Ii,{}),(0,ne.jsx)("span",{children:e.name})]},t)}))}):null,(0,ne.jsx)($t,{btnStyle:"three"}),(0,ne.jsx)("div",{className:"w-full",children:(0,ne.jsx)("span",{className:"separator-about"})})]})]})})})},Oi=function(e){var t,n,r,i,a,o,s,u=e.title,l=e.text,f=e.listsAbout,h=e.listsServices,d=e.image,p=e.sloganPrincipal,v=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{className:"bg-[#efefef] py-[150px]",children:(0,ne.jsx)("div",{className:"w-[95%] md:w-4/5 mx-auto",children:(0,ne.jsxs)("div",{className:"border-[15px] borderColor flex flex-col-reverse md:flex-row px-5 md:px-10",children:[(0,ne.jsx)("div",{className:"w-full md:w-1/2 flex bg-white mr-0 -mb-20 mt-5 md:mr-2 md:-my-20 px-10 py-20 text-center md:text-start",children:(0,ne.jsxs)("div",{className:"flex flex-col justify-center ",children:[p?null!==v&&void 0!==v&&null!==(t=v.dbPrincipal)&&void 0!==t&&t.licensed?(0,ne.jsx)("h2",{className:"pb-3 capitalize",children:null===v||void 0===v||null===(n=v.dbPrincipal)||void 0===n?void 0:n.licensed}):(0,ne.jsx)("h3",{className:"pb-10 capitalize",children:null!==v&&void 0!==v&&null!==(r=v.dbPrincipal)&&void 0!==r&&r.exprYears?"we have ".concat(null===v||void 0===v||null===(i=v.dbPrincipal)||void 0===i?void 0:i.exprYears," years of experience"):"we have many years of experience"}):(0,ne.jsx)("h2",{className:"text-[25px] md:text-[35px] pb-3 capitalize",children:u||(0,ne.jsxs)("span",{className:"lowercase text-[18px]",children:["default title={'frase'}"," o"," agregar licencia o a\xf1os de experienceias sloganPrincipal={true}"]})}),(0,ne.jsx)("p",{className:"pb-3",children:l||(0,ne.jsxs)("span",{children:["para agregar el texto -> text={'description'}",(0,ne.jsx)("br",{}),"para agregar lista de about -> listsAbout={true}",(0,ne.jsx)("br",{}),"para agregar lista de servicios -> listsServices={true}"]})}),f?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:(null===v||void 0===v||null===(a=v.dbAbout)||void 0===a?void 0:a[0].list.length)>1?null===v||void 0===v||null===(o=v.dbAbout)||void 0===o?void 0:o[0].list.map((function(e,t){return(0,ne.jsxs)("li",{className:"py-2 flex items-center",children:[(0,ne.jsx)(Ii,{}),(0,ne.jsx)("span",{className:"pl-2",children:e})]},t)})):null}):null,h?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:null===v||void 0===v||null===(s=v.dbServices)||void 0===s?void 0:s.slice(0,6).map((function(e,t){return(0,ne.jsxs)("li",{className:"py-1 flex items-center",children:[(0,ne.jsx)(Ii,{}),(0,ne.jsx)("span",{children:e.name})]},t)}))}):null,(0,ne.jsx)("div",{children:(0,ne.jsx)($t,{})})]})}),(0,ne.jsx)("div",{className:"w-full md:w-1/2 ml-0 -mt-20 mb-0 md:ml-2 md:-my-20",children:(0,ne.jsx)("img",{src:d||Ni,alt:"no found",loading:"lazy",className:"w-full h-[300px] md:h-full object-cover"})})]})})})},Pi=function(e){var t,n=e.linkVideo,r=e.image,i=e.title,a=e.text,o=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{className:"bgCountentVideo",style:{backgroundImage:'url("'.concat(r||(null===o||void 0===o||null===(t=o.stock)||void 0===t?void 0:t[0]),'")')},children:(0,ne.jsxs)("div",{className:"countentVideoInfo ",children:[(0,ne.jsxs)("div",{className:"info",children:[(0,ne.jsx)("h3",{children:i}),(0,ne.jsx)("p",{children:a}),(0,ne.jsx)($t,{})]}),(0,ne.jsx)("iframe",{title:"Promotional video",className:"w-[90%] h-[280px] md:h-[360px] md:w-[50%] lg:h-[460px] lg:w-[60%] mx-auto rounded-3xl relative top-[80px] md:top-[150px]",id:"ytplayer",type:"text/html",src:"https://www.youtube.com/embed/".concat(n,"?&autoplay=1&loop=1&rel=0&showinfo=0&color=white&iv_load_policy=3&playlist=").concat(n),frameborder:"0",allowfullscreen:!0})]})})},Ri=function(e){var t=e.ServiceName,n=e.TextService,r=e.bgimg,i=e.ClassesRow,a=e.DisplayNone,o=e.itemServices,s=e.classesMargin;return(0,ne.jsxs)("div",{className:"md:flex  md:flex-row content-text-bg md:p-0 px-2 my-[200px] ",style:{flexDirection:"".concat(i)},children:[(0,ne.jsxs)("div",{className:"md:w-[50%] md:self-center md:my-[-40px] ".concat(s," md:p-10 p-4  shadow-lg bg-white z-10 rounded-xl"),children:[(0,ne.jsx)("h3",{className:a,children:t}),(0,ne.jsx)("p",{children:n}),(0,ne.jsx)("ul",{children:o}),(0,ne.jsx)($t,{btnStyle:"three"})]}),(0,ne.jsx)("div",{className:"md:w-[50%] w-full flex self-center",children:(0,ne.jsx)("div",{className:"w-full md:h-[500px] h-[350px] bg-cover bg-center",style:{backgroundImage:'url("'.concat(r,'")')}})})]})};var Di=function(){var e,t,n,r=(0,c.useContext)(te).rpdata,i="row",a="md:mr-[-40px]";return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsxs)("div",{className:"w-full",children:[(0,ne.jsx)("h2",{className:"text-center mt-10 md:mb-[-100px] mb-[-150px]",children:null===r||void 0===r||null===(e=r.labels)||void 0===e||null===(t=e.general)||void 0===t?void 0:t.t
2itleServices}),null===r||void 0===r||null===(n=r.dbServices)||void 0===n?void 0:n.map((function(e,t){return(0,ne.jsx)("div",{className:"w-4/5 mx-auto md:my-3 my-5",children:e.description.map((function(t,n){var r;i=r="row"===i?"row-reverse":"row";var o,s=0===n?" block":"hidden";return a=o="md:mr-[-40px]"===a?"md:ml-[-40px]":"md:mr-[-40px]",(0,ne.jsx)(Ri,{ServiceName:e.name,TextService:t.text,itemServices:t.lists.map((function(e,t){return e.length>0?(0,ne.jsxs)("li",{children:[(0,ne.jsx)("i",{className:"fa fa-arrow-right mr-2"}),e]},t):null})),bgimg:t.img,ClassesRow:r,DisplayNone:s,classesMargin:o},n)}))},t)}))]})})};function Fi(e){return nn({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]})(e)}function Li(e){return nn({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 0 0-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 0 0-80.4 119.5A373.6 373.6 0 0 0 137 888.8a8 8 0 0 0 8 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 0 0 8.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 0 1 340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 0 1 683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]})(e)}var Mi=function(e){var t=e.galleryImages,n=u((0,c.useState)(0),2),r=n[0],i=n[1],a=u((0,c.useState)(!1),2),o=a[0],s=a[1];return(0,ne.jsxs)("div",{className:"w-4/5 mx-auto",children:[o&&(0,ne.jsxs)("div",{className:"sliderWrap",children:[(0,ne.jsx)(Fi,{className:"btnClose",onClick:function(){s(!1)}}),(0,ne.jsx)(qn,{className:"btnPrev",onClick:function(){i(0===r?t.length-1:r-1)}}),(0,ne.jsx)(Un,{className:"btnNext",onClick:function(){r+1===t.length?i(0):i(r+1)}}),(0,ne.jsx)("div",{className:"fullScreenImage",children:(0,ne.jsx)("img",{src:t[r],alt:"images de gallery"})})]}),(0,ne.jsx)("div",{className:"galleryWrap",children:t&&t.map((function(e,t){return(0,ne.jsx)("div",{className:"single",onClick:function(){return function(e){i(e),s(!0)}(t)},children:(0,ne.jsx)("img",{src:"".concat(e),alt:"images-"+t})},t)}))})]})};var Vi=function(){var e,t,n,r,i,a,o,s,u,l,f,h,d,p,v,m,y,g,b,w,x,k,_,C,E,S,T,I,N,A,j,O,P,R,D,F,L=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(wi,{PageName:"Home",children:(0,ne.jsxs)("div",{className:"md:max-w-full w-full",children:[(0,ne.jsx)(qe,{}),(0,ne.jsx)(Ei,{}),(0,ne.jsx)(Ai,{text:null===L||void 0===L||null===(e=L.dbHome)||void 0===e?void 0:e[0].text,image:null===L||void 0===L||null===(t=L.gallery)||void 0===t?void 0:t[29],sloganPrincipal:!0,listsServices:!0}),null!==L&&void 0!==L&&null!==(n=L.videosPromo)&&void 0!==n&&null!==(r=n[0])&&void 0!==r&&r.activo?(0,ne.jsx)(Pi,{title:null===L||void 0===L||null===(i=L.dbSlogan)||void 0===i||null===(a=i[2])||void 0===a?void 0:a.slogan,text:null===L||void 0===L||null===(o=L.dbAbout)||void 0===o||null===(s=o[1])||void 0===s?void 0:s.text,linkVideo:"".concat(null===L||void 0===L||null===(u=L.videosPromo)||void 0===u?void 0:u[0].link),image:"".concat(null===L||void 0===L||null===(l=L.videosPromo)||void 0===l?void 0:l[0].img)}):null,(0,ne.jsx)(re,{}),(0,ne.jsx)(ji,{title:null===L||void 0===L||null===(f=L.dbSlogan)||void 0===f||null===(h=f[3])||void 0===h?void 0:h.slogan,text:null===L||void 0===L||null===(d=L.dbHome)||void 0===d||null===(p=d[1])||void 0===p?void 0:p.text,image1:null===L||void 0===L||null===(v=L.gallery)||void 0===v?void 0:v[6],image2:null===L||void 0===L||null===(m=L.gallery)||void 0===m?void 0:m[8],image3:null===L||void 0===L||null===(y=L.gallery)||void 0===y?void 0:y[1]}),(0,ne.jsx)(ki,{image:null===L||void 0===L||null===(g=L.gallery)||void 0===g?void 0:g[34]}),(0,ne.jsx)(Oi,{title:"a little about us",text:null===L||void 0===L||null===(b=L.dbAbout)||void 0===b||null===(w=b[0])||void 0===w?void 0:w.text,image:null===L||void 0===L||null===(x=L.gallery)||void 0===x?void 0:x[13],listsAbout:!0}),!0===(null===L||void 0===L||null===(k=L.reviews)||void 0===k?void 0:k.isHomeOnly)?(0,ne.jsxs)("div",{className:"w-4/5 mx-auto py-[100px]",children:[(0,ne.jsx)("h1",{className:"pb-10 text-center",children:null===L||void 0===L||null===(_=L.labels)||void 0===_||null===(C=_.general)||void 0===C?void 0:C.titleReviews}),(0,ne.jsx)("div",{className:"".concat(null===L||void 0===L||null===(E=L.reviews)||void 0===E||null===(S=E.links)||void 0===S?void 0:S[0])})]}):null,null!==L&&void 0!==L&&null!==(T=L.simpleWidgets)&&void 0!==T&&null!==(I=T[3])&&void 0!==I&&I.activo?(0,ne.jsx)("div",{className:"pt-20",children:(0,ne.jsx)(Di,{})}):(0,ne.jsx)(Ci,{}),null!==L&&void 0!==L&&null!==(N=L.simpleWidgets)&&void 0!==N&&null!==(A=N[3])&&void 0!==A&&A.activo?(0,ne.jsxs)("div",{className:"pt-10 pb-28",children:[(0,ne.jsx)("h2",{className:"text-center pb-[50px]",children:null===L||void 0===L||null===(j=L.labels)||void 0===j||null===(O=j.general)||void 0===O?void 0:O.titleGallery}),(0,ne.jsx)(Mi,{galleryImages:(null===L||void 0===L||null===(P=L.gallery)||void 0===P?void 0:P.length)>0?null===L||void 0===L?void 0:L.gallery:null===L||void 0===L?void 0:L.stock})]}):null,null!==L&&void 0!==L&&null!==(R=L.brandingExtra)&&void 0!==R&&null!==(D=R[0])&&void 0!==D&&D.activo?(0,ne.jsx)(Si,{}):null,(0,ne.jsx)("div",{className:"bgFormHome",style:{backgroundImage:'url("'.concat(null===L||void 0===L||null===(F=L.gallery)||void 0===F?void 0:F[23],'")')},children:(0,ne.jsx)("div",{className:"relative",children:(0,ne.jsx)(ae,{})})}),(0,ne.jsx)(ze,{})]})})},Bi=function(e){var t=e.headertitle,n=e.bgimg,r=e.Subheader;return(0,ne.jsx)("div",{className:"breadcrumb-area",style:{backgroundImage:'url("'.concat(n,'")')},children:(0,ne.jsxs)("div",{className:"text-center relative",children:[(0,ne.jsx)("h1",{className:"text-white",children:t}),t===r?(0,ne.jsxs)("h6",{className:"text-white",children:["Home - ",r]}):(0,ne.jsx)("h6",{className:"text-white",children:r})]})})},zi=function(e){var t,n,r=e.image,i=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{className:"py-[150px] bg-cover bg-no-repeat bg-fixed bg-center relative before:bg-zinc-900/50 before:absolute before:w-full before:h-full before:top-0",
2style:{backgroundImage:'url("'.concat(r||(null===i||void 0===i||null===(t=i.stock)||void 0===t?void 0:t[0]),'")')},children:(0,ne.jsx)("div",{className:"relative w-4/5 mx-auto flex justify-end",children:(0,ne.jsx)("div",{className:"bg-white w-full lg:w-1/2 border-l-[15px] borderColor px-5 py-10",children:null===i||void 0===i||null===(n=i.dbValues)||void 0===n?void 0:n.map((function(e,t){return(0,ne.jsxs)("div",{className:"pb-5",children:[(0,ne.jsxs)("h4",{className:"flex items-center",children:[(0,ne.jsx)(On,{className:"dotsColor",fontSize:35}),(0,ne.jsxs)("span",{children:[e.title," "]})]}),(0,ne.jsx)("p",{className:"pl-9",children:e.description})]},t)}))})})})},qi=function(e){var t,n,r,i,a,o,s=e.title,u=e.text,l=e.listsAbout,f=e.listsServices,h=e.image,d=(e.image3,e.sloganPrincipal),p=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsx)("section",{className:"w-full flex justify-center md:py-32 py-10",children:(0,ne.jsxs)("div",{className:"max-w-7xl lg:ml-14 md:flex md:p-0 px-2 content-reverse",children:[(0,ne.jsxs)("div",{className:"md:w-[50%] lg:-mt-8 flex justify-center",children:[(0,ne.jsx)("div",{className:"w-[85%] md:w-[650px] md:h-[700px] h-[320px] bg-cover bg-center md:-ml-8 ml-0 lg:ml-10 lg:rounded-md rounded-2xl",style:{backgroundImage:'url("'.concat(h||Ni,'")')}}),(0,ne.jsx)("div",{className:" hidden lg:flex lg:absolute borderColor border-[4px] lg:border-[11px] -mt-[20%] lg:mt-[-4%] left-28 w-[80px] h-[80px] rounded-3xl lg:w-[230px] lg:h-[230px] -z-10 "})]}),(0,ne.jsxs)("div",{className:"md:w-[50%] bg-white lg:mt-24 lg:mx-0 mx-4 py-8 md:px-6 px-3 self-center md:text-start text-center shadow-2xl lg:-ml-24",children:[d?(null===p||void 0===p||null===(t=p.dbPrincipal)||void 0===t?void 0:t.licensed.length)>1?(0,ne.jsx)("h2",{className:"pb-3 capitalize",children:null===p||void 0===p||null===(n=p.dbPrincipal)||void 0===n?void 0:n.licensed}):(0,ne.jsxs)("h2",{className:"pb-3 capitalize",children:["we have ",null===p||void 0===p||null===(r=p.dbPrincipal)||void 0===r?void 0:r.exprYears," years of experience "]}):(0,ne.jsx)("h2",{className:"pb-3 capitalize",children:s||(0,ne.jsxs)("span",{className:"lowercase text-[18px]",children:["default title={'frase'}"," o"," agregar licencia o a\xf1os de experienceias sloganPrincipal={true}"]})}),(0,ne.jsx)("p",{className:"pb-3",children:u||(0,ne.jsxs)("span",{children:["para agregar el texto -> text={'description'}",(0,ne.jsx)("br",{}),"para agregar lista de about -> listsAbout={true}",(0,ne.jsx)("br",{}),"para agregar lista de servicios -> listsServices={true}"]})}),(0,ne.jsx)("div",{className:"flex md:flex-row  py-3",children:(0,ne.jsxs)("div",{className:"md:w-[80%] w-full",children:[l?(0,ne.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 pb-5",children:(null===p||void 0===p||null===(i=p.dbAbout)||void 0===i?void 0:i[0].list.length)>1?null===p||void 0===p||null===(a=p.dbAbout)||void 0===a?void 0:a[0].list.map((function(e,t){return(0,ne.jsxs)("li",{className:"py-1 px-2 block items-center",children:[(0,ne.jsxs)("div",{class:"flex justify-between mb-1",children:[(0,ne.jsx)("span",{class:"text-base font-medium text-black",children:e}),(0,ne.jsxs)("span",{class:"text-base font-medium text-black",children:[(0,ne.jsx)(xi.ZP,{end:100,duration:15,enableScrollSpy:!0,scrollSpyDelay:50}),"%"]})]}),(0,ne.jsx)("div",{class:"w-full rounded-full h-2.5 bg-slate-400 ",children:(0,ne.jsx)("div",{className:"w-[98%] animate-pulse h-2.5 rounded-full bgBloque z-20"})})]},t)})):null}):null,f?(0,ne.jsx)("ul",{className:"block pb-5",children:null===p||void 0===p||null===(o=p.dbServices)||void 0===o?void 0:o.slice(0,4).map((function(e,t){return(0,ne.jsxs)("li",{className:"py-1 block items-center",children:[(0,ne.jsxs)("div",{class:"flex justify-between mb-1",children:[(0,ne.jsx)("span",{class:"text-base font-medium text-black",children:e.name}),(0,ne.jsxs)("span",{class:"text-base font-medium text-black",children:[(0,ne.jsx)(xi.ZP,{end:100,duration:10,enableScrollSpy:!0,scrollSpyDelay:50}),"%"]})]}),(0,ne.jsx)("div",{class:"w-full  h-3 bg-slate-400 ",children:(0,ne.jsx)("div",{className:"w-[98%] animate-pulse h-3 bgBloque z-20"})})]},t)}))}):null]})}),(0,ne.jsx)("div",{children:(0,ne.jsx)($t,{})}),(0,ne.jsx)("div",{className:" hidden lg:flex lg:absolute borderColor border-[4px] lg:border-[11px] -mt-[20%] lg:-mt-[9%] lg:right-[7.5%] w-[80px] h-[80px] rounded-3xl lg:w-[230px] lg:h-[230px] -z-10 "})]})]})})})};var Ui=function(){var e,t,n,r,i,a,o,s,u,l,f=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(wi,{PageName:"About",children:(0,ne.jsxs)("div",{className:"md:max-w-full w-full",children:[(0,ne.jsx)(Bi,{headertitle:"About",Subheader:"About",bgimg:"".concat(null===f||void 0===f||null===(e=f.gallery)||void 0===e?void 0:e[17])}),(0,ne.jsx)(qi,{title:"a little about us",text:null===f||void 0===f||null===(t=f.dbAbout)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.text,image:null===f||void 0===f||null===(r=f.gallery)||void 0===r?void 0:r[5],listsAbout:!0}),(0,ne.jsx)(zi,{image:null===f||void 0===f||null===(i=f.gallery)||void 0===i?void 0:i[57]}),(0,ne.jsx)(Oi,{title:null===f||void 0===f||null===(a=f.dbSlogan)||void 0===a||null===(o=a[2])||void 0===o?void 0:o.slogan,text:null===f||void 0===f||null===(s=f.dbAbout)||void 0===s||null===(u=s[1])||void 0===u?void 0:u.text,image:null===f||void 0===f||null===(l=f.gallery)||void 0===l?void 0:l[3]})]})})};var Hi=function(){var e,t=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(wi,{PageName:"Services",children:(0,ne.jsxs)("div",{className:"md:max-w-full w-full",children:[(0,ne.jsx)(Bi,{headertitle:"Services",Subheader:"Services",bgimg:"".concat(null===t||void 0===t||null===(e=t.gallery)||void 0===e?void 0:e[11])}),(0,ne.jsx)(Di,{})]})})};var Wi=function(){var e,t,n=(0,c.useContext)(te).rpdata;return(0,ne.jsx)("div",{children:(null===n||void 0===n||null===(e=n.beforeAfterGall)||void 0===e?void 0:e.length)>0?(0,ne.jsxs)("div",{className:"w-[90%] mx-auto py-14",children:[(0,ne.jsx)("h2",{className:"text-center capitalize pb-[50px]",children:"Before & after"}),(0,ne.jsx)("div",{className:"flex flex-wrap justify-center gap-5",children:null===n||void 0===n||null===(t=n.beforeAfterGall)||void 0===t?void 0:t.map((function(e,t){return(0,ne.jsxs)("img-comparison-slider",{children:[(0,ne.jsxs)("div",{slot:"first",class:"before",children:[(0,ne.jsx)("img",{slot:"first",className:"w-full h-full md:w-[400px] md:h-[400px]",src:"".concat(e.beforeImg),alt:"Not Found"}),(0,ne.jsx)("figcaption",{children:"Before"})]}),(0,ne.jsxs)("div",{slot:"second",class:"after",children:[(0,ne.jsx)("img",{slot:"second",className:"w-full h-full md:w-[400px] md:h-[400px]",alt:"Not Found",src:"".concat(e.afterImg)}),(0,ne.jsx)("figcaption",{children:"After"})]})]},t)}))})]}):null})};var Ki=function(){var e,t,n,r,i,a,o,s=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(wi,{PageName:"Gallery",children:(0,ne.jsxs)("div",{className:"w-full",children:[(0,ne.jsx)(Bi,{headertitle:"Gallery",Subheader:"Gallery",bgimg:"".concat(null===s||void 0===s||null===(e=s.gallery)||void 0===e?void 0:e[26])}),(null===s||void 0===s||null===(t=s.beforeAfterGall)||void 0===t?void 0:t.length)>0?(0,ne.jsx)(Wi,{}):null,(0,ne.jsx)("div",{children:(null===s||void 0===s||null===(n=s.landings)||void 0===n?void 0:n.length)>0?null===s||void 0===s||null===(r=s.landings)||void 0===r?void 0:r.map((function(e,t){var n,r;return(0,ne.jsxs)("div",{className:"pt-20 pb-32",children:[(0,ne.jsxs)("div",{className:"text-center py-5",children:[(0,ne.jsx)("h2",{className:"text-center",children:null===s||void 0===s||null===(n=s.labels)||void 0===n||null===(r=n.general)||void 0===r?void 0:r.titleGallery}),(0,ne.jsx)("h2",{className:"capitalize",children:e.name})]},t),(0,ne.jsx)(Mi,{galleryImages:e.gallery})]})})):(0,ne.jsxs)("div",{className:"pb-32",children:[(0,ne.jsx)("div",{className:"text-center py-5",children:(0,ne.jsx)("h2",{className:"text-center pt-[100px]",children:null===s||void 0===s||null===(i=s.labels)||void 0===i||null===(a=i.general)||void 0===a?void 0:a.titleGallery})}),(0,ne.jsx)(Mi,{galleryImages:(null===s||void 0===s||null===(o=s.gallery)||void 0===o?void 0:o.length)>0?null===s||void 0===s?void 0:s.gallery:null===s||void 0===s?void 0:s.stock})]})})]})})};function Gi(e){return nn({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11 10c-1 1-1 2-2 2s-2-1-3-2-2-2-2-3 1-1 2-2-2-4-3-4-3 3-3 3c0 2 2.055 6.055 4 8s6 4 8 4c0 0 3-2 3-3s-3-4-4-3z"}}]})(e)}function Yi(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"desc",attr:{},child:[]},{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4"}},{tag:"circle",attr:{cx:"18",cy:"18",r:"4"}},{tag:"path",attr:{d:"M15 3v4"}},{tag:"path",attr:{d:"M7 3v4"}},{tag:"path",attr:{d:"M3 11h16"}},{tag:"path",attr:{d:"M18 16.496v1.504l1 1"}}]})(e)}var Qi=function(){var e,t,n,r,i,a,o,s,u,l,f,h=(0,c.useContext)(te).rpdata;return(0,ne.jsxs)("div",{className:"w-full pb-10",children:[(0,ne.jsxs)("div",{className:"w-full block md:flex py-14 md:py-[100px]",children:[(0,ne.jsx)("div",{className:"w-full md:w-[55%] pb-10 pr-5 md:pr-8 md:pb-0",children:(0,ne.jsx)("div",{className:"h-[350px] md:h-full bg-cover mb-10 md:mb-0 shadow-2xl shadow-[#3f3f3f]",style:{backgroundImage:'url("'.concat(null===h||void 0===h||null===(e=h.gallery)||void 0===e?void 0:e[7],'")'),borderRadius:"0 100% 100% 0"}})}),(0,ne.jsx)("div",{className:"w-full md:w-[45%]",children:(0,ne.jsxs)("div",{className:"w-[80%] md:w-[70%] text-center md:text-left mx-auto md:ml-10",children:[(0,ne.jsx)("h1",{children:"Contact US"}),(0,ne.jsx)(ie,{})]})})]}),(0,ne.jsx)("div",{className:"bgBtnMenu relative h-[600px] md:h-[650px] lg:h-40 py-20",children:(0,ne.jsx)("div",{className:"w-[90%] mx-auto absolute -top-10 left-[5%] right-[5%]",children:(0,ne.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[(0,ne.jsxs)("div",{className:"bgBloque py-10 px-5 rounded-xl shadow-lg shadow-[#07070745] text-white",children:[(0,ne.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,ne.jsx)(tr,{className:"text-[40px]"}),(0,ne.jsx)("h4",{className:"capitalize",children:"Phone"})]}),null===h||void 0===h||null===(t=h.dbPrincipal)||void 0===t?void 0:t.phones.map((function(e,t){return(0,ne.jsxs)("a",{href:"tel:+1".concat(e.phone),className:"flex items-center justify-center",children:[(0,ne.jsx)(Gi,{fontSize:"18px"}),(0,ne.jsxs)("h5",{className:"pl-4 text-[22px]",children:[e.phone,(0,ne.jsx)("span",{className:"pl-2",children:e.name})]})]},t)}))]}),(0,ne.jsxs)("div",{className:"bgBloque py-10 px-5 rounded-xl shadow-lg shadow-[#07070745] text-white",children:[(0,ne.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,ne.jsx)(Jn,{className:"text-[40px]"}),(0,ne.jsx)("h4",{className:"capitalize",children:"location"})]}),(0,ne.jsxs)("div",{className:"flex items-center justify-center",children:[(0,ne.jsx)(Gn,{fontSize:"18px"}),(0,ne.jsx)("h5",{className:"pl-4 text-[22px]",children:null===h||void 0===h||null===(n=h.dbPrincipal)||void 0===n||null===(r=n.location)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.address})]})]}),(0,ne.jsxs)("div",{className:"bgBloque py-10 px-5 rounded-xl shadow-lg shadow-[#07070745] text-white",children:[(0,ne.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,ne.jsx)(Yi,{className:"text-[40px]"}),(0,ne.jsx)("h4",{className:"capitalize",children:"opening hours"})]}),(0,ne.jsxs)("div",{className:"flex items-center justify-center",children:[(0,ne.jsx)(Vn,{fontSize:"18px"}),(0,ne.jsx)("h5",{className:"pl-4 text-[22px]",children:null===h||void 0===h||null===(a=h.dbPrincipal)||void 0===a||null===(o=a.workdays)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.day})]}),(0,ne.jsxs)("div",{className:"flex items-center justify-center",children:[(0,ne.jsx)(pn,{fontSize:"18px"}),(0,ne.jsx)("h5",{className:"pl-4 text-[22px]",children:null===h||void 0===h||null===(u=h.dbPrincipal)||void 0===u||null===(l=u.w
2orkHours)||void 0===l||null===(f=l[0])||void 0===f?void 0:f.hour})]})]})]})})})]})};var $i=function(){var e,t=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(wi,{PageName:"Contact",children:(0,ne.jsxs)("div",{className:"md:max-w-full w-full",children:[(0,ne.jsx)(Bi,{headertitle:"Contact",Subheader:"Contact",bgimg:"".concat(null===t||void 0===t||null===(e=t.gallery)||void 0===e?void 0:e[15])}),(0,ne.jsx)(Qi,{}),(0,ne.jsx)(ze,{})]})})};var Xi=function(){return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsx)("div",{className:"w-full h-[100vh] bg-white flex justify-center items-center",children:(0,ne.jsx)("div",{className:"loader"})})})};var Ji=function(){var e,t,n,r=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsx)("div",{className:"wrapper",children:(0,ne.jsx)("ul",{className:"social-icons icon-circle list-unstyled list-inline mt-6",children:(null===r||void 0===r||null===(e=r.dbSocialMedia)||void 0===e||null===(t=e.redes)||void 0===t?void 0:t[0].url.length)>0?null===r||void 0===r||null===(n=r.dbSocialMedia)||void 0===n?void 0:n.redes.map((function(e,t){return(0,ne.jsx)("li",{children:(0,ne.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("i",{className:"fab fa-".concat(e.icon," wp-icon"),"aria-hidden":"true"})})},t)})):null})})})};var Zi=function(){var e,t,n,r,i,a,o=(0,c.useContext)(te).rpdata,s=[{title:null===o||void 0===o||null===(e=o.dbValues)||void 0===e?void 0:e[0].title,description:null===o||void 0===o||null===(t=o.dbValues)||void 0===t?void 0:t[0].description,icon:(0,ne.jsx)(nr,{fontSize:70,className:"titleColorFt"})},{title:null===o||void 0===o||null===(n=o.dbValues)||void 0===n?void 0:n[1].title,description:null===o||void 0===o||null===(r=o.dbValues)||void 0===r?void 0:r[1].description,icon:(0,ne.jsx)(Cn,{fontSize:70,className:"titleColorFt"})}
2,{title:null===o||void 0===o||null===(i=o.dbValues)||void 0===i?void 0:i[2].title,description:null===o||void 0===o||null===(a=o.dbValues)||void 0===a?void 0:a[2].description,icon:(0,ne.jsx)(Kn,{fontSize:70,className:"titleColorFt"})}];return(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsx)("div",{className:"container mx-auto md:w-full py-10 flex md:flex-row flex-col justify-center items-center",children:s.map((function(e,t){return(0,ne.jsxs)("div",{className:"bg-white w-80 h-[380px] md:text-start text-center m-4 p-5 shadow-lg cursor-pointer rounded transform hover:scale-105 duration-300 ease-in-out",children:[(0,ne.jsx)("div",{className:"flex justify-center",children:e.icon}),(0,ne.jsxs)("div",{className:"p-4 ",children:[(0,ne.jsx)("h2",{className:"text-2xl text-center uppercase",children:e.title}),(0,ne.jsx)("p",{className:"text-center pb-3",children:e.description})]})]},t)}))})})};var ea=function(){var e,t,n,r=(0,c.useContext)(te).rpdata,i=z().id,a=function(){window.scrollTo({top:0,behavior:"smooth"})};return(0,ne.jsxs)(wi,{PageName:"".concat(null===r||void 0===r||null===(e=r.dbPrincipal)||void 0===e?void 0:e.name),children:[null===r||void 0===r||null===(t=r.dbServices)||void 0===t?void 0:t.map((function(e,t){var n,o,s,u,l,c,f,h,d,p,v,m,y,g,b;return e.name.replaceAll(/[\^*@!"#$%&/()=?\xa1!\xbf'\\ ]/g,"-").toLowerCase()===i?(0,ne.jsxs)("div",{children:[(0,ne.jsx)(Bi,{bgimg:(null===r||void 0===r||null===(n=r.gallery)||void 0===n?void 0:n.length)>1?null===r||void 0===r?void 0:r.gallery[Math.floor(Math.random()*(null===r||void 0===r||null===(o=r.gallery)||void 0===o?void 0:o.length))]:null===r||void 0===r?void 0:r.stock[Math.floor(Math.random()*(null===r||void 0===r||null===(s=r.stock)||void 0===s?void 0:s.length))],headertitle:e.name,Subheader:"Our Services"}),(0,ne.jsxs)("div",{className:"w-[95%] md:w-[90%] mx-auto my-10 block md:flex md:gap-5",children:[(0,ne.jsxs)("div",{className:"w-full md:w-9/12 shadow-lg shadow-neutral-800/30 p-5 md:p-10 mb-5",children:[(0,ne.jsx)("img",{src:e.description[0].img,alt:"no found",className:"w-full object-cover h-auto md:h-[500px]"}),(0,ne.jsx)("h3",{children:null===r||void 0===r?void 0:r.dbSlogan[Math.floor(Math.random()*(null===r||void 0===r||null===(u=r.dbSlogan)||void 0===u?void 0:u.length))].slogan}),e.description.map((function(e,t){return(0,ne.jsxs)("div",{children:[(0,ne.jsx)("p",{className:"pb-5",children:e.text}),e.lists.length>1?(0,ne.jsx)("ul",{className:"pb-5",children:e.lists.map((function(e,t){return(0,ne.jsxs)("li",{className:"flex gap-3 items-center",children:[(0,ne.jsx)(Hn,{fontSize:8}),e]},t)}))}):null]},t)})),(0,ne.jsx)($t,{})]}),(0,ne.jsxs)("div",{className:"w-full md:w-1/4 shadow-lg bgBloqueServicesDetail p-5 md:p-5 mb-5 text-white",children:[(0,ne.jsxs)("div",{className:"pb-5",children:[(0,ne.jsx)("h4",{className:"text-center md:text-start",children:" Our Services"}),(0,ne.jsx)("ul",{className:"px-1 md:px-4",children:null===r||void 0===r||null===(l=r.dbServices)||void 0===l?void 0:l.slice(0,12).map((function(e,t){return(0,ne.jsx)("li",{children:(0,ne.jsxs)(Z,{to:"/".concat(e.name.replaceAll(/[\^*@!"#$%&/()=?\xa1!\xbf'\\ ]/g,"-").toLowerCase()),onClick:a,className:"flex items-center text-white pb-3",children:[(0,ne.jsx)(Bn,{}),(0,ne.jsx)("span",{className:"pl-2",children:e.name})]})},t)}))})]}),(0,ne.jsxs)("div",{className:"pb-5",children:[(0,ne.jsx)("h4",{className:"text-center md:text-start",children:"Contact"}),(0,ne.jsxs)("ul",{className:"px-1 md:px-4",children:[null===r||void 0===r||null===(c=r.dbPrincipal)||void 0===c?void 0:c.phones.map((function(e,t){return(0,ne.jsx)("li",{className:"flex items-center text-white pb-3",children:(0,ne.jsxs)("a",{href:"tel:+1".concat(e.phone),className:"flex items-center",children:[(0,ne.jsx)(cn,{}),(0,ne.jsx)("span",{className:"pl-2",children:e.phone})]})},t)})),null===r||void 0===r||null===(f=r.dbPrincipal)||void 0===f?void 0:f.emails.map((function(e,t){return(0,ne.jsx)("li",{className:"flex items-center text-white pb-3",children:(0,ne.jsxs)("a",{href:"mailto:".concat(e.email),className:"flex items-center",children:[(0,ne.jsx)(Tn,{}),(0,ne.jsx)("span",{className:"pl-2",children:e.email})]})},t)}))]})]}),(0,ne.jsxs)("div",{className:"pb-5",children:[(0,ne.jsx)("h4",{className:"text-center md:text-start",children:"Opening Hours"}),(0,ne.jsxs)("ul",{className:"px-1 md:px-4",children:[(0,ne.jsxs)("li",{className:"flex items-center text-white pb-3",children:[(0,ne.jsx)(an,{}),(0,ne.jsx)("span",{className:"pl-2",children:null===r||void 0===r||null===(h=r.dbPrincipal)||void 0===h||null===(d=h.workdays)||void 0===d||null===(p=d[0])||void 0===p?void 0:p.day})]},t),(0,ne.jsxs)("li",{className:"flex items-center text-white pb-3",children:[(0,ne.jsx)($n,{}),(0,ne.jsx)("span",{className:"pl-2",children:null===r||void 0===r||null===(v=r.dbPrincipal)||void 0===v||null===(m=v.workHours)||void 0===m||null===(y=m[0])||void 0===y?void 0:y.hour})]}
2,t)]})]}),(null===r||void 0===r||null===(g=r.dbSocialMedia)||void 0===g||null===(b=g.redes)||void 0===b?void 0:b.length)>1?(0,ne.jsxs)("div",{className:"pb-5 text-center md:text-start",children:[(0,ne.jsx)("h4",{children:"Follow Us"}),(0,ne.jsx)(Ji,{})]}):null]})]})]},t):console.log("Servicio no encontrado")})),(0,ne.jsx)(ki,{image:null===r||void 0===r||null===(n=r.gallery)||void 0===n?void 0:n[6]}),(0,ne.jsx)("div",{className:"mt-[-110px]",children:(0,ne.jsx)(Zi,{})}),(0,ne.jsx)(ze,{})]})};var ta=function(){var e,t,n=(0,c.useContext)(te).rpdata,r=z().id;return(0,ne.jsx)(wi,{PageName:"".concat(null===n||void 0===n||null===(e=n.dbPrincipal)||void 0===e?void 0:e.name),children:null===n||void 0===n||null===(t=n.landings)||void 0===t?void 0:t.map((function(e,t){var i,a,o;return e.name.replaceAll(/[\^*@!"#$%&/()=?\xa1!\xbf'\\ ]/g,"-").toLowerCase()===r?(0,ne.jsxs)("div",{children:[(0,ne.jsx)(Bi,{bgimg:(null===n||void 0===n||null===(i=n.gallery)||void 0===i?void 0:i.length)>1?null===n||void 0===n?void 0:n.gallery[Math.floor(Math.random()*(null===n||void 0===n||null===(a=n.gallery)||void 0===a?void 0:a.length))]:null===n||void 0===n?void 0:n.stock[Math.floor(Math.random()*(null===n||void 0===n||null===(o=n.stock)||void 0===o?void 0:o.length))],headertitle:e.name,Subheader:"Our Projects"}),(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsxs)("div",{className:"w-[90%] mx-auto text-center pt-[100px] pb-[80px]",children:[(0,ne.jsx)("h2",{className:"pb-5 ",children:"our recent projects of:"}),(0,ne.jsx)("h2",{children:e.name})]}),(0,ne.jsx)("div",{className:"pb-[100px]",children:(0,ne.jsx)(Mi,{galleryImages:e.gallery})})]})]},t):console.log("Servicio no encontrado")}))})},na=function(){var e=(0,c.useContext)(te).rpdata,t=u((0,c.useState)([]),2),n=t[0],i=t[1],o=null===e||void 0===e?void 0:e.docId;return(0,c.useEffect)((function(){var e=function(){var e=a(r().mark((function e(){var t,n,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="https://apireviews.herokuapp.com/api/reviews/".concat(o),e.next=3,bi().get(t);case 3:n=e.sent,i(n.data),console.log(n.data),a=n.data.sort((function(e,t){return new Date(t.Date)-new Date(e.Date)})),i(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[o]),(0,ne.jsx)("div",{className:"containerMansorry",children:null===n||void 0===n?void 0:n.map((function(e,t){return e.ReviewsStars>=3&&(0,ne.jsx)("div",{className:"w-full mx-3 py-3",children:(0,ne.jsxs)("div",{className:"w-full border px-5 py-10 rounded-md shadow-md cardMansorry h-full",children:[(0,ne.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ne.jsx)("div",{className:"w-[15%]",children:(0,ne.jsx)(xn,{className:"text-[50px]"})}),(0,ne.jsxs)("div",{className:"w-[85%]",children:[(0,ne.jsx)("div",{className:"flex",children:bn(new Array(5)).map((function(t,n){return n<e.ReviewsStars?(0,ne.jsx)(Sn,{className:" text-orange-400"}):(0,ne.jsx)(En,{})}))}),(0,ne.jsx)("h3",{className:"capitalize font-bold text-[20px]",children:e.ClientName}),(0,ne.jsx)("p",{className:"text-[14px] -mt-3",children:e.Date.substring(0,10)})]})]}),(0,ne.jsxs)("div",{children:[(0,ne.jsx)("h3",{className:"text-[22px] titleColorBodyReviews",children:e.ReviewTitle}),(0,ne.jsx)("p",{children:e.ReviewBody})]})]},t)},t)}))})};function ra(e){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ra(e)}function ia(e,t){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ia(e,t)}function aa(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(AF){return!1}}function oa(e,t,n){return oa=aa()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ia(i,n.prototype),i},oa.apply(null,arguments)}function sa(e){var t="function"===typeof Map?new Map:void 0;return sa=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return oa(e,arguments,ra(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ia(n,e)},sa(e)}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function la(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ca(e,t,n){return t&&la(e.prototype,t),n&&la(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ha(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ia(e,t)}
2function da(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return fa(e)}function pa(e){var t=aa();return function(){var n,r=ra(e);if(t){var i=ra(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return da(this,n)}}function va(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ra(e)););return e}function ma(){return ma="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=va(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ma.apply(this,arguments)}function ya(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(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 a,o=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}var ga=!1,ba=!1,wa="${JSCORE_VERSION}",xa=function(e,t){if(!e)throw ka(t)},ka=function(e){return new Error("Firebase Database ("+wa+") INTERNAL ASSERT FAILED: "+e)},_a=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var 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},Ca={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,s=o?e[i+1]:0,u=i+2<e.length,l=u?e[i+2]:0,c=a>>2,f=(3&a)<<4|s>>4,h=(15&s)<<2|l>>6,d=63&l;u||(d=64,o||(h=64)),r.push(n[c],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(_a(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{var s=e[n++],u=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&u)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==s||null==u)throw Error();var l=a<<2|o>>4;if(r.push(l),64!==s){var c=o<<4&240|s>>2;if(r.push(c),64!==u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},Ea=function(e){var t=_a(e);return Ca.encodeByteArray(t,!0)},Sa=function(e){return Ea(e).replace(/\./g,"")},Ta=function(e){try{return Ca.decodeString(e,!0)}catch(AF){console.error("base64Decode failed: ",AF)}return null};function Ia(e){return Na(void 0,e)}function Na(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=Na(e[n],t[n]));return e}var Aa=function(){return function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__},ja=function(){try{return Aa()||function(){if("undefined"!==typeof process){var e={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0}}()||function(){if("undefined"!==typeof document){var e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;
2]+)/)}catch(AF){return}var t=e&&Ta(e[1]);return t&&JSON.parse(t)}}()}catch(AF){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(AF))}},Oa=function(e){var t,n;return null===(n=null===(t=ja())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},Pa=function(e){var t=Oa(e);if(t){var n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error("Invalid host ".concat(t," with no separate hostname and port!"));var r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]}},Ra=function(){var e;return null===(e=ja())||void 0===e?void 0:e.config},Da=function(e){var t;return null===(t=ja())||void 0===t?void 0:t["_".concat(e)]},Fa=function(){function e(){var t=this;ua(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return ca(e,[{key:"wrapCallback",value:function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}}}]),e}();function La(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function Ma(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(La())}function Va(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function Ba(){return!0===ga||!0===ba}function za(){return!function(){var e,t=null===(e=ja())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(AF){return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function qa(){try{return"object"===typeof indexedDB}catch(AF){return!1}}var Ua=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a;return ua(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="FirebaseError",Object.setPrototypeOf(fa(a),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(fa(a),Ha.prototype.create),a}return ca(n)}(sa(Error)),Ha=function(){function e(t,n,r){ua(this,e),this.service=t,this.serviceName=n,this.errors=r}return ca(e,[{key:"create",value:function(e){var t=(arguments.length<=1?void 0:arguments[1])||{},n="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?Wa(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,")."),o=new Ua(n,a,t);return o}}]),e}();function Wa(e,t){return e.replace(Ka,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}var Ka=/\{\$([^}]+)}/g;function Ga(e){return JSON.parse(e)}function Ya(e){return JSON.stringify(e)}var Qa=function(e){var t={},n={},r={},i="";try{var a=e.split(".");t=Ga(Ta(a[0])||""),n=Ga(Ta(a[1])||""),i=a[2],r=n.d||{},delete n.d}catch(AF){}return{header:t,claims:n,data:r,signature:i}};function $a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xa(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Ja(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function Za(e,t,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function eo(e,t){if(e===t)return!0;for(var n=Object.keys(e),r=Object.keys(t),i=0,a=n;i<a.length;i++){var o=a[i];if(!r.includes(o))return!1;var s=e[o],u=t[o];if(to(s)&&to(u)){if(!eo(s,u))return!1}else if(s!==u)return!1}for(var l=0,c=r;l<c.length;l++){var f=c[l];if(!n.includes(f))return!1}return!0}function to(e){return null!==e&&"object"===typeof e}function no(e){for(var t=[],n=function(){var e=u(i[r],2),n=e[0],a=e[1];Array.isArray(a)?a.forEach((function(e){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(a))},r=0,i=Object.entries(e);r<i.length;r++)n();return t.length?"&"+t.join("&"):""}function ro(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=u(e.split("="),2),r=n[0],i=n[1];t[decodeURIComponent(r)]=decodeURIComponent(i)}})),t}function io(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}var ao=function(){function e(){ua(this,e),this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}return ca(e,[{key:"reset",value:function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}},{key:"compress_",value:function(e,t){t||(t=0);var n=this.W_;if("string"===typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(var i=0;i<16;i++)n[i]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(var a=16;a<80;a++){var o=n[a-3]^n[a-8]^n[a-14]^n[a-16];n[a]=4294967295&(o<<1|o>>>31)}for(var s,u,l=this.chain_[0],c=this.chain_[1],f=this.chain_[2],h=this.chain_[3],d=this.chain_[4],p=0;p<80;p++){p<40?p<20?(s=h^c&(f^h),u=1518500249):(s=c^f^h,u=1859775393):p<60?(s=c&f|h&(c|f),u=2400959708):(s=c^f^h,u=3395469782);var v=(l<<5|l>>>27)+s+d+u+n[p]&4294967295;d=h,h=f,f=4294967295&(c<<30|c>>>2),c=l,l=v}this.chain_[0]=this.chain_[0]+l&4294967295,this.chain_[1]=this.chain_[1]+c&4294967295,this.chain_[2]=this.chain_[2]+f&4294967295,this.chain_[3]=this.chain_[3]+h&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295}},{key:"update",value:function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,a=this.inbuf_;r<t;){if(0===a)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[a]=e.charCodeAt(r),++r,++a===this.blockSize){this.compress_(i),a=0;break}}else for(;r<t;)if(i[a]=e[r],++r,++a===this.blockSize){this.compress_(i),a=0;break}}this.inbuf_=a,this.total_+=t}}},{key:"digest",value:function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,i=0;i<5;i++)for(var a=24;a>=0;a-=8)e[r]=this.chain_[i]>>a&255,++r;return e}}]),e}();var oo=function(){function e(t,n){var r=this;ua(this,e),this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
2ise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then((function(){t(r)})).catch((function(e){r.error(e)}))}return ca(e,[{key:"next",value:function(e){this.forEachObserver((function(t){t.next(e)}))}},{key:"error",value:function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)}},{key:"complete",value:function(){this.forEachObserver((function(e){e.complete()})),this.close()}},{key:"subscribe",value:function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!==typeof e||null===e)return!1;var n,r=ya(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i in e&&"function"===typeof e[i])return!0}}catch(a){r.e(a)}finally{r.f()}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=so),void 0===r.error&&(r.error=so),void 0===r.complete&&(r.complete=so);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(AF){}})),this.observers.push(r),a}},{key:"unsubscribeOne",value:function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}},{key:"forEachObserver",value:function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)}},{key:"sendOne",value:function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(AF){"undefined"!==typeof console&&console.error&&console.error(AF)}}))}},{key:"close",value:function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))}}]),e}();function so(){}function uo(e,t){return"".concat(e," failed: ").concat(t," argument ")}var lo=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},co=144e5;function fo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(co,r+i)}function ho(e){return e&&e._delegate?e._delegate:e}var po=function(){function e(t,n,r){ua(this,e),this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return ca(e,[{key:"setInstantiationMode",value:function(e){return this.instantiationMode=e,this}},{key:"setMultipleInstances",value:function(e){return this.multipleInstances=e,this}},{key:"setServiceProps",value:function(e){return this.serviceProps=e,this}},{key:"setInstanceCreatedCallback",value:function(e){return this.onInstanceCreated=e,this}}]),e}(),vo="[DEFAULT]",mo=function(){function e(t,n){ua(this,e),this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return ca(e,[{key:"get",value:function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new Fa;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(AF){}}return this.instancesDeferred.get(t).promise}},{key:"getImmediate",value:function(e){var t,n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service ".concat(this.name," is not available"))}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(AF){if(r)return null;throw AF}}},{key:"getComponent",value:function(){return this.component}},{key:"setComponent",value:function(e){if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:vo})}catch(AF){}var t,n=ya(this.instancesDeferred.entries());try{for(n.s();!(t=n.n()).done;){var r=u(t.value,2),i=r[0],a=r[1],o=this.normalizeInstanceIdentifier(i);try{var s=this.getOrInitializeService({instanceIdentifier:o});a.resolve(s)}catch(AF){}}}catch(l){n.e(l)}finally{n.f()}}}},{key:"clearInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}},{key:"delete",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Array.from(this.instances.values()),e.next=3,Promise.all([].
2concat(bn(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),bn(t.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"isComponentSet",value:function(){return null!=this.component}},{key:"isInitialized",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo;return this.instances.has(e)}},{key:"getOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo;return this.instancesOptions.get(e)||{}}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.options,n=void 0===t?{}:t,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error("".concat(this.name,"(").concat(r,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));var i,a=this.getOrInitializeService({instanceIdentifier:r,options:n}),o=ya(this.instancesDeferred.entries());try{for(o.s();!(i=o.n()).done;){var s=u(i.value,2),l=s[0],c=s[1],f=this.normalizeInstanceIdentifier(l);r===f&&c.resolve(a)}}catch(h){o.e(h)}finally{o.f()}return a}},{key:"onInit",value:function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}}},{key:"invokeOnInitCallbacks",value:function(e,t){var n=this.onInitCallbacks.get(t);if(n){var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{a(e,t)}catch(WA){}}}catch(o){i.e(o)}finally{i.f()}}}},{key:"getOrInitializeService",value:function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,a=this.instances.get(n);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===vo?void 0:t),options:i}),this.instances.set(n,a),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(a,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,a)}catch(WA){}return a||null}},{key:"normalizeInstanceIdentifier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo;return this.component?this.component.multipleInstances?e:vo:e}},{key:"shouldAutoInitialize",value:function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}]),e}();var yo,go,bo=function(){function e(t){ua(this,e),this.name=t,this.providers=new Map}return ca(e,[{key:"addComponent",value:function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));t.setComponent(e)}},{key:"addOrOverwriteComponent",value:function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}},{key:"getProvider",value:function(e){if(this.providers.has(e))return this.providers.get(e);var t=new mo(e,this);return this.providers.set(e,t),t}},{key:"getProviders",value:function(){return Array.from(this.providers.values())}}]),e}(),wo=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(go||(go={}));var xo={debug:go.DEBUG,verbose:go.VERBOSE,info:go.INFO,warn:go.WARN,error:go.ERROR,silent:go.SILENT},ko=go.INFO,_o=(oe(yo={},go.DEBUG,"log"),oe(yo,go.VERBOSE,"log"),oe(yo,go.INFO,"info"),oe(yo,go.WARN,"warn"),oe(yo,go.ERROR,"error"),yo),Co=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=_o[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i,a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];(i=console)[r].apply(i,["[".concat(n,"]  ").concat(e.name,":")].concat(o))}},Eo=function(){function e(t){ua(this,e),this.name=t,this._logLevel=ko,this._logHandler=Co,this._userLogHandler=null,wo.push(this)}return ca(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in go))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?xo[e]:e}},{key:"logHandler",get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}},{key:"userLogHandler",get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,go.DEBUG].concat(t)),this._logHandler.apply(this,[this,go.DEBUG].concat(t))}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,go.VERBOSE].concat(t)),this._logHandler.apply(this,[this,go.VERBOSE].concat(t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,go.INFO].concat(t)),this._logHandler.apply(this,[this,go.INFO].concat(t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,go.WARN].concat(t)),this._logHandler.apply(this,[this,go.WARN].concat(t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,go.ERROR].concat(t)),this._logHandler.apply(this,[this,go.ERROR].concat(t))}}]),e}();var So,To;var Io=new WeakMap,No=new WeakMap,Ao=new WeakMap,jo=new WeakMap,Oo=new WeakMap;var Po={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return No.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Ao.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Fo(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function Ro(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(To||(To=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(Lo(this),n),Fo(Io.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];
2return Fo(e.apply(Lo(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=e.call.apply(e,[Lo(this),t].concat(r));return Ao.set(a,t.sort?t.sort():[t]),Fo(a)}}function Do(e){return"function"===typeof e?Ro(e):(e instanceof IDBTransaction&&function(e){if(!No.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=function(){t(),r()},a=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));No.set(e,t)}}(e),function(e,t){return t.some((function(t){return e instanceof t}))}(e,So||(So=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Po):e)}function Fo(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",a)},i=function(){t(Fo(e.result)),r()},a=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((function(t){t instanceof IDBCursor&&Io.set(t,e)})).catch((function(){})),Oo.set(t,e),t}(e);if(jo.has(e))return jo.get(e);var t=Do(e);return t!==e&&(jo.set(e,t),Oo.set(t,e)),t}var Lo=function(e){return Oo.get(e)};var Mo,Vo,Bo=["get","getKey","getAll","getAllKeys","count"],zo=["put","add","delete","clear"],qo=new Map;function Uo(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(qo.get(t))return qo.get(t);var n=t.replace(/FromIndex$/,""),i=t!==n,o=zo.includes(n);if(n in(i?IDBIndex:IDBObjectStore).prototype&&(o||Bo.includes(n))){var s=function(){var e=a(r().mark((function e(t){var a,s,u,l,c,f,h=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=this.transaction(t,o?"readwrite":"readonly"),u=s.store,l=h.length,c=new Array(l>1?l-1:0),f=1;f<l;f++)c[f-1]=h[f];return i&&(u=u.index(c.shift())),e.next=6,Promise.all([(a=u)[n].apply(a,c),o&&s.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return qo.set(t,s),s}}}Po=function(e){return ue(ue({},e),{},{get:function(t,n,r){return Uo(t,n)||e.get(t,n,r)},has:function(t,n){return!!Uo(t,n)||e.has(t,n)}})}(Po);var Ho=function(){function e(t){ua(this,e),this.container=t}return ca(e,[{key:"getPlatformInfoString",value:function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}return null})).filter((function(e){return e})).join(" ")}}]),e}();var Wo="@firebase/app",Ko="0.9.3",Go=new Eo("@firebase/app"),Yo="[DEFAULT]",Qo=(oe(Mo={},Wo,"fire-core"),oe(Mo,"@firebase/app-compat","fire-core-compat"),oe(Mo,"@firebase/analytics","fire-analytics"),oe(Mo,"@firebase/analytics-compat","fire-analytics-compat"),oe(Mo,"@firebase/app-check","fire-app-check"),oe(Mo,"@firebase/app-check-compat","fire-app-check-compat"),oe(Mo,"@firebase/auth","fire-auth"),oe(Mo,"@firebase/auth-compat","fire-auth-compat"),oe(Mo,"@firebase/database","fire-rtdb"),oe(Mo,"@firebase/database-compat","fire-rtdb-compat"),oe(Mo,"@firebase/functions","fire-fn"),oe(Mo,"@firebase/functions-compat","fire-fn-compat"),oe(Mo,"@firebase/installations","fire-iid"),oe(Mo,"@firebase/installations-compat","fire-iid-compat"),oe(Mo,"@firebase/messaging","fire-fcm"),oe(Mo,"@firebase/messaging-compat","fire-fcm-compat"),oe(Mo,"@firebase/performance","fire-perf"),oe(Mo,"@firebase/performance-compat","fire-perf-compat"),oe(Mo,"@firebase/remote-config","fire-rc"),oe(Mo,"@firebase/remote-config-compat","fire-rc-compat"),oe(Mo,"@firebase/storage","fire-gcs"),oe(Mo,"@firebase/storage-compat","fire-gcs-compat"),oe(Mo,"@firebase/firestore","fire-fst"),oe(Mo,"@firebase/firestore-compat","fire-fst-compat"),oe(Mo,"fire-js","fire-js"),oe(Mo,"firebase","fire-js-all"),Mo),$o=new Map,Xo=new Map;function Jo(e,t){try{e.container.addComponent(t)}catch(AF){Go.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),AF)}}function Zo(e){var t=e.name;if(Xo.has(t))return Go.debug("There were multiple attempts to register component ".concat(t,".")),!1;Xo.set(t,e);var n,r=ya($o.values());try{for(r.s();!(n=r.n()).done;){Jo(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function es(e,t){var n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}var ts=(oe(Vo={},"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),oe(Vo,"bad-app-name","Illegal App name: '{$appName}"),oe(Vo,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),oe(Vo,"app-deleted","Firebase App named '{$appName}' already deleted"),oe(Vo,"no-options","Need to provide options, when not being deployed to hosting via source."),oe(Vo,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),oe(Vo,"invalid-log-argument","First argument to `onLog` must be null or a function."),oe(Vo,"idb-open","Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}."),oe(Vo,"idb-get","Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}."),oe(Vo,"idb-set","Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}."),oe(Vo,"idb-delete","Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."),Vo),ns=new Ha("app","Firebase",ts),rs=function(){function e(t,n,r){var i=this;ua(this,e),this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new po("app",(function(){return i}),"PUBLIC"))}return ca(e,[{key:"automaticDataCollectionEnabled",get:function(){return this.checkDestroyed(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}},{key:"name",get:function(){return this.checkDestroyed(),this._name}},{key:"options",get:function(){return this.checkDestroyed(),this._options}},{key:"config",get:function(){return this.checkDestroyed(),this._config}},{key:"container",get:function(){return this._container}}
2,{key:"isDeleted",get:function(){return this._isDeleted},set:function(e){this._isDeleted=e}},{key:"checkDestroyed",value:function(){if(this.isDeleted)throw ns.create("app-deleted",{appName:this._name})}}]),e}(),is="9.17.1";function as(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){var r=t;t={name:r}}var i=Object.assign({name:Yo,automaticDataCollectionEnabled:!1},t),a=i.name;if("string"!==typeof a||!a)throw ns.create("bad-app-name",{appName:String(a)});if(n||(n=Ra()),!n)throw ns.create("no-options");var o=$o.get(a);if(o){if(eo(n,o.options)&&eo(i,o.config))return o;throw ns.create("duplicate-app",{appName:a})}var s,u=new bo(a),l=ya(Xo.values());try{for(l.s();!(s=l.n()).done;){var c=s.value;u.addComponent(c)}}catch(h){l.e(h)}finally{l.f()}var f=new rs(n,i,u);return $o.set(a,f),f}function os(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yo,t=$o.get(e);if(!t&&e===Yo)return as();if(!t)throw ns.create("no-app",{appName:e});return t}function ss(e,t,n){var r,i=null!==(r=Qo[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var s=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&s.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&s.push("and"),o&&s.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void Go.warn(s.join(" "))}Zo(new po("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}var us="firebase-heartbeat-store",ls=null;function cs(){return ls||(ls=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,a=n.blocking,o=n.terminated,s=indexedDB.open(e,t),u=Fo(s);return i&&s.addEventListener("upgradeneeded",(function(e){i(Fo(s.result),e.oldVersion,e.newVersion,Fo(s.transaction))})),r&&s.addEventListener("blocked",(function(){return r()})),u.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(){return a()}))})).catch((function(){})),u}("firebase-heartbeat-database",1,{upgrade:function(e,t){if(0===t)e.createObjectStore(us)}}).catch((function(e){throw ns.create("idb-open",{originalErrorMessage:e.message})}))),ls}function fs(e){return hs.apply(this,arguments)}function hs(){return hs=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,cs();case 3:return n=e.sent,e.abrupt("return",n.transaction(us).objectStore(us).get(vs(t)));case 7:e.prev=7,e.t0=e.catch(0),e.t0 instanceof Ua?Go.warn(e.t0.message):(i=ns.create("idb-get",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),Go.warn(i.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),hs.apply(this,arguments)}function ds(e,t){return ps.apply(this,arguments)}function ps(){return ps=a(r().mark((function e(t,n){var i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,cs();case 3:return i=e.sent,a=i.transaction(us,"readwrite"),o=a.objectStore(us),e.next=8,o.put(n,vs(t));case 8:return e.abrupt("return",a.done);case 11:e.prev=11,e.t0=e.catch(0),e.t0 instanceof Ua?Go.warn(e.t0.message):(s=ns.create("idb-set",{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message}),Go.warn(s.message));case 14:case"end":return e.stop()}}),e,null,[[0,11]])}))),ps.apply(this,arguments)}function vs(e){return"".concat(e.name,"!").concat(e.options.appId)}var ms=function(){function e(t){var n=this;ua(this,e),this.container=t,this._heartbeatsCache=null;var r=this.container.getProvider("app").getImmediate();this._storage=new ws(r),this._heartbeatsCachePromise=this._storage.read().then((function(e){return n._heartbeatsCache=e,e}))}return ca(e,[{key:"triggerHeartbeat",value:function(){var e=a(r().mark((function e(){var t,n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.container.getProvider("platform-logger").getImmediate(),n=t.getPlatformInfoString(),i=ys(),null!==this._heartbeatsCache){e.next=7;break}return e.next=6,this._heartbeatsCachePromise;case 6:this._heartbeatsCache=e.sent;case 7:if(this._heartbeatsCache.lastSentHeartbeatDate!==i&&!this._heartbeatsCache.heartbeats.some((function(e){return e.date===i}))){e.next=11;break}return e.abrupt("return");case 11:this._heartbeatsCache.heartbeats.push({date:i,agent:n});case 12:return this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((function(e){var t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),e.abrupt("return",this._storage.overwrite(this._heartbeatsCache));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeartbeatsHeader",value:function(){var e=a(r().mark((function e(){var t,n,i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==this._heartbeatsCache){e.next=3;break}return e.next=3,this._heartbeatsCachePromise;case 3:if(null!==this._heartbeatsCache&&0!==this._heartbeatsCache.heartbeats.length){e.next=5;break}return e.abrupt("return","");case 5:if(t=ys(),n=gs(this._heartbeatsCache.heartbeats),i=n.heartbeatsToSend,a=n.unsentEntries,o=Sa(JSON.stringify({version:2,heartbeats:i})),this._heartbeatsCache.lastSentHeartbeatDate=t,!(a.length>0)){e.next=15;break}return this._heartbeatsCache.heartbeats=a,e.next=13,this._storage.overwrite(this._heartbeatsCache);case 13:e.next=17;break;case 15:this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache);case 17:return e.abrupt("return",o);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function ys(){return(new Date).toISOString().substring(0,10)}function gs(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024,r=[],i=e.slice(),a=ya(e);try{var o=function(){var e=t.value,a=r.find((function(t){return t.agent===e.agent}));if(a){if(a.dates.push(e.date),xs(r)>n)return a.dates.pop(),"break"}else if(r.push({agent:e.agent,dates:[e.date]}),xs(r)>n)return r.pop(),"break";i=i.slice(1)};for(a.s();!(t=a.n()).done;){var s=o();if("break"===s)break}}catch(u){a.e(u)}finally{a.f()}return{heartbeatsToSend:r,unsentEntries:i}}var bs,ws=function(){function e(t){ua(this,e),this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}return ca(e,[{key:"runIndexedDBEnvironmentCheck",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(qa()){e.next=4;break}return e.abrupt("return",!1);case 4:return e.abrupt("return",new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(ch){t(ch)}})).then((function(){return!0})).catch((function(){return!1})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return",{heartbeats:[]});case 7:return e.next=9,fs(this.app);case 9:return t=e.sent,e.abrupt("return",t||{heartbeats:[]});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}
2,{key:"overwrite",value:function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return i=e.sent,e.abrupt("return",ds(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"add",value:function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._canUseIndexedDBPromise;case 2:if(e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.read();case 9:return i=e.sent,e.abrupt("return",ds(this.app,{lastSentHeartbeatDate:null!==(n=t.lastSentHeartbeatDate)&&void 0!==n?n:i.lastSentHeartbeatDate,heartbeats:[].concat(bn(i.heartbeats),bn(t.heartbeats))}));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function xs(e){return Sa(JSON.stringify({version:2,heartbeats:e})).length}bs="",Zo(new po("platform-logger",(function(e){return new Ho(e)}),"PRIVATE")),Zo(new po("heartbeat",(function(e){return new ms(e)}),"PRIVATE")),ss(Wo,Ko,bs),ss(Wo,Ko,"esm2017"),ss("fire-js","");function ks(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;var _s;Object.create;function Cs(){return oe({},"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.")}var Es=Cs,Ss=new Ha("auth","Firebase",Cs()),Ts=new Eo("@firebase/auth");function Is(e){if(Ts.logLevel<=go.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Ts.error.apply(Ts,["Auth (".concat(is,"): ").concat(e)].concat(n))}}function Ns(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Ps.apply(void 0,[e].concat(n))}function As(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ps.apply(void 0,[e].concat(n))}function js(e,t,n){var r=Object.assign(Object.assign({},Es()),oe({},t,n));return new Ha("auth","Firebase",r).create(t,{appName:e.name})}function Os(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&Ns(e,"argument-error"),js(e,"argument-error","Type of ".concat(t.constructor.name," does not match expected instance.")+"Did you pass a reference from a different Auth SDK?")}function Ps(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){var i,a=n[0],o=bn(n.slice(1));return o[0]&&(o[0].appName=e.name),(i=e._errorFactory).create.apply(i,[a].concat(bn(o)))}return Ss.create.apply(Ss,[e].concat(n))}function Rs(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw Ps.apply(void 0,[t].concat(r))}}function Ds(e){var t="INTERNAL ASSERTION FAILED: "+e;throw Is(t),new Error(t)}function Fs(e,t){e||Ds(t)}var Ls=new Map;function Ms(e){Fs(e instanceof Function,"Expected a class definition");var t=Ls.get(e);return t?(Fs(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Ls.set(e,t),t)}function Vs(e,t){var n=es(e,"auth");if(n.isInitialized()){var r=n.getImmediate();if(eo(n.getOptions(),null!==t&&void 0!==t?t:{}))return r;Ns(r,"already-initialized")}return n.initialize({options:t})}function Bs(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function zs(){return"http:"===qs()||"https:"===qs()}function qs(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}function Us(){return!("undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(zs()||function(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}()||"connection"in navigator))||navigator.onLine}var Hs=function(){function e(t,n){ua(this,e),this.shortDelay=t,this.longDelay=n,Fs(n>
2t,"Short delay should be less than long delay!"),this.isMobile=Ma()||Va()}return ca(e,[{key:"get",value:function(){return Us()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}]),e}();function Ws(e,t){Fs(e.emulator,"Emulator should always be set here");var n=e.emulator.url;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}var Ks=function(){function e(){ua(this,e)}return ca(e,null,[{key:"initialize",value:function(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}},{key:"fetch",value:function(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:void Ds("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"headers",value:function(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:void Ds("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}},{key:"response",value:function(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:void Ds("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}]),e}(),Gs=(oe(_s={},"CREDENTIAL_MISMATCH","custom-token-mismatch"),oe(_s,"MISSING_CUSTOM_TOKEN","internal-error"),oe(_s,"INVALID_IDENTIFIER","invalid-email"),oe(_s,"MISSING_CONTINUE_URI","internal-error"),oe(_s,"INVALID_PASSWORD","wrong-password"),oe(_s,"MISSING_PASSWORD","internal-error"),oe(_s,"EMAIL_EXISTS","email-already-in-use"),oe(_s,"PASSWORD_LOGIN_DISABLED","operation-not-allowed"),oe(_s,"INVALID_IDP_RESPONSE","invalid-credential"),oe(_s,"INVALID_PENDING_TOKEN","invalid-credential"),oe(_s,"FEDERATED_USER_ID_ALREADY_LINKED","credential-already-in-use"),oe(_s,"MISSING_REQ_TYPE","internal-error"),oe(_s,"EMAIL_NOT_FOUND","user-not-found"),oe(_s,"RESET_PASSWORD_EXCEED_LIMIT","too-many-requests"),oe(_s,"EXPIRED_OOB_CODE","expired-action-code"),oe(_s,"INVALID_OOB_CODE","invalid-action-code"),oe(_s,"MISSING_OOB_CODE","internal-error"),oe(_s,"CREDENTIAL_TOO_OLD_LOGIN_AGAIN","requires-recent-login"),oe(_s,"INVALID_ID_TOKEN","invalid-user-token"),oe(_s,"TOKEN_EXPIRED","user-token-expired"),oe(_s,"USER_NOT_FOUND","user-token-expired"),oe(_s,"TOO_MANY_ATTEMPTS_TRY_LATER","too-many-requests"),oe(_s,"INVALID_CODE","invalid-verification-code"),oe(_s,"INVALID_SESSION_INFO","invalid-verification-id"),oe(_s,"INVALID_TEMPORARY_PROOF","invalid-credential"),oe(_s,"MISSING_SESSION_INFO","missing-verification-id"),oe(_s,"SESSION_EXPIRED","code-expired"),oe(_s,"MISSING_ANDROID_PACKAGE_NAME","missing-android-pkg-name"),oe(_s,"UNAUTHORIZED_DOMAIN","unauthorized-continue-uri"),oe(_s,"INVALID_OAUTH_CLIENT_ID","invalid-oauth-client-id"),oe(_s,"ADMIN_ONLY_OPERATION","admin-restricted-operation"),oe(_s,"INVALID_MFA_PENDING_CREDENTIAL","invalid-multi-factor-session"),oe(_s,"MFA_ENROLLMENT_NOT_FOUND","multi-factor-info-not-found"),oe(_s,"MISSING_MFA_ENROLLMENT_ID","missing-multi-factor-info"),oe(_s,"MISSING_MFA_PENDING_CREDENTIAL","missing-multi-factor-session"),oe(_s,"SECOND_FACTOR_EXISTS","second-factor-already-in-use"),oe(_s,"SECOND_FACTOR_LIMIT_EXCEEDED","maximum-second-factor-count-exceeded"),oe(_s,"BLOCKING_FUNCTION_ERROR_RESPONSE","internal-error"),_s),Ys=new Hs(3e4,6e4);function Qs(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function $s(e,t,n,r){return Xs.apply(this,arguments)}function Xs(){return Xs=a(r().mark((function e(t,n,i,o){var s,u=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=u.length>4&&void 0!==u[4]?u[4]:{},e.abrupt("return",Js(t,s,a(r().mark((function e(){var a,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},s={},o&&("GET"===n?s=o:a={body:JSON.stringify(o)}),u=no(Object.assign({key:t.config.apiKey},s)).slice(1),e.next=6,t._getAdditionalHeaders();case 6:return(l=e.sent)["Content-Type"]="application/json",t.languageCode&&(l["X-Firebase-Locale"]=t.languageCode),e.abrupt("return",Ks.fetch()(nu(t,t.config.apiHost,i,u),Object.assign({method:n,headers:l,referrerPolicy:"no-referrer"},a)));case 10:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e)}))),Xs.apply(this,arguments)}
2function Js(e,t,n){return Zs.apply(this,arguments)}function Zs(){return(Zs=a(r().mark((function e(t,n,i){var a,o,s,l,c,f,h,d,p,v;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._canInitEmulator=!1,a=Object.assign(Object.assign({},Gs),n),e.prev=2,o=new ru(t),e.next=6,Promise.race([i(),o.promise]);case 6:return s=e.sent,o.clearNetworkTimeout(),e.next=10,s.json();case 10:if(!("needConfirmation"in(l=e.sent))){e.next=13;break}throw iu(t,"account-exists-with-different-credential",l);case 13:if(!s.ok||"errorMessage"in l){e.next=17;break}return e.abrupt("return",l);case 17:if(c=s.ok?l.errorMessage:l.error.message,f=c.split(" : "),h=u(f,2),d=h[0],p=h[1],"FEDERATED_USER_ID_ALREADY_LINKED"!==d){e.next=23;break}throw iu(t,"credential-already-in-use",l);case 23:if("EMAIL_EXISTS"!==d){e.next=27;break}throw iu(t,"email-already-in-use",l);case 27:if("USER_DISABLED"!==d){e.next=29;break}throw iu(t,"user-disabled",l);case 29:if(v=a[d]||d.toLowerCase().replace(/[_\s]+/g,"-"),!p){e.next=34;break}throw js(t,v,p);case 34:Ns(t,v);case 35:e.next=42;break;case 37:if(e.prev=37,e.t0=e.catch(2),!(e.t0 instanceof Ua)){e.next=41;break}throw e.t0;case 41:Ns(t,"network-request-failed");case 42:case"end":return e.stop()}}),e,null,[[2,37]])})))).apply(this,arguments)}function eu(e,t,n,r){return tu.apply(this,arguments)}function tu(){return tu=a(r().mark((function e(t,n,i,a){var o,s,u=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>4&&void 0!==u[4]?u[4]:{},e.next=3,$s(t,n,i,a,o);case 3:return"mfaPendingCredential"in(s=e.sent)&&Ns(t,"multi-factor-auth-required",{_serverResponse:s}),e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)}))),tu.apply(this,arguments)}function nu(e,t,n,r){var i="".concat(t).concat(n,"?").concat(r);return e.config.emulator?Ws(e.config,i):"".concat(e.config.apiScheme,"://").concat(i)}var ru=function(){function e(t){var n=this;ua(this,e),this.auth=t,this.timer=null,this.promise=new Promise((function(e,t){n.timer=setTimeout((function(){return t(As(n.auth,"network-request-failed"))}),Ys.get())}))}return ca(e,[{key:"clearNetworkTimeout",value:function(){clearTimeout(this.timer)}}]),e}();function iu(e,t,n){var r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);var i=As(e,t,r);return i.customData._tokenResponse=n,i}function au(e,t){return ou.apply(this,arguments)}function ou(){return(ou=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$s(t,"POST","/v1/accounts:delete",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function su(e,t){return uu.apply(this,arguments)}function uu(){return(uu=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$s(t,"POST","/v1/accounts:lookup",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lu(e){if(e)try{var t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(AF){}}function cu(){return cu=a(r().mark((function e(t){var n,i,a,o,s,u,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>1&&void 0!==l[1]&&l[1],i=ho(t),e.next=4,i.getIdToken(n);case 4:return a=e.sent,Rs((o=hu(a))&&o.exp&&o.auth_time&&o.iat,i.auth,"internal-error"),s="object"===typeof o.firebase?o.firebase:void 0,u=null===s||void 0===s?void 0:s.sign_in_provider,e.abrupt("return",{claims:o,token:a,authTime:lu(fu(o.auth_time)),issuedAtTime:lu(fu(o.iat)),expirationTime:lu(fu(o.exp)),signInProvider:u||null,signInSecondFactor:(null===s||void 0===s?void 0:s.sign_in_second_factor)||null});case 10:case"end":return e.stop()}}),e)}))),cu.apply(this,arguments)}function fu(e){return 1e3*Number(e)}function hu(e){var t=u(e.split("."),3),n=t[0],r=t[1],i=t[2];if(void 0===n||void 0===r||void 0===i)return Is("JWT malformed, contained fewer than 3 sections"),null;try{var a=Ta(r);return a?JSON.parse(a):(Is("Failed to decode base64 JWT payload"),null)}catch(AF){return Is("Caught error parsing JWT payload as JSON",null===AF||void 0===AF?void 0:AF.toString()),null}}function du(e,t){return pu.apply(this,arguments)}function pu(){return pu=a(r().mark((function e(t,n){var i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i.length>2&&void 0!==i[2]&&i[2])){e.next=3;break}return e.abrupt("return",n);case 3:return e.prev=3,e.next=6,n;case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof Ua&&vu(e.t0))){e.next=15;break}if(t.auth.currentUser!==t){e.next=15;break}return e.next=15,t.auth.signOut();case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,null,[[3,9]])}))),pu.apply(this,arguments)}function vu(e){var t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}var mu=function(){function e(t){ua(this,e),this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}return ca(e,[{key:"_start",value:function(){this.isRunning||(this.isRunning=!0,this.schedule())}},{key:"_stop",value:function(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}},{key:"getInterval",value:function(e){var t;if(e){var n=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),n}this.errorBackoff=3e4;var r=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,r)}},{key:"schedule",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isRunning){var n=this.getInterval(t);this.timerId=setTimeout(a(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.iteration();case 2:case"end":return t.stop()}}),t)}))),n)}}},{key:"iteration",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.user.getIdToken(!0);case 3:e.next=9;break;case 5:return e.prev=5,e.t0=e.catch(0),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("network-request-failed")&&this.schedule(!0),e.abrupt("return");case 9:this.schedule();case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(){return e.apply(this,arguments)}}()}]),e}(),yu=function(){function e(t,n){ua(this,e),this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}return ca(e,[{key:"_initializeTime",value:function(){this.lastSignInTime=lu(this.lastLoginAt),this.creationTime=lu(this.createdAt)}},{key:"_copy",value:function(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}},{key:"toJSON",value:function(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}]),e}();function gu(e){return bu.apply(this,arguments)}function bu(){return bu=a(r().mark((function e(t){var n,i,a,o,s,u,l,c,f,h,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.auth,e.next=3,t.getIdToken();case 3:return a=e.sent,e.next=6,du(t,su(i,{idToken:a}));case 6:Rs(null===(o=e.sent)||void 0===o?void 0:o.users.length,i,"internal-error"),s=o.users[0],t._notifyReloadListener(s),u=(null===(n=s.providerUserInfo)||void 0===n?void 0:n.length)?ku(s.providerUserInfo):[],l=xu(t.providerData,u),c=t.isAnonymous,f=!(t.email&&s.passwordHash)&&!(null===l||void 0===l?void 0:l.length),h=!!c&&f,d={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new yu(s.createdAt,s.lastLoginAt),isAnonymous:h},Object.assign(t,d);case 17:case"end":return e.stop()}}),e)}))),bu.apply(this,arguments)}function wu(){return(wu=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ho(t),e.next=3,gu(n);case 3:return e.next=5,n.auth._persistUserIfCurrent(n);case 5:n.auth._notifyListenersIfCurrent(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xu(e,t){var n=e.filter((function(e){return!t.some((function(t){return t.providerId===e.providerId}))}));return[].concat(bn(n),bn(t))}function ku(e){return e.map((function(e){var t=e.providerId,n=ks(e,["providerId"]);
2return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}function _u(e,t){return Cu.apply(this,arguments)}function Cu(){return(Cu=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Js(t,{},a(r().mark((function e(){var i,a,o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=no({grant_type:"refresh_token",refresh_token:n}).slice(1),a=t.config,o=a.tokenApiHost,s=a.apiKey,u=nu(t,o,"/v1/token","key=".concat(s)),e.next=5,t._getAdditionalHeaders();case 5:return(l=e.sent)["Content-Type"]="application/x-www-form-urlencoded",e.abrupt("return",Ks.fetch()(u,{method:"POST",headers:l,body:i}));case 8:case"end":return e.stop()}}),e)}))));case 2:return i=e.sent,e.abrupt("return",{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Eu=function(){function e(){ua(this,e),this.refreshToken=null,this.accessToken=null,this.expirationTime=null}return ca(e,[{key:"isExpired",get:function(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}},{key:"updateFromServerResponse",value:function(e){Rs(e.idToken,"internal-error"),Rs("undefined"!==typeof e.idToken,"internal-error"),Rs("undefined"!==typeof e.refreshToken,"internal-error");var t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):function(e){var t=hu(e);return Rs(t,"internal-error"),Rs("undefined"!==typeof t.exp,"internal-error"),Rs("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}},{key:"getToken",value:function(){var e=a(r().mark((function e(t){var n,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],Rs(!this.accessToken||this.refreshToken,t,"user-token-expired"),n||!this.accessToken||this.isExpired){e.next=4;break}return e.abrupt("return",this.accessToken);case 4:if(!this.refreshToken){e.next=8;break}return e.next=7,this.refresh(t,this.refreshToken);case 7:return e.abrupt("return",this.accessToken);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"clearRefreshToken",value:function(){this.refreshToken=null}},{key:"refresh",value:function(){var e=a(r().mark((function e(t,n){var i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_u(t,n);case 2:i=e.sent,a=i.accessToken,o=i.refreshToken,s=i.expiresIn,this.updateTokensAndExpiration(a,o,Number(s));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateTokensAndExpiration",value:function(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}},{key:"toJSON",value:function(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}},{key:"_assign",value:function(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}},{key:"_clone",value:function(){return Object.assign(new e,this.toJSON())}},{key:"_performRefresh",value:function(){return Ds("not implemented")}}],[{key:"fromJSON",value:function(t,n){var r=n.refreshToken,i=n.accessToken,a=n.expirationTime,o=new e;return r&&(Rs("string"===typeof r,"internal-error",{appName:t}),o.refreshToken=r),i&&(Rs("string"===typeof i,"internal-error",{appName:t}),o.accessToken=i),a&&(Rs("number"===typeof a,"internal-error",{appName:t}),o.expirationTime=a),o}}]),e}();function Su(e,t){Rs("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}var Tu=function(){function e(t){ua(this,e);var n=t.uid,r=t.auth,i=t.stsTokenManager,a=ks(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new mu(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?bn(a.providerData):[],this.metadata=new yu(a.createdAt||void 0,a.lastLoginAt||void 0)}return ca(e,[{key:"getIdToken",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,du(this,this.stsTokenManager.getToken(this.auth,t));case 2:if(Rs(n=e.sent,this.auth,"internal-error"),this.accessToken===n){e.next=9;break}return this.accessToken=n,e.next=8,this.auth._persistUserIfCurrent(this);case 8:this.auth._notifyListenersIfCurrent(this);case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getIdTokenResult",value:function(e){return function(e){return cu.apply(this,arguments)}(this,e)}},{key:"reload",value:function(){return function(e){return wu.apply(this,arguments)}(this)}},{key:"_assign",value:function(e){this!==e&&(Rs(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
2otoURL,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((function(e){return Object.assign({},e)})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}},{key:"_clone",value:function(t){return new e(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}))}},{key:"_onReload",value:function(e){Rs(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}},{key:"_notifyReloadListener",value:function(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}},{key:"_startProactiveRefresh",value:function(){this.proactiveRefresh._start()}},{key:"_stopProactiveRefresh",value:function(){this.proactiveRefresh._stop()}},{key:"_updateTokensIfNecessary",value:function(){var e=a(r().mark((function e(t){var n,i,a=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&void 0!==a[1]&&a[1],i=!1,t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),i=!0),!n){e.next=6;break}return e.next=6,gu(this);case 6:return e.next=8,this.auth._persistUserIfCurrent(this);case 8:i&&this.auth._notifyListenersIfCurrent(this);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIdToken();case 2:return t=e.sent,e.next=5,du(this,au(this.auth,{idToken:t}));case 5:return this.stsTokenManager.clearRefreshToken(),e.abrupt("return",this.auth.signOut());case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"toJSON",value:function(){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((function(e){return Object.assign({},e)})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}},{key:"refreshToken",get:function(){return this.stsTokenManager.refreshToken||""}}],[{key:"_fromJSON",value:function(t,n){var r,i,a,o,s,u,l,c,f=null!==(r=n.displayName)&&void 0!==r?r:void 0,h=null!==(i=n.email)&&void 0!==i?i:void 0,d=null!==(a=n.phoneNumber)&&void 0!==a?a:void 0,p=null!==(o=n.photoURL)&&void 0!==o?o:void 0,v=null!==(s=n.tenantId)&&void 0!==s?s:void 0,m=null!==(u=n._redirectEventId)&&void 0!==u?u:void 0,y=null!==(l=n.createdAt)&&void 0!==l?l:void 0,g=null!==(c=n.lastLoginAt)&&void 0!==c?c:void 0,b=n.uid,w=n.emailVerified,x=n.isAnonymous,k=n.providerData,_=n.stsTokenManager;Rs(b&&_,t,"internal-error");var C=Eu.fromJSON(this.name,_);Rs("string"===typeof b,t,"internal-error"),Su(f,t.name),Su(h,t.name),Rs("boolean"===typeof w,t,"internal-error"),Rs("boolean"===typeof x,t,"internal-error"),Su(d,t.name),Su(p,t.name),Su(v,t.name),Su(m,t.name),Su(y,t.name),Su(g,t.name);var E=new e({uid:b,auth:t,email:h,emailVerified:w,displayName:f,isAnonymous:x,photoURL:p,phoneNumber:d,tenantId:v,stsTokenManager:C,createdAt:y,lastLoginAt:g});return k&&Array.isArray(k)&&(E.providerData=k.map((function(e){return Object.assign({},e)}))),m&&(E._redirectEventId=m),E}},{key:"_fromIdTokenResponse",value:function(){var t=a(r().mark((function t(n,i){var a,o,s,u=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=u.length>2&&void 0!==u[2]&&u[2],(o=new Eu).updateFromServerResponse(i),s=new e({uid:i.localId,auth:n,stsTokenManager:o,isAnonymous:a}),t.next=6,gu(s);case 6:return t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]),e}(),Iu=function(){function e(){ua(this,e),this.type="NONE",this.storage={}}return ca(e,[{key:"_isAvailable",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.storage[t]=n;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.storage[t],e.abrupt("return",void 0===n?null:n);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete this.storage[t];case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),e}();Iu.type="NONE";var Nu=Iu;function Au(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}var ju=function(){function e(t,n,r){ua(this,e),this.persistence=t,this.auth=n,this.userKey=r;var i=this.auth,a=i.config,o=i.name;this.fullUserKey=Au(this.userKey,a.apiKey,o),this.fullPersistenceKey=Au("persistence",a.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}return ca(e,[{key:"setCurrentUser",value:function(e){return this.persistence._set(this.fullUserKey,e.toJSON())}},{key:"getCurrentUser",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.persistence._get(this.fullUserKey);case 2:return t=e.sent,e.abrupt("return",t?Tu._fromJSON(this.auth,t):null);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"removeCurrentUser",value:function(){return this.persistence._remove(this.fullUserKey)}},{key:"savePersistenceForRedirect",value:function(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}},{key:"setPersistence",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.persistence!==t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getCurrentUser();case 4:return n=e.sent,e.next=7,this.removeCurrentUser();case 7:if(this.persistence=t,!n){e.next=10;break}return e.abrupt("return",this.setCurrentUser(n));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}}],[{key:"create",value:function(){var t=a(r().mark((function t(n,i){var o,s,u,l,c,f,h,d,p,v,m,y=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=y.length>2&&void 0!==y[2]?y[2]:"authUser",i.length){t.next=3;break}return t.abrupt("return",new e(Ms(Nu),n,o));case 3:return t.next=5,Promise.all(i.map(function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._isAvailable();case 2:if(!e.sent){e.next=4;break}return e.abrupt("return",t);case 4:return e.abrupt("return",void 0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:s=t.sent.filter((function(e){return e})),u=s[0]||Ms(Nu),l=Au(o,n.config.apiKey,n.name),c=null,f=ya(i),t.prev=10,f.s();case 12:if((h=f.n()).done){t.next=29;break}return d=h.value,t.prev=14,t.next=17,d._get(l);case 17:if(!(p=t.sent)){t.next=23;break}return v=Tu._fromJSON(n,p),d!==u&&(c=v),u=d,t.abrupt("break",29);case 23:t.next=27;break;case 25:t.prev=25,t.t0=t.catch(14);case 27:t.next=12;break;case 29:t.next=34;break;case 31:t.prev=31,t.t1=t.catch(10),f.e(t.t1);case 34:return t.prev=34,f.f(),t.finish(34);case 37:if(m=s.filter((function(e){return e._shouldAllowMigration})),u._shouldAllowMigration&&m.length){t.next=40;break}return t.abrupt("return",new e(u,n,o));case 40:if(u=m[0],!c){t.next=44;break}return t.next=44,u._set(l,c.toJSON());case 44:return t.next=46,Promise.all(i.map(function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===u){e.next=8;break}return e.prev=1,e.next=4,t._remove(l);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}()));case 46:return t.abrupt("return",new e(u,n,o));case 47:case"end":return t.stop()}}),t,null,[[10,31,34,37],[14,25]])})));return function(e,n){return t.apply(this,arguments)}}()}]),e}();function Ou(e){var t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Fu(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Pu(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Mu(t))return"Blackberry";if(Vu(t))return"Webos";if(Ru(t))return"Safari";if((t.includes("chrome/")||Du(t))&&!t.includes("edge/"))return"Chrome";if(Lu(t))return"Android";var n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);return 2===(null===n||void 0===n?void 0:n.length)?n[1]:"Other"}function Pu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/firefox\//i.test(e)}function Ru(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La(),t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Du(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/crios\//i.test(e)}function Fu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/iemobile/i.test(e)}function Lu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/android/i.test(e)}function Mu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/blackberry/i.test(e)}function Vu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/webos/i.test(e)}function Bu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function zu(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return Bu(t)&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}function qu(){return function(){var e=La();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Uu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La();return Bu(e)||Lu(e)||Vu(e)||Mu(e)||/windows phone/i.test(e)||Fu(e)}function Hu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=Ou(La());break;case"Worker":t="".concat(Ou(La()),"-").concat(e);break;default:t=e}var r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(is,"/").concat(r)}var Wu=function(){function e(t){ua(this,e),this.auth=t,this.queue=[]}return ca(e,[{key:"pushCallback",value:function(e,t){var n=this,r=function(t){return new Promise((function(n,r){try{n(e(t))}catch(AF){r(AF)}}))};r.onAbort=t,this.queue.push(r);var i=this.queue.length-1;return function(){n.queue[i]=function(){return Promise.resolve()}}}},{key:"runMiddleware",value:function(){var e=a(r().mark((function e(t){var n,i,a,o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.auth.currentUser!==t){e.next=2;break}return e.abrupt("return");case 2:n=[],e.prev=3,i=ya(this.queue),e.prev=5,i.s();case 7:if((a=i.n()).done){e.next=14;break}return o=a.value,e.next=11,o(t);case 11:o.onAbort&&n.push(o.onAbort);case 12:e.next=7;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:e.next=30;break;case 24:e.prev=24,e.t1=e.catch(3),n.reverse(),s=ya(n);try{for(s.s();!(u=s.n()).done;){l=u.value;try{l()}catch(RD){}}}catch(r){s.e(r)}finally{s.f()}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===e.t1||void 0===e.t1?void 0:e.t1.message});case 30:case"end":return e.stop()}}),e,this,[[3,24],[5,16,19,22]])})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Ku=function(){function e(t,n,r){ua(this,e),this.app=t,this.heartbeatServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Yu(this),this.idTokenSubscription=new Yu(this),this.beforeStateQueue=new Wu(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Ss,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}return ca(e,[{key:"_initializeWithPersistence",value:function(e,t){var n=this;return t&&(this._popupRedirectResolver=Ms(t)),this._initializationPromise=this.queue(a(r().mark((function i(){var a,o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n._deleted){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,ju.create(n,e);case 4:if(n.persistenceManager=r.sent,!n._deleted){r.next=7;break}return r.abrupt("return");case 7:if(!(null===(a=n._popupRedirectResolver)||void 0===a?void 0:a._shouldInitProactively)){r.next=15;break}return r.prev=8,r.next=11,n._popupRedirectResolver._initialize(n);case 11:r.next=15;break;case 13:r.prev=13,r.t0=r.catch(8);case 15:return r.next=17,n.initializeCurrentUser(t);case 17:if(n.lastNotifiedUid=(null===(o=n.currentUser)||void 0===o?void 0:o.uid)||null,!n._deleted){r.next=20;break}return r.abrupt("return");case 20:n._isInitialized=!0;case 21:case"end":return r.stop()}}),i,null,[[8,13]])})))),this._initializationPromise}},{key:"_onStorageEvent",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._deleted){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.assertedPersistence.getCurrentUser();case 4:if(t=e.sent,this.currentUser||t){e.next=7;break}return e.abrupt("return");case 7:if(!this.currentUser||!t||this.currentUser.uid!==t.uid){e.next=12;break}return this._currentUser._assign(t),e.next=11,this.currentUser.getIdToken();case 11:return e.abrupt("return");case 12:return e.next=14,this._updateCurrentUser(t,!0);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeCurrentUser",value:function(){var e=a(r().mark((function e(t){var n,i,a,o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.assertedPersistence.getCurrentUser();case 2:if(i=e.sent,a=i,o=!1,!t||!this.config.authDomain){e.next=14;break}return e.next=8,this.getOrInitRedirectPersistenceManager();case 8:return s=null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId,u=null===a||void 0===a?void 0:a._redirectEventId,e.next=12,this.tryRedirectSignIn(t);case 12:l=e.sent,s&&s!==u||!(null===l||void 0===l?void 0:l.user)||(a=l.user,o=!0);case 14:if(a){e.next=16;break}return e.abrupt("return",this.directlySetCurrentUser(null));
2case 16:if(a._redirectEventId){e.next=32;break}if(!o){e.next=27;break}return e.prev=18,e.next=21,this.beforeStateQueue.runMiddleware(a);case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(18),a=i,this._popupRedirectResolver._overrideRedirectResult(this,(function(){return Promise.reject(e.t0)}));case 27:if(!a){e.next=31;break}return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(a));case 31:return e.abrupt("return",this.directlySetCurrentUser(null));case 32:return Rs(this._popupRedirectResolver,this,"argument-error"),e.next=35,this.getOrInitRedirectPersistenceManager();case 35:if(!this.redirectUser||this.redirectUser._redirectEventId!==a._redirectEventId){e.next=37;break}return e.abrupt("return",this.directlySetCurrentUser(a));case 37:return e.abrupt("return",this.reloadAndSetCurrentUserOrClear(a));case 38:case"end":return e.stop()}}),e,this,[[18,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"tryRedirectSignIn",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,e.next=4,this._popupRedirectResolver._completeRedirectFn(this,t,!0);case 4:n=e.sent,e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,this._setRedirectUser(null);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"reloadAndSetCurrentUserOrClear",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,gu(t);case 3:e.next=9;break;case 5:if(e.prev=5,e.t0=e.catch(0),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("network-request-failed")){e.next=9;break}return e.abrupt("return",this.directlySetCurrentUser(null));case 9:return e.abrupt("return",this.directlySetCurrentUser(t));case 10:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()},{key:"useDeviceLanguage",value:function(){this.languageCode=function(){if("undefined"===typeof navigator)return null;var e=navigator;return e.languages&&e.languages[0]||e.language||null}()}},{key:"_delete",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._deleted=!0;case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateCurrentUser",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=t?ho(t):null)&&Rs(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),e.abrupt("return",this._updateCurrentUser(n&&n._clone(this)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_updateCurrentUser",value:function(){var e=a(r().mark((function e(t){var n,i=this,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>1&&void 0!==o[1]&&o[1],!this._deleted){e.next=3;break}return e.abrupt("return");case 3:if(t&&Rs(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n){e.next=7;break}return e.next=7,this.beforeStateQueue.runMiddleware(t);case 7:return e.abrupt("return",this.queue(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.directlySetCurrentUser(t);case 2:i.notifyAuthListeners();case 3:case"end":return e.stop()}}),e)})))));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signOut",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.beforeStateQueue.runMiddleware(null);case 2:if(!this.redirectPersistenceManager&&!this._popupRedirectResolver){e.next=5;break}return e.next=5,this._setRedirectUser(null);case 5:return e.abrupt("return",this._updateCurrentUser(null,!0));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setPersistence",value:function(e){var t=this;return this.queue(a(r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.assertedPersistence.setPersistence(Ms(e));case 2:case"end":return n.stop()}}),n)}))))}},{key:"_getPersistence",value:function(){return this.assertedPersistence.persistence.type}},{key:"_updateErrorMap",value:function(e){this._errorFactory=new Ha("auth","Firebase",e())}},{key:"onAuthStateChanged",value:function(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}},{key:"beforeAuthStateChanged",value:function(e,t){return this.beforeStateQueue.pushCallback(e,t)}},{key:"onIdTokenChanged",value:function(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}},{key:"toJSON",value:function(){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()}}},{key:"_setRedirectUser",value:function(){var e=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getOrInitRedirectPersistenceManager(n);case 2:return i=e.sent,e.abrupt("return",null===t?i.removeCurrentUser():i.setCurrentUser(t));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getOrInitRedirectPersistenceManager",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.redirectPersistenceManager){e.next=9;break}return Rs(n=t&&Ms(t)||this._popupRedirectResolver,this,"argument-error"),e.next=5,ju.create(this,[Ms(n._redirectPersistence)],"redirectUser");case 5:return this.redirectPersistenceManager=e.sent,e.next=8,this.redirectPersistenceManager.getCurrentUser();case 8:this.redirectUser=e.sent;case 9:return e.abrupt("return",this.redirectPersistenceManager);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_redirectUserForId",value:function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isInitialized){e.next=3;break}return e.next=3,this.queue(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))));case 3:if((null===(n=this._currentUser)||void 0===n?void 0:n._redirectEventId)!==t){e.next=5;break}return e.abrupt("return",this._currentUser);case 5:if((null===(i=this.redirectUser)||void 0===i?void 0:i._redirectEventId)!==t){e.next=7;break}return e.abrupt("return",this.redirectUser);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_persistUserIfCurrent",value:function(){var e=a(r().mark((function e(t){var n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==this.currentUser){e.next=2;break}return e.abrupt("return",this.queue(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.directlySetCurrentUser(t));case 1:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_notifyListenersIfCurrent",value:function(e){e===this.currentUser&&this.notifyAuthListeners()}},{key:"_key",value:function(){return"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(this.name)}},{key:"_startProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}},{key:"_stopProactiveRefresh",value:function(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}},{key:"_currentUser",get:function(){return this.currentUser}},{key:"notifyAuthListeners",value:function(){var e,t;if(this._isInitialized){this.idTokenSubscription.next(this.currentUser);var 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))}}},{key:"registerStateListener",value:function(e,t,n,r){var i=this;if(this._deleted)return function(){};var a="function"===typeof t?t:t.next.bind(t),o=this._isInitialized?Promise.resolve():this._initializationPromise;return Rs(o,this,"internal-error"),o.then((function(){return a(i.currentUser)})),"function"===typeof t?e.addObserver(t,n,r):e.addObserver(t)}},{key:"directlySetCurrentUser",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,!t){e.next=8;break}return e.next=6,this.assertedPersistence.setCurrentUser(t);case 6:e.next=10;break;case 8:return e.next=10,this.assertedPersistence.removeCurrentUser();case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queue",value:function(e){return this.operations=this.operations.then(e,e),this.operations}},{key:"assertedPersistence",get:function(){return Rs(this.persistenceManager,this,"internal-error"),this.persistenceManager}},{key:"_logFramework",value:function(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Hu(this.config.clientPlatform,this._getFrameworks()))}},{key:"_getFrameworks",value:function(){return this.frameworks}},{key:"_getAdditionalHeaders",value:function(){var e=a(r().mark((function e(){var t,n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=oe({},"X-Client-Version",this.clientVersion),this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId),e.next=4,null===(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===t?void 0:t.getHeartbeatsHeader();case 4:return(i=e.sent)&&(n["X-Firebase-Client"]=i),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();function Gu(e){return ho(e)}var Yu=function(){function e(t){var n=this;ua(this,e),this.auth=t,this.observer=null,this.addObserver=function(e,t){var n=new oo(e,t);return n.subscribe.bind(n)}((function(e){return n.observer=e}))}return ca(e,[{key:"next",get:function(){return Rs(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}]),e}();function Qu(e,t,n){var r=Gu(e);Rs(r._canInitEmulator,r,"emulator-config-failed"),Rs(/^https?:\/\//.test(t),r,"invali
2d-emulator-scheme");var i=!!(null===n||void 0===n?void 0:n.disableWarnings),a=$u(t),o=function(e){var t=$u(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};var r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){var a=i[1];return{host:a,port:Xu(r.substr(a.length+1))}}var o=u(r.split(":"),2);return{host:o[0],port:Xu(o[1])}}(t),s=o.host,l=o.port,c=null===l?"":":".concat(l);r.config.emulator={url:"".concat(a,"//").concat(s).concat(c,"/")},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:l,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){var e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function $u(e){var t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Xu(e){if(!e)return null;var t=Number(e);return isNaN(t)?null:t}var Ju=function(){function e(t,n){ua(this,e),this.providerId=t,this.signInMethod=n}return ca(e,[{key:"toJSON",value:function(){return Ds("not implemented")}},{key:"_getIdTokenResponse",value:function(e){return Ds("not implemented")}},{key:"_linkToIdToken",value:function(e,t){return Ds("not implemented")}},{key:"_getReauthenticationResolver",value:function(e){return Ds("not implemented")}}]),e}();function Zu(e,t){return el.apply(this,arguments)}function el(){return(el=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$s(t,"POST","/v1/accounts:update",n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tl(e,t){return nl.apply(this,arguments)}function nl(){return(nl=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu(t,"POST","/v1/accounts:signInWithPassword",Qs(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rl(e,t){return il.apply(this,arguments)}function il(){return(il=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu(t,"POST","/v1/accounts:signInWithEmailLink",Qs(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function al(e,t){return ol.apply(this,arguments)}function ol(){return(ol=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu(t,"POST","/v1/accounts:signInWithEmailLink",Qs(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sl=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return ua(this,n),(a=t.call(this,"password",i))._email=e,a._password=r,a._tenantId=o,a}return ca(n,[{key:"toJSON",value:function(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}},{key:"_getIdTokenResponse",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",tl(t,{returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",rl(t,{email:this._email,oobCode:this._password}));case 5:Ns(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_linkToIdToken",value:function(){var e=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.signInMethod,e.next="password"===e.t0?3:"emailLink"===e.t0?4:5;break;case 3:return e.abrupt("return",Zu(t,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password}));case 4:return e.abrupt("return",al(t,{idToken:n,email:this._email,oobCode:this._password}));case 5:Ns(t,"internal-error");case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getReauthenticationResolver",value:function(e){return this._getIdTokenResponse(e)}}],[{key:"_fromEmailAndPassword",value:function(e,t){return new n(e,t,"password")}},{key:"_fromEmailAndCode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new n(e,t,"emailLink",r)}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e;if((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===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}}]),n}(Ju);
2function ul(e,t){return ll.apply(this,arguments)}function ll(){return(ll=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu(t,"POST","/v1/accounts:signInWithIdp",Qs(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cl=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.apply(this,arguments)).pendingToken=null,e}return ca(n,[{key:"toJSON",value:function(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}},{key:"_getIdTokenResponse",value:function(e){return ul(e,this.buildRequest())}},{key:"_linkToIdToken",value:function(e,t){var n=this.buildRequest();return n.idToken=t,ul(e,n)}},{key:"_getReauthenticationResolver",value:function(e){var t=this.buildRequest();return t.autoCreate=!1,ul(e,t)}},{key:"buildRequest",value:function(){var e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{var 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=no(t)}return e}}],[{key:"_fromParams",value:function(e){var t=new n(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):Ns("argument-error"),t}},{key:"fromJSON",value:function(e){var t="string"===typeof e?JSON.parse(e):e,r=t.providerId,i=t.signInMethod,a=ks(t,["providerId","signInMethod"]);if(!r||!i)return null;var o=new n(r,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}}]),n}(Ju);function fl(e,t){return hl.apply(this,arguments)}function hl(){return(hl=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$s(t,"POST","/v1/accounts:sendVerificationCode",Qs(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dl(){return(dl=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eu(t,"POST","/v1/accounts:signInWithPhoneNumber",Qs(t,n)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pl(){return(pl=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eu(t,"POST","/v1/accounts:signInWithPhoneNumber",Qs(t,n));case 2:if(!(i=e.sent).temporaryProof){e.next=5;break}throw iu(t,"account-exists-with-different-credential",i);case 5:return e.abrupt("return",i);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var vl=oe({},"USER_NOT_FOUND","user-not-found");function ml(){return(ml=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object.assign(Object.assign({},n),{operation:"REAUTH"}),e.abrupt("return",eu(t,"POST","/v1/accounts:signInWithPhoneNumber",Qs(t,i),vl));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var yl=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this,"phone","phone")).params=e,r}return ca(n,[{key:"_getIdTokenResponse",value:function(e){return function(e,t){return dl.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_linkToIdToken",value:function(e,t){return function(e,t){return pl.apply(this,arguments)}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}},{key:"_getReauthenticationResolver",value:function(e){return function(e,t){return ml.apply(this,arguments)}(e,this._makeVerificationRequest())}},{key:"_makeVerificationRequest",value:function(){var e=this.params,t=e.temporaryProof,n=e.phoneNumber,r=e.verificationId,i=e.verificationCode;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:i}}},{key:"toJSON",value:function(){var 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}}],[{key:"_fromVerification",value:function(e,t){return new n({verificationId:e,verificationCode:t})}}
2,{key:"_fromTokenResponse",value:function(e,t){return new n({phoneNumber:e,temporaryProof:t})}},{key:"fromJSON",value:function(e){"string"===typeof e&&(e=JSON.parse(e));var t=e,r=t.verificationId,i=t.verificationCode,a=t.phoneNumber,o=t.temporaryProof;return i||r||a||o?new n({verificationId:r,verificationCode:i,phoneNumber:a,temporaryProof:o}):null}}]),n}(Ju);var gl=function(){function e(t){var n,r,i,a,o,s;ua(this,e);var u=ro(io(t)),l=null!==(n=u.apiKey)&&void 0!==n?n:null,c=null!==(r=u.oobCode)&&void 0!==r?r:null,f=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);Rs(l&&c&&f,"argument-error"),this.apiKey=l,this.operation=f,this.code=c,this.continueUrl=null!==(a=u.continueUrl)&&void 0!==a?a:null,this.languageCode=null!==(o=u.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(s=u.tenantId)&&void 0!==s?s:null}return ca(e,null,[{key:"parseLink",value:function(t){var n=function(e){var t=ro(io(e)).link,n=t?ro(io(t)).deep_link_id:null,r=ro(io(e)).deep_link_id;return(r?ro(io(r)).link:null)||r||n||t||e}(t);try{return new e(n)}catch(WA){return null}}}]),e}();var bl=function(){function e(){ua(this,e),this.providerId=e.PROVIDER_ID}return ca(e,null,[{key:"credential",value:function(e,t){return sl._fromEmailAndPassword(e,t)}},{key:"credentialWithLink",value:function(e,t){var n=gl.parseLink(t);return Rs(n,"argument-error"),sl._fromEmailAndCode(e,n.code,n.tenantId)}}]),e}();bl.PROVIDER_ID="password",bl.EMAIL_PASSWORD_SIGN_IN_METHOD="password",bl.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var wl=function(){function e(t){ua(this,e),this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}return ca(e,[{key:"setDefaultLanguage",value:function(e){this.defaultLanguageCode=e}},{key:"setCustomParameters",value:function(e){return this.customParameters=e,this}},{key:"getCustomParameters",value:function(){return this.customParameters}}]),e}(),xl=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.apply(this,arguments)).scopes=[],e}return ca(n,[{key:"addScope",value:function(e){return this.scopes.includes(e)||this.scopes.push(e),this}},{key:"getScopes",value:function(){return bn(this.scopes)}}]),n}(wl),kl=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.call(this,"facebook.com")}return ca(n,null,[{key:"credential",value:function(e){return cl._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(WA){return null}}}]),n}(xl);kl.FACEBOOK_SIGN_IN_METHOD="facebook.com",kl.PROVIDER_ID="facebook.com";var _l=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.call(this,"google.com")).addScope("profile"),e}return ca(n,null,[{key:"credential",value:function(e,t){return cl._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthIdToken,i=t.oauthAccessToken;if(!r&&!i)return null;try{return n.credential(r,i)}catch(WA){return null}}}]),n}(xl);_l.GOOGLE_SIGN_IN_METHOD="google.com",_l.PROVIDER_ID="google.com";var Cl=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.call(this,"github.com")}return ca(n,null,[{key:"credential",value:function(e){return cl._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GITHUB_SIGN_IN_METHOD,accessToken:e})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(WA){return null}}}]),n}(xl);Cl.GITHUB_SIGN_IN_METHOD="github.com",Cl.PROVIDER_ID="github.com";var El=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.call(this,"twitter.com")}return ca(n,null,[{key:"credential",value:function(e,t){return cl._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}},{key:"credentialFromResult",value:function(e){return n.credentialFromTaggedObject(e)}},{key:"credentialFromError",value:function(e){return n.credentialFromTaggedObject(e.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var r=t.oauthAccessToken,i=t.oauthTokenSecret;if(!r||!i)return null;try{return n.credential(r,i)}catch(WA){return null}}}]),n}(xl);El.TWITTER_SIGN_IN_METHOD="twitter.com",El.PROVIDER_ID="twitter.com";var Sl=function(){function e(t){ua(this,e),this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._token
2Response,this.operationType=t.operationType}return ca(e,null,[{key:"_fromIdTokenResponse",value:function(){var t=a(r().mark((function t(n,i,a){var o,s,u,l,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>3&&void 0!==c[3]&&c[3],t.next=3,Tu._fromIdTokenResponse(n,a,o);case 3:return s=t.sent,u=Tl(a),l=new e({user:s,providerId:u,_tokenResponse:a,operationType:i}),t.abrupt("return",l);case 7:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"_forOperation",value:function(){var t=a(r().mark((function t(n,i,a){var o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._updateTokensIfNecessary(a,!0);case 2:return o=Tl(a),t.abrupt("return",new e({user:n,providerId:o,_tokenResponse:a,operationType:i}));case 4:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}()}]),e}();function Tl(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}var Il=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a){var o,s;return ua(this,n),(o=t.call(this,r.code,r.message)).operationType=i,o.user=a,Object.setPrototypeOf(fa(o),n.prototype),o.customData={appName:e.name,tenantId:null!==(s=e.tenantId)&&void 0!==s?s:void 0,_serverResponse:r.customData._serverResponse,operationType:i},o}return ca(n,null,[{key:"_fromErrorAndOperation",value:function(e,t,r,i){return new n(e,t,r,i)}}]),n}(Ua);function Nl(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((function(n){if(n.code==="auth/".concat("multi-factor-auth-required"))throw Il._fromErrorAndOperation(e,n,t,r);throw n}))}function Al(e,t){return jl.apply(this,arguments)}function jl(){return jl=a(r().mark((function e(t,n){var i,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.length>2&&void 0!==o[2]&&o[2],e.t0=du,e.t1=t,e.t2=n,e.t3=t.auth,e.next=7,t.getIdToken();case 7:return e.t4=e.sent,e.t5=e.t2._linkToIdToken.call(e.t2,e.t3,e.t4),e.t6=i,e.next=12,(0,e.t0)(e.t1,e.t5,e.t6);case 12:return a=e.sent,e.abrupt("return",Sl._forOperation(t,"link",a));case 14:case"end":return e.stop()}}),e)}))),jl.apply(this,arguments)}function Ol(e,t){return Pl.apply(this,arguments)}function Pl(){return Pl=a(r().mark((function e(t,n){var i,a,o,s,u,l,c=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=c.length>2&&void 0!==c[2]&&c[2],a=t.auth,o="reauthenticate",e.prev=3,e.next=6,du(t,Nl(a,o,n,t),i);case 6:return Rs((s=e.sent).idToken,a,"internal-error"),Rs(u=hu(s.idToken),a,"internal-error"),l=u.sub,Rs(t.uid===l,a,"user-mismatch"),e.abrupt("return",Sl._forOperation(t,o,s));case 15:throw e.prev=15,e.t0=e.catch(3),(null===e.t0||void 0===e.t0?void 0:e.t0.code)==="auth/".concat("user-not-found")&&Ns(a,"user-mismatch"),e.t0;case 19:case"end":return e.stop()}}),e,null,[[3,15]])}))),Pl.apply(this,arguments)}function Rl(e,t){return Dl.apply(this,arguments)}function Dl(){return Dl=a(r().mark((function e(t,n){var i,a,o,s,u=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]&&u[2],a="signIn",e.next=4,Nl(t,a,n);case 4:return o=e.sent,e.next=7,Sl._fromIdTokenResponse(t,a,o);case 7:if(s=e.sent,i){e.next=11;break}return e.next=11,t._updateCurrentUser(s.user);case 11:return e.abrupt("return",s);case 12:case"end":return e.stop()}}),e)}))),Dl.apply(this,arguments)}function Fl(e,t){return Ll.apply(this,arguments)}function Ll(){return(Ll=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Rl(Gu(t),n));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ml(e,t,n,r){return ho(e).onIdTokenChanged(t,n,r)}function Vl(e,t,n){return ho(e).beforeAuthStateChanged(t,n)}function Bl(e,t){return $s(e,"POST","/v2/accounts/mfaEnrollment:start",Qs(e,t))}new WeakMap;var zl="__sak",ql=function(){function e(t,n){ua(this,e),this.storageRetriever=t,this.type=n}return ca(e,[{key:"_isAvailable",value:function(){try{return this.storage?(this.storage.setItem(zl,"1"),this.storage.removeItem(zl),Promise.resolve(!0)):Promise.resolve(!1)}catch(WA){return Promise.resolve(!1)}}},{key:"_set",value:function(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}},{key:"_get",value:function(e){var t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}},{key:"_remove",value:function(e){return this.storage.removeItem(e),Promise.resolve()}},{key:"storage",get:function(){return this.storageRetriever()}}]),e}();var Ul=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.call(this,(function(){return window.localStorage}),"LOCAL")).boundEventHandler=function(t,n){return e.onStorageEvent(t,n)},e.listeners={},e.localCache={},e.pollTimer=null,e.safariLocalStorageNotSynced=function(){var e=La();return Ru(e)||Bu(e)}()&&function(){try{return!(!window||window===window.top)}catch(AF){return!1}}(),e.fallbackToPolling=Uu(),e._shouldAllowMigration=!0,e}return ca(n,[{key:"forAllChangedKeys",value:function(e){for(var t=0,n=Object.keys(this.listeners);t<n.length;t++){var r=n[t],i=this.storage.getItem(r),a=this.localCache[r];i!==a&&e(r,a,i)}}},{key:"onStorageEvent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.key){var r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){var i=this.storage.getItem(r);if(e.newValue!==i)null!==e.newValue?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}var a=function(){var e=t.storage.getItem(r);(n||t.localCache[r]!==e)&&t.notifyListeners(r,e)},o=this.storage.getItem(r);qu()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(a,10):a()}else this.forAllChangedKeys((function(e,n,r){t.notifyListeners(e,r)}))}},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t?JSON.parse(t):t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval((function(){e.forAllChangedKeys((function(t,n,r){e.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)}))}),1e3)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"attachListener",value:function(){window.addEventListener("storage",this.boundEventHandler)}},{key:"detachListener",value:function(){window.removeEventListener("storage",this.boundEventHandler)}},{key:"_addListener",value:function(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)}},{key:"_removeListener",value:function(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())}},{key:"_set",value:function(){var e=a(r().mark((function e(t,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ma(ra(n.prototype),"_set",this).call(this,t,i);case 2:this.localCache[t]=JSON.stringify(i);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=a(r().mark((function e(t){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ma(ra(n.prototype),"_get",this).call(this,t);case 2:return i=e.sent,this.localCache[t]=JSON.stringify(i),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ma(ra(n.prototype),"_remove",this).call(this,t);case 2:delete this.localCache[t];case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(ql);Ul.type="LOCAL";var Hl=Ul,Wl=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.call(this,(function(){return window.sessionStorage}),"SESSION")}return ca(n,[{key:"_addListener",value:function(e,t){}},{key:"_removeListener",value:function(e,t){}}]),n}(ql);Wl.type="SESSION";var Kl=Wl;function Gl(e){return Promise.all(e.map(function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t;case 3:return n=e.sent,e.abrupt("return",{fulfilled:!0,value:n});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{fulfilled:!1,reason:e.t0});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()))}var Yl=function(){function e(t){ua(this,e),this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}return ca(e,[{key:"isListeningto",value:function(e){return this.eventTarget===e}},{key:"handleEvent",value:function(){var e=a(r().mark((function e(t){var n,i,o,s,u,l,c,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(n=t).data,o=i.eventId,s=i.eventType,u=i.data,null===(l=this.handlersMap[s])||void 0===l?void 0:l.size){e.next=5;break}return e.abrupt("return");case 5:return n.ports[0].postMessage({status:"ack",eventId:o,eventType:s}),c=Array.from(l).map(function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(n.origin,u));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=9,Gl(c);case 9:f=e.sent,n.ports[0].postMessage({status:"done",eventId:o,eventType:s,response:f});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_subscribe",value:function(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)}},{key:"_unsubscribe",value:function(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)}}],[{key:"_getInstance",value:function(t){var n=this.receivers.find((function(e){return e.isListeningto(t)}));if(n)return n;var r=new e(t);return this.receivers.push(r),r}}]),e}();function Ql(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="",r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}Yl.receivers=[];var $l=function(){function e(t){ua(this,e),this.target=t,this.handlers=new Set}return ca(e,[{key:"removeMessageHandler",value:function(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}},{key:"_send",value:function(){var e=a(r().mark((function e(t,n){var i,a,o,s,u=this,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>2&&void 0!==l[2]?l[2]:50,a="undefined"!==typeof MessageChannel?new MessageChannel:null){e.next=4;break}throw new Error("connection_unavailable");case 4:return e.abrupt("return",new Promise((function(e,r){var l=Ql("",20);a.port1.start();var c=setTimeout((function(){r(new Error("unsupported_event"))}),i);s={messageChannel:a,onMessage:function(t){var n=t;if(n.data.eventId===l)switch(n.data.status){case"ack":clearTimeout(c),o=setTimeout((function(){r(new Error("timeout"))}),3e3);break;case"done":clearTimeout(o),e(n.data.response);break;default:clearTimeout(c),clearTimeout(o),r(new Error("invalid_response"))}}},u.handlers.add(s),a.port1.addEventListener("message",s.onMessage),u.target.postMessage({eventType:t,eventId:l,data:n},[a.port2])})).finally((function(){s&&u.removeMessageHandler(s)})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();function Xl(){return window}
2function Jl(){return"undefined"!==typeof Xl().WorkerGlobalScope&&"function"===typeof Xl().importScripts}function Zl(){return ec.apply(this,arguments)}function ec(){return(ec=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===navigator||void 0===navigator?void 0:navigator.serviceWorker){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,navigator.serviceWorker.ready;case 5:return t=e.sent,e.abrupt("return",t.active);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function tc(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}var nc="firebaseLocalStorageDb",rc="firebaseLocalStorage",ic="fbase_key",ac=function(){function e(t){ua(this,e),this.request=t}return ca(e,[{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.request.addEventListener("success",(function(){t(e.request.result)})),e.request.addEventListener("error",(function(){n(e.request.error)}))}))}}]),e}();function oc(e,t){return e.transaction([rc],t?"readwrite":"readonly").objectStore(rc)}function sc(){var e=indexedDB.deleteDatabase(nc);return new ac(e).toPromise()}function uc(){var e=indexedDB.open(nc,1);return new Promise((function(t,n){e.addEventListener("error",(function(){n(e.error)})),e.addEventListener("upgradeneeded",(function(){var t=e.result;try{t.createObjectStore(rc,{keyPath:ic})}catch(AF){n(AF)}})),e.addEventListener("success",a(r().mark((function n(){var i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((i=e.result).objectStoreNames.contains(rc)){n.next=12;break}return i.close(),n.next=5,sc();case 5:return n.t0=t,n.next=8,uc();case 8:n.t1=n.sent,(0,n.t0)(n.t1),n.next=13;break;case 12:t(i);case 13:case"end":return n.stop()}}),n)}))))}))}function lc(e,t,n){return cc.apply(this,arguments)}function cc(){return cc=a(r().mark((function e(t,n,i){var a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=oc(t,!0).put((oe(a={},ic,n),oe(a,"value",i),a)),e.abrupt("return",new ac(o).toPromise());case 2:case"end":return e.stop()}}),e)}))),cc.apply(this,arguments)}function fc(e,t){return hc.apply(this,arguments)}function hc(){return hc=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=oc(t,!1).get(n),e.next=3,new ac(i).toPromise();case 3:return a=e.sent,e.abrupt("return",void 0===a?null:a.value);case 5:case"end":return e.stop()}}),e)}))),hc.apply(this,arguments)}function dc(e,t){var n=oc(e,!0).delete(t);return new ac(n).toPromise()}var pc=function(){function e(){ua(this,e),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((function(){}),(function(){}))}return ca(e,[{key:"_openDb",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.db){e.next=2;break}return e.abrupt("return",this.db);case 2:return e.next=4,uc();case 4:return this.db=e.sent,e.abrupt("return",this.db);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_withRetries",value:function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:return e.prev=2,e.next=5,this._openDb();case 5:return i=e.sent,e.next=8,t(i);case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(2),!(n++>3)){e.next=15;break}throw e.t0;case 15:this.db&&(this.db.close(),this.db=void 0);case 16:e.next=1;break;case 18:case"end":return e.stop()}}),e,this,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"initializeServiceWorkerMessaging",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;
2)switch(e.prev=e.next){case 0:return e.abrupt("return",Jl()?this.initializeReceiver():this.initializeSender());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeReceiver",value:function(){var e=a(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.receiver=Yl._getInstance(Jl()?self:null),this.receiver._subscribe("keyChanged",function(){var e=a(r().mark((function e(n,i){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._poll();case 2:return a=e.sent,e.abrupt("return",{keyProcessed:a.includes(i.key)});case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),this.receiver._subscribe("ping",function(){var e=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",["keyChanged"]);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initializeSender",value:function(){var e=a(r().mark((function e(){var t,n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Zl();case 2:if(this.activeServiceWorker=e.sent,this.activeServiceWorker){e.next=5;break}return e.abrupt("return");case 5:return this.sender=new $l(this.activeServiceWorker),e.next=8,this.sender._send("ping",{},800);case 8:if(i=e.sent){e.next=11;break}return e.abrupt("return");case 11:(null===(t=i[0])||void 0===t?void 0:t.fulfilled)&&(null===(n=i[0])||void 0===n?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0);case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyServiceWorker",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.sender&&this.activeServiceWorker&&tc()===this.activeServiceWorker){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50);case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:case"end":return e.stop()}}),e,this,[[2,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_isAvailable",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,indexedDB){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,uc();case 5:return t=e.sent,e.next=8,lc(t,zl,"1");case 8:return e.next=10,dc(t,zl);case 10:return e.abrupt("return",!0);case 13:e.prev=13,e.t0=e.catch(0);case 15:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}()},{key:"_withPendingWrite",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.pendingWrites++,e.prev=1,e.next=4,t();case 4:return e.prev=4,this.pendingWrites--,e.finish(4);case 7:case"end":return e.stop()}}),e,this,[[1,,4,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_set",value:function(){var e=a(r().mark((function e(t,n){var i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i._withRetries((function(e){return lc(e,t,n)}));case 2:return i.localCache[t]=n,e.abrupt("return",i.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_get",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){return fc(e,t)}));case 2:return n=e.sent,this.localCache[t]=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_remove",value:function(){var e=a(r().mark((function e(t){var n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._withPendingWrite(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._withRetries((function(e){return dc(e,t)}));case 2:return delete n.localCache[t],e.abrupt("return",n.notifyServiceWorker(t));case 4:case"end":return e.stop()}}),e)})))));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_poll",value:function(){var e=a(r().mark((function e(){var t,n,i,a,o,s,u,l,c,f,h;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._withRetries((function(e){var t=oc(e,!1).getAll();
2return new ac(t).toPromise()}));case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",[]);case 5:if(0===this.pendingWrites){e.next=7;break}return e.abrupt("return",[]);case 7:n=[],i=new Set,a=ya(t);try{for(a.s();!(o=a.n()).done;)s=o.value,u=s.fbase_key,l=s.value,i.add(u),JSON.stringify(this.localCache[u])!==JSON.stringify(l)&&(this.notifyListeners(u,l),n.push(u))}catch(r){a.e(r)}finally{a.f()}for(c=0,f=Object.keys(this.localCache);c<f.length;c++)h=f[c],this.localCache[h]&&!i.has(h)&&(this.notifyListeners(h,null),n.push(h));return e.abrupt("return",n);case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"notifyListeners",value:function(e,t){this.localCache[e]=t;var n=this.listeners[e];if(n)for(var r=0,i=Array.from(n);r<i.length;r++){(0,i[r])(t)}}},{key:"startPolling",value:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval(a(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._poll());case 1:case"end":return t.stop()}}),t)}))),800)}},{key:"stopPolling",value:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}},{key:"_addListener",value:function(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)}},{key:"_removeListener",value:function(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()}}]),e}();pc.type="LOCAL";var vc=pc;function mc(e,t){return $s(e,"POST","/v2/accounts/mfaSignIn:start",Qs(e,t))}function yc(e){return gc.apply(this,arguments)}function gc(){return(gc=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$s(t,"GET","/v1/recaptchaParams");case 2:if(e.t0=e.sent.recaptchaSiteKey,e.t0){e.next=5;break}e.t0="";case 5:return e.abrupt("return",e.t0);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bc(e){return new Promise((function(t,n){var r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=function(e){var t=As("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)}))}function wc(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}var xc=1e12,kc=function(){function e(t){ua(this,e),this.auth=t,this.counter=xc,this._widgets=new Map}return ca(e,[{key:"render",value:function(e,t){var n=this.counter;return this._widgets.set(n,new _c(e,this.auth.name,t||{})),this.counter++,n}},{key:"reset",value:function(e){var t,n=e||xc;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)}},{key:"getResponse",value:function(e){var t,n=e||xc;return(null===(t=this._widgets.get(n))||void 0===t?void 0:t.getResponse())||""}},{key:"execute",value:function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t||xc,null===(n=this._widgets.get(i))||void 0===n||n.execute(),e.abrupt("return","");case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),_c=function(){function e(t,n,r){var i=this;ua(this,e),this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=function(){i.execute()};var a="string"===typeof t?document.getElementById(t):t;Rs(a,"argument-error",{appName:n}),this.container=a,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}return ca(e,[{key:"getResponse",value:function(){return this.checkIfDeleted(),this.responseToken}},{key:"delete",value:function(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}},{key:"execute",value:function(){var e=this;this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((function(){e.responseToken=function(e){for(var t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}(50);var t=e.params,n=t.callback,r=t["expired-callback"];if(n)try{n(e.responseToken)}catch(AF){}e.timerId=window.setTimeout((function(){if(e.timerId=null,e.responseToken=null,r)try{r()}catch(AF){}e.isVisible&&e.execute()}),6e4)}),500))}},{key:"checkIfDeleted",value:function(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}]),e}();var Cc=wc("rcb"),Ec=new Hs(3e4,6e4),Sc="https://www.google.com/recaptcha/api.js?",Tc=function(){function e(){var t;ua(this,e),this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(t=Xl().grecaptcha)||void 0===t?void 0:t.render)}return ca(e,[{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Rs(Ic(n),e,"argument-error"),this.shouldResolveImmediately(n)?Promise.resolve(Xl().grecaptcha):new Promise((function(r,i){var a=Xl().setTimeout((function(){i(As(e,"network-request-failed"))}),Ec.get());Xl()[Cc]=function(){Xl().clearTimeout(a),delete Xl()[Cc];var o=Xl().grecaptcha;if(o){var s=o.render;o.render=function(e,n){var r=s(e,n);return t.counter++,r},t.hostLanguage=n,r(o)}else i(As(e,"internal-error"))},bc("".concat(Sc,"?").concat(no({onload:Cc,render:"explicit",hl:n}
2))).catch((function(){clearTimeout(a),i(As(e,"internal-error"))}))}))}},{key:"clearedOneInstance",value:function(){this.counter--}},{key:"shouldResolveImmediately",value:function(e){var t;return!!(null===(t=Xl().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}]),e}();function Ic(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}var Nc=function(){function e(){ua(this,e)}return ca(e,[{key:"load",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new kc(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"clearedOneInstance",value:function(){}}]),e}(),Ac="recaptcha",jc={theme:"light",type:"image"},Oc=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.assign({},jc),r=arguments.length>2?arguments[2]:void 0;ua(this,e),this.parameters=n,this.type=Ac,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Gu(r),this.isInvisible="invisible"===this.parameters.size,Rs("undefined"!==typeof document,this.auth,"operation-not-supported-in-this-environment");var i="string"===typeof t?document.getElementById(t):t;Rs(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Nc:new Tc,this.validateStartingState()}return ca(e,[{key:"verify",value:function(){var e=a(r().mark((function e(){var t,n,i,a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertNotDestroyed(),e.next=3,this.render();case 3:if(t=e.sent,n=this.getAssertedRecaptcha(),!(i=n.getResponse(t))){e.next=8;break}return e.abrupt("return",i);case 8:return e.abrupt("return",new Promise((function(e){a.tokenChangeListeners.add((function t(n){n&&(a.tokenChangeListeners.delete(t),e(n))})),a.isInvisible&&n.execute(t)})));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this;try{this.assertNotDestroyed()}catch(AF){return Promise.reject(AF)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((function(t){throw e.renderPromise=null,t}))),this.renderPromise}},{key:"_reset",value:function(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}},{key:"clear",value:function(){var e=this;this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((function(t){e.container.removeChild(t)}))}},{key:"validateStartingState",value:function(){Rs(!this.parameters.sitekey,this.auth,"argument-error"),Rs(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Rs("undefined"!==typeof document,this.auth,"operation-not-supported-in-this-environment")}},{key:"makeTokenCallback",value:function(e){var t=this;return function(n){if(t.tokenChangeListeners.forEach((function(e){return e(n)})),"function"===typeof e)e(n);else if("string"===typeof e){var r=Xl()[e];"function"===typeof r&&r(n)}}}},{key:"assertNotDestroyed",value:function(){Rs(!this.destroyed,this.auth,"internal-error")}},{key:"makeRenderPromise",value:function(){var e=a(r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.init();case 2:return this.widgetId||(t=this.container,this.isInvisible||(n=document.createElement("div"),t.appendChild(n),t=n),this.widgetId=this.getAssertedRecaptcha().render(t,this.parameters)),e.abrupt("return",this.widgetId);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"init",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Rs(zs()&&!Jl(),this.auth,"internal-error"),e.next=3,Pc();case 3:return e.next=5,this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);case 5:return this.recaptcha=e.sent,e.next=8,yc(this.auth);case 8:Rs(t=e.sent,this.auth,"internal-error"),this.parameters.sitekey=t;
2case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getAssertedRecaptcha",value:function(){return Rs(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}]),e}();function Pc(){var e=null;return new Promise((function(t){"complete"!==document.readyState?(e=function(){return t()},window.addEventListener("load",e)):t()})).catch((function(t){throw e&&window.removeEventListener("load",e),t}))}var Rc=function(){function e(t,n){ua(this,e),this.verificationId=t,this.onConfirmation=n}return ca(e,[{key:"confirm",value:function(e){var t=yl._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}]),e}();function Dc(e,t,n){return Fc.apply(this,arguments)}function Fc(){return(Fc=a(r().mark((function e(t,n,i){var a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Gu(t),e.next=3,Lc(a,n,ho(i));case 3:return o=e.sent,e.abrupt("return",new Rc(o,(function(e){return Fl(a,e)})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lc(e,t,n){return Mc.apply(this,arguments)}function Mc(){return Mc=a(r().mark((function e(t,n,i){var a,o,s,u,l,c,f,h,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.verify();case 2:if(o=e.sent,e.prev=3,Rs("string"===typeof o,t,"argument-error"),Rs(i.type===Ac,t,"argument-error"),!("session"in(s="string"===typeof n?{phoneNumber:n}:n))){e.next=26;break}if(u=s.session,!("phoneNumber"in s)){e.next=17;break}return Rs("enroll"===u.type,t,"internal-error"),e.next=13,Bl(t,{idToken:u.credential,phoneEnrollmentInfo:{phoneNumber:s.phoneNumber,recaptchaToken:o}});case 13:return l=e.sent,e.abrupt("return",l.phoneSessionInfo.sessionInfo);case 17:return Rs("signin"===u.type,t,"internal-error"),Rs(c=(null===(a=s.multiFactorHint)||void 0===a?void 0:a.uid)||s.multiFactorUid,t,"missing-multi-factor-info"),e.next=22,mc(t,{mfaPendingCredential:u.credential,mfaEnrollmentId:c,phoneSignInInfo:{recaptchaToken:o}});case 22:return f=e.sent,e.abrupt("return",f.phoneResponseInfo.sessionInfo);case 24:e.next=31;break;case 26:return e.next=28,fl(t,{phoneNumber:s.phoneNumber,recaptchaToken:o});case 28:return h=e.sent,d=h.sessionInfo,e.abrupt("return",d);case 31:return e.prev=31,i._reset(),e.finish(31);case 34:case"end":return e.stop()}}),e,null,[[3,,31,34]])}))),Mc.apply(this,arguments)}var Vc=function(){function e(t){ua(this,e),this.providerId=e.PROVIDER_ID,this.auth=Gu(t)}return ca(e,[{key:"verifyPhoneNumber",value:function(e,t){return Lc(this.auth,e,ho(t))}}],[{key:"credential",value:function(e,t){return yl._fromVerification(e,t)}},{key:"credentialFromResult",value:function(t){var n=t;return e.credentialFromTaggedObject(n)}},{key:"credentialFromError",value:function(t){return e.credentialFromTaggedObject(t.customData||{})}},{key:"credentialFromTaggedObject",value:function(e){var t=e._tokenResponse;if(!t)return null;var n=t.phoneNumber,r=t.temporaryProof;return n&&r?yl._fromTokenResponse(n,r):null}}]),e}();function Bc(e,t){return t?Ms(t):(Rs(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}Vc.PROVIDER_ID="phone",Vc.PHONE_SIGN_IN_METHOD="phone";var zc=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this,"custom","custom")).params=e,r}return ca(n,[{key:"_getIdTokenResponse",value:function(e){return ul(e,this._buildIdpRequest())}},{key:"_linkToIdToken",value:function(e,t){return ul(e,this._buildIdpRequest(t))}},{key:"_getReauthenticationResolver",value:function(e){return ul(e,this._buildIdpRequest())}},{key:"_buildIdpRequest",value:function(e){var 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}}]),n}(Ju);function qc(e){return Rl(e.auth,new zc(e),e.bypassAuthState)}function Uc(e){var t=e.auth,n=e.user;return Rs(n,t,"internal-error"),Ol(n,new zc(e),e.bypassAuthState)}function Hc(e){return Wc.apply(this,arguments)}function Wc(){return(Wc=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.auth,Rs(i=t.user,n,"internal-error"),e.abrupt("return",Al(i,new zc(t),t.bypassAuthState));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Kc=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];ua(this,e),this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}return ca(e,[{key:"execute",value:function(){var e=this;return new Promise(function(){var t=a(r().mark((function t(n,i){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.pendingPromise={resolve:n,reject:i},t.prev=1,t.next=4,e.resolver._initialize(e.auth);case 4:return e.eventManager=t.sent,t.next=7,e.onExecution();case 7:e.eventManager.registerConsumer(e),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.reject(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"onAuthEvent",value:function(){var e=a(r().mark((function e(t){var n,i,a,o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.urlResponse,i=t.sessionId,a=t.postBody,o=t.tenantId,s=t.error,u=t.type,!s){e.next=4;break}return this.reject(s),e.abrupt("return");case 4:return l={auth:this.auth,requestUri:n,sessionId:i,tenantId:o||void 0,postBody:a||void 0,user:this.user,bypassAuthState:this.bypassAuthState},e.prev=5,e.t0=this,e.next=9,this.getIdpTask(u)(l);case 9:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=16;break;case 13:e.prev=13,e.t2=e.catch(5),this.reject(e.t2);case 16:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"onError",value:function(e){this.reject(e)}},{key:"getIdpTask",value:function(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return qc;case"linkViaPopup":case"linkViaRedirect":return Hc;case"reauthViaPopup":case"reauthViaRedirect":return Uc;default:Ns(this.auth,"internal-error")}}},{key:"resolve",value:function(e){Fs(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}},{key:"reject",value:function(e){Fs(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}},{key:"unregisterAndCleanUp",value:function(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}]),e}(),Gc=new Hs(2e3,1e4);function Yc(e,t,n){return Qc.apply(this,arguments)}function Qc(){return(Qc=a(r().mark((function e(t,n,i){var a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Gu(t),Os(t,n,wl),o=Bc(a,i),s=new $c(a,"signInViaPopup",n,o),e.abrupt("return",s.executeNotNull());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var $c=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a,o){var s;return ua(this,n),(s=t.call(this,e,r,a,o)).provider=i,s.authWindow=null,s.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=fa(s),s}return ca(n,[{key:"executeNotNull",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.execute();case 2:return Rs(t=e.sent,this.auth,"internal-error"),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=a(r().mark((function e(){var t,n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Fs(1===this.filter.length,"Popup operations only handle one event"),t=Ql(),e.next=4,this.resolver._openPopup(this.auth,this.provider,this.filter[0],t);case 4:this.authWindow=e.sent,this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch((function(e){n.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(function(e){e||n.reject(As(n.auth,"web-storage-unsupported"))})),this.pollUserCancellation();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"eventId",get:function(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}},{key:"cancel",value:function(){this.reject(As(this.auth,"cancelled-popup-request"))}},{key:"cleanUp",value:function(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}},{key:"pollUserCancellation",value:function(){var e=this;!function t(){var n,r;(null===(r=null===(n=e.authWindow)||void 0===n?void 0:n.window)||void 0===r?void 0:r.closed)?e.pollId=window.setTimeout((function(){e.pollId=null,e.reject(As(e.auth,"popup-closed-by-user"))}),2e3):e.pollId=window.setTimeout(t,Gc.get())}()}}]),n}(Kc);$c.currentPopupAction=null;var Xc=new Map,Jc=function(e){ha(n,e);var t=pa(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return ua(this,n),(i=t.call(this,e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,a)).eventId=null,i}return ca(n,[{key:"execute",value:function(){var e=a(r().mark((function e(){var t,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Xc.get(this.auth._key())){e.next=21;break}return e.prev=2,e.next=5,Zc(this.resolver,this.auth);case 5:if(!e.sent){e.next=12;break}return e.next=9,ma(ra(n.prototype),"execute",this).call(this);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=null;case 13:i=e.t0,t=function(){return Promise.resolve(i)},e.next=20;break;case 17:e.prev=17,e.t1=e.catch(2),t=function(){return Promise.reject(e.t1)};case 20:Xc.set(this.auth._key(),t);case 21:return this.bypassAuthState||Xc.set(this.auth._key(),(function(){return Promise.resolve(null)})),e.abrupt("return",t());case 23:case"end":return e.stop()}}),e,this,[[2,17]])})));return function(){return e.apply(this,arguments)}}()},{key:"onAuthEvent",value:function(){var e=a(r().mark((function e(t){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("signInViaRedirect"!==t.type){e.next=4;break}return e.abrupt("return",ma(ra(n.prototype),"onAuthEvent",this).call(this,t));case 4:if("unknown"!==t.type){e.next=7;break}return this.resolve(null),e.abrupt("return");
2case 7:if(!t.eventId){e.next=17;break}return e.next=10,this.auth._redirectUserForId(t.eventId);case 10:if(!(i=e.sent)){e.next=16;break}return this.user=i,e.abrupt("return",ma(ra(n.prototype),"onAuthEvent",this).call(this,t));case 16:this.resolve(null);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onExecution",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"cleanUp",value:function(){}}]),n}(Kc);function Zc(e,t){return ef.apply(this,arguments)}function ef(){return(ef=a(r().mark((function e(t,n){var i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=rf(n),a=nf(t),e.next=4,a._isAvailable();case 4:if(e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:return e.next=8,a._get(i);case 8:return e.t0=e.sent,o="true"===e.t0,e.next=12,a._remove(i);case 12:return e.abrupt("return",o);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tf(e,t){Xc.set(e._key(),t)}function nf(e){return Ms(e._redirectPersistence)}function rf(e){return Au("pendingRedirect",e.config.apiKey,e.name)}function af(e,t){return of.apply(this,arguments)}function of(){return of=a(r().mark((function e(t,n){var i,a,o,s,u,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=l.length>2&&void 0!==l[2]&&l[2],a=Gu(t),o=Bc(a,n),s=new Jc(a,o,i),e.next=6,s.execute();case 6:if(!(u=e.sent)||i){e.next=13;break}return delete u.user._redirectEventId,e.next=11,a._persistUserIfCurrent(u.user);case 11:return e.next=13,a._setRedirectUser(null,n);case 13:return e.abrupt("return",u);case 14:case"end":return e.stop()}}),e)}))),of.apply(this,arguments)}var sf=function(){function e(t){ua(this,e),this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}return ca(e,[{key:"registerConsumer",value:function(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}},{key:"unregisterConsumer",value:function(e){this.consumers.delete(e)}},{key:"onEvent",value:function(e){var t=this;if(this.hasEventBeenHandled(e))return!1;var n=!1;return this.consumers.forEach((function(r){t.isEventForConsumer(e,r)&&(n=!0,t.sendToConsumer(e,r),t.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return lf(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}},{key:"sendToConsumer",value:function(e,t){var n;if(e.error&&!lf(e)){var r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(As(this.auth,r))}else t.onAuthEvent(e)}},{key:"isEventForConsumer",value:function(e,t){var n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}},{key:"hasEventBeenHandled",value:function(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(uf(e))}},{key:"saveEventToCache",value:function(e){this.cachedEventUids.add(uf(e)),this.lastProcessedEventTime=Date.now()}}]),e}();function uf(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((function(e){return e})).join("-")}function lf(e){var t=e.type,n=e.error;return"unknown"===t&&(null===n||void 0===n?void 0:n.code)==="auth/".concat("no-auth-event")}function cf(e){return ff.apply(this,arguments)}function ff(){return ff=a(r().mark((function e(t){var n,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},e.abrupt("return",$s(t,"GET","/v1/projects",n));case 2:case"end":return e.stop()}}),e)}))),ff.apply(this,arguments)}var hf=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,df=/^https?/;function pf(){return(pf=a(r().mark((function e(t){var n,i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.emulator){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,cf(t);case 4:n=e.sent,i=n.authorizedDomains,a=ya(i),e.prev=7,a.s();case 9:if((o=a.n()).done){e.next=20;break}if(s=o.value,e.prev=11,!vf(s)){e.next=14;break}return e.abrupt("return");case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(11);case 18:e.next=9;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(7),a.e(e.t1);case 25:return e.prev=25,a.f(),e.finish(25);case 28:Ns(t,"unauthorized-domain");case 29:case"end":return e.stop()}}),e,null,[[7,22,25,28],[11,16]])})))).apply(this,arguments)}function vf(e){var t=Bs(),n=new URL(t),r=n.protocol,i=n.hostname;if(e.startsWith("chrome-extension://")){var a=new URL(e);return""===a.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&a.hostname===i}if(!df.test(r))return!1;if(hf.test(e))return i===e;var o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(i)}var mf=new Hs(3e4,6e4);function yf(){var e=Xl().___jsl;if(null===e||void 0===e?void 0:e.H)for(var t=0,n=Object.keys(e.H);t<n.length;t++){var r=n[t];if(e.H[r].r=e.H[r].r||[],e.H[r].L=e.H[r].L||[],e.H[r].r=bn(e.H[r].L),e.CP)for(var i=0;i<e.CP.length;i++)e.CP[i]=null}}var gf=null;function bf(e){return gf=gf||function(e){return new Promise((function(t,n){var r,i,a;function o(){yf(),gapi.load("gapi.iframes",{callback:function(){t(gapi.iframes.getContext())},ontimeout:function(){yf(),n(As(e,"network-request-failed"))},timeout:mf.get()})}if(null===(i=null===(r=Xl().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(a=Xl().gapi)||void 0===a?void 0:a.load)){var s=wc("iframefcb");return Xl()[s]=function(){gapi.load?o():n(As(e,"network-request-failed"))},bc("https://apis.google.com/js/api.js?onload=".concat(s)).catch((function(e){return n(e)}))}o()}})).catch((function(e){throw gf=null,e}))}(e),gf}var wf=new Hs(5e3,15e3),xf={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"}
2,kf=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function _f(e){var t=e.config;Rs(t.authDomain,e,"auth-domain-config-required");var n=t.emulator?Ws(t,"emulator/auth/iframe"):"https://".concat(e.config.authDomain,"/").concat("__/auth/iframe"),r={apiKey:t.apiKey,appName:e.name,v:is},i=kf.get(e.config.apiHost);i&&(r.eid=i);var a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),"".concat(n,"?").concat(no(r).slice(1))}function Cf(e){return Ef.apply(this,arguments)}function Ef(){return Ef=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bf(t);case 2:return n=e.sent,Rs(i=Xl().gapi,t,"internal-error"),e.abrupt("return",n.open({where:document.body,url:_f(t),messageHandlersFilter:i.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:xf,dontclear:!0},(function(e){return new Promise(function(){var n=a(r().mark((function n(i,a){var o,s,u;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=function(){Xl().clearTimeout(s),i(e)},n.next=3,e.restyle({setHideOnLeave:!1});case 3:o=As(t,"network-request-failed"),s=Xl().setTimeout((function(){a(o)}),wf.get()),e.ping(u).then(u,(function(){a(o)}));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())})));case 6:case"end":return e.stop()}}),e)}))),Ef.apply(this,arguments)}var Sf={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Tf="_blank",If="http://localhost",Nf=function(){function e(t){ua(this,e),this.window=t,this.associatedEvent=null}return ca(e,[{key:"close",value:function(){if(this.window)try{this.window.close()}catch(AF){}}}]),e}();function Af(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600,a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),s="",l=Object.assign(Object.assign({},Sf),{width:r.toString(),height:i.toString(),top:a,left:o}),c=La().toLowerCase();n&&(s=Du(c)?Tf:n),Pu(c)&&(t=t||If,l.scrollbars="yes");var f=Object.entries(l).reduce((function(e,t){var n=u(t,2),r=n[0],i=n[1];return"".concat(e).concat(r,"=").concat(i,",")}),"");if(zu(c)&&"_self"!==s)return jf(t||"",s),new Nf(null);var h=window.open(t||"",s,f);Rs(h,e,"popup-blocked");try{h.focus()}catch(AF){}return new Nf(h)}function jf(e,t){var n=document.createElement("a");n.href=e,n.target=t;var r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}
2var Of="__/auth/handler",Pf="emulator/auth/handler";function Rf(e,t,n,r,i,a){Rs(e.config.authDomain,e,"auth-domain-config-required"),Rs(e.config.apiKey,e,"invalid-api-key");var o={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:is,eventId:i};if(t instanceof wl){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||"",Ja(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(var s=0,l=Object.entries(a||{});s<l.length;s++){var c=u(l[s],2),f=c[0],h=c[1];o[f]=h}}if(t instanceof xl){var d=t.getScopes().filter((function(e){return""!==e}));d.length>0&&(o.scopes=d.join(","))}e.tenantId&&(o.tid=e.tenantId);for(var p=o,v=0,m=Object.keys(p);v<m.length;v++){var y=m[v];void 0===p[y]&&delete p[y]}return"".concat(function(e){var t=e.config;if(!t.emulator)return"https://".concat(t.authDomain,"/").concat(Of);return Ws(t,Pf)}(e),"?").concat(no(p).slice(1))}var Df="webStorageSupport",Ff=function(){function e(){ua(this,e),this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Kl,this._completeRedirectFn=af,this._overrideRedirectResult=tf}return ca(e,[{key:"_openPopup",value:function(){var e=a(r().mark((function e(t,n,i,a){var o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Fs(null===(o=this.eventManagers[t._key()])||void 0===o?void 0:o.manager,"_initialize() not called before _openPopup()"),s=Rf(t,n,i,Bs(),a),e.abrupt("return",Af(t,s,Ql()));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_openRedirect",value:function(){var e=a(r().mark((function e(t,n,i,a){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._originValidation(t);case 2:return r=Rf(t,n,i,Bs(),a),Xl().location.href=r,e.abrupt("return",new Promise((function(){})));case 4:case"end":return e.stop()}var r}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_initialize",value:function(e){var t=this,n=e._key();if(this.eventManagers[n]){var r=this.eventManagers[n],i=r.manager,a=r.promise;return i?Promise.resolve(i):(Fs(a,"If manager is not set, promise should be"),a)}var o=this.initAndGetManager(e);return this.eventManagers[n]={promise:o},o.catch((function(){delete t.eventManagers[n]})),o}},{key:"initAndGetManager",value:function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Cf(t);case 2:return n=e.sent,i=new sf(t),n.register("authEvent",(function(e){return Rs(null===e||void 0===e?void 0:e.authEvent,t,"invali
2d-auth-event"),{status:i.onEvent(e.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:i},this.iframes[t._key()]=n,e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_isIframeWebStorageSupported",value:function(e,t){this.iframes[e._key()].send(Df,{type:Df},(function(n){var r,i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==i&&t(!!i),Ns(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}},{key:"_originValidation",value:function(e){var t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=function(e){return pf.apply(this,arguments)}(e)),this.originValidationPromises[t]}},{key:"_shouldInitProactively",get:function(){return Uu()||Ru()||Bu()}}]),e}(),Lf=Ff,Mf=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this,"phone")).credential=e,r}return ca(n,[{key:"_finalizeEnroll",value:function(e,t,n){return function(e,t){return $s(e,"POST","/v2/accounts/mfaEnrollment:finalize",Qs(e,t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},{key:"_finalizeSignIn",value:function(e,t){return function(e,t){return $s(e,"POST","/v2/accounts/mfaSignIn:finalize",Qs(e,t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}],[{key:"_fromCredential",value:function(e){return new n(e)}}]),n}(function(){function e(t){ua(this,e),this.factorId=t}return ca(e,[{key:"_process",value:function(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return Ds("unexpected MultiFactorSessionType")}}}]),e}());(function(){function e(){ua(this,e)}return ca(e,null,[{key:"assertion",value:function(e){return Mf._fromCredential(e)}}]),e}()).FACTOR_ID="phone";var Vf="@firebase/auth",Bf="0.21.3",zf=function(){function e(t){ua(this,e),this.auth=t,this.internalListeners=new Map}return ca(e,[{key:"getUid",value:function(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}},{key:"getToken",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertAuthConfigured(),e.next=3,this.auth._initializationPromise;case 3:if(this.auth.currentUser){e.next=5;break}return e.abrupt("return",null);case 5:return e.next=7,this.auth.currentUser.getIdToken(t);case 7:return n=e.sent,e.abrupt("return",{accessToken:n});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addAuthTokenListener",value:function(e){if(this.assertAuthConfigured(),!this.internalListeners.has(e)){var t=this.auth.onIdTokenChanged((function(t){e((null===t||void 0===t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}}},{key:"removeAuthTokenListener",value:function(e){this.assertAuthConfigured();var t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}},{key:"assertAuthConfigured",value:function(){Rs(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}},{key:"updateProactiveRefresh",value:function(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}]),e}();var qf,Uf=Da("authIdTokenMaxAge")||300,Hf=null,Wf=function(e){return function(){var t=a(r().mark((function t(n){var i,a,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=n,!t.t0){t.next=5;break}return t.next=4,n.getIdTokenResult();case 4:t.t0=t.sent;case 5:if(i=t.t0,!((a=i&&((new Date).getTime()-Date.parse(i.issuedAtTime))/1e3)&&a>Uf)){t.next=9;break}return t.abrupt("return");case 9:if(o=null===i||void 0===i?void 0:i.token,Hf!==o){t.next=12;break}return t.abrupt("return");case 12:return Hf=o,t.next=15,fetch(e,{method:o?"POST":"DELETE",headers:o?{Authorization:"Bearer ".concat(o)}:{}});case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};function Kf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:os(),t=es(e,"auth");if(t.isInitialized())return t.getImmediate();var n=Vs(e,{popupRedirectResolver:Lf,persistence:[vc,Hl,Kl]}),r=Da("authTokenSyncURL");if(r){var i=Wf(r);Vl(n,i,(function(){return i(n.currentUser)})),Ml(n,(function(e){return i(e)}))}var a=Oa("auth");return a&&Qu(n,"http://".concat(a)),n}qf="Browser",Zo(new po("auth",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=r.options,o=a.apiKey,s=a.authDomain;return function(e,t){Rs(o&&!o.includes(":"),"invalid-api-key",{appName:e.n
2ame}),Rs(!(null===s||void 0===s?void 0:s.includes(":")),"argument-error",{appName:e.name});var r={apiKey:o,authDomain:s,clientPlatform:qf,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Hu(qf)},i=new Ku(e,t,r);return function(e,t){var n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Ms);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(i,n),i}(r,i)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider("auth-internal").initialize()}))),Zo(new po("auth-internal",(function(e){return function(e){return new zf(e)}(Gu(e.getProvider("auth").getImmediate()))}),"PRIVATE").setInstantiationMode("EXPLICIT")),ss(Vf,Bf,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(qf)),ss(Vf,Bf,"esm2017");var Gf="@firebase/database",Yf="0.14.3",Qf="";var $f=function(){function e(t){ua(this,e),this.domStorage_=t,this.prefix_="firebase:"}return ca(e,[{key:"set",value:function(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Ya(t))}},{key:"get",value:function(e){var t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:Ga(t)}},{key:"remove",value:function(e){this.domStorage_.removeItem(this.prefixedName_(e))}},{key:"prefixedName_",value:function(e){return this.prefix_+e}},{key:"toString",value:function(){return this.domStorage_.toString()}}]),e}(),Xf=function(){function e(){ua(this,e),this.cache_={},this.isInMemoryStorage=!0}return ca(e,[{key:"set",value:function(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}},{key:"get",value:function(e){return $a(this.cache_,e)?this.cache_[e]:null}},{key:"remove",value:function(e){delete this.cache_[e]}}]),e}(),Jf=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){var t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new $f(t)}}catch(AF){}return new Xf},Zf=Jf("localStorage"),eh=Jf("sessionStorage"),th=new Eo("@firebase/database"),nh=function(){var e=1;return function(){return e++}}(),rh=function(e){var t=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;r++,xa(r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}(e),n=new ao;n.update(t);var r=n.digest();return Ca.encodeByteArray(r)},ih=function e(){for(var t="",n=0;n<arguments.length;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];Array.isArray(r)||r&&"object"===typeof r&&"number"===typeof r.length?t+=e.apply(null,r):t+="object"===typeof r?Ya(r):r,t+=" "}return t},ah=null,oh=!0,sh=function(e,t){xa(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(th.logLevel=go.VERBOSE,ah=th.log.bind(th),t&&eh.set("logging_enabled",!0)):"function"===typeof e?ah=e:(ah=null,eh.remove("logging_enabled"))},uh=function(){if(!0===oh&&(oh=!1,null===ah&&!0===eh.get("logging_enabled")&&sh(!0)),ah){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ih.apply(null,t);ah(r)}},lh=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];uh.apply(void 0,[e].concat(n))}},ch=function(){var e="FIREBASE INTERNAL ERROR: "+ih.apply(void 0,arguments);th.error(e)},fh=function(){var e="FIREBASE FATAL ERROR: ".concat(ih.apply(void 0,arguments));throw th.error(e),new Error(e)},hh=function(){var e="FIREBASE WARNING: "+ih.apply(void 0,arguments);th.warn(e)},dh=function(e){return"number"===typeof e&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},ph="[MIN_NAME]",vh="[MAX_NAME]",mh=function(e,t){if(e===t)return 0;if(e===ph||t===vh)return-1;if(t===ph||e===vh)return 1;var n=Ch(e),r=Ch(t);return null!==n?null!==r?n-r===0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1},yh=function(e,t){return e===t?0:e<t?-1:1},gh=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+Ya(t))},bh=function e(t){if("object"!==typeof t||null===t)return Ya(t);var n=[];for(var r in t)n.push(r);n.sort();for(var i="{",a=0;a<n.length;a++)0!==a&&(i+=","),i+=Ya(n[a]),i+=":",i+=e(t[n[a]]);return i+="}"},wh=function(e,t){var n=e.length;if(n<=t)return[e];for(var r=[],i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function xh(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}var kh=function(e){xa(!dh(e),"Invalid JSON number");var t,n,r,i,a,o=1023;0===e?(n=0,r=0,t=1/e===-1/0?1:0):(t=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(e)/Math.LN2),o))+o,r=Math.round(e*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(e/Math.pow(2,-1074))));var s=[];for(a=52;a;a-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(a=11;a;a-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(t?1:0),s.reverse();var u=s.join(""),l="";for(a=0;a<64;a+=8){var c=parseInt(u.substr(a,8),2).toString(16);1===c.length&&(c="0"+c),l+=c}return l.toLowerCase()};var _h=new RegExp("^-?(0*)\\d{1,10}$"),Ch=function(e){if(_h.test(e)){var t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},Eh=function(e){try{e()}catch(AF){setTimeout((function(){var t=AF.stack||"";throw hh("Exception was thrown by user callback.",t),AF}),Math.floor(0))}},Sh=function(e,t){var n=setTimeout(e,t);return"number"===typeof n&&"undefined"!==typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(n):"object"===typeof n&&n.unref&&n.unref(),n},Th=function(){function e(t,n){var r=this;ua(this,e),this.appName_=t,this.appCheckProvider=n,this.appCheck=null===n||void 0===n?void 0:n.getImmediate({optional:!0}),this.appCheck||null===n||void 0===n||n.get().then((function(e){return r.appCheck=e}))}return ca(e,[{key:"getToken",value:function(e){var t=this;return this.appCheck?this.appCheck.getToken(e):new Promise((function(n,r){setTimeout((function(){t.appCheck?t.getToken(e).then(n,r):n(null)}),0)}))}},{key:"addTokenChangeListener",value:function(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then((function(t){return t.addTokenListener(e)}))}},{key:"notifyForInvalidToken",value:function(){hh('Provided AppCheck credentials for the app named "'.concat(this.appName_,'" ')+"are invalid. This usually indicates your app was not initialized correctly.")}}]),e}(),Ih=function(){function e(t,n,r){var i=this;ua(this,e),this.appName_=t,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit((function(e){return i.auth_=e}))}return ca(e,[{key:"getToken",value:function(e){var t=this;return this.auth_?this.auth_.getToken(e).catch((function(e){return e&&"auth/token-not-initialized"===e.code?(uh("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(e)})):new Promise((function(n,r){setTimeout((function(){t.auth_?t.getToken(e).then(n,r):n(null)}),0)}))}},{key:"addTokenChangeListener",value:function(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then((function(t){return t.addAuthTokenListener(e)}))}},{key:"removeTokenChangeListener",value:function(e){this.authProvider_.get().then((function(t){return t.removeAuthTokenListener(e)}))}},{key:"notifyForInvalidToken",value:function(){var e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',hh(e)}}]),e}(),Nh=function(){function e(t){ua(this,e),this.accessToken=t}return ca(e,[{key:"getToken",value:function(e){return Promise.resolve({accessToken:this.accessToken})}},{key:"addTokenChangeListener",value:function(e){e(this.accessToken)}},{key:"removeTokenChangeListener",value:function(e){}},{key:"notifyForInvalidToken",value:function(){}}]),e}();Nh.OWNER="owner";var Ah="5",jh=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,Oh="websocket",Ph="long_polling",Rh=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=arguments.length>7&&void 0!==arguments[7]&&arguments[7];ua(this,e),this.secure=n,this.namespace=r,this.webSocketOnly=i,this.nodeAdmin=a,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=u,this._host=t.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Zf.get("host:"+t)||this._host}return ca(e,[{key:"isCacheableHost",value:function(){return"s-"===this.internalHost.substr(0,2)}},{key:"isCustomHost",value:function(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}},{key:"host",get:function(){return this._host},set:function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&Zf.set("host:"+this._host,this.internalHost))}},{key:"toString",value:function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}},{key:"toURLString",value:function(){var e=this.secure?"https://":"http://",t=this.includeNamespaceInQueryParams?"?ns=".concat(this.namespace):"";return"".concat(e).concat(this.host,"/").concat(t)}}]),e}();function Dh(e,t,n){var r;
2if(xa("string"===typeof t,"typeof type must == string"),xa("object"===typeof n,"typeof params must == object"),t===Oh)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else{if(t!==Ph)throw new Error("Unknown connection type: "+t);r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?"}(function(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams})(e)&&(n.ns=e.namespace);var i=[];return xh(n,(function(e,t){i.push(e+"="+t)})),r+i.join("&")}var Fh=function(){function e(){ua(this,e),this.counters_={}}return ca(e,[{key:"incrementCounter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;$a(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}},{key:"get",value:function(){return Ia(this.counters_)}}]),e}(),Lh={},Mh={};function Vh(e){var t=e.toString();return Lh[t]||(Lh[t]=new Fh),Lh[t]}var Bh=function(){function e(t){ua(this,e),this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return ca(e,[{key:"closeAfter",value:function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}},{key:"handleResponse",value:function(e,t){var n=this;this.pendingResponses[e]=t;for(var r=function(){var e=n.pendingResponses[n.currentResponseNum];delete n.pendingResponses[n.currentResponseNum];for(var t=function(t){e[t]&&Eh((function(){n.onMessage_(e[t])}))},r=0;r<e.length;++r)t(r);if(n.currentResponseNum===n.closeAfterResponse)return n.onClose&&(n.onClose(),n.onClose=null),"break";n.currentResponseNum++};this.pendingResponses[this.currentResponseNum];){if("break"===r())break}}}]),e}(),zh="start",qh="close",Uh=function(){function e(t,n,r,i,a,o,s){var u=this;ua(this,e),this.connId=t,this.repoInfo=n,this.applicationId=r,this.appCheckToken=i,this.authToken=a,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=lh(t),this.stats_=Vh(n),this.urlFn=function(e){return u.appCheckToken&&(e.ac=u.appCheckToken),Dh(n,Ph,e)}}return ca(e,[{key:"open",value:function(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new Bh(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(Ba()||"complete"===document.readyState)e();else{var t=!1,n=function n(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((function(){if(!n.isClosed_){n.scriptTagHolder=new Hh((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t[0],a=t[1],o=t[2];t[3],t[4];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,i===zh)n.id=a,n.password=o;else{if(i!==qh)throw new Error("Unrecognized command received: "+i);a?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(a,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t[0],a=t[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(i,a)}),(function(){n.onClosed_()}),n.urlFn);var e={start:"t"};e.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=n.scriptTagHolder.uniqueCallbackIdentifier),e.v=Ah,n.transportSessionId&&(e.s=n.transportSessionId),n.lastSessionId&&(e.ls=n.lastSessionId),n.applicationId&&(e.p=n.applicationId),n.appCheckToken&&(e.ac=n.appCheckToken),"undefined"!==typeof location&&location.hostname&&jh.test(location.hostname)&&(e.r="f");var t=n.urlFn(e);n.log_("Connecting via long-poll to "+t),n.scriptTagHolder.addTag(t,(function(){}))}}))}},{key:"start",value:function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}},{key:"markConnectionHealthy",value:function(){}},{key:"shutdown_",value:function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}},{key:"onClosed_",value:function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}},{key:"close",value:function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}},{key:"send",value:function(e){var t=Ya(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);for(var n=Ea(t),r=wh(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++}},{key:"addDisconnectPingFrame",value:function(e,t){if(!Ba()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}}},{key:"incrementIncomingBytes_",value:function(e){var t=Ya(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)}}],[{key:"forceAllow",value:function(){e.forceAllow_=!0}},{key:"forceDisallow",value:function(){e.forceDisallow_=!0}},{key:"isAvailable",value:function(){return!Ba()&&(!!e.forceAllow_||!e.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))}}]),e}(),Hh=function(){function e(t,n,r,i){if(ua(this,e),this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,Ba())this.commandCB=t,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=nh(),window["pLPCommand"+this.uniqueCallbackIdentifier]=t,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=e.createI
2Frame_();var a="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))a='<script>document.domain="'+document.domain+'";<\/script>';var o="<html><body>"+a+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(o),this.myIFrame.doc.close()}catch(AF){uh("frame writing exception"),AF.stack&&uh(AF.stack),uh(AF)}}}return ca(e,[{key:"close",value:function(){var e=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout((function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)}),Math.floor(0)));var t=this.onDisconnect;t&&(this.onDisconnect=null,t())}},{key:"startLongPoll",value:function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););}},{key:"newRequest_",value:function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;for(var t=this.urlFn(e),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1}},{key:"enqueueSegment",value:function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()}},{key:"addLongPollTag_",value:function(e,t){var n=this;this.outstandingRequests.add(t);var r=function(){n.outstandingRequests.delete(t),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(e,(function(){clearTimeout(i),r()}))}},{key:"addTag",value:function(e,t){var n=this;Ba()?this.doNodeLongPoll(e,t):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){var e=r.readyState;e&&"loaded"!==e&&"complete"!==e||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),t())},r.onerror=function(){uh("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(AF){}}),Math.floor(1))}}],[{key:"createIFrame_",value:function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||uh("No IE domain setting required")}catch(AF){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}}]),e}(),Wh=null;"undefined"!==typeof MozWebSocket?Wh=MozWebSocket:"undefined"!==typeof WebSocket&&(Wh=WebSocket);var Kh=function(){function e(t,n,r,i,a,o,s){ua(this,e),this.connId=t,this.applicationId=r,this.appCheckToken=i,this.authToken=a,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=lh(this.connId),this.stats_=Vh(n),this.connURL=e.connectionURL_(n,o,s,i,r),this.nodeAdmin=n.nodeAdmin}return ca(e,[{key:"open",value:function(e,t){var n=this;this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Zf.set("previous_websocket_failure",!0);try{var r;if(Ba()){var i=this.nodeAdmin?"AdminNode":"Node";r={headers:{"User-Agent":"Firebase/".concat(Ah,"/").concat(Qf,"/").concat(process.platform,"/").concat(i),"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(r.headers.Authorization="Bearer ".concat(this.authToken)),this.appCheckToken&&(r.headers["X-Firebase-AppCheck"]=this.appCheckToken);var a={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0},o=0===this.connURL.indexOf("wss://")?a.HTTPS_PROXY||a.https_proxy:a.HTTP_PROXY||a.http_proxy;o&&(r.proxy={origin:o})}this.mySock=new Wh(this.connURL,[],r)}catch(AF){this.log_("Error instantiating WebSocket.");var s=AF.message||AF.data;return s&&this.log_(s),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0}
2,this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(e){n.handleIncomingFrame(e)},this.mySock.onerror=function(e){n.log_("WebSocket error.  Closing connection.");var t=e.message||e.data;t&&n.log_(t),n.onClosed_()}}},{key:"start",value:function(){}},{key:"markConnectionHealthy",value:function(){Zf.remove("previous_websocket_failure")}},{key:"appendFrame_",value:function(e){if(this.frames.push(e),this.frames.length===this.totalFrames){var t=this.frames.join("");this.frames=null;var n=Ga(t);this.onMessage(n)}}},{key:"handleNewFrameCount_",value:function(e){this.totalFrames=e,this.frames=[]}},{key:"extractFrameCount_",value:function(e){if(xa(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}},{key:"handleIncomingFrame",value:function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}}},{key:"send",value:function(e){this.resetKeepAlive();var t=Ya(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=wh(t,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])}},{key:"shutdown_",value:function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}},{key:"onClosed_",value:function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}},{key:"close",value:function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}},{key:"resetKeepAlive",value:function(){var e=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){e.mySock&&e.sendString_("0"),e.resetKeepAlive()}),Math.floor(45e3))}},{key:"sendString_",value:function(e){try{this.mySock.send(e)}catch(AF){this.log_("Exception thrown from WebSocket.send():",AF.message||AF.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}],[{key:"connectionURL_",value:function(e,t,n,r,i){var a={};return a.v=Ah,!Ba()&&"undefined"!==typeof location&&location.hostname&&jh.test(location.hostname)&&(a.r="f"),t&&(a.s=t),n&&(a.ls=n),r&&(a.ac=r),i&&(a.p=i),Dh(e,Oh,a)}},{key:"forceDisallow",value:function(){e.forceDisallow_=!0}},{key:"isAvailable",value:function(){var t=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(t=!0)}return!t&&null!==Wh&&!e.forceDisallow_}},{key:"previouslyFailed",value:function(){return Zf.isInMemoryStorage||!0===Zf.get("previous_websocket_failure")}}]),e}();Kh.responsesRequiredToBeHealthy=2,Kh.healthyTimeout=3e4;var Gh=function(){function e(t){ua(this,e),this.initTransports_(t)}return ca(e,[{key:"initTransports_",value:function(t){var n=Kh&&Kh.isAvailable(),r=n&&!Kh.previouslyFailed();if(t.webSocketOnly&&(n||hh("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),r=!0),r)this.transports_=[Kh];else{var i,a=this.transports_=[],o=ya(e.ALL_TRANSPORTS);try{for(o.s();!(i=o.n()).done;){var s=i.value;s&&s.isAvailable()&&a.push(s)}}catch(u){o.e(u)}finally{o.f()}e.globalTransportInitialized_=!0}}},{key:"initialTransport",value:function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}},{key:"upgradeTransport",value:function(){return this.transports_.length>1?this.transports_[1]:null}}],[{key:"ALL_TRANSPORTS",get:function(){return[Uh,Kh]}},{key:"IS_TRANSPORT_INITIALIZED",get:function(){return this.globalTransportInitialized_}}]),e}();Gh.globalTransportInitialized_=!1;var Yh=function(){function e(t,n,r,i,a,o,s,u,l,c){ua(this,e),this.id=t,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=i,this.authToken_=a,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=u,this.onKill_=l,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=lh("c:"+this.id+":"),this.transportManager_=new Gh(n),this.log_("Connection created"),this.start_()}return ca(e,[{key:"start_",value:function(){var e=this,t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((function(){e.conn_&&e.conn_.open(n,r)}),Math.floor(0));var i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=Sh((function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>
2102400?(e.log_("Connection exceeded healthy timeout but has received "+e.conn_.bytesReceived+" bytes.  Marking connection healthy."),e.isHealthy_=!0,e.conn_.markConnectionHealthy()):e.conn_&&e.conn_.bytesSent>10240?e.log_("Connection exceeded healthy timeout but has sent "+e.conn_.bytesSent+" bytes.  Leaving connection alive."):(e.log_("Closing unhealthy connection after timeout."),e.close()))}),Math.floor(i)))}},{key:"nextTransportId_",value:function(){return"c:"+this.id+":"+this.connectionCount++}},{key:"disconnReceiver_",value:function(e){var t=this;return function(n){e===t.conn_?t.onConnectionLost_(n):e===t.secondaryConn_?(t.log_("Secondary connection lost."),t.onSecondaryConnectionLost_()):t.log_("closing an old connection")}}},{key:"connReceiver_",value:function(e){var t=this;return function(n){2!==t.state_&&(e===t.rx_?t.onPrimaryMessageReceived_(n):e===t.secondaryConn_?t.onSecondaryMessageReceived_(n):t.log_("message on old connection"))}}},{key:"sendRequest",value:function(e){var t={t:"d",d:e};this.sendData_(t)}},{key:"tryCleanupConnection",value:function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}},{key:"onSecondaryControl_",value:function(e){if("t"in e){var t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}},{key:"onSecondaryMessageReceived_",value:function(e){var t=gh("t",e),n=gh("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}}},{key:"upgradeIfSecondaryHealthy_",value:function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))}},{key:"proceedWithUpgrade_",value:function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}},{key:"onPrimaryMessageReceived_",value:function(e){var t=gh("t",e),n=gh("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)}},{key:"onDataMessage_",value:function(e){this.onPrimaryResponse_(),this.onMessage_(e)}},{key:"onPrimaryResponse_",value:function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}},{key:"onControl_",value:function(e){var t=gh("t",e);if("d"in e){var n=e.d;if("h"===t){var r=Object.assign({},n);this.repoInfo_.isUsingEmulator&&(r.h=this.repoInfo_.host),this.onHandshake_(r)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var i=0;i<this.pendingDataMessages.length;++i)this.onDataMessage_(this.pendingDataMessages[i]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?ch("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):ch("Unknown control packet command: "+t)}}},{key:"onHandshake_",value:function(e){var t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.host=r,0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),Ah!==n&&hh("Protocol version mismatch detected"),this.tryStartUpgrade_())}},{key:"tryStartUpgrade_",value:function(){var e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)}},{key:"startUpgrade_",value:function(e){var t=this;this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),Sh((function(){t.secondaryConn_&&(t.log_("Timed out trying to upgrade."),t.secondaryConn_.close())}),Math.floor(6e4))}},{key:"onReset_",value:function(e){this.log_("Reset packet received.  New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}},{key:"onConnectionEstablished_",value:function(e,t){var n=this;this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Sh((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))}},{key:"sendPingOnPrimaryIfNecessary_",value:function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}},{key:"onSecondaryConnectionLost_",value:function(){var e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()}},{key:"onConnectionLost_",value:function(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Zf.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()}},{key:"onConnectionShutdown_",value:function(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}},{key:"sendData_",value:function(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}},{key:"close",value:function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}},{key:"closeConnections_",value:function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}]),e}(),Qh=function(){function e(){ua(this,e)}return ca(e,[{key:"put",value:function(e,t,n,r){}},{key:"merge",value:function(e,t,n,r){}},{key:"refreshAuthToken",value:function(e){}},{key:"refreshAppCheckToken",value:function(e){}},{key:"onDisconnectPut",value:function(e,t,n){}},{key:"onDisconnectMerge",value:function(e,t,n){}},{key:"onDisconnectCancel",value:function(e,t){}},{key:"reportStats",value:function(e){}}]),e}(),$h=function(){function e(t){ua(this,e),this.allowedEvents_=t,this.listeners_={},xa(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return ca(e,[{key:"trigger",value:function(e){if(Array.isArray(this.listeners_[e])){for(var t=bn(this.listeners_[e]),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=0;a<t.length;a++)t[a].callback.apply(t[a].context,r)}}},{key:"on",value:function(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});var r=this.getInitialEvent(e);r&&t.apply(n,r)}},{key:"off",value:function(e,t,n){this.validateEventType_(e);for(var r=this.listeners_[e]||[],i=0;i<r.length;i++)if(r[i].callback===t&&(!n||n===r[i].context))return void r.splice(i,1)}},{key:"validateEventType_",value:function(e){xa(this.allowedEvents_.find((function(t){return t===e})),"Unknown event: "+e)}}]),e}(),Xh=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.call(this,["online"])).online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Ma()||(window.addEventListener("online",(function(){e.online_||(e.online_=!0,e.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){e.online_&&(e.online_=!1,e.trigger("online",!1))}),!1)),e}return ca(n,[{key:"getInitialEvent",value:function(e){return xa("online"===e,"Unknown event type: "+e),[this.online_]}},{key:"currentlyOnline",value:function(){return this.online_}}],[{key:"getInstance",value:function(){return new n}}]),n}($h),Jh=function(){function e(t,n){if(ua(this,e),void 0===n){this.pieces_=t.split("/");for(var r=0,i=0;i<this.pieces_.length;i++)this.pieces_[i].length>0&&(this.pieces_[r]=this.pieces_[i],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=n}return ca(e,[{key:"toString",value:function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"}}]),e}();function Zh(){return new Jh("")}function ed(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function td(e){return e.pieces_.length-e.pieceNum_}
2function nd(e){var t=e.pieceNum_;return t<e.pieces_.length&&t++,new Jh(e.pieces_,t)}function rd(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function id(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.pieces_.slice(e.pieceNum_+t)}function ad(e){if(e.pieceNum_>=e.pieces_.length)return null;for(var t=[],n=e.pieceNum_;n<e.pieces_.length-1;n++)t.push(e.pieces_[n]);return new Jh(t,0)}function od(e,t){for(var n=[],r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);if(t instanceof Jh)for(var i=t.pieceNum_;i<t.pieces_.length;i++)n.push(t.pieces_[i]);else for(var a=t.split("/"),o=0;o<a.length;o++)a[o].length>0&&n.push(a[o]);return new Jh(n,0)}function sd(e){return e.pieceNum_>=e.pieces_.length}function ud(e,t){var n=ed(e),r=ed(t);if(null===n)return t;if(n===r)return ud(nd(e),nd(t));throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function ld(e,t){if(td(e)!==td(t))return!1;for(var n=e.pieceNum_,r=t.pieceNum_;n<=e.pieces_.length;n++,r++)if(e.pieces_[n]!==t.pieces_[r])return!1;return!0}function cd(e,t){var n=e.pieceNum_,r=t.pieceNum_;if(td(e)>td(t))return!1;for(;n<e.pieces_.length;){if(e.pieces_[n]!==t.pieces_[r])return!1;++n,++r}return!0}var fd=ca((function e(t,n){ua(this,e),this.errorPrefix_=n,this.parts_=id(t,0),this.byteLength_=Math.max(1,this.parts_.length);for(var r=0;r<this.parts_.length;r++)this.byteLength_+=lo(this.parts_[r]);hd(this)}));function hd(e){if(e.byteLength_>768)throw new Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+dd(e))}function dd(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}var pd=function(e){ha(n,e);var t=pa(n);function n(){var e,r,i;return ua(this,n),e=t.call(this,["visible"]),"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(i="visibilitychange",r="hidden"):"undefined"!==typeof document.mozHidden?(i="mozvisibilitychange",r="mozHidden"):"undefined"!==typeof document.msHidden?(i="msvisibilitychange",r="msHidden"):"undefined"!==typeof document.webkitHidden&&(i="webkitvisibilitychange",r="webkitHidden")),e.visible_=!0,i&&document.addEventListener(i,(function(){var t=!document[r];t!==e.visible_&&(e.visible_=t,e.trigger("visible",t))}),!1),e}return ca(n,[{key:"getInitialEvent",value:function(e){return xa("visible"===e,"Unknown event type: "+e),[this.visible_]}}],[{key:"getInstance",value:function(){return new n}}]),n}($h),vd=1e3,md=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a,o,s,u,l){var c;if(ua(this,n),(c=t.call(this)).repoInfo_=e,c.applicationId_=r,c.onDataUpdate_=i,c.onConnectStatus_=a,c.onServerInfoUpdate_=o,c.authTokenProvider_=s,c.appCheckTokenProvider_=u,c.authOverride_=l,c.id=n.nextPersistentConnectionId_++,c.log_=lh("p:"+c.id+":"),c.interruptReasons_={},c.listens=new Map,c.outstandingPuts_=[],c.outstandingGets_=[],c.outstandingPutCount_=0,c.outstandingGetCount_=0,c.onDisconnectRequestQueue_=[],c.connected_=!1,c.reconnectDelay_=vd,c.maxReconnectDelay_=3e5,c.securityDebugCallback_=null,c.lastSessionId=null,c.establishConnectionTimer_=null,c.visible_=!1,c.requestCBHash_={},c.requestNumber_=0,c.realtime_=null,c.authToken_=null,c.appCheckToken_=null,c.forceTokenRefresh_=!1,c.invalidAuthTokenCount_=0,c.invalidAppCheckTokenCount_=0,c.firstConnection_=!0,c.lastConnectionAttemptTime_=null,c.lastConnectionEstablishedTime_=null,l&&!Ba())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return pd.getInstance().on("visible",c.onVisible_,fa(c)),-1===e.host.indexOf("fblocal")&&Xh.getInstance().on("online",c.onOnline_,fa(c)),c}return ca(n,[{key:"sendRequest",value:function(e,t,n){var r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(Ya(i)),xa(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)}},{key:"get",value:function(e){this.initConnection_();var t=new Fa,n={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:function(e){var n=e.d;"ok"===e.s?t.resolve(n):t.reject(n)}};this.outstandingGets_.push(n),this.outstandingGetCount_++;var r=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(r),t.promise}},{key:"listen",value:function(e,t,n,r){this.initConnection_();var i=e._queryIdentifier,a=e._path.toString();this.log_("Listen called for "+a+" "+i),this.listens.has(a)||this.listens.set(a,new Map),xa(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),xa(!this.listens.get(a).has(i),"listen() called twice for same path/queryId.");var o={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(a).set(i,o),this.connected_&&this.sendListen_(o)}},{key:"sendGet_",value:function(e){var t=this,n=this.outstandingGets_[e];this.sendRequest("g",n.request,(function(r){delete t.outstandingGets_[e],t.outstandingGetCount_--,0===t.outstandingGetCount_&&(t.outstandingGets_=[]),n.onComplete&&n.onComplete(r)}))}},{key:"sendListen_",value:function(e){var t=this,r=e.query,i=r._path.toString(),a=r._queryIdentifier;this.log_("Listen on "+i+" for "+a);var o={p:i};e.tag&&(o.q=r._queryObject,o.t=e.tag),o.h=e.hashFn(),this.sendRequest("q",o,(function(o){var s=o.d,u=o.s;n.warnOnListenWarnings_(s,r),(t.listens.get(i)&&t.listens.get(i).get(a))===e&&(t.log_("listen response",o),"ok"!==u&&t.removeListen_(i,a),e.onComplete&&e.onComplete(u,s))}))}},{key:"refreshAuthToken",value:function(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(e)}},{key:"reduceReconnectDelayIfAdminCredential_",value:function(e){(e&&40===e.length||function(e){var t=Qa(e).claims;return"object"===typeof t&&!0===t.admin}(e))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}},{key:"refreshAppCheckToken",value:function(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},(function(){}))}},{key:"tryAuth",value:function(){var e=this;if(this.connected_&&this.authToken_){var t=this.authToken_,n=function(e){var t=Qa(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")}(t)?"auth":"gauth",r={cred:t};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,(function(n){var r=n.s,i=n.d||"error";
2e.authToken_===t&&("ok"===r?e.invalidAuthTokenCount_=0:e.onAuthRevoked_(r,i))}))}}},{key:"tryAppCheck",value:function(){var e=this;this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},(function(t){var n=t.s,r=t.d||"error";"ok"===n?e.invalidAppCheckTokenCount_=0:e.onAppCheckRevoked_(n,r)}))}},{key:"unlisten",value:function(e,t){var n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),xa(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)}},{key:"sendUnlisten_",value:function(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);var i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)}},{key:"onDisconnectPut",value:function(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})}},{key:"onDisconnectMerge",value:function(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})}},{key:"onDisconnectCancel",value:function(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}},{key:"sendOnDisconnect_",value:function(e,t,n,r){var i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,(function(e){r&&setTimeout((function(){r(e.s,e.d)}),Math.floor(0))}))}},{key:"put",value:function(e,t,n,r){this.putInternal("p",e,t,n,r)}},{key:"merge",value:function(e,t,n,r){this.putInternal("m",e,t,n,r)}},{key:"putInternal",value:function(e,t,n,r,i){this.initConnection_();var a={p:t,d:n};void 0!==i&&(a.h=i),this.outstandingPuts_.push({action:e,request:a,onComplete:r}),this.outstandingPutCount_++;var o=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(o):this.log_("Buffering put: "+t)}},{key:"sendPut_",value:function(e){var t=this,n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,(function(r){t.log_(n+" response",r),delete t.outstandingPuts_[e],t.outstandingPutCount_--,0===t.outstandingPutCount_&&(t.outstandingPuts_=[]),i&&i(r.s,r.d)}))}},{key:"reportStats",value:function(e){var t=this;if(this.connected_){var n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,(function(e){if("ok"!==e.s){var n=e.d;t.log_("reportStats","Error sending stats: "+n)}}))}}},{key:"onDataMessage_",value:function(e){if("r"in e){this.log_("from server: "+Ya(e));var t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}},{key:"onDataPush_",value:function(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):ch("Unrecognized action received from server: "+Ya(e)+"\nAre you using the latest client?")}},{key:"onReady_",value:function(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}},{key:"scheduleConnect_",value:function(e){var t=this;xa(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){t.establishConnectionTimer_=null,t.establishConnection_()}),Math.floor(e))}},{key:"initConnection_",value:function(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}},{key:"onVisible_",value:function(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=vd,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}},{key:"onOnline_",value:function(e){e?(this.log_("Browser went online."),this.reconnectDelay_=vd,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())}},{key:"onRealtimeDisconnect_",value:function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=vd),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var e=(new Date).getTime()-this.lastConnectionAttemptTime_,t=Math.max(0,this.reconnectDelay_-e);
2t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)}},{key:"establishConnection_",value:function(){var e=a(r().mark((function e(){var t,i,a,o,s,l,c,f,h,d,p,v,m,y,g=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldReconnect_()){e.next=30;break}return this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null,t=this.onDataMessage_.bind(this),i=this.onReady_.bind(this),a=this.onRealtimeDisconnect_.bind(this),o=this.id+":"+n.nextConnectionId_++,s=this.lastSessionId,l=!1,c=null,f=function(){c?c.close():(l=!0,a())},h=function(e){xa(c,"sendRequest call when we're not connected not allowed."),c.sendRequest(e)},this.realtime_={close:f,sendRequest:h},d=this.forceTokenRefresh_,this.forceTokenRefresh_=!1,e.prev=16,e.next=19,Promise.all([this.authTokenProvider_.getToken(d),this.appCheckTokenProvider_.getToken(d)]);case 19:p=e.sent,v=u(p,2),m=v[0],y=v[1],l?uh("getToken() completed but was canceled"):(uh("getToken() completed. Creating connection."),this.authToken_=m&&m.accessToken,this.appCheckToken_=y&&y.token,c=new Yh(o,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,t,i,a,(function(e){hh(e+" ("+g.repoInfo_.toString()+")"),g.interrupt("server_kill")}),s)),e.next=30;break;case 26:e.prev=26,e.t0=e.catch(16),this.log_("Failed to get token: "+e.t0),l||(this.repoInfo_.nodeAdmin&&hh(e.t0),f());case 30:case"end":return e.stop()}}),e,this,[[16,26]])})));return function(){return e.apply(this,arguments)}}()},{key:"interrupt",value:function(e){uh("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}},{key:"resume",value:function(e){uh("Resuming connection for reason: "+e),delete this.interruptReasons_[e],Ja(this.interruptReasons_)&&(this.reconnectDelay_=vd,this.realtime_||this.scheduleConnect_(0))}},{key:"handleTimestamp_",value:function(e){var t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}},{key:"cancelSentTransactions_",value:function(){for(var e=0;e<this.outstandingPuts_.length;e++){var t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])}},{key:"onListenRevoked_",value:function(e,t){var n;n=t?t.map((function(e){return bh(e)})).join("$"):"default";var r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")}},{key:"removeListen_",value:function(e,t){var n,r=new Jh(e).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(t),i.delete(t),0===i.size&&this.listens.delete(r)}else n=void 0;return n}},{key:"onAuthRevoked_",value:function(e,t){uh("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}},{key:"onAppCheckRevoked_",value:function(e,t){uh("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}},{key:"onSecurityDebugPacket_",value:function(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}},{key:"restoreState_",value:function(){this.tryAuth(),this.tryAppCheck();var e,t=ya(this.listens.values());try{for(t.s();!(e=t.n()).done;){var n,r=ya(e.value.values());try{for(r.s();!(n=r.n()).done;){var i=n.value;this.sendListen_(i)}}catch(u){r.e(u)}finally{r.f()}}}catch(u){t.e(u)}finally{t.f()}for(var a=0;a<this.outstandingPuts_.length;a++)this.outstandingPuts_[a]&&this.sendPut_(a);for(;this.onDisconnectRequestQueue_.length;){var o=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(o.action,o.pathString,o.data,o.onComplete)}for(var s=0;s<this.outstandingGets_.length;s++)this.outstandingGets_[s]&&this.sendGet_(s)}},{key:"sendConnectStats_",value:function(){var e={},t="js";Ba()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+Qf.replace(/\./g,"-")]=1,Ma()?e["framework.cordova"]=1:Va()&&(e["framework.reactnative"]=1),this.reportStats(e)}},{key:"shouldReconnect_",value:function(){var e=Xh.getInstance().currentlyOnline();return Ja(this.interruptReasons_)&&e}}],[{key:"warnOnListenWarnings_",value:function(e,t){if(e&&"object"===typeof e&&$a(e,"w")){var n=Xa(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+t._queryParams.getIndex().toString()+'"',i=t._path.toString();hh("Using an unspecified index. Your data will be downloaded and "+"filtered on the client. Consider adding ".concat(r," at ")+"".concat(i," to your security rules for better performance."))}}}}]),n}(Qh);md.nextPersistentConnectionId_=0,md.nextConnectionId_=0;var yd,gd=function(){function e(t,n){ua(this,e),this.name=t,this.node=n}return ca(e,null,[{key:"Wrap",value:function(t,n){return new e(t,n)}}]),e}(),bd=function(){function e(){ua(this,e)}return ca(e,[{key:"getCompare",value:function(){return this.compare.bind(this)}},{key:"indexedValueChanged",value:function(e,t){var n=new gd(ph,e),r=new gd(ph,t);return 0!==this.compare(n,r)}},{key:"minPost",value:function(){return gd.MIN}}]),e}(),wd=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}
2return ca(n,[{key:"compare",value:function(e,t){return mh(e.name,t.name)}},{key:"isDefinedOn",value:function(e){throw ka("KeyIndex.isDefinedOn not expected to be called.")}},{key:"indexedValueChanged",value:function(e,t){return!1}},{key:"minPost",value:function(){return gd.MIN}},{key:"maxPost",value:function(){return new gd(vh,yd)}},{key:"makePost",value:function(e,t){return xa("string"===typeof e,"KeyIndex indexValue must always be a string."),new gd(e,yd)}},{key:"toString",value:function(){return".key"}}],[{key:"__EMPTY_NODE",get:function(){return yd},set:function(e){yd=e}}]),n}(bd),xd=new wd,kd=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;ua(this,e),this.isReverse_=i,this.resultGenerator_=a,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(o=n?r(t.key,n):1,i&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return ca(e,[{key:"getNext",value:function(){if(0===this.nodeStack_.length)return null;var e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}},{key:"hasNext",value:function(){return this.nodeStack_.length>0}},{key:"peek",value:function(){if(0===this.nodeStack_.length)return null;var e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}]),e}(),_d=function(){function e(t,n,r,i,a){ua(this,e),this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:Sd.EMPTY_NODE,this.right=null!=a?a:Sd.EMPTY_NODE}return ca(e,[{key:"copy",value:function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)}},{key:"count",value:function(){return this.left.count()+1+this.right.count()}},{key:"isEmpty",value:function(){return!1}},{key:"inorderTraversal",value:function(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}},{key:"min_",value:function(){return this.left.isEmpty()?this:this.left.min_()}},{key:"minKey",value:function(){return this.min_().key}},{key:"maxKey",value:function(){return this.right.isEmpty()?this.key:this.right.maxKey()}},{key:"insert",value:function(e,t,n){var r=this,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))).fixUp_()}},{key:"removeMin_",value:function(){if(this.left.isEmpty())return Sd.EMPTY_NODE;var e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),(e=e.copy(null,null,null,e.left.removeMin_(),null)).fixUp_()}},{key:"remove",value:function(e,t){var n,r;if(t(e,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return Sd.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()}},{key:"isRed_",value:function(){return this.color}},{key:"fixUp_",value:function(){var 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}},{key:"moveRedLeft_",value:function(){var e=this.colorFlip_();return e.right.left.isRed_()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight_())).rotateLeft_()).colorFlip_()),e}},{key:"moveRedRight_",value:function(){var e=this.colorFlip_();return e.left.left.isRed_()&&(e=(e=e.rotateRight_()).colorFlip_()),e}},{key:"rotateLeft_",value:function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}},{key:"rotateRight_",value:function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}},{key:"colorFlip_",value:function(){var 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)}},{key:"checkMaxDepth_",value:function(){var e=this.check_();return Math.pow(2,e)<=this.count()+1}},{key:"check_",value:function(){if(this.isRed_()&&this.left.isRed_()
2)throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}]),e}();_d.RED=!0,_d.BLACK=!1;var Cd,Ed=function(){function e(){ua(this,e)}return ca(e,[{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new _d(e,t,null)}},{key:"remove",value:function(e,t){return this}},{key:"count",value:function(){return 0}},{key:"isEmpty",value:function(){return!0}},{key:"inorderTraversal",value:function(e){return!1}},{key:"reverseTraversal",value:function(e){return!1}},{key:"minKey",value:function(){return null}},{key:"maxKey",value:function(){return null}},{key:"check_",value:function(){return 0}},{key:"isRed_",value:function(){return!1}}]),e}(),Sd=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.EMPTY_NODE;ua(this,e),this.comparator_=t,this.root_=n}return ca(e,[{key:"insert",value:function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,_d.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,_d.BLACK,null,null))}},{key:"get",value:function(e){for(var t,n=this.root_;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null}},{key:"getPredecessorKey",value:function(e){for(var t,n=this.root_,r=null;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")}},{key:"isEmpty",value:function(){return this.root_.isEmpty()}},{key:"count",value:function(){return this.root_.count()}},{key:"minKey",value:function(){return this.root_.minKey()}},{key:"maxKey",value:function(){return this.root_.maxKey()}},{key:"inorderTraversal",value:function(e){return this.root_.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.root_.reverseTraversal(e)}},{key:"getIterator",value:function(e){return new kd(this.root_,null,this.comparator_,!1,e)}},{key:"getIteratorFrom",value:function(e,t){return new kd(this.root_,e,this.comparator_,!1,t)}},{key:"getReverseIteratorFrom",value:function(e,t){return new kd(this.root_,e,this.comparator_,!0,t)}},{key:"getReverseIterator",value:function(e){return new kd(this.root_,null,this.comparator_,!0,e)}}]),e}();function Td(e,t){return mh(e.name,t.name)}function Id(e,t){return mh(e,t)}Sd.EMPTY_NODE=new Ed;var Nd,Ad,jd,Od=function(e){return"number"===typeof e?"number:"+kh(e):"string:"+e},Pd=function(e){if(e.isLeafNode()){var t=e.val();xa("string"===typeof t||"number"===typeof t||"object"===typeof t&&$a(t,".sv"),"Priority must be a string or number.")}else xa(e===Cd||e.isEmpty(),"priority of unexpected type.");xa(e===Cd||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Rd=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.__childrenNodeConstructor.EMPTY_NODE;ua(this,e),this.value_=t,this.priorityNode_=n,this.lazyHash_=null,xa(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Pd(this.priorityNode_)}return ca(e,[{key:"isLeafNode",value:function(){return!0}},{key:"getPriority",value:function(){return this.priorityNode_}},{key:"updatePriority",value:function(t){return new e(this.value_,t)}},{key:"getImmediateChild",value:function(t){return".priority"===t?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE}},{key:"getChild",value:function(t){return sd(t)?this:".priority"===ed(t)?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE}},{key:"hasChild",value:function(){return!1}},{key:"getPredecessorChildName",value:function(e,t){return null}},{key:"updateImmediateChild",value:function(t,n){return".priority"===t?this.updatePriority(n):n.isEmpty()&&".priority"!==t?this:e.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.priorityNode_)}},{key:"updateChild",value:function(t,n){var r=ed(t);return null===r?n:n.isEmpty()&&".priority"!==r?this:(xa(".priority"!==r||1===td(t),".priority must be the last token in a path"),this.updateImmediateChild(r,e.__childrenNodeConstructor.EMPTY_NODE.updateChild(nd(t),n)))}},{key:"isEmpty",value:function(){return!1}},{key:"numChildren",value:function(){return 0}}
2,{key:"forEachChild",value:function(e,t){return!1}},{key:"val",value:function(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}},{key:"hash",value:function(){if(null===this.lazyHash_){var e="";this.priorityNode_.isEmpty()||(e+="priority:"+Od(this.priorityNode_.val())+":");var t=typeof this.value_;e+=t+":",e+="number"===t?kh(this.value_):this.value_,this.lazyHash_=rh(e)}return this.lazyHash_}},{key:"getValue",value:function(){return this.value_}},{key:"compareTo",value:function(t){return t===e.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof e.__childrenNodeConstructor?-1:(xa(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))}},{key:"compareToLeafNode_",value:function(t){var n=typeof t.value_,r=typeof this.value_,i=e.VALUE_TYPE_ORDER.indexOf(n),a=e.VALUE_TYPE_ORDER.indexOf(r);return xa(i>=0,"Unknown leaf type: "+n),xa(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:a-i}},{key:"withIndex",value:function(){return this}},{key:"isIndexed",value:function(){return!0}},{key:"equals",value:function(e){if(e===this)return!0;if(e.isLeafNode()){var t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1}}],[{key:"__childrenNodeConstructor",get:function(){return Nd},set:function(e){Nd=e}}]),e}();Rd.VALUE_TYPE_ORDER=["object","boolean","number","string"];var Dd,Fd,Ld=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"compare",value:function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?mh(e.name,t.name):i}},{key:"isDefinedOn",value:function(e){return!e.getPriority().isEmpty()}},{key:"indexedValueChanged",value:function(e,t){return!e.getPriority().equals(t.getPriority())}},{key:"minPost",value:function(){return gd.MIN}},{key:"maxPost",value:function(){return new gd(vh,new Rd("[PRIORITY-POST]",jd))}},{key:"makePost",value:function(e,t){var n=Ad(e);return new gd(t,new Rd("[PRIORITY-POST]",n))}},{key:"toString",value:function(){return".priority"}}]),n}(bd),Md=new Ld,Vd=Math.log(2),Bd=function(){function e(t){ua(this,e);var n;this.count=(n=t+1,parseInt(Math.log(n)/Vd,10)),this.current_=this.count-1;var r,i=(r=this.count,parseInt(Array(r+1).join("1"),2));this.bits_=t+1&i}return ca(e,[{key:"nextBitIsOne",value:function(){var e=!(this.bits_&1<<this.current_);return this.current_--,e}}]),e}(),zd=function(e,t,n,r){e.sort(t);var i=function t(r,i){var a,o,s=i-r;if(0===s)return null;if(1===s)return a=e[r],o=n?n(a):a,new _d(o,a.node,_d.BLACK,null,null);var u=parseInt(s/2,10)+r,l=t(r,u),c=t(u+1,i);return a=e[u],o=n?n(a):a,new _d(o,a.node,_d.BLACK,l,c)},a=function(t){for(var r=null,a=null,o=e.length,s=function(t,r){var a=o-t,s=o;o-=t;var l=i(a+1,s),c=e[a],f=n?n(c):c;u(new _d(f,c.node,r,null,l))},u=function(e){r?(r.left=e,r=e):(a=e,r=e)},l=0;l<t.count;++l){var c=t.nextBitIsOne(),f=Math.pow(2,t.count-(l+1));c?s(f,_d.BLACK):(s(f,_d.BLACK),s(f,_d.RED))}return a}(new Bd(e.length));return new Sd(r||t,a)},qd={},Ud=function(){function e(t,n){ua(this,e),this.indexes_=t,this.indexSet_=n}return ca(e,[{key:"get",value:function(e){var t=Xa(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t instanceof Sd?t:null}},{key:"hasIndex",value:function(e){return $a(this.indexSet_,e.toString())}},{key:"addIndex",value:function(t,n){xa(t!==xd,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],a=!1,o=n.getIterator(gd.Wrap),s=o.getNext();s;)a=a||t.isDefinedOn(s.node),i.push(s),s=o.getNext();r=a?zd(i,t.getCompare()):qd;var u=t.toString(),l=Object.assign({},this.indexSet_);l[u]=t;var c=Object.assign({},this.indexes_);return c[u]=r,new e(c,l)}},{key:"addToIndexes",value:function(t,n){var r=this;return new e(Za(this.indexes_,(function(e,i){var a=Xa(r.indexSet_,i);if(xa(a,"Missing index implementation for "+i),e===qd){if(a.isDefinedOn(t.node)){for(var o=[],s=n.getIterator(gd.Wrap),u=s.getNext();u;)u.name!==t.name&&o.push(u),u=s.getNext();return o.push(t),zd(o,a.getCompare())}return qd}var l=n.get(t.name),c=e;return l&&(c=c.remove(new gd(t.name,l))),c.insert(t,t.node)})),this.indexSet_)}}
2,{key:"removeFromIndexes",value:function(t,n){return new e(Za(this.indexes_,(function(e){if(e===qd)return e;var r=n.get(t.name);return r?e.remove(new gd(t.name,r)):e})),this.indexSet_)}}],[{key:"Default",get:function(){return xa(qd&&Md,"ChildrenNode.ts has not been loaded"),Dd=Dd||new e({".priority":qd},{".priority":Md})}}]),e}(),Hd=function(){function e(t,n,r){ua(this,e),this.children_=t,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&Pd(this.priorityNode_),this.children_.isEmpty()&&xa(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return ca(e,[{key:"isLeafNode",value:function(){return!1}},{key:"getPriority",value:function(){return this.priorityNode_||Fd}},{key:"updatePriority",value:function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)}},{key:"getImmediateChild",value:function(e){if(".priority"===e)return this.getPriority();var t=this.children_.get(e);return null===t?Fd:t}},{key:"getChild",value:function(e){var t=ed(e);return null===t?this:this.getImmediateChild(t).getChild(nd(e))}},{key:"hasChild",value:function(e){return null!==this.children_.get(e)}},{key:"updateImmediateChild",value:function(t,n){if(xa(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r,i,a=new gd(t,n);n.isEmpty()?(r=this.children_.remove(t),i=this.indexMap_.removeFromIndexes(a,this.children_)):(r=this.children_.insert(t,n),i=this.indexMap_.addToIndexes(a,this.children_));var o=r.isEmpty()?Fd:this.priorityNode_;return new e(r,o,i)}},{key:"updateChild",value:function(e,t){var n=ed(e);if(null===n)return t;xa(".priority"!==ed(e)||1===td(e),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(nd(e),t);return this.updateImmediateChild(n,r)}},{key:"isEmpty",value:function(){return this.children_.isEmpty()}},{key:"numChildren",value:function(){return this.children_.count()}},{key:"val",value:function(t){if(this.isEmpty())return null;var n={},r=0,i=0,a=!0;if(this.forEachChild(Md,(function(o,s){n[o]=s.val(t),r++,a&&e.INTEGER_REGEXP_.test(o)?i=Math.max(i,Number(o)):a=!1})),!t&&a&&i<2*r){var o=[];for(var s in n)o[s]=n[s];return o}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n}},{key:"hash",value:function(){if(null===this.lazyHash_){var e="";this.getPriority().isEmpty()||(e+="priority:"+Od(this.getPriority().val())+":"),this.forEachChild(Md,(function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":rh(e)}return this.lazyHash_}},{key:"getPredecessorChildName",value:function(e,t,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new gd(e,t));return i?i.name:null}return this.children_.getPredecessorKey(e)}},{key:"getFirstChildName",value:function(e){var t=this.resolveIndex_(e);if(t){var n=t.minKey();return n&&n.name}return this.children_.minKey()}},{key:"getFirstChild",value:function(e){var t=this.getFirstChildName(e);return t?new gd(t,this.children_.get(t)):null}},{key:"getLastChildName",value:function(e){var t=this.resolveIndex_(e);if(t){var n=t.maxKey();return n&&n.name}return this.children_.maxKey()}},{key:"getLastChild",value:function(e){var t=this.getLastChildName(e);return t?new gd(t,this.children_.get(t)):null}},{key:"forEachChild",value:function(e,t){var n=this.resolveIndex_(e);return n?n.inorderTraversal((function(e){return t(e.name,e.node)})):this.children_.inorderTraversal(t)}},{key:"getIterator",value:function(e){return this.getIteratorFrom(e.minPost(),e)}},{key:"getIteratorFrom",value:function(e,t){var n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getIteratorFrom(e.name,gd.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r}},{key:"getReverseIterator",value:function(e){return this.getReverseIteratorFrom(e.maxPost(),e)}},{key:"getReverseIteratorFrom",value:function(e,t){var n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getReverseIteratorFrom(e.name,gd.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r}},{key:"compareTo",value:function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===Wd?-1:0}},{key:"withIndex",value:function(t){if(t===xd||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)}},{key:"isIndexed",value:function(e){return e===xd||this.indexMap_.hasIndex(e)}},{key:"equals",value:function(e){if(e===this)return!0;
2if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){for(var n=this.getIterator(Md),r=t.getIterator(Md),i=n.getNext(),a=r.getNext();i&&a;){if(i.name!==a.name||!i.node.equals(a.node))return!1;i=n.getNext(),a=r.getNext()}return null===i&&null===a}return!1}return!1}},{key:"resolveIndex_",value:function(e){return e===xd?null:this.indexMap_.get(e.toString())}}],[{key:"EMPTY_NODE",get:function(){return Fd||(Fd=new e(new Sd(Id),null,Ud.Default))}}]),e}();Hd.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;var Wd=new(function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.call(this,new Sd(Id),Hd.EMPTY_NODE,Ud.Default)}return ca(n,[{key:"compareTo",value:function(e){return e===this?0:1}},{key:"equals",value:function(e){return e===this}},{key:"getPriority",value:function(){return this}},{key:"getImmediateChild",value:function(e){return Hd.EMPTY_NODE}},{key:"isEmpty",value:function(){return!1}}]),n}(Hd));Object.defineProperties(gd,{MIN:{value:new gd(ph,Hd.EMPTY_NODE)},MAX:{value:new gd(vh,Wd)}}),wd.__EMPTY_NODE=Hd.EMPTY_NODE,Rd.__childrenNodeConstructor=Hd,Cd=Wd,function(e){jd=e}(Wd);function Kd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null===e)return Hd.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),xa(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e){var n=e;return new Rd(n,Kd(t))}if(e instanceof Array){var r=Hd.EMPTY_NODE;return xh(e,(function(t,n){if($a(e,t)&&"."!==t.substring(0,1)){var i=Kd(n);!i.isLeafNode()&&i.isEmpty()||(r=r.updateImmediateChild(t,i))}})),r.updatePriority(Kd(t))}var i=[],a=!1,o=e;if(xh(o,(function(e,t){if("."!==e.substring(0,1)){var n=Kd(t);n.isEmpty()||(a=a||!n.getPriority().isEmpty(),i.push(new gd(e,n)))}})),0===i.length)return Hd.EMPTY_NODE;var s=zd(i,Td,(function(e){return e.name}),Id);if(a){var u=zd(i,Md.getCompare());return new Hd(s,Kd(t),new Ud({".priority":u},{".priority":Md}))}return new Hd(s,Kd(t),Ud.Default)}!function(e){Ad=e}(Kd);var Gd=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this)).indexPath_=e,xa(!sd(e)&&".priority"!==ed(e),"Can't create PathIndex with empty path or .priority key"),r}return ca(n,[{key:"extractChild",value:function(e){return e.getChild(this.indexPath_)}},{key:"isDefinedOn",value:function(e){return!e.getChild(this.indexPath_).isEmpty()}},{key:"compare",value:function(e,t){var n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?mh(e.name,t.name):i}},{key:"makePost",value:function(e,t){var n=Kd(e),r=Hd.EMPTY_NODE.updateChild(this.indexPath_,n);return new gd(t,r)}},{key:"maxPost",value:function(){var e=Hd.EMPTY_NODE.updateChild(this.indexPath_,Wd);return new gd(vh,e)}},{key:"toString",value:function(){return id(this.indexPath_,0).join("/")}}]),n}(bd),Yd=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"compare",value:function(e,t){var n=e.node.compareTo(t.node);return 0===n?mh(e.name,t.name):n}},{key:"isDefinedOn",value:function(e){return!0}},{key:"indexedValueChanged",value:function(e,t){return!e.equals(t)}},{key:"minPost",value:function(){return gd.MIN}},{key:"maxPost",value:function(){return gd.MAX}},{key:"makePost",value:function(e,t){var n=Kd(e);return new gd(t,n)}},{key:"toString",value:function(){return".value"}}]),n}(bd),Qd=new Yd;function $d(e){return{type:"value",snapshotNode:e}}function Xd(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function Jd(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function Zd(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}var ep=function(){function e(t){ua(this,e),this.index_=t}return ca(e,[{key:"updateChild",value:function(e,t,n,r,i,a){xa(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");var o=e.getImmediateChild(t);return o.getChild(r).equals(n.getChild(r))&&o.isEmpty()===n.isEmpty()?e:(null!=a&&(n.isEmpty()?e.hasChild(t)?a.trackChildChange(Jd(t,o)):xa(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):o.isEmpty()?a.trackChildChange(Xd(t,n)):a.trackChildChange(Zd(t,n,o))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))}},{key:"updateFullNode",value:function(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(Md,(function(e,r){t.hasChild(e)||n.trackChildChange(Jd(e,r))})),t.isLeafNode()||t.forEachChild(Md,(function(t,r){if(e.hasChild(t)){var i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(Zd(t,r,i))}else n.trackChildChange(Xd(t,r))}))),t.withIndex(this.index_)}},{key:"updatePriority",value:function(e,t){return e.isEmpty()?Hd.EMPTY_NODE:e.updatePriority(t)}},{key:"filtersNodes",value:function(){return!1}},{key:"getIndexedFilter",value:function(){return this}},{key:"getIndex",value:function(){return this.index_}}]),e}(),tp=function(){function e(t){ua(this,e),this.indexedFilter_=ne
2w ep(t.getIndex()),this.index_=t.getIndex(),this.startPost_=e.getStartPost_(t),this.endPost_=e.getEndPost_(t),this.startIsInclusive_=!t.startAfterSet_,this.endIsInclusive_=!t.endBeforeSet_}return ca(e,[{key:"getStartPost",value:function(){return this.startPost_}},{key:"getEndPost",value:function(){return this.endPost_}},{key:"matches",value:function(e){var t=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,n=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return t&&n}},{key:"updateChild",value:function(e,t,n,r,i,a){return this.matches(new gd(t,n))||(n=Hd.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,a)}},{key:"updateFullNode",value:function(e,t,n){t.isLeafNode()&&(t=Hd.EMPTY_NODE);var r=t.withIndex(this.index_);r=r.updatePriority(Hd.EMPTY_NODE);var i=this;return t.forEachChild(Md,(function(e,t){i.matches(new gd(e,t))||(r=r.updateImmediateChild(e,Hd.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)}},{key:"updatePriority",value:function(e,t){return e}},{key:"filtersNodes",value:function(){return!0}},{key:"getIndexedFilter",value:function(){return this.indexedFilter_}},{key:"getIndex",value:function(){return this.index_}}],[{key:"getStartPost_",value:function(e){if(e.hasStart()){var t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()}},{key:"getEndPost_",value:function(e){if(e.hasEnd()){var t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()}}]),e}(),np=function(){function e(t){var n=this;ua(this,e),this.withinDirectionalStart=function(e){return n.reverse_?n.withinEndPost(e):n.withinStartPost(e)},this.withinDirectionalEnd=function(e){return n.reverse_?n.withinStartPost(e):n.withinEndPost(e)},this.withinStartPost=function(e){var t=n.index_.compare(n.rangedFilter_.getStartPost(),e);return n.startIsInclusive_?t<=0:t<0},this.withinEndPost=function(e){var t=n.index_.compare(e,n.rangedFilter_.getEndPost());return n.endIsInclusive_?t<=0:t<0},this.rangedFilter_=new tp(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft(),this.startIsInclusive_=!t.startAfterSet_,this.endIsInclusive_=!t.endBeforeSet_}return ca(e,[{key:"updateChild",value:function(e,t,n,r,i,a){return this.rangedFilter_.matches(new gd(t,n))||(n=Hd.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,a):this.fullLimitUpdateChild_(e,t,n,i,a)}},{key:"updateFullNode",value:function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=Hd.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){var i;r=Hd.EMPTY_NODE.withIndex(this.index_),i=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var a=0;i.hasNext()&&a<this.limit_;){var o=i.getNext();if(this.withinDirectionalStart(o)){if(!this.withinDirectionalEnd(o))break;r=r.updateImmediateChild(o.name,o.node),a++}}}else{var s;r=(r=t.withIndex(this.index_)).updatePriority(Hd.EMPTY_NODE),s=this.reverse_?r.getReverseIterator(this.index_):r.getIterator(this.index_);for(var u=0;s.hasNext();){var l=s.getNext();u<this.limit_&&this.withinDirectionalStart(l)&&this.withinDirectionalEnd(l)?u++:r=r.updateImmediateChild(l.name,Hd.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)}},{key:"updatePriority",value:function(e,t){return e}},{key:"filtersNodes",value:function(){return!0}},{key:"getIndexedFilter",value:function(){return this.rangedFilter_.getIndexedFilter()}},{key:"getIndex",value:function(){return this.index_}},{key:"fullLimitUpdateChild_",value:function(e,t,n,r,i){var a;if(this.reverse_){var o=this.index_.getCompare();a=function(e,t){return o(t,e)}}else a=this.index_.getCompare();var s=e;xa(s.numChildren()===this.limit_,"");var u=new gd(t,n),l=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),c=this.rangedFilter_.matches(u);if(s.hasChild(t)){for(var f=s.getImmediateChild(t),h=r.getChildAfterChild(this.index_,l,this.reverse_);null!=h&&(h.name===t||s.hasChild(h.name));)h=r.getChildAfterChild(this.index_,h,this.reverse_);var d=null==h?1:a(h,u);if(c&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(Zd(t,n,f)),s.updateImmediateChild(t,n);null!=i&&i.trackChildChange(Jd(t,f));var p=s.updateImmediateChild(t,Hd.EMPTY_NODE);return null!=h&&this.rangedFilter_.matches(h)?(null!=i&&i.trackChildChange(Xd(h.name,h.node)),p.updateImmediateChild(h.name,h.node)):p}return n.isEmpty()?e:c&&a(l,u)>=0?(null!=i&&(i.trackChildChange(Jd(l.name,l.node)),i.trackChildChange(Xd(t,n))),s.updateImmediateChild(t,n).updateImmediateChild(l.name,Hd.EMPTY_NODE)):e}}]),e}(),rp=function(){function e(){ua(this,e),this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Md}return ca(e,[{key:"hasStart",value:function(){return this.startSet_}},{key:"isViewFromLeft",value:function(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}},{key:"getIndexStartValue",value:function(){return xa(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}},{key:"getIndexStartName",value:function(){return xa(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:ph}},{key:"hasEnd",value:function(){return this.endSet_}},{key:"getIndexEndValue",value:function(){return xa(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}},{key:"getIndexEndName",value:function(){return xa(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:vh}},{key:"hasLimit",value:function(){return this.limitSet_}},{key:"hasAnchoredLimit",value:function(){return this.limitSet_&&""!==this.viewFrom_}},{key:"getLimit",value:function(){return xa(this.limitSet_,"Only valid if limit has been set"),this.limit_}},{key:"getIndex",value:function(){return this.index_}},{key:"loadsAllData",value:function(){return!(this.startSet_||this.endSet_||this.limitSet_)}},{key:"isDefault",value:function(){return this.loadsAllData()&&this.index_===Md}},{key:"copy",value:function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.startAfterSet_=this.startAfterSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.endBeforeSet_=this.endBeforeSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_
2=this.index_,t.viewFrom_=this.viewFrom_,t}}]),e}();function ip(e){var t,n={};if(e.isDefault())return n;if(e.index_===Md?t="$priority":e.index_===Qd?t="$value":e.index_===xd?t="$key":(xa(e.index_ instanceof Gd,"Unrecognized index type!"),t=e.index_.toString()),n.orderBy=Ya(t),e.startSet_){var r=e.startAfterSet_?"startAfter":"startAt";n[r]=Ya(e.indexStartValue_),e.startNameSet_&&(n[r]+=","+Ya(e.indexStartName_))}if(e.endSet_){var i=e.endBeforeSet_?"endBefore":"endAt";n[i]=Ya(e.indexEndValue_),e.endNameSet_&&(n[i]+=","+Ya(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?n.limitToFirst=e.limit_:n.limitToLast=e.limit_),n}function ap(e){var t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;var n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==Md&&(t.i=e.index_.toString()),t}var op=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a){var o;return ua(this,n),(o=t.call(this)).repoInfo_=e,o.onDataUpdate_=r,o.authTokenProvider_=i,o.appCheckTokenProvider_=a,o.log_=lh("p:rest:"),o.listens_={},o}return ca(n,[{key:"reportStats",value:function(e){throw new Error("Method not implemented.")}},{key:"listen",value:function(e,t,r,i){var a=this,o=e._path.toString();this.log_("Listen called for "+o+" "+e._queryIdentifier);var s=n.getListenId_(e,r),u={};this.listens_[s]=u;var l=ip(e._queryParams);this.restRequest_(o+".json",l,(function(e,t){var n=t;(404===e&&(n=null,e=null),null===e&&a.onDataUpdate_(o,n,!1,r),Xa(a.listens_,s)===u)&&i(e?401===e?"permission_denied":"rest_error:"+e:"ok",null)}))}},{key:"unlisten",value:function(e,t){var r=n.getListenId_(e,t);delete this.listens_[r]}},{key:"get",value:function(e){var t=this,n=ip(e._queryParams),r=e._path.toString(),i=new Fa;return this.restRequest_(r+".json",n,(function(e,n){var a=n;404===e&&(a=null,e=null),null===e?(t.onDataUpdate_(r,a,!1,null),i.resolve(a)):i.reject(new Error(a))})),i.promise}},{key:"refreshAuthToken",value:function(e){}},{key:"restRequest_",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return n.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then((function(i){var a=u(i,2),o=a[0],s=a[1];o&&o.accessToken&&(n.auth=o.accessToken),s&&s.token&&(n.ac=s.token);var l=(t.repoInfo_.secure?"https://":"http://")+t.repoInfo_.host+e+"?ns="+t.repoInfo_.namespace+no(n);t.log_("Sending REST request for "+l);var c=new XMLHttpRequest;c.onreadystatechange=function(){if(r&&4===c.readyState){t.log_("REST Response for "+l+" received. status:",c.status,"response:",c.responseText);var e=null;if(c.status>=200&&c.status<300){try{e=Ga(c.responseText)}catch(AF){hh("Failed to parse JSON response for "+l+": "+c.responseText)}r(null,e)}else 401!==c.status&&404!==c.status&&hh("Got unsuccessful REST response for "+l+" Status: "+c.status),r(c.status);r=null}},c.open("GET",l,!0),c.send()}))}}],[{key:"getListenId_",value:function(e,t){return void 0!==t?"tag$"+t:(xa(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}}]),n}(Qh),sp=function(){function e(){ua(this,e),this.rootNode_=Hd.EMPTY_NODE}return ca(e,[{key:"getNode",value:function(e){return this.rootNode_.getChild(e)}},{key:"updateSnapshot",value:function(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}]),e}();function up(){return{value:null,children:new Map}}function lp(e,t,n){if(sd(t))e.value=n,e.children.clear();else if(null!==e.value)e.value=e.value.updateChild(t,n);else{var r=ed(t);e.children.has(r)||e.children.set(r,up()),lp(e.children.get(r),t=nd(t),n)}}function cp(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEach((function(e,n){t(n,e)}))}(e,(function(e,r){cp(r,new Jh(t.toString()+"/"+e),n)}))}var fp,hp=function(){function e(t){ua(this,e),this.collection_=t,this.last_=null}return ca(e,[{key:"get",value:function(){var e=this.collection_.get(),t=Object.assign({},e);return this.last_&&xh(this.last_,(function(e,n){t[e]=t[e]-n})),this.last_=e,t}}]),e}(),dp=function(){function e(t,n){ua(this,e),this.server_=n,this.statsToReport_={},this.statsListener_=new hp(t);var r=1e4+2e4*Math.random();Sh(this.reportStats_.bind(this),Math.floor(r))}return ca(e,[{key:"reportStats_",value:function(){var e=this,t=this.statsListener_.get(),n={},r=!1;xh(t,(function(t,i){i>0&&$a(e.statsToReport_,t)&&(n[t]=i,r=!0)})),r&&this.server_.reportStats(n),Sh(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}]),e}();function pp(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(fp||(fp={}));var vp,mp=function(){function e(t,n,r){ua(this,e),this.path=t,this.affectedTree=n,this.revert=r,this.type=fp.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}return ca(e,[{key:"operationForChild",value:function(t){if(sd(this.path)){if(null!=this.affectedTree.value)return xa(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new Jh(t));return new e(Zh(),n,this.revert)}return xa(ed(this.path)===t,"operationForChild called for unrelated child."),new e(nd(this.path),this.affectedTree,this.revert)}}]),e}(),yp=function(){function e(t,n){ua(this,e),this.source=t,this.path=n,this.type=fp.LISTEN_COMPLETE}return ca(e,[{key:"operationForChild",value:function(t){return sd(this.path)?new e(this.source,Zh()):new e(this.source,nd(this.path))}}]),e}(),gp=function(){function e(t,n,r){ua(this,e),this.source=t,this.path=n,this.snap=r,this.type=fp.OVERWRITE}return ca(e,[{key:"operationForChild",value:function(t){return sd(this.path)?new e(this.source,Zh(),this.snap.getImmediateChild(t)):new e(this.source,nd(this.path),this.snap)}}]),e}(),bp=function(){function e(t,n,r){ua(this,e),this.source=t,this.path=n,this.children=r,this.type=fp.MERGE}return ca(e,[{key:"operationForChild",value:function(t){if(sd(this.path)){var n=this.children.subtree(new Jh(t));return n.isEmpty()?null:n.value?new gp(this.source,Zh(),n.value):new e(this.source,Zh(),n)}return xa(ed(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,nd(this.path),this.children)}},{key:"toString",value:function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}]),e}(),wp=function(){function e(t,n,r){ua(this,e),this.node_=t,this.fullyInitialized_=n,this.filtered_=r}return ca(e,[{key:"isFullyInitialized",value:function(){return this.fullyInitialized_}},{key:"isFiltered",value:function(){return this.filtered_}},{key:"isCompleteForPath",value:function(e){if(sd(e))return this.isFullyInitialized()&&!this.filtered_;var t=ed(e);return this.isCompleteForChild(t)}},{key:"isCompleteForChild",value:function(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}},{key:"getNode",value:function(){return this.node_}}]),e}(),xp=ca((function e(t){ua(this,e),this.query_=t,this.index_=this.query_._queryParams.getIndex()}));function kp(e,t,n,r,i,a){var o=r.filter((function(e){return e.type===n}));o.sort((function(t,n){return function(e,t,n){if(null==t.childName||null==n.childName)throw ka("Should only compare child_ events.");var r=new gd(t.childName,t.snapshotNode),i=new gd(n.childName,n.snapshotNode);return e.index_.compare(r,i)}
2(e,t,n)})),o.forEach((function(n){var r=function(e,t,n){return"value"===t.type||"child_removed"===t.type||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}(e,n,a);i.forEach((function(i){i.respondsTo(n.type)&&t.push(i.createEvent(r,e.query_))}))}))}function _p(e,t){return{eventCache:e,serverCache:t}}function Cp(e,t,n,r){return _p(new wp(t,n,r),e.serverCache)}function Ep(e,t,n,r){return _p(e.eventCache,new wp(t,n,r))}function Sp(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function Tp(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}var Ip=function(){return vp||(vp=new Sd(yh)),vp},Np=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ip();ua(this,e),this.value=t,this.children=n}return ca(e,[{key:"isEmpty",value:function(){return null===this.value&&this.children.isEmpty()}},{key:"findRootMostMatchingPathAndValue",value:function(e,t){if(null!=this.value&&t(this.value))return{path:Zh(),value:this.value};if(sd(e))return null;var n=ed(e),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(nd(e),t);return null!=i?{path:od(new Jh(n),i.path),value:i.value}:null}return null}},{key:"findRootMostValueAndPath",value:function(e){return this.findRootMostMatchingPathAndValue(e,(function(){return!0}))}},{key:"subtree",value:function(t){if(sd(t))return this;var n=ed(t),r=this.children.get(n);return null!==r?r.subtree(nd(t)):new e(null)}},{key:"set",value:function(t,n){if(sd(t))return new e(n,this.children);var r=ed(t),i=(this.children.get(r)||new e(null)).set(nd(t),n),a=this.children.insert(r,i);return new e(this.value,a)}},{key:"remove",value:function(t){if(sd(t))return this.children.isEmpty()?new e(null):new e(null,this.children);var n=ed(t),r=this.children.get(n);if(r){var i,a=r.remove(nd(t));return i=a.isEmpty()?this.children.remove(n):this.children.insert(n,a),null===this.value&&i.isEmpty()?new e(null):new e(this.value,i)}return this}},{key:"get",value:function(e){if(sd(e))return this.value;var t=ed(e),n=this.children.get(t);return n?n.get(nd(e)):null}},{key:"setTree",value:function(t,n){if(sd(t))return n;var r,i=ed(t),a=(this.children.get(i)||new e(null)).setTree(nd(t),n);return r=a.isEmpty()?this.children.remove(i):this.children.insert(i,a),new e(this.value,r)}},{key:"fold",value:function(e){return this.fold_(Zh(),e)}},{key:"fold_",value:function(e,t){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(od(e,r),t)})),t(e,this.value,n)}},{key:"findOnPath",value:function(e,t){return this.findOnPath_(e,Zh(),t)}},{key:"findOnPath_",value:function(e,t,n){var r=!!this.value&&n(t,this.value);if(r)return r;if(sd(e))return null;var i=ed(e),a=this.children.get(i);return a?a.findOnPath_(nd(e),od(t,i),n):null}},{key:"foreachOnPath",value:function(e,t){return this.foreachOnPath_(e,Zh(),t)}},{key:"foreachOnPath_",value:function(t,n,r){if(sd(t))return this;this.value&&r(n,this.value);var i=ed(t),a=this.children.get(i);return a?a.foreachOnPath_(nd(t),od(n,i),r):new e(null)}},{key:"foreach",value:function(e){this.foreach_(Zh(),e)}},{key:"foreach_",value:function(e,t){this.children.inorderTraversal((function(n,r){r.foreach_(od(e,n),t)})),this.value&&t(e,this.value)}},{key:"foreachChild",value:function(e){this.children.inorderTraversal((function(t,n){n.value&&e(t,n.value)}))}}],[{key:"fromObject",value:function(t){var n=new e(null);return xh(t,(function(e,t){n=n.set(new Jh(e),t)})),n}}]),e}(),Ap=function(){function e(t){ua(this,e),this.writeTree_=t}return ca(e,null,[{key:"empty",value:function(){return new e(new Np(null))}}]),e}();
2function jp(e,t,n){if(sd(t))return new Ap(new Np(n));var r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){var i=r.path,a=r.value,o=ud(i,t);return a=a.updateChild(o,n),new Ap(e.writeTree_.set(i,a))}var s=new Np(n),u=e.writeTree_.setTree(t,s);return new Ap(u)}function Op(e,t,n){var r=e;return xh(n,(function(e,n){r=jp(r,od(t,e),n)})),r}function Pp(e,t){if(sd(t))return Ap.empty();var n=e.writeTree_.setTree(t,new Np(null));return new Ap(n)}function Rp(e,t){return null!=Dp(e,t)}function Dp(e,t){var n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(ud(n.path,t)):null}function Fp(e){var t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(Md,(function(e,n){t.push(new gd(e,n))})):e.writeTree_.children.inorderTraversal((function(e,n){null!=n.value&&t.push(new gd(e,n.value))})),t}function Lp(e,t){if(sd(t))return e;var n=Dp(e,t);return new Ap(null!=n?new Np(n):e.writeTree_.subtree(t))}function Mp(e){return e.writeTree_.isEmpty()}function Vp(e,t){return Bp(Zh(),e.writeTree_,t)}function Bp(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);var r=null;return t.children.inorderTraversal((function(t,i){".priority"===t?(xa(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=Bp(od(e,t),i,n)})),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(od(e,".priority"),r)),n}function zp(e,t){return tv(t,e)}function qp(e,t){for(var n=0;n<e.allWrites.length;n++){var r=e.allWrites[n];if(r.writeId===t)return r}return null}function Up(e,t){var n=e.allWrites.findIndex((function(e){return e.writeId===t}));xa(n>=0,"removeWrite called with nonexistent writeId.");var r=e.allWrites[n];e.allWrites.splice(n,1);for(var i=r.visible,a=!1,o=e.allWrites.length-1;i&&o>=0;){var s=e.allWrites[o];s.visible&&(o>=n&&Hp(s,r.path)?i=!1:cd(r.path,s.path)&&(a=!0)),o--}if(i){if(a)return function(e){e.visibleWrites=Kp(e.allWrites,Wp,Zh()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}(e),!0;r.snap?e.visibleWrites=Pp(e.visibleWrites,r.path):xh(r.children,(function(t){e.visibleWrites=Pp(e.visibleWrites,od(r.path,t))}));return!0}return!1}function Hp(e,t){if(e.snap)return cd(e.path,t);for(var n in e.children)if(e.children.hasOwnProperty(n)&&cd(od(e.path,n),t))return!0;return!1}function Wp(e){return e.visible}function Kp(e,t,n){for(var r=Ap.empty(),i=0;i<e.length;++i){var a=e[i];if(t(a)){var o=a.path,s=void 0;if(a.snap)cd(n,o)?r=jp(r,s=ud(n,o),a.snap):cd(o,n)&&(s=ud(o,n),r=jp(r,Zh(),a.snap.getChild(s)));else{if(!a.children)throw ka("WriteRecord should have .snap or .children");if(cd(n,o))r=Op(r,s=ud(n,o),a.children);else if(cd(o,n))if(sd(s=ud(o,n)))r=Op(r,Zh(),a.children);else{var u=Xa(a.children,ed(s));if(u){var l=u.getChild(nd(s));r=jp(r,Zh(),l)}}}}}return r}function Gp(e,t,n,r,i){if(r||i){var a=Lp(e.visibleWrites,t);if(!i&&Mp(a))return n;if(i||null!=n||Rp(a,Zh())){return Vp(Kp(e.allWrites,(function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(cd(e.path,t)||cd(t,e.path))}),t),n||Hd.EMPTY_NODE)}return null}var o=Dp(e.visibleWrites,t);if(null!=o)return o;var s=Lp(e.visibleWrites,t);return Mp(s)?n:null!=n||Rp(s,Zh())?Vp(s,n||Hd.EMPTY_NODE):null}function Yp(e,t,n,r){return Gp(e.writeTree,e.treePath,t,n,r)}function Qp(e,t){return function(e,t,n){var r=Hd.EMPTY_NODE,i=Dp(e.visibleWrites,t);if(i)return i.isLeafNode()||i.forEachChild(Md,(function(e,t){r=r.updateImmediateChild(e,t)})),r;if(n){var a=Lp(e.visibleWrites,t);return n.forEachChild(Md,(function(e,t){var n=Vp(Lp(a,new Jh(e)),t);r=r.updateImmediateChild(e,n)})),Fp(a).forEach((function(e){r=r.updateImmediateChild(e.name,e.node)})),r}
2return Fp(Lp(e.visibleWrites,t)).forEach((function(e){r=r.updateImmediateChild(e.name,e.node)})),r}(e.writeTree,e.treePath,t)}function $p(e,t,n,r){return function(e,t,n,r,i){xa(r||i,"Either existingEventSnap or existingServerSnap must exist");var a=od(t,n);if(Rp(e.visibleWrites,a))return null;var o=Lp(e.visibleWrites,a);return Mp(o)?i.getChild(n):Vp(o,i.getChild(n))}(e.writeTree,e.treePath,t,n,r)}function Xp(e,t){return function(e,t){return Dp(e.visibleWrites,t)}(e.writeTree,od(e.treePath,t))}function Jp(e,t,n,r,i,a){return function(e,t,n,r,i,a,o){var s,u=Lp(e.visibleWrites,t),l=Dp(u,Zh());if(null!=l)s=l;else{if(null==n)return[];s=Vp(u,n)}if((s=s.withIndex(o)).isEmpty()||s.isLeafNode())return[];for(var c=[],f=o.getCompare(),h=a?s.getReverseIteratorFrom(r,o):s.getIteratorFrom(r,o),d=h.getNext();d&&c.length<i;)0!==f(d,r)&&c.push(d),d=h.getNext();return c}(e.writeTree,e.treePath,t,n,r,i,a)}function Zp(e,t,n){return function(e,t,n,r){var i=od(t,n),a=Dp(e.visibleWrites,i);return null!=a?a:r.isCompleteForChild(n)?Vp(Lp(e.visibleWrites,i),r.getNode().getImmediateChild(n)):null}(e.writeTree,e.treePath,t,n)}function ev(e,t){return tv(od(e.treePath,t),e.writeTree)}function tv(e,t){return{treePath:e,writeTree:t}}var nv=function(){function e(){ua(this,e),this.changeMap=new Map}return ca(e,[{key:"trackChildChange",value:function(e){var t=e.type,n=e.childName;xa("child_added"===t||"child_changed"===t||"child_removed"===t,"Only child changes supported for tracking"),xa(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if("child_added"===t&&"child_removed"===i)this.changeMap.set(n,Zd(n,e.snapshotNode,r.snapshotNode));else if("child_removed"===t&&"child_added"===i)this.changeMap.delete(n);else if("child_removed"===t&&"child_changed"===i)this.changeMap.set(n,Jd(n,r.oldSnap));else if("child_changed"===t&&"child_added"===i)this.changeMap.set(n,Xd(n,e.snapshotNode));else{if("child_changed"!==t||"child_changed"!==i)throw ka("Illegal combination of changes: "+e+" occurred after "+r);this.changeMap.set(n,Zd(n,e.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,e)}},{key:"getChanges",value:function(){return Array.from(this.changeMap.values())}}]),e}(),rv=new(function(){function e(){ua(this,e)}return ca(e,[{key:"getCompleteChild",value:function(e){return null}},{key:"getChildAfterChild",value:function(e,t,n){return null}}]),e}()),iv=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;ua(this,e),this.writes_=t,this.viewCache_=n,this.optCompleteServerCache_=r}return ca(e,[{key:"getCompleteChild",value:function(e){var t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.optCompleteServerCache_?new wp(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return Zp(this.writes_,e,n)}},{key:"getChildAfterChild",value:function(e,t,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:Tp(this.viewCache_),i=Jp(this.writes_,r,t,1,n,e);return 0===i.length?null:i[0]}}]),e}();function av(e,t,n,r,i){var a,o,s=new nv;if(n.type===fp.OVERWRITE){var u=n;u.source.fromUser?a=uv(e,t,u.path,u.snap,r,i,s):(xa(u.source.fromServer,"Unknown source."),o=u.source.tagged||t.serverCache.isFiltered()&&!sd(u.path),a=sv(e,t,u.path,u.snap,r,i,o,s))}else if(n.type===fp.MERGE){var l=n;l.source.fromUser?a=function(e,t,n,r,i,a,o){var s=t;return r.foreach((function(r,u){var l=od(n,r);lv(t,ed(l))&&(s=uv(e,s,l,u,i,a,o))})),r.foreach((function(r,u){var l=od(n,r);lv(t,ed(l))||(s=uv(e,s,l,u,i,a,o))})),s}(e,t,l.path,l.children,r,i,s):(xa(l.source.fromServer,"Unknown source."),o=l.source.tagged||t.serverCache.isFiltered(),a=fv(e,t,l.path,l.children,r,i,o,s))}else if(n.type===fp.ACK_USER_WRITE){var c=n;a=c.revert?function(e,t,n,r,i,a){var o;if(null!=Xp(r,n))return t;var s,u=new iv(r,t,i),l=t.eventCache.getNode();if(sd(n)||".priority"===ed(n)){var c;if(t.serverCache.isFullyInitialized())c=Yp(r,Tp(t));else{var f=t.serverCache.getNode();xa(f instanceof Hd,"serverChildren would be complete if leaf node"),c=Qp(r,f)}s=e.filter.updateFullNode(l,c,a)}else{var h=ed(n),d=Zp(r,h,t.serverCache);null==d&&t.serverCache.isCompleteForChild(h)&&(d=l.getImmediateChild(h)),(s=null!=d?e.filter.updateChild(l,h,d,nd(n),u,a):t.eventCache.getNode().hasChild(h)?e.filter.updateChild(l,h,Hd.EMPTY_NODE,nd(n),u,a):l).isEmpty()&&t.serverCache.isFullyInitialized()&&(o=Yp(r,Tp(t))).isLeafNode()&&(s=e.filter.updateFullNode(s,o,a))}return o=t.serverCache.isFullyInitialized()||null!=Xp(r,Zh()),Cp(t,s,o,e.filter.filtersNodes())}(e,t,c.path,r,i,s):function(e,t,n,r,i,a,o){if(null!=Xp(i,n))return t;var s=t.serverCache.isFiltered(),u=t.serverCache;
2if(null!=r.value){if(sd(n)&&u.isFullyInitialized()||u.isCompleteForPath(n))return sv(e,t,n,u.getNode().getChild(n),i,a,s,o);if(sd(n)){var l=new Np(null);return u.getNode().forEachChild(xd,(function(e,t){l=l.set(new Jh(e),t)})),fv(e,t,n,l,i,a,s,o)}return t}var c=new Np(null);return r.foreach((function(e,t){var r=od(n,e);u.isCompleteForPath(r)&&(c=c.set(e,u.getNode().getChild(r)))})),fv(e,t,n,c,i,a,s,o)}(e,t,c.path,c.affectedTree,r,i,s)}else{if(n.type!==fp.LISTEN_COMPLETE)throw ka("Unknown operation type: "+n.type);a=function(e,t,n,r,i){var a=t.serverCache,o=Ep(t,a.getNode(),a.isFullyInitialized()||sd(n),a.isFiltered());return ov(e,o,n,r,rv,i)}(e,t,n.path,r,s)}var f=s.getChanges();return function(e,t,n){var r=t.eventCache;if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),a=Sp(e);(n.length>0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(a)||!r.getNode().getPriority().equals(a.getPriority()))&&n.push($d(Sp(t)))}}(t,a,f),{viewCache:a,changes:f}}function ov(e,t,n,r,i,a){var o,s,u=t.eventCache;if(null!=Xp(r,n))return t;if(sd(n))if(xa(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){var l=Tp(t),c=Qp(r,l instanceof Hd?l:Hd.EMPTY_NODE);o=e.filter.updateFullNode(t.eventCache.getNode(),c,a)}else{var f=Yp(r,Tp(t));o=e.filter.updateFullNode(t.eventCache.getNode(),f,a)}else{var h=ed(n);if(".priority"===h){xa(1===td(n),"Can't have a priority with additional path components");var d=u.getNode(),p=$p(r,n,d,s=t.serverCache.getNode());o=null!=p?e.filter.updatePriority(d,p):u.getNode()}else{var v,m=nd(n);if(u.isCompleteForChild(h)){s=t.serverCache.getNode();var y=$p(r,n,u.getNode(),s);v=null!=y?u.getNode().getImmediateChild(h).updateChild(m,y):u.getNode().getImmediateChild(h)}else v=Zp(r,h,t.serverCache);o=null!=v?e.filter.updateChild(u.getNode(),h,v,m,i,a):u.getNode()}}return Cp(t,o,u.isFullyInitialized()||sd(n),e.filter.filtersNodes())}function sv(e,t,n,r,i,a,o,s){var u,l=t.serverCache,c=o?e.filter:e.filter.getIndexedFilter();if(sd(n))u=c.updateFullNode(l.getNode(),r,null);else if(c.filtersNodes()&&!l.isFiltered()){var f=l.getNode().updateChild(n,r);u=c.updateFullNode(l.getNode(),f,null)}else{var h=ed(n);if(!l.isCompleteForPath(n)&&td(n)>1)return t;var d=nd(n),p=l.getNode().getImmediateChild(h).updateChild(d,r);u=".priority"===h?c.updatePriority(l.getNode(),p):c.updateChild(l.getNode(),h,p,d,rv,null)}var v=Ep(t,u,l.isFullyInitialized()||sd(n),c.filtersNodes());return ov(e,v,n,i,new iv(i,v,a),s)}function uv(e,t,n,r,i,a,o){var s,u,l=t.eventCache,c=new iv(i,t,a);if(sd(n))u=e.filter.updateFullNode(t.eventCache.getNode(),r,o),s=Cp(t,u,!0,e.filter.filtersNodes());else{var f=ed(n);if(".priority"===f)u=e.filter.updatePriority(t.eventCache.getNode(),r),s=Cp(t,u,l.isFullyInitialized(),l.isFiltered());else{var h,d=nd(n),p=l.getNode().getImmediateChild(f);if(sd(d))h=r;else{var v=c.getCompleteChild(f);h=null!=v?".priority"===rd(d)&&v.getChild(ad(d)).isEmpty()?v:v.updateChild(d,r):Hd.EMPTY_NODE}if(p.equals(h))s=t;else s=Cp(t,e.filter.updateChild(l.getNode(),f,h,d,c,o),l.isFullyInitialized(),e.filter.filtersNodes())}}return s}function lv(e,t){return e.eventCache.isCompleteForChild(t)}function cv(e,t,n){return n.foreach((function(e,n){t=t.updateChild(e,n)})),t}function fv(e,t,n,r,i,a,o,s){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;var u,l=t;u=sd(n)?r:new Np(null).setTree(n,r);var c=t.serverCache.getNode();return u.children.inorderTraversal((function(n,r){if(c.hasChild(n)){var u=cv(0,t.serverCache.getNode().getImmediateChild(n),r);l=sv(e,l,new Jh(n),u,i,a,o,s)}})),u.children.inorderTraversal((function(n,r){var u=!t.serverCache.isCompleteForChild(n)&&null===r.value;if(!c.hasChild(n)&&!u){var f=cv(0,t.serverCache.getNode().getImmediateChild(n),r);l=sv(e,l,new Jh(n),f,i,a,o,s)}})),l}var hv,dv=function(){function e(t,n){ua(this,e),this.query_=t,this.eventRegistrations_=[];var r,i=this.query_._queryParams,a=new ep(i.getIndex()),o=(r=i).loadsAllData()?new ep(r.getIndex()):r.hasLimit()?new np(r):new tp(r);this.processor_=function(e){return{filter:e}}(o);var s=n.serverCache,u=n.eventCache,l=a.updateFullNode(Hd.EMPTY_NODE,s.getNode(),null),c=o.updateFullNode(Hd.EMPTY_NODE,u.getNode(),null),f=new wp(l,s.isFullyInitialized(),a.filtersNodes()),h=new wp(c,u.isFullyInitialized(),o.filtersNodes());this.viewCache_=_p(h,f),this.eventGenerator_=new xp(this.query_)}return ca(e,[{key:"query",get:function(){return this.query_}}]),e}();function pv(e,t){var n=Tp(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!sd(t)&&!n.getImmediateChild(ed(t)).isEmpty())?n.getChild(t):null}function vv(e){return 0===e.eventRegistrations_.length}function mv(e,t,n){var r=[];if(n){xa(null==t,"A cancel should cancel all event registrations.");var i=e.query._path;e.eventRegistrations_.forEach((function(e){var t=e.createCancelEvent(n,i);t&&r.push(t)}))}if(t){for(var a=[],o=0;o<e.eventRegistrations_.length;++o){var s=e.eventRegistrations_[o];if(s.matches(t)){if(t.hasAnyCallback()){a=a.concat(e.eventRegistrations_.slice(o+1));break}}else a.push(s)}e.eventRegistrations_=a}else e.eventRegistrations_=[];return r}function yv(e,t,n,r){t.type===fp.MERGE&&null!==t.source.queryId&&(xa(Tp(e.viewCache_),"We should always have a full c
2ache before handling merges"),xa(Sp(e.viewCache_),"Missing event cache, even though we have a server cache"));var i,a,o=e.viewCache_,s=av(e.processor_,o,t,n,r);return i=e.processor_,a=s.viewCache,xa(a.eventCache.getNode().isIndexed(i.filter.getIndex()),"Event snap not indexed"),xa(a.serverCache.getNode().isIndexed(i.filter.getIndex()),"Server snap not indexed"),xa(s.viewCache.serverCache.isFullyInitialized()||!o.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=s.viewCache,gv(e,s.changes,s.viewCache.eventCache.getNode(),null)}function gv(e,t,n,r){var i=r?[r]:e.eventRegistrations_;return function(e,t,n,r){var i=[],a=[];return t.forEach((function(t){var n;"child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&a.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))})),kp(e,i,"child_removed",t,r,n),kp(e,i,"child_added",t,r,n),kp(e,i,"child_moved",a,r,n),kp(e,i,"child_changed",t,r,n),kp(e,i,"value",t,r,n),i}(e.eventGenerator_,t,n,i)}var bv,wv=ca((function e(){ua(this,e),this.views=new Map}));function xv(e){return 0===e.views.size}function kv(e,t,n,r){var i=t.source.queryId;if(null!==i){var a=e.views.get(i);return xa(null!=a,"SyncTree gave us an op for an invalid query."),yv(a,t,n,r)}var o,s=[],u=ya(e.views.values());try{for(u.s();!(o=u.n()).done;){var l=o.value;s=s.concat(yv(l,t,n,r))}}catch(c){u.e(c)}finally{u.f()}return s}function _v(e,t,n,r,i){var a=t._queryIdentifier,o=e.views.get(a);if(!o){var s=Yp(n,i?r:null),u=!1;s?u=!0:r instanceof Hd?(s=Qp(n,r),u=!1):(s=Hd.EMPTY_NODE,u=!1);var l=_p(new wp(s,u,!1),new wp(r,i,!1));return new dv(t,l)}return o}function Cv(e,t,n,r,i,a){var o=_v(e,t,r,i,a);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,o),function(e,t){e.eventRegistrations_.push(t)}(o,n),function(e,t){var n=e.viewCache_.eventCache,r=[];return n.getNode().isLeafNode()||n.getNode().forEachChild(Md,(function(e,t){r.push(Xd(e,t))})),n.isFullyInitialized()&&r.push($d(n.getNode())),gv(e,r,n.getNode(),t)}(o,n)}function Ev(e,t,n,r){var i=t._queryIdentifier,a=[],o=[],s=Av(e);if("default"===i){var l,c=ya(e.views.entries());try{for(c.s();!(l=c.n()).done;){var f=u(l.value,2),h=f[0],d=f[1];o=o.concat(mv(d,n,r)),vv(d)&&(e.views.delete(h),d.query._queryParams.loadsAllData()||a.push(d.query))}}catch(v){c.e(v)}finally{c.f()}}else{var p=e.views.get(i);p&&(o=o.concat(mv(p,n,r)),vv(p)&&(e.views.delete(i),p.query._queryParams.loadsAllData()||a.push(p.query)))}return s&&!Av(e)&&a.push(new(xa(hv,"Reference.ts has not been loaded"),hv)(t._repo,t._path)),{removed:a,events:o}}function Sv(e){var t,n=[],r=ya(e.views.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;i.query._queryParams.loadsAllData()||n.push(i)}}catch(a){r.e(a)}finally{r.f()}return n}function Tv(e,t){var n,r=null,i=ya(e.views.values());try{for(i.s();!(n=i.n()).done;){var a=n.value;r=r||pv(a,t)}}catch(o){i.e(o)}finally{i.f()}return r}function Iv(e,t){if(t._queryParams.loadsAllData())return jv(e);var n=t._queryIdentifier;return e.views.get(n)}function Nv(e,t){return null!=Iv(e,t)}function Av(e){return null!=jv(e)}function jv(e){var t,n=ya(e.views.values());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.query._queryParams.loadsAllData())return r}}catch(i){n.e(i)}finally{n.f()}return null}var Ov=1,Pv=ca((function e(t){ua(this,e),this.listenProvider_=t,this.syncPointTree_=new Np(null),this.pendingWriteTree_={visibleWrites:Ap.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}));function Rv(e,t,n,r,i){return function(e,t,n,r,i){xa(r>e.lastWriteId,"Stacking an older write on top of newer ones"),void 0===i&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=jp(e.visibleWrites,t,n)),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r,i),i?zv(e,new gp({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,n)):[]}function Dv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=qp(e.pendingWriteTree_,t),i=Up(e.pendingWriteTree_,t);if(i){var a=new Np(null);return null!=r.snap?a=a.set(Zh(),!0):xh(r.children,(function(e){a=a.set(new Jh(e),!0)})),zv(e,new mp(r.path,a,n))}return[]}function Fv(e,t,n){return zv(e,new gp({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))}function Lv(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=t._path,o=e.syncPointTree_.get(a),s=[];if(o&&("default"===t._queryIdentifier||Nv(o,t))){var u=Ev(o,t,n,r);xv(o)&&(e.syncPointTree_=e.syncPointTree_.remove(a));var l=u.removed;if(s=u.events,!i){var c=-1!==l.findIndex((function(e){return e._queryParams.loadsAllData()})),f=e.syncPointTree_.findOnPath(a,(function(e,t){return Av(t)}));if(c&&!f){var h=e.syncPointTree_.subtree(a);if(!h.isEmpty())for(var d=$v(h),p=0;p<d.length;++p){var v=d[p],m=v.query,y=Hv(e,v);
2e.listenProvider_.startListening(Xv(m),Wv(e,m),y.hashFn,y.onComplete)}}if(!f&&l.length>0&&!r)if(c){var g=null;e.listenProvider_.stopListening(Xv(t),g)}else l.forEach((function(t){var n=e.queryToTagMap.get(Kv(t));e.listenProvider_.stopListening(Xv(t),n)}))}Jv(e,l)}return s}function Mv(e,t,n,r){var i=Gv(e,r);if(null!=i){var a=Yv(i),o=a.path,s=a.queryId,u=ud(o,t);return Qv(e,o,new gp(pp(s),u,n))}return[]}function Vv(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t._path,a=null,o=!1;e.syncPointTree_.foreachOnPath(i,(function(e,t){var n=ud(e,i);a=a||Tv(t,n),o=o||Av(t)}));var s,u=e.syncPointTree_.get(i);if(u?(o=o||Av(u),a=a||Tv(u,Zh())):(u=new wv,e.syncPointTree_=e.syncPointTree_.set(i,u)),null!=a)s=!0;else{s=!1,a=Hd.EMPTY_NODE;var l=e.syncPointTree_.subtree(i);l.foreachChild((function(e,t){var n=Tv(t,Zh());n&&(a=a.updateImmediateChild(e,n))}))}var c=Nv(u,t);if(!c&&!t._queryParams.loadsAllData()){var f=Kv(t);xa(!e.queryToTagMap.has(f),"View does not exist, but we have a tag");var h=Zv();e.queryToTagMap.set(f,h),e.tagToQueryMap.set(h,f)}var d=zp(e.pendingWriteTree_,i),p=Cv(u,t,n,d,a,s);if(!c&&!o&&!r){var v=Iv(u,t);p=p.concat(em(e,t,v))}return p}function Bv(e,t,n){var r=e.pendingWriteTree_,i=e.syncPointTree_.findOnPath(t,(function(e,n){var r=Tv(n,ud(e,t));if(r)return r}));return Gp(r,t,i,n,!0)}function zv(e,t){return qv(t,e.syncPointTree_,null,zp(e.pendingWriteTree_,Zh()))}function qv(e,t,n,r){if(sd(e.path))return Uv(e,t,n,r);var i=t.get(Zh());null==n&&null!=i&&(n=Tv(i,Zh()));var a=[],o=ed(e.path),s=e.operationForChild(o),u=t.children.get(o);if(u&&s){var l=n?n.getImmediateChild(o):null,c=ev(r,o);a=a.concat(qv(s,u,l,c))}return i&&(a=a.concat(kv(i,e,r,n))),a}function Uv(e,t,n,r){var i=t.get(Zh());null==n&&null!=i&&(n=Tv(i,Zh()));var a=[];return t.children.inorderTraversal((function(t,i){var o=n?n.getImmediateChild(t):null,s=ev(r,t),u=e.operationForChild(t);u&&(a=a.concat(Uv(u,i,o,s)))})),i&&(a=a.concat(kv(i,e,r,n))),a}function Hv(e,t){var n=t.query,r=Wv(e,n);return{hashFn:function(){var e=function(e){return e.viewCache_.serverCache.getNode()}(t)||Hd.EMPTY_NODE;return e.hash()},onComplete:function(t){if("ok"===t)return r?function(e,t,n){var r=Gv(e,n);if(r){var i=Yv(r),a=i.path,o=i.queryId,s=ud(a,t);return Qv(e,a,new yp(pp(o),s))}return[]}(e,n._path,r):function(e,t){return zv(e,new yp({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))}(e,n._path);var i=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");var r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return Lv(e,n,null,i)}}}function Wv(e,t){var n=Kv(t);return e.queryToTagMap.get(n)}function Kv(e){return e._path.toString()+"$"+e._queryIdentifier}function Gv(e,t){return e.tagToQueryMap.get(t)}function Yv(e){var t=e.indexOf("$");return xa(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new Jh(e.substr(0,t))}}function Qv(e,t,n){var r=e.syncPointTree_.get(t);return xa(r,"Missing sync point for query tag that we're tracking"),kv(r,n,zp(e.pendingWriteTree_,t),null)}function $v(e){return e.fold((function(e,t,n){if(t&&Av(t))return[jv(t)];var r=[];return t&&(r=Sv(t)),xh(n,(function(e,t){r=r.concat(t)})),r}))}
2function Xv(e){return e._queryParams.loadsAllData()&&!e._queryParams.isDefault()?new(xa(bv,"Reference.ts has not been loaded"),bv)(e._repo,e._path):e}function Jv(e,t){for(var n=0;n<t.length;++n){var r=t[n];if(!r._queryParams.loadsAllData()){var i=Kv(r),a=e.queryToTagMap.get(i);e.queryToTagMap.delete(i),e.tagToQueryMap.delete(a)}}}function Zv(){return Ov++}function em(e,t,n){var r=t._path,i=Wv(e,t),a=Hv(e,n),o=e.listenProvider_.startListening(Xv(t),i,a.hashFn,a.onComplete),s=e.syncPointTree_.subtree(r);if(i)xa(!Av(s.value),"If we're adding a query, it shouldn't be shadowed");else for(var u=s.fold((function(e,t,n){if(!sd(e)&&t&&Av(t))return[jv(t).query];var r=[];return t&&(r=r.concat(Sv(t).map((function(e){return e.query})))),xh(n,(function(e,t){r=r.concat(t)})),r})),l=0;l<u.length;++l){var c=u[l];e.listenProvider_.stopListening(Xv(c),Wv(e,c))}return o}var tm=function(){function e(t){ua(this,e),this.node_=t}return ca(e,[{key:"getImmediateChild",value:function(t){return new e(this.node_.getImmediateChild(t))}},{key:"node",value:function(){return this.node_}}]),e}(),nm=function(){function e(t,n){ua(this,e),this.syncTree_=t,this.path_=n}return ca(e,[{key:"getImmediateChild",value:function(t){var n=od(this.path_,t);return new e(this.syncTree_,n)}},{key:"node",value:function(){return Bv(this.syncTree_,this.path_)}}]),e}(),rm=function(e,t,n){return e&&"object"===typeof e?(xa(".sv"in e,"Unexpected leaf node or priority contents"),"string"===typeof e[".sv"]?im(e[".sv"],t,n):"object"===typeof e[".sv"]?am(e[".sv"],t):void xa(!1,"Unexpected server value: "+JSON.stringify(e,null,2))):e},im=function(e,t,n){if("timestamp"===e)return n.timestamp;xa(!1,"Unexpected server value: "+e)},am=function(e,t,n){e.hasOwnProperty("increment")||xa(!1,"Unexpected server value: "+JSON.stringify(e,null,2));var r=e.increment;"number"!==typeof r&&xa(!1,"Unexpected increment value: "+r);var i=t.node();if(xa(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var a=i.getValue();return"number"!==typeof a?r:a+r},om=function(e,t,n,r){return um(t,new nm(n,e),r)},sm=function(e,t,n){return um(e,new tm(t),n)};function um(e,t,n){var r,i=e.getPriority().val(),a=rm(i,t.getImmediateChild(".priority"),n);if(e.isLeafNode()){var o=e,s=rm(o.getValue(),t,n);return s!==o.getValue()||a!==o.getPriority().val()?new Rd(s,Kd(a)):e}var u=e;return r=u,a!==u.getPriority().val()&&(r=r.updatePriority(new Rd(a))),u.forEachChild(Md,(function(e,i){var a=um(i,t.getImmediateChild(e),n);a!==i&&(r=r.updateImmediateChild(e,a))})),r}var lm=ca((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{children:{},childCount:0};ua(this,e),this.name=t,this.parent=n,this.node=r}));function cm(e,t){for(var n=t instanceof Jh?t:new Jh(t),r=e,i=ed(n);null!==i;){var a=Xa(r.node.children,i)||{children:{},childCount:0};r=new lm(i,r,a),i=ed(n=nd(n))}return r}function fm(e){return e.node.value}function hm(e,t){e.node.value=t,ym(e)}function dm(e){return e.node.childCount>0}function pm(e,t){xh(e.node.children,(function(n,r){t(new lm(n,e,r))}))}function vm(e,t,n,r){n&&!r&&t(e),pm(e,(function(e){vm(e,t,!0,r)})),n&&r&&t(e)}function mm(e){return new Jh(null===e.parent?e.name:mm(e.parent)+"/"+e.name)}function ym(e){null!==e.parent&&function(e,t,n){var r=function(e){return void 0===fm(e)&&!dm(e)}(n),i=$a(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,ym(e)):r||i||(e.node.children[t]=n.node,e.node.childCount++,ym(e))}(e.parent,e.name,e)}var gm=/[\[\].#$\/\u0000-\u001F\u007F]/,bm=/[\[\].#$\u0000-\u001F\u007F]/,wm=10485760,xm=function(e){return"string"===typeof e&&0!==e.length&&!gm.test(e)},km=function(e){return"string"===typeof e&&0!==e.length&&!bm.test(e)},_m=function e(t,n,r){var i=r instanceof Jh?new fd(r,t):r;if(void 0===n)throw new Error(t+"contains undefined "+dd(i));if("function"===typeof n)throw new Error(t+"contains a function "+dd(i)+" with contents = "+n.toString());if(dh(n))throw new Error(t+"contains "+n.toString()+" "+dd(i));if("string"===typeof n&&n.length>wm/3&&lo(n)>wm)throw new Error(t+"contains a string greater than "+"10485760 utf8 bytes "+dd(i)+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var a=!1,o=!1;if(xh(n,(function(n,r){if(".value"===n)a=!0;else if(".priority"!==n&&".sv"!==n&&(o=!0,!xm(n)))throw new Error(t+" contains an invali
2d key ("+n+") "+dd(i)+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');!function(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=lo(t),hd(e)}(i,n),e(t,r,i),function(e){var t=e.parts_.pop();e.byteLength_-=lo(t),e.parts_.length>0&&(e.byteLength_-=1)}(i)})),a&&o)throw new Error(t+' contains ".value" child '+dd(i)+" in addition to actual children.")}},Cm=function(e,t,n,r){if((!r||void 0!==n)&&!km(n))throw new Error(uo(e,t)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},Em=function(e,t){var n=t.path.toString();if("string"!==typeof t.repoInfo.host||0===t.repoInfo.host.length||!xm(t.repoInfo.namespace)&&"localhost"!==t.repoInfo.host.split(":")[0]||0!==n.length&&!function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),km(e)}(n))throw new Error(uo(e,"url")+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},Sm=ca((function e(){ua(this,e),this.eventLists_=[],this.recursionDepth_=0}));function Tm(e,t){for(var n=null,r=0;r<t.length;r++){var i=t[r],a=i.getPath();null===n||ld(a,n.path)||(e.eventLists_.push(n),n=null),null===n&&(n={events:[],path:a}),n.events.push(i)}n&&e.eventLists_.push(n)}function Im(e,t,n){Tm(e,n),Am(e,(function(e){return ld(e,t)}))}function Nm(e,t,n){Tm(e,n),Am(e,(function(e){return cd(e,t)||cd(t,e)}))}function Am(e,t){e.recursionDepth_++;for(var n=!0,r=0;r<e.eventLists_.length;r++){var i=e.eventLists_[r];if(i)t(i.path)?(jm(e.eventLists_[r]),e.eventLists_[r]=null):n=!1}n&&(e.eventLists_=[]),e.recursionDepth_--}function jm(e){for(var t=0;t<e.events.length;t++){var n=e.events[t];if(null!==n){e.events[t]=null;var r=n.getEventRunner();ah&&uh("event: "+n.toString()),Eh(r)}}}var Om="repo_interrupt",Pm=function(){function e(t,n,r,i){ua(this,e),this.repoInfo_=t,this.forceRestClient_=n,this.authTokenProvider_=r,this.appCheckProvider_=i,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Sm,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=up(),this.transactionQueueTree_=new lm,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}return ca(e,[{key:"toString",value:function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}]),e}();function Rm(e,t,n){if(e.stats_=Vh(e.repoInfo_),e.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)e.server_=new op(e.repoInfo_,(function(t,n,r,i){Lm(e,t,n,r,i)}),e.authTokenProvider_,e.appCheckProvider_),setTimeout((function(){return Mm(e,!0)}),0);else{if("undefined"!==typeof n&&null!==n){if("object"!==typeof n)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Ya(n)}catch(AF){throw new Error("Invalid authOverride provided: "+AF)}}e.persistentConnection_=new md(e.repoInfo_,t,(function(t,n,r,i){Lm(e,t,n,r,i)}),(function(t){Mm(e,t)}),(function(t){!function(e,t){xh(t,(function(t,n){Vm(e,t,n)}))}(e,t)}),e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener((function(t){e.server_.refreshAuthToken(t)})),e.appCheckProvider_.addTokenChangeListener((function(t){e.server_.refreshAppCheckToken(t.token)})),e.statsReporter_=function(e,t){var n=e.toString();return Mh[n]||(Mh[n]=t()),Mh[n]}(e.repoInfo_,(function(){return new dp(e.stats_,e.server_)})),e.infoData_=new sp,e.infoSyncTree_=new Pv({startListening:function(t,n,r,i){var a=[],o=e.infoData_.getNode(t._path);return o.isEmpty()||(a=Fv(e.infoSyncTree_,t._path,o),setTimeout((function(){i("ok")}),0)),a},stopListening:function(){}}),Vm(e,"connected",!1),e.serverSyncTree_=new Pv({startListening:function(t,n,r,i){return e.server_.listen(t,r,n,(function(n,r){var a=i(n,r);Nm(e.eventQueue_,t._path,a)})),[]},stopListening:function(t,n){e.server_.unlisten(t,n)}})}function Dm(e){var t=e.infoData_.getNode(new Jh(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t}function Fm(e){return(t=(t={timestamp:Dm(e)})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t}function Lm(e,t,n,r,i){e.dataUpdateCount++;var a=new Jh(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;var o=[];if(i)if(r){var s=Za(n,(function(e){return Kd(e)}));o=function(e,t,n,r){var i=Gv(e,r);if(i){var a=Yv(i),o=a.path,s=a.queryId,u=ud(o,t),l=Np.fromObject(n);return Qv(e,o,new bp(pp(s),u,l))}return[]}(e.serverSyncTree_,a,s,i)}else{var u=Kd(n);o=Mv(e.serverSyncTree_,a,u,i)}else if(r){var l=Za(n,(function(e){return Kd(e)}));o=function(e,t,n){var r=Np.fromObject(n);return zv(e,new bp({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,r))}(e.serverSyncTree_,a,l)}else{var c=Kd(n);o=Fv(e.serverSyncTree_,a,c)}var f=a;o.length>0&&(f=Gm(e,a)),Nm(e.eventQueue_,f,o)}function Mm(e,t){Vm(e,"connected",t),!1===t&&function(e){Um(e,"onDisconnectEvents");var t=Fm(e),n=up();cp(e.onDisconnect_,Zh(),(function(r,i){var a=om(r,i,e.serverSyncTree_,t);lp(n,r,a)}));var r=[];cp(n,Zh(),(function(t,n){r=r.concat(Fv(e.serverSyncTree_,t,n));var i=Jm(e,t);Gm(e,i)})),e.onDisconnect_=up(),Nm(e.eventQueue_,Zh(),r)}(e)}function Vm(e,t,n){var r=new Jh("/.info/"+t),i=Kd(n);e.infoData_.updateSnapshot(r,i);var a=Fv(e.infoSyncTree_,r,i);Nm(e.eventQueue_,r,a)}function Bm(e){return e.nextWriteId_++}function zm(e,t,n){var r;r=".info"===ed(t._path)?Lv(e.infoSyncTree_,t,n):Lv(e.serverSyncTree_,t,n),Im(e.eventQueue_,t._path,r)}function qm(e){e.persistentConnection_&&e.persistentConnection_.interrupt(Om)}function Um(e){var t="";e.persistentConnection_&&(t=e.persistentConnection_.id+":");for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];uh.apply(void 0,[t].concat(r))}function Hm(e,t,n){return Bv(e.serverSyncTree_,t,n)||Hd.EMPTY_NODE}function Wm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transactionQueueTree_;if(t||Xm(e,t),fm(t)){var n=Qm(e,t);xa(n.length>0,"Sending zero length transaction queue");var r=n.every((function(e){return 0===e.status}));r&&Km(e,mm(t),n)}else dm(t)&&pm(t,(function(t){Wm(e,t)}))}function Km(e,t,n){for(var r=n.map((function(e){return e.currentWriteId})),i=Hm(e,t,r),a=i,o=i.hash(),s=0;s<n.length;s++){var u=n[s];xa(0===u.status,"tryToSendTransactionQueue_: items in queue should all be run."),u.status=1,u.retryCount++;var l=ud(t,u.path);a=a.updateChild(l,u.currentOutputSnapshotRaw)}var c=a.val(!0),f=t;e.server_.put(f.toString(),c,(function(r){Um(e,"transaction put response",{path:f.toString(),status:r});var i=[];if("ok"===r){for(var a=[],o=function(t){n[t].status=2,i=i.concat(Dv(e.serverSyncTree_,n[t].currentWriteId)),n[t].onComplete&&a.push((function(){return n[t].onComplete(null,!0,n[t].currentOutputSnapshotResolved)})),n[t].unwatcher()},s=0;s<n.length;s++)o(s);Xm(e,cm(e.transactionQueueTree_,t)),Wm(e,e.transactionQueueTree_),Nm(e.eventQueue_,t,i);for(var u=0;u<a.length;u++)Eh(a[u])}else{if("datastale"===r)for(var l=0;l<n.length;l++)3===n[l].status?n[l].status=4:n[l].status=0;else{hh("transaction at "+f.toString()+" failed: "+r);for(var c=0;c<n.length;c++)n[c].status=4,n[c].abortReason=r}Gm(e,t)}}),o)}function Gm(e,t){var n=Ym(e,t),r=mm(n);return function(e,t,n){if(0===t.length)return;for(var r=[],i=[],a=t.filter((function(e){return 0===e.status})),o=a.map((function(e){return e.currentWriteId})),s=function(a){var s,u=t[a],l=ud(n,u.path),c=!1,f=void 0;if(xa(null!==l,"rerunTransactionsUnderNode_: relativePath should not be null."),4===u.status)c=!0,f=u.abortReason,i=i.concat(Dv(e.serverSyncTree_,u.currentWriteId,!0));else if(0===u.status)if(u.retryCount>=25)c=!0,f="maxretry",i=i.concat(Dv(e.serverSyncTree_,u.currentWriteId,!0));else{var h=Hm(e,u.path,o);u.currentInputSnapshot=h;var d=t[a].update(h.val());if(void 0!==d){_m("transaction failed: Data returned ",d,u.path);var p=Kd(d);"object"===typeof d&&null!=d&&$a(d,".priority")||(p=p.updatePriority(h.getPriority()));var v=u.currentWriteId,m=Fm(e),y=sm(p,h,m);u.currentOutputSnapshotRaw=p,u.currentOutputSnapshotResolved=y,u.currentWriteId=Bm(e),o.splice(o.indexOf(v),1),i=(i=i.concat(Rv(e.serverSyncTree_,u.path,y,u.currentWriteId,u.applyLocally))).concat(Dv(e.serverSyncTree_,v,!0))}else c=!0,f="nodata",i=i.concat(Dv(e.serverSyncTree_,u.currentWriteId,!0))}Nm(e.eventQueue_,n,i),i=[],c&&(t[a].status=2,s=t[a].unwatcher,setTimeout(s,Math.floor(0)),t[a].onComplete&&("nodata"===f?r.push((function(){return t[a].onComplete(null,!1,t[a].currentInputSnapshot)})):r.push((function(){return t[a].onComplete(new Error(f),!1,null)}))))},u=0;u<t.length;u++)s(u);Xm(e,e.transactionQueueTree_);for(var l=0;l<r.length;l++)Eh(r[l]);Wm(e,e.transactionQueueTree_)}(e,Qm(e,n),r),r}function Ym(e,t){var n,r=e.transactionQueueTree_;
2for(n=ed(t);null!==n&&void 0===fm(r);)r=cm(r,n),n=ed(t=nd(t));return r}function Qm(e,t){var n=[];return $m(e,t,n),n.sort((function(e,t){return e.order-t.order})),n}function $m(e,t,n){var r=fm(t);if(r)for(var i=0;i<r.length;i++)n.push(r[i]);pm(t,(function(t){$m(e,t,n)}))}function Xm(e,t){var n=fm(t);if(n){for(var r=0,i=0;i<n.length;i++)2!==n[i].status&&(n[r]=n[i],r++);n.length=r,hm(t,n.length>0?n:void 0)}pm(t,(function(t){Xm(e,t)}))}function Jm(e,t){var n=mm(Ym(e,t)),r=cm(e.transactionQueueTree_,t);return function(e,t,n){for(var r=n?e:e.parent;null!==r;){if(t(r))return!0;r=r.parent}}(r,(function(t){Zm(e,t)})),Zm(e,r),vm(r,(function(t){Zm(e,t)})),n}function Zm(e,t){var n=fm(t);if(n){for(var r=[],i=[],a=-1,o=0;o<n.length;o++)3===n[o].status||(1===n[o].status?(xa(a===o-1,"All SENT items should be at beginning of queue."),a=o,n[o].status=3,n[o].abortReason="set"):(xa(0===n[o].status,"Unexpected transaction status in abort"),n[o].unwatcher(),i=i.concat(Dv(e.serverSyncTree_,n[o].currentWriteId,!0)),n[o].onComplete&&r.push(n[o].onComplete.bind(null,new Error("set"),!1,null))));-1===a?hm(t,void 0):n.length=a+1,Nm(e.eventQueue_,mm(t),i);for(var s=0;s<r.length;s++)Eh(r[s])}}var ey=function(e,t){var n=ty(e),r=n.namespace;"firebase.com"===n.domain&&fh(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||fh("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&hh("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new Rh(n.host,n.secure,r,i,t,"",r!==n.subdomain),path:new Jh(n.pathString)}},ty=function(e){var t="",n="",r="",i="",a="",o=!0,s="https",u=443;if("string"===typeof e){var l=e.indexOf("//");l>=0&&(s=e.substring(0,l-1),e=e.substring(l+2));var c=e.indexOf("/");-1===c&&(c=e.length);var f=e.indexOf("?");-1===f&&(f=e.length),t=e.substring(0,Math.min(c,f)),c<f&&(i=function(e){for(var t="",n=e.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(AF){}t+="/"+i}return t}(e.substring(c,f)));var h=function(e){var t={};"?"===e.charAt(0)&&(e=e.substring(1));var n,r=ya(e.split("&"));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0!==i.length){var a=i.split("=");2===a.length?t[decodeURIComponent(a[0])]=decodeURIComponent(a[1]):hh("Invalid query segment '".concat(i,"' in query '").concat(e,"'"))}}}catch(o){r.e(o)}finally{r.f()}return t}(e.substring(Math.min(e.length,f)));(l=t.indexOf(":"))>=0?(o="https"===s||"wss"===s,u=parseInt(t.substring(l+1),10)):l=t.length;var d=t.slice(0,l);if("localhost"===d.toLowerCase())n="localhost";else if(d.split(".").length<=2)n=d;else{var p=t.indexOf(".");r=t.substring(0,p).toLowerCase(),n=t.substring(p+1),a=r}"ns"in h&&(a=h.ns)}return{host:t,port:u,domain:n,subdomain:r,secure:o,scheme:s,pathString:i,namespace:a}},ny="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",ry=(function(){var e=0,t=[]}(),function(){function e(t,n,r,i){ua(this,e),this.eventType=t,this.eventRegistration=n,this.snapshot=r,this.prevName=i}return ca(e,[{key:"getPath",value:function(){var e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path}},{key:"getEventType",value:function(){return this.eventType}},{key:"getEventRunner",value:function(){return this.eventRegistration.getEventRunner(this)}},{key:"toString",value:function(){return this.getPath().toString()+":"+this.eventType+":"+Ya(this.snapshot.exportVal())}}]),e}()),iy=function(){function e(t,n,r){ua(this,e),this.eventRegistration=t,this.error=n,this.path=r}return ca(e,[{key:"getPath",value:function(){return this.path}},{key:"getEventType",value:function(){return"cancel"}},{key:"getEventRunner",value:function(){return this.eventRegistration.getEventRunner(this)}},{key:"toString",value:function(){return this.path.toString()+":cancel"}}]),e}(),ay=function(){function e(t,n){ua(this,e),this.snapshotCallback=t,this.cancelCallback=n}return ca(e,[{key:"onValue",value:function(e,t){this.snapshotCallback.call(null,e,t)}},{key:"onCancel",value:function(e){return xa(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}},{key:"hasCancelCallback",get:function(){return!!this.cancelCallback}},{key:"matches",value:function(e){return this.snapshotCallback===e.snapshotCallback||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}]),e}(),oy=function(){function e(t,n,r,i){ua(this,e),this._repo=t,this._path=n,this._queryParams=r,this._orderByCalled=i}return ca(e,[{key:"key",get:function(){return sd(this._path)?null:rd(this._path)}},{key:"ref",get:function(){return new sy(this._repo,this._path)}},{key:"_queryIdentifier",get:function(){var e=ap(this._queryParams),t=bh(e);return"{}"===t?"default":t}},{key:"_queryObject",get:function(){return ap(this._queryParams)}},{key:"isEqual",value:function(t){if(!((t=ho(t))instanceof e))return!1;var n=this._repo===t._repo,r=ld(this._path,t._path),i=this._queryIdentifier===t._queryIdentifier;return n&&r&&i}},{key:"toJSON",value:function(){return this.toString()}},{key:"toString",value:function(){return this._repo.toString()+function(e){for(var t="",n=e.pieceNum_;n<e.pieces_.length;n++)""!==e.pieces_[n]&&(t+="/"+encodeURIComponent(String(e.pieces_[n])));return t||"/"}(this._path)}}]),e}();var sy=function(e){ha(n,e);var t=pa(n);function n(e,r){return ua(this,n),t.call(this,e,r,new rp,!1)}return ca(n,[{key:"parent",get:function(){var e=ad(this._path);return null===e?null:new n(this._repo,e)}},{key:"root",get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}}]),n}(oy),uy=function(){function e(t,n,r){ua(this,e),this._node=t,this.ref=n,this._index=r}return ca(e,[{key:"priority",get:function(){return this._node.getPriority().val()}},{key:"key",get:function(){return this.ref.key}},{key:"size",get:function(){return this._node.numChildren()}},{key:"child",value:function(t){var n=new Jh(t),r=ly(this.ref,t);return new e(this._node.getChild(n),r,Md)}},{key:"exists",value:function(){return!this._node.isEmpty()}},{key:"exportVal",value:function(){return this._node.val(!0)}}
2,{key:"forEach",value:function(t){var n=this;return!this._node.isLeafNode()&&!!this._node.forEachChild(this._index,(function(r,i){return t(new e(i,ly(n.ref,r),Md))}))}},{key:"hasChild",value:function(e){var t=new Jh(e);return!this._node.getChild(t).isEmpty()}},{key:"hasChildren",value:function(){return!this._node.isLeafNode()&&!this._node.isEmpty()}},{key:"toJSON",value:function(){return this.exportVal()}},{key:"val",value:function(){return this._node.val()}}]),e}();function ly(e,t){var n,r,i,a;return null===ed((e=ho(e))._path)?(n="child",r="path",a=!1,(i=t)&&(i=i.replace(/^\/*\.info(\/|$)/,"/")),Cm(n,r,i,a)):Cm("child","path",t,!1),new sy(e._repo,od(e._path,t))}var cy=function(){function e(t){ua(this,e),this.callbackContext=t}return ca(e,[{key:"respondsTo",value:function(e){return"value"===e}},{key:"createEvent",value:function(e,t){var n=t._queryParams.getIndex();return new ry("value",this,new uy(e.snapshotNode,new sy(t._repo,t._path),n))}},{key:"getEventRunner",value:function(e){var t=this;return"cancel"===e.getEventType()?function(){return t.callbackContext.onCancel(e.error)}:function(){return t.callbackContext.onValue(e.snapshot,null)}}},{key:"createCancelEvent",value:function(e,t){return this.callbackContext.hasCancelCallback?new iy(this,e,t):null}},{key:"matches",value:function(t){return t instanceof e&&(!t.callbackContext||!this.callbackContext||t.callbackContext.matches(this.callbackContext))}},{key:"hasAnyCallback",value:function(){return null!==this.callbackContext}}]),e}(),fy=function(){function e(t,n){ua(this,e),this.eventType=t,this.callbackContext=n}return ca(e,[{key:"respondsTo",value:function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t}},{key:"createCancelEvent",value:function(e,t){return this.callbackContext.hasCancelCallback?new iy(this,e,t):null}},{key:"createEvent",value:function(e,t){xa(null!=e.childName,"Child events should have a childName.");var n=ly(new sy(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new ry(e.type,this,new uy(e.snapshotNode,n,r),e.prevName)}},{key:"getEventRunner",value:function(e){var t=this;return"cancel"===e.getEventType()?function(){return t.callbackContext.onCancel(e.error)}:function(){return t.callbackContext.onValue(e.snapshot,e.prevName)}}},{key:"matches",value:function(t){return t instanceof e&&(this.eventType===t.eventType&&(!this.callbackContext||!t.callbackContext||this.callbackContext.matches(t.callbackContext)))}},{key:"hasAnyCallback",value:function(){return!!this.callbackContext}}]),e}();function hy(e,t,n,r,i){var a;if("object"===typeof r&&(a=void 0,i=r),"function"===typeof r&&(a=r),i&&i.onlyOnce){var o=n,s=function(t,n){zm(e._repo,e,l),o(t,n)};s.userCallback=n.userCallback,s.context=n.context,n=s}var u=new ay(n,a||void 0),l="value"===t?new cy(u):new fy(t,u);return function(e,t,n){var r;r=".info"===ed(t._path)?Vv(e.infoSyncTree_,t,n):Vv(e.serverSyncTree_,t,n),Im(e.eventQueue_,t._path,r)}(e._repo,e,l),function(){return zm(e._repo,e,l)}}function dy(e,t,n,r){return hy(e,"value",t,n,r)}!function(e){xa(!hv,"__referenceConstructor has already been defined"),hv=e}(sy),function(e){xa(!bv,"__referenceConstructor has already been defined"),bv=e}(sy);var py={},vy=!1;function my(e,t,n,r,i){var a=r||e.options.databaseURL;void 0===a&&(e.options.projectId||fh("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),uh("Using default host for project ",e.options.projectId),a="".concat(e.options.projectId,"-default-rtdb.firebaseio.com"));var o,s=ey(a,i),u=s.repoInfo,l=void 0;"undefined"!==typeof process&&(l={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.FIREBASE_DATABASE_EMULATOR_HOST),l?(o=!0,a="http://".concat(l,"?ns=").concat(u.namespace),u=(s=ey(a,i)).repoInfo):o=!s.repoInfo.secure;var c=i&&o?new Nh(Nh.OWNER):new Ih(e.name,e.options,t);Em("Invalid Firebase Database URL",s),sd(s.path)||fh("Database URL must point to the root of a Firebase Database (not including a child path).");var f=function(e,t,n,r){var i=py[t.name];i||(i={},py[t.name]=i);var a=i[e.toURLString()];a&&fh("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.");return a=new Pm(e,vy,n,r),i[e.toURLString()]=a,a}(u,e,c,new Th(e.name,n));return new yy(f,e)}var yy=function(){function e(t,n){ua(this,e),this._repoInternal=t,this.app=n,this.type="database",this._instanceStarted=!1}return ca(e,[{key:"_repo",get:function(){return this._instanceStarted||(Rm(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}},{key:"_root",get:function(){return this._rootInternal||(this._rootInternal=new sy(this._repo,Zh())),this._rootInternal}},{key:"_delete",value:function(){return null!==this._rootInternal&&(!function(e,t){var n=py[t];n&&n[e.key]===e||fh("Database ".concat(t,"(").concat(e.repoInfo_,") has already been deleted.")),qm(e),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}},{key:"_checkNotDeleted",value:function(e){null===this._rootInternal&&fh("Cannot call "+e+" on a deleted database.")}}]),e}();md.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},md.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};!function(e){!function(e){Qf=e}(is),Zo(new po("database",(function(e,t){var n=t.instanceIdentifier;return my(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),n)}),"PUBLIC").setMultipleInstances(!0)),ss(Gf,Yf,e),ss(Gf,Yf,"esm2017")}();ss("firebase","9.17.1","app");var gy,by="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},wy={},xy=xy||{},ky=by||self;function _y(){}function Cy(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 Ey(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var Sy="closure_uid_"+(1e9*Math.random()>>>0),Ty=0;function Iy(e,t,n){return e.call.apply(e.bind,arguments)}function Ny(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)}}
2function Ay(e,t,n){return(Ay=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Iy:Ny).apply(null,arguments)}function jy(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 Oy(e,t){function n(){}n.prototype=t.prototype,e.X=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Wb=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function Py(){this.s=this.s,this.o=this.o}Py.prototype.s=!1,Py.prototype.na=function(){var e;!this.s&&(this.s=!0,this.M(),0)&&(e=this,Object.prototype.hasOwnProperty.call(e,Sy)&&e[Sy]||(e[Sy]=++Ty))},Py.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var Ry=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(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1};function Dy(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function Fy(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(Cy(r)){var i=e.length||0,a=r.length||0;e.length=i+a;for(var o=0;o<a;o++)e[i+o]=r[o]}else e.push(r)}}function Ly(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}Ly.prototype.h=function(){this.defaultPrevented=!0};var My=function(){if(!ky.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{ky.addEventListener("test",_y,t),ky.removeEventListener("test",_y,t)}catch(n){}return e}();function Vy(e){return/^[\s\xa0]*$/.test(e)}var By=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function zy(e,t){return e<t?-1:e>t?1:0}function qy(){var e=ky.navigator;return e&&(e=e.userAgent)?e:""}function Uy(e){return-1!=qy().indexOf(e)}function Hy(e){return Hy[" "](e),e}Hy[" "]=_y;var Wy,Ky=Uy("Opera"),Gy=Uy("Trident")||Uy("MSIE"),Yy=Uy("Edge"),Qy=Yy||Gy,$y=Uy("Gecko")&&!(-1!=qy().toLowerCase().indexOf("webkit")&&!Uy("Edge"))&&!(Uy("Trident")||Uy("MSIE"))&&!Uy("Edge"),Xy=-1!=qy().toLowerCase().indexOf("webkit")&&!Uy("Edge");function Jy(){var e=ky.document;return e?e.documentMode:void 0}e:{var Zy="",eg=function(){var e=qy();return $y?/rv:([^\);]+)(\)|;)/.exec(e):Yy?/Edge\/([\d\.]+)/.exec(e):Gy?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Xy?/WebKit\/(\S+)/.exec(e):Ky?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(eg&&(Zy=eg?eg[1]:""),Gy){var tg=Jy();if(null!=tg&&tg>
vendor: 4,563 bytes, line 2
2parseFloat(Zy)){Wy=String(tg);break e}}Wy=Zy}var ng,rg={};function ig(){return function(e){var t=rg;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=By(String(Wy)).split("."),n=By("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var a=t[i]||"",o=n[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==a[0].length&&0==o[0].length)break;e=zy(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||zy(0==a[2].length,0==o[2].length)||zy(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(ky.document&&Gy){var ag=Jy();ng=ag||(parseInt(Wy,10)||void 0)}else ng=void 0;var og=ng;function sg(e,t){if(Ly.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($y){e:{try{Hy(t.nodeName);var i=!0;break e}catch(a){}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:ug[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&sg.X.h.call(this)}}Oy(sg,Ly);var ug={2:"touch",3:"pen",4:"mouse"};sg.prototype.h=function(){sg.X.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var lg="closure_listenable_"+(1e6*Math.random()|0),cg=0;function fg(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++cg,this.ba=this.ea=!1}function hg(e){e.ba=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function dg(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function pg(e){var t={};for(var n in e)t[n]=e[n];return t}var vg="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function mg(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<vg.length;a++)n=vg[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function yg(e){this.src=e,this.g={},this.h=0}function gg(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=Ry(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(hg(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function bg(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.ba&&a.listener==t&&a.capture==!!n&&a.ha==r)return i}return-1}yg.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=bg(e,t,r,i);return-1<o?(t=e[o],n||(t.ea=!1)):((t=new fg(t,this.src,a,!!r,i)).ea=n,e.push(t)),t};var wg="closure_lm_"+(1e6*Math.random()|0),xg={};function kg(e,t,n,r,i){if(r&&r.once)return Cg(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)kg(e,t[a],n,r,i);return null}return n=jg(n),e&&e[lg]?e.N(t,n,Ey(r)?!!r.capture:!!r,i):_g(e,t,n,!1,r,i)}function _g(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=Ey(i)?!!i.capture:!!i,s=Ng(e);if(s||(e[wg]=s=new yg(e)),(n=s.add(t,n,r,o,a)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=Ig;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)My||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(Tg(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function Cg(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)Cg(e,t[a],n,r,i);return null}return n=jg(n),e&&e[lg]?e.O(t,n,Ey(r)?!!r.capture:!!r,i):_g(e,t,n,!0,r,i)}function Eg(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)Eg(e,t[a],n,r,i);else r=Ey(r)?!!r.capture:!!r,n=jg(n),e&&e[lg]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=bg(a=e.g[t],n,r,i))&&(hg(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--))
2)):e&&(e=Ng(e))&&(t=e.g[t.toString()],e=-1,t&&(e=bg(t,n,r,i)),(n=-1<e?t[e]:null)&&Sg(n))}function Sg(e){if("number"!==typeof e&&e&&!e.ba){var t=e.src;if(t&&t[lg])gg(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Tg(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Ng(t))?(gg(n,e),0==n.h&&(n.src=null,t[wg]=null)):hg(e)}}}function Tg(e){return e in xg?xg[e]:xg[e]="on"+e}function Ig(e,t){if(e.ba)e=!0;else{t=new sg(t,this);var n=e.listener,r=e.ha||e.src;e.ea&&Sg(e),e=n.call(r,t)}return e}function Ng(e){return(e=e[wg])instanceof yg?e:null}var Ag="__closure_events_fn_"+(1e9*Math.random()>>>0);function jg(e){return"function"===typeof e?e:(e[Ag]||(e[Ag]=function(t){return e.handleEvent(t)}),e[Ag])}function Og(){Py.call(this),this.i=new yg(this),this.P=this,this.I=null}function Pg(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 Ly(t,e);else if(t instanceof Ly)t.target=t.target||e;else{var i=t;mg(t=new Ly(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=Rg(o,r,!0,t)&&i}if(i=Rg(o=t.g=e,r,!0,t)&&i,i=Rg(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=Rg(o=t.g=n[a],r,!1,t)&&i}function Rg(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.ba&&o.capture==n){var s=o.listener,u=o.ha||o.src;o.ea&&gg(e.i,o),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}Oy(Og,Py),Og.prototype[lg]=!0,Og.prototype.removeEventListener=function(e,t,n,r){Eg(this,e,t,n,r)},Og.prototype.M=function(){if(Og.X.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++)hg(n[r]);delete t.g[e],t.h--}}this.I=null},Og.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Og.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Dg=ky.JSON.stringify;function Fg(){var e=Hg,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var Lg,Mg=function(){function e(){ua(this,e),this.h=this.g=null}return ca(e,[{key:"add",value:function(e,t){var n=Vg.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),Vg=new(function(){function e(t,n){ua(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return ca(e,[{key:"get",value:function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}]),e}())((function(){return new Bg}),(function(e){return e.reset()})),Bg=function(){function e(){ua(this,e),this.next=this.g=this.h=null}return ca(e,[{key:"set",value:function(e,t){this.h=e,this.g=t,this.next=null}},{key:"reset",value:function(){this.next=this.g=this.h=null}}]),e}();function zg(e){ky.setTimeout((function(){throw e}),0)}function qg(e,t){Lg||function(){var e=ky.Promise.resolve(void 0);Lg=function(){e.then(Wg)}}(),Ug||(Lg(),Ug=!0),Hg.add(e,t)}var Ug=!1,Hg=new Mg;function Wg(){for(var e;e=Fg();){try{e.h.call(e.g)}catch(n){zg(n)}var t=Vg;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Ug=!1}function Kg(e,t){Og.call(this),this.h=e||1,this.g=t||ky,this.j=Ay(this.lb,this),this.l=Date.now()}function Gg(e){e.ca=!1,e.R&&(e.g.clearTimeout(e.R),e.R=null)}function Yg(e,t,n){if("function"===typeof e)n&&(e=Ay(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=Ay(e.handleEvent,e)}return 2147483647<Number(t)?-1:ky.setTimeout(e,t||0)}function Qg(e){e.g=Yg((function(){e.g=null,e.i&&(e.i=!1,Qg(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}Oy(Kg,Og),(gy=Kg.prototype).ca=!1,gy.R=null,gy.lb=function(){if(this.ca){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-e):(this.R&&(this.g.clearTimeout(this.R),this.R=null),Pg(this,"tick"),this.ca&&(Gg(this),this.start()))}},gy.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())},gy.M=function(){Kg.X.M.call(this),Gg(this),delete this.g};var $g=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return ca(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:Qg(this)}},{key:"M",value:function(){ma(ra(n.prototype),"M",this).call(this),this.g&&(ky.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(Py);function Xg(e){Py.call(this),this.h=e,this.g={}}Oy(Xg,Py);var Jg=[];function Zg(e,t,n,r){Array.isArray(n)||(n&&(Jg[0]=n.toString()),n=Jg);for(var i=0;i<n.length;i++){var a=kg(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function eb(e){dg(e.g,(function(e,t){this.g.hasOwnProperty(t)&&Sg(e)}),e),e.g={}}function tb(){this.g=!0}function nb(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 a=i[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var o=1;o<i.length;o++)i[o]=""}}}return Dg(n)}catch(s){return t}}(e,n)+(r?" "+r:"")}))}Xg.prototype.M=function(){Xg.X.M.call(this),eb(this)},Xg.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},tb.prototype.Aa=function(){this.g=!1},tb.prototype.info=function(){};var rb={},ib=null;function ab(){return ib=ib||new Og}function ob(e){Ly.call(this,rb.Pa,e)}
2function sb(e){var t=ab();Pg(t,new ob(t))}function ub(e,t){Ly.call(this,rb.STAT_EVENT,e),this.stat=t}function lb(e){var t=ab();Pg(t,new ub(t,e))}function cb(e,t){Ly.call(this,rb.Qa,e),this.size=t}function fb(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return ky.setTimeout((function(){e()}),t)}rb.Pa="serverreachability",Oy(ob,Ly),rb.STAT_EVENT="statevent",Oy(ub,Ly),rb.Qa="timingevent",Oy(cb,Ly);var hb={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9},db={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function pb(){}function vb(e){return e.h||(e.h=e.i())}function mb(){}pb.prototype.h=null;var yb,gb={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function bb(){Ly.call(this,"d")}function wb(){Ly.call(this,"c")}function xb(){}function kb(e,t,n,r){this.l=e,this.j=t,this.m=n,this.U=r||1,this.S=new Xg(this),this.O=Cb,e=Qy?125:void 0,this.T=new Kg(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.V=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.Y=-1,this.I=!1,this.N=0,this.L=null,this.$=this.J=this.Z=this.P=!1,this.h=new _b}function _b(){this.i=null,this.g="",this.h=!1}Oy(bb,Ly),Oy(wb,Ly),Oy(xb,pb),xb.prototype.g=function(){return new XMLHttpRequest},xb.prototype.i=function(){return{}},yb=new xb;var Cb=45e3,Eb={},Sb={};function Tb(e,t,n){e.K=1,e.v=Kb(zb(t)),e.s=n,e.P=!0,Ib(e,null)}function Ib(e,t){e.F=Date.now(),Ob(e),e.A=zb(e.v);var n=e.A,r=e.U;Array.isArray(r)||(r=[String(r)]),aw(n.i,"t",r),e.C=0,n=e.l.H,e.h=new _b,e.g=ox(e.l,n?t:null,!e.s),0<e.N&&(e.L=new $g(Ay(e.La,e,e.g),e.N)),Zg(e.S,e.g,"readystatechange",e.ib),t=e.H?pg(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.da(e.A,e.u,e.s,t)):(e.u="GET",e.g.da(e.A,e.u,null,t)),sb(),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",s=a.split("&"),u=0;u<s.length;u++){var l=s[u].split("=");if(1<l.length){var c=l[0];l=l[1];var f=c.split("_");o=2<=f.length&&"type"==f[1]?o+(c+"=")+l+"&":o+(c+"=redacted&")}}else o=null;else o=a;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.U,e.s)}function Nb(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Da)}function Ab(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=jb(e,n))==Sb){4==t&&(e.o=4,lb(14),i=!1),nb(e.j,e.m,null,"[Incomplete Response]");break}if(r==Eb){e.o=4,lb(15),nb(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}nb(e.j,e.m,r,null),Lb(e,r)}Nb(e)&&r!=Sb&&r!=Eb&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,lb(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.$&&(e.$=!0,(t=e.l).g==e&&t.$&&!t.K&&(t.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),Jw(t),t.K=!0,lb(11))):(nb(e.j,e.m,n,"[Invalid Chunked Response]"),Fb(e),Db(e))}function jb(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Sb:(n=Number(t.substring(n,r)),isNaN(n)?Eb:(r+=1)+n>t.length?Sb:(t=t.substr(r,n),e.C=r+n,t))}function Ob(e){e.V=Date.now()+e.O,Pb(e,e.O)}function Pb(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=fb(Ay(e.gb,e),t)}function Rb(e){e.B&&(ky.clearTimeout(e.B),e.B=null)}function Db(e){0==e.l.G||e.I||tx(e.l,e)}function Fb(e){Rb(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,Gg(e.T),eb(e.S),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Lb(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||dw(n.h,e)))if(!e.J&&dw(n.h,e)&&3==n.G){try{var r=n.Fa.g.parse(t)}catch(a){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;ex(n),Hw(n)}Xw(n),lb(18)}}else n.Ba=i[1],0<n.Ba-n.T&&37500>i[2]&&n.L&&0==n.A&&!n.v&&(n.v=fb(Ay(n.cb,n),6e3));if(1>=hw(n.h)&&n.ja){try{n.ja()}catch(a){}n.ja=void 0}}else rx(n,11)}else if((e.J||n.g==e)&&ex(n),!Vy(t))for(i=n.Fa.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.T=a[0],a=a[1],2==n.G)if("c"==a[0]){n.I=a[1],n.ka=a[2];var o=a[3];null!=o&&(n.ma=o,n.j.info("VER="+n.ma));var s=a[4];null!=s&&(n.Ca=s,n.j.info("SVER="+n.Ca));var u=a[5];null!=u&&"number"===typeof u&&0<u&&(r=1.5*u,n.J=r,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;var l=e.g;if(l){var c=l.g?l.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(c){var f=r.h;f.g||-1==c.indexOf("spdy")&&-1==c.indexOf("quic")&&-1==c.indexOf("h2")||(f.j=f.l,f.g=new Set,f.h&&(pw(f,f.h),f.h=null))}if(r.D){var h=l.g?l.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.za=h,Wb(r.F,r.D,h))}}n.G=3,n.l&&n.l.xa(),n.$&&(n.P=Date.now()-e.F,n.j.info("Handshake RTT: "+n.P+"ms"));var d=e;if((r=n).sa=ax(r,r.H?r.ka:null,r.V),d.J){vw(r.h,d);var p=d,v=r.J;v&&p.setTimeout(v),p.B&&(Rb(p),Ob(p)),r.g=d}else $w(r);0<n.i.length&&Kw(n)}else"stop"!=a[0]&&"close"!=a[0]||rx(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?rx(n,7):Uw(n):"noop"!=a[0]&&n.l&&n.l.wa(a),n.A=0)}sb()}catch(a){}}function Mb(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(Cy(e)||"string"===typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.oa&&"function"==typeof e.oa)return e.oa();if(!e.W||"function"!=typeof e.W){if("undefined"!==typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!==typeof Set&&e instanceof Set)){if(Cy(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}}(e),r=function(e){if(e.W&&"function"==typeof e.W)return e.W();if("undefined"!==typeof Map&&e instanceof Map||"undefined"!==typeof Set&&e instanceof Set)return Array.from(e.values());if("string"===typeof e)return e.split("");
vendor: 4,901 bytes, line 2
2if(Cy(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,a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}(gy=kb.prototype).setTimeout=function(e){this.O=e},gy.ib=function(e){e=e.target;var t=this.L;t&&3==Lw(e)?t.l():this.La(e)},gy.La=function(e){try{if(e==this.g)e:{var t=Lw(this.g),n=this.g.Ea();this.g.aa();if(!(3>t)&&(3!=t||Qy||this.g&&(this.h.h||this.g.fa()||Mw(this.g)))){this.I||4!=t||7==n||sb(),Rb(this);var r=this.g.aa();this.Y=r;t:if(Nb(this)){var i=Mw(this.g);e="";var a=i.length,o=4==Lw(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){Fb(this),Db(this);var s="";break t}this.h.i=new ky.TextDecoder}for(n=0;n<a;n++)this.h.h=!0,e+=this.h.i.decode(i[n],{stream:o&&n==a-1});i.splice(0,a),this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.fa();if(this.i=200==r,function(e,t,n,r,i,a,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+a+" "+o}))}(this.j,this.u,this.A,this.m,this.U,t,r),this.i){if(this.Z&&!this.J){t:{if(this.g){var u,l=this.g;if((u=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Vy(u)){var c=u;break t}}c=null}if(!(r=c)){this.i=!1,this.o=3,lb(12),Fb(this),Db(this);break e}nb(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Lb(this,r)}this.P?(Ab(this,t,s),Qy&&this.i&&3==t&&(Zg(this.S,this.T,"tick",this.hb),this.T.start())):(nb(this.j,this.m,s,null),Lb(this,s)),4==t&&Fb(this),this.i&&!this.I&&(4==t?tx(this.l,this):(this.i=!1,Ob(this)))}else 400==r&&0<s.indexOf("Unknown SID")?(this.o=3,lb(12)):(this.o=0,lb(13)),Fb(this),Db(this)}}}catch(t){}},gy.hb=function(){if(this.g){var e=Lw(this.g),t=this.g.fa();this.C<t.length&&(Rb(this),Ab(this,e,t),this.i&&4!=e&&Ob(this))}},gy.cancel=function(){this.I=!0,Fb(this)},gy.gb=function(){this.B=null;var e=Date.now();0<=e-this.V?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(sb(),lb(17)),Fb(this),this.o=2,Db(this)):Pb(this,this.V-e)};var Vb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Bb(e,t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof Bb){this.h=void 0!==t?t:e.h,qb(this,e.j),this.s=e.s,this.g=e.g,Ub(this,e.m),this.l=e.l,t=e.i;var n=new tw;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Hb(this,n),this.o=e.o}else e&&(n=String(e).match(Vb))?(this.h=!!t,qb(this,n[1]||"",!0),this.s=Gb(n[2]||""),this.g=Gb(n[3]||"",!0),Ub(this,n[4]),this.l=Gb(n[5]||"",!0),Hb(this,n[6]||"",!0),this.o=Gb(n[7]||"")):(this.h=!!t,this.i=new tw(null,this.h))}function zb(e){return new Bb(e)}function qb(e,t,n){e.j=n?Gb(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Ub(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 Hb(e,t,n){t instanceof tw?(e.i=t,function(e,t){t&&!e.j&&(nw(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(rw(this,t),aw(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=Yb(t,Zb)),e.i=new tw(t,e.h))}function Wb(e,t,n){e.i.set(t,n)}function Kb(e){return Wb(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Gb(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Yb(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Qb),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Qb(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Bb.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Yb(t,$b,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Yb(t,$b,!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.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(Yb(n,"/"==n.charAt(0)?Jb:Xb,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Yb(n,ew)),e.join("")};var $b=/[#\/\?@]/g,Xb=/[#\?:]/g,Jb=/[#\?]/g,Zb=/[#\?@]/g,ew=/#/g;function tw(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function nw(e){e.g||(e.g=new Map,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 a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function rw(e,t){nw(e),t=ow(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function iw(e,t){return nw(e),t=ow(e,t),e.g.has(t)}function aw(e,t,n){rw(e,t),0<n.length&&(e.i=null,e.g.set(ow(e,t),Dy(n)),e.h+=n.length)}function ow(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(gy=tw.prototype).add=function(e,t){nw(this),this.i=null,e=ow(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this}
2,gy.forEach=function(e,t){nw(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},gy.oa=function(){nw(this);for(var e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},gy.W=function(e){nw(this);var t=[];if("string"===typeof e)iw(this,e)&&(t=t.concat(this.g.get(ow(this,e))));else{e=Array.from(this.g.values());for(var n=0;n<e.length;n++)t=t.concat(e[n])}return t},gy.set=function(e,t){return nw(this),this.i=null,iw(this,e=ow(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},gy.get=function(e,t){return e&&0<(e=this.W(e)).length?String(e[0]):t},gy.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=Array.from(this.g.keys()),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r)),a=this.W(r);for(r=0;r<a.length;r++){var o=i;""!==a[r]&&(o+="="+encodeURIComponent(String(a[r]))),e.push(o)}}return this.i=e.join("&")};var sw=ca((function e(t,n){ua(this,e),this.h=t,this.g=n}));function uw(e){this.l=e||cw,ky.PerformanceNavigationTiming?e=0<(e=ky.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(ky.g&&ky.g.Ga&&ky.g.Ga()&&ky.g.Ga().$b),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var lw,cw=10;function fw(e){return!!e.h||!!e.g&&e.g.size>=e.j}function hw(e){return e.h?1:e.g?e.g.size:0}function dw(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function pw(e,t){e.g?e.g.add(t):e.h=t}function vw(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function mw(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=ya(e.g.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n=n.concat(i.D)}}catch(a){r.e(a)}finally{r.f()}return n}return Dy(e.i)}function yw(){}function gw(){this.g=new yw}function bw(e,t,n){var r=n||"";try{Mb(e,(function(e,n){var i=e;Ey(e)&&(i=Dg(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(AF){throw t.push(r+"type="+encodeURIComponent("_badmap")),AF}}function ww(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function xw(e){this.l=e.ac||null,this.j=e.jb||!1}function kw(e,t){Og.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=_w,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}uw.prototype.cancel=function(){if(this.i=mw(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=ya(this.g.values());try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this.g.clear()}},yw.prototype.stringify=function(e){return ky.JSON.stringify(e,void 0)},yw.prototype.parse=function(e){return ky.JSON.parse(e,void 0)},Oy(xw,pb),xw.prototype.g=function(){return new kw(this.l,this.j)},xw.prototype.i=(lw={},function(){return lw}),Oy(kw,Og);var _w=0;function Cw(e){e.j.read().then(e.Ta.bind(e)).catch(e.ga.bind(e))}function Ew(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Sw(e)}function Sw(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(gy=kw.prototype).open=function(e,t){if(this.readyState!=_w)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Sw(this)},gy.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||ky).fetch(new Request(this.B,t)).then(this.Wa.bind(this),this.ga.bind(this))},gy.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch((function(){})),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Ew(this)),this.readyState=_w},gy.Wa=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,Sw(this)),this.g&&(this.readyState=3,Sw(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if("undefined"!==typeof ky.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;Cw(this)}else e.text().then(this.Va.bind(this),this.ga.bind(this))},gy.Ta=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?Ew(this):Sw(this),3==this.readyState&&Cw(this)}}
vendor: 4,207 bytes, line 2
2,gy.Va=function(e){this.g&&(this.response=this.responseText=e,Ew(this))},gy.Ua=function(e){this.g&&(this.response=e,Ew(this))},gy.ga=function(){this.g&&Ew(this)},gy.setRequestHeader=function(e,t){this.v.append(e,t)},gy.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},gy.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(kw.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var Tw=ky.JSON.parse;function Iw(e){Og.call(this),this.headers=new Map,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=Nw,this.K=this.L=!1}Oy(Iw,Og);var Nw="",Aw=/^https?$/i,jw=["POST","PUT"];function Ow(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Pw(e),Dw(e)}function Pw(e){e.D||(e.D=!0,Pg(e,"complete"),Pg(e,"error"))}function Rw(e){if(e.h&&"undefined"!=typeof xy&&(!e.C[1]||4!=Lw(e)||2!=e.aa()))if(e.v&&4==Lw(e))Yg(e.Ha,0,e);else if(Pg(e,"readystatechange"),4==Lw(e)){e.h=!1;try{var t,n=e.aa();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var a=String(e.H).match(Vb)[1]||null;if(!a&&ky.self&&ky.self.location){var o=ky.self.location.protocol;a=o.substr(0,o.length-1)}i=!Aw.test(a?a.toLowerCase():"")}t=i}if(t)Pg(e,"complete"),Pg(e,"success");else{e.m=6;try{var s=2<Lw(e)?e.g.statusText:""}catch(u){s=""}e.j=s+" ["+e.aa()+"]",Pw(e)}}finally{Dw(e)}}}function Dw(e,t){if(e.g){Fw(e);var n=e.g,r=e.C[0]?_y:null;e.g=null,e.C=null,t||Pg(e,"ready");try{n.onreadystatechange=r}catch(AF){}}}function Fw(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(ky.clearTimeout(e.A),e.A=null)}function Lw(e){return e.g?e.g.readyState:0}function Mw(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case Nw:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(kx){return null}}function Vw(e){var t="";return dg(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function Bw(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Vw(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Wb(e,t,n))}function zw(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function qw(e){this.Ca=0,this.i=[],this.j=new tb,this.ka=this.sa=this.F=this.V=this.g=this.za=this.D=this.ia=this.o=this.S=this.s=null,this.ab=this.U=0,this.Za=zw("failFast",!1,e),this.L=this.v=this.u=this.m=this.l=null,this.Y=!0,this.pa=this.Ba=this.T=-1,this.Z=this.A=this.C=0,this.Xa=zw("baseRetryDelayMs",5e3,e),this.bb=zw("retryDelaySeedMs",1e4,e),this.$a=zw("forwardChannelMaxRetries",2,e),this.ta=zw("forwardChannelRequestTimeoutMs",2e4,e),this.ra=e&&e.xmlHttpFactory||void 0,this.Da=e&&e.Zb||!1,this.J=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.I="",this.h=new uw(e&&e.concurrentRequestLimit),this.Fa=new gw,this.O=e&&e.fastHandshake||!1,this.N=e&&e.encodeInitMessageHeaders||!1,this.O&&this.N&&(this.N=!1),this.Ya=e&&e.Xb||!1,e&&e.Aa&&this.j.Aa(),e&&e.forceLongPolling&&(this.Y=!1),this.$=!this.O&&this.Y&&e&&e.detectBufferingProxy||!1,this.ja=void 0,this.P=0,this.K=!1,this.la=this.B=null}function Uw(e){if(Ww(e),3==e.G){var t=e.U++,n=zb(e.F);Wb(n,"SID",e.I),Wb(n,"RID",t),Wb(n,"TYPE","terminate"),Yw(e,n),(t=new kb(e,e.j,t,void 0)).K=2,t.v=Kb(zb(n)),n=!1,ky.navigator&&ky.navigator.sendBeacon&&(n=ky.navigator.sendBeacon(t.v.toString(),"")),!n&&ky.Image&&((new Image).src=t.v,n=!0),n||(t.g=ox(t.l,null),t.g.da(t.v)),t.F=Date.now(),Ob(t)}ix(e)}function Hw(e){e.g&&(Jw(e),e.g.cancel(),e.g=null)}function Ww(e){Hw(e),e.u&&(ky.clearTimeout(e.u),e.u=null),ex(e),e.h.cancel(),e.m&&("number"===typeof e.m&&ky.clearTimeout(e.m),e.m=null)}function Kw(e){fw(e.h)||e.m||(e.m=!0,qg(e.Ja,e),e.C=0)}function Gw(e,t){var n;n=t?t.m:e.U++;var r=zb(e.F);Wb(r,"SID",e.I),Wb(r,"RID",n),Wb(r,"AID",e.T),Yw(e,r),e.o&&e.s&&Bw(r,e.o,e.s),n=new kb(e,e.j,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.i=t.D.concat(e.i)),t=Qw(e,n,1e3),n.setTimeout(
2Math.round(.5*e.ta)+Math.round(.5*e.ta*Math.random())),pw(e.h,n),Tb(n,r,t)}function Yw(e,t){e.ia&&dg(e.ia,(function(e,n){Wb(t,n,e)})),e.l&&Mb({},(function(e,n){Wb(t,n,e)}))}function Qw(e,t,n){n=Math.min(e.i.length,n);var r=e.l?Ay(e.l.Ra,e.l,e):null;e:for(var i=e.i,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].h,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var s=!0,u=0;u<n;u++){var l=i[u].h,c=i[u].g;if(0>(l-=a))a=Math.max(0,i[u].h-100),s=!1;else try{bw(c,o,"req"+l+"_")}catch(f){r&&r(c)}}if(s){r=o.join("&");break e}}return e=e.i.splice(0,n),t.D=e,r}function $w(e){e.g||e.u||(e.Z=1,qg(e.Ia,e),e.A=0)}function Xw(e){return!(e.g||e.u||3<=e.A)&&(e.Z++,e.u=fb(Ay(e.Ia,e),nx(e,e.A)),e.A++,!0)}function Jw(e){null!=e.B&&(ky.clearTimeout(e.B),e.B=null)}function Zw(e){e.g=new kb(e,e.j,"rpc",e.Z),null===e.o&&(e.g.H=e.s),e.g.N=0;var t=zb(e.sa);Wb(t,"RID","rpc"),Wb(t,"SID",e.I),Wb(t,"CI",e.L?"0":"1"),Wb(t,"AID",e.T),Wb(t,"TYPE","xmlhttp"),Yw(e,t),e.o&&e.s&&Bw(t,e.o,e.s),e.J&&e.g.setTimeout(e.J);var n=e.g;e=e.ka,n.K=1,n.v=Kb(zb(t)),n.s=null,n.P=!0,Ib(n,e)}function ex(e){null!=e.v&&(ky.clearTimeout(e.v),e.v=null)}function tx(e,t){var n=null;if(e.g==t){ex(e),Jw(e),e.g=null;var r=2}else{if(!dw(e.h,t))return;n=t.D,vw(e.h,t),r=1}if(0!=e.G)if(e.pa=t.Y,t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;Pg(r=ab(),new cb(r,n)),Kw(e)}else $w(e);else if(3==(i=t.o)||0==i&&0<e.pa||!(1==r&&function(e,t){return!(hw(e.h)>=e.h.j-(e.m?1:0))&&(e.m?(e.i=t.D.concat(e.i),!0):!(1==e.G||2==e.G||e.C>=(e.Za?0:e.$a))&&(e.m=fb(Ay(e.Ja,e,t),nx(e,e.C)),e.C++,!0))}(e,t)||2==r&&Xw(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:rx(e,5);break;case 4:rx(e,10);break;case 3:rx(e,6);break;default:rx(e,2)}}function nx(e,t){var n=e.Xa+Math.floor(Math.random()*e.bb);return e.l||(n*=2),n*t}function rx(e,t){if(e.j.info("Error code "+t),2==t){var n=null;e.l&&(n=null);var r=Ay(e.kb,e);n||(n=new Bb("//www.google.com/images/cleardot.gif"),ky.location&&"http"==ky.location.protocol||qb(n,"https"),Kb(n)),function(e,t){var n=new tb;if(ky.Image){var r=new Image;r.onload=jy(ww,n,r,"TestLoadImage: loaded",!0,t),r.onerror=jy(ww,n,r,"TestLoadImage: error",!1,t),r.onabort=jy(ww,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=jy(ww,n,r,"TestLoadImage: timeout",!1,t),ky.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else lb(2);e.G=0,e.l&&e.l.va(t),ix(e),Ww(e)}function ix(e){if(e.G=0,e.la=[],e.l){var t=mw(e.h);0==t.length&&0==e.i.length||(Fy(e.la,t),Fy(e.la,e.i),e.h.i.length=0,Dy(e.i),e.i.length=0),e.l.ua()}}function ax(e,t,n){var r=n instanceof Bb?zb(n):new Bb(n,void 0);if(""!=r.g)t&&(r.g=t+"."+r.g),Ub(r,r.m);else{var i=ky.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var a=new Bb(null,void 0);r&&qb(a,r),t&&(a.g=t),i&&Ub(a,i),n&&(a.l=n),r=a}return n=e.D,t=e.za,n&&t&&Wb(r,n,t),Wb(r,"VER",e.ma),Yw(e,r),r}function ox(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Da&&!e.ra?new Iw(new xw({jb:!0})):new Iw(e.ra)).Ka(e.H),t}function sx(){}function ux(){if(Gy&&!(10<=Number(og)))throw Error("Environmental error: no available transport.")}function lx(e,t){Og.call(this),this.g=new qw(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.S=e,(e=t&&t.Yb)&&!Vy(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!Vy(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new hx(this)}function cx(e){bb.call(this);var t=e.__sm__;if(t){e:{for(var 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 fx(){wb.call(this),this.status=1}function hx(e){this.g=e}(gy=Iw.prototype).Ka=function(e){this.L=e},gy.da=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():yb.g(),this.C=this.u?vb(this.u):vb(yb),this.g.onreadystatechange=Ay(this.Ha,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(s){return void Ow(this,s)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else{if("function"!==typeof r.keys||"function"!==typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));var a,o=ya(r.keys());try{for(o.s();!(a=o.n()).done;){var s=a.value;n.set(s,r.get(s))}}catch(p){o.e(p)}finally{o.f()}}r=Array.from(n.keys()).find((function(e){return"content-type"==e.toLowerCase()})),i=ky.FormData&&e instanceof ky.FormData,!(0<=Ry(jw,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");var l,c=ya(n);try{for(c.s();!(l=c.n()).done;){var f=u(l.value,2),h=f[0],d=f[1];this.g.setRequestHeader(h,d)}}catch(p){c.e(p)}finally{c.f()}this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Fw(this),0<this.B&&((this.K=function(e){return Gy&&ig()&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Ay(this.qa,this)):this.A=Yg(this.qa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(s){Ow(this,s)}},gy.qa=function(){"undefined"!=typeof xy&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Pg(this,"timeout"),this.abort(8))},gy.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Pg(this,"complete"),Pg(this,"abort"),Dw(this))},gy.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Dw(this,!0)),Iw.X.M.call(this)},gy.Ha=function(){this.s||(this.F||this.v||this.l?Rw(this):this.fb())},gy.fb=function(){Rw(this)},gy.aa=function(){try{return 2<Lw(this)?this.g.status:-1}catch(lw){return-1}},gy.fa=function(){try{return this.g?this.g.responseText:""}catch(lw){return""}},gy.Sa=function(e){if(this.g){var t=this.g.responseText;
2return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Tw(t)}},gy.Ea=function(){return this.m},gy.Oa=function(){return"string"===typeof this.j?this.j:String(this.j)},(gy=qw.prototype).ma=8,gy.G=1,gy.Ja=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;var t=new kb(this,this.j,e,void 0),n=this.s;if(this.S&&(n?mg(n=pg(n),this.S):n=this.S),null!==this.o||this.N||(t.H=n,n=null),this.O)e:{for(var r=0,i=0;i<this.i.length;i++){var a=this.i[i];if(void 0===(a="__data__"in a.g&&"string"===typeof(a=a.g.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.i.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=Qw(this,t,r),Wb(i=zb(this.F),"RID",e),Wb(i,"CVER",22),this.D&&Wb(i,"X-HTTP-Session-Id",this.D),Yw(this,i),n&&(this.N?r="headers="+encodeURIComponent(String(Vw(n)))+"&"+r:this.o&&Bw(i,this.o,n)),pw(this.h,t),this.Ya&&Wb(i,"TYPE","init"),this.O?(Wb(i,"$req",r),Wb(i,"SID","null"),t.Z=!0,Tb(t,i,null)):Tb(t,i,r),this.G=2}}else 3==this.G&&(e?Gw(this,e):0==this.i.length||fw(this.h)||Gw(this))},gy.Ia=function(){if(this.u=null,Zw(this),this.$&&!(this.K||null==this.g||0>=this.P)){var e=2*this.P;this.j.info("BP detection timer enabled: "+e),this.B=fb(Ay(this.eb,this),e)}},gy.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,lb(10),Hw(this),Zw(this))},gy.cb=function(){null!=this.v&&(this.v=null,Hw(this),Xw(this),lb(19))},gy.kb=function(e){e?(this.j.info("Successfully pinged google.com"),lb(2)):(this.j.info("Failed to ping google.com"),lb(1))},(gy=sx.prototype).xa=function(){},gy.wa=function(){},gy.va=function(){},gy.ua=function(){},gy.Ra=function(){},ux.prototype.g=function(e,t){return new lx(e,t)},Oy(lx,Og),lx.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;lb(0),e.V=t,e.ia=n||{},e.L=e.Y,e.F=ax(e,null,e.V),Kw(e)},lx.prototype.close=function(){Uw(this.g)},lx.prototype.u=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=Dg(e),e=n);t.i.push(new sw(t.ab++,e)),3==t.G&&Kw(t)},lx.prototype.M=function(){this.g.l=null,delete this.j,Uw(this.g),delete this.g,lx.X.M.call(this)},Oy(cx,bb),Oy(fx,wb),Oy(hx,sx),hx.prototype.xa=function(){Pg(this.g,"a")},hx.prototype.wa=function(e){Pg(this.g,new cx(e))},hx.prototype.va=function(e){Pg(this.g,new fx)},hx.prototype.ua=function(){Pg(this.g,"b")},ux.prototype.createWebChannel=ux.prototype.g,lx.prototype.send=lx.prototype.u,lx.prototype.open=lx.prototype.m,lx.prototype.close=lx.prototype.close,hb.NO_ERROR=0,hb.TIMEOUT=8,hb.HTTP_ERROR=6,db.COMPLETE="complete",mb.EventType=gb,gb.OPEN="a",gb.CLOSE="b",gb.ERROR="c",gb.MESSAGE="d",Og.prototype.listen=Og.prototype.N,Iw.prototype.listenOnce=Iw.prototype.O,Iw.prototype.getLastError=Iw.prototype.Oa,Iw.prototype.getLastErrorCode=Iw.prototype.Ea,Iw.prototype.getStatus=Iw.prototype.aa,Iw.prototype.getResponseJson=Iw.prototype.Sa,Iw.prototype.getResponseText=Iw.prototype.fa,Iw.prototype.send=Iw.prototype.da,Iw.prototype.setWithCredentials=Iw.prototype.Ka;var dx=wy.createWebChannelTransport=function(){return new ux},px=wy.getStatEventTarget=function(){return ab()},vx=wy.ErrorCode=hb,mx=wy.EventType=db,yx=wy.Event=rb,gx=wy.Stat={sb:0,vb:1,wb:2,Pb:3,Ub:4,Rb:5,Sb:6,Qb:7,Ob:8,Tb:9,PROXY:10,NOPROXY:11,Mb:12,Ib:13,Jb:14,Hb:15,Kb:16,Lb:17,ob:18,nb:19,pb:20},bx=wy.FetchXmlHttpFactory=xw,wx=wy.WebChannel=mb,xx=wy.XhrIo=Iw,kx="@firebase/firestore",_x=function(){function e(t){ua(this,e),this.uid=t}return ca(e,[{key:"isAuthenticated",value:function(){return null!=this.uid}},{key:"toKey",value:function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}},{key:"isEqual",value:function(e){return e.uid===this.uid}}]),e}();_x.UNAUTHENTICATED=new _x(null),_x.GOOGLE_CREDENTIALS=new _x("google-credentials-uid"),_x.FIRST_PARTY=new _x("first-party-uid"),_x.MOCK_USER=new _x("mock-user");var Cx="9.17.1",Ex=new Eo("@firebase/firestore");function Sx(){return Ex.logLevel}function Tx(e){if(Ex.logLevel<=go.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(Ax);
2Ex.debug.apply(Ex,["Firestore (".concat(Cx,"): ").concat(e)].concat(bn(i)))}}function Ix(e){if(Ex.logLevel<=go.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(Ax);Ex.error.apply(Ex,["Firestore (".concat(Cx,"): ").concat(e)].concat(bn(i)))}}function Nx(e){if(Ex.logLevel<=go.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(Ax);Ex.warn.apply(Ex,["Firestore (".concat(Cx,"): ").concat(e)].concat(bn(i)))}}function Ax(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function jx(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(Cx,") INTERNAL ASSERTION FAILED: ")+e;throw Ix(t),new Error(t)}function Ox(e,t){e||jx()}function Px(e,t){return e}var Rx={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"},Dx=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this,e,r)).code=e,i.message=r,i.toString=function(){return"".concat(i.name,": [code=").concat(i.code,"]: ").concat(i.message)},i}return ca(n)}(Ua),Fx=ca((function e(){var t=this;ua(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),Lx=ca((function e(t,n){ua(this,e),this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(t))})),Mx=function(){function e(){ua(this,e)}return ca(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(_x.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),Vx=function(){function e(t){ua(this,e),this.t=t,this.currentUser=_x.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return ca(e,[{key:"start",value:function(e,t){var n=this,i=this.i,o=function(e){return n.i!==i?(i=n.i,t(e)):Promise.resolve()},s=new Fx;this.o=function(){n.i++,n.currentUser=n.u(),s.resolve(),s=new Fx,e.enqueueRetryable((function(){return o(n.currentUser)}))};var u=function(){var t=s;e.enqueueRetryable(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.promise;case 2:return e.next=4,o(n.currentUser);case 4:case"end":return e.stop()}}),e)}))))},l=function(e){Tx("FirebaseAuthCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),u()};this.t.onInit((function(e){return l(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?l(e):(Tx("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Fx)}}),0),u()}},{key:"getToken",value:function(){var e=this,t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.i!==t?(Tx("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(Ox("string"==typeof n.accessToken),new Lx(n.accessToken,e.currentUser)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.auth&&this.auth.removeAuthTokenListener(this.o)}},{key:"u",value:function(){var e=this.auth&&this.auth.getUid();return Ox(null===e||"string"==typeof e),new _x(e)}}]),e}(),Bx=function(){function e(t,n,r,i){ua(this,e),this.h=t,this.l=n,this.m=r,this.g=i,this.type="FirstParty",this.user=_x.FIRST_PARTY,this.p=new Map}return ca(e,[{key:"I",value:function(){return this.g?this.g():(Ox(!("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}},{key:"headers",get:function(){this.p.set("X-Goog-AuthUser",this.l);var e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}]),e}(),zx=function(){function e(t,n,r,i){ua(this,e),this.h=t,this.l=n,this.m=r,this.g=i}return ca(e,[{key:"getToken",value:function(){return Promise.resolve(new Bx(this.h,this.l,this.m,this.g))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(_x.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),qx=ca((function e(t){ua(this,e),this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)})),Ux=function(){function e(t){ua(this,e),this.T=t,this.forceRefresh=!1,this.appCheck=null,this.A=null}return ca(e,[{key:"start",value:function(e,t){var n=this,r=function(e){null!=e.error&&Tx("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));var r=e.token!==n.A;return n.A=e.token,Tx("FirebaseAppCheckTokenProvider","Received ".concat(r?"new":"existing"," token.")),r?t(e.token):Promise.resolve()};this.o=function(t){e.enqueueRetryable((function(){return r(t)}))};var i=function(e){Tx("FirebaseAppCheckTokenProvider","AppCheck detected"),n.appCheck=e,n.appCheck.addTokenListener(n.o)};this.T.onInit((function(e){return i(e)})),setTimeout((function(){if(!n.appCheck){var e=n.T.getImmediate({optional:!0});e?i(e):Tx("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}},{key:"getToken",value:function(){var e=this,t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then((function(t){return t?(Ox("string"==typeof t.token),e.A=t.token,new qx(t.token)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}]),e}();function Hx(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;
2r++)n[r]=Math.floor(256*Math.random());return n}var Wx=function(){function e(){ua(this,e)}return ca(e,null,[{key:"R",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=Hx(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n}}]),e}();function Kx(e,t){return e<t?-1:e>t?1:0}function Gx(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function Yx(e){return e+"\0"}var Qx=function(){function e(t,n){if(ua(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new Dx(Rx.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Dx(Rx.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new Dx(Rx.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Dx(Rx.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return ca(e,[{key:"toDate",value:function(){return new Date(this.toMillis())}},{key:"toMillis",value:function(){return 1e3*this.seconds+this.nanoseconds/1e6}},{key:"_compareTo",value:function(e){return this.seconds===e.seconds?Kx(this.nanoseconds,e.nanoseconds):Kx(this.seconds,e.seconds)}},{key:"isEqual",value:function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}},{key:"toString",value:function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}},{key:"toJSON",value:function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}},{key:"valueOf",value:function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}],[{key:"now",value:function(){return e.fromMillis(Date.now())}},{key:"fromDate",value:function(t){return e.fromMillis(t.getTime())}},{key:"fromMillis",value:function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))}}]),e}(),$x=function(){function e(t){ua(this,e),this.timestamp=t}return ca(e,[{key:"compareTo",value:function(e){return this.timestamp._compareTo(e.timestamp)}},{key:"isEqual",value:function(e){return this.timestamp.isEqual(e.timestamp)}},{key:"toMicroseconds",value:function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}},{key:"toString",value:function(){return"SnapshotVersion("+this.timestamp.toString()+")"}},{key:"toTimestamp",value:function(){return this.timestamp}}],[{key:"fromTimestamp",value:function(t){return new e(t)}},{key:"min",value:function(){return new e(new Qx(0,0))}},{key:"max",value:function(){return new e(new Qx(253402300799,999999999))}}]),e}(),Xx=function(){function e(t,n,r){ua(this,e),void 0===n?n=0:n>t.length&&jx(),void 0===r?r=t.length-n:r>t.length-n&&jx(),this.segments=t,this.offset=n,this.len=r}return ca(e,[{key:"length",get:function(){return this.len}},{key:"isEqual",value:function(t){return 0===e.comparator(this,t)}},{key:"child",value:function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)}},{key:"limit",value:function(){return this.offset+this.length}},{key:"popFirst",value:function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}},{key:"popLast",value:function(){return this.construct(this.segments,this.offset,this.length-1)}},{key:"firstSegment",value:function(){return this.segments[this.offset]}},{key:"lastSegment",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.segments[this.offset+e]}},{key:"isEmpty",value:function(){return 0===this.length}},{key:"isPrefixOf",value:function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"isImmediateParentOf",value:function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"forEach",value:function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}},{key:"toArray",value:function(){return this.segments.slice(this.offset,this.limit())}}
2],[{key:"comparator",value:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}]),e}(),Jx=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().join("/")}},{key:"toString",value:function(){return this.canonicalString()}}],[{key:"fromString",value:function(){for(var e=[],t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var s=o[a];if(s.indexOf("//")>=0)throw new Dx(Rx.INVALID_ARGUMENT,"Invalid segment (".concat(s,"). Paths must not contain // in them."));e.push.apply(e,bn(s.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(Xx),Zx=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ek=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),n.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")}},{key:"toString",value:function(){return this.canonicalString()}},{key:"isKeyField",value:function(){return 1===this.length&&"__name__"===this.get(0)}}],[{key:"isValidIdentifier",value:function(e){return Zx.test(e)}},{key:"keyField",value:function(){return new n(["__name__"])}},{key:"fromServerFormat",value:function(e){for(var t=[],r="",i=0,a=function(){if(0===r.length)throw new Dx(Rx.INVALID_ARGUMENT,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(r),r=""},o=!1;i<e.length;){var s=e[i];if("\\"===s){if(i+1===e.length)throw new Dx(Rx.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var u=e[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new Dx(Rx.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else"`"===s?(o=!o,i++):"."!==s||o?(r+=s,i++):(a(),i++)}if(a(),o)throw new Dx(Rx.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(Xx),tk=function(){function e(t){ua(this,e),this.path=t}return ca(e,[{key:"collectionGroup",get:function(){return this.path.popLast().lastSegment()}},{key:"hasCollectionId",value:function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}},{key:"getCollectionGroup",value:function(){return this.path.get(this.path.length-2)}},{key:"getCollectionPath",value:function(){return this.path.popLast()}},{key:"isEqual",value:function(e){return null!==e&&0===Jx.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(Jx.fromString(t))}},{key:"fromName",value:function(t){return new e(Jx.fromString(t).popFirst(5))}},{key:"empty",value:function(){return new e(Jx.emptyPath())}},{key:"comparator",value:function(e,t){return Jx.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new Jx(t.slice()))}}]),e}(),nk=ca((function e(t,n,r,i){ua(this,e),this.indexId=t,this.collectionGroup=n,this.fields=r,this.indexState=i}));function rk(e){return e.fields.find((function(e){return 2===e.kind}))}function ik(e){return e.fields.filter((function(e){return 2!==e.kind}))}nk.UNKNOWN_ID=-1;var ak=ca((function e(t,n){ua(this,e),this.fieldPath=t,this.kind=n}));var ok=function(){function e(t,n){ua(this,e),this.sequenceNumber=t,this.offset=n}return ca(e,null,[{key:"empty",value:function(){return new e(0,lk.min())}}]),e}();function sk(e,t){var n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=$x.fromTimestamp(1e9===r?new Qx(n+1,0):new Qx(n,r));return new lk(i,tk.empty(),t)}function uk(e){return new lk(e.readTime,e.key,-1)}var lk=function(){function e(t,n,r){ua(this,e),this.readTime=t,this.documentKey=n,this.largestBatchId=r}return ca(e,null,[{key:"min",value:function(){return new e($x.min(),tk.empty(),-1)}},{key:"max",value:function(){return new e($x.max(),tk.empty(),-1)}}]),e}();function ck(e,t){var n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=tk.comparator(e.documentKey,t.documentKey))?n:Kx(e.largestBatchId,t.largestBatchId)}var fk="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",hk=function(){function e(){ua(this,e),this.onCommittedListeners=[]}return ca(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEac
2h((function(e){return e()}))}}]),e}();function dk(e){return pk.apply(this,arguments)}function pk(){return pk=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===Rx.FAILED_PRECONDITION&&t.message===fk){e.next=2;break}throw t;case 2:Tx("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)}))),pk.apply(this,arguments)}var vk=function(){function e(t){var n=this;ua(this,e),this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((function(e){n.isDone=!0,n.result=e,n.nextCallback&&n.nextCallback(e)}),(function(e){n.isDone=!0,n.error=e,n.catchCallback&&n.catchCallback(e)}))}return ca(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&jx(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))}},{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))}},{key:"wrapUserFunction",value:function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}},{key:"wrapSuccess",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)}},{key:"wrapFailure",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)}}],[{key:"resolve",value:function(t){return new e((function(e,n){e(t)}))}}
2,{key:"reject",value:function(t){return new e((function(e,n){n(t)}))}},{key:"waitFor",value:function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))}},{key:"or",value:function(t){var n,r=e.resolve(!1),i=ya(t);try{var a=function(){var t=n.value;r=r.next((function(n){return n?e.resolve(n):t()}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return r}},{key:"forEach",value:function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)}},{key:"mapArray",value:function(t,n){return new e((function(e,r){for(var i=t.length,a=new Array(i),o=0,s=function(s){var u=s;n(t[u]).next((function(t){a[u]=t,++o===i&&e(a)}),(function(e){return r(e)}))},u=0;u<i;u++)s(u)}))}},{key:"doWhile",value:function(t,n){return new e((function(e,r){!function i(){!0===t()?n().next((function(){i()}),r):e()}()}))}}]),e}(),mk=function(){function e(t,n){var r=this;ua(this,e),this.action=t,this.transaction=n,this.aborted=!1,this.P=new Fx,this.transaction.oncomplete=function(){r.P.resolve()},this.transaction.onabort=function(){n.error?r.P.reject(new bk(t,n.error)):r.P.resolve()},this.transaction.onerror=function(e){var n=Ck(e.target.error);r.P.reject(new bk(t,n))}}return ca(e,[{key:"v",get:function(){return this.P.promise}},{key:"abort",value:function(e){e&&this.P.reject(e),this.aborted||(Tx("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}},{key:"V",value:function(){var e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}},{key:"store",value:function(e){var t=this.transaction.objectStore(e);return new xk(t)}}],[{key:"open",value:function(t,n,r,i){try{return new e(n,t.transaction(i,r))}catch(t){throw new bk(n,t)}}}]),e}(),yk=function(){function e(t,n,r){ua(this,e),this.name=t,this.version=n,this.S=r,12.2===e.D(La())&&Ix("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return ca(e,[{key:"F",value:function(){var e=a(r().mark((function e(t){var n=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.db,e.t0){e.next=6;break}return Tx("SimpleDb","Opening database:",this.name),e.next=5,new Promise((function(e,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(t){var n=t.target.result;e(n)},i.onblocked=function(){r(new bk(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(e){var n=e.target.error;"VersionError"===n.name?r(new Dx(Rx.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):"InvalidStateError"===n.name?r(new Dx(Rx.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+n)):r(new bk(t,n))},i.onupgradeneeded=function(e){Tx("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',e.oldVersion);var t=e.target.result;n.S.$(t,i.transaction,e.oldVersion,n.version).next((function(){Tx("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}));case 5:this.db=e.sent;case 6:return this.B&&(this.db.onversionchange=function(e){return n.B(e)}),e.abrupt("return",this.db);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"L",value:function(e){this.B=e,this.db&&(this.db.onversionchange=function(t){return e(t)})}},{key:"runTransaction",value:function(){var e=a(r().mark((function e(t,n,i,a){var o,s,u,l,c,f=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o="readonly"===n,s=0;case 2:return++s,e.prev=3,e.delegateYield(r().mark((function e(){var n,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.F(t);case 2:return f.db=e.sent,n=mk.open(f.db,t,o?"readonly":"readwrite",i),s=a(n).next((function(e){return n.V(),e})).catch((function(e){return n.abort(e),vk.reject(e)})).toPromise(),s.catch((function(){})),e.next=7,n.v;
2case 7:return e.t0=s,e.abrupt("return",{v:e.t0});case 9:case"end":return e.stop()}}),e)}))(),"t0",5);case 5:if("object"!==typeof(u=e.t0)){e.next=8;break}return e.abrupt("return",u.v);case 8:e.next=15;break;case 10:if(e.prev=10,e.t1=e.catch(3),l=e.t1,c="FirebaseError"!==l.name&&s<3,Tx("SimpleDb","Transaction failed with error:",l.message,"Retrying:",c),this.close(),c){e.next=15;break}return e.abrupt("return",Promise.reject(l));case 15:e.next=2;break;case 17:case"end":return e.stop()}}),e,this,[[3,10]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"close",value:function(){this.db&&this.db.close(),this.db=void 0}}],[{key:"delete",value:function(e){return Tx("SimpleDb","Removing database:",e),kk(window.indexedDB.deleteDatabase(e)).toPromise()}},{key:"C",value:function(){if(!qa())return!1;if(e.N())return!0;var t=La(),n=e.D(t),r=0<n&&n<10,i=e.k(t),a=0<i&&i<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||a)}},{key:"N",value:function(){var e;return"undefined"!=typeof process&&"YES"===(null===(e={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0})||void 0===e?void 0:e.O)}},{key:"M",value:function(e,t){return e.store(t)}},{key:"D",value:function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)}},{key:"k",value:function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}}]),e}(),gk=function(){function e(t){ua(this,e),this.q=t,this.U=!1,this.K=null}return ca(e,[{key:"isDone",get:function(){return this.U}},{key:"G",get:function(){return this.K}},{key:"cursor",set:function(e){this.q=e}},{key:"done",value:function(){this.U=!0}},{key:"j",value:function(e){this.K=e}},{key:"delete",value:function(){return kk(this.q.delete())}}]),e}(),bk=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this,Rx.UNAVAILABLE,"IndexedDB transaction '".concat(e,"' failed: ").concat(r))).name="IndexedDbTransactionError",i}return ca(n)}(Dx);function wk(e){return"IndexedDbTransactionError"===e.name}var xk=function(){function e(t){ua(this,e),this.store=t}return ca(e,[{key:"put",value:function(e,t){var n;return void 0!==t?(Tx("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(Tx("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),kk(n)}},{key:"add",value:function(e){return Tx("SimpleDb","ADD",this.store.name,e,e),kk(this.store.add(e))}},{key:"get",value:function(e){var t=this;return kk(this.store.get(e)).next((function(n){return void 0===n&&(n=null),Tx("SimpleDb","GET",t.store.name,e,n),n}))}},{key:"delete",value:function(e){return Tx("SimpleDb","DELETE",this.store.name,e),kk(this.store.delete(e))}},{key:"count",value:function(){return Tx("SimpleDb","COUNT",this.store.name),kk(this.store.count())}},{key:"W",value:function(e,t){var n=this.options(e,t);if(n.index||"function"!=typeof this.store.getAll){var r=this.cursor(n),i=[];return this.H(r,(function(e,t){i.push(t)})).next((function(){return i}))}var a=this.store.getAll(n.range);return new vk((function(e,t){a.onerror=function(e){t(e.target.error)},a.onsuccess=function(t){e(t.target.result)}}))}},{key:"J",value:function(e,t){var n=this.store.getAll(e,null===t?void 0:t);return new vk((function(e,t){n.onerror=function(e){t(e.target.error)},n.onsuccess=function(t){e(t.target.result)}}))}},{key:"Y",value:function(e,t){Tx("SimpleDb","DELETE ALL",this.store.name);var n=this.options(e,t);n.X=!1;var r=this.cursor(n);return this.H(r,(function(e,t,n){return n.delete()}))}},{key:"Z",value:function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.H(r,t)}},{key:"tt",value:function(e){var t=this.cursor({});return new vk((function(n,r){t.onerror=function(e){var t=Ck(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))}},{key:"H",value:function(e,t){var n=[];return new vk((function(r,i){e.onerror=function(e){i(e.target.error)},e.onsuccess=function(e){var i=e.target.result;if(i){var a=new gk(i),o=t(i.primaryKey,i.value,a);if(o instanceof vk){var s=o.catch((function(e){return a.done(),vk.reject(e)}));n.push(s)}a.isDone?r():null===a.G?i.continue():i.continue(a.G)}else r()}})).next((function(){return vk.waitFor(n)}))}},{key:"options",value:function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}}},{key:"cursor",value:function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.X?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}]),e}();function kk(e){return new vk((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=Ck(e.target.error);n(t)}}))}var _k=!1;function Ck(e){var t=yk.D(La());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new Dx("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '".concat(n,"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround."));return _k||(_k=!0,setTimeout((function(){throw r}),0)),r}}return e}var Ek=function(){function e(t,n){ua(this,e),this.asyncQueue=t,this.et=n,this.task=null}return ca(e,[{key:"start",value:function(){this.nt(15e3)}},{key:"stop",value:function(){this.task&&(this.task.cancel(),this.task=null)}},{key:"started",get:function(){return null!==this.task}},{key:"nt",value:function(e){var t=this;Tx("IndexBackiller","Scheduled in ".concat(e,"ms")),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.task=null,e.prev=1,e.t0=Tx,e.t1="Documents written: ",e.next=6,t.et.st();case 6:e.t2=e.sent,e.t3=e.t1.concat.call(e.t1,e.t2),(0,e.t0)("IndexBackiller",e.t3),e.next=19;break;case 11:if(e.prev=11,e.t4=e.catch(1),!wk(e.t4)){e.next=17;break}Tx("IndexBackiller","Ignoring IndexedDB error during index backfill: ",e.t4),e.next=19;break;case 17:return e.next=19,dk(e.t4);case 19:return e.next=21,t.nt(6e4);case 21:case"end":return e.stop()}}),e,null,[[1,11]])}))))}}]),e}(),Sk=function(){function e(t,n){ua(this,e),this.localStore=t,this.persistence=n}return ca(e,[{key:"st",value:function(){var e=a(r().mark((function e(){var t,n=this,i=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:50,e.abrupt("return",this.persistence.runTransaction("Backfill Indexes","readwrite-primary",(function(e){return n.it(e,t)})));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"it",value:function(e,t){var n=this,r=new Set,i=t,a=!0;
2return vk.doWhile((function(){return!0===a&&i>0}),(function(){return n.localStore.indexManager.getNextCollectionGroupToUpdate(e).next((function(t){if(null!==t&&!r.has(t))return Tx("IndexBackiller","Processing collection: ".concat(t)),n.rt(e,t,i).next((function(e){i-=e,r.add(t)}));a=!1}))})).next((function(){return t-i}))}},{key:"rt",value:function(e,t,n){var r=this;return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,t).next((function(i){return r.localStore.localDocuments.getNextDocuments(e,t,i,n).next((function(n){var a=n.changes;return r.localStore.indexManager.updateIndexEntries(e,a).next((function(){return r.ot(i,n)})).next((function(n){return Tx("IndexBackiller","Updating offset: ".concat(n)),r.localStore.indexManager.updateCollectionGroup(e,t,n)})).next((function(){return a.size}))}))}))}},{key:"ot",value:function(e,t){var n=e;return t.changes.forEach((function(e,t){var r=uk(t);ck(r,n)>0&&(n=r)})),new lk(n.readTime,n.documentKey,Math.max(t.batchId,e.largestBatchId))}}]),e}(),Tk=function(){function e(t,n){var r=this;ua(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.ut(e)},this.ct=function(e){return n.writeSequenceNumber(e)})}return ca(e,[{key:"ut",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this.ct&&this.ct(e),e}}]),e}();Tk.at=-1;var Ik=ca((function e(t,n,r,i,a,o,s,u){ua(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=s,this.useFetchStreams=u})),Nk=function(){function e(t,n){ua(this,e),this.projectId=t,this.database=n||"(default)"}return ca(e,[{key:"isDefaultDatabase",get:function(){return"(default)"===this.database}},{key:"isEqual",value:function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}}],[{key:"empty",value:function(){return new e("","")}}]),e}();function Ak(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function jk(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Ok(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function Pk(e){return null==e}function Rk(e){return 0===e&&1/e==-1/0}function Dk(e){return"number"==typeof e&&Number.isInteger(e)&&!Rk(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var Fk=function(e){function t(e){ua(this,t),this.binaryString=e}return ca(t,[{key:Symbol.iterator,value:function(){var e=this,t=0;return{next:function(){return t<e.binaryString.length?{value:e.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}}},{key:"toBase64",value:function(){return e=this.binaryString,btoa(e);var e}},{key:"toUint8Array",value:function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}},{key:"approximateByteSize",value:function(){return 2*this.binaryString.length}},{key:"compareTo",value:function(e){return Kx(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(e){return new t(atob(e))}},{key:"fromUint8Array",value:function(e){var n=function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new t(n)}}]),t}();Fk.EMPTY_BYTE_STRING=new Fk("");var Lk=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Mk(e){if(Ox(!!e),"string"==typeof e){var t=0,n=Lk.exec(e);if(Ox(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:Vk(e.seconds),nanos:Vk(e.nanos)}}function Vk(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Bk(e){return"string"==typeof e?Fk.fromBase64String(e):Fk.fromUint8Array(e)}function zk(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 qk(e){var t=e.mapValue.fields.__previous_value__;return zk(t)?qk(t):t}function Uk(e){var t=Mk(e.mapValue.fields.__local_write_time__.timestampValue);return new Qx(t.seconds,t.nanos)}var Hk={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},Wk={nullValue:"NULL_VALUE"};function Kk(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?zk(e)?4:o_(e)?9007199254740991:10:jx()}function Gk(e,t){if(e===t)return!0;var n=Kk(e);if(n!==Kk(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Uk(e).isEqual(Uk(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;var n=Mk(e.timestampValue),r=Mk(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 Bk(e.bytesValue).isEqual(Bk(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Vk(e.geoPointValue.latitude)===Vk(t.geoPointValue.latitude)&&Vk(e.geoPointValue.longitude)===Vk(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Vk(e.integerValue)===Vk(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=Vk(e.doubleValue),r=Vk(t.doubleValue);return n===r?Rk(n)===Rk(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Gx(e.arrayValue.values||[],t.arrayValue.values||[],Gk);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Ak(n)!==Ak(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Gk(n[i],r[i])))return!1;return!0}(e,t);default:return jx()}}function Yk(e,t){return void 0!==(e.values||[]).find((function(e){return Gk(e,t)}))}function Qk(e,t){if(e===t)return 0;var n=Kk(e),r=Kk(t);if(n!==r)return Kx(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Kx(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=Vk(e.integerValue||e.doubleValue),r=Vk(t.
2integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return $k(e.timestampValue,t.timestampValue);case 4:return $k(Uk(e),Uk(t));case 5:return Kx(e.stringValue,t.stringValue);case 6:return function(e,t){var n=Bk(e),r=Bk(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var a=Kx(n[i],r[i]);if(0!==a)return a}return Kx(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=Kx(Vk(e.latitude),Vk(t.latitude));return 0!==n?n:Kx(Vk(e.longitude),Vk(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var a=Qk(n[i],r[i]);if(a)return a}return Kx(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===Hk.mapValue&&t===Hk.mapValue)return 0;if(e===Hk.mapValue)return 1;if(t===Hk.mapValue)return-1;var n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(var o=0;o<r.length&&o<a.length;++o){var s=Kx(r[o],a[o]);if(0!==s)return s;var u=Qk(n[r[o]],i[a[o]]);if(0!==u)return u}return Kx(r.length,a.length)}(e.mapValue,t.mapValue);default:throw jx()}}function $k(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Kx(e,t);var n=Mk(e),r=Mk(t),i=Kx(n.seconds,r.seconds);return 0!==i?i:Kx(n.nanos,r.nanos)}function Xk(e){return Jk(e)}function Jk(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){var t=Mk(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?Bk(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,tk.fromName(n).toString()):"geoPointValue"in e?"geo(".concat((t=e.geoPointValue).latitude,",").concat(t.longitude,")"):"arrayValue"in e?function(e){var t,n="[",r=!0,i=ya(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=Jk(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n="{",r=!0,i=ya(Object.keys(e.fields||{}).sort());try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+="".concat(a,":").concat(Jk(e.fields[a]))}}catch(o){i.e(o)}finally{i.f()}return n+"}"}(e.mapValue):jx();var t,n}function Zk(e,t){return{referenceValue:"projects/".concat(e.projectId,"/databases/").concat(e.database,"/documents/").concat(t.path.canonicalString())}}function e_(e){return!!e&&"integerValue"in e}function t_(e){return!!e&&"arrayValue"in e}function n_(e){return!!e&&"nullValue"in e}function r_(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function i_(e){return!!e&&"mapValue"in e}function a_(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){var t={mapValue:{fields:{}}};return jk(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=a_(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=a_(e.arrayValue.values[r]);return n}return Object.assign({},e)}function o_(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}function s_(e){return"nullValue"in e?Wk:"booleanValue"in e?{booleanValue:!1}:"integerValue"in e||"doubleValue"in e?{doubleValue:NaN}:"timestampValue"in e?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in e?{stringValue:""}:"bytesValue"in e?{bytesValue:""}:"referenceValue"in e?Zk(Nk.empty(),tk.empty()):"geoPointValue"in e?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in e?{arrayValue:{}}:"mapValue"in e?{mapValue:{}}:jx()}function u_(e){return"nullValue"in e?{booleanValue:!1}:"booleanValue"in e?{doubleValue:NaN}:"integerValue"in e||"doubleValue"in e?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in e?{stringValue:""}:"stringValue"in e?{bytesValue:""}
2:"bytesValue"in e?Zk(Nk.empty(),tk.empty()):"referenceValue"in e?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in e?{arrayValue:{}}:"arrayValue"in e?{mapValue:{}}:"mapValue"in e?Hk:jx()}function l_(e,t){var n=Qk(e.value,t.value);return 0!==n?n:e.inclusive&&!t.inclusive?-1:!e.inclusive&&t.inclusive?1:0}function c_(e,t){var n=Qk(e.value,t.value);return 0!==n?n:e.inclusive&&!t.inclusive?1:!e.inclusive&&t.inclusive?-1:0}var f_=ca((function e(t,n){ua(this,e),this.position=t,this.inclusive=n}));function h_(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];if(r=a.field.isKeyField()?tk.comparator(tk.fromName(o.referenceValue),n.key):Qk(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return r}function d_(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(var n=0;n<e.position.length;n++)if(!Gk(e.position[n],t.position[n]))return!1;return!0}var p_=ca((function e(){ua(this,e)})),v_=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a;return ua(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return ca(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(Qk(t,this.value)):null!==t&&Kk(this.value)===Kk(t)&&this.matchesComparison(Qk(t,this.value))}},{key:"matchesComparison",value:function(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 jx()}}},{key:"isInequality",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}},{key:"getFlattenedFilters",value:function(){return[this]}},{key:"getFilters",value:function(){return[this]}},{key:"getFirstInequalityField",value:function(){return this.isInequality()?this.field:null}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,r):new E_(e,t,r):"array-contains"===t?new N_(e,r):"in"===t?new A_(e,r):"not-in"===t?new j_(e,r):"array-contains-any"===t?new O_(e,r):new n(e,t,r)}},{key:"createKeyFieldInFilter",value:function(e,t,n){return"in"===t?new S_(e,n):new T_(e,n)}}]),n}(p_),m_=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).filters=e,i.op=r,i.ht=null,i}return ca(n,[{key:"matches",value:function(e){return y_(this)?void 0===this.filters.find((function(t){return!t.matches(e)})):void 0!==this.filters.find((function(t){return t.matches(e)}))}},{key:"getFlattenedFilters",value:function(){return null!==this.ht||(this.ht=this.filters.reduce((function(e,t){return e.concat(t.getFlattenedFilters())}),[])),this.ht}},{key:"getFilters",value:function(){return Object.assign([],this.filters)}},{key:"getFirstInequalityField",value:function(){var e=this.lt((function(e){return e.isInequality()}));return null!==e?e.field:null}},{key:"lt",value:function(e){var t,n=ya(this.getFlattenedFilters());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e(r))return r}}catch(i){n.e(i)}finally{n.f()}return null}}],[{key:"create",value:function(e,t){return new n(e,t)}}]),n}(p_);function y_(e){return"and"===e.op}function g_(e){return"or"===e.op}function b_(e){return w_(e)&&y_(e)}function w_(e){var t,n=ya(e.filters);try{for(n.s();!(t=n.n()).done;){if(t.value instanceof m_)return!1}}catch(r){n.e(r)}finally{n.f()}return!0}function x_(e){if(e instanceof v_)return e.field.canonicalString()+e.op.toString()+Xk(e.value);if(b_(e))return e.filters.map((function(e){return x_(e)})).join(",");var t=e.filters.map((function(e){return x_(e)})).join(",");return"".concat(e.op,"(").concat(t,")")}function k_(e,t){return e instanceof v_?function(e,t){return t instanceof v_&&e.op===t.op&&e.field.isEqual(t.field)&&Gk(e.value,t.value)}(e,t):e instanceof m_?function(e,t){return t instanceof m_&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce((function(e,n,r){return e&&k_(n,t.filters[r])}),!0)}(e,t):void jx()}function __(e,t){var n=e.filters.concat(t);return m_.create(n,e.op)}function C_(e){return e instanceof v_?function(e){return"".concat(e.field.canonicalString()," ").concat(e.op," ").concat(Xk(e.value))}(e):e instanceof m_?function(e){return e.op.toString()+" {"+e.getFilters().map(C_).join(" ,")+"}"}(e):"Filter"}var E_=function(e){ha(n,e);var t=pa(n);
2function n(e,r,i){var a;return ua(this,n),(a=t.call(this,e,r,i)).key=tk.fromName(i.referenceValue),a}return ca(n,[{key:"matches",value:function(e){var t=tk.comparator(e.key,this.key);return this.matchesComparison(t)}}]),n}(v_),S_=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this,e,"in",r)).keys=I_("in",r),i}return ca(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(v_),T_=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this,e,"not-in",r)).keys=I_("not-in",r),i}return ca(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(v_);function I_(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return tk.fromName(e.referenceValue)}))}var N_=function(e){ha(n,e);var t=pa(n);function n(e,r){return ua(this,n),t.call(this,e,"array-contains",r)}return ca(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return t_(t)&&Yk(t.arrayValue,this.value)}}]),n}(v_),A_=function(e){ha(n,e);var t=pa(n);function n(e,r){return ua(this,n),t.call(this,e,"in",r)}return ca(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&Yk(this.value.arrayValue,t)}}]),n}(v_),j_=function(e){ha(n,e);var t=pa(n);function n(e,r){return ua(this,n),t.call(this,e,"not-in",r)}return ca(n,[{key:"matches",value:function(e){if(Yk(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!Yk(this.value.arrayValue,t)}}]),n}(v_),O_=function(e){ha(n,e);var t=pa(n);function n(e,r){return ua(this,n),t.call(this,e,"array-contains-any",r)}return ca(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!t_(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return Yk(t.value.arrayValue,e)}))}}]),n}(v_),P_=ca((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";ua(this,e),this.field=t,this.dir=n}));function R_(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var D_=function(){function e(t,n){ua(this,e),this.comparator=t,this.root=n||L_.EMPTY}return ca(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,L_.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,L_.BLACK,null,null))}},{key:"get",value:function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}},{key:"indexOf",value:function(e){for(var t=0,n=this.root;!n.isEmpty();){var 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}},{key:"isEmpty",value:function(){return this.root.isEmpty()}},{key:"size",get:function(){return this.root.size}},{key:"minKey",value:function(){return this.root.minKey()}},{key:"maxKey",value:function(){return this.root.maxKey()}},{key:"inorderTraversal",value:function(e){return this.root.inorderTraversal(e)}},{key:"forEach",value:function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))}},{key:"toString",value:function(){var e=[];return this.inorderTraversal((function(t,n){return e.push("".concat(t,":").concat(n)),!1})),"{".concat(e.join(", "),"}")}},{key:"reverseTraversal",value:function(e){return this.root.reverseTraversal(e)}},{key:"getIterator",value:function(){return new F_(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new F_(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new F_(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new F_(this.root,e,this.comparator,!0)}}]),e}(),F_=function(){function e(t,n,r,i){ua(this,e),this.isReverse=i,this.nodeStack=[];for(var a=1;!t.isEmpty();)if(a=n?r(t.key,n):1,n&&i&&(a*=-1),a<0)t=this.isReverse?t.left:t.right;else{if(0===a){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return ca(e,[{key:"getNext",value:function(){var e=this.nodeStack.pop(),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}},{key:"hasNext",value:function(){return this.nodeStack.length>0}},{key:"peek",value:function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}]),e}(),L_=function(){function e(t,n,r,i,a){ua(this,e),this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=a?a:e.EMPTY,this.size=this.left.size+1+this.right.size}
2return ca(e,[{key:"copy",value:function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)}},{key:"isEmpty",value:function(){return!1}},{key:"inorderTraversal",value:function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}},{key:"min",value:function(){return this.left.isEmpty()?this:this.left.min()}},{key:"minKey",value:function(){return this.min().key}},{key:"maxKey",value:function(){return this.right.isEmpty()?this.key:this.right.maxKey()}},{key:"insert",value:function(e,t,n){var r=this,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))).fixUp()}},{key:"removeMin",value:function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()}},{key:"remove",value:function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()}},{key:"isRed",value:function(){return this.color}},{key:"fixUp",value:function(){var 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}},{key:"moveRedLeft",value:function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}},{key:"moveRedRight",value:function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}},{key:"rotateLeft",value:function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}},{key:"rotateRight",value:function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}},{key:"colorFlip",value:function(){var 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)}},{key:"checkMaxDepth",value:function(){var e=this.check();return Math.pow(2,e)<=this.size+1}},{key:"check",value:function(){if(this.isRed()&&this.left.isRed())throw jx();if(this.right.isRed())throw jx();var e=this.left.check();if(e!==this.right.check())throw jx();return e+(this.isRed()?0:1)}}]),e}();L_.EMPTY=null,L_.RED=!0,L_.BLACK=!1,L_.EMPTY=new(function(){function e(){ua(this,e),this.size=0}return ca(e,[{key:"key",get:function(){throw jx()}},{key:"value",get:function(){throw jx()}},{key:"color",get:function(){throw jx()}},{key:"left",get:function(){throw jx()}},{key:"right",get:function(){throw jx()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new L_(e,t)}},{key:"remove",value:function(e,t){return this}},{key:"isEmpty",value:function(){return!0}},{key:"inorderTraversal",value:function(e){return!1}},{key:"reverseTraversal",value:function(e){return!1}},{key:"minKey",value:function(){return null}},{key:"maxKey",value:function(){return null}},{key:"isRed",value:function(){return!1}},{key:"checkMaxDepth",value:function(){return!0}},{key:"check",value:function(){return 0}}]),e}());var M_=function(){function e(t){ua(this,e),this.comparator=t,this.data=new D_(this.comparator)}return ca(e,[{key:"has",value:function(e){return null!==this.data.get(e)}},{key:"first",value:function(){return this.data.minKey()}},{key:"last",value:function(){return this.data.maxKey()}},{key:"size",get:function(){return this.data.size}},{key:"indexOf",value:function(e){return this.data.indexOf(e)}}
2,{key:"forEach",value:function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"forEachInRange",value:function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}},{key:"forEachWhile",value:function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}},{key:"firstAfterOrEqual",value:function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}},{key:"getIterator",value:function(){return new V_(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new V_(this.data.getIteratorFrom(e))}},{key:"add",value:function(e){return this.copy(this.data.remove(e).insert(e,!0))}},{key:"delete",value:function(e){return this.has(e)?this.copy(this.data.remove(e)):this}},{key:"isEmpty",value:function(){return this.data.isEmpty()}},{key:"unionWith",value:function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(0!==this.comparator(i,a))return!1}return!0}},{key:"toArray",value:function(){var e=[];return this.forEach((function(t){e.push(t)})),e}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"}},{key:"copy",value:function(t){var n=new e(this.comparator);return n.data=t,n}}]),e}(),V_=function(){function e(t){ua(this,e),this.iter=t}return ca(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}();function B_(e){return e.hasNext()?e.getNext():void 0}var z_=function(){function e(t){ua(this,e),this.fields=t,t.sort(ek.comparator)}return ca(e,[{key:"unionWith",value:function(t){var n,r=new M_(ek.comparator),i=ya(this.fields);try{for(i.s();!(n=i.n()).done;){var a=n.value;r=r.add(a)}}catch(l){i.e(l)}finally{i.f()}var o,s=ya(t);try{for(s.s();!(o=s.n()).done;){var u=o.value;r=r.add(u)}}catch(l){s.e(l)}finally{s.f()}return new e(r.toArray())}},{key:"covers",value:function(e){var t,n=ya(this.fields);try{for(n.s();!(t=n.n()).done;){if(t.value.isPrefixOf(e))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"isEqual",value:function(e){return Gx(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))}}],[{key:"empty",value:function(){return new e([])}}]),e}(),q_=function(){function e(t){ua(this,e),this.value=t}return ca(e,[{key:"field",value:function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!i_(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}},{key:"set",value:function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=a_(t)}},{key:"setAll",value:function(e){var t=this,n=ek.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=a_(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());i_(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return Gk(this.value,e.value)}},{key:"getFieldsMap",value:function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];i_(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}},{key:"applyChanges",value:function(e,t,n){jk(t,(function(t,n){return e[t]=n}));var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;delete e[a]}}catch(o){i.e(o)}finally{i.f()}}},{key:"clone",value:function(){return new e(a_(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();function U_(e){var t=[];return jk(e.fields,(function(e,n){var r=new ek([e]);if(i_(n)){var i=U_(n.mapValue).fields;if(0===i.length)t.push(r);else{var a,o=ya(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;t.push(r.child(s))}}catch(u){o.e(u)}finally{o.f()}}}else t.push(r)})),new z_(t)}var H_=function(){function e(t,n,r,i,a,o,s){ua(this,e),this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.createTime=a,this.data=o,this.documentState=s}
2return ca(e,[{key:"convertToFoundDocument",value:function(e,t){return!this.createTime.isEqual($x.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}},{key:"convertToNoDocument",value:function(e){return this.version=e,this.documentType=2,this.data=q_.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=q_.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this.version=$x.min(),this}},{key:"setReadTime",value:function(e){return this.readTime=e,this}},{key:"hasLocalMutations",get:function(){return 1===this.documentState}},{key:"hasCommittedMutations",get:function(){return 2===this.documentState}},{key:"hasPendingWrites",get:function(){return this.hasLocalMutations||this.hasCommittedMutations}},{key:"isValidDocument",value:function(){return 0!==this.documentType}},{key:"isFoundDocument",value:function(){return 1===this.documentType}},{key:"isNoDocument",value:function(){return 2===this.documentType}},{key:"isUnknownDocument",value:function(){return 3===this.documentType}},{key:"isEqual",value:function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}},{key:"mutableCopy",value:function(){return new e(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {createTime: ").concat(this.createTime,"}), {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,$x.min(),$x.min(),$x.min(),q_.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r,i){return new e(t,1,n,$x.min(),r,i,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,$x.min(),$x.min(),q_.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,$x.min(),$x.min(),q_.empty(),2)}}]),e}(),W_=ca((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;ua(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=s,this.ft=null}));function K_(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return new W_(e,t,n,r,i,a,o)}function G_(e){var t=Px(e);if(null===t.ft){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return x_(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),Pk(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map((function(e){return Xk(e)})).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((function(e){return Xk(e)})).join(",")),t.ft=n}return t.ft}function Y_(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!R_(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(!k_(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!d_(e.startAt,t.startAt)&&d_(e.endAt,t.endAt)}function Q_(e){return tk.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}function $_(e,t){return e.filters.filter((function(e){return e instanceof v_&&e.field.isEqual(t)}))}function X_(e,t,n){var r,i=Wk,a=!0,o=ya($_(e,t));try{for(o.s();!(r=o.n()).done;){var s=r.value,u=Wk,l=!0;switch(s.op){case"<":case"<=":u=s_(s.value);break;case"==":case"in":case">=":u=s.value;break;case">":u=s.value,l=!1;break;case"!=":case"not-in":u=Wk}l_({value:i,inclusive:a},{value:u,inclusive:l})<0&&(i=u,a=l)}}catch(h){o.e(h)}finally{o.f()}if(null!==n)for(var c=0;c<e.orderBy.length;++c)if(e.orderBy[c].field.isEqual(t)){var f=n.position[c];l_({value:i,inclusive:a},{value:f,inclusive:n.inclusive})<0&&(i=f,a=n.inclusive);break}return{value:i,inclusive:a}}function J_(e,t,n){var r,i=Hk,a=!0,o=ya($_(e,t));try{for(o.s();!(r=o.n()).done;){var s=r.value,u=Hk,l=!0;switch(s.op){case">=":case">":u=u_(s.value),l=!1;break;case"==":case"in":case"<=":u=s.value;break;case"<":u=s.value,l=!1;break;case"!=":case"not-in":u=Hk}c_({value:i,inclusive:a},{value:u,inclusive:l})>0&&(i=u,a=l)}}catch(h){o.e(h)}finally{o.f()}if(null!==n)for(var c=0;c<e.orderBy.length;++c)if(e.orderBy[c].field.isEqual(t)){var f=n.position[c];c_({value:i,inclusive:a},{value:f,inclusive:n.inclusive})>0&&(i=f,a=n.inclusive);break}return{value:i,inclusive:a}}var Z_=ca((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;ua(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=s,this.endAt=u,this.dt=null,this._t=null,this.startAt,this.endAt}));function eC(e,t,n,r,i,a,o,s){return new Z_(e,t,n,r,i,a,o,s)}function tC(e){return new Z_(e)}function nC(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())}function rC(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function iC(e){var t,n=ya(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value.getFirstInequalityField();if(null!==r)return r}}catch(i){n.e(i)}finally{n.f()}return null}function aC(e){return null!==e.collectionGroup}function oC(e){var t=Px(e);if(null===t.dt){t.dt=[];var n=iC(t),r=rC(t);if(null!==n&&null===r)n.isKeyField()||t.dt.push(new P_(n)),t.dt.push(new P_(ek.keyField(),"asc"));else{var i,a=!1,o=ya(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.dt.push(s),s.field.isKeyField()&&(a=!0)}}catch(l){o.e(l)}finally{o.f()}if(!a){var u=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.dt.push(new P_(ek.keyField(),u))}}}return t.dt}function sC(e){var t=Px(e);if(!t._t)if("F"===t.limitType)t._t=K_(t.path,t.collectionGroup,oC(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=ya(oC(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new P_(a.field,o))}}catch(l){i.e(l)}finally{i.f()}var s=t.endAt?new f_(t.endAt.position,t.endAt.inclusive):null,u=t.
2startAt?new f_(t.startAt.position,t.startAt.inclusive):null;t._t=K_(t.path,t.collectionGroup,r,t.filters,t.limit,s,u)}return t._t}function uC(e,t,n){return new Z_(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function lC(e,t){return Y_(sC(e),sC(t))&&e.limitType===t.limitType}function cC(e){return"".concat(G_(sC(e)),"|lt:").concat(e.limitType)}function fC(e){return"Query(target=".concat(function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: [".concat(e.filters.map((function(e){return C_(e)})).join(", "),"]")),Pk(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: [".concat(e.orderBy.map((function(e){return function(e){return"".concat(e.field.canonicalString()," (").concat(e.dir,")")}(e)})).join(", "),"]")),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((function(e){return Xk(e)})).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((function(e){return Xk(e)})).join(",")),"Target(".concat(t,")")}(sC(e)),"; limitType=").concat(e.limitType,")")}function hC(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):tk.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=ya(oC(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}(e,t)&&function(e,t){var n,r=ya(e.filters);try{for(r.s();!(n=r.n()).done;){if(!n.value.matches(t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){var r=h_(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,oC(e),t))&&!(e.endAt&&!function(e,t,n){var r=h_(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,oC(e),t))}(e,t)}function dC(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function pC(e){return function(t,n){var r,i=!1,a=ya(oC(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=vC(o,t,n);if(0!==s)return s;i=i||o.field.isKeyField()}}catch(u){a.e(u)}finally{a.f()}return 0}}function vC(e,t,n){var r=e.field.isKeyField()?tk.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Qk(r,i):jx()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return jx()}}function mC(e,t){if(e.wt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Rk(t)?"-0":t}}function yC(e){return{integerValue:""+e}}function gC(e,t){return Dk(t)?yC(t):mC(e,t)}var bC=ca((function e(){ua(this,e),this._=void 0}));function wC(e,t,n){return e instanceof _C?function(e,t){var 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 CC?EC(e,t):e instanceof SC?TC(e,t):function(e,t){var n=kC(e,t),r=NC(n)+NC(e.gt);return e_(n)&&e_(e.gt)?yC(r):mC(e.yt,r)}(e,t)}function xC(e,t,n){return e instanceof CC?EC(e,t):e instanceof SC?TC(e,t):n}function kC(e,t){return e instanceof IC?e_(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var _C=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n)}(bC),CC=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this)).elements=e,r}return ca(n)}(bC);function EC(e,t){var n,r=AC(t),i=ya(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return Gk(t,e)}))||r.push(e)};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var SC=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this)).elements=e,r}return ca(n)}(bC);function TC(e,t){var n,r=AC(t),i=ya(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!Gk(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var IC=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).yt=e,i.gt=r,i}return ca(n)}(bC);function NC(e){return Vk(e.integerValue||e.doubleValue)}function AC(e){return t_(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var jC=ca((function e(t,n){ua(this,e),this.field=t,this.transform=n}));var OC=ca((function e(t,n){ua(this,e),this.version=t,this.transformResults=n})),PC=function(){function e(t,n){ua(this,e),this.updateTime=t,this.exists=n}return ca(e,[{key:"isNone",get:function(){return void 0===this.updateTime&&void 0===this.exists}},{key:"isEqual",value:function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}],[{key:"none",value:function(){return new e}},{key:"exists",value:function(t){return new e(void 0,t)}},{key:"updateTime",value:function(t){return new e(t)}}]),e}();function RC(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var DC=ca((function e(){ua(this,e)}));function FC(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;
2if(null===t)return e.isNoDocument()?new YC(e.key,PC.none()):new zC(e.key,e.data,PC.none());var n,r=e.data,i=q_.empty(),a=new M_(ek.comparator),o=ya(t.fields);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(!a.has(s)){var u=r.field(s);null===u&&s.length>1&&(s=s.popLast(),u=r.field(s)),null===u?i.delete(s):i.set(s,u),a=a.add(s)}}}catch(l){o.e(l)}finally{o.f()}return new qC(e.key,i,new z_(a.toArray()),PC.none())}function LC(e,t,n){e instanceof zC?function(e,t,n){var r=e.value.clone(),i=HC(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof qC?function(e,t,n){if(RC(e.precondition,t)){var r=HC(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(UC(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function MC(e,t,n,r){return e instanceof zC?function(e,t,n,r){if(!RC(e.precondition,t))return n;var i=e.value.clone(),a=WC(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof qC?function(e,t,n,r){if(!RC(e.precondition,t))return n;var i=WC(e.fieldTransforms,r,t),a=t.data;return a.setAll(UC(e)),a.setAll(i),t.convertToFoundDocument(t.version,a).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((function(e){return e.field})))}(e,t,n,r):function(e,t,n){return RC(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function VC(e,t){var n,r=null,i=ya(e.fieldTransforms);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.field),s=kC(a.transform,o||null);null!=s&&(null===r&&(r=q_.empty()),r.set(a.field,s))}}catch(u){i.e(u)}finally{i.f()}return r||null}function BC(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)&&Gx(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof CC&&t instanceof CC||e instanceof SC&&t instanceof SC?Gx(e.elements,t.elements,Gk):e instanceof IC&&t instanceof IC?Gk(e.gt,t.gt):e instanceof _C&&t instanceof _C}(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))}var zC=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];
2return ua(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return ca(n,[{key:"getFieldMask",value:function(){return null}}]),n}(DC),qC=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return ua(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=s,o.type=1,o}return ca(n,[{key:"getFieldMask",value:function(){return this.fieldMask}}]),n}(DC);function UC(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function HC(e,t,n){var r=new Map;Ox(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,s=t.data.field(a.field);r.set(a.field,xC(o,s,n[i]))}return r}function WC(e,t,n){var r,i=new Map,a=ya(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.transform,u=n.data.field(o.field);i.set(o.field,wC(s,u,t))}}catch(l){a.e(l)}finally{a.f()}return i}var KC,GC,YC=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=2,i.fieldTransforms=[],i}return ca(n,[{key:"getFieldMask",value:function(){return null}}]),n}(DC),QC=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).key=e,i.precondition=r,i.type=3,i.fieldTransforms=[],i}return ca(n,[{key:"getFieldMask",value:function(){return null}}]),n}(DC),$C=ca((function e(t){ua(this,e),this.count=t}));function XC(e){switch(e){default:return jx();case Rx.CANCELLED:case Rx.UNKNOWN:case Rx.DEADLINE_EXCEEDED:case Rx.RESOURCE_EXHAUSTED:case Rx.INTERNAL:case Rx.UNAVAILABLE:case Rx.UNAUTHENTICATED:return!1;case Rx.INVALID_ARGUMENT:case Rx.NOT_FOUND:case Rx.ALREADY_EXISTS:case Rx.PERMISSION_DENIED:case Rx.FAILED_PRECONDITION:case Rx.ABORTED:case Rx.OUT_OF_RANGE:case Rx.UNIMPLEMENTED:case Rx.DATA_LOSS:return!0}}function JC(e){if(void 0===e)return Ix("GRPC error has no .code"),Rx.UNKNOWN;switch(e){case KC.OK:return Rx.OK;case KC.CANCELLED:return Rx.CANCELLED;case KC.UNKNOWN:return Rx.UNKNOWN;case KC.DEADLINE_EXCEEDED:return Rx.DEADLINE_EXCEEDED;case KC.RESOURCE_EXHAUSTED:return Rx.RESOURCE_EXHAUSTED;case KC.INTERNAL:return Rx.INTERNAL;case KC.UNAVAILABLE:return Rx.UNAVAILABLE;case KC.UNAUTHENTICATED:return Rx.UNAUTHENTICATED;case KC.INVALID_ARGUMENT:return Rx.INVALID_ARGUMENT;case KC.NOT_FOUND:return Rx.NOT_FOUND;case KC.ALREADY_EXISTS:return Rx.ALREADY_EXISTS;case KC.PERMISSION_DENIED:return Rx.PERMISSION_DENIED;case KC.FAILED_PRECONDITION:return Rx.FAILED_PRECONDITION;case KC.ABORTED:return Rx.ABORTED;case KC.OUT_OF_RANGE:return Rx.OUT_OF_RANGE;case KC.UNIMPLEMENTED:return Rx.UNIMPLEMENTED;case KC.DATA_LOSS:return Rx.DATA_LOSS;default:return jx()}}(GC=KC||(KC={}))[GC.OK=0]="OK",GC[GC.CANCELLED=1]="CANCELLED",GC[GC.UNKNOWN=2]="UNKNOWN",GC[GC.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",GC[GC.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",GC[GC.NOT_FOUND=5]="NOT_FOUND",GC[GC.ALREADY_EXISTS=6]="ALREADY_EXISTS",GC[GC.PERMISSION_DENIED=7]="PERMISSION_DENIED",GC[GC.UNAUTHENTICATED=16]="UNAUTHENTICATED",GC[GC.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",GC[GC.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",GC[GC.ABORTED=10]="ABORTED",GC[GC.OUT_OF_RANGE=11]="OUT_OF_RANGE",GC[GC.UNIMPLEMENTED=12]="UNIMPLEMENTED",GC[GC.INTERNAL=13]="INTERNAL",GC[GC.UNAVAILABLE=14]="UNAVAILABLE",GC[GC.DATA_LOSS=15]="DATA_LOSS";var ZC=function(){function e(t,n){ua(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}return ca(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){var a=u(r.value,2),o=a[0],s=a[1];if(this.equalsFn(o,e))return s}}catch(l){i.e(l)}finally{i.f()}}}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"set",value:function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}},{key:"delete",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var 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}}
2,{key:"forEach",value:function(e){jk(this.inner,(function(t,n){var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){var a=u(r.value,2),o=a[0],s=a[1];e(o,s)}}catch(l){i.e(l)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return Ok(this.inner)}},{key:"size",value:function(){return this.innerSize}}]),e}(),eE=new D_(tk.comparator);function tE(){return eE}var nE=new D_(tk.comparator);function rE(){for(var e=nE,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.insert(o.key,o)}return e}function iE(e){var t=nE;return e.forEach((function(e,n){return t=t.insert(e,n.overlayedDocument)})),t}function aE(){return sE()}function oE(){return sE()}function sE(){return new ZC((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)}))}var uE=new D_(tk.comparator),lE=new M_(tk.comparator);function cE(){for(var e=lE,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.add(o)}return e}var fE=new M_(Kx);function hE(){return fE}var dE=function(){function e(t,n,r,i,a){ua(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return ca(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n,r){var i=new Map;return i.set(t,pE.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new e($x.min(),i,hE(),tE(),cE())}}]),e}(),pE=function(){function e(t,n,r,i,a){ua(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return ca(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n,r){return new e(r,n,cE(),cE(),cE())}}]),e}(),vE=ca((function e(t,n,r,i){ua(this,e),this.It=t,this.removedTargetIds=n,this.key=r,this.Tt=i})),mE=ca((function e(t,n){ua(this,e),this.targetId=t,this.Et=n})),yE=ca((function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fk.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;ua(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i})),gE=function(){function e(){ua(this,e),this.At=0,this.Rt=xE(),this.bt=Fk.EMPTY_BYTE_STRING,this.Pt=!1,this.vt=!0}return ca(e,[{key:"current",get:function(){return this.Pt}},{key:"resumeToken",get:function(){return this.bt}},{key:"Vt",get:function(){return 0!==this.At}},{key:"St",get:function(){return this.vt}},{key:"Dt",value:function(e){e.approximateByteSize()>0&&(this.vt=!0,this.bt=e)}},{key:"Ct",value:function(){var e=cE(),t=cE(),n=cE();return this.Rt.forEach((function(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:jx()}})),new pE(this.bt,this.Pt,e,t,n)}},{key:"xt",value:function(){this.vt=!1,this.Rt=xE()}},{key:"Nt",value:function(e,t){this.vt=!0,this.Rt=this.Rt.insert(e,t)}},{key:"kt",value:function(e){this.vt=!0,this.Rt=this.Rt.remove(e)}},{key:"Ot",value:function(){this.At+=1}},{key:"Mt",value:function(){this.At-=1}},{key:"Ft",value:function(){this.vt=!0,this.Pt=!0}}]),e}(),bE=function(){function e(t){ua(this,e),this.$t=t,this.Bt=new Map,this.Lt=tE(),this.qt=wE(),this.Ut=new M_(Kx)}return ca(e,[{key:"Kt",value:function(e){var t,n=ya(e.It);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.Tt&&e.Tt.isFoundDocument()?this.Gt(r,e.Tt):this.Qt(r,e.key,e.Tt)}}catch(s){n.e(s)}finally{n.f()}var i,a=ya(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.Qt(o,e.key,e.Tt)}}catch(s){a.e(s)}finally{a.f()}}},{key:"jt",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.Wt(n);switch(e.state){case 0:t.zt(n)&&r.Dt(e.resumeToken);break;case 1:r.Mt(),r.Vt||r.xt(),r.Dt(e.resumeToken);break;case 2:r.Mt(),r.Vt||t.removeTarget(n);break;case 3:t.zt(n)&&(r.Ft(),r.Dt(e.resumeToken));break;case 4:t.zt(n)&&(t.Ht(n),r.Dt(e.resumeToken));break;default:jx()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.Bt.forEach((function(e,r){n.zt(r)&&t(r)}))}},{key:"Jt",value:function(e){var t=e.targetId,n=e.Et.count,r=this.Yt(t);if(r){var i=r.target;if(Q_(i))if(0===n){var a=new tk(i.path);this.Qt(t,a,H_.newNoDocument(a,$x.min()))}else Ox(1===n);else this.Xt(t)!==n&&(this.Ht(t),this.Ut=this.Ut.add(t))}}},{key:"Zt",value:function(e){var t=this,n=new Map;this.Bt.forEach((function(r,i){var a=t.Yt(i);if(a){if(r.current&&Q_(a.target)){var o=new tk(a.target.path);null!==t.Lt.get(o)||t.te(i,o)||t.Qt(i,o,H_.newNoDocument(o,e))}r.St&&(n.set(i,r.Ct()),r.xt())}}));var r=cE();this.qt.forEach((function(e,n){var i=!0;
2n.forEachWhile((function(e){var n=t.Yt(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))})),this.Lt.forEach((function(t,n){return n.setReadTime(e)}));var i=new dE(e,n,this.Ut,this.Lt,r);return this.Lt=tE(),this.qt=wE(),this.Ut=new M_(Kx),i}},{key:"Gt",value:function(e,t){if(this.zt(e)){var n=this.te(e,t.key)?2:0;this.Wt(e).Nt(t.key,n),this.Lt=this.Lt.insert(t.key,t),this.qt=this.qt.insert(t.key,this.ee(t.key).add(e))}}},{key:"Qt",value:function(e,t,n){if(this.zt(e)){var r=this.Wt(e);this.te(e,t)?r.Nt(t,1):r.kt(t),this.qt=this.qt.insert(t,this.ee(t).delete(e)),n&&(this.Lt=this.Lt.insert(t,n))}}},{key:"removeTarget",value:function(e){this.Bt.delete(e)}},{key:"Xt",value:function(e){var t=this.Wt(e).Ct();return this.$t.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Ot",value:function(e){this.Wt(e).Ot()}},{key:"Wt",value:function(e){var t=this.Bt.get(e);return t||(t=new gE,this.Bt.set(e,t)),t}},{key:"ee",value:function(e){var t=this.qt.get(e);return t||(t=new M_(Kx),this.qt=this.qt.insert(e,t)),t}},{key:"zt",value:function(e){var t=null!==this.Yt(e);return t||Tx("WatchChangeAggregator","Detected inactive target",e),t}},{key:"Yt",value:function(e){var t=this.Bt.get(e);return t&&t.Vt?null:this.$t.ne(e)}},{key:"Ht",value:function(e){var t=this;this.Bt.set(e,new gE),this.$t.getRemoteKeysForTarget(e).forEach((function(n){t.Qt(e,n,null)}))}},{key:"te",value:function(e,t){return this.$t.getRemoteKeysForTarget(e).has(t)}}]),e}();function wE(){return new D_(tk.comparator)}function xE(){return new D_(tk.comparator)}var kE={asc:"ASCENDING",desc:"DESCENDING"},_E={"<":"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"},CE={and:"AND",or:"OR"},EE=ca((function e(t,n){ua(this,e),this.databaseId=t,this.wt=n}));function SE(e,t){return e.wt?"".concat(new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z",""),".").concat(("000000000"+t.nanoseconds).slice(-9),"Z"):{seconds:""+t.seconds,nanos:t.nanoseconds}}function TE(e,t){return e.wt?t.toBase64():t.toUint8Array()}function IE(e,t){return SE(e,t.toTimestamp())}function NE(e){return Ox(!!e),$x.fromTimestamp(function(e){var t=Mk(e);return new Qx(t.seconds,t.nanos)}(e))}function AE(e,t){return function(e){return new Jx(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function jE(e){var t=Jx.fromString(e);return Ox(ZE(t)),t}function OE(e,t){return AE(e.databaseId,t.path)}function PE(e,t){var n=jE(t);if(n.get(1)!==e.databaseId.projectId)throw new Dx(Rx.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 Dx(Rx.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new tk(LE(n))}function RE(e,t){return AE(e.databaseId,t)}function DE(e){var t=jE(e);return 4===t.length?Jx.emptyPath():LE(t)}function FE(e){return new Jx(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function LE(e){return Ox(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function ME(e,t,n){return{name:OE(e,t),fields:n.value.mapValue.fields}}function VE(e,t,n){var r=PE(e,t.name),i=NE(t.updateTime),a=t.createTime?NE(t.createTime):$x.min(),o=new q_({mapValue:{fields:t.fields}}),s=H_.newFoundDocument(r,i,a,o);return n&&s.setHasCommittedMutations(),n?s.setHasCommittedMutations():s}function BE(e,t){var n;if(t instanceof zC)n={update:ME(e,t.key,t.value)};else if(t instanceof YC)n={delete:OE(e,t.key)};else if(t instanceof qC)n={update:ME(e,t.key,t.data),updateMask:JE(t.fieldMask)};else{if(!(t instanceof QC))return jx();n={verify:OE(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof _C)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof CC)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof SC)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof IC)return{fieldPath:t.field.canonicalString(),increment:n.gt};throw jx()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:IE(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:jx()}(e,t.precondition)),n}function zE(e,t){var n=t.currentDocument?function(e){return void 0!==e.updateTime?PC.updateTime(NE(e.updateTime)):void 0!==e.exists?PC.exists(e.exists):PC.none()}(t.currentDocument):PC.none(),r=t.updateTransforms?t.updateTransforms.map((function(t){return function(e,t){var n=null;if("setToServerValue"in t)Ox("REQUEST_TIME"===t.setToServerValue),n=new _C;else if("appendMissingElements"in t){var r=t.appendMissingElements.values||[];n=new CC(r)}else if("removeAllFromArray"in t){var i=t.removeAllFromArray.values||[];n=new SC(i)}else"increment"in t?n=new IC(e,t.increment):jx();var a=ek.fromServerFormat(t.fieldPath);return new jC(a,n)}(e,t)})):[];if(t.update){t.update.name;var i=PE(e,t.update.name),a=new q_({mapValue:{fields:t.update.fields}});if(t.updateMask){var o=function(e){var t=e.fieldPaths||[];return new z_(t.map((function(e){return ek.fromServerFormat(e)})))}(t.updateMask);return new qC(i,a,o,n,r)}return new zC(i,a,n,r)}if(t.delete){var s=PE(e,t.delete);return new YC(s,n)}if(t.verify){var u=PE(e,t.verify);return new QC(u,n)}return jx()}function qE(e,t){return{documents:[RE(e,t.path)]}}function UE(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=RE(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=RE(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length)return XE(m_.create(e,"and"))}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:QE(e.field),direction:KE(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o,s=function(e,t){return e.wt||Pk(t)?t:{value:t}}(e,t.limit);return null!==s&&(n.structuredQuery.limit=s),t.startAt&&(n.structuredQuery.startAt={before:(o=t.startAt).inclusive,values:o.position}),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}
2function HE(e){var t=DE(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){Ox(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=function(e){var t=WE(e);return t instanceof m_&&b_(t)?t.getFilters():[t]}(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(e){return function(e){return new P_($E(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var u=null;n.limit&&(u=function(e){var t;return Pk(t="object"==typeof e?e.value:e)?null:t}(n.limit));var l=null;n.startAt&&(l=function(e){var t=!!e.before,n=e.values||[];return new f_(n,t)}(n.startAt));var c=null;return n.endAt&&(c=function(e){var t=!e.before,n=e.values||[];return new f_(n,t)}(n.endAt)),eC(t,i,s,o,u,"F",l,c)}function WE(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":var t=$E(e.unaryFilter.field);return v_.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=$E(e.unaryFilter.field);return v_.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=$E(e.unaryFilter.field);return v_.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=$E(e.unaryFilter.field);return v_.create(i,"!=",{nullValue:"NULL_VALUE"});default:return jx()}}(e):void 0!==e.fieldFilter?function(e){return v_.create($E(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 jx()}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return m_.create(e.compositeFilter.filters.map((function(e){return WE(e)})),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return jx()}}(e.compositeFilter.op))}(e):jx()}function KE(e){return kE[e]}function GE(e){return _E[e]}function YE(e){return CE[e]}function QE(e){return{fieldPath:e.canonicalString()}}function $E(e){return ek.fromServerFormat(e.fieldPath)}function XE(e){return e instanceof v_?function(e){if("=="===e.op){if(r_(e.value))return{unaryFilter:{field:QE(e.field),op:"IS_NAN"}};if(n_(e.value))return{unaryFilter:{field:QE(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(r_(e.value))return{unaryFilter:{field:QE(e.field),op:"IS_NOT_NAN"}};if(n_(e.value))return{unaryFilter:{field:QE(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:QE(e.field),op:GE(e.op),value:e.value}}}(e):e instanceof m_?function(e){var t=e.getFilters().map((function(e){return XE(e)}));return 1===t.length?t[0]:{compositeFilter:{op:YE(e.op),filters:t}}}(e):jx()}function JE(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function ZE(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function eS(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=nS(t)),t=tS(e.get(n),t);return nS(t)}function tS(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var a=e.charAt(i);switch(a){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=a}}return n}function nS(e){return e+"\x01\x01"}function rS(e){var t=e.length;if(Ox(t>=2),2===t)return Ox("\x01"===e.charAt(0)&&"\x01"===e.charAt(1)),Jx.emptyPath();for(var n=t-2,r=[],i="",a=0;a<t;){var o=e.indexOf("\x01",a);switch((o<0||o>n)&&jx(),e.charAt(o+1)){case"\x01":var s=e.substring(a,o),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=e.substring(a,o),i+="\0";break;case"\x11":i+=e.substring(a,o+1);break;default:jx()}a=o+2}return new Jx(r)}var iS=["userId","batchId"];function aS(e,t){return[e,eS(t)]}function oS(e,t,n){return[e,eS(t),n]}var sS={},uS=["prefixPath","collectionGroup","readTime","documentId"],lS=["prefixPath","collectionGroup","documentId"],cS=["collectionGroup","readTime","prefixPath","documentId"],fS=["canonicalId","targetId"],hS=["targetId","path"],dS=["path","targetId"],pS=["collectionId","parent"],vS=["indexId","uid"],mS=["uid","sequenceNumber"],yS=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],gS=["indexId","uid","orderedDocumentKey"],bS=["userId","collectionPath","documentId"],wS=["userId","collectionPath","largestBatchId"],xS=["userId","collectionGroup","largestBatchId"],kS=["mutation
2Queues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments"].concat(["clientMetadata"]).concat(["remoteDocumentGlobal"]).concat(["collectionParents"]).concat(["bundles","namedQueries"]),_S=[].concat(bn(kS),["documentOverlays"]),CS=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],ES=CS,SS=[].concat(ES,["indexConfiguration","indexState","indexEntries"]),TS=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).se=e,i.currentSequenceNumber=r,i}return ca(n)}(hk);function IS(e,t){var n=Px(e);return yk.M(n.se,t)}var NS=function(){function e(t,n,r,i){ua(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return ca(e,[{key:"applyToRemoteDocument",value:function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&LC(i,e,n[r])}}},{key:"applyToLocalView",value:function(e,t){var n,r=ya(this.baseMutations);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.key.isEqual(e.key)&&(t=MC(i,e,t,this.localWriteTime))}}catch(u){r.e(u)}finally{r.f()}var a,o=ya(this.mutations);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.key.isEqual(e.key)&&(t=MC(s,e,t,this.localWriteTime))}}catch(u){o.e(u)}finally{o.f()}return t}},{key:"applyToLocalDocumentSet",value:function(e,t){var n=this,r=oE();return this.mutations.forEach((function(i){var a=e.get(i.key),o=a.overlayedDocument,s=n.applyToLocalView(o,a.mutatedFields),u=FC(o,s=t.has(i.key)?null:s);null!==u&&r.set(i.key,u),o.isValidDocument()||o.convertToNoDocument($x.min())})),r}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),cE())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&Gx(this.mutations,e.mutations,(function(e,t){return BC(e,t)}))&&Gx(this.baseMutations,e.baseMutations,(function(e,t){return BC(e,t)}))}}]),e}(),AS=function(){function e(t,n,r,i){ua(this,e),this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}return ca(e,null,[{key:"from",value:function(t,n,r){Ox(t.mutations.length===r.length);for(var i=uE,a=t.mutations,o=0;o<a.length;o++)i=i.insert(a[o].key,r[o].version);return new e(t,n,r,i)}}]),e}(),jS=function(){function e(t,n){ua(this,e),this.largestBatchId=t,this.mutation=n}return ca(e,[{key:"getKey",value:function(){return this.mutation.key}},{key:"isEqual",value:function(e){return null!==e&&this.mutation===e.mutation}},{key:"toString",value:function(){return"Overlay{\n      largestBatchId: ".concat(this.largestBatchId,",\n      mutation: ").concat(this.mutation.toString(),"\n    }")}}]),e}(),OS=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:$x.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:$x.min(),s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Fk.EMPTY_BYTE_STRING;ua(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=s}return ca(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)}}]),e}(),PS=ca((function e(t){ua(this,e),this.ie=t}));function RS(e,t){var n=t.key,r={prefixPath:n.getCollectionPath().popLast().toArray(),collectionGroup:n.collectionGroup,documentId:n.path.lastSegment(),readTime:DS(t.readTime),hasCommittedMutations:t.hasCommittedMutations};if(t.isFoundDocument())r.document=function(e,t){return{name:OE(e,t.key),fields:t.data.value.mapValue.fields,updateTime:SE(e,t.version.toTimestamp()),createTime:SE(e,t.createTime.toTimestamp())}}(e.ie,t);else if(t.isNoDocument())r.noDocument={path:n.path.toArray(),readTime:FS(t.version)};else{if(!t.isUnknownDocument())return jx();r.unknownDocument={path:n.path.toArray(),version:FS(t.version)}}return r}function DS(e){var t=e.toTimestamp();return[t.seconds,t.nanoseconds]}function FS(e){var t=e.toTimestamp();return{seconds:t.seconds,nanoseconds:t.nanoseconds}}function LS(e){var t=new Qx(e.seconds,e.nanoseconds);return $x.fromTimestamp(t)}function MS(e,t){for(var n=(t.baseMutations||[]).map((function(t){return zE(e.ie,t)})),r=0;r<t.mutations.length-1;++r){var i=t.mutations[r];if(r+1<t.mutations.length&&void 0!==t.mutations[r+1].transform){var a=t.mutations[r+1];i.updateTransforms=a.transform.fieldTransforms,t.mutations.splice(r+1,1),++r}}var o=t.mutations.map((function(t){return zE(e.ie,t)})),s=Qx.fromMillis(t.localWriteTimeMs);return new NS(t.batchId,s,n,o)}function VS(e){var t,n,r=LS(e.readTime),i=void 0!==e.lastLimboFreeSnapshotVersion?LS(e.lastLimboFreeSnapshotVersion):$x.min();return void 0!==e.query.documents?(Ox(1===(n=e.query).documents.length),t=sC(tC(DE(n.documents[0])))):t=function(e){return sC(HE(e))}(e.query),new OS(t,e.targetId,0,e.lastListenSequenceNumber,r,i,Fk.fromBase64String(e.resumeToken))}function BS(e,t){var n,r=FS(t.snapshotVersion),i=FS(t.lastLimboFreeSnapshotVersion);n=Q_(t.target)?qE(e.ie,t.target):UE(e.ie,t.target);var a=t.resumeToken.toBase64();return{targetId:t.targetId,canonicalId:G_(t.target),readTime:r,resumeToken:a,lastListenSequenceNumber:t.sequenceNumber,lastLimboFreeSnapshotVersion:i,query:n}}function zS(e){var t=HE({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?uC(t,t.limit,"L"):t}function qS(e,t){return new jS(t.largestBatchId,zE(e.ie,t.overlayMutation))}function US(e,t){var n=t.path.lastSegment();return[e,eS(t.path.popLast()),n]}function HS(e,t,n,r){return{indexId:e,uid:t.uid||"",sequenceNumber:n,readTime:FS(r.readTime),documentKey:eS(r.documentKey.path),largestBatchId:r.largestBatchId}}var WS=function(){function e(){ua(this,e)}return ca(e,[{key:"getBundleMetadata",value:function(e,t){return KS(e).get(t).next((function(e){if(e)return{id:(t=e).bundleId,createTime:LS(t.createTime),version:t.version};var t}))}},{key:"saveBundleMetadata",value:function(e,t){return KS(e).put({bundleId:(n=t).id,createTime:FS(NE(n.createTime)),version:n.version});var n}}
2,{key:"getNamedQuery",value:function(e,t){return GS(e).get(t).next((function(e){if(e)return{name:(t=e).name,query:zS(t.bundledQuery),readTime:LS(t.readTime)};var t}))}},{key:"saveNamedQuery",value:function(e,t){return GS(e).put(function(e){return{name:e.name,readTime:FS(NE(e.readTime)),bundledQuery:e.bundledQuery}}(t))}}]),e}();function KS(e){return IS(e,"bundles")}function GS(e){return IS(e,"namedQueries")}var YS=function(){function e(t,n){ua(this,e),this.yt=t,this.userId=n}return ca(e,[{key:"getOverlay",value:function(e,t){var n=this;return QS(e).get(US(this.userId,t)).next((function(e){return e?qS(n.yt,e):null}))}},{key:"getOverlays",value:function(e,t){var n=this,r=aE();return vk.forEach(t,(function(t){return n.getOverlay(e,t).next((function(e){null!==e&&r.set(t,e)}))})).next((function(){return r}))}},{key:"saveOverlays",value:function(e,t,n){var r=this,i=[];return n.forEach((function(n,a){var o=new jS(t,a);i.push(r.oe(e,o))})),vk.waitFor(i)}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=new Set;t.forEach((function(e){return i.add(eS(e.getCollectionPath()))}));var a=[];return i.forEach((function(t){var i=IDBKeyRange.bound([r.userId,t,n],[r.userId,t,n+1],!1,!0);a.push(QS(e).Y("collectionPathOverlayIndex",i))})),vk.waitFor(a)}},{key:"getOverlaysForCollection",value:function(e,t,n){var r=this,i=aE(),a=eS(t),o=IDBKeyRange.bound([this.userId,a,n],[this.userId,a,Number.POSITIVE_INFINITY],!0);return QS(e).W("collectionPathOverlayIndex",o).next((function(e){var t,n=ya(e);try{for(n.s();!(t=n.n()).done;){var a=t.value,o=qS(r.yt,a);i.set(o.getKey(),o)}}catch(s){n.e(s)}finally{n.f()}return i}))}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){var i,a=this,o=aE(),s=IDBKeyRange.bound([this.userId,t,n],[this.userId,t,Number.POSITIVE_INFINITY],!0);return QS(e).Z({index:"collectionGroupOverlayIndex",range:s},(function(e,t,n){var s=qS(a.yt,t);o.size()<r||s.largestBatchId===i?(o.set(s.getKey(),s),i=s.largestBatchId):n.done()})).next((function(){return o}))}},{key:"oe",value:function(e,t){return QS(e).put(function(e,t,n){var r=u(US(t,n.mutation.key),3);r[0];return{userId:t,collectionPath:r[1],documentId:r[2],collectionGroup:n.mutation.key.getCollectionGroup(),largestBatchId:n.largestBatchId,overlayMutation:BE(e.ie,n.mutation)}}(this.yt,this.userId,t))}}],[{key:"re",value:function(t,n){return new e(t,n.uid||"")}}]),e}();function QS(e){return IS(e,"documentOverlays")}var $S=function(){function e(){ua(this,e)}return ca(e,[{key:"ue",value:function(e,t){this.ce(e,t),t.ae()}},{key:"ce",value:function(e,t){if("nullValue"in e)this.he(t,5);else if("booleanValue"in e)this.he(t,10),t.le(e.booleanValue?1:0);else if("integerValue"in e)this.he(t,15),t.le(Vk(e.integerValue));else if("doubleValue"in e){var n=Vk(e.doubleValue);isNaN(n)?this.he(t,13):(this.he(t,15),Rk(n)?t.le(0):t.le(n))}else if("timestampValue"in e){var r=e.timestampValue;this.he(t,20),"string"==typeof r?t.fe(r):(t.fe("".concat(r.seconds||"")),t.le(r.nanos||0))}else if("stringValue"in e)this.de(e.stringValue,t),this._e(t);else if("bytesValue"in e)this.he(t,30),t.we(Bk(e.bytesValue)),this._e(t);else if("referenceValue"in e)this.me(e.referenceValue,t);else if("geoPointValue"in e){var i=e.geoPointValue;this.he(t,45),t.le(i.latitude||0),t.le(i.longitude||0)}else"mapValue"in e?o_(e)?this.he(t,Number.MAX_SAFE_INTEGER):(this.ge(e.mapValue,t),this._e(t)):"arrayValue"in e?(this.ye(e.arrayValue,t),this._e(t)):jx()}},{key:"de",value:function(e,t){this.he(t,25),this.pe(e,t)}},{key:"pe",value:function(e,t){t.fe(e)}},{key:"ge",value:function(e,t){var n=e.fields||{};this.he(t,55);for(var r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];this.de(a,t),this.ce(n[a],t)}}},{key:"ye",value:function(e,t){var n=e.values||[];this.he(t,50);var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.ce(a,t)}}catch(o){i.e(o)}finally{i.f()}}},{key:"me",value:function(e,t){var n=this;this.he(t,37),tk.fromName(e).path.forEach((function(e){n.he(t,60),n.pe(e,t)}))}},{key:"he",value:function(e,t){e.le(t)}},{key:"_e",value:function(e){e.le(2)}}]),e}();function XS(e){if(0===e)return 8;var t=0;return e>>4==0&&(t+=4,e<<=4),e>>6==0&&(t+=2,e<<=2),e>>7==0&&(t+=1),t}function JS(e){var t=64-function(e){for(var t=0,n=0;n<8;++n){var r=XS(255&e[n]);if(t+=r,8!==r)break}return t}(e);return Math.ceil(t/8)}$S.Ie=new $S;var ZS=function(){function e(){ua(this,e),this.buffer=new Uint8Array(1024),this.position=0}return ca(e,[{key:"Te",value:function(e){for(var t=e[Symbol.iterator](),n=t.next();!n.done;)this.Ee(n.value),n=t.next();this.Ae()}},{key:"Re",value:function(e){for(var t=e[Symbol.iterator](),n=t.next();!n.done;)this.be(n.value),n=t.next();this.Pe()}},{key:"ve",value:function(e){var t,n=ya(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.charCodeAt(0);if(i<128)this.Ee(i);else if(i<2048)this.Ee(960|i>>>6),this.Ee(128|63&i);else if(r<"\ud800"||"\udbff"<r)this.Ee(480|i>>>12),this.Ee(128|63&i>>>6),this.Ee(128|63&i);else{var a=r.codePointAt(0);this.Ee(240|a>>>18),this.Ee(128|63&a>>>12),this.Ee(128|63&a>>>6),this.Ee(128|63&a)}}}catch(o){n.e(o)}finally{n.f()}this.Ae()}},{key:"Ve",value:function(e){var t,n=ya(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.charCodeAt(0);if(i<128)this.be(i);else if(i<2048)this.be(960|i>>>6),this.be(128|63&i);else if(r<"\ud800"||"\udbff"<r)this.be(480|i>>>12),this.be(128|63&i>>>6),this.be(128|63&i);else{var a=r.codePointAt(0);this.be(240|a>>>18),this.be(128|63&a>>>12),this.be(128|63&a>>>6),this.be(128|63&a)}}}catch(o){n.e(o)}finally{n.f()}this.Pe()}},{key:"Se",value:function(e){var t=this.De(e),n=JS(t);this.Ce(1+n),this.buffer[this.position++]=255&n;for(var r=t.length-n;r<t.length;++r)this.buffer[this.position++]=255&t[r]}},{key:"xe",value:function(e){var t=this.De(e),n=JS(t);this.Ce(1+n),this.buffer[this.position++]=~(255&n);for(var r=t.length-n;r<t.length;++r)this.buffer[this.position++]=~(255&t[r])}},{key:"Ne",value:function(){this.ke(255),this.ke(255)}},{key:"Oe",value:function(){this.Me(255),this.Me(255)}},{key:"reset",value:function(){this.position=0}},{key:"seed",value:function(e){this.Ce(e.length),this.buffer.set(e,this.position),this.position+=e.length}},{key:"Fe",value:function(){return this.buffer.slice(0,this.position)}},{key:"De",value:function(e){var t=function(e){var t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,e,!1),new Uint8Array(t.buffer)}(e),n=0!=(128&t[0]);t[0]^=n?255:128;for(var r=1;r<t.length;++r)t[r]^=n?255:0;return t}},{key:"Ee",value:function(e){var t=255&e;0===t?(this.ke(0),this.ke(255)):255===t?(this.ke(255),this.ke(0)):this.ke(t)}},{key:"be",value:function(e){var t=255&e;0===t?(this.Me(0),this.Me(255)):255===t?(this.Me(255),this.Me(0)):this.Me(e)}},{key:"Ae",value:function(){this.ke(0),this.ke(1)}},{key:"Pe",value:function(){this.Me(0),this.Me(1)}},{key:"ke",value:function(e){this.Ce(1),this.buffer[this.position++]=e}},{key:"Me",value:function(e){this.Ce(1),this.buffer[this.position++]=~e}},{key:"Ce",value:function(e){var t=e+this.position;if(!(t<=this.buffer.length)){var n=2*this.buffer.length;n<t&&(n=t);
2var r=new Uint8Array(n);r.set(this.buffer),this.buffer=r}}}]),e}(),eT=function(){function e(t){ua(this,e),this.$e=t}return ca(e,[{key:"we",value:function(e){this.$e.Te(e)}},{key:"fe",value:function(e){this.$e.ve(e)}},{key:"le",value:function(e){this.$e.Se(e)}},{key:"ae",value:function(){this.$e.Ne()}}]),e}(),tT=function(){function e(t){ua(this,e),this.$e=t}return ca(e,[{key:"we",value:function(e){this.$e.Re(e)}},{key:"fe",value:function(e){this.$e.Ve(e)}},{key:"le",value:function(e){this.$e.xe(e)}},{key:"ae",value:function(){this.$e.Oe()}}]),e}(),nT=function(){function e(){ua(this,e),this.$e=new ZS,this.Be=new eT(this.$e),this.Le=new tT(this.$e)}return ca(e,[{key:"seed",value:function(e){this.$e.seed(e)}},{key:"qe",value:function(e){return 0===e?this.Be:this.Le}},{key:"Fe",value:function(){return this.$e.Fe()}},{key:"reset",value:function(){this.$e.reset()}}]),e}(),rT=function(){function e(t,n,r,i){ua(this,e),this.indexId=t,this.documentKey=n,this.arrayValue=r,this.directionalValue=i}return ca(e,[{key:"Ue",value:function(){var t=this.directionalValue.length,n=0===t||255===this.directionalValue[t-1]?t+1:t,r=new Uint8Array(n);return r.set(this.directionalValue,0),n!==t?r.set([0],this.directionalValue.length):++r[r.length-1],new e(this.indexId,this.documentKey,this.arrayValue,r)}}]),e}();function iT(e,t){var n=e.indexId-t.indexId;return 0!==n?n:0!==(n=aT(e.arrayValue,t.arrayValue))?n:0!==(n=aT(e.directionalValue,t.directionalValue))?n:tk.comparator(e.documentKey,t.documentKey)}function aT(e,t){for(var n=0;n<e.length&&n<t.length;++n){var r=e[n]-t[n];if(0!==r)return r}return e.length-t.length}var oT=function(){function e(t){ua(this,e),this.collectionId=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment(),this.Ke=t.orderBy,this.Ge=[];var n,r=ya(t.filters);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.isInequality()?this.Qe=i:this.Ge.push(i)}}catch(a){r.e(a)}finally{r.f()}}return ca(e,[{key:"je",value:function(e){Ox(e.collectionGroup===this.collectionId);var t=rk(e);if(void 0!==t&&!this.We(t))return!1;for(var n=ik(e),r=0,i=0;r<n.length&&this.We(n[r]);++r);if(r===n.length)return!0;if(void 0!==this.Qe){var a=n[r];if(!this.ze(this.Qe,a)||!this.He(this.Ke[i++],a))return!1;++r}for(;r<n.length;++r){var o=n[r];if(i>=this.Ke.length||!this.He(this.Ke[i++],o))return!1}return!0}},{key:"We",value:function(e){var t,n=ya(this.Ge);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(this.ze(r,e))return!0}}catch(i){n.e(i)}finally{n.f()}return!1}},{key:"ze",value:function(e,t){if(void 0===e||!e.field.isEqual(t.fieldPath))return!1;var n="array-contains"===e.op||"array-contains-any"===e.op;return 2===t.kind===n}},{key:"He",value:function(e,t){return!!e.field.isEqual(t.fieldPath)&&(0===t.kind&&"asc"===e.dir||1===t.kind&&"desc"===e.dir)}}]),e}();function sT(e){var t,n;if(Ox(e instanceof v_||e instanceof m_),e instanceof v_){if(e instanceof A_){var r=(null===(n=null===(t=e.value.arrayValue)||void 0===t?void 0:t.values)||void 0===n?void 0:n.map((function(t){return v_.create(e.field,"==",t)})))||[];return m_.create(r,"or")}return e}var i=e.filters.map((function(e){return sT(e)}));return m_.create(i,e.op)}function uT(e){if(0===e.getFilters().length)return[];var t=hT(sT(e));return Ox(fT(t)),lT(t)||cT(t)?[t]:t.getFilters()}function lT(e){return e instanceof v_}function cT(e){return e instanceof m_&&b_(e)}function fT(e){return lT(e)||cT(e)||function(e){if(e instanceof m_&&g_(e)){var t,n=ya(e.getFilters());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!lT(r)&&!cT(r))return!1}}catch(i){n.e(i)}finally{n.f()}return!0}return!1}(e)}function hT(e){if(Ox(e instanceof v_||e instanceof m_),e instanceof v_)return e;if(1===e.filters.length)return hT(e.filters[0]);var t=e.filters.map((function(e){return hT(e)})),n=m_.create(t,e.op);return fT(n=vT(n))?n:(Ox(n instanceof m_),Ox(y_(n)),Ox(n.filters.length>1),n.filters.reduce((function(e,t){return dT(e,t)})))}function dT(e,t){var n;return Ox(e instanceof v_||e instanceof m_),Ox(t instanceof v_||t instanceof m_),n=e instanceof v_?t instanceof v_?function(e,t){return m_.create([e,t],"and")}(e,t):pT(e,t):t instanceof v_?pT(t,e):function(e,t){if(Ox(e.filters.length>0&&t.filters.length>0),y_(e)&&y_(t))return __(e,t.getFilters());var n=g_(e)?e:t,r=g_(e)?t:e,i=n.filters.map((function(e){return dT(e,r)}));return m_.create(i,"or")}(e,t),vT(n)}function pT(e,t){if(y_(t))return __(t,e.getFilters());var n=t.filters.map((function(t){return dT(e,t)}));return m_.create(n,"or")}function vT(e){if(Ox(e instanceof v_||e instanceof m_),e instanceof v_)return e;var t=e.getFilters();if(1===t.length)return vT(t[0]);if(w_(e))return e;var n=t.map((function(e){return vT(e)})),r=[];
2return n.forEach((function(t){t instanceof v_?r.push(t):t instanceof m_&&(t.op===e.op?r.push.apply(r,bn(t.filters)):r.push(t))})),1===r.length?r[0]:m_.create(r,e.op)}var mT=function(){function e(){ua(this,e),this.Je=new yT}return ca(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.Je.add(t),vk.resolve()}},{key:"getCollectionParents",value:function(e,t){return vk.resolve(this.Je.getEntries(t))}},{key:"addFieldIndex",value:function(e,t){return vk.resolve()}},{key:"deleteFieldIndex",value:function(e,t){return vk.resolve()}},{key:"getDocumentsMatchingTarget",value:function(e,t){return vk.resolve(null)}},{key:"getIndexType",value:function(e,t){return vk.resolve(0)}},{key:"getFieldIndexes",value:function(e,t){return vk.resolve([])}},{key:"getNextCollectionGroupToUpdate",value:function(e){return vk.resolve(null)}},{key:"getMinOffset",value:function(e,t){return vk.resolve(lk.min())}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return vk.resolve(lk.min())}},{key:"updateCollectionGroup",value:function(e,t,n){return vk.resolve()}},{key:"updateIndexEntries",value:function(e,t){return vk.resolve()}}]),e}(),yT=function(){function e(){ua(this,e),this.index={}}return ca(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new M_(Jx.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}},{key:"has",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}},{key:"getEntries",value:function(e){return(this.index[e]||new M_(Jx.comparator)).toArray()}}]),e}(),gT=new Uint8Array(0),bT=function(){function e(t,n){ua(this,e),this.user=t,this.databaseId=n,this.Ye=new yT,this.Xe=new ZC((function(e){return G_(e)}),(function(e,t){return Y_(e,t)})),this.uid=t.uid||""}return ca(e,[{key:"addToCollectionParentIndex",value:function(e,t){var n=this;if(!this.Ye.has(t)){var r=t.lastSegment(),i=t.popLast();e.addOnCommittedListener((function(){n.Ye.add(t)}));var a={collectionId:r,parent:eS(i)};return wT(e).put(a)}return vk.resolve()}},{key:"getCollectionParents",value:function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[Yx(t),""],!1,!0);return wT(e).W(r).next((function(e){var r,i=ya(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.collectionId!==t)break;n.push(rS(a.parent))}}catch(o){i.e(o)}finally{i.f()}return n}))}},{key:"addFieldIndex",value:function(e,t){var n=this,r=kT(e),i=function(e){return{indexId:e.indexId,collectionGroup:e.collectionGroup,fields:e.fields.map((function(e){return[e.fieldPath.canonicalString(),e.kind]}))}}(t);delete i.indexId;var a=r.add(i);if(t.indexState){var o=_T(e);return a.next((function(e){o.put(HS(e,n.user,t.indexState.sequenceNumber,t.indexState.offset))}))}return a.next()}},{key:"deleteFieldIndex",value:function(e,t){var n=kT(e),r=_T(e),i=xT(e);return n.delete(t.indexId).next((function(){return r.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))})).next((function(){return i.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))}))}},{key:"getDocumentsMatchingTarget",value:function(e,t){var n=this,r=xT(e),i=!0,a=new Map;return vk.forEach(this.Ze(t),(function(t){return n.tn(e,t).next((function(e){i&&(i=!!e),a.set(t,e)}))})).next((function(){if(i){var e=cE(),o=[];return vk.forEach(a,(function(i,a){var s;Tx("IndexedDbIndexManager","Using index ".concat((s=i,"id=".concat(s.indexId,"|cg=").concat(s.collectionGroup,"|f=").concat(s.fields.map((function(e){return"".concat(e.fieldPath,":").concat(e.kind)})).join(",")))," to execute ").concat(G_(t)));var u=function(e,t){var n=rk(t);if(void 0===n)return null;var r,i=ya($_(e,n.fieldPath));try{for(i.s();!(r=i.n()).done;){var a=r.value;switch(a.op){case"array-contains-any":return a.value.arrayValue.values||[];case"array-contains":return[a.value]}}}catch(o){i.e(o)}finally{i.f()}return null}(a,i),l=function(e,t){var n,r=new Map,i=ya(ik(t));try{for(i.s();!(n=i.n()).done;){var a,o=n.value,s=ya($_(e,o.fieldPath));try{for(s.s();!(a=s.n()).done;){var u=a.value;switch(u.op){case"==":case"in":r.set(o.fieldPath.canonicalString(),u.value);break;case"not-in":case"!=":return r.set(o.fieldPath.canonicalString(),u.value),Array.from(r.values())}}}catch(l){s.e(l)}finally{s.f()}}}catch(l){i.e(l)}finally{i.f()}return null}(a,i),c=function(e,t){var n,r=[],i=!0,a=ya(ik(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=0===o.kind?X_(e,o.fieldPath,e.startAt):J_(e,o.fieldPath,e.startAt);r.push(s.value),i&&(i=s.inclusive)}}catch(u){a.e(u)}finally{a.f()}return new f_(r,i)}(a,i),f=function(e,t){var n,r=[],i=!0,a=ya(ik(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=0===o.kind?J_(e,o.fieldPath,e.endAt):X_(e,o.fieldPath,e.endAt);r.push(s.value),i&&(i=s.inclusive)}}catch(u){a.e(u)}finally{a.f()}return new f_(r,i)}(a,i),h=n.en(i,a,c),d=n.en(i,a,f),p=n.nn(i,a,l),v=n.sn(i.indexId,u,h,c.inclusive,d,f.inclusive,p);
2return vk.forEach(v,(function(n){return r.J(n,t.limit).next((function(t){t.forEach((function(t){var n=tk.fromSegments(t.documentKey);e.has(n)||(e=e.add(n),o.push(n))}))}))}))})).next((function(){return o}))}return vk.resolve(null)}))}},{key:"Ze",value:function(e){var t=this.Xe.get(e);return t||(t=0===e.filters.length?[e]:uT(m_.create(e.filters,"and")).map((function(t){return K_(e.path,e.collectionGroup,e.orderBy,t.getFilters(),e.limit,e.startAt,e.endAt)})),this.Xe.set(e,t),t)}},{key:"sn",value:function(e,t,n,r,i,a,o){for(var s=this,u=(null!=t?t.length:1)*Math.max(n.length,i.length),l=u/(null!=t?t.length:1),c=[],f=function(u){var f=t?s.rn(t[u/l]):gT,h=s.on(e,f,n[u%l],r),d=s.un(e,f,i[u%l],a),p=o.map((function(t){return s.on(e,f,t,!0)}));c.push.apply(c,bn(s.createRange(h,d,p)))},h=0;h<u;++h)f(h);return c}},{key:"on",value:function(e,t,n,r){var i=new rT(e,tk.empty(),t,n);return r?i:i.Ue()}},{key:"un",value:function(e,t,n,r){var i=new rT(e,tk.empty(),t,n);return r?i.Ue():i}},{key:"tn",value:function(e,t){var n=new oT(t),r=null!=t.collectionGroup?t.collectionGroup:t.path.lastSegment();return this.getFieldIndexes(e,r).next((function(e){var t,r=null,i=ya(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;n.je(a)&&(!r||a.fields.length>r.fields.length)&&(r=a)}}catch(o){i.e(o)}finally{i.f()}return r}))}},{key:"getIndexType",value:function(e,t){var n=this,r=2,i=this.Ze(t);return vk.forEach(i,(function(t){return n.tn(e,t).next((function(e){e?0!==r&&e.fields.length<function(e){var t,n=new M_(ek.comparator),r=!1,i=ya(e.filters);try{for(i.s();!(t=i.n()).done;){var a,o=ya(t.value.getFlattenedFilters());try{for(o.s();!(a=o.n()).done;){var s=a.value;s.field.isKeyField()||("array-contains"===s.op||"array-contains-any"===s.op?r=!0:n=n.add(s.field))}}catch(f){o.e(f)}finally{o.f()}}}catch(f){i.e(f)}finally{i.f()}var u,l=ya(e.orderBy);try{for(l.s();!(u=l.n()).done;){var c=u.value;c.field.isKeyField()||(n=n.add(c.field))}}catch(f){l.e(f)}finally{l.f()}return n.size+(r?1:0)}(t)&&(r=1):r=0}))})).next((function(){return function(e){return null!==e.limit}(t)&&i.length>1&&2===r?1:r}))}},{key:"cn",value:function(e,t){var n,r=new nT,i=ya(ik(e));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=t.data.field(a.fieldPath);if(null==o)return null;var s=r.qe(a.kind);$S.Ie.ue(o,s)}}catch(u){i.e(u)}finally{i.f()}return r.Fe()}},{key:"rn",value:function(e){var t=new nT;return $S.Ie.ue(e,t.qe(0)),t.Fe()}},{key:"an",value:function(e,t){var n=new nT;return $S.Ie.ue(Zk(this.databaseId,t),n.qe(function(e){var t=ik(e);return 0===t.length?0:t[t.length-1].kind}(e))),n.Fe()}},{key:"nn",value:function(e,t,n){if(null===n)return[];var r=[];r.push(new nT);var i,a=0,o=ya(ik(e));try{for(o.s();!(i=o.n()).done;){var s,u=i.value,l=n[a++],c=ya(r);try{for(c.s();!(s=c.n()).done;){var f=s.value;if(this.hn(t,u.fieldPath)&&t_(l))r=this.ln(r,u,l);else{var h=f.qe(u.kind);$S.Ie.ue(l,h)}}}catch(d){c.e(d)}finally{c.f()}}}catch(d){o.e(d)}finally{o.f()}return this.fn(r)}},{key:"en",value:function(e,t,n){return this.nn(e,t,n.position)}},{key:"fn",value:function(e){for(var t=[],n=0;n<e.length;++n)t[n]=e[n].Fe();return t}},{key:"ln",value:function(e,t,n){var r,i=bn(e),a=[],o=ya(n.arrayValue.values||[]);try{for(o.s();!(r=o.n()).done;){var s,u=r.value,l=ya(i);try{for(l.s();!(s=l.n()).done;){var c=s.value,f=new nT;f.seed(c.Fe()),$S.Ie.ue(u,f.qe(t.kind)),a.push(f)}}catch(h){l.e(h)}finally{l.f()}}}catch(h){o.e(h)}finally{o.f()}return a}},{key:"hn",value:function(e,t){return!!e.filters.find((function(e){return e instanceof v_&&e.field.isEqual(t)&&("in"===e.op||"not-in"===e.op)}))}},{key:"getFieldIndexes",value:function(e,t){var n=this,r=kT(e),i=_T(e);return(t?r.W("collectionGroupIndex",IDBKeyRange.bound(t,t)):r.W()).next((function(e){var t=[];return vk.forEach(e,(function(e){return i.get([e.indexId,n.uid]).next((function(n){t.push(function(e,t){var n=t?new ok(t.sequenceNumber,new lk(LS(t.readTime),new tk(rS(t.documentKey)),t.largestBatchId)):ok.empty(),r=e.fields.map((function(e){var t=u(e,2),n=t[0],r=t[1];return new ak(ek.fromServerFormat(n),r)}));return new nk(e.indexId,e.collectionGroup,r,n)}(e,n))}))})).next((function(){return t}))}))}},{key:"getNextCollectionGroupToUpdate",value:function(e){return this.getFieldIndexes(e).next((function(e){return 0===e.length?null:(e.sort((function(e,t){var n=e.indexState.sequenceNumber-t.indexState.sequenceNumber;return 0!==n?n:Kx(e.collectionGroup,t.collectionGroup)})),e[0].collectionGroup)}))}},{key:"updateCollectionGroup",value:function(e,t,n){var r=this,i=kT(e),a=_T(e);return this.dn(e).next((function(e){return i.W("collectionGroupIndex",IDBKeyRange.bound(t,t)).next((function(t){return vk.forEac
2h(t,(function(t){return a.put(HS(t.indexId,r.user,e,n))}))}))}))}},{key:"updateIndexEntries",value:function(e,t){var n=this,r=new Map;return vk.forEach(t,(function(t,i){var a=r.get(t.collectionGroup);return(a?vk.resolve(a):n.getFieldIndexes(e,t.collectionGroup)).next((function(a){return r.set(t.collectionGroup,a),vk.forEach(a,(function(r){return n._n(e,t,r).next((function(t){var a=n.wn(i,r);return t.isEqual(a)?vk.resolve():n.mn(e,i,r,t,a)}))}))}))}))}},{key:"gn",value:function(e,t,n,r){return xT(e).put({indexId:r.indexId,uid:this.uid,arrayValue:r.arrayValue,directionalValue:r.directionalValue,orderedDocumentKey:this.an(n,t.key),documentKey:t.key.path.toArray()})}},{key:"yn",value:function(e,t,n,r){return xT(e).delete([r.indexId,this.uid,r.arrayValue,r.directionalValue,this.an(n,t.key),t.key.path.toArray()])}},{key:"_n",value:function(e,t,n){var r=xT(e),i=new M_(iT);return r.Z({index:"documentKeyIndex",range:IDBKeyRange.only([n.indexId,this.uid,this.an(n,t)])},(function(e,r){i=i.add(new rT(n.indexId,t,r.arrayValue,r.directionalValue))})).next((function(){return i}))}},{key:"wn",value:function(e,t){var n=new M_(iT),r=this.cn(t,e);if(null==r)return n;var i=rk(t);if(null!=i){var a=e.data.field(i.fieldPath);if(t_(a)){var o,s=ya(a.arrayValue.values||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;n=n.add(new rT(t.indexId,e.key,this.rn(u),r))}}catch(l){s.e(l)}finally{s.f()}}}else n=n.add(new rT(t.indexId,e.key,gT,r));return n}},{key:"mn",value:function(e,t,n,r,i){var a=this;Tx("IndexedDbIndexManager","Updating index entries for document '%s'",t.key);var o=[];return function(e,t,n,r,i){for(var a=e.getIterator(),o=t.getIterator(),s=B_(a),u=B_(o);s||u;){var l=!1,c=!1;if(s&&u){var f=n(s,u);f<0?c=!0:f>0&&(l=!0)}else null!=s?c=!0:l=!0;l?(r(u),u=B_(o)):c?(i(s),s=B_(a)):(s=B_(a),u=B_(o))}}(r,i,iT,(function(r){o.push(a.gn(e,t,n,r))}),(function(r){o.push(a.yn(e,t,n,r))})),vk.waitFor(o)}},{key:"dn",value:function(e){var t=1;return _T(e).Z({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(function(e,n,r){r.done(),t=n.sequenceNumber+1})).next((function(){return t}))}},{key:"createRange",value:function(e,t,n){n=n.sort((function(e,t){return iT(e,t)})).filter((function(e,t,n){return!t||0!==iT(e,n[t-1])}));var r=[];r.push(e);var i,a=ya(n);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=iT(o,e),u=iT(o,t);if(0===s)r[0]=e.Ue();else if(s>0&&u<0)r.push(o),r.push(o.Ue());else if(u>0)break}}catch(d){a.e(d)}finally{a.f()}r.push(t);for(var l=[],c=0;c<r.length;c+=2){if(this.pn(r[c],r[c+1]))return[];var f=[r[c].indexId,this.uid,r[c].arrayValue,r[c].directionalValue,gT,[]],h=[r[c+1].indexId,this.uid,r[c+1].arrayValue,r[c+1].directionalValue,gT,[]];l.push(IDBKeyRange.bound(f,h))}return l}},{key:"pn",value:function(e,t){return iT(e,t)>0}},{key:"getMinOffsetFromCollectionGroup",value:function(e,t){return this.getFieldIndexes(e,t).next(CT)}},{key:"getMinOffset",value:function(e,t){var n=this;return vk.mapArray(this.Ze(t),(function(t){return n.tn(e,t).next((function(e){return e||jx()}))})).next(CT)}}]),e}();function wT(e){return IS(e,"collectionParents")}function xT(e){return IS(e,"indexEntries")}function kT(e){return IS(e,"indexConfiguration")}function _T(e){return IS(e,"indexState")}function CT(e){Ox(0!==e.length);for(var t=e[0].indexState.offset,n=t.largestBatchId,r=1;r<e.length;r++){var i=e[r].indexState.offset;ck(i,t)<0&&(t=i),n<i.largestBatchId&&(n=i.largestBatchId)}return new lk(t.readTime,t.documentKey,n)}var ET={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},ST=function(){function e(t,n,r){ua(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return ca(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();function TT(e,t,n){var r=e.store("mutations"),i=e.store("documentMutations"),a=[],o=IDBKeyRange.only(n.batchId),s=0,u=r.Z({range:o},(function(e,t,n){return s++,n.delete()}));a.push(u.next((function(){Ox(1===s)})));var l,c=[],f=ya(n.mutations);try{for(f.s();!(l=f.n()).done;){var h=l.value,d=oS(t,h.key.path,n.batchId);
2a.push(i.delete(d)),c.push(h.key)}}catch(p){f.e(p)}finally{f.f()}return vk.waitFor(a).next((function(){return c}))}function IT(e){if(!e)return 0;var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw jx();t=e.noDocument}return JSON.stringify(t).length}ST.DEFAULT_COLLECTION_PERCENTILE=10,ST.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ST.DEFAULT=new ST(41943040,ST.DEFAULT_COLLECTION_PERCENTILE,ST.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ST.DISABLED=new ST(-1,0,0);var NT=function(){function e(t,n,r,i){ua(this,e),this.userId=t,this.yt=n,this.indexManager=r,this.referenceDelegate=i,this.In={}}return ca(e,[{key:"checkEmpty",value:function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return jT(e).Z({index:"userMutationsIndex",range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this,a=OT(e),o=jT(e);return o.add({}).next((function(s){Ox("number"==typeof s);var u,l=new NS(s,t,n,r),c=function(e,t,n){var r=n.baseMutations.map((function(t){return BE(e.ie,t)})),i=n.mutations.map((function(t){return BE(e.ie,t)}));return{userId:t,batchId:n.batchId,localWriteTimeMs:n.localWriteTime.toMillis(),baseMutations:r,mutations:i}}(i.yt,i.userId,l),f=[],h=new M_((function(e,t){return Kx(e.canonicalString(),t.canonicalString())})),d=ya(r);try{for(d.s();!(u=d.n()).done;){var p=u.value,v=oS(i.userId,p.key.path,s);h=h.add(p.key.path.popLast()),f.push(o.put(c)),f.push(a.put(v,sS))}}catch(m){d.e(m)}finally{d.f()}return h.forEach((function(t){f.push(i.indexManager.addToCollectionParentIndex(e,t))})),e.addOnCommittedListener((function(){i.In[s]=l.keys()})),vk.waitFor(f).next((function(){return l}))}))}},{key:"lookupMutationBatch",value:function(e,t){var n=this;return jT(e).get(t).next((function(e){return e?(Ox(e.userId===n.userId),MS(n.yt,e)):null}))}},{key:"Tn",value:function(e,t){var n=this;return this.In[t]?vk.resolve(this.In[t]):this.lookupMutationBatch(e,t).next((function(e){if(e){var r=e.keys();return n.In[t]=r,r}return null}))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=this,r=t+1,i=IDBKeyRange.lowerBound([this.userId,r]),a=null;return jT(e).Z({index:"userMutationsIndex",range:i},(function(e,t,i){t.userId===n.userId&&(Ox(t.batchId>=r),a=MS(n.yt,t)),i.done()})).next((function(){return a}))}},{key:"getHighestUnacknowledgedBatchId",value:function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return jT(e).Z({index:"userMutationsIndex",range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))}},{key:"getAllMutationBatches",value:function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return jT(e).W("userMutationsIndex",n).next((function(e){return e.map((function(e){return MS(t.yt,e)}))}))}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=aS(this.userId,t.path),i=IDBKeyRange.lowerBound(r),a=[];return OT(e).Z({range:i},(function(r,i,o){var s=u(r,3),l=s[0],c=s[1],f=s[2],h=rS(c);if(l===n.userId&&t.path.isEqual(h))return jT(e).get(f).next((function(e){if(!e)throw jx();Ox(e.userId===n.userId),a.push(MS(n.yt,e))}));o.done()})).next((function(){return a}))}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new M_(Kx),i=[];return t.forEach((function(t){var a=aS(n.userId,t.path),o=IDBKeyRange.lowerBound(a),s=OT(e).Z({range:o},(function(e,i,a){var o=u(e,3),s=o[0],l=o[1],c=o[2],f=rS(l);s===n.userId&&t.path.isEqual(f)?r=r.add(c):a.done()}));i.push(s)})),vk.waitFor(i).next((function(){return n.En(e,r)}))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=this,r=t.path,i=r.length+1,a=aS(this.userId,r),o=IDBKeyRange.lowerBound(a),s=new M_(Kx);return OT(e).Z({range:o},(function(e,t,a){var o=u(e,3),l=o[0],c=o[1],f=o[2],h=rS(c);l===n.userId&&r.isPrefixOf(h)?h.length===i&&(s=s.add(f)):a.done()})).next((function(){return n.En(e,s)}))}},{key:"En",value:function(e,t){var n=this,r=[],i=[];return t.forEach((function(t){i.push(jT(e).get(t).next((function(e){if(null===e)throw jx();Ox(e.userId===n.userId),r.push(MS(n.yt,e))})))})),vk.waitFor(i).next((function(){return r}))}},{key:"removeMutationBatch",value:function(e,t){var n=this;return TT(e.se,this.userId,t).next((function(r){return e.addOnCommittedListener((function(){n.An(t.batchId)}
2)),vk.forEach(r,(function(t){return n.referenceDelegate.markPotentiallyOrphaned(e,t)}))}))}},{key:"An",value:function(e){delete this.In[e]}},{key:"performConsistencyCheck",value:function(e){var t=this;return this.checkEmpty(e).next((function(n){if(!n)return vk.resolve();var r=IDBKeyRange.lowerBound([t.userId]),i=[];return OT(e).Z({range:r},(function(e,n,r){if(e[0]===t.userId){var a=rS(e[1]);i.push(a)}else r.done()})).next((function(){Ox(0===i.length)}))}))}},{key:"containsKey",value:function(e,t){return AT(e,this.userId,t)}},{key:"Rn",value:function(e){var t=this;return PT(e).get(this.userId).next((function(e){return e||{userId:t.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""}}))}}],[{key:"re",value:function(t,n,r,i){return Ox(""!==t.uid),new e(t.isAuthenticated()?t.uid:"",n,r,i)}}]),e}();function AT(e,t,n){var r=aS(t,n.path),i=r[1],a=IDBKeyRange.lowerBound(r),o=!1;return OT(e).Z({range:a,X:!0},(function(e,n,r){var a=u(e,3),s=a[0],l=a[1];a[2];s===t&&l===i&&(o=!0),r.done()})).next((function(){return o}))}function jT(e){return IS(e,"mutations")}function OT(e){return IS(e,"documentMutations")}function PT(e){return IS(e,"mutationQueues")}var RT=function(){function e(t){ua(this,e),this.bn=t}return ca(e,[{key:"next",value:function(){return this.bn+=2,this.bn}}],[{key:"Pn",value:function(){return new e(0)}},{key:"vn",value:function(){return new e(-1)}}]),e}(),DT=function(){function e(t,n){ua(this,e),this.referenceDelegate=t,this.yt=n}return ca(e,[{key:"allocateTargetId",value:function(e){var t=this;return this.Vn(e).next((function(n){var r=new RT(n.highestTargetId);return n.highestTargetId=r.next(),t.Sn(e,n).next((function(){return n.highestTargetId}))}))}},{key:"getLastRemoteSnapshotVersion",value:function(e){return this.Vn(e).next((function(e){return $x.fromTimestamp(new Qx(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))}},{key:"getHighestSequenceNumber",value:function(e){return this.Vn(e).next((function(e){return e.highestListenSequenceNumber}))}},{key:"setTargetsMetadata",value:function(e,t,n){var r=this;return this.Vn(e).next((function(i){return i.highestListenSequenceNumber=t,n&&(i.lastRemoteSnapshotVersion=n.toTimestamp()),t>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=t),r.Sn(e,i)}))}},{key:"addTargetData",value:function(e,t){var n=this;return this.Dn(e,t).next((function(){return n.Vn(e).next((function(r){return r.targetCount+=1,n.Cn(t,r),n.Sn(e,r)}))}))}},{key:"updateTargetData",value:function(e,t){return this.Dn(e,t)}},{key:"removeTargetData",value:function(e,t){var n=this;return this.removeMatchingKeysForTargetId(e,t.targetId).next((function(){return FT(e).delete(t.targetId)})).next((function(){return n.Vn(e)})).next((function(t){return Ox(t.targetCount>0),t.targetCount-=1,n.Sn(e,t)}))}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return FT(e).Z((function(o,s){var u=VS(s);u.sequenceNumber<=t&&null===n.get(u.targetId)&&(i++,a.push(r.removeTargetData(e,u)))})).next((function(){return vk.waitFor(a)})).next((function(){return i}))}},{key:"forEachTarget",value:function(e,t){return FT(e).Z((function(e,n){var r=VS(n);t(r)}))}},{key:"Vn",value:function(e){return LT(e).get("targetGlobalKey").next((function(e){return Ox(null!==e),e}))}},{key:"Sn",value:function(e,t){return LT(e).put("targetGlobalKey",t)}},{key:"Dn",value:function(e,t){return FT(e).put(BS(this.yt,t))}},{key:"Cn",value:function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n}},{key:"getTargetCount",value:function(e){return this.Vn(e).next((function(e){return e.targetCount}))}},{key:"getTargetData",value:function(e,t){var n=G_(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return FT(e).Z({range:r,index:"queryTargetsIndex"},(function(e,n,r){var a=VS(n);Y_(t,a.target)&&(i=a,r.done())})).next((function(){return i}))}},{key:"addMatchingKeys",value:function(e,t,n){var r=this,i=[],a=MT(e);return t.forEach((function(t){var o=eS(t.path);i.push(a.put({targetId:n,path:o})),i.push(r.referenceDelegate.addReference(e,n,t))})),vk.waitFor(i)}},{key:"removeMatchingKeys",value:function(e,t,n){var r=this,i=MT(e);
2return vk.forEach(t,(function(t){var a=eS(t.path);return vk.waitFor([i.delete([n,a]),r.referenceDelegate.removeReference(e,n,t)])}))}},{key:"removeMatchingKeysForTargetId",value:function(e,t){var n=MT(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=MT(e),i=cE();return r.Z({range:n,X:!0},(function(e,t,n){var r=rS(e[1]),a=new tk(r);i=i.add(a)})).next((function(){return i}))}},{key:"containsKey",value:function(e,t){var n=eS(t.path),r=IDBKeyRange.bound([n],[Yx(n)],!1,!0),i=0;return MT(e).Z({index:"documentTargetsIndex",X:!0,range:r},(function(e,t,n){var r=u(e,2),a=r[0];r[1];0!==a&&(i++,n.done())})).next((function(){return i>0}))}},{key:"ne",value:function(e,t){return FT(e).get(t).next((function(e){return e?VS(e):null}))}}]),e}();function FT(e){return IS(e,"targets")}function LT(e){return IS(e,"targetGlobal")}function MT(e){return IS(e,"targetDocuments")}function VT(e,t){var n=u(e,2),r=n[0],i=n[1],a=u(t,2),o=a[0],s=a[1],l=Kx(r,o);return 0===l?Kx(i,s):l}var BT=function(){function e(t){ua(this,e),this.xn=t,this.buffer=new M_(VT),this.Nn=0}return ca(e,[{key:"kn",value:function(){return++this.Nn}},{key:"On",value:function(e){var t=[e,this.kn()];if(this.buffer.size<this.xn)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();VT(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}}},{key:"maxValue",get:function(){return this.buffer.last()[0]}}]),e}(),zT=function(){function e(t,n,r){ua(this,e),this.garbageCollector=t,this.asyncQueue=n,this.localStore=r,this.Mn=null}return ca(e,[{key:"start",value:function(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.Fn(6e4)}},{key:"stop",value:function(){this.Mn&&(this.Mn.cancel(),this.Mn=null)}},{key:"started",get:function(){return null!==this.Mn}},{key:"Fn",value:function(e){var t=this;Tx("LruGarbageCollector","Garbage collection scheduled in ".concat(e,"ms")),this.Mn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.Mn=null,e.prev=1,e.next=4,t.localStore.collectGarbage(t.garbageCollector);case 4:e.next=14;break;case 6:if(e.prev=6,e.t0=e.catch(1),!wk(e.t0)){e.next=12;break}Tx("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e.t0),e.next=14;break;case 12:return e.next=14,dk(e.t0);case 14:return e.next=16,t.Fn(3e5);case 16:case"end":return e.stop()}}),e,null,[[1,6]])}))))}}]),e}(),qT=function(){function e(t,n){ua(this,e),this.$n=t,this.params=n}return ca(e,[{key:"calculateTargetCount",value:function(e,t){return this.$n.Bn(e).next((function(e){return Math.floor(t/100*e)}))}},{key:"nthSequenceNumber",value:function(e,t){var n=this;if(0===t)return vk.resolve(Tk.at);var r=new BT(t);return this.$n.forEachTarget(e,(function(e){return r.On(e.sequenceNumber)})).next((function(){return n.$n.Ln(e,(function(e){return r.On(e)}))})).next((function(){return r.maxValue}))}},{key:"removeTargets",value:function(e,t,n){return this.$n.removeTargets(e,t,n)}},{key:"removeOrphanedDocuments",value:function(e,t){return this.$n.removeOrphanedDocuments(e,t)}},{key:"collect",value:function(e,t){var n=this;return-1===this.params.cacheSizeCollectionThreshold?(Tx("LruGarbageCollector","Garbage collection skipped; disabled"),vk.resolve(ET)):this.getCacheSize(e).next((function(r){return r<n.params.cacheSizeCollectionThreshold?(Tx("LruGarbageCollector","Garbage collection skipped; Cache size ".concat(r," is lower than threshold ").concat(n.params.cacheSizeCollectionThreshold)),ET):n.qn(e,t)}))}},{key:"getCacheSize",value:function(e){return this.$n.getCacheSize(e)}},{key:"qn",value:function(e,t){var n,r,i,a,o,s,u,l=this,c=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((function(t){return t>l.params.maximumSequenceNumbersToCollect?(Tx("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of ".concat(l.params.maximumSequenceNumbersToCollect," from ").concat(t)),r=l.params.maximumSequenceNumbersToCollect):r=t,a=Date.now(),l.nthSequenceNumber(e,r)})).next((function(r){return n=r,o=Date.now(),l.removeTargets(e,n,t)})).next((function(t){return i=t,s=Date.now(),l.removeOrphanedDocuments(e,n)})).next((function(e){return u=Date.now(),Sx()<=go.DEBUG&&Tx("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in ".concat(a-c,"ms\n\tDetermined least recently used ").concat(r," in ")+(o-a)+"ms\n"+"\tRemoved ".concat(i," targets in ")+(s-o)+"ms\n"+"\tRemoved ".concat(e," documents in ")+(u-s)+"ms\n"+"Total Duration: ".concat(u-c,"ms")),vk.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e})}))}}]),e}(),UT=function(){function e(t,n){ua(this,e),this.db=t,this.garbageCollector=function(e,t){return new qT(e,t)}(this,n)}return ca(e,[{key:"Bn",value:function(e){var t=this.Un(e);return this.db.getTargetCache().getTargetCount(e).next((function(e){return t.next((function(t){return e+t}))}))}},{key:"Un",value:function(e){var t=0;return this.Ln(e,(function(e){t++})).next((function(){return t}))}}
2,{key:"forEachTarget",value:function(e,t){return this.db.getTargetCache().forEachTarget(e,t)}},{key:"Ln",value:function(e,t){return this.Kn(e,(function(e,n){return t(n)}))}},{key:"addReference",value:function(e,t,n){return HT(e,n)}},{key:"removeReference",value:function(e,t,n){return HT(e,n)}},{key:"removeTargets",value:function(e,t,n){return this.db.getTargetCache().removeTargets(e,t,n)}},{key:"markPotentiallyOrphaned",value:function(e,t){return HT(e,t)}},{key:"Gn",value:function(e,t){return function(e,t){var n=!1;return PT(e).tt((function(r){return AT(e,r,t).next((function(e){return e&&(n=!0),vk.resolve(!e)}))})).next((function(){return n}))}(e,t)}},{key:"removeOrphanedDocuments",value:function(e,t){var n=this,r=this.db.getRemoteDocumentCache().newChangeBuffer(),i=[],a=0;return this.Kn(e,(function(o,s){if(s<=t){var u=n.Gn(e,o).next((function(t){if(!t)return a++,r.getEntry(e,o).next((function(){return r.removeEntry(o,$x.min()),MT(e).delete([0,eS(o.path)])}))}));i.push(u)}})).next((function(){return vk.waitFor(i)})).next((function(){return r.apply(e)})).next((function(){return a}))}},{key:"removeTarget",value:function(e,t){var n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,n)}},{key:"updateLimboDocument",value:function(e,t){return HT(e,t)}},{key:"Kn",value:function(e,t){var n,r=MT(e),i=Tk.at;return r.Z({index:"documentTargetsIndex"},(function(e,r){var a=u(e,2),o=a[0],s=(a[1],r.path),l=r.sequenceNumber;0===o?(i!==Tk.at&&t(new tk(rS(n)),i),i=l,n=s):i=Tk.at})).next((function(){i!==Tk.at&&t(new tk(rS(n)),i)}))}},{key:"getCacheSize",value:function(e){return this.db.getRemoteDocumentCache().getSize(e)}}]),e}();function HT(e,t){return MT(e).put(function(e,t){return{targetId:0,path:eS(e.path),sequenceNumber:t}}(t,e.currentSequenceNumber))}var WT=function(){function e(){ua(this,e),this.changes=new ZC((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return ca(e,[{key:"addEntry",value:function(e){this.assertNotApplied(),this.changes.set(e.key,e)}},{key:"removeEntry",value:function(e,t){this.assertNotApplied(),this.changes.set(e,H_.newInvalidDocument(e).setReadTime(t))}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?vk.resolve(n):this.getFromCache(e,t)}},{key:"getEntries",value:function(e,t){return this.getAllFromCache(e,t)}},{key:"apply",value:function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}},{key:"assertNotApplied",value:function(){}}]),e}(),KT=function(){function e(t){ua(this,e),this.yt=t}return ca(e,[{key:"setIndexManager",value:function(e){this.indexManager=e}},{key:"addEntry",value:function(e,t,n){return $T(e).put(n)}},{key:"removeEntry",value:function(e,t,n){return $T(e).delete(function(e,t){var n=e.path.toArray();return[n.slice(0,n.length-2),n[n.length-2],DS(t),n[n.length-1]]}(t,n))}},{key:"updateMetadata",value:function(e,t){var n=this;return this.getMetadata(e).next((function(r){return r.byteSize+=t,n.Qn(e,r)}))}},{key:"getEntry",value:function(e,t){var n=this,r=H_.newInvalidDocument(t);return $T(e).Z({index:"documentKeyIndex",range:IDBKeyRange.only(XT(t))},(function(e,i){r=n.jn(t,i)})).next((function(){return r}))}},{key:"Wn",value:function(e,t){var n=this,r={size:0,document:H_.newInvalidDocument(t)};return $T(e).Z({index:"documentKeyIndex",range:IDBKeyRange.only(XT(t))},(function(e,i){r={document:n.jn(t,i),size:IT(i)}})).next((function(){return r}))}},{key:"getEntries",value:function(e,t){var n=this,r=tE();return this.zn(e,t,(function(e,t){var i=n.jn(e,t);r=r.insert(e,i)})).next((function(){return r}))}},{key:"Hn",value:function(e,t){var n=this,r=tE(),i=new D_(tk.comparator);return this.zn(e,t,(function(e,t){var a=n.jn(e,t);r=r.insert(e,a),i=i.insert(e,IT(t))})).next((function(){return{documents:r,Jn:i}}))}},{key:"zn",value:function(e,t,n){if(t.isEmpty())return vk.resolve();var r=new M_(ZT);t.forEach((function(e){return r=r.add(e)}));var i=IDBKeyRange.bound(XT(r.first()),XT(r.last())),a=r.getIterator(),o=a.getNext();return $T(e).Z({index:"documentKeyIndex",range:i},(function(e,t,r){for(var i=tk.fromSegments([].concat(bn(t.prefixPath),[t.collectionGroup,t.documentId]));o&&ZT(o,i)<0;)n(o,null),o=a.getNext();o&&o.isEqual(i)&&(n(o,t),o=a.hasNext()?a.getNext():null),o?r.j(XT(o)):r.done()})).next((function(){for(;o;)n(o,null),o=a.hasNext()?a.getNext():null}))}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this,a=t.path,o=[a.popLast().toArray(),a.lastSegment(),DS(n.readTime),n.documentKey.path.isEmpty()?"":n.documentKey.path.lastSegment()],s=[a.popLast().toArray(),a.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return $T(e).W(IDBKeyRange.bound(o,s,!0)).next((function(e){var n,a=tE(),o=ya(e);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=i.jn(tk.fromSegments(s.prefixPath.concat(s.collectionGroup,s.documentId)),s);
2u.isFoundDocument()&&(hC(t,u)||r.has(u.key))&&(a=a.insert(u.key,u))}}catch(l){o.e(l)}finally{o.f()}return a}))}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){var i=this,a=tE(),o=JT(t,n),s=JT(t,lk.max());return $T(e).Z({index:"collectionGroupIndex",range:IDBKeyRange.bound(o,s,!0)},(function(e,t,n){var o=i.jn(tk.fromSegments(t.prefixPath.concat(t.collectionGroup,t.documentId)),t);(a=a.insert(o.key,o)).size===r&&n.done()})).next((function(){return a}))}},{key:"newChangeBuffer",value:function(e){return new YT(this,!!e&&e.trackRemovals)}},{key:"getSize",value:function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))}},{key:"getMetadata",value:function(e){return QT(e).get("remoteDocumentGlobalKey").next((function(e){return Ox(!!e),e}))}},{key:"Qn",value:function(e,t){return QT(e).put("remoteDocumentGlobalKey",t)}},{key:"jn",value:function(e,t){if(t){var n=function(e,t){var n;if(t.document)n=VE(e.ie,t.document,!!t.hasCommittedMutations);else if(t.noDocument){var r=tk.fromSegments(t.noDocument.path),i=LS(t.noDocument.readTime);n=H_.newNoDocument(r,i),t.hasCommittedMutations&&n.setHasCommittedMutations()}else{if(!t.unknownDocument)return jx();var a=tk.fromSegments(t.unknownDocument.path),o=LS(t.unknownDocument.version);n=H_.newUnknownDocument(a,o)}return t.readTime&&n.setReadTime(function(e){var t=new Qx(e[0],e[1]);return $x.fromTimestamp(t)}(t.readTime)),n}(this.yt,t);if(!n.isNoDocument()||!n.version.isEqual($x.min()))return n}return H_.newInvalidDocument(e)}}]),e}();function GT(e){return new KT(e)}var YT=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this)).Yn=e,i.trackRemovals=r,i.Xn=new ZC((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),i}return ca(n,[{key:"applyChanges",value:function(e){var t=this,n=[],r=0,i=new M_((function(e,t){return Kx(e.canonicalString(),t.canonicalString())}));
2return this.changes.forEach((function(a,o){var s=t.Xn.get(a);if(n.push(t.Yn.removeEntry(e,a,s.readTime)),o.isValidDocument()){var u=RS(t.Yn.yt,o);i=i.add(a.path.popLast());var l=IT(u);r+=l-s.size,n.push(t.Yn.addEntry(e,a,u))}else if(r-=s.size,t.trackRemovals){var c=RS(t.Yn.yt,o.convertToNoDocument($x.min()));n.push(t.Yn.addEntry(e,a,c))}})),i.forEach((function(r){n.push(t.Yn.indexManager.addToCollectionParentIndex(e,r))})),n.push(this.Yn.updateMetadata(e,r)),vk.waitFor(n)}},{key:"getFromCache",value:function(e,t){var n=this;return this.Yn.Wn(e,t).next((function(e){return n.Xn.set(t,{size:e.size,readTime:e.document.readTime}),e.document}))}},{key:"getAllFromCache",value:function(e,t){var n=this;return this.Yn.Hn(e,t).next((function(e){var t=e.documents;return e.Jn.forEach((function(e,r){n.Xn.set(e,{size:r,readTime:t.get(e).readTime})})),t}))}}]),n}(WT);function QT(e){return IS(e,"remoteDocumentGlobal")}function $T(e){return IS(e,"remoteDocumentsV14")}function XT(e){var t=e.path.toArray();return[t.slice(0,t.length-2),t[t.length-2],t[t.length-1]]}function JT(e,t){var n=t.documentKey.path.toArray();return[e,DS(t.readTime),n.slice(0,n.length-2),n.length>0?n[n.length-1]:""]}function ZT(e,t){for(var n=e.path.toArray(),r=t.path.toArray(),i=0,a=0;a<n.length-2&&a<r.length-2;++a)if(i=Kx(n[a],r[a]))return i;return(i=Kx(n.length,r.length))||((i=Kx(n[n.length-2],r[r.length-2]))||Kx(n[n.length-1],r[r.length-1]))}var eI=ca((function e(t,n){ua(this,e),this.overlayedDocument=t,this.mutatedFields=n})),tI=function(){function e(t,n,r,i){ua(this,e),this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}return ca(e,[{key:"getDocument",value:function(e,t){var n=this,r=null;return this.documentOverlayCache.getOverlay(e,t).next((function(i){return r=i,n.remoteDocumentCache.getEntry(e,t)})).next((function(e){return null!==r&&MC(r.mutation,e,z_.empty(),Qx.now()),e}))}},{key:"getDocuments",value:function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.getLocalViewOfDocuments(e,t,cE()).next((function(){return t}))}))}},{key:"getLocalViewOfDocuments",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cE(),i=aE();return this.populateOverlays(e,i,t).next((function(){return n.computeViews(e,t,i,r).next((function(e){var t=rE();return e.forEach((function(e,n){t=t.insert(e,n.overlayedDocument)})),t}))}))}},{key:"getOverlayedDocuments",value:function(e,t){var n=this,r=aE();return this.populateOverlays(e,r,t).next((function(){return n.computeViews(e,t,r,cE())}))}},{key:"populateOverlays",value:function(e,t,n){var r=[];return n.forEach((function(e){t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((function(e){e.forEach((function(e,n){t.set(e,n)}))}))}},{key:"computeViews",value:function(e,t,n,r){var i=tE(),a=sE(),o=sE();return t.forEach((function(e,t){var o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof qC)?i=i.insert(t.key,t):void 0!==o?(a.set(t.key,o.mutation.getFieldMask()),MC(o.mutation,t,o.mutation.getFieldMask(),Qx.now())):a.set(t.key,z_.empty())})),this.recalculateAndSaveOverlays(e,i).next((function(e){return e.forEach((function(e,t){return a.set(e,t)})),t.forEach((function(e,t){var n;return o.set(e,new eI(t,null!==(n=a.get(e))&&void 0!==n?n:null))})),o}))}},{key:"recalculateAndSaveOverlays",value:function(e,t){var n=this,r=sE(),i=new D_((function(e,t){return e-t})),a=cE();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){var n,a=ya(e);try{var o=function(){var e=n.value;e.keys().forEach((function(n){var a=t.get(n);if(null!==a){var o=r.get(n)||z_.empty();o=e.applyToLocalView(a,o),r.set(n,o);var s=(i.get(e.batchId)||cE()).add(n);i=i.insert(e.batchId,s)}}))};for(a.s();!(n=a.n()).done;)o()}catch(s){a.e(s)}finally{a.f()}})).next((function(){for(var o=[],s=i.getReverseIterator(),u=function(){var i=s.getNext(),u=i.key,l=i.value,c=oE();l.forEach((function(e){if(!a.has(e)){var n=FC(t.get(e),r.get(e));null!==n&&c.set(e,n),a=a.add(e)}})),o.push(n.documentOverlayCache.saveOverlays(e,u,c))};s.hasNext();)u();return vk.waitFor(o)})).next((function(){return r}))}},{key:"recalculateAndSaveOverlaysForDocumentKeys",value:function(e,t){var n=this;return this.remoteDocumentCache.getEntries(e,t).next((function(t){return n.recalculateAndSaveOverlays(e,t)}))}},{key:"getDocumentsMatchingQuery",value:function(e,t,n){return function(e){return tk.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):aC(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}},{key:"getNextDocuments",value:function(e,t,n,r){var i=this;return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((function(a){var o=r-a.size>0?i.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-a.size):vk.resolve(aE()),s=-1,u=a;
2return o.next((function(t){return vk.forEach(t,(function(t,n){return s<n.largestBatchId&&(s=n.largestBatchId),a.get(t)?vk.resolve():i.remoteDocumentCache.getEntry(e,t).next((function(e){u=u.insert(t,e)}))})).next((function(){return i.populateOverlays(e,t,a)})).next((function(){return i.computeViews(e,u,t,cE())})).next((function(e){return{batchId:s,changes:iE(e)}}))}))}))}},{key:"getDocumentsMatchingDocumentQuery",value:function(e,t){return this.getDocument(e,new tk(t)).next((function(e){var t=rE();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"getDocumentsMatchingCollectionGroupQuery",value:function(e,t,n){var r=this,i=t.collectionGroup,a=rE();return this.indexManager.getCollectionParents(e,i).next((function(o){return vk.forEach(o,(function(o){var s=function(e,t){return new Z_(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.getDocumentsMatchingCollectionQuery(e,s,n).next((function(e){e.forEach((function(e,t){a=a.insert(e,t)}))}))})).next((function(){return a}))}))}},{key:"getDocumentsMatchingCollectionQuery",value:function(e,t,n){var r,i=this;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next((function(a){return r=a,i.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,r)})).next((function(e){r.forEach((function(t,n){var r=n.getKey();null===e.get(r)&&(e=e.insert(r,H_.newInvalidDocument(r)))}));var n=rE();return e.forEach((function(e,i){var a=r.get(e);void 0!==a&&MC(a.mutation,i,z_.empty(),Qx.now()),hC(t,i)&&(n=n.insert(e,i))})),n}))}}]),e}(),nI=function(){function e(t){ua(this,e),this.yt=t,this.Zn=new Map,this.ts=new Map}return ca(e,[{key:"getBundleMetadata",value:function(e,t){return vk.resolve(this.Zn.get(t))}},{key:"saveBundleMetadata",value:function(e,t){var n;return this.Zn.set(t.id,{id:(n=t).id,version:n.version,createTime:NE(n.createTime)}),vk.resolve()}},{key:"getNamedQuery",value:function(e,t){return vk.resolve(this.ts.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.ts.set(t.name,function(e){return{name:e.name,query:zS(e.bundledQuery),readTime:NE(e.readTime)}}(t)),vk.resolve()}}]),e}(),rI=function(){function e(){ua(this,e),this.overlays=new D_(tk.comparator),this.es=new Map}return ca(e,[{key:"getOverlay",value:function(e,t){return vk.resolve(this.overlays.get(t))}},{key:"getOverlays",value:function(e,t){var n=this,r=aE();return vk.forEach(t,(function(t){return n.getOverlay(e,t).next((function(e){null!==e&&r.set(t,e)}))})).next((function(){return r}))}},{key:"saveOverlays",value:function(e,t,n){var r=this;return n.forEach((function(n,i){r.oe(e,t,i)})),vk.resolve()}},{key:"removeOverlaysForBatchId",value:function(e,t,n){var r=this,i=this.es.get(n);return void 0!==i&&(i.forEach((function(e){return r.overlays=r.overlays.remove(e)})),this.es.delete(n)),vk.resolve()}},{key:"getOverlaysForCollection",value:function(e,t,n){for(var r=aE(),i=t.length+1,a=new tk(t.child("")),o=this.overlays.getIteratorFrom(a);o.hasNext();){var s=o.getNext().value,u=s.getKey();if(!t.isPrefixOf(u.path))break;u.path.length===i&&s.largestBatchId>n&&r.set(s.getKey(),s)}return vk.resolve(r)}},{key:"getOverlaysForCollectionGroup",value:function(e,t,n,r){for(var i=new D_((function(e,t){return e-t})),a=this.overlays.getIterator();a.hasNext();){var o=a.getNext().value;if(o.getKey().getCollectionGroup()===t&&o.largestBatchId>n){var s=i.get(o.largestBatchId);null===s&&(s=aE(),i=i.insert(o.largestBatchId,s)),s.set(o.getKey(),o)}}for(var u=aE(),l=i.getIterator();l.hasNext()&&(l.getNext().value.forEach((function(e,t){return u.set(e,t)})),!(u.size()>=r)););return vk.resolve(u)}},{key:"oe",value:function(e,t,n){var r=this.overlays.get(n.key);if(null!==r){var i=this.es.get(r.largestBatchId).delete(n.key);this.es.set(r.largestBatchId,i)}this.overlays=this.overlays.insert(n.key,new jS(t,n));var a=this.es.get(t);void 0===a&&(a=cE(),this.es.set(t,a)),this.es.set(t,a.add(n.key))}}]),e}(),iI=function(){function e(){ua(this,e),this.ns=new M_(aI.ss),this.rs=new M_(aI.os)}return ca(e,[{key:"isEmpty",value:function(){return this.ns.isEmpty()}},{key:"addReference",value:function(e,t){var n=new aI(e,t);this.ns=this.ns.add(n),this.rs=this.rs.add(n)}},{key:"us",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.cs(new aI(e,t))}},{key:"hs",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"ls",value:function(e){var t=this,n=new tk(new Jx([])),r=new aI(n,e),i=new aI(n,e+1),a=[];
2return this.rs.forEachInRange([r,i],(function(e){t.cs(e),a.push(e.key)})),a}},{key:"fs",value:function(){var e=this;this.ns.forEach((function(t){return e.cs(t)}))}},{key:"cs",value:function(e){this.ns=this.ns.delete(e),this.rs=this.rs.delete(e)}},{key:"ds",value:function(e){var t=new tk(new Jx([])),n=new aI(t,e),r=new aI(t,e+1),i=cE();return this.rs.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new aI(e,0),n=this.ns.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),aI=function(){function e(t,n){ua(this,e),this.key=t,this._s=n}return ca(e,null,[{key:"ss",value:function(e,t){return tk.comparator(e.key,t.key)||Kx(e._s,t._s)}},{key:"os",value:function(e,t){return Kx(e._s,t._s)||tk.comparator(e.key,t.key)}}]),e}(),oI=function(){function e(t,n){ua(this,e),this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.ws=1,this.gs=new M_(aI.ss)}return ca(e,[{key:"checkEmpty",value:function(e){return vk.resolve(0===this.mutationQueue.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.ws;this.ws++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];var a=new NS(i,t,n,r);this.mutationQueue.push(a);var o,s=ya(r);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.gs=this.gs.add(new aI(u.key,i)),this.indexManager.addToCollectionParentIndex(e,u.key.path.popLast())}}catch(l){s.e(l)}finally{s.f()}return vk.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return vk.resolve(this.ys(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this.ps(n),i=r
2<0?0:r;return vk.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return vk.resolve(0===this.mutationQueue.length?-1:this.ws-1)}},{key:"getAllMutationBatches",value:function(e){return vk.resolve(this.mutationQueue.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new aI(t,0),i=new aI(t,Number.POSITIVE_INFINITY),a=[];return this.gs.forEachInRange([r,i],(function(e){var t=n.ys(e._s);a.push(t)})),vk.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new M_(Kx);return t.forEach((function(e){var t=new aI(e,0),i=new aI(e,Number.POSITIVE_INFINITY);n.gs.forEachInRange([t,i],(function(e){r=r.add(e._s)}))})),vk.resolve(this.Is(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;tk.isDocumentKey(i)||(i=i.child(""));var a=new aI(new tk(i),0),o=new M_(Kx);return this.gs.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e._s)),!0)}),a),vk.resolve(this.Is(o))}},{key:"Is",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t.ys(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;Ox(0===this.Ts(t.batchId,"removed")),this.mutationQueue.shift();var r=this.gs;return vk.forEach(t.mutations,(function(i){var a=new aI(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.gs=r}))}},{key:"An",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new aI(t,0),r=this.gs.firstAfterOrEqual(n);return vk.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.mutationQueue.length,vk.resolve()}},{key:"Ts",value:function(e,t){return this.ps(e)}},{key:"ps",value:function(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}},{key:"ys",value:function(e){var t=this.ps(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}]),e}(),sI=function(){function e(t){ua(this,e),this.Es=t,this.docs=new D_(tk.comparator),this.size=0}return ca(e,[{key:"setIndexManager",value:function(e){this.indexManager=e}},{key:"addEntry",value:function(e,t){var n=t.key,r=this.docs.get(n),i=r?r.size:0,a=this.Es(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:a}),this.size+=a-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}},{key:"removeEntry",value:function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}},{key:"getEntry",value:function(e,t){var n=this.docs.get(t);return vk.resolve(n?n.document.mutableCopy():H_.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=tE();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():H_.newInvalidDocument(e))})),vk.resolve(r)}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){for(var i=tE(),a=t.path,o=new tk(a.child("")),s=this.docs.getIteratorFrom(o);s.hasNext();){var u=s.getNext(),l=u.key,c=u.value.document;if(!a.isPrefixOf(l.path))break;l.path.length>a.length+1||ck(uk(c),n)<=0||(r.has(c.key)||hC(t,c))&&(i=i.insert(c.key,c.mutableCopy()))}return vk.resolve(i)}},{key:"getAllFromCollectionGroup",value:function(e,t,n,r){jx()}},{key:"As",value:function(e,t){return vk.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new uI(this)}},{key:"getSize",value:function(e){return vk.resolve(this.size)}}]),e}(),uI=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this)).Yn=e,r}return ca(n,[{key:"applyChanges",value:function(e){var t=this,n=[];
2return this.changes.forEach((function(r,i){i.isValidDocument()?n.push(t.Yn.addEntry(e,i)):t.Yn.removeEntry(r)})),vk.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.Yn.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.Yn.getEntries(e,t)}}]),n}(WT),lI=function(){function e(t){ua(this,e),this.persistence=t,this.Rs=new ZC((function(e){return G_(e)}),Y_),this.lastRemoteSnapshotVersion=$x.min(),this.highestTargetId=0,this.bs=0,this.Ps=new iI,this.targetCount=0,this.vs=RT.Pn()}return ca(e,[{key:"forEachTarget",value:function(e,t){return this.Rs.forEach((function(e,n){return t(n)})),vk.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return vk.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return vk.resolve(this.bs)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.vs.next(),vk.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.bs&&(this.bs=t),vk.resolve()}},{key:"Dn",value:function(e){this.Rs.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.vs=new RT(t),this.highestTargetId=t),e.sequenceNumber>this.bs&&(this.bs=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.Dn(t),this.targetCount+=1,vk.resolve()}},{key:"updateTargetData",value:function(e,t){return this.Dn(t),vk.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Rs.delete(t.target),this.Ps.ls(t.targetId),this.targetCount-=1,vk.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Rs.forEach((function(o,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.Rs.delete(o),a.push(r.removeMatchingKeysForTargetId(e,s.targetId)),i++)})),vk.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return vk.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Rs.get(t)||null;return vk.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.Ps.us(t,n),vk.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.Ps.hs(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),vk.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.Ps.ls(t),vk.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.Ps.ds(t);return vk.resolve(n)}},{key:"containsKey",value:function(e,t){return vk.resolve(this.Ps.containsKey(t))}}]),e}(),cI=function(){function e(t,n){var r=this;ua(this,e),this.Vs={},this.overlays={},this.Ss=new Tk(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=t(this),this.Cs=new lI(this),this.indexManager=new mT,this.remoteDocumentCache=new sI((function(e){return r.referenceDelegate.xs(e)})),this.yt=new PS(n),this.Ns=new nI(this.yt)}return ca(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.Ds=!1,Promise.resolve()}},{key:"started",get:function(){return this.Ds}},{key:"setDatabaseDeletedListener",value:function(){}},{key:"setNetworkEnabled",value:function(){}},{key:"getIndexManager",value:function(e){return this.indexManager}},{key:"getDocumentOverlayCache",value:function(e){var t=this.overlays[e.toKey()];return t||(t=new rI,this.overlays[e.toKey()]=t),t}},{key:"getMutationQueue",value:function(e,t){var n=this.Vs[e.toKey()];return n||(n=new oI(t,this.referenceDelegate),this.Vs[e.toKey()]=n),n}},{key:"getTargetCache",value:function(){return this.Cs}},{key:"getRemoteDocumentCache",value:function(){return this.remoteDocumentCache}},{key:"getBundleCache",value:function(){return this.Ns}},{key:"runTransaction",value:function(e,t,n){var r=this;Tx("MemoryPersistence","Starting transaction:",e);var i=new fI(this.Ss.next());return this.referenceDelegate.ks(),n(i).next((function(e){return r.referenceDelegate.Os(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"Ms",value:function(e,t){return vk.or(Object.values(this.Vs).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),fI=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return ca(n)}(hk),hI=function(){function e(t){ua(this,e),this.persistence=t,this.Fs=new iI,this.$s=null}return ca(e,[{key:"Ls",get:function(){if(this.$s)return this.$s;throw jx()}},{key:"addReference",value:function(e,t,n){return this.Fs.addReference(n,t),this.Ls.delete(n.toString()),vk.resolve()}},{key:"removeReference",value:function(e,t,n){return this.Fs.removeReference(n,t),this.Ls.add(n.toString()),vk.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.Ls.add(t.toString()),vk.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;
2this.Fs.ls(t.targetId).forEach((function(e){return n.Ls.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.Ls.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"ks",value:function(){this.$s=new Set}},{key:"Os",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return vk.forEach(this.Ls,(function(r){var i=tk.fromPath(r);return t.qs(e,i).next((function(e){e||n.removeEntry(i,$x.min())}))})).next((function(){return t.$s=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.qs(e,t).next((function(e){e?n.Ls.delete(t.toString()):n.Ls.add(t.toString())}))}},{key:"xs",value:function(e){return 0}},{key:"qs",value:function(e,t){var n=this;return vk.or([function(){return vk.resolve(n.Fs.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Ms(e,t)}])}}],[{key:"Bs",value:function(t){return new e(t)}}]),e}(),dI=function(){function e(t){ua(this,e),this.yt=t}return ca(e,[{key:"$",value:function(e,t,n,r){var i=this,a=new mk("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore("owner")}(e),function(e){e.createObjectStore("mutationQueues",{keyPath:"userId"}),e.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",iS,{unique:!0}),e.createObjectStore("documentMutations")}(e),pI(e),function(e){e.createObjectStore("remoteDocuments")}(e));var o=vk.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore("targetDocuments"),e.deleteObjectStore("targets"),e.deleteObjectStore("targetGlobal")}(e),pI(e)),o=o.next((function(){return function(e){var t=e.store("targetGlobal"),n={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:$x.min().toTimestamp(),targetCount:0};return t.put("targetGlobalKey",n)}(a)}))),n<4&&r>=4&&(0!==n&&(o=o.next((function(){return function(e,t){return t.store("mutations").W().next((function(n){e.deleteObjectStore("mutations"),e.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",iS,{unique:!0});var r=t.store("mutations"),i=n.map((function(e){return r.put(e)}));return vk.waitFor(i)}))}(e,a)}))),o=o.next((function(){!function(e){e.createObjectStore("clientMetadata",{keyPath:"clientId"})}(e)}))),n<5&&r>=5&&(o=o.next((function(){return i.Us(a)}))),n<6&&r>=6&&(o=o.next((function(){return function(e){e.createObjectStore("remoteDocumentGlobal")}(e),i.Ks(a)}))),n<7&&r>=7&&(o=o.next((function(){return i.Gs(a)}))),n<8&&r>=8&&(o=o.next((function(){return i.Qs(e,a)}))),n<9&&r>=9&&(o=o.next((function(){!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e)}))),n<10&&r>=10&&(o=o.next((function(){return i.js(a)}))),n<11&&r>=11&&(o=o.next((function(){!function(e){e.createObjectStore("bundles",{keyPath:"bundleId"})}(e),function(e){e.createObjectStore("namedQueries",{keyPath:"name"})}(e)}))),n<12&&r>=12&&(o=o.next((function(){!function(e){var t=e.createObjectStore("documentOverlays",{keyPath:bS});t.createIndex("collectionPathOverlayIndex",wS,{unique:!1}),t.createIndex("collectionGroupOverlayIndex",xS,{unique:!1})}(e)}))),n<13&&r>=13&&(o=o.next((function(){return function(e){var t=e.createObjectStore("remoteDocumentsV14",{keyPath:uS});t.createIndex("documentKeyIndex",lS),t.createIndex("collectionGroupIndex",cS)}(e)})).next((function(){return i.Ws(e,a)})).next((function(){return e.deleteObjectStore("remoteDocuments")}))),n<14&&r>=14&&(o=o.next((function(){return i.zs(e,a)}))),n<15&&r>=15&&(o=o.next((function(){return function(e){e.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),e.createObjectStore("indexState",{keyPath:vS}).createIndex("sequenceNumberIndex",mS,{unique:!1}),e.createObjectStore("indexEntries",{keyPath:yS}).createIndex("documentKeyIndex",gS,{unique:!1})}(e)}))),o}},{key:"Ks",value:function(e){var t=0;return e.store("remoteDocuments").Z((function(e,n){t+=IT(n)})).next((function(){var n={byteSize:t};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",n)}
2))}},{key:"Us",value:function(e){var t=this,n=e.store("mutationQueues"),r=e.store("mutations");return n.W().next((function(n){return vk.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.W("userMutationsIndex",i).next((function(r){return vk.forEach(r,(function(r){Ox(r.userId===n.userId);var i=MS(t.yt,r);return TT(e,n.userId,i).next((function(){}))}))}))}))}))}},{key:"Gs",value:function(e){var t=e.store("targetDocuments"),n=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next((function(e){var r=[];return n.Z((function(n,i){var a=new Jx(n),o=function(e){return[0,eS(e)]}(a);r.push(t.get(o).next((function(n){return n?vk.resolve():function(n){return t.put({targetId:0,path:eS(n),sequenceNumber:e.highestListenSequenceNumber})}(a)})))})).next((function(){return vk.waitFor(r)}))}))}},{key:"Qs",value:function(e,t){e.createObjectStore("collectionParents",{keyPath:pS});var n=t.store("collectionParents"),r=new yT,i=function(e){if(r.add(e)){var t=e.lastSegment(),i=e.popLast();return n.put({collectionId:t,parent:eS(i)})}};return t.store("remoteDocuments").Z({X:!0},(function(e,t){var n=new Jx(e);return i(n.popLast())})).next((function(){return t.store("documentMutations").Z({X:!0},(function(e,t){var n=u(e,3),r=(n[0],n[1]),a=(n[2],rS(r));return i(a.popLast())}))}))}},{key:"js",value:function(e){var t=this,n=e.store("targets");return n.Z((function(e,r){var i=VS(r),a=BS(t.yt,i);return n.put(a)}))}},{key:"Ws",value:function(e,t){var n=t.store("remoteDocuments"),r=[];return n.Z((function(e,n){var i,a=t.store("remoteDocumentsV14"),o=(i=n,i.document?new tk(Jx.fromString(i.document.name).popFirst(5)):i.noDocument?tk.fromSegments(i.noDocument.path):i.unknownDocument?tk.fromSegments(i.unknownDocument.path):jx()).path.toArray(),s={prefixPath:o.slice(0,o.length-2),collectionGroup:o[o.length-2],documentId:o[o.length-1],readTime:n.readTime||[0,0],unknownDocument:n.unknownDocument,noDocument:n.noDocument,document:n.document,hasCommittedMutations:!!n.hasCommittedMutations};r.push(a.put(s))})).next((function(){return vk.waitFor(r)}))}},{key:"zs",value:function(e,t){var n=this,r=t.store("mutations"),i=GT(this.yt),a=new cI(hI.Bs,this.yt.ie);return r.W().next((function(e){var r=new Map;return e.forEach((function(e){var t,i=null!==(t=r.get(e.userId))&&void 0!==t?t:cE();MS(n.yt,e).keys().forEach((function(e){return i=i.add(e)})),r.set(e.userId,i)})),vk.forEach(r,(function(e,r){var o=new _x(r),s=YS.re(n.yt,o),u=a.getIndexManager(o),l=NT.re(o,n.yt,u,a.referenceDelegate);return new tI(i,l,s,u).recalculateAndSaveOverlaysForDocumentKeys(new TS(t,Tk.at),e).next()}))}))}}]),e}();function pI(e){e.createObjectStore("targetDocuments",{keyPath:hS}).createIndex("documentTargetsIndex",dS,{unique:!0}),e.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",fS,{unique:!0}),e.createObjectStore("targetGlobal")}var vI="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",mI=function(){function e(t,n,r,i,a,o,s,u,l,c){var f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:15;if(ua(this,e),this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.Hs=a,this.window=o,this.document=s,this.Js=l,this.Ys=c,this.Xs=f,this.Ss=null,this.Ds=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Zs=null,this.inForeground=!1,this.ti=null,this.ei=null,this.ni=Number.NEGATIVE_INFINITY,this.si=function(e){return Promise.resolve()},!e.C())throw new Dx(Rx.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new UT(this,i),this.ii=n+"main",this.yt=new PS(u),this.ri=new yk(this.ii,this.Xs,new dI(this.yt)),this.Cs=new DT(this.referenceDelegate,this.yt),this.remoteDocumentCache=GT(this.yt),this.Ns=new WS,this.window&&this.window.localStorage?this.oi=this.window.localStorage:(this.oi=null,!1===c&&Ix("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return ca(e,[{key:"start",value:function(){var e=this;return this.ui().then((function(){if(!e.isPrimary&&!e.allowTabSynchronization)throw new Dx(Rx.FAILED_PRECONDITION,vI);return e.ci(),e.ai(),e.hi(),e.runTransaction("getHighestListenSequenceNumber","readonly",(function(t){return e.Cs.getHighestSequenceNumber(t)}))}
2)).then((function(t){e.Ss=new Tk(t,e.Js)})).then((function(){e.Ds=!0})).catch((function(t){return e.ri&&e.ri.close(),Promise.reject(t)}))}},{key:"li",value:function(e){var t=this;return this.si=function(){var n=a(r().mark((function n(i){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t.started){n.next=2;break}return n.abrupt("return",e(i));case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),e(this.isPrimary)}},{key:"setDatabaseDeletedListener",value:function(e){this.ri.L(function(){var t=a(r().mark((function t(n){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=null===n.newVersion,!t.t0){t.next=4;break}return t.next=4,e();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"setNetworkEnabled",value:function(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.Hs.enqueueAndForget(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.started,!e.t0){e.next=4;break}return e.next=4,t.ui();case 4:case"end":return e.stop()}}),e)})))))}},{key:"ui",value:function(){var e=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(t){return gI(t).put({clientId:e.clientId,updateTimeMs:Date.now(),networkEnabled:e.networkEnabled,inForeground:e.inForeground}).next((function(){if(e.isPrimary)return e.fi(t).next((function(t){t||(e.isPrimary=!1,e.Hs.enqueueRetryable((function(){return e.si(!1)})))}))})).next((function(){return e.di(t)})).next((function(n){return e.isPrimary&&!n?e._i(t).next((function(){return!1})):!!n&&e.wi(t).next((function(){return!0}))}))})).catch((function(t){if(wk(t))return Tx("IndexedDbPersistence","Failed to extend owner lease: ",t),e.isPrimary;if(!e.allowTabSynchronization)throw t;return Tx("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((function(t){e.isPrimary!==t&&e.Hs.enqueueRetryable((function(){return e.si(t)})),e.isPrimary=t}))}},{key:"fi",value:function(e){var t=this;return yI(e).get("owner").next((function(e){return vk.resolve(t.mi(e))}))}},{key:"gi",value:function(e){return gI(e).delete(this.clientId)}},{key:"yi",value:function(){var e=a(r().mark((function e(){var t,n,i,a,o=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPrimary||this.pi(this.ni,18e5)){e.next=6;break}return this.ni=Date.now(),e.next=4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(e){var t=IS(e,"clientMetadata");return t.W().next((function(e){var n=o.Ii(e,18e5),r=e.filter((function(e){return-1===n.indexOf(e)}));return vk.forEach(r,(function(e){return t.delete(e.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}));case 4:if(t=e.sent,this.oi){n=ya(t);try{for(n.s();!(i=n.n()).done;)a=i.value,this.oi.removeItem(this.Ti(a.clientId))}catch(r){n.e(r)}finally{n.f()}}case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hi",value:function(){var e=this;this.ei=this.Hs.enqueueAfterDelay("client_metadata_refresh",4e3,(function(){return e.ui().then((function(){return e.yi()})).then((function(){return e.hi()}))}))}},{key:"mi",value:function(e){return!!e&&e.ownerId===this.clientId}},{key:"di",value:function(e){var t=this;return this.Ys?vk.resolve(!0):yI(e).get("owner").next((function(n){if(null!==n&&t.pi(n.leaseTimestampMs,5e3)&&!t.Ei(n.ownerId)){if(t.mi(n)&&t.networkEnabled)return!0;if(!t.mi(n)){if(!n.allowTabSynchronization)throw new Dx(Rx.FAILED_PRECONDITION,vI);return!1}}return!(!t.networkEnabled||!t.inForeground)||gI(e).W().next((function(e){return void 0===t.Ii(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,i=t.networkEnabled===e.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&Tx("IndexedDbPersistence","Client ".concat(e?"is":"is not"," eligible for a primary lease.")),e}))}},{key:"shutdown",value:function(){var e=a(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Ds=!1,this.Ai(),this.ei&&(this.ei.cancel(),this.ei=null),this.Ri(),this.bi(),e.next=7,this.ri.runTransaction("shutdown","readwrite",["owner","clientMetadata"],(function(e){var n=new TS(e,Tk.at);return t._i(n).next((function(){return t.gi(n)}))}));case 7:this.ri.close(),this.Pi();case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Ii",value:function(e,t){var n=this;return e.filter((function(e){return n.pi(e.updateTimeMs,t)&&!n.Ei(e.clientId)}))}},{key:"vi",value:function(){var e=this;return this.runTransaction("getActiveClients","readonly",(function(t){return gI(t).W().next((function(t){return e.Ii(t,18e5).map((function(e){return e.clientId}))}))}))}},{key:"started",get:function(){return this.Ds}},{key:"getMutationQueue",value:function(e,t){return NT.re(e,this.yt,t,this.referenceDelegate)}},{key:"getTargetCache",value:function(){return this.Cs}},{key:"getRemoteDocumentCache",value:function(){return this.remoteDocumentCache}},{key:"getIndexManager",value:function(e){return new bT(e,this.yt.ie.databaseId)}},{key:"getDocumentOverlayCache",value:function(e){return YS.re(this.yt,e)}},{key:"getBundleCache",value:function(){return this.Ns}},{key:"runTransaction",value:function(e,t,n){var r=this;Tx("IndexedDbPersistence","Starting transaction:",e);var i,a,o="readonly"===t?"readonly":"readwrite",s=15===(i=this.Xs)?SS:14===i?ES:13===i?CS:12===i?_S:11===i?kS:void jx();return this.ri.runTransaction(e,o,s,(function(i){return a=new TS(i,r.Ss?r.Ss.next():Tk.at),"readwrite-primary"===t?r.fi(a).next((function(e){return!!e||r.di(a)})).next((function(t){if(!t)throw Ix("Failed to obtain primary lease for action '".concat(e,"'.")),r.isPrimary=!1,r.Hs.enqueueRetryable((function(){return r.si(!1)})),new Dx(Rx.FAILED_PRECONDITION,fk);return n(a)})).next((function(e){return r.wi(a).next((function(){return e}))})):r.Vi(a).next((function(){return n(a)}))})).then((function(e){return a.raiseOnCommittedEvent(),e}))}},{key:"Vi",value:function(e){var t=this;return yI(e).get("owner").next((function(e){if(null!==e&&t.pi(e.leaseTimestampMs,5e3)&&!t.Ei(e.ownerId)&&!t.mi(e)&&!(t.Ys||t.allowTabSynchronization&&e.allowTabSynchronization))throw new Dx(Rx.FAILED_PRECONDITION,vI)}))}},{key:"wi",value:function(e){var t={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return yI(e).put("owner",t)}},{key:"_i",value:function(e){var t=this,n=yI(e);return n.get("owner").next((function(e){return t.mi(e)?(Tx("IndexedDbPersistence","Releasing primary lease."),n.delete("owner")):vk.resolve()}))}},{key:"pi",value:function(e,t){var n=Date.now();return!(e<n-t)&&(!(e>n)||(Ix("Detected an update time that is in the future: ".concat(e," > ").concat(n)),!1))}},{key:"ci",value:function(){var e=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ti=function(){e.Hs.enqueueAndForget((function(){return e.inForeground="visible"===e.document.visibilityState,e.ui()}))},this.document.addEventListener("visibilitychange",this.ti),this.inForeground="visible"===this.document.visibilityState)}},{key:"Ri",value:function(){this.ti&&(this.document.removeEventListener("visibilitychange",this.ti),this.ti=null)}},{key:"ai",value:function(){var e,t=this;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Zs=function(){t.Ai(),za()&&navigator.appVersion.match(/Version\/1[45]/)&&t.Hs.enterRestrictedMode(!0),t.Hs.enqueueAndForget((function(){return t.shutdown()}))},this.window.addEventListener("pagehide",this.Zs))}},{key:"bi",value:function(){this.Zs&&(this.window.removeEventListener("pagehide",this.Zs),this.Zs=null)}},{key:"Ei",value:function(e){var t;try{var n=null!==(null===(t=this.oi)||void 0===t?void 0:t.getItem(this.Ti(e)));return Tx("IndexedDbPersistence","Client '".concat(e,"' ").concat(n?"is":"is not"," zombied in LocalStorage")),n}catch(e){return Ix("IndexedDbPersistence","Failed to get zombied client id.",e),!1}}},{key:"Ai",value:function(){if(this.oi)try{this.oi.setItem(this.Ti(this.clientId),String(Date.now()))}catch(Oy){Ix("Failed to set zombie client id.",Oy)}}},{key:"Pi",value:function(){if(this.oi)try{this.oi.removeItem(this.Ti(this.clientId))}catch(Oy){}}},{key:"Ti",value:function(e){return"firestore_zombie_".concat(this.persistenceKey,"_").concat(e)}}],[{key:"C",value:function(){return yk.C()}}]),e}();function yI(e){return IS(e,"owner")}function gI(e){return IS(e,"clientMetadata")}function bI(e,t){var n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var wI=function(){function e(t,n,r,i){ua(this,e),this.targetId=t,this.fromCache=n,this.Si=r,this.Di=i}return ca(e,null,[{key:"Ci",value:function(t,n){var r,i=cE(),a=cE(),o=ya(n.docChanges);try{for(o.s();!(r=o.n()).done;){var s=r.value;switch(s.type){case 0:i=i.add(s.doc.key);break;case 1:a=a.add(s.doc.key)}}}catch(u){o.e(u)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),xI=function(){function e(){ua(this,e),this.xi=!1}return ca(e,[{key:"initialize",value:function(e,t){this.Ni=e,this.indexManager=t,this.xi=!0}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this;return this.ki(e,t).next((function(a){return a||i.Oi(e,t,r,n)})).next((function(n){return n||i.Mi(e,t)}))}},{key:"ki",value:function(e,t){var n=this;if(nC(t))return vk.resolve(null);var r=sC(t);return this.indexManager.getIndexType(e,r).next((function(i){return 0===i?null:(null!==t.limit&&1===i&&(t=uC(t,null,"F"),r=sC(t)),n.indexManager.getDocumentsMatchingTarget(e,r).next((function(i){var a=cE.apply(void 0,bn(i));return n.Ni.getDocuments(e,a).next((function(i){return n.indexManager.getMinOffset(e,r).next((function(r){var o=n.Fi(t,i);return n.$i(t,o,a,r.readTime)?n.ki(e,uC(t,null,"F")):n.Bi(e,o,t,r)}))}))})))}))}},{key:"Oi",value:function(e,t,n,r){var i=this;return nC(t)||r.isEqual($x.min())?this.Mi(e,t):this.Ni.getDocuments(e,n).next((function(a){var o=i.Fi(t,a);return i.$i(t,o,n,r)?i.Mi(e,t):(Sx()<=go.DEBUG&&Tx("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),fC(t)),i.Bi(e,o,t,sk(r,-1)))}))}},{key:"Fi",value:function(e,t){var n=new M_(pC(e));return t.forEach((function(t,r){hC(e,r)&&(n=n.add(r))})),n}},{key:"$i",value:function(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;var i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}},{key:"Mi",value:function(e,t){return Sx()<=go.DEBUG&&Tx("QueryEngine","Using full collection scan to execute query:",fC(t)),this.Ni.getDocumentsMatchingQuery(e,t,lk.min())}},{key:"Bi",value:function(e,t,n,r){return this.Ni.getDocumentsMatchingQuery(e,n,r).next((function(e){return t.forEach((function(t){e=e.insert(t.key,t)})),e}))}}]),e}(),kI=function(){function e(t,n,r,i){ua(this,e),this.persistence=t,this.Li=n,this.yt=i,this.qi=new D_(Kx),this.Ui=new ZC((function(e){return G_(e)}),Y_),this.Ki=new Map,this.Gi=t.getRemoteDocumentCache(),this.Cs=t.getTargetCache(),this.Ns=t.getBundleCache(),this.Qi(r)}return ca(e,[{key:"Qi",value:function(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutation
2Queue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new tI(this.Gi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Gi.setIndexManager(this.indexManager),this.Li.initialize(this.localDocuments,this.indexManager)}},{key:"collectGarbage",value:function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.qi)}))}}]),e}();function _I(e,t,n,r){return new kI(e,t,n,r)}function CI(e,t){return EI.apply(this,arguments)}function EI(){return EI=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Px(t),e.next=3,i.persistence.runTransaction("Handle user change","readonly",(function(e){var t;return i.mutationQueue.getAllMutationBatches(e).next((function(r){return t=r,i.Qi(n),i.mutationQueue.getAllMutationBatches(e)})).next((function(n){var r,a=[],o=[],s=cE(),u=ya(t);try{for(u.s();!(r=u.n()).done;){var l=r.value;a.push(l.batchId);var c,f=ya(l.mutations);try{for(f.s();!(c=f.n()).done;){var h=c.value;s=s.add(h.key)}}catch(b){f.e(b)}finally{f.f()}}}catch(b){u.e(b)}finally{u.f()}var d,p=ya(n);try{for(p.s();!(d=p.n()).done;){var v=d.value;o.push(v.batchId);var m,y=ya(v.mutations);try{for(y.s();!(m=y.n()).done;){var g=m.value;s=s.add(g.key)}}catch(b){y.e(b)}finally{y.f()}}}catch(b){p.e(b)}finally{p.f()}return i.localDocuments.getDocuments(e,s).next((function(e){return{ji:e,removedBatchIds:a,addedBatchIds:o}}))}))}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),EI.apply(this,arguments)}function SI(e,t){var n=Px(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.Gi.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,a=i.keys(),o=vk.resolve();return a.forEach((function(e){o=o.next((function(){return r.getEntry(t,e)})).next((function(t){var a=n.docVersions.get(e);Ox(null!==a),t.version.compareTo(a)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((function(){return e.mutationQueue.removeMutationBatch(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)}
2)).next((function(){return n.mutationQueue.performConsistencyCheck(e)})).next((function(){return n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId)})).next((function(){return n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){for(var t=cE(),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((function(){return n.localDocuments.getDocuments(e,r)}))}))}function TI(e){var t=Px(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Cs.getLastRemoteSnapshotVersion(e)}))}function II(e,t){var n=Px(e),r=t.snapshotVersion,i=n.qi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.Gi.newChangeBuffer({trackRemovals:!0});i=n.qi;var o=[];t.targetChanges.forEach((function(a,s){var u=i.get(s);if(u){o.push(n.Cs.removeMatchingKeys(e,a.removedDocuments,s).next((function(){return n.Cs.addMatchingKeys(e,a.addedDocuments,s)})));var l=u.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(s)?l=l.withResumeToken(Fk.EMPTY_BYTE_STRING,$x.min()).withLastLimboFreeSnapshotVersion($x.min()):a.resumeToken.approximateByteSize()>0&&(l=l.withResumeToken(a.resumeToken,r)),i=i.insert(s,l),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,l,a)&&o.push(n.Cs.updateTargetData(e,l))}}));var s=tE(),u=cE();if(t.documentUpdates.forEach((function(r){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(NI(e,a,t.documentUpdates).next((function(e){s=e.Wi,u=e.zi}))),!r.isEqual($x.min())){var l=n.Cs.getLastRemoteSnapshotVersion(e).next((function(t){return n.Cs.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(l)}return vk.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.localDocuments.getLocalViewOfDocuments(e,s,u)})).next((function(){return s}))})).then((function(e){return n.qi=i,e}))}function NI(e,t,n){var r=cE(),i=cE();return n.forEach((function(e){return r=r.add(e)})),t.getEntries(e,r).next((function(e){var r=tE();return n.forEach((function(n,a){var o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual($x.min())?(t.removeEntry(n,a.readTime),r=r.insert(n,a)):!o.isValidDocument()||a.version.compareTo(o.version)>0||0===a.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(a),r=r.insert(n,a)):Tx("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",a.version)})),{Wi:r,zi:i}}))}function AI(e,t){var n=Px(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t)}))}function jI(e,t){var n=Px(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.Cs.getTargetData(e,t).next((function(i){return i?(r=i,vk.resolve(r)):n.Cs.allocateTargetId(e).next((function(i){return r=new OS(t,i,0,e.currentSequenceNumber),n.Cs.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.qi.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.qi=n.qi.insert(e.targetId,e),n.Ui.set(t,e.targetId)),e}))}function OI(e,t,n){return PI.apply(this,arguments)}function PI(){return PI=a(r().mark((function e(t,n,i){var a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Px(t),o=a.qi.get(n),s=i?"readwrite":"readwrite-primary",e.prev=1,e.t0=i,e.t0){e.next=6;break}return e.next=6,a.persistence.runTransaction("Release target",s,(function(e){return a.persistence.referenceDelegate.removeTarget(e,o)}));case 6:e.next=13;break;case 8:if(e.prev=8,e.t1=e.catch(1),wk(e.t1)){e.next=12;break}throw e.t1;case 12:Tx("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:a.qi=a.qi.remove(n),a.Ui.delete(o.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])}))),PI.apply(this,arguments)}
2function RI(e,t,n){var r=Px(e),i=$x.min(),a=cE();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=Px(e),i=r.Ui.get(n);return void 0!==i?vk.resolve(r.qi.get(i)):r.Cs.getTargetData(t,n)}(r,e,sC(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.Cs.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.Li.getDocumentsMatchingQuery(e,t,n?i:$x.min(),n?a:cE())})).next((function(e){return DI(r,dC(t),e),{documents:e,Hi:a}}))}))}function DI(e,t,n){var r=e.Ki.get(t)||$x.min();n.forEach((function(e,t){t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Ki.set(t,r)}var FI=function(){function e(){ua(this,e),this.activeTargetIds=hE()}return ca(e,[{key:"er",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"nr",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"tr",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),LI=function(){function e(){ua(this,e),this.Lr=new FI,this.qr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return ca(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.Lr.er(e),this.qr[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.qr[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.Lr.nr(e)}},{key:"isLocalQueryTarget",value:function(e){return this.Lr.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.qr[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.Lr.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.Lr.activeTargetIds.has(e)}},{key:"start",value:function(){return this.Lr=new FI,Promise.resolve()}},{key:"handleUserChange",value:function(e,t,n){}},{key:"setOnlineState",value:function(e){}},{key:"shutdown",value:function(){}},{key:"writeSequenceNumber",value:function(e){}},{key:"notifyBundleLoaded",value:function(e){}}]),e}(),MI=function(){function e(){ua(this,e)}return ca(e,[{key:"Ur",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),VI=function(){function e(){var t=this;ua(this,e),this.Kr=function(){return t.Gr()},this.Qr=function(){return t.jr()},this.Wr=[],this.zr()}return ca(e,[{key:"Ur",value:function(e){this.Wr.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Qr)}},{key:"zr",value:function(){window.addEventListener("online",this.Kr),window.addEventListener("offline",this.Qr)}},{key:"Gr",value:function(){Tx("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=ya(this.Wr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"jr",value:function(){Tx("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=ya(this.Wr);try{for(t.s();!(e=t.n()).done;){(0,e.value)(1)}}catch(n){t.e(n)}finally{t.f()}}}],[{key:"C",value:function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}]),e}(),BI={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"},zI=function(){function e(t){ua(this,e),this.Hr=t.Hr,this.Jr=t.Jr}return ca(e,[{key:"Yr",value:function(e){this.Xr=e}},{key:"Zr",value:function(e){this.eo=e}},{key:"onMessage",value:function(e){this.no=e}},{key:"close",value:function(){this.Jr()}},{key:"send",value:function(e){this.Hr(e)}},{key:"so",value:function(){this.Xr()}},{key:"io",value:function(e){this.eo(e)}},{key:"ro",value:function(e){this.no(e)}}]),e}(),qI=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return ca(n,[{key:"fo",value:function(e,t,n,r){return new Promise((function(i,a){var o=new xx;o.setWithCredentials(!0),o.listenOnce(mx.COMPLETE,(function(){try{
2switch(o.getLastErrorCode()){case vx.NO_ERROR:var t=o.getResponseJson();Tx("Connection","XHR received:",JSON.stringify(t)),i(t);break;case vx.TIMEOUT:Tx("Connection",'RPC "'+e+'" timed out'),a(new Dx(Rx.DEADLINE_EXCEEDED,"Request time out"));break;case vx.HTTP_ERROR:var n=o.getStatus();if(Tx("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson();Array.isArray(r)&&(r=r[0]);var s=null==r?void 0:r.error;if(s&&s.status&&s.message){var u=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(Rx).indexOf(t)>=0?t:Rx.UNKNOWN}(s.status);a(new Dx(u,s.message))}else a(new Dx(Rx.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new Dx(Rx.UNAVAILABLE,"Connection failed."));break;default:jx()}}finally{Tx("Connection",'RPC "'+e+'" completed.')}}));var s=JSON.stringify(r);o.send(t,"POST",s,n,15)}))}},{key:"wo",value:function(e,t,n){var r=[this.oo,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=dx(),a=px(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(o.xmlHttpFactory=new bx({})),this.lo(o.initMessageHeaders,t,n),o.encodeInitMessageHeaders=!0;var s=r.join("");Tx("Connection","Creating WebChannel: "+s,o);var u=i.createWebChannel(s,o),l=!1,c=!1,f=new zI({Hr:function(e){c?Tx("Connection","Not sending because WebChannel is closed:",e):(l||(Tx("Connection","Opening WebChannel transport."),u.open(),l=!0),Tx("Connection","WebChannel sending:",e),u.send(e))},Jr:function(){return u.close()}}),h=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return h(u,wx.EventType.OPEN,(function(){c||Tx("Connection","WebChannel transport opened.")})),h(u,wx.EventType.CLOSE,(function(){c||(c=!0,Tx("Connection","WebChannel transport closed"),f.io())})),h(u,wx.EventType.ERROR,(function(e){c||(c=!0,Nx("Connection","WebChannel transport errored:",e),f.io(new Dx(Rx.UNAVAILABLE,"The operation could not be completed")))})),h(u,wx.EventType.MESSAGE,(function(e){var t;if(!c){var n=e.data[0];Ox(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){Tx("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=KC[e];if(void 0!==t)return JC(t)}(a),s=i.message;void 0===o&&(o=Rx.INTERNAL,s="Unknown error status: "+a+" with message "+i.message),c=!0,f.io(new Dx(o,s)),u.close()}else Tx("Connection","WebChannel received:",n),f.ro(n)}})),h(a,yx.STAT_EVENT,(function(e){e.stat===gx.PROXY?Tx("Connection","Detected buffering proxy"):e.stat===gx.NOPROXY&&Tx("Connection","Detected no buffering proxy")})),setTimeout((function(){f.so()}),0),f}}]),n}(function(){function e(t){ua(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.oo=n+"://"+t.host,this.uo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return ca(e,[{key:"co",get:function(){return!1}},{key:"ao",value:function(e,t,n,r,i){var a=this.ho(e,t);Tx("RestConnection","Sending: ",a,n);var o={};return this.lo(o,r,i),this.fo(e,a,o,n).then((function(e){return Tx("RestConnection","Received: ",e),e}),(function(t){throw Nx("RestConnection","".concat(e," failed with error: "),t,"url: ",a,"request:",n),t}))}},{key:"_o",value:function(e,t,n,r,i,a){return this.ao(e,t,n,r,i)}},{key:"lo",value:function(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+Cx,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((function(t,n){return e[n]=t})),n&&n.headers.forEach((function(t,n){return e[n]=t}))}},{key:"ho",value:function(e,t){var n=BI[e];return"".concat(this.oo,"/v1/").concat(t,":").concat(n)}}]),e}());function UI(){return"undefined"!=typeof window?window:null}function HI(){return"undefined"!=typeof document?document:null}function WI(e){return new EE(e,!0)}var KI=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;ua(this,e),this.Hs=t,this.timerId=n,this.mo=r,this.yo=i,this.po=a,this.Io=0,this.To=null,this.Eo=Date.now(),this.reset()}return ca(e,[{key:"reset",value:function(){this.Io=0}},{key:"Ao",value:function(){this.Io=this.po}},{key:"Ro",value:function(e){var t=this;this.cancel();var n=Math.floor(this.Io+this.bo()),r=Math.max(0,Date.now()-this.Eo),i=Math.max(0,n-r);i>0&&Tx("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.Io," ms, delay with 
2jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.To=this.Hs.enqueueAfterDelay(this.timerId,i,(function(){return t.Eo=Date.now(),e()})),this.Io*=this.yo,this.Io<this.mo&&(this.Io=this.mo),this.Io>this.po&&(this.Io=this.po)}},{key:"Po",value:function(){null!==this.To&&(this.To.skipDelay(),this.To=null)}},{key:"cancel",value:function(){null!==this.To&&(this.To.cancel(),this.To=null)}},{key:"bo",value:function(){return(Math.random()-.5)*this.Io}}]),e}(),GI=function(){function e(t,n,r,i,a,o,s,u){ua(this,e),this.Hs=t,this.vo=r,this.Vo=i,this.connection=a,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=s,this.listener=u,this.state=0,this.So=0,this.Do=null,this.Co=null,this.stream=null,this.xo=new KI(t,n)}return ca(e,[{key:"No",value:function(){return 1===this.state||5===this.state||this.ko()}},{key:"ko",value:function(){return 2===this.state||3===this.state}},{key:"start",value:function(){4!==this.state?this.auth():this.Oo()}},{key:"stop",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.No(),!e.t0){e.next=4;break}return e.next=4,this.close(0);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Mo",value:function(){this.state=0,this.xo.reset()}},{key:"Fo",value:function(){var e=this;this.ko()&&null===this.Do&&(this.Do=this.Hs.enqueueAfterDelay(this.vo,6e4,(function(){return e.$o()})))}},{key:"Bo",value:function(e){this.Lo(),this.stream.send(e)}},{key:"$o",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.ko()){e.next=2;break}return e.abrupt("return",this.close(0));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Lo",value:function(){this.Do&&(this.Do.cancel(),this.Do=null)}},{key:"qo",value:function(){this.Co&&(this.Co.cancel(),this.Co=null)}},{key:"close",value:function(){var e=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.Lo(),this.qo(),this.xo.cancel(),this.So++,4!==t?this.xo.reset():n&&n.code===Rx.RESOURCE_EXHAUSTED?(Ix(n.toString()),Ix("Using maximum backoff delay to prevent overloading the backend."),this.xo.Ao()):n&&n.code===Rx.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Uo(),this.stream.close(),this.stream=null),this.state=t,e.next=9,this.listener.Zr(n);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"Uo",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.Ko(this.So),n=this.So;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((function(t){var r=u(t,2),i=r[0],a=r[1];e.So===n&&e.Go(i,a)}),(function(n){t((function(){var t=new Dx(Rx.UNKNOWN,"Fetching auth token failed: "+n.message);return e.Qo(t)}))}))}},{key:"Go",value:function(e,t){var n=this,r=this.Ko(this.So);this.stream=this.jo(e,t),this.stream.Yr((function(){r((function(){return n.state=2,n.Co=n.Hs.enqueueAfterDelay(n.Vo,1e4,(function(){return n.ko()&&(n.state=3),Promise.resolve()})),n.listener.Yr()}))})),this.stream.Zr((function(e){r((function(){return n.Qo(e)}))})),this.stream.onMessage((function(e){r((function(){return n.onMessage(e)}))}))}},{key:"Oo",value:function(){var e=this;this.state=5,this.xo.Ro(a(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.state=0,e.start();case 1:case"end":return t.stop()}}),t)}))))}},{key:"Qo",value:function(e){return Tx("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(4,e)}},{key:"Ko",value:function(e){var t=this;return function(n){t.Hs.enqueueAndForget((function(){return t.So===e?n():(Tx("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),YI=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a,o,s){var u;return ua(this,n),(u=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,a,s)).yt=o,u}return ca(n,[{key:"jo",value:function(e,t){return this.connection.wo("Listen",e,t)}},{key:"onMessage",value:function(e){this.xo.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:jx()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.wt?(Ox(void 0===t||"string"==typeof t),Fk.fromBase64String(t||"")):(Ox(void 0===t||t instanceof Uint8Array),Fk.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,s=o&&function(e){var t=void 0===e.code?Rx.UNKNOWN:JC(e.code);return new Dx(t,e.message||"")}(o);n=new yE(r,i,a,s||null)}else if("documentChange"in t){t.documentChange;var u=t.documentChange;u.document,u.document.name,u.document.updateTime;var l=PE(e,u.document.name),c=NE(u.document.updateTime),f=u.document.createTime?NE(u.document.createTime):$x.min(),h=new q_({mapValue:{fields:u.document.fields}}),d=H_.newFoundDocument(l,c,f,h),p=u.targetIds||[],v=u.removedTargetIds||[];n=new vE(p,v,d.key,d)}else if("documentDelete"in t){t.documentDelete;var m=t.documentDelete;m.document;var y=PE(e,m.document),g=m.readTime?NE(m.readTime):$x.min(),b=H_.newNoDocument(y,g),w=m.removedTargetIds||[];n=new vE([],w,b.key,b)}else if("documentRemove"in t){t.documentRemove;var x=t.documentRemove;x.document;var k=PE(e,x.document),_=x.removedTargetIds||[];n=new vE([],_,k,null)}else{if(!("filter"in t))return jx();t.filter;var C=t.filter;C.targetId;var E=C.count||0,S=new $C(E),T=C.targetId;n=new mE(T,S)}return n}(this.yt,e),n=function(e){if(!("targetChange"in e))return $x.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?$x.min():t.readTime?NE(t.readTime):$x.min()}(e);return this.listener.Wo(t,n)}},{key:"zo",value:function(e){var t={};t.database=FE(this.yt),t.addTarget=function(e,t){var n,r=t.target;return(n=Q_(r)?{documents:qE(e,r)}:{query:UE(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=TE(e,t.resumeToken):t.snapshotVersion.compareTo($x.min())>0&&(n.readTime=SE(e,t.snapshotVersion.toTimestamp())),n}(this.yt,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return jx()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.yt,e);n&&(t.labels=n),this.Bo(t)}},{key:"Ho",value:function(e){var t={};t.database=FE(this.yt),t.removeTarget=e,this.Bo(t)}}]),n}(GI),QI=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a,o,s){var u;return ua(this,n),(u=t.call(this,e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,i,a,s)).yt=o,u.Jo=!1,u}return ca(n,[{key:"Yo",get:function(){return this.Jo}},{key:"start",value:function(){this.Jo=!1,this.lastStreamToken=void 0,ma(ra(n.prototype),"start",this).call(this)}},{key:"Uo",value:function(){this.Jo&&this.Xo([])}},{key:"jo",value:function(e,t){return this.connection.wo("Write",e,t)}},{key:"onMessage",value:function(e){if(Ox(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Jo){this.xo.reset();var t=function(e,t){return e&&e.length>0?(Ox(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?NE(e.updateTime):NE(t);return n.isEqual($x.min())&&(n=NE(t)),new OC(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=NE(e.commitTime);return this.listener.Zo(n,t)}return Ox(!e.writeResults||0===e.writeResults.length),this.Jo=!0,this.listener.tu()}},{key:"eu",value:function(){var e={};e.database=FE(this.yt),this.Bo(e)}},{key:"Xo",value:function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return BE(t.yt,e)}))};this.Bo(n)}}]),n}(GI),$I=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a){var o;return ua(this,n),(o=t.call(this)).authCredentials=e,o.appCheckCredentials=r,o.connection=i,o.yt=a,o.nu=!1,o}return ca(n,[{key:"su",value:function(){if(this.nu)throw new Dx(Rx.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"ao",value:function(e,t,n){var r=this;return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(i){var a=u(i,2),o=a[0],s=a[1];return r.connection.ao(e,t,n,o,s)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===Rx.UNAUTHENTICATED&&(r.authCredentials.invalidateToken(),r.appCheckCredentials.invalidateToken()),e):new Dx(Rx.UNKNOWN,e.toString())}))}},{key:"_o",value:function(e,t,n,r){var i=this;return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((function(a){var o=u(a,2),s=o[0],l=o[1];return i.connection._o(e,t,n,s,l,r)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===Rx.UNAUTHENTICATED&&(i.authCredentials.invalidateToken(),i.appCheckCredentials.invalidateToken()),e):new Dx(Rx.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.nu=!0}}]),n}(function(){return ca((function e(){ua(this,e)}))}());var XI=function(){function e(t,n){ua(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.iu=0,this.ru=null,this.ou=!0}return ca(e,[{key:"uu",value:function(){var e=this;0===this.iu&&(this.cu("Unknown"),this.ru=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.ru=null,e.au("Backend didn't respond within 10 seconds."),e.cu("Offline"),Promise.resolve()})))}},{key:"hu",value:function(e){"Online"===this.state?this.cu("Unknown"):(this.iu++,this.iu>=1&&(this.lu(),this.au("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.cu("Offline")))}},{key:"set",value:function(e){this.lu(),this.iu=0,"Online"===e&&(this.ou=!1),this.cu(e)}},{key:"cu",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"au",value:function(e){var t="Could not reach Cloud Firestore backend. ".concat(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.ou?(Ix(t),this.ou=!1):Tx("OnlineStateTracker",t)}},{key:"lu",value:function(){null!==this.ru&&(this.ru.cancel(),this.ru=null)}}]),e}(),JI=ca((function e(t,n,i,o,s){var u=this;ua(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=i,this.remoteSyncer={},this.fu=[],this.du=new Map,this._u=new Set,this.wu=[],this.mu=s,this.mu.Ur((function(e){i.enqueueAndForget(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=lN(u),!e.t0){e.next=5;break}
2return Tx("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Px(t))._u.add(4),e.next=4,tN(n);case 4:return n.gu.set("Unknown"),n._u.delete(4),e.next=8,ZI(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(u);case 5:case"end":return e.stop()}}),e)}))))})),this.gu=new XI(i,o)}));function ZI(e){return eN.apply(this,arguments)}function eN(){return eN=a(r().mark((function e(t){var n,i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!lN(t)){e.next=18;break}n=ya(t.wu),e.prev=2,n.s();case 4:if((i=n.n()).done){e.next=10;break}return a=i.value,e.next=8,a(!0);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])}))),eN.apply(this,arguments)}function tN(e){return nN.apply(this,arguments)}function nN(){return nN=a(r().mark((function e(t){var n,i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ya(t.wu),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=9;break}return a=i.value,e.next=7,a(!1);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))),nN.apply(this,arguments)}function rN(e,t){var n=Px(e);n.du.has(t.targetId)||(n.du.set(t.targetId,t),uN(n)?sN(n):MN(n).ko()&&aN(n,t))}function iN(e,t){var n=Px(e),r=MN(n);n.du.delete(t),r.ko()&&oN(n,t),0===n.du.size&&(r.ko()?r.Fo():lN(n)&&n.gu.set("Unknown"))}function aN(e,t){e.yu.Ot(t.targetId),MN(e).zo(t)}function oN(e,t){e.yu.Ot(t),MN(e).Ho(t)}function sN(e){e.yu=new bE({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},ne:function(t){return e.du.get(t)||null}}),MN(e).start(),e.gu.uu()}function uN(e){return lN(e)&&!MN(e).No()&&e.du.size>0}function lN(e){return 0===Px(e)._u.size}function cN(e){e.yu=void 0}function fN(e){return hN.apply(this,arguments)}function hN(){return hN=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.du.forEach((function(e,n){aN(t,e)}));case 1:case"end":return e.stop()}}),e)}))),hN.apply(this,arguments)}function dN(e,t){return pN.apply(this,arguments)}function pN(){return pN=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:cN(t),uN(t)?(t.gu.hu(n),sN(t)):t.gu.set("Unknown");case 1:case"end":return e.stop()}}),e)}))),pN.apply(this,arguments)}function vN(e,t,n){return mN.apply(this,arguments)}function mN(){return mN=a(r().mark((function e(t,n,i){var o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.gu.set("Online"),!(n instanceof yE&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=a(r().mark((function e(t,n){var i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.cause,a=ya(n.targetIds),e.prev=2,a.s();case 4:if((o=a.n()).done){e.next=14;break}if(s=o.value,e.t0=t.du.has(s),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(s,i);case 10:t.du.delete(s),t.yu.removeTarget(s);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(2),a.e(e.t1);case 19:return e.prev=19,a.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),Tx("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,yN(t,e.t0);case 11:case 22:e.next=29;break;
2case 13:if(n instanceof vE?t.yu.Kt(n):n instanceof mE?t.yu.Jt(n):t.yu.jt(n),i.isEqual($x.min())){e.next=29;break}return e.prev=14,e.next=17,TI(t.localStore);case 17:if(o=e.sent,e.t1=i.compareTo(o)>=0,!e.t1){e.next=22;break}return e.next=22,function(e,t){var n=e.yu.Zt(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.du.get(r);i&&e.du.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e.du.get(t);if(n){e.du.set(t,n.withResumeToken(Fk.EMPTY_BYTE_STRING,n.snapshotVersion)),oN(e,t);var r=new OS(n.target,t,1,n.sequenceNumber);aN(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,i);case 24:return e.prev=24,e.t2=e.catch(14),Tx("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,yN(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),mN.apply(this,arguments)}function yN(e,t,n){return gN.apply(this,arguments)}function gN(){return gN=a(r().mark((function e(t,n,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(wk(n)){e.next=2;break}throw n;case 2:return t._u.add(1),e.next=5,tN(t);case 5:t.gu.set("Offline"),i||(i=function(){return TI(t.localStore)}),t.asyncQueue.enqueueRetryable(a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Tx("RemoteStore","Retrying IndexedDB access"),e.next=3,i();case 3:return t._u.delete(1),e.next=6,ZI(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)}))),gN.apply(this,arguments)}function bN(e,t){return t().catch((function(n){return yN(e,n,t)}))}function wN(e){return xN.apply(this,arguments)}function xN(){return xN=a(r().mark((function e(t){var n,i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Px(t),i=VN(n),a=n.fu.length>0?n.fu[n.fu.length-1].batchId:-1;case 2:if(!kN(n)){e.next=19;break}return e.prev=3,e.next=6,AI(n.localStore,a);case 6:if(null!==(o=e.sent)){e.next=10;break}return 0===n.fu.length&&i.Fo(),e.abrupt("break",19);case 10:a=o.batchId,_N(n,o),e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(3),e.next=17,yN(n,e.t0);case 17:e.next=2;break;case 19:CN(n)&&EN(n);case 20:case"end":return e.stop()}}),e,null,[[3,13]])}))),xN.apply(this,arguments)}function kN(e){return lN(e)&&e.fu.length<10}function _N(e,t){e.fu.push(t);var n=VN(e);n.ko()&&n.Yo&&n.Xo(t.mutations)}function CN(e){return lN(e)&&!VN(e).No()&&e.fu.length>0}function EN(e){VN(e).start()}function SN(e){return TN.apply(this,arguments)}function TN(){return TN=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:VN(t).eu();case 1:case"end":return e.stop()}}),e)}))),TN.apply(this,arguments)}function IN(e){return NN.apply(this,arguments)}function NN(){return NN=a(r().mark((function e(t){var n,i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=VN(t),i=ya(t.fu);try{for(i.s();!(a=i.n()).done;)o=a.value,n.Xo(o.mutations)}catch(r){i.e(r)}finally{i.f()}case 3:case"end":return e.stop()}}),e)}))),NN.apply(this,arguments)}function AN(e,t,n){return jN.apply(this,arguments)}function jN(){return jN=a(r().mark((function e(t,n,i){var a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.fu.shift(),o=AS.from(a,n,i),e.next=3,bN(t,(function(){return t.remoteSyncer.applySuccessfulWrite(o)}));case 3:return e.next=5,wN(t);case 5:case"end":return e.stop()}}),e)}))),jN.apply(this,arguments)}function ON(e,t){return PN.apply(this,arguments)}function PN(){return PN=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n&&VN(t).Yo,!e.t0){e.next=4;break}return e.next=4,function(){var e=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!XC(a=n.code)||a===Rx.ABORTED){e.next=7;break}return i=t.fu.shift(),VN(t).Mo(),e.next=5,bN(t,(function(){return t.remoteSyncer.rejectFailedWrite(i.batchId,n)}));case 5:return e.next=7,wN(t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:CN(t)&&EN(t);case 5:case"end":return e.stop()}}),e)}))),PN.apply(this,arguments)}function RN(e,t){return DN.apply(this,arguments)}function DN(){return DN=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=Px(t)).asyncQueue.verifyOperationInProgress(),Tx("RemoteStore","RemoteStore received new credentials"),a=lN(i),i._u.add(3),e.next=6,tN(i);case 6:return a&&i.gu.set("Unknown"),e.next=9,i.remoteSyncer.handleCredentialChange(n);case 9:return i._u.delete(3),e.next=12,ZI(i);case 12:case"end":return e.stop()}}),e)}))),DN.apply(this,arguments)}function FN(e,t){return LN.apply(this,arguments)}function LN(){return LN=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Px(t),!n){e.next=7;break}return i._u.delete(2),e.next=5,ZI(i);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return i._u.add(2),e.next=12,tN(i);case 12:i.gu.set("Unknown");case 13:case"end":return e.stop()}}),e)}))),LN.apply(this,arguments)}function MN(e){return e.pu||(e.pu=function(e,t,n){var r=Px(e);return r.su(),new YI(t,r.connection,r.authCredentials,r.appCheckCredentials,r.yt,n)}(e.datastore,e.asyncQueue,{Yr:fN.bind(null,e),Zr:dN.bind(null,e),Wo:vN.bind(null,e)}),e.wu.push(function(){var t=a(r().mark((function t(n){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.pu.Mo(),uN(e)?sN(e):e.gu.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.pu.stop();case 6:cN(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.pu}function VN(e){return e.Iu||(e.Iu=function(e,t,n){var r=Px(e);return r.su(),new QI(t,r.connection,r.authCredentials,r.appCheckCredentials,r.yt,n)}(e.datastore,e.asyncQueue,{Yr:SN.bind(null,e),Zr:ON.bind(null,e),tu:IN.bind(null,e),Zo:AN.bind(null,e)}),e.wu.push(function(){var t=a(r().mark((function t(n){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return e.Iu.Mo(),t.next=4,wN(e);case 4:t.next=9;break;case 6:return t.next=8,e.Iu.stop();case 8:e.fu.length>0&&(Tx("RemoteStore","Stopping write stream with ".concat(e.fu.length," pending writes")),e.fu=[]);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.Iu}var BN=function(){function e(t,n,r,i,a){ua(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new Fx,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return ca(e,[{key:"start",value:function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)}},{key:"skipDelay",value:function(){return this.handleDelayElapsed()}},{key:"cancel",value:function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Dx(Rx.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}},{key:"handleDelayElapsed",value:function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))}},{key:"clearTimeout",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}))}],[{key:"createAndSchedule",value:function(t,n,r,i,a){var o=new e(t,n,Date.now()+r,i,a);return o.start(r),o}}]),e}();function zN(e,t){if(Ix("AsyncQueue","".concat(t,": ").concat(e)),wk(e))return new Dx(Rx.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var qN=function(){function e(t){ua(this,e),this.comparator=t?function(e,n){return t(e,n)||tk.comparator(e.key,n.key)}:function(e,t){return tk.comparator(e.key,t.key)},this.keyedMap=rE(),this.sortedSet=new D_(this.comparator)}return ca(e,[{key:"has",value:function(e){return null!=this.keyedMap.get(e)}},{key:"get",value:function(e){return this.keyedMap.get(e)}},{key:"first",value:function(){return this.sortedSet.minKey()}},{key:"last",value:function(){return this.sortedSet.maxKey()}},{key:"isEmpty",value:function(){return this.sortedSet.isEmpty()}},{key:"indexOf",value:function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}},{key:"size",get:function(){return this.sortedSet.size}}
2,{key:"forEach",value:function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"add",value:function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}},{key:"delete",value:function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}},{key:"copy",value:function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}],[{key:"emptySet",value:function(t){return new e(t.comparator)}}]),e}(),UN=function(){function e(){ua(this,e),this.Tu=new D_(tk.comparator)}return ca(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.Tu.get(t);n?0!==e.type&&3===n.type?this.Tu=this.Tu.insert(t,e):3===e.type&&1!==n.type?this.Tu=this.Tu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Tu=this.Tu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Tu=this.Tu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Tu=this.Tu.remove(t):1===e.type&&2===n.type?this.Tu=this.Tu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Tu=this.Tu.insert(t,{type:2,doc:e.doc}):jx():this.Tu=this.Tu.insert(t,e)}},{key:"Eu",value:function(){var e=[];return this.Tu.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),HN=function(){function e(t,n,r,i,a,o,s,u,l){ua(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=s,this.excludesMetadataChanges=u,this.hasCachedResults=l}return ca(e,[{key:"hasPendingWrites",get:function(){return!this.mutatedKeys.isEmpty()}},{key:"isEqual",value:function(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&lC(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}],[{key:"fromInitialDocuments",value:function(t,n,r,i,a){var o=[];return n.forEach((function(e){o.push({type:0,doc:e})})),new e(t,n,qN.emptySet(n),o,r,i,!0,!1,a)}}]),e}(),WN=ca((function e(){ua(this,e),this.Au=void 0,this.listeners=[]})),KN=ca((function e(){ua(this,e),this.queries=new ZC((function(e){return cC(e)}),lC),this.onlineState="Unknown",this.Ru=new Set}));function GN(e,t){return YN.apply(this,arguments)}function YN(){return YN=a(r().mark((function e(t,n){var i,a,o,s,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Px(t),a=n.query,o=!1,(s=i.queries.get(a))||(o=!0,s=new WN),!o){e.next=13;break}return e.prev=3,e.next=6,i.onListen(a);case 6:s.Au=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),u=zN(e.t0,"Initialization of query '".concat(fC(n.query),"' failed")),e.abrupt("return",void n.onError(u));case 13:i.queries.set(a,s),s.listeners.push(n),n.bu(i.onlineState),s.Au&&n.Pu(s.Au)&&ZN(i);case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),YN.apply(this,arguments)}function QN(e,t){return $N.apply(this,arguments)}function $N(){return $N=a(r().mark((function e(t,n){var i,a,o,s,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Px(t),a=n.query,o=!1,(s=i.queries.get(a))&&(u=s.listeners.indexOf(n))>=0&&(s.listeners.splice(u,1),o=0===s.listeners.length),!o){e.next=6;break}return e.abrupt("return",(i.queries.delete(a),i.onUnlisten(a)));case 6:case"end":return e.stop()}}),e)}))),$N.apply(this,arguments)}function XN(e,t){var n,r=Px(e),i=!1,a=ya(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o.query,u=r.queries.get(s);if(u){var l,c=ya(u.listeners);try{for(c.s();!(l=c.n()).done;){l.value.Pu(o)&&(i=!0)}}catch(f){c.e(f)}finally{c.f()}u.Au=o}}}catch(f){a.e(f)}finally{a.f()}i&&ZN(r)}
2function JN(e,t,n){var r=Px(e),i=r.queries.get(t);if(i){var a,o=ya(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(s){o.e(s)}finally{o.f()}}r.queries.delete(t)}function ZN(e){e.Ru.forEach((function(e){e.next()}))}var eA=function(){function e(t,n,r){ua(this,e),this.query=t,this.vu=n,this.Vu=!1,this.Su=null,this.onlineState="Unknown",this.options=r||{}}return ca(e,[{key:"Pu",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=ya(e.docChanges);try{for(r.s();!(t=r.n()).done;){var i=t.value;3!==i.type&&n.push(i)}}catch(o){r.e(o)}finally{r.f()}e=new HN(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}var a=!1;return this.Vu?this.Du(e)&&(this.vu.next(e),a=!0):this.Cu(e,this.onlineState)&&(this.xu(e),a=!0),this.Su=e,a}},{key:"onError",value:function(e){this.vu.error(e)}},{key:"bu",value:function(e){this.onlineState=e;var t=!1;return this.Su&&!this.Vu&&this.Cu(this.Su,e)&&(this.xu(this.Su),t=!0),t}},{key:"Cu",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.Nu||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}},{key:"Du",value:function(e){if(e.docChanges.length>0)return!0;var t=this.Su&&this.Su.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"xu",value:function(e){e=HN.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Vu=!0,this.vu.next(e)}}]),e}();var tA=ca((function e(t){ua(this,e),this.key=t})),nA=ca((function e(t){ua(this,e),this.key=t})),rA=function(){function e(t,n){ua(this,e),this.query=t,this.qu=n,this.Uu=null,this.hasCachedResults=!1,this.current=!1,this.Ku=cE(),this.mutatedKeys=cE(),this.Gu=pC(t),this.Qu=new qN(this.Gu)}return ca(e,[{key:"ju",get:function(){return this.qu}},{key:"Wu",value:function(e,t){var n=this,r=t?t.zu:new UN,i=t?t.Qu:this.Qu,a=t?t.mutatedKeys:this.mutatedKeys,o=i,s=!1,u="F"===this.query.limitType&&i.size===this.query.limit?i.last():null,l="L"===this.query.limitType&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var c=i.get(e),f=hC(n.query,t)?t:null,h=!!c&&n.mutatedKeys.has(c.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;c&&f?c.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Hu(c,f)||(r.track({type:2,doc:f}),p=!0,(u&&n.Gu(f,u)>0||l&&n.Gu(f,l)<0)&&(s=!0)):!c&&f?(r.track({type:0,doc:f}),p=!0):c&&!f&&(r.track({type:1,doc:c}),p=!0,(u||l)&&(s=!0)),p&&(f?(o=o.add(f),a=d?a.add(e):a.delete(e)):(o=o.delete(e),a=a.delete(e)))})),null!==this.query.limit)for(;o.size>this.query.limit;){var c="F"===this.query.limitType?o.last():o.first();o=o.delete(c.key),a=a.delete(c.key),r.track({type:1,doc:c})}return{Qu:o,zu:r,$i:s,mutatedKeys:a}}},{key:"Hu",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.Qu;this.Qu=e.Qu,this.mutatedKeys=e.mutatedKeys;var a=e.zu.Eu();a.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return jx()}};return n(e)-n(t)}(e.type,t.type)||r.Gu(e.doc,t.doc)})),this.Ju(n);var o=t?this.Yu():[],s=0===this.Ku.size&&this.current?1:0,u=s!==this.Uu;return this.Uu=s,0!==a.length||u?{snapshot:new HN(this.query,e.Qu,i,a,e.mutatedKeys,0===s,u,!1,!!n&&n.resumeToken.approximateByteSize()>0),Xu:o}:{Xu:o}}},{key:"bu",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Qu:this.Qu,zu:new UN,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Xu:[]}}},{key:"Zu",value:function(e){return!this.qu.has(e)&&!!this.Qu.has(e)&&!this.Qu.get(e).hasLocalMutations}},{key:"Ju",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.qu=t.qu.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.qu=t.qu.delete(e)})),this.current=e.current)}},{key:"Yu",value:function(){var e=this;if(!this.current)return[];var t=this.Ku;this.Ku=cE(),this.Qu.forEach((function(t){e.Zu(t.key)&&(e.Ku=e.Ku.add(t.key))}
2));var n=[];return t.forEach((function(t){e.Ku.has(t)||n.push(new nA(t))})),this.Ku.forEach((function(e){t.has(e)||n.push(new tA(e))})),n}},{key:"tc",value:function(e){this.qu=e.Hi,this.Ku=cE();var t=this.Wu(e.documents);return this.applyChanges(t,!0)}},{key:"ec",value:function(){return HN.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.Uu,this.hasCachedResults)}}]),e}(),iA=ca((function e(t,n,r){ua(this,e),this.query=t,this.targetId=n,this.view=r})),aA=ca((function e(t){ua(this,e),this.key=t,this.nc=!1})),oA=function(){function e(t,n,r,i,a,o){ua(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.sc={},this.ic=new ZC((function(e){return cC(e)}),lC),this.rc=new Map,this.oc=new Set,this.uc=new D_(tk.comparator),this.cc=new Map,this.ac=new iI,this.hc={},this.lc=new Map,this.fc=RT.vn(),this.onlineState="Unknown",this.dc=void 0}return ca(e,[{key:"isPrimaryClient",get:function(){return!0===this.dc}}]),e}();function sA(e,t){return uA.apply(this,arguments)}function uA(){return uA=a(r().mark((function e(t,n){var i,a,o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=FA(t),!(s=i.ic.get(n))){e.next=6;break}a=s.targetId,i.sharedClientState.addLocalQueryTarget(a),o=s.view.ec(),e.next=15;break;case 6:return e.next=8,jI(i.localStore,sC(n));case 8:return u=e.sent,i.isPrimaryClient&&rN(i.remoteStore,u),l=i.sharedClientState.addLocalQueryTarget(u.targetId),a=u.targetId,e.next=14,lA(i,n,a,"current"===l,u.resumeToken);case 14:o=e.sent;case 15:return e.abrupt("return",o);case 16:case"end":return e.stop()}}),e)}))),uA.apply(this,arguments)}function lA(e,t,n,r,i){return cA.apply(this,arguments)}function cA(){return cA=a(r().mark((function e(t,n,i,o,s){var u,l,c,f,h,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._c=function(e,n,i){return function(){var e=a(r().mark((function e(t,n,i,a){var o,s,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.view.Wu(i),e.t0=o.$i,!e.t0){e.next=6;break}return e.next=5,RI(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.Wu(t,o)}));case 5:o=e.sent;case 6:return s=a&&a.targetChanges.get(n.targetId),u=n.view.applyChanges(o,t.isPrimaryClient,s),e.abrupt("return",(IA(t,n.targetId,u.Xu),u.snapshot));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}()(t,e,n,i)},e.next=3,RI(t.localStore,n,!0);
2case 3:return u=e.sent,l=new rA(n,u.Hi),c=l.Wu(u.documents),f=pE.createSynthesizedTargetChangeForCurrentChange(i,o&&"Offline"!==t.onlineState,s),h=l.applyChanges(c,t.isPrimaryClient,f),IA(t,i,h.Xu),d=new iA(n,i,l),e.abrupt("return",(t.ic.set(n,d),t.rc.has(i)?t.rc.get(i).push(n):t.rc.set(i,[n]),h.snapshot));case 11:case"end":return e.stop()}}),e)}))),cA.apply(this,arguments)}function fA(e,t){return hA.apply(this,arguments)}function hA(){return hA=a(r().mark((function e(t,n){var i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Px(t),a=i.ic.get(n),!((o=i.rc.get(a.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(i.rc.set(a.targetId,o.filter((function(e){return!lC(e,n)}))),void i.ic.delete(n)));case 3:if(!i.isPrimaryClient){e.next=11;break}if(i.sharedClientState.removeLocalQueryTarget(a.targetId),e.t0=i.sharedClientState.isActiveQueryTarget(a.targetId),e.t0){e.next=9;break}return e.next=9,OI(i.localStore,a.targetId,!1).then((function(){i.sharedClientState.clearQueryState(a.targetId),iN(i.remoteStore,a.targetId),SA(i,a.targetId)})).catch(dk);case 9:e.next=14;break;case 11:return SA(i,a.targetId),e.next=14,OI(i.localStore,a.targetId,!0);case 14:case"end":return e.stop()}}),e)}))),hA.apply(this,arguments)}function dA(e,t,n){return pA.apply(this,arguments)}function pA(){return pA=a(r().mark((function e(t,n,i){var a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=LA(t),e.prev=1,e.next=4,function(e,t){var n,r,i=Px(e),a=Qx.now(),o=t.reduce((function(e,t){return e.add(t.key)}),cE());return i.persistence.runTransaction("Locally write mutations","readwrite",(function(e){var s=tE(),u=cE();return i.Gi.getEntries(e,o).next((function(e){(s=e).forEach((function(e,t){t.isValidDocument()||(u=u.add(e))}))})).next((function(){return i.localDocuments.getOverlayedDocuments(e,s)})).next((function(r){n=r;var o,s=[],u=ya(t);try{for(u.s();!(o=u.n()).done;){var l=o.value,c=VC(l,n.get(l.key).overlayedDocument);null!=c&&s.push(new qC(l.key,c,U_(c.value.mapValue),PC.exists(!0)))}}catch(f){u.e(f)}finally{u.f()}
2return i.mutationQueue.addMutationBatch(e,a,s,t)})).next((function(t){r=t;var a=t.applyToLocalDocumentSet(n,u);return i.documentOverlayCache.saveOverlays(e,t.batchId,a)}))})).then((function(){return{batchId:r.batchId,changes:iE(n)}}))}(a.localStore,n);case 4:return o=e.sent,a.sharedClientState.addPendingMutation(o.batchId),function(e,t,n){var r=e.hc[e.currentUser.toKey()];r||(r=new D_(Kx)),r=r.insert(t,n),e.hc[e.currentUser.toKey()]=r}(a,o.batchId,i),e.next=9,jA(a,o.changes);case 9:return e.next=11,wN(a.remoteStore);case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),s=zN(e.t0,"Failed to persist write"),i.reject(s);case 17:case"end":return e.stop()}}),e,null,[[1,13]])}))),pA.apply(this,arguments)}function vA(e,t){return mA.apply(this,arguments)}function mA(){return mA=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Px(t),e.prev=1,e.next=4,II(i.localStore,n);case 4:return a=e.sent,n.targetChanges.forEach((function(e,t){var n=i.cc.get(t);n&&(Ox(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.nc=!0:e.modifiedDocuments.size>0?Ox(n.nc):e.removedDocuments.size>0&&(Ox(n.nc),n.nc=!1))})),e.next=8,jA(i,a,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,dk(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])}))),mA.apply(this,arguments)}function yA(e,t,n){var r=Px(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.ic.forEach((function(e,n){var r=n.view.bu(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=Px(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=ya(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.bu(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&ZN(n)}(r.eventManager,t),i.length&&r.sc.Wo(i),r.onlineState=t,r.isPrimaryClient&&r.sharedCl
2ientState.setOnlineState(t)}}function gA(e,t,n){return bA.apply(this,arguments)}function bA(){return bA=a(r().mark((function e(t,n,i){var a,o,s,u,l,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=Px(t)).sharedClientState.updateQueryState(n,"rejected",i),o=a.cc.get(n),!(s=o&&o.key)){e.next=14;break}return u=(u=new D_(tk.comparator)).insert(s,H_.newNoDocument(s,$x.min())),l=cE().add(s),c=new dE($x.min(),new Map,new M_(Kx),u,l),e.next=9,vA(a,c);case 9:a.uc=a.uc.remove(s),a.cc.delete(n),AA(a),e.next=16;break;case 14:return e.next=16,OI(a.localStore,n,!1).then((function(){return SA(a,n,i)})).catch(dk);case 16:case"end":return e.stop()}}),e)}))),bA.apply(this,arguments)}function wA(e,t){return xA.apply(this,arguments)}function xA(){return xA=a(r().mark((function e(t,n){var i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Px(t),a=n.batch.batchId,e.prev=1,e.next=4,SI(i.localStore,n);case 4:return o=e.sent,EA(i,a,null),CA(i,a),i.sharedClientState.updateMutationState(a,"acknowledged"),e.next=10,jA(i,o);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,dk(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),xA.apply(this,arguments)}function kA(e,t,n){return _A.apply(this,arguments)}function _A(){return _A=a(r().mark((function e(t,n,i){var a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Px(t),e.prev=1,e.next=4,function(e,t){var n=Px(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;
2return n.mutationQueue.lookupMutationBatch(e,t).next((function(t){return Ox(null!==t),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)})).next((function(){return n.mutationQueue.performConsistencyCheck(e)})).next((function(){return n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)})).next((function(){return n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)})).next((function(){return n.localDocuments.getDocuments(e,r)}))}))}(a.localStore,n);case 4:return o=e.sent,EA(a,n,i),CA(a,n),a.sharedClientState.updateMutationState(n,"rejected",i),e.next=10,jA(a,o);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(1),e.next=16,dk(e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),_A.apply(this,arguments)}function CA(e,t){(e.lc.get(t)||[]).forEach((function(e){e.resolve()})),e.lc.delete(t)}function EA(e,t,n){var r=Px(e),i=r.hc[r.currentUser.toKey()];if(i){var a=i.get(t);a&&(n?a.reject(n):a.resolve(),i=i.remove(t)),r.hc[r.currentUser.toKey()]=i}}function SA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=ya(e.rc.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.ic.delete(a),n&&e.sc.wc(a,n)}}catch(o){i.e(o)}finally{i.f()}e.rc.delete(t),e.isPrimaryClient&&e.ac.ls(t).forEach((function(t){e.ac.containsKey(t)||TA(e,t)}))}function TA(e,t){e.oc.delete(t.path.canonicalString());var n=e.uc.get(t);null!==n&&(iN(e.remoteStore,n),e.uc=e.uc.remove(t),e.cc.delete(n),AA(e))}function IA(e,t,n){var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof tA?(e.ac.addReference(a.key,t),NA(e,a)):a instanceof nA?(Tx("SyncEngine","Document no longer in limbo: "+a.key),e.ac.removeReference(a.key,t),e.ac.containsKey(a.key)||TA(e,a.key)):jx()}}catch(o){i.e(o)}finally{i.f()}}function NA(e,t){var n=t.key,r=n.path.canonicalString();e.uc.get(n)||e.oc.has(r)||(Tx("SyncEngine","New document in limbo: "+n),e.oc.add(r),AA(e))}function AA(e){for(;e.oc.size>0&&e.uc.size<e.maxConcurrentLimboResolutions;){var t=e.oc.values().next().value;e.oc.delete(t);var n=new tk(Jx.fromString(t)),r=e.fc.next();e.cc.set(r,new aA(n)),e.uc=e.uc.insert(n,r),rN(e.remoteStore,new OS(sC(tC(n.path)),r,2,Tk.at))}}function jA(e,t,n){return OA.apply(this,arguments)}function OA(){return OA=a(r().mark((function e(t,n,i){var o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Px(t),s=[],u=[],l=[],e.t0=o.ic.isEmpty(),e.t0){e.next=9;break}return o.ic.forEach((function(e,t){l.push(o._c(t,n,i).then((function(e){if((e||i)&&o.isPrimaryClient&&o.sharedClientState.updateQueryState(t.targetId,(null==e?void 0:e.fromCache)?"not-current":"current"),e){s.push(e);var n=wI.Ci(t.targetId,e);u.push(n)}})))})),e.next=6,Promise.all(l);case 6:return o.sc.Wo(s),e.next=9,function(){var e=a(r().mark((function e(t,n){var i,a,o,s,u,l,c,f;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Px(t),e.prev=1,e.next=4,i.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return vk.forEach(n,(function(t){return vk.forEach(t.Si,(function(n){return i.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return vk.forEach(t.Di,(function(n){return i.persistence.referenceDelegate.removeReference(e,t.targetId,n)}))}))}))}));case 4:e.next=11;break;case 6:if(e.prev=6,e.t0=e.catch(1),wk(e.t0)){e.next=10;break}throw e.t0;case 10:Tx("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:a=ya(n);try{for(a.s();!(o=a.n()).done;)s=o.value,u=s.targetId,s.fromCache||(l=i.qi.get(u),c=l.snapshotVersion,f=l.withLastLimboFreeSnapshotVersion(c),i.qi=i.qi.insert(u,f))}catch(r){a.e(r)}finally{a.f()}case 13:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n){return e.apply(this,arguments)}}()(o.localStore,u);case 9:case"end":return e.stop()}}),e)}))),OA.apply(this,arguments)}function PA(e,t){return RA.apply(this,arguments)}function RA(){return RA=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=Px(t)).currentUser.isEqual(n)){e.next=11;break}
2return Tx("SyncEngine","User change. New user:",n.toKey()),e.next=5,CI(i.localStore,n);case 5:return a=e.sent,i.currentUser=n,function(e,t){e.lc.forEach((function(e){e.forEach((function(e){e.reject(new Dx(Rx.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.lc.clear()}(i),i.sharedClientState.handleUserChange(n,a.removedBatchIds,a.addedBatchIds),e.next=11,jA(i,a.ji);case 11:case"end":return e.stop()}}),e)}))),RA.apply(this,arguments)}function DA(e,t){var n=Px(e),r=n.cc.get(t);if(r&&r.nc)return cE().add(r.key);var i=cE(),a=n.rc.get(t);if(!a)return i;var o,s=ya(a);try{for(s.s();!(o=s.n()).done;){var u=o.value,l=n.ic.get(u);i=i.unionWith(l.view.ju)}}catch(c){s.e(c)}finally{s.f()}return i}function FA(e){var t=Px(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=vA.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=DA.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=gA.bind(null,t),t.sc.Wo=XN.bind(null,t.eventManager),t.sc.wc=JN.bind(null,t.eventManager),t}function LA(e){var t=Px(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=wA.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=kA.bind(null,t),t}var MA=function(){function e(){ua(this,e),this.synchronizeTabs=!1}return ca(e,[{key:"initialize",value:function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.yt=WI(t.databaseInfo.databaseId),this.sharedClientState=this.gc(t),this.persistence=this.yc(t),e.next=5,this.persistence.start();case 5:this.localStore=this.Ic(t),this.gcScheduler=this.Tc(t,this.localStore),this.indexBackfillerScheduler=this.Ec(t,this.localStore);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"Tc",value:function(e,t){return null}},{key:"Ec",value:function(e,t){return null}},{key:"Ic",value:function(e){return _I(this.persistence,new xI,e.initialUser,this.yt)}},{key:"yc",value:function(e){return new cI(hI.Bs,this.yt)}},{key:"gc",value:function(e){return new LI}},{key:"terminate",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gcScheduler&&this.gcScheduler.stop(),e.next=3,this.sharedClientState.shutdown();case 3:return e.next=5,this.persistence.shutdown();case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),VA=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a;return ua(this,n),(a=t.call(this)).Ac=e,a.cacheSizeBytes=r,a.forceOwnership=i,a.synchronizeTabs=!1,a}return ca(n,[{key:"initialize",value:function(){var e=a(r().mark((function e(t){var i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ma(ra(n.prototype),"initialize",this).call(this,t);case 2:return e.next=4,this.Ac.initialize(this,t);case 4:return e.next=6,LA(this.Ac.syncEngine);case 6:return e.next=8,wN(this.Ac.remoteStore);case 8:return e.next=10,this.persistence.li((function(){return i.gcScheduler&&!i.gcScheduler.started&&i.gcScheduler.start(),i.indexBackfillerScheduler&&!i.indexBackfillerScheduler.started&&i.indexBackfillerScheduler.start(),Promise.resolve()}));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"Ic",value:function(e){return _I(this.persistence,new xI,e.initialUser,this.yt)}},{key:"Tc",value:function(e,t){var n=this.persistence.referenceDelegate.garbageCollector;return new zT(n,e.asyncQueue,t)}},{key:"Ec",value:function(e,t){var n=new Sk(t,this.persistence);return new Ek(e.asyncQueue,n)}},{key:"yc",value:function(e){var t=bI(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?ST.withCacheSize(this.cacheSizeBytes):ST.DEFAULT;return new mI(this.synchronizeTabs,t,e.clientId,n,e.asyncQueue,UI(),HI(),this.yt,this.sharedClientState,!!this.forceOwnership)}},{key:"gc",value:function(e){return new LI}}]),n}(MA),BA=function(){function e(){ua(this,e)}return ca(e,[{key:"initialize",value:function(){var e=a(r().mark((function e(t,n){var i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.localStore,e.t0){e.next=12;break}
2return this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return yA(i.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=PA.bind(null,this.syncEngine),e.next=12,FN(this.remoteStore,this.syncEngine.isPrimaryClient);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"createEventManager",value:function(e){return new KN}},{key:"createDatastore",value:function(e){var t,n=WI(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new qI(t));return function(e,t,n,r){return new $I(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,r,n)}},{key:"createRemoteStore",value:function(e){var t,n,r,i,a,o=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return yA(o.syncEngine,e,0)},a=VI.C()?new VI:new MI,new JI(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var s=new oA(e,t,n,r,i,a);return o&&(s.dc=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Px(t),Tx("RemoteStore","RemoteStore shutting down."),n._u.add(5),e.next=5,tN(n);case 5:n.mu.shutdown(),n.gu.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();function zA(e,t,n){if(!n)throw new Dx(Rx.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function qA(e){if(!tk.isDocumentKey(e))throw new Dx(Rx.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function UA(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(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";var t=function(e){return e.constructor?e.constructor.name:null}(e);return t?"a custom ".concat(t," object"):"an object"}return"function"==typeof e?"a function":jx()}function HA(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Dx(Rx.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=UA(e);throw new Dx(Rx.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}var WA=new Map,KA=function(){function e(t){var n;if(ua(this,e),void 0===t.host){if(void 0!==t.ssl)throw new Dx(Rx.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(n=t.ssl)||void 0===n||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Dx(Rx.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new Dx(Rx.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))}("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return ca(e,[{key:"isEqual",value:function(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}}]),e}(),GA=function(){function e(t,n,r,i){ua(this,e),this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new KA({}),this._settingsFrozen=!1}return ca(e,[{key:"app",get:function(){if(!this._app)throw new Dx(Rx.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}},{key:"_initialized",get:function(){return this._settingsFrozen}},{key:"_terminated",get:function(){return void 0!==this._terminateTask}},{key:"_setSettings",value:function(e){if(this._settingsFrozen)throw new Dx(Rx.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 KA(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new Mx;switch(e.type){case"gapi":var t=e.client;return new zx(t,e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new Dx(Rx.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
2d credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=WA.get(e);t&&(Tx("ComponentProvider","Removing Datastore"),WA.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();var YA=function(){function e(t,n,r){ua(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return ca(e,[{key:"_path",get:function(){return this._key.path}},{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"path",get:function(){return this._key.path.canonicalString()}},{key:"parent",get:function(){return new $A(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),QA=function(){function e(t,n,r){ua(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return ca(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),$A=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a;return ua(this,n),(a=t.call(this,e,r,tC(i)))._path=i,a.type="collection",a}return ca(n,[{key:"id",get:function(){return this._query.path.lastSegment()}},{key:"path",get:function(){return this._query.path.canonicalString()}},{key:"parent",get:function(){var e=this._path.popLast();return e.isEmpty()?null:new YA(this.firestore,null,new tk(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(QA);function XA(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=ho(e),1===arguments.length&&(t=Wx.R()),zA("doc","path",t),e instanceof GA){var a=Jx.fromString.apply(Jx,[t].concat(r));return qA(a),new YA(e,null,new tk(a))}if(!(e instanceof YA||e instanceof $A))throw new Dx(Rx.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(Jx.fromString.apply(Jx,[t].concat(r)));return qA(o),new YA(e.firestore,e instanceof $A?e.converter:null,new tk(o))}var JA=function(){function e(t){ua(this,e),this.observer=t,this.muted=!1}return ca(e,[{key:"next",value:function(e){this.observer.next&&this.Rc(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Rc(this.observer.error,e):Ix("Uncaught Error in snapshot listener:",e.toString())}},{key:"bc",value:function(){this.muted=!0}},{key:"Rc",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),ZA=function(){function e(t,n,i,o){var s=this;ua(this,e),this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=i,this.databaseInfo=o,this.user=_x.UNAUTHENTICATED,this.clientId=Wx.R(),this.authCredentialListener=function(){return Promise.resolve()},this.appCheckCredentialListener=function(){return Promise.resolve()},this.authCredentials.start(i,function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Tx("FirestoreClient","Received user=",t.uid),e.next=3,s.authCredentialListener(t);case 3:s.user=t;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.appCheckCredentials.start(i,(function(e){return Tx("FirestoreClient","Received new app check token=",e),s.appCheckCredentialListener(e,s.user)}))}return ca(e,[{key:"getConfiguration",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setCredentialChangeListener",value:function(e){this.authCredentialListener=e}},{key:"setAppCheckTokenChangeListener",value:function(e){this.appCheckCredentialListener=e}},{key:"verifyNotTerminated",value:function(){if(this.asyncQueue.isShuttingDown)throw new Dx(Rx.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new Fx;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(a(r().mark((function n(){var i;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,n.t0=e.onlineComponents,!n.t0){n.next=5;break}return n.next=5,e.onlineComponents.terminate();case 5:if(n.t1=e.offlineComponents,!n.t1){n.next=9;break}return n.next=9,e.offlineComponents.terminate();case 9:e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve(),n.next=18;break;case 14:n.prev=14,n.t2=n.catch(0),i=zN(n.t2,"Failed to shutdown persistence"),t.reject(i);case 18:case"end":return n.stop()}}),n,null,[[0,14]])}
2)))),t.promise}}]),e}();function ej(e,t){return tj.apply(this,arguments)}function tj(){return tj=a(r().mark((function e(t,n){var i,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),Tx("FirestoreClient","Initializing OfflineComponentProvider"),e.next=3,t.getConfiguration();case 3:return i=e.sent,e.next=6,n.initialize(i);case 6:o=i.initialUser,t.setCredentialChangeListener(function(){var e=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=o.isEqual(t),e.t0){e.next=5;break}return e.next=4,CI(n.localStore,t);case 4:o=t;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.persistence.setDatabaseDeletedListener((function(){return t.terminate()})),t.offlineComponents=n;case 8:case"end":return e.stop()}}),e)}))),tj.apply(this,arguments)}function nj(e,t){return rj.apply(this,arguments)}function rj(){return rj=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,ij(t);case 3:return i=e.sent,Tx("FirestoreClient","Initializing OnlineComponentProvider"),e.next=7,t.getConfiguration();case 7:return a=e.sent,e.next=10,n.initialize(i,a);case 10:t.setCredentialChangeListener((function(e){return RN(n.remoteStore,e)})),t.setAppCheckTokenChangeListener((function(e,t){return RN(n.remoteStore,t)})),t.onlineComponents=n;case 13:case"end":return e.stop()}}),e)}))),rj.apply(this,arguments)}function ij(e){return aj.apply(this,arguments)}function aj(){return aj=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.offlineComponents,e.t0){e.next=5;break}return Tx("FirestoreClient","Using default OfflineComponentProvider"),e.next=5,ej(t,new MA);case 5:return e.abrupt("return",t.offlineComponents);case 6:case"end":return e.stop()}}),e)}))),aj.apply(this,arguments)}function oj(e){return sj.apply(this,arguments)}function sj(){return sj=a(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.onlineComponents,e.t0){e.next=5;break}return Tx("FirestoreClient","Using default OnlineComponentProvider"),e.next=5,nj(t,new BA);case 5:return e.abrupt("return",t.onlineComponents);case 6:case"end":return e.stop()}}),e)}))),sj.apply(this,arguments)}function uj(e){return oj(e).then((function(e){return e.syncEngine}))}function lj(e){return cj.apply(this,arguments)}function cj(){return cj=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oj(t);case 2:return n=e.sent,i=n.eventManager,e.abrupt("return",(i.onListen=sA.bind(null,n.syncEngine),i.onUnlisten=fA.bind(null,n.syncEngine),i));case 5:case"end":return e.stop()}}),e)}))),cj.apply(this,arguments)}function fj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new Fx;return e.asyncQueue.enqueueAndForget(a(r().mark((function a(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=function(e,t,n,r,i){var a=new JA({next:function(a){t.enqueueAndForget((function(){return QN(e,o)}));var s=a.docs.has(n);!s&&a.fromCache?i.reject(new Dx(Rx.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&a.fromCache&&r&&"server"===r.source?i.reject(new Dx(Rx.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(a)},error:function(e){return i.reject(e)}}),o=new eA(tC(n.path),a,{includeMetadataChanges:!0,Nu:!0});return GN(e,o)},r.next=3,lj(e);case 3:return r.t1=r.sent,r.t2=e.asyncQueue,r.t3=t,r.t4=n,r.t5=i,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3,r.t4,r.t5));case 9:case"end":return r.stop()}}),a)})))),i.promise}var hj=function(){function e(){var t=this;ua(this,e),this.Bc=Promise.resolve(),this.Lc=[],this.qc=!1,this.Uc=[],this.Kc=null,this.Gc=!1,this.Qc=!1,this.jc=[],this.xo=new KI(this,"async_queue_retry"),this.Wc=function(){var e=HI();e&&Tx("AsyncQueue","Visibility state changed to "+e.visibilityState),t.xo.Po()};var n=HI();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Wc)}return ca(e,[{key:"isShuttingDown",get:function(){return this.qc}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this.zc(),this.Hc(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.qc){this.qc=!0,this.Qc=e||!1;var t=HI();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Wc)}}},{key:"enqueue",value:function(e){var t=this;if(this.zc(),this.qc)return new Promise((function(){}));var n=new Fx;return this.Hc((function(){return t.qc&&t.Qc?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)})).then((function(){return n.promise}))}},{key:"enqueueRetryable",value:function(e){var t=this;this.enqueueAndForget((function(){return t.Lc.push(e),t.Jc()}))}},{key:"Jc",value:function(){var e=a(r().mark((function e(){var t=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.Lc.length){e.next=14;break}return e.prev=1,e.next=4,this.Lc[0]();case 4:this.Lc.shift(),this.xo.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),wk(e.t0)){e.next=12;break}throw e.t0;case 12:Tx("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.Lc.length>0&&this.xo.Ro((function(){return t.Jc()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"Hc",value:function(e){var t=this,n=this.Bc.then((function(){return t.Gc=!0,e().catch((function(e){t.Kc=e,t.Gc=!1;var n=function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e);throw Ix("INTERNAL UNHANDLED ERROR: ",n),e})).then((function(e){return t.Gc=!1,e}))}));return this.Bc=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this.zc(),this.jc.indexOf(e)>-1&&(t=0);var i=BN.createAndSchedule(this,e,t,n,(function(e){return r.Yc(e)}));return this.Uc.push(i),i}},{key:"zc",value:function(){this.Kc&&jx()}},{key:"verifyOperationInProgress",value:function(){}},{key:"Xc",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Bc,e.next=3,t;case 3:if(t!==this.Bc){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Zc",value:function(e){var t,n=ya(this.Uc);try{for(n.s();!(t=n.n()).done;){if(t.value.timerId===e)return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"ta",value:function(e){var t=this;return this.Xc().then((function(){t.Uc.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=ya(t.Uc);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.skipDelay(),"all"!==e&&i.timerId===e)break}}catch(a){r.e(a)}finally{r.f()}return t.Xc()}))}},{key:"ea",value:function(e){this.jc.push(e)}},{key:"Yc",value:function(e){var t=this.Uc.indexOf(e);this.Uc.splice(t,1)}}]),e}();function dj(e){return function(e,t){if("object"!=typeof e||null===e)return!1;var n,r=e,i=ya(["next","error","complete"]);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a in r&&"function"==typeof r[a])return!0}}catch(o){i.e(o)}finally{i.f()}return!1}(e)}var pj=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a){var o;return ua(this,n),(o=t.call(this,e,r,i,a)).type="firestore",o._queue=new hj,o._persistenceKey=(null==a?void 0:a.name)||"[DEFAULT]",o}return ca(n,[{key:"_terminate",value:function(){return this._firestoreClient||yj(this),this._firestoreClient.terminate()}}]),n}(GA);
2function vj(e,t,n){n||(n="(default)");var r=es(e,"firestore");if(r.isInitialized(n)){var i=r.getImmediate({identifier:n});if(eo(r.getOptions(n),t))return i;throw new Dx(Rx.FAILED_PRECONDITION,"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.")}if(void 0!==t.cacheSizeBytes&&-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Dx(Rx.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");return r.initialize({options:t,instanceIdentifier:n})}function mj(e){return e._firestoreClient||yj(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function yj(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new Ik(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 ZA(e._authCredentials,e._appCheckCredentials,e._queue,r)}function gj(e,t){wj(e=HA(e,pj));var n=mj(e),r=e._freezeSettings(),i=new BA;return bj(n,i,new VA(i,r.cacheSizeBytes,null==t?void 0:t.forceOwnership))}function bj(e,t,n){var i=new Fx;return e.asyncQueue.enqueue(a(r().mark((function a(){var o;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,ej(e,n);case 3:return r.next=5,nj(e,t);case 5:i.resolve(),r.next=14;break;case 8:if(r.prev=8,r.t0=r.catch(0),function(e){return"FirebaseError"===e.name?e.code===Rx.FAILED_PRECONDITION||e.code===Rx.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||(22===e.code||20===e.code||11===e.code)}(o=r.t0)){r.next=13;break}throw o;case 13:Nx("Error enabling offline persistence. Falling back to persistence disabled: "+o),i.reject(o);case 14:case"end":return r.stop()}}),a,null,[[0,8]])})))).then((function(){return i.promise}))}function wj(e){if(e._initialized||e._terminated)throw new Dx(Rx.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}var xj=function(){function e(t){ua(this,e),this._byteString=t}return ca(e,[{key:"toBase64",value:function(){return this._byteString.toBase64()}},{key:"toUint8Array",value:function(){return this._byteString.toUint8Array()}},{key:"toString",value:function(){return"Bytes(base64: "+this.toBase64()+")"}},{key:"isEqual",value:function(e){return this._byteString.isEqual(e._byteString)}}],[{key:"fromBase64String",value:function(t){try{return new e(Fk.fromBase64String(t))}catch(t){throw new Dx(Rx.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(Fk.fromUint8Array(t))}}]),e}(),kj=function(){function e(){ua(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0;i<n.length;++i)if(0===n[i].length)throw new Dx(Rx.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ek(n)}return ca(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var _j=ca((function e(t){ua(this,e),this._methodName=t})),Cj=function(){function e(t,n){if(ua(this,e),!isFinite(t)||t<-90||t>90)throw new Dx(Rx.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new Dx(Rx.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return ca(e,[{key:"latitude",get:function(){return this._lat}},{key:"longitude",get:function(){return this._long}},{key:"isEqual",value:function(e){return this._lat===e._lat&&this._long===e._long}},{key:"toJSON",value:function(){return{latitude:this._lat,longitude:this._long}}},{key:"_compareTo",value:function(e){return Kx(this._lat,e._lat)||Kx(this._long,e._long)}}]),e}(),Ej=/^__.*__$/,Sj=function(){function e(t,n,r){ua(this,e),this.data=t,this.fieldMask=n,this.fieldTransforms=r}return ca(e,[{key:"toMutation",value:function(e,t){return null!==this.fieldMask?new qC(e,this.data,this.fieldMask,t,this.fieldTransforms):new zC(e,this.data,t,this.fieldTransforms)}}]),e}();function Tj(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw jx()}}var Ij=function(){function e(t,n,r,i,a,o){ua(this,e),this.settings=t,this.databaseId=n,this.yt=r,this.ignoreUndefinedProperties=i,void 0===a&&this.na(),this.fieldTransforms=a||[],this.fieldMask=o||[]}return ca(e,[{key:"path",get:function(){return this.settings.path}},{key:"sa",get:function(){return this.settings.sa}},{key:"ia",value:function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.yt,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}},{key:"ra",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.ua(e),r}},{key:"ca",value:function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.na(),r}},{key:"aa",value:function(e){return this.ia({path:void 0,oa:!0})}},{key:"ha",value:function(e){return Bj(e,this.settings.methodName,this.settings.la||!1,this.path,this.settings.fa)}},{key:"contains",value:function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))}},{key:"na",value:function(){if(this.path)for(var e=0;e<this.path.length;e++)this.ua(this.path.get(e))}},{key:"ua",value:function(e){if(0===e.length)throw this.ha("Document fields must not be empty");if(Tj(this.sa)&&Ej.test(e))throw this.ha('Document fields cannot begin and end with "__"')}}]),e}(),Nj=function(){function e(t,n,r){ua(this,e),this.databaseId=t,this.ignoreUndefinedProperties=n,this.yt=r||WI(t)}return ca(e,[{key:"da",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Ij({sa:e,methodName:t,fa:n,path:ek.emptyPath(),oa:!1,la:r},this.databaseId,this.yt,this.ignoreUndefinedProperties)}}]),e}();function Aj(e){var t=e._freezeSettings(),n=WI(e._databaseId);return new Nj(e._databaseId,!!t.ignoreUndefinedProperties,n)}function jj(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=e.da(a.merge||a.mergeFields?2:0,t,n,i);Fj("Data must be an object, but it was:",o,r);var s,u,l=Rj(r,o);if(a.merge)s=new z_(o.fieldMask),u=o.fieldTransforms;else if(a.mergeFields){var c,f=[],h=ya(a.mergeFields);try{for(h.s();!(c=h.n()).done;){var d=c.value,p=Lj(t,d,n);if(!o.contains(p))throw new Dx(Rx.INVALID_ARGUMENT,"Field '".concat(p,"' is specified in your field mask but missing from your input data."));zj(f,p)||f.push(p)}}catch(v){h.e(v)}finally{h.f()}s=new z_(f),u=o.fieldTransforms.filter((function(e){return s.covers(e.field)}))}else s=null,u=o.fieldTransforms;return new Sj(new q_(l),s,u)}var Oj=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"_toFieldTransform",value:function(e){return new jC(e.path,new _C)}},{key:"isEqual",value:function(e){return e instanceof n}}]),n}(_j);function Pj(e,t){if(Dj(e=ho(e)))return Fj("Unsupported field value:",t,e),Rj(e,t);if(e instanceof _j)return function(e,t){if(!Tj(t.sa))throw t.ha("".concat(e._methodName,"() can only be used with update(
2) and set()"));if(!t.path)throw t.ha("".concat(e._methodName,"() is not currently supported inside arrays"));var 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.oa&&4!==t.sa)throw t.ha("Nested arrays are not supported");return function(e,t){var n,r=[],i=0,a=ya(e);try{for(a.s();!(n=a.n()).done;){var o=Pj(n.value,t.aa(i));null==o&&(o={nullValue:"NULL_VALUE"}),r.push(o),i++}}catch(s){a.e(s)}finally{a.f()}return{arrayValue:{values:r}}}(e,t)}return function(e,t){if(null===(e=ho(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return gC(t.yt,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=Qx.fromDate(e);return{timestampValue:SE(t.yt,n)}}if(e instanceof Qx){var r=new Qx(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:SE(t.yt,r)}}if(e instanceof Cj)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof xj)return{bytesValue:TE(t.yt,e._byteString)};if(e instanceof YA){var i=t.databaseId,a=e.firestore._databaseId;if(!a.isEqual(i))throw t.ha("Document reference is for database ".concat(a.projectId,"/").concat(a.database," but should be for database ").concat(i.projectId,"/").concat(i.database));return{referenceValue:AE(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.ha("Unsupported field value: ".concat(UA(e)))}(e,t)}function Rj(e,t){var n={};return Ok(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):jk(e,(function(e,r){var i=Pj(r,t.ra(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Dj(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Qx||e instanceof Cj||e instanceof xj||e instanceof YA||e instanceof _j)}function Fj(e,t,n){if(!Dj(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=UA(n);throw"an object"===r?t.ha(e+" a custom object"):t.ha(e+" "+r)}}function Lj(e,t,n){if((t=ho(t))instanceof kj)return t._internalPath;if("string"==typeof t)return Vj(e,t);throw Bj("Field path arguments must be of type string or ",e,!1,void 0,n)}var Mj=new RegExp("[~\\*/\\[\\]]");function Vj(e,t,n){if(t.search(Mj)>=0)throw Bj("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return oa(kj,bn(t.split(".")))._internalPath}catch(r){throw Bj("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function Bj(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,s="Function ".concat(t,"() called with invalid data");n&&(s+=" (via `toFirestore()`)"),s+=". ";var u="";return(a||o)&&(u+=" (found",a&&(u+=" in field ".concat(r)),o&&(u+=" in document ".concat(i)),u+=")"),new Dx(Rx.INVALID_ARGUMENT,s+e+u)}function zj(e,t){return e.some((function(e){return e.isEqual(t)}))}var qj=function(){function e(t,n,r,i,a){ua(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return ca(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new YA(this._firestore,this._converter,this._key)}},{key:"exists",value:function(){return null!==this._document}},{key:"data",value:function(){if(this._document){if(this._converter){var e=new Uj(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}},{key:"get",value:function(e){if(this._document){var t=this._document.data.field(Hj("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),Uj=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"data",value:function(){return ma(ra(n.prototype),"data",this).call(this)}}]),n}(qj);function Hj(e,t){return"string"==typeof t?Vj(e,t):t instanceof kj?t._internalPath:t._delegate._internalPath}function Wj(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Dx(Rx.UNIMPLEMENT
2ED,"limitToLast() queries require specifying at least one orderBy() clause")}var Kj=function(){function e(){ua(this,e)}return ca(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(Kk(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Vk(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(Bk(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 jx()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return jk(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new Cj(Vk(e.latitude),Vk(e.longitude))}},{key:"convertArray",value:function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))}},{key:"convertServerTimestamp",value:function(e,t){switch(t){case"previous":var n=qk(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Uk(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=Mk(e);return new Qx(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=Jx.fromString(e);Ox(ZE(n));var r=new Nk(n.get(1),n.get(3)),i=new tk(n.popFirst(5));return r.isEqual(t)||Ix("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}]),e}();function Gj(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var Yj=function(){function e(t,n){ua(this,e),this.hasPendingWrites=t,this.fromCache=n}return ca(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),Qj=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a,o,s){var u;return ua(this,n),(u=t.call(this,e,r,i,a,s))._firestore=e,u._firestoreImpl=e,u.metadata=o,u}return ca(n,[{key:"exists",value:function(){return ma(ra(n.prototype),"exists",this).call(this)}},{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){var t=new $j(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)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){var n=this._document.data.field(Hj("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(qj),$j=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ma(ra(n.prototype),"data",this).call(this,e)}}]),n}(Qj),Xj=function(){function e(t,n,r,i){ua(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Yj(i.hasPendingWrites,i.fromCache),this.query=r}return ca(e,[{key:"docs",get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}},{key:"size",get:function(){return this._snapshot.docs.size}},{key:"empty",get:function(){return 0===this.size}},{key:"forEach",value:function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new $j(n._firestore,n._userDataWriter,r.key,r,new Yj(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))}},{key:"docChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Dx(Rx.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()){var n=0;return e._snapshot.docChanges.map((function(t){var r=new $j(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Yj(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);return t.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new $j(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Yj(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(a=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:Jj(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}]),e}();function Jj(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return jx()}}function Zj(e){e=HA(e,YA);var t=HA(e.firestore,pj);return fj(mj(t),e._key).then((function(n){return rO(t,e,n)}
2))}var eO=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this)).firestore=e,r}return ca(n,[{key:"convertBytes",value:function(e){return new xj(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new YA(this.firestore,null,t)}}]),n}(Kj);function tO(e,t,n){e=HA(e,YA);var r=HA(e.firestore,pj),i=Gj(e.converter,t,n);return nO(r,[jj(Aj(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,PC.none())])}function nO(e,t){return function(e,t){var n=new Fx;return e.asyncQueue.enqueueAndForget(a(r().mark((function i(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=dA,r.next=3,uj(e);case 3:return r.t1=r.sent,r.t2=t,r.t3=n,r.abrupt("return",(0,r.t0)(r.t1,r.t2,r.t3));case 7:case"end":return r.stop()}}),i)})))),n.promise}(mj(e),t)}function rO(e,t,n){var r=n.docs.get(t._key),i=new eO(e);return new Qj(e,i,t._key,r,new Yj(n.hasPendingWrites,n.fromCache),t.converter)}function iO(){return new Oj("serverTimestamp")}!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Cx="9.17.1",Zo(new po("firestore",(function(e,n){var r=n.instanceIdentifier,i=n.options,a=e.getProvider("app").getImmediate(),o=new pj(new Vx(e.getProvider("auth-internal")),new Ux(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new Dx(Rx.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Nk(e.options.projectId,t)}(a,r),a);return i=Object.assign({useFetchStreams:t},i),o._setSettings(i),o}),"PUBLIC").setMultipleInstances(!0)),ss(kx,"3.8.3",e),ss(kx,"3.8.3","esm2017")}();function aO(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}function oO(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((function(e){return oO(e)}));if("function"===typeof e||"object"===typeof e)return aO(e,(function(e){return oO(e)}));throw new Error("Data cannot be encoded in JSON: "+e)}function sO(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":var 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((function(e){return sO(e)})):"function"===typeof e||"object"===typeof e?aO(e,(function(e){return sO(e)})):e}var uO="functions",lO={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"},cO=function(e){ha(n,e);var t=pa(n);function n(e,r,i){var a;return ua(this,n),(a=t.call(this,"".concat(uO,"/").concat(e),r||"")).details=i,a}return ca(n)}(Ua);function fO(e,t){var n=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),r=n,i=void 0;try{var a=t&&t.error;if(a){var o=a.status;if("string"===typeof o){if(!lO[o])return new cO("internal","internal");n=lO[o],r=o}var s=a.message;"string"===typeof s&&(r=s),void 0!==(i=a.details)&&(i=sO(i))}}catch(AF){}return"ok"===n?null:new cO(n,r,i)}var hO=function(){function e(t,n,r){var i=this;ua(this,e),this.auth=null,this.messaging=null,this.appCheck=null,this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then((function(e){return i.auth=e}),(function(){})),this.messaging||n.get().then((function(e){return i.messaging=e}),(function(){})),this.appCheck||r.get().then((function(e){return i.appCheck=e}),(function(){}))}return ca(e,[{key:"getAuthToken",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.auth){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.prev=2,e.next=5,this.auth.getToken();case 5:return t=e.sent,e.abrupt("return",null===t||void 0===t?void 0:t.accessToken);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])}
2)));return function(){return e.apply(this,arguments)}}()},{key:"getMessagingToken",value:function(){var e=a(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.messaging&&"Notification"in self&&"granted"===Notification.permission){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.prev=2,e.next=5,this.messaging.getToken();case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",void 0);case 11:case"end":return e.stop()}}),e,this,[[2,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"getAppCheckToken",value:function(){var e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.appCheck){e.next=7;break}return e.next=3,this.appCheck.getToken();case 3:if(!(t=e.sent).error){e.next=6;break}return e.abrupt("return",null);case 6:return e.abrupt("return",t.token);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getContext",value:function(){var e=a(r().mark((function e(){var t,n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAuthToken();case 2:return t=e.sent,e.next=5,this.getMessagingToken();case 5:return n=e.sent,e.next=8,this.getAppCheckToken();case 8:return i=e.sent,e.abrupt("return",{authToken:t,messagingToken:n,appCheckToken:i});case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),dO="us-central1";function pO(e){var t=null;return{promise:new Promise((function(n,r){t=setTimeout((function(){r(new cO("deadline-exceeded","deadline-exceeded"))}),e)})),cancel:function(){t&&clearTimeout(t)}}}var vO=function(){function e(t,n,r,i){var a=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:dO,s=arguments.length>5?arguments[5]:void 0;ua(this,e),this.app=t,this.fetchImpl=s,this.emulatorOrigin=null,this.contextProvider=new hO(n,r,i),this.cancelAllRequests=new Promise((function(e){a.deleteService=function(){return Promise.resolve(e())}}));try{var u=new URL(o);this.customDomain=u.origin,this.region=dO}catch(AF){this.customDomain=null,this.region=o}}return ca(e,[{key:"_delete",value:function(){return this.deleteService()}},{key:"_url",value:function(e){var t=this.app.options.projectId;if(null!==this.emulatorOrigin){var n=this.emulatorOrigin;return"".concat(n,"/").concat(t,"/").concat(this.region,"/").concat(e)}return null!==this.customDomain?"".concat(this.customDomain,"/").concat(e):"https://".concat(this.region,"-").concat(t,".cloudfunctions.net/").concat(e)}}]),e}();function mO(e,t,n){return function(r){return function(e,t,n,r){var i=e._url(t);return bO(e,i,n,r)}(e,t,r,n||{})}}function yO(e,t,n,r){return gO.apply(this,arguments)}function gO(){return(gO=a(r().mark((function e(t,n,i,a){var o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i["Content-Type"]="application/json",e.prev=1,e.next=4,a(t,{method:"POST",body:JSON.stringify(n),headers:i});case 4:o=e.sent,e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",{status:0,json:null});case 10:return s=null,e.prev=11,e.next=14,o.json();case 14:s=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:return e.abrupt("return",{status:o.status,json:s});case 20:case"end":return e.stop()}}),e,null,[[1,7],[11,17]])})))).apply(this,arguments)}function bO(e,t,n,r){return wO.apply(this,arguments)}function wO(){return wO=a(r().mark((function e(t,n,i,a){var o,s,u,l,c,f,h,d,p;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=oO(i),o={data:i},s={},e.next=5,t.contextProvider.getContext();case 5:return(u=e.sent).authToken&&(s.Authorization="Bearer "+u.authToken),u.messagingToken&&(s["Firebase-Instance-ID-Token"]=u.messagingToken),null!==u.appCheckToken&&(s["X-Firebase-AppCheck"]=u.appCheckToken),l=a.timeout||7e4,c=pO(l),e.next=13,Promise.race([yO(n,o,s,t.fetchImpl),c.promise,t.cancelAllRequests]);case 13:if(f=e.sent,c.cancel(),f){e.next=17;break}throw new cO("cancelled","Firebase Functions instance was deleted.");case 17:if(!(h=fO(f.status,f.json))){e.next=20;break}throw h;case 20:if(f.json){e.next=22;break}
2throw new cO("internal","Response is not valid JSON object.");case 22:if("undefined"===typeof(d=f.json.data)&&(d=f.json.result),"undefined"!==typeof d){e.next=26;break}throw new cO("internal","Response is missing data field.");case 26:return p=sO(d),e.abrupt("return",{data:p});case 28:case"end":return e.stop()}}),e)}))),wO.apply(this,arguments)}var xO="@firebase/functions",kO="0.9.3";function _O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:os(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dO,n=es(ho(e),uO),r=n.getImmediate({identifier:t}),i=Pa("functions");return i&&CO.apply(void 0,[r].concat(bn(i))),r}function CO(e,t,n){!function(e,t,n){e.emulatorOrigin="http://".concat(t,":").concat(n)}(ho(e),t,n)}!function(e,t){Zo(new po(uO,(function(t,n){var r=n.instanceIdentifier,i=t.getProvider("app").getImmediate(),a=t.getProvider("auth-internal"),o=t.getProvider("messaging-internal"),s=t.getProvider("app-check-internal");return new vO(i,a,o,s,r,e)}),"PUBLIC").setMultipleInstances(!0)),ss(xO,kO,t),ss(xO,kO,"esm2017")}(fetch.bind(self));var EO,SO="firebasestorage.googleapis.com",TO=function(e){ha(n,e);var t=pa(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ua(this,n),(i=t.call(this,IO(e),"Firebase Storage: ".concat(r," (").concat(IO(e),")"))).status_=a,i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(fa(i),n.prototype),i}return ca(n,[{key:"status",get:function(){return this.status_},set:function(e){this.status_=e}},{key:"_codeEquals",value:function(e){return IO(e)===this.code}},{key:"serverResponse",get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message="".concat(this._baseMessage,"\n").concat(this.customData.serverResponse):this.message=this._baseMessage}}]),n}(Ua);function IO(e){return"storage/"+e}function NO(){return new TO(EO.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function AO(){return new TO(EO.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function jO(){return new TO(EO.CANCELED,"User canceled the upload/download.")}function OO(e){return new TO(EO.INVALID_ARGUMENT,e)}function PO(){return new TO(EO.APP_DELETED,"The Firebase app was deleted.")}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(EO||(EO={}));var RO,DO=function(){function e(t,n){ua(this,e),this.bucket=t,this.path_=n}return ca(e,[{key:"path",get:function(){return this.path_}},{key:"isRoot",get:function(){return 0===this.path.length}},{key:"fullServerUrl",value:function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}},{key:"bucketOnlyServerUrl",value:function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}}],[{key:"makeFromBucketSpec",value:function(t,n){var r,i;try{r=e.makeFromUrl(t,n)}catch(AF){return new e(t,"")}if(""===r.path)return r;throw i=t,new TO(EO.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.")}},{key:"makeFromUrl",value:function(t,n){var r=null,i="([A-Za-z0-9.\\-_]+)";var a=new RegExp("^gs://"+i+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}for(var s=n.replace(/[.]/g,"\\."),u=[{regex:a,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?://".concat(s,"/").concat("v[A-Za-z0-9_]+","/b/").concat(i,"/o").concat("(/([^?#]*).*)?$"),"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://".concat(n===SO?"(?:storage.googleapis.com|storage.cloud.google.com)":n,"/").concat(i,"/").concat("([^?#]*)"),"i"),indices:{bucket:1,path:2},postModify:o}],l=0;l<u.length;l++){var c=u[l],f=c.regex.exec(t);if(f){var h=f[c.indices.bucket],d=f[c.indices.path];d||(d=""),r=new e(h,d),c.postModify(r);break}}if(null==r)throw function(e){return new TO(EO.INVALID_URL,"Invalid URL '"+e+"'.")}(t);return r}}]),e}(),FO=function(){function e(t){ua(this,e),this.promise_=Promise.reject(t)}return ca(e,[{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(){}}]),e}();function LO(e,t,n,r){if(r<t)throw OO("Invalid value for '".concat(e,"'. Expected ").concat(t," or greater."));if(r>n)throw OO("Invalid value for '".concat(e,"'. Expected ").concat(n," or less."))}function MO(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}function VO(e,t){var n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}
2!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(RO||(RO={}));var BO=function(){function e(t,n,r,i,a,o,s,u,l,c,f){var h=this,d=!(arguments.length>11&&void 0!==arguments[11])||arguments[11];ua(this,e),this.url_=t,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=a,this.additionalRetryCodes_=o,this.callback_=s,this.errorCallback_=u,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=f,this.retry=d,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((function(e,t){h.resolve_=e,h.reject_=t,h.start_()}))}return ca(e,[{key:"start_",value:function(){var e=this,t=function(t,n){var r=e.resolve_,i=e.reject_,a=n.connection;if(n.wasSuccessCode)try{var o=e.callback_(a,a.getResponse());!function(e){return void 0!==e}(o)?r():r(o)}catch(AF){i(AF)}else if(null!==a){var s=NO();s.serverResponse=a.getErrorText(),e.errorCallback_?i(e.errorCallback_(a,s)):i(s)}else{if(n.canceled)i(e.appDelete_?PO():jO());else i(AO())}};this.canceled_?t(0,new zO(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,a=null,o=!1,s=0;function u(){return 2===s}var l=!1;function c(){if(!l){l=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.apply(null,n)}}function f(t){i=setTimeout((function(){i=null,e(d,u())}),t)}function h(){a&&clearTimeout(a)}function d(e){if(l)h();else{for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(e)return h(),void c.call.apply(c,[null,e].concat(n));var a;if(u()||o)return h(),void c.call.apply(c,[null,e].concat(n));r<64&&(r*=2),1===s?(s=2,a=0):a=1e3*(r+Math.random()),f(a)}}var p=!1;function v(e){p||(p=!0,h(),l||(null!==i?(e||(s=2),clearTimeout(i),f(0)):e||(s=1)))}return f(0),a=setTimeout((function(){o=!0,v(!0)}),n),v}((function(t,n){if(n)t(!1,new zO(!1,null,!0));else{var r=e.connectionFactory_();e.pendingConnection_=r;var i=function(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)};null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(){null!==e.progressCallback_&&r.removeUploadProgressListener(i),e.pendingConnection_=null;var n=r.getErrorCode()===RO.NO_ERROR,a=r.getStatus();if(!n||VO(a,e.additionalRetryCodes_)&&e.retry){var o=r.getErrorCode()===RO.ABORT;t(!1,new zO(!1,null,o))}else{var s=-1!==e.successCodes_.indexOf(a);t(!0,new zO(s,r))}}))}}),t,this.timeout_)}},{key:"getPromise",value:function(){return this.promise_}},{key:"cancel",value:function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&function(e){e(!1)}(this.backoffId_),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}]),e}(),zO=ca((function e(t,n,r){ua(this,e),this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}));function qO(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}function UO(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}function HO(e,t){t&&(e["X-Firebase-GMPID"]=t)}function WO(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}function KO(e,t,n,r,i,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=MO(e.urlParams),u=e.url+s,l=Object.assign({},e.headers);return HO(l,t),qO(l,n),UO(l,a),WO(l,r),new BO(u,e.method,l,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}function GO(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}var YO=function(){function e(t,n){ua(this,e),this._service=t,this._location=n instanceof DO?n:DO.makeFromUrl(n,t.host)}return ca(e,[{key:"toString",value:function(){return"gs://"+this._location.bucket+"/"+this._location.path}},{key:"_newRef",value:function(t,n){return new e(t,n)}},{key:"root",get:function(){var e=new DO(this._location.bucket,"");return this._newRef(this._service,e)}},{key:"bucket",get:function(){return this._location.bucket}},{key:"fullPath",get:function(){return this._location.path}},{key:"name",get:function(){return GO(this._location.path)}},{key:"storage",get:function(){return this._service}},{key:"parent",get:function(){var t=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===t)return null;var n=new DO(this._location.bucket,t);return new e(this._service,n)}},{key:"_throwIfRoot",value:function(e){if(""===this._location.path)throw function(e){return new TO(EO.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)}}]),e}();function QO(e,t){var n=null===t||void 0===t?void 0:t.storageBucket;return null==n?null:DO.makeFromBucketSpec(n,e)}var $O=function(){function e(t,n,r,i,a){ua(this,e),this.app=t,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=a,this._bucket=null,this._host=SO,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?DO.makeFromBucketSpec(i,this._host):QO(this._host,this.app.options)}return ca(e,[{key:"host",get:function(){return this._host},set:function(e){this._host=e,null!=this._url?this._bucket=DO.makeFromBucketSpec(this._url,e):this._bucket=QO(e,this.app.options)}},{key:"maxUploadRetryTime",get:function(){return this._maxUploadRetryTime},set:function(e){LO("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}},{key:"maxOperationRetryTime",get:function(){return this._maxOperationRetryTime},set:function(e){LO("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}},{key:"_getAuthToken",value:function(){var e=a(r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._overrideAuthToken){e.next=2;break}return e.abrupt("return",this._overrideAuthToken);case 2:if(!(t=this._authProvider.getImmediate({optional:!0}))){e.next=9;break}return e.next=6,t.getToken();case 6:if(null===(n=e.sent)){e.next=9;break}return e.abrupt("return",n.accessToken);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getAppCheckToken",value:function(){var e=a(r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this._appCheckProvider.getImmediate({optional:!0}))){e.next=6;break}return e.next=4,t.getToken();case 4:return n=e.sent,e.abrupt("return",n.token);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_delete",value:function(){return this._deleted||(this._deleted=!0,this._requests.forEac
2h((function(e){return e.cancel()})),this._requests.clear()),Promise.resolve()}},{key:"_makeStorageReference",value:function(e){return new YO(this,e)}},{key:"_makeRequest",value:function(e,t,n,r){var i=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this._deleted)return new FO(PO());var o=KO(e,this._appId,n,r,t,this._firebaseVersion,a);return this._requests.add(o),o.getPromise().then((function(){return i._requests.delete(o)}),(function(){return i._requests.delete(o)})),o}},{key:"makeRequestWithTokens",value:function(){var e=a(r().mark((function e(t,n){var i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this._getAuthToken(),this._getAppCheckToken()]);case 2:return i=e.sent,a=u(i,2),o=a[0],s=a[1],e.abrupt("return",this._makeRequest(t,n,o,s).getPromise());case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),XO="@firebase/storage",JO="0.11.1",ZO="storage";function eP(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new $O(r,i,a,n,is)}Zo(new po(ZO,eP,"PUBLIC").setMultipleInstances(!0)),ss(XO,JO,""),ss(XO,JO,"esm2017");var tP,nP;var rP=new WeakMap,iP=new WeakMap,aP=new WeakMap,oP=new WeakMap,sP=new WeakMap;var uP={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return iP.get(e);if("objectStoreNames"===t)return e.objectStoreNames||aP.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return fP(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function lP(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(nP||(nP=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(hP(this),n),fP(rP.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fP(e.apply(hP(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=e.call.apply(e,[hP(this),t].concat(r));return aP.set(a,t.sort?t.sort():[t]),fP(a)}}function cP(e){return"function"===typeof e?lP(e):(e instanceof IDBTransaction&&function(e){if(!iP.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=function(){t(),r()},a=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));iP.set(e,t)}}(e),function(e,t){return t.some((function(t){return e instanceof t}))}(e,tP||(tP=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,uP):e)}function fP(e){if(e instanceof IDBRequest)return function(e){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",a)},i=function(){t(fP(e.result)),r()},a=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((function(t){t instanceof IDBCursor&&rP.set(t,e)})).catch((function(){})),sP.set(t,e),t}(e);if(oP.has(e))return oP.get(e);var t=cP(e);return t!==e&&(oP.set(e,t),sP.set(t,e)),t}var hP=function(e){return sP.get(e)};var dP,pP=["get","getKey","getAll","getAllKeys","count"],vP=["put","add","delete","clear"],mP=new Map;function yP(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"===typeof t){if(mP.get(t))return mP.get(t);var n=t.replace(/FromIndex$/,""),i=t!==n,o=vP.includes(n);if(n in(i?IDBIndex:IDBObjectStore).prototype&&(o||pP.includes(n))){var s=function(){var e=a(r().mark((function e(t){var a,s,u,l,c,f,h=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=this.transaction(t,o?"readwrite":"readonly"),u=s.store,l=h.length,c=new Array(l>1?l-1:0),f=1;f<l;f++)c[f-1]=h[f];return i&&(u=u.index(c.shift())),e.next=6,Promise.all([(a=u)[n].apply(a,c),o&&s.done]);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();return mP.set(t,s),s}}}!function(e){uP=e(uP)}((function(e){return ue(ue({},e),{},{get:function(t,n,r){return yP(t,n)||e.get(t,n,r)},has:function(t,n){return!!yP(t,n)||e.has(t,n)}})}));var gP="@firebase/installations",bP="0.6.3",wP=1e4,xP="w:".concat(bP),kP="FIS_v2",_P=36e5,CP=(oe(dP={},"missing-app-config-values",'Missing App configuration value: "{$valueName}"'),oe(dP,"not-registered","Firebase Installation is not registered."),oe(dP,"installation-not-found","Firebase Installation not found."),oe(dP,"request-failed",'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"'),oe(dP,"app-offline","Could not process request. Application offline."),oe(dP,"delete-pending-registration","Can't delete installation while there is a pending registration request."),dP),EP=new Ha("installations","Installations",CP);function SP(e){return e instanceof Ua&&e.code.includes("request-failed")}function TP(e){var t=e.projectId;return"".concat("https://firebaseinstallations.googleapis.com/v1","/projects/").concat(t,"/installations")}
2function IP(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function NP(e,t){return AP.apply(this,arguments)}function AP(){return(AP=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return i=e.sent,a=i.error,e.abrupt("return",EP.create("request-failed",{requestName:t,serverCode:a.code,serverMessage:a.message,serverStatus:a.status}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jP(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function OP(e,t){var n=t.refreshToken,r=jP(e);return r.append("Authorization",function(e){return"".concat(kP," ").concat(e)}(n)),r}function PP(e){return RP.apply(this,arguments)}function RP(){return RP=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:if(!((n=e.sent).status>=500&&n.status<600)){e.next=5;break}return e.abrupt("return",t());case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),RP.apply(this,arguments)}function DP(e,t){return FP.apply(this,arguments)}function FP(){return(FP=a(r().mark((function e(t,n){var i,a,o,s,u,l,c,f,h,d,p,v;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.appConfig,a=t.heartbeatServiceProvider,o=n.fid,s=TP(i),u=jP(i),!(l=a.getImmediate({optional:!0}))){e.next=10;break}return e.next=8,l.getHeartbeatsHeader();case 8:(c=e.sent)&&u.append("x-firebase-client",c);case 10:return f={fid:o,authVersion:kP,appId:i.appId,sdkVersion:xP},h={method:"POST",headers:u,body:JSON.stringify(f)},e.next=14,PP((function(){return fetch(s,h)}));case 14:if(!(d=e.sent).ok){e.next=23;break}return e.next=18,d.json();case 18:return p=e.sent,v={fid:p.fid||o,registrationStatus:2,refreshToken:p.refreshToken,authToken:IP(p.authToken)},e.abrupt("return",v);case 23:return e.next=25,NP("Create Installation",d);case 25:throw e.sent;case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function LP(e){return new Promise((function(t){setTimeout(t,e)}))}var MP=/^[cdef][\w-]{21}$/;function VP(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return function(e){return btoa(String.fromCharCode.apply(String,bn(e))).replace(/\+/g,"-").replace(/\//g,"_")}(e).substr(0,22)}(e);return MP.test(t)?t:""}catch(WA){return""}}function BP(e){return"".concat(e.appName,"!").concat(e.appId)}var zP=new Map;function qP(e,t){var n=BP(e);UP(n,t),function(e,t){var n=WP();n&&n.postMessage({key:e,fid:t});KP()}(n,t)}function UP(e,t){var n=zP.get(e);if(n){var r,i=ya(n);try{for(i.s();!(r=i.n()).done;){(0,r.value)(t)}}catch(a){i.e(a)}finally{i.f()}}}var HP=null;function WP(){return!HP&&"BroadcastChannel"in self&&((HP=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){UP(e.data.key,e.data.fid)}),HP}function KP(){0===zP.size&&HP&&(HP.close(),HP=null)}var GP="firebase-installations-store",YP=null;function QP(){return YP||(YP=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,a=n.blocking,o=n.terminated,s=indexedDB.open(e,t),u=fP(s);return i&&s.addEventListener("upgradeneeded",(function(e){i(fP(s.result),e.oldVersion,e.newVersion,fP(s.transaction))})),r&&s.addEventListener("blocked",(function(){return r()})),u.then((function(e){o&&e.addEventListener("close",(function(){return o()})),a&&e.addEventListener("versionchange",(function(){return a()}))})).catch((function(){})),u}("firebase-installations-database",1,{upgrade:function(e,t){if(0===t)e.createObjectStore(GP)}})),YP}function $P(e,t){return XP.apply(this,arguments)}function XP(){return XP=a(r().mark((function e(t,n){var i,a,o,s,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=BP(t),e.next=3,QP();case 3:return a=e.sent,o=a.transaction(GP,"readwrite"),s=o.objectStore(GP),e.next=8,s.get(i);case 8:return u=e.sent,e.next=11,s.put(n,i);case 11:return e.next=13,o.done;case 13:return u&&u.fid===n.fid||qP(t,n.fid),e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)}))),XP.apply(this,arguments)}function JP(e){return ZP.apply(this,arguments)}function ZP(){return ZP=a(r().mark((function e(t){var n,i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=BP(t),e.next=3,QP();case 3:return i=e.sent,a=i.transaction(GP,"readwrite"),e.next=7,a.objectStore(GP).delete(n);case 7:return e.next=9,a.done;case 9:case"end":return e.stop()}}),e)}
2))),ZP.apply(this,arguments)}function eR(e,t){return tR.apply(this,arguments)}function tR(){return tR=a(r().mark((function e(t,n){var i,a,o,s,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=BP(t),e.next=3,QP();case 3:return a=e.sent,o=a.transaction(GP,"readwrite"),s=o.objectStore(GP),e.next=8,s.get(i);case 8:if(u=e.sent,void 0!==(l=n(u))){e.next=15;break}return e.next=13,s.delete(i);case 13:e.next=17;break;case 15:return e.next=17,s.put(l,i);case 17:return e.next=19,o.done;case 19:return!l||u&&u.fid===l.fid||qP(t,l.fid),e.abrupt("return",l);case 21:case"end":return e.stop()}}),e)}))),tR.apply(this,arguments)}function nR(e){return rR.apply(this,arguments)}function rR(){return(rR=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eR(t.appConfig,(function(e){var r=iR(e),i=aR(t,r);return n=i.registrationPromise,i.installationEntry}));case 2:if(""!==(i=e.sent).fid){e.next=8;break}return e.next=6,n;case 6:return e.t0=e.sent,e.abrupt("return",{installationEntry:e.t0});case 8:return e.abrupt("return",{installationEntry:i,registrationPromise:n});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function iR(e){return cR(e||{fid:VP(),registrationStatus:0})}function aR(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(EP.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=function(e,t){return oR.apply(this,arguments)}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:sR(e)}:{installationEntry:t}}function oR(){return(oR=a(r().mark((function e(t,n){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,DP(t,n);case 3:return i=e.sent,e.abrupt("return",$P(t.appConfig,i));case 7:if(e.prev=7,e.t0=e.catch(0),!SP(e.t0)||409!==e.t0.customData.serverCode){e.next=14;break}return e.next=12,JP(t.appConfig);case 12:e.next=16;break;case 14:return e.next=16,$P(t.appConfig,{fid:n.fid,registrationStatus:0});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function sR(e){return uR.apply(this,arguments)}function uR(){return(uR=a(r().mark((function e(t){var n,i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lR(t.appConfig);case 2:n=e.sent;case 3:if(1!==n.registrationStatus){e.next=11;break}return e.next=6,LP(100);case 6:return e.next=8,lR(t.appConfig);case 8:n=e.sent,e.next=3;break;case 11:if(0!==n.registrationStatus){e.next=22;break}return e.next=14,nR(t);case 14:if(i=e.sent,a=i.installationEntry,!(o=i.registrationPromise)){e.next=21;break}return e.abrupt("return",o);case 21:return e.abrupt("return",a);case 22:return e.abrupt("return",n);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lR(e){return eR(e,(function(e){if(!e)throw EP.create("installation-not-found");return cR(e)}))}function cR(e){return 1===(t=e).registrationStatus&&t.registrationTime+wP<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function fR(e,t){return hR.apply(this,arguments)}function hR(){return(hR=a(r().mark((function e(t,n){var i,a,o,s,u,l,c,f,h,d,p;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.appConfig,a=t.heartbeatServiceProvider,o=dR(i,n),s=OP(i,n),!(u=a.getImmediate({optional:!0}))){e.next=9;break}return e.next=7,u.getHeartbeatsHeader();case 7:(l=e.sent)&&s.append("x-firebase-client",l);case 9:return c={installation:{sdkVersion:xP,appId:i.appId}},f={method:"POST",headers:s,body:JSON.stringify(c)},e.next=13,PP((function(){return fetch(o,f)}));case 13:if(!(h=e.sent).ok){e.next=22;break}return e.next=17,h.json();case 17:return d=e.sent,p=IP(d),e.abrupt("return",p);case 22:return e.next=24,NP("Generate Auth Token",h);case 24:throw e.sent;case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dR(e,t){var n=t.fid;return"".concat(TP(e),"/").concat(n,"/authTokens:generate")}function pR(e){return vR.apply(this,arguments)}function vR(){return vR=a(r().mark((function e(t){var n,i,a,o,s=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]&&s[1],e.next=3,eR(t.appConfig,(function(e){if(!xR(e))throw EP.create("not-registered");var r=e.authToken;if(!n&&kR(r))return e;if(1===r.requestStatus)return i=mR(t,n),e;if(!navigator.onLine)throw EP.create("app-offline");var a=_R(e);return i=bR(t,a),a}));case 3:if(a=e.sent,!i){e.next=10;break}return e.next=7,i;case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=a.authToken;case 11:return o=e.t0,e.abrupt("return",o);case 13:case"end":return e.stop()}}),e)}))),vR.apply(this,arguments)}function mR(e,t){return yR.apply(this,arguments)}
2function yR(){return(yR=a(r().mark((function e(t,n){var i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gR(t.appConfig);case 2:i=e.sent;case 3:if(1!==i.authToken.requestStatus){e.next=11;break}return e.next=6,LP(100);case 6:return e.next=8,gR(t.appConfig);case 8:i=e.sent,e.next=3;break;case 11:if(0!==(a=i.authToken).requestStatus){e.next=16;break}return e.abrupt("return",pR(t,n));case 16:return e.abrupt("return",a);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gR(e){return eR(e,(function(e){if(!xR(e))throw EP.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+wP<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e}))}function bR(e,t){return wR.apply(this,arguments)}function wR(){return(wR=a(r().mark((function e(t,n){var i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fR(t,n);case 3:return i=e.sent,a=Object.assign(Object.assign({},n),{authToken:i}),e.next=7,$P(t.appConfig,a);case 7:return e.abrupt("return",i);case 10:if(e.prev=10,e.t0=e.catch(0),!SP(e.t0)||401!==e.t0.customData.serverCode&&404!==e.t0.customData.serverCode){e.next=17;break}return e.next=15,JP(t.appConfig);case 15:e.next=20;break;case 17:return o=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),e.next=20,$P(t.appConfig,o);case 20:throw e.t0;case 21:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function xR(e){return void 0!==e&&2===e.registrationStatus}function kR(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+_P}(e)}function _R(e){var t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function CR(){return(CR=a(r().mark((function e(t){var n,i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t,e.next=3,nR(n);case 3:return i=e.sent,a=i.installationEntry,(o=i.registrationPromise)?o.catch(console.error):pR(n).catch(console.error),e.abrupt("return",a.fid);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ER(){return ER=a(r().mark((function e(t){var n,i,a,o=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]&&o[1],i=t,e.next=4,SR(i);case 4:return e.next=6,pR(i,n);case 6:return a=e.sent,e.abrupt("return",a.token);case 8:case"end":return e.stop()}}),e)}))),ER.apply(this,arguments)}function SR(e){return TR.apply(this,arguments)}function TR(){return(TR=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nR(t);case 2:if(n=e.sent,!(i=n.registrationPromise)){e.next=7;break}return e.next=7,i;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function IR(e){return EP.create("missing-app-config-values",{valueName:e})}var NR,AR="installations",jR=function(e){var t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw IR("App Configuration");if(!e.name)throw IR("App Name");for(var t=0,n=["projectId","apiKey","appId"];t<n.length;t++){var r=n[t];if(!e.options[r])throw IR(r)}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:es(t,"heartbeat"),_delete:function(){return Promise.resolve()}}},OR=function(e){var t=es(e.getProvider("app").getImmediate(),AR).getImmediate(),n={getId:function(){return function(e){return CR.apply(this,arguments)}(t)},getToken:function(e){return function(e){return ER.apply(this,arguments)}(t,e)}};return n};Zo(new po(AR,jR,"PUBLIC")),Zo(new po("installations-internal",OR,"PRIVATE")),ss(gP,bP),ss(gP,bP,"esm2017");var PR="@firebase/remote-config",RR="0.4.3",DR="remote-config",FR=(oe(NR={},"registration-window","Undefined window object. This SDK only supports usage in a browser environment."),oe(NR,"registration-project-id","Undefined project identifier. Check Firebase app initialization."),oe(NR,"registration-api-key","Undefined API key. Check Firebase app initialization."),oe(NR,"registration-app-id","Undefined app identifier. Check Firebase app initialization."),oe(NR,"storage-open","Error thrown when opening storage. Original error: {$originalErrorMessage}."),oe(NR,"storage-get","Error thrown when reading from storage. Original error: {$originalErrorMessage}."),oe(NR,"storage-set","Error thrown when writing to storage. Original error: {$originalErrorMessage}."),oe(NR,"storage-delete","Error thrown when deleting from storage. Original error: {$originalErrorMessage}."),oe(NR,"fetch-client-network","Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}."),oe(NR,"fetch-timeout",'The config fetch request timed out.  Configure timeout using "fetchTimeoutMillis" SDK setting.'),oe(NR,"fetch-throttle",'The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.'),oe(NR,"fetch-client-parse","Fetch client could not parse response. Original error: {$originalErrorMessage}."),oe(NR,"fetch-status","Fetch server returned an HTTP error status. HTTP status: {$httpStatus}."),oe(NR,"indexed-db-unavailable","Indexed DB is not supported by current browser"),NR),LR=new Ha("remoteconfig","Remote Config",FR);var MR=function(){function e(t,n,r,i){ua(this,e),this.client=t,this.storage=n,this.storageCache=r,this.logger=i}
2return ca(e,[{key:"isCachedDataFresh",value:function(e,t){if(!t)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-t,r=n<=e;return this.logger.debug("Config fetch cache check."+" Cache age millis: ".concat(n,".")+" Cache max age millis (minimumFetchIntervalMillis setting): ".concat(e,".")+" Is cache hit: ".concat(r,".")),r}},{key:"fetch",value:function(){var e=a(r().mark((function e(t){var n,i,a,o,s,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()]);case 2:if(n=e.sent,i=u(n,2),a=i[0],!(o=i[1])||!this.isCachedDataFresh(t.cacheMaxAgeMillis,a)){e.next=8;break}return e.abrupt("return",o);case 8:return t.eTag=o&&o.eTag,e.next=11,this.client.fetch(t);case 11:return s=e.sent,l=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===s.status&&l.push(this.storage.setLastSuccessfulFetchResponse(s)),e.next=16,Promise.all(l);case 16:return e.abrupt("return",s);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function VR(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e.languages&&e.languages[0]||e.language}var BR=function(){function e(t,n,r,i,a,o){ua(this,e),this.firebaseInstallations=t,this.sdkVersion=n,this.namespace=r,this.projectId=i,this.apiKey=a,this.appId=o}return ca(e,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=a(r().mark((function e(t){var n,i,a,o,s,l,c,f,h,d,p,v,m,y,g,b,w,x;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()]);case 2:return n=e.sent,i=u(n,2),a=i[0],o=i[1],s=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",l="".concat(s,"/v1/projects/").concat(this.projectId,"/namespaces/").concat(this.namespace,":fetch?key=").concat(this.apiKey),c={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},f={sdk_version:this.sdkVersion,app_instance_id:a,app_instance_id_token:o,app_id:this.appId,language_code:VR()},h={method:"POST",headers:c,body:JSON.stringify(f)},d=fetch(l,h),p=new Promise((function(e,n){t.signal.addEventListener((function(){var e=new Error("The operation was aborted.");e.name="AbortError",n(e)}))})),e.prev=13,e.next=16,Promise.race([d,p]);case 16:return e.next=18,d;case 18:v=e.sent,e.next=26;break;case 21:throw e.prev=21,e.t0=e.catch(13),m="fetch-client-network","AbortError"===(null===e.t0||void 0===e.t0?void 0:e.t0.name)&&(m="fetch-timeout"),LR.create(m,{originalErrorMessage:null===e.t0||void 0===e.t0?void 0:e.t0.message});case 26:if(y=v.status,g=v.headers.get("ETag")||void 0,200!==v.status){e.next=40;break}return e.prev=29,e.next=32,v.json();case 32:x=e.sent,e.next=38;break;case 35:throw e.prev=35,e.t1=e.catch(29),LR.create("fetch-client-parse",{originalErrorMessage:null===e.t1||void 0===e.t1?void 0:e.t1.message});case 38:b=x.entries,w=x.state;case 40:if("INSTANCE_STATE_UNSPECIFIED"===w?y=500:"NO_CHANGE"===w?y=304:"NO_TEMPLATE"!==w&&"EMPTY_CONFIG"!==w||(b={}),304===y||200===y){e.next=43;break}throw LR.create("fetch-status",{httpStatus:y});case 43:return e.abrupt("return",{status:y,eTag:g,config:b});case 44:case"end":return e.stop()}}),e,this,[[13,21],[29,35]])})));return function(t){return e.apply(this,arguments)}}())}]),e}();function zR(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),a=setTimeout(n,i);e.addEventListener((function(){clearTimeout(a),r(LR.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}function qR(e){if(!(e instanceof Ua)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}var UR=function(){function e(t,n){ua(this,e),this.client=t,this.storage=n}return ca(e,[{key:"fetch",value:function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.storage.getThrottleMetadata();case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0={backoffCount:0,throttleEndTimeMillis:Date.now()};case 5:return n=e.t0,e.abrupt("return",this.attemptFetch(t,n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"attemptFetch",value:function(){var e=a(r().mark((function e(t,n){var i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.throttleEndTimeMillis,a=n.backoffCount,e.next=3,zR(t.signal,i);case 3:return e.prev=3,e.next=6,this.client.fetch(t);case 6:return o=e.sent,e.next=9,this.storage.deleteThrottleMetadata();case 9:return e.abrupt("return",o);case 12:if(e.prev=12,e.t0=e.catch(3),qR(e.t0)){e.next=16;break}throw e.t0;case 16:return s={throttleEndTimeMillis:Date.now()+fo(a),backoffCount:a+1},e.next=19,this.storage.setThrottleMetadata(s);case 19:return e.abrupt("return",this.attemptFetch(t,s));case 20:case"end":return e.stop()}}
2),e,this,[[3,12]])})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),HR=function(){function e(t,n,r,i,a){ua(this,e),this.app=t,this._client=n,this._storageCache=r,this._storage=i,this._logger=a,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return ca(e,[{key:"fetchTimeMillis",get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1}},{key:"lastFetchStatus",get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"}}]),e}();function WR(e,t){var n=e.target.error||void 0;return LR.create(t,{originalErrorMessage:n&&(null===n||void 0===n?void 0:n.message)})}var KR="app_namespace_store";function GR(){return new Promise((function(e,t){try{var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(e){t(WR(e,"storage-open"))},n.onsuccess=function(t){e(t.target.result)},n.onupgradeneeded=function(e){var t=e.target.result;if(0===e.oldVersion)t.createObjectStore(KR,{keyPath:"compositeKey"})}}catch(ch){t(LR.create("storage-open",{originalErrorMessage:null===ch||void 0===ch?void 0:ch.message}))}}))}var YR=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:GR();ua(this,e),this.appId=t,this.appName=n,this.namespace=r,this.openDbPromise=i}return ca(e,[{key:"getLastFetchStatus",value:function(){return this.get("last_fetch_status")}},{key:"setLastFetchStatus",value:function(e){return this.set("last_fetch_status",e)}},{key:"getLastSuccessfulFetchTimestampMillis",value:function(){return this.get("last_successful_fetch_timestamp_millis")}},{key:"setLastSuccessfulFetchTimestampMillis",value:function(e){return this.set("last_successful_fetch_timestamp_millis",e)}},{key:"getLastSuccessfulFetchResponse",value:function(){return this.get("last_successful_fetch_response")}},{key:"setLastSuccessfulFetchResponse",value:function(e){return this.set("last_successful_fetch_response",e)}},{key:"getActiveConfig",value:function(){return this.get("active_config")}},{key:"setActiveConfig",value:function(e){return this.set("active_config",e)}},{key:"getActiveConfigEtag",value:function(){return this.get("active_config_etag")}},{key:"setActiveConfigEtag",value:function(e){return this.set("active_config_etag",e)}},{key:"getThrottleMetadata",value:function(){return this.get("throttle_metadata")}},{key:"setThrottleMetadata",value:function(e){return this.set("throttle_metadata",e)}},{key:"deleteThrottleMetadata",value:function(){return this.delete("throttle_metadata")}},{key:"get",value:function(){var e=a(r().mark((function e(t){var n,i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.openDbPromise;case 2:return n=e.sent,e.abrupt("return",new Promise((function(e,r){var a=n.transaction([KR],"readonly").objectStore(KR),o=i.createCompositeKey(t);try{var s=a.get(o);s.onerror=function(e){r(WR(e,"storage-get"))},s.onsuccess=function(t){var n=t.target.result;e(n?n.value:void 0)}}catch(AF){r(LR.create("storage-get",{originalErrorMessage:null===AF||void 0===AF?void 0:AF.message}))}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"set",value:function(){var e=a(r().mark((function e(t,n){var i,a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.openDbPromise;case 2:return i=e.sent,e.abrupt("return",new Promise((function(e,r){var o=i.transaction([KR],"readwrite").objectStore(KR),s=a.createCompositeKey(t);try{var u=o.put({compositeKey:s,value:n});u.onerror=function(e){r(WR(e,"storage-set"))},u.onsuccess=function(){e()}}catch(AF){r(LR.create("storage-set",{originalErrorMessage:null===AF||void 0===AF?void 0:AF.message}))}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=a(r().mark((function e(t){var n,i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.openDbPromise;case 2:return n=e.sent,e.abrupt("return",new Promise((function(e,r){var a=n.transaction([KR],"readwrite").objectStore(KR),o=i.createCompositeKey(t);try{var s=a.delete(o);s.onerror=function(e){r(WR(e,"storage-delete"))},s.onsuccess=function(){e()}}catch(AF){r(LR.create("storage-delete",{originalErrorMessage:null===AF||void 0===AF?void 0:AF.message}))}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createCompositeKey",value:function(e){return[this.appId,this.appName,this.namespace,e].join()}}]),e}(),QR=function(){function e(t){ua(this,e),this.storage=t}return ca(e,[{key:"getLastFetchStatus",value:function(){return this.lastFetchStatus}},{key:"getLastSuccessfulFetchTimestampMillis",value:function(){return this.lastSuccessfulFetchTimestampMillis}},{key:"getActiveConfig",value:function(){return this.activeConfig}},{key:"loadFromStorage",value:function(){var e=a(r().mark((function e(){var t,n,i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.storage.getLastFetchStatus(),n=this.storage.getLastSuccessfulFetchTimestampMillis(),i=this.storage.getActiveConfig(),e.next=5,t;case 5:return(a=e.sent)&&(this.lastFetchStatus=a),e.next=9,n;case 9:return(o=e.sent)&&(this.lastSuccessfulFetchTimestampMillis=o),e.next=13,i;case 13:(s=e.sent)&&(this.activeConfig=s);case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setLastFetchStatus",value:function(e){return this.lastFetchStatus=e,this.storage.setLastFetchStatus(e)}},{key:"setLastSuccessfulFetchTimestampMillis",value:function(e){return this.lastSuccessfulFetchTimestampMillis=e,this.storage.setLastSuccessfulFetchTimestampMillis(e)}},{key:"setActiveConfig",value:function(e){return this.activeConfig=e,this.storage.setActiveConfig(e)}}]),e}();Zo(new po(DR,(function(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("installations-internal").getImmediate();if("undefined"===typeof window)throw LR.create("registration-window");if(!qa())throw LR.create("indexed-db-unavailable");var a=r.options,o=a.projectId,s=a.apiKey,u=a.appId;if(!o)throw LR.create("registration-project-id");if(!s)throw LR.create("registration-api-key");if(!u)throw LR.create("registration-app-id");n=n||"firebase";var l=new YR(u,r.name,n),c=new QR(l),f=new Eo(PR);f.logLevel=go.ERROR;var h=new BR(i,is,n,o,s,u),d=new UR(h,l),p=new MR(d,l,c,f),v=new HR(r,p,c,l,f);return function(e){var t=ho(e);t._initializePromise||(t._initializePromise=t._storageCache.loadFromStorage().then((function(){t._isInitializationComplete=!0}))),t._initializePromise}(v),v}),"PUBLIC").setMultipleInstances(!0)),ss(PR,RR),ss(PR,RR,"esm2017");
2var $R=function(e,t){return $R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},$R(e,t)};function XR(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}$R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function JR(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,s)}u((r=r.apply(e,t||[])).next())}))}function ZR(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(s){a=[6,s],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function eD(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tD(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(lw){i={error:lw}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function nD(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function rD(e){return this instanceof rD?(this.v=e,this):new rD(e)}function iD(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof rD?Promise.resolve(e.value.v).then(u,l):c(a[0][2],e)}(i[e](t))}catch(Wb){c(a[0][3],Wb)}}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function aD(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=eD(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function oD(e){return"function"==typeof e}function sD(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var uD=sD((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}}));function lD(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var cD=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=eD(a),s=o.next();!s.done;s=o.next()){s.value.remove(this)}}catch(d){e={error:d}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var u=this.initialTeardown;
2if(oD(u))try{u()}catch(d){i=d instanceof uD?d.errors:[d]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var c=eD(l),f=c.next();!f.done;f=c.next()){var h=f.value;try{dD(h)}catch(d){i=null!=i?i:[],d instanceof uD?i=nD(nD([],tD(i)),tD(d.errors)):i.push(d)}}}catch(d){n={error:d}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(i)throw new uD(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)dD(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&lD(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&lD(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),fD=cD.EMPTY;function hD(e){return e instanceof cD||e&&"closed"in e&&oD(e.remove)&&oD(e.add)&&oD(e.unsubscribe)}function dD(e){oD(e)?e():e.unsubscribe()}var pD=void 0,vD=!1,mD=!1,yD={setTimeout:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=yD.delegate;return null!=i&&i.setTimeout?i.setTimeout.apply(i,nD([e,t],tD(n))):setTimeout.apply(void 0,nD([e,t],tD(n)))})),clearTimeout:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){var t=yD.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)})),delegate:void 0};function gD(e){yD.setTimeout((function(){throw e}))}function bD(){}var wD=null;function xD(e){if(vD){var t=!wD;if(t&&(wD={errorThrown:!1,error:null}),e(),t){var n=wD,r=n.errorThrown,i=n.error;if(wD=null,r)throw i}}else e()}var kD=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,hD(t)&&t.add(n)):n.destination=ID,n}return XR(t,e),t.create=function(e,t,n){return new SD(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(cD),_D=Function.prototype.bind;function CD(e,t){return _D.call(e,t)}var ED=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(me){TD(me)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(me){TD(me)}else TD(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){TD(t)}},e}(),SD=function(e){function t(t,n,r){var i,a,o=e.call(this)||this;oD(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&mD?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},i={next:t.next&&CD(t.next,a),error:t.error&&CD(t.error,a),complete:t.complete&&CD(t.complete,a)}):i=t;return o.destination=new ED(i),o}return XR(t,e),t}(kD);function TD(e){gD(e)}var ID={closed:!0,next:bD,error:function(e){throw e},complete:bD},ND="function"==typeof Symbol&&Symbol.observable||"@@observable";function AD(e){return e}function jD(e){return 0===e.length?AD:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var OD=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=function(e){return e&&e instanceof kD||function(e){return e&&oD(e.next)&&oD(e.error)&&oD(e.complete)}(e)&&hD(e)}(e)?e:new SD(e,t,n);return xD((function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))})),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=PD(t))((function(t,r){var i=new SD({next:function(t){try{e(t)}catch(n){r(n),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[ND]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jD(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=PD(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function PD(e){var t;return null!==(t=null!=e?e:pD)&&void 0!==t?t:Promise}function RD(e){return function(t){if(function(e){return oD(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(me){this.error(me)}
vendor: 8,602 bytes, line 2
2}));throw new TypeError("Unable to lift unknown Observable type")}}function DD(e,t,n,r,i){return new FD(e,t,n,r,i)}var FD=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(ky){t.error(ky)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(ky){t.error(ky)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return XR(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(kD),LD=sD((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),MD=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return XR(t,e),t.prototype.lift=function(e){var t=new VD(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new LD},t.prototype.next=function(e){var t=this;xD((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=eD(t.currentObservers),a=i.next();!a.done;a=i.next()){a.value.next(e)}}catch(o){n={error:o}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;xD((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;xD((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?fD:(this.currentObservers=null,a.push(e),new cD((function(){t.currentObservers=null,lD(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new OD;return e.source=this,e},t.create=function(e,t){return new VD(e,t)},t}(OD),VD=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return XR(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:fD},t}(MD),BD={now:function(){return(BD.delegate||Date).now()},delegate:void 0},zD=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=BD);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return XR(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,u=1;u<r.length&&r[u]<=o;u+=2)s=u;s&&r.splice(0,s+1)}},t}(MD),qD=function(e){function t(t,n){return e.call(this)||this}return XR(t,e),t.prototype.schedule=function(e,t){return this},t}(cD),UD={setInterval:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=UD.delegate;return null!=i&&i.setInterval?i.setInterval.apply(i,nD([e,t],tD(n))):setInterval.apply(void 0,nD([e,t],tD(n)))})),clearInterval:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){var t=UD.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)})),delegate:void 0},HD=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return XR(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),UD.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;UD.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(i){r=!0,n=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,lD(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(qD),WD=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=BD.now,e}(),KD=function(e){function t(t,n){void 0===n&&(n=WD.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return XR(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(WD),GD=(new KD(HD),new OD((function(e){return e.complete()})));function YD(e){return e?function(e){return new OD((function(t){return e.schedule((function(){return t.complete()}))}))}(e):GD}function QD(e){return e&&oD(e.schedule)}function $D(e){return e[e.length-1]}function XD(e){return QD($D(e))?e.pop():void 0}var JD=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function ZD(e){return oD(null==e?void 0:e.then)}function eF(e){return oD(e[ND])}function tF(e){return Symbol.asyncIterator&&oD(null==e?void 0:e[Symbol.asyncIterator])}function nF(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var rF="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function iF(e){return oD(null==e?void 0:e[rF])}function aF(e){return iD(this,arguments,(function(){var t,n,r;return ZR(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,rD(t.read())];case 3:return n=i.sent(),r=n.value,n.done?[4,rD(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,rD(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}
vendor: 4,151 bytes, line 2
2))}))}function oF(e){return oD(null==e?void 0:e.getReader)}function sF(e){if(e instanceof OD)return e;if(null!=e){if(eF(e))return function(e){return new OD((function(t){var n=e[ND]();if(oD(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}(e);if(JD(e))return function(e){return new OD((function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()}))}(e);if(ZD(e))return function(e){return new OD((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,gD)}))}(e);if(tF(e))return uF(e);if(iF(e))return function(e){return new OD((function(t){var n,r;try{for(var i=eD(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(lw){n={error:lw}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()}))}(e);if(oF(e))return function(e){return uF(aF(e))}(e)}throw nF(e)}function uF(e){return new OD((function(t){(function(e,t){var n,r,i,a;return JR(this,void 0,void 0,(function(){var o,s;return ZR(this,(function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=aD(e),u.label=1;case 1:return[4,n.next()];case 2:if((r=u.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function lF(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule((function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!i)return a}function cF(e,t){return void 0===t&&(t=0),RD((function(n,r){n.subscribe(DD(r,(function(n){return lF(r,e,(function(){return r.next(n)}),t)}),(function(){return lF(r,e,(function(){return r.complete()}),t)}),(function(n){return lF(r,e,(function(){return r.error(n)}),t)})))}))}function fF(e,t){return void 0===t&&(t=0),RD((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function hF(e,t){if(!e)throw new Error("Iterable cannot be null");return new OD((function(n){lF(n,t,(function(){var r=e[Symbol.asyncIterator]();lF(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function dF(e,t){if(null!=e){if(eF(e))return function(e,t){return sF(e).pipe(fF(t),cF(t))}(e,t);if(JD(e))return function(e,t){return new OD((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(ZD(e))return function(e,t){return sF(e).pipe(fF(t),cF(t))}(e,t);if(tF(e))return hF(e,t);if(iF(e))return function(e,t){return new OD((function(n){var r;return lF(n,t,(function(){r=e[rF](),lF(n,t,(function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(lw){return void n.error(lw)}i?n.complete():n.next(t)}),0,!0)})),function(){return oD(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(oF(e))return function(e,t){return hF(aF(e),t)}(e,t)}throw nF(e)}function pF(e,t){return t?dF(e,t):sF(e)}function vF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=XD(e);return pF(e,n)}sD((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function mF(e,t){return RD((function(n,r){var i=0;n.subscribe(DD(r,(function(n){r.next(e.call(t,n,i++))})))}))}function yF(e){return RD((function(t,n){var r,i=null,a=!1;i=t.subscribe(DD(n,void 0,void 0,(function(o){r=sF(e(o,yF(e)(t))),i?(i.unsubscribe(),i=null,r.subscribe(n)):a=!0}))),a&&(i.unsubscribe(),i=null,r.subscribe(n))}))}function gF(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0!==t){if(!1!==t){var i=new SD({next:function(){i.unsubscribe(),e()}});return t.apply(void 0,nD([],tD(n))).subscribe(i)}}else e()}function bF(e,t,n){var r,i,a,o,s=!1;return e&&"object"==typeof e?(r=e.bufferSize,o=void 0===r?1/0:r,i=e.windowTime,t=void 0===i?1/0:i,s=void 0!==(a=e.refCount)&&a,n=e.sc
2heduler):o=null!=e?e:1/0,function(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new MD}:t,r=e.resetOnError,i=void 0===r||r,a=e.resetOnComplete,o=void 0===a||a,s=e.resetOnRefCountZero,u=void 0===s||s;return function(e){var t,r,a,s=0,l=!1,c=!1,f=function(){null==r||r.unsubscribe(),r=void 0},h=function(){f(),t=a=void 0,l=c=!1},d=function(){var e=t;h(),null==e||e.unsubscribe()};return RD((function(e,p){s++,!c&&!l&&f();var v=a=null!=a?a:n();p.add((function(){0===--s&&!c&&!l&&(r=gF(d,u))})),v.subscribe(p),!t&&s>0&&(t=new SD({next:function(e){return v.next(e)},error:function(e){c=!0,f(),r=gF(h,i,e),v.error(e)},complete:function(){l=!0,f(),r=gF(h,o),v.complete()}}),sF(e).subscribe(t))}))(e)}}({connector:function(){return new zD(o,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function wF(e,t){return RD((function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(DD(r,(function(n){null==i||i.unsubscribe();var o=0,u=a++;sF(e(n,u)).subscribe(i=DD(r,(function(e){return r.next(t?t(n,e,u,o++):e)}),(function(){i=null,s()})))}),(function(){o=!0,s()})))}))}function xF(e){return new OD((function(t){return{unsubscribe:Ml(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t))}}))}var kF=c.createContext(void 0),_F=c.createContext(!1);function CF(e){var t=e.firebaseConfig,n=e.appName,r=e.suspense,i=c.useMemo((function(){if(e.firebaseApp)return e.firebaseApp;var r=Array.from($o.values()).find((function(e){return e.name===(n||"[DEFAULT]")}));if(r){if(t&&function(e,t){return e===t||[].concat(bn(Object.keys(e)),bn(Object.keys(t))).every((function(n){return e[n]===t[n]}))}(r.options,t))return r;throw new Error("Does not match the options already provided to the ".concat(n||"default"," firebase app instance, give this new instance a different appName."))}if(!t)throw new Error("No firebaseConfig provided");return ss("react",c.version||"unknown"),ss("reactfire","4.2.2"),as(t,n)}),[e.firebaseApp,t,n]);return c.createElement(kF.Provider,{value:i},c.createElement(_F.Provider,Object.assign({value:null!=r&&r},e)))}function EF(e){var t=c.useContext(_F);return void 0!==e?e:t}function SF(){var e=c.useContext(kF);if(!e)throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");return e}function TF(e){if((null==e?void 0:e.hasOwnProperty("requiredClaims"))&&(null==e?void 0:e.hasOwnProperty("validateCustomClaims")))throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');var t=iL(),n="auth:signInCheck:".concat(t.name,"::forceRefresh:").concat(!(null==e||!e.forceRefresh));null!=e&&e.forceRefresh&&(n="".concat(n,":forceRefresh:").concat(e.forceRefresh)),null!=e&&e.hasOwnProperty("requiredClaims")?n="".concat(n,":requiredClaims:").concat(JSON.stringify(e.requiredClaims)):null!=e&&e.hasOwnProperty("validateCustomClaims")&&(n="".concat(n,":validateCustomClaims:").concat(JSON.stringify(e.validateCustomClaims)));var r=xF(t).pipe(wF((function(t){var n;return t?e&&(e.hasOwnProperty("requiredClaims")||e.hasOwnProperty("validateCustomClaims"))?pF(t.getIdTokenResult(null!==(n=null==e?void 0:e.forceRefresh)&&void 0!==n&&n)).pipe(mF((function(n){var r;r=e.hasOwnProperty("requiredClaims")?function(e){return function(t){var n={};return Object.keys(e).forEach((function(r){e[r]!==t[r]&&(n[r]=[new sL("auth/missing-claim",'Expected "'.concat(e[r],'", but user has "').concat(t[r],'" instead'))])})),{hasRequiredClaims:0===Object.keys(n).length,errors:n}}}(e.requiredClaims):e.validateCustomClaims;var i=r(n.claims);return{signedIn:!0,hasRequiredClaims:i.hasRequiredClaims,errors:i.errors,user:t}}))):vF({signedIn:!0,hasRequiredClaims:!0,errors:{},user:t}):vF({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})})));return zF(n,r)}var IF,NF,AF;(AF=NF||(NF={})).added="child_added",AF.removed="child_removed",AF.changed="child_changed",AF.moved="child_moved",AF.value="value";Object.freeze(((IF={})[NF.added]=function(e,t,n,r){return hy(e,"child_added",t,n,r)},IF[NF.removed]=function(e,t,n,r){return hy(e,"child_removed",t,n,r)},IF[NF.changed]=function(e,t,n,r){return hy(e,"child_changed",t,n,r)},IF[NF.moved]=function(e,t,n,r){return hy(e,"child_moved",t,n,r)},IF[NF.value]=dy,IF));var jF=globalThis._reactFireDatabaseCachedQueries||[];globalThis._reactFireDatabaseCachedQueries||(globalThis._reactFireDatabaseCachedQueries=jF);var OF={includeMetadataChanges:!1};function PF(e,t){return void 0===t&&(t=OF),new OD((function(n){var i=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o,s,u;e=ho(e);var l={includeMetadataChanges:!1},c=0;"object"!=typeof n[c]||dj(n[c])||(l=n[c],c++);var f,h,d,p={includeMetadataChanges:l.includeMetadataChanges};if(dj(n[c])){var v=n[c];n[c]=null===(o=v.next)||void 0===o?void 0:o.bind(v),n[c+1]=null===(s=v.error)||void 0===s?void 0:s.bind(v),n[c+2]=null===(u=v.complete)||void 0===u?void 0:u.bind(v)}if(e instanceof YA)h=HA(e.firestore,pj),d=tC(e._key.path),f={next:function(t){n[c]&&n[c](rO(h,e,t))},error:n[c+1],complete:n[c+2]};else{var m=HA(e,QA);h=HA(m.firestore,pj),d=m._query;var y=new eO(h);f={next:function(e){n[c]&&n[c](new Xj(h,y,m,e))},error:n[c+1],complete:n[c+2]},Wj(e._query)}return function(e,t,n,i){var o=new JA(i),s=new eA(t,o,n);return e.asyncQueue.enqueueAndForget(a(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=GN,t.next=3,lj(e);case 3:return t.t1=t.sent,t.t2=s,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)})))),function(){o.bc(),e.asyncQueue.enqueueAndForget(a(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=QN,t.next=3,lj(e);case 3:return t.t1=t.sent,t.t2=s,t.abrupt("return",(0,t.t0)(t.t1,t.t2));case 6:case"end":return t.stop()}}),t)}))))}}(mj(h),d,p,f)}(e,t,{next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return{unsubscribe:i}}
2))}function RF(e){return PF(e,{includeMetadataChanges:!0})}function DF(e,t){return void 0===t&&(t={}),RF(e).pipe(mF((function(e){return FF(e,t)})))}function FF(e,t){void 0===t&&(t={});var n=e.data();return!e.exists()||"object"!=typeof n||null===n||t.idField&&(n[t.idField]=e.id),n}var LF=function(e){ha(n,e);var t=pa(n);function n(e,r){var i;return ua(this,n),(i=t.call(this))._timeoutWindow=r,i._hasValue=!1,i._error=void 0,i._firstEmission=new Promise((function(e){return i._resolveFirstEmission=e})),i._innerObservable=e.pipe(function(e,t,n){var r=oD(e)||t||n?{next:e,error:t,complete:n}:e;return r?RD((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var i=!0;e.subscribe(DD(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;i=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;i=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;i&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):AD}({next:function(e){i._next(e)},error:function(e){i._error=e,i._resolveFirstEmission()}}),yF((function(){return YD()})),bF(1)),i._warmupSubscription=i._innerObservable.subscribe(),i._timeoutHandler=setTimeout(i._reset.bind(fa(i)),i._timeoutWindow),i}return ca(n,[{key:"hasValue",get:function(){return this._hasValue||!!this._error}},{key:"value",get:function(){if(this._error)throw this._error;if(!this.hasValue)throw Error("Can only get value if SuspenseSubject has a value");return this._value}},{key:"firstEmission",get:function(){return this._firstEmission}},{key:"_next",value:function(e){this._hasValue=!0,this._value=e,this._resolveFirstEmission()}},{key:"_reset",value:function(){var e=this;this._warmupSubscription&&this._warmupSubscription.unsubscribe(),this._hasValue=!1,this._value=void 0,this._error=void 0,this._firstEmission=new Promise((function(t){return e._resolveFirstEmission=t}))}},{key:"_subscribe",value:function(e){return this._timeoutHandler&&clearTimeout(this._timeoutHandler),this._innerSubscriber=this._innerObservable.subscribe(e),this._innerSubscriber}},{key:"ourError",get:function(){return this._error}}]),n}(MD),MF=globalThis._reactFirePreloadedObservables||new Map;function VF(e,t){if(MF.has(t))return MF.get(t);var n=new LF(e,3e4);return MF.set(t,n),n}function BF(e){return function(t,n){var r=Object.assign(Object.assign({},t),{hasEmitted:t.hasEmitted||e.hasValue,error:e.ourError,firstValuePromise:e.firstEmission});switch(e.hasValue&&(r.data=e.value),n){case"value":return r.status="success",r;case"error":return r.status="error",r;case"complete":return r.isComplete=!0,r;default:throw new Error('invalid action "'.concat(n,'"'))}}}function zF(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)throw new Error("cannot call useObservable without an observableId");var i=VF(t,e),a=r.hasOwnProperty("initialData")||r.hasOwnProperty("startWithValue"),o=i.hasValue||a;if(!0===EF(r.suspense)&&!o)throw i.firstEmission;var s={status:o?"success":"loading",hasEmitted:o,isComplete:!1,data:i.hasValue?i.value:null!==(n=null==r?void 0:r.initialData)&&void 0!==n?n:null==r?void 0:r.startWithValue,error:i.ourError,firstValuePromise:i.firstEmission},l=c.useReducer(BF(i),s),f=u(l,2),h=f[0],d=f[1];return c.useEffect((function(){var e=i.subscribe({next:function(){d("value")},error:function(e){throw d("error"),e},complete:function(){d("complete")}});return function(){return e.unsubscribe()}}),[i]),h}globalThis._reactFirePreloadedObservables||(globalThis._reactFirePreloadedObservables=MF);var qF=globalThis._reactFireFirestoreQueryCache||[];globalThis._reactFireFirestoreQueryCache||(globalThis._reactFireFirestoreQueryCache=qF);var UF=c.createContext(void 0),HF=c.createContext(void 0),WF=c.createContext(void 0),KF=c.createContext(void 0),GF=c.createContext(void 0),YF=c.createContext(void 0),QF=c.createContext(void 0),$F=c.createContext(void 0),XF=c.createContext(void 0);function JF(e){return function(t){var n,r;if(!t.sdk)throw new Error("no sdk provided");var i=SF().name;if((null===(r=null===(n=null==t?void 0:t.sdk)||void 0===n?void 0:n.app)||void 0===r?void 0:r.name)!==i)throw new Error("sdk was initialized with a different firebase app");return c.createElement(e.Provider,Object.assign({value:t.sdk},t))}}function ZF(e){var t=c.useContext(e);if(!t)throw new Error("SDK not found. useSdk must be called from within a provider");return t}function eL(e,t,n,r){var i=SF();if(c.useContext(t))throw new Error("Cannot initialize SDK ".concat(e," because it already exists in Context"));var a=c.useMemo((function(){return n(i)}),[i]);return zF("firebase-sdk:".concat(e,":").concat(i.name),pF(a),r)}JF(UF);var tL=JF(HF),nL=(JF(WF),JF(KF),JF(GF)),rL=JF(YF),iL=(JF($F),JF(QF),JF(XF),function(){return ZF(HF)}),aL=function(){return ZF(GF)},oL=function(){return ZF(YF)},sL=function(e){ha(n,e);var t=pa(n);
2function n(e,r,i){var a;return ua(this,n),(a=t.call(this,r)).code=e,a.customData=i,a.name="ReactFireError",Object.setPrototypeOf(fa(a),n.prototype),a}return ca(n)}(sa(Error));function uL(e,t){if("idField"===t||"initialData"===t||"suspense"===t)return e?e[t]:void 0;throw new Error('Field "'.concat(t,'" is not a valid key in ReactFireOptions'))}function lL(e){return uL(e,"idField")}var cL=function(e){var t=e.label,n=void 0===t?"Loading":t;return(0,ne.jsxs)("div",{className:"flex flex-col items-center justify-center h-screen mb-4",children:[(0,ne.jsx)("div",{className:"flex items-center justify-center",children:(0,ne.jsx)("div",{className:"inline-block w-8 h-8 text-red-500 border-4 rounded-full spinner-border animate-spin",role:"status",children:(0,ne.jsx)("span",{className:"hidden",children:n})})}),(0,ne.jsxs)("p",{className:"text-xl text-black",children:[n,"..."]})]})};function fL(e){return nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"}}]}]})(e)}var hL=function(e){var t=e.isModalLogout,n=e.onClose,r=B(),i=iL();return t?(0,ne.jsx)("div",{className:"fixed z-50 inset-0 bg-black bg-opacity-25 backdrop-blur-sm flex justify-center items-center",id:"modalLogout",children:(0,ne.jsxs)("div",{className:"w-[90%] md:w-[40%] flex flex-col",children:[(0,ne.jsx)("button",{className:"text-white text-[30px] place-self-end",onClick:function(){return n()},children:"X"}),(0,ne.jsxs)("div",{className:"bg-white flex flex-col items-center text-center px-10 md:px-0 py-10 rounded-2xl",children:[(0,ne.jsx)(fL,{className:"mb-5 text-[105px] color-2"}),(0,ne.jsx)("h1",{className:"capitalize text-[25px] font-semibold pb-10",children:"are you sure you want to log out?"}),(0,ne.jsxs)("div",{className:"flex flex-col md:flex-row space-x-0 space-y-5 md:space-y-0 md:space-x-5",children:[(0,ne.jsxs)("button",{onClick:function(){return function(e){return e.signOut().then((function(){return r("/reviews")}))}(i)},className:"flex self-center items-center text-white bg-2 py-3 px-4 mx-1 text-[18px] font-bold rounded-lg",children:[(0,ne.jsx)("span",{className:"pr-3",children:(0,ne.jsx)(ln,{})}),"Sign Out"]}),(0,ne.jsxs)("button",{onClick:function(){return n()},className:"flex self-center items-center text-white bg-red-500 py-3 px-4 text-[18px] font-bold rounded-lg",children:[(0,ne.jsx)("span",{className:"pr-3",children:(0,ne.jsx)(_n,{})}),"Cancel"]})]})]})]})}):null},dL=n(1830),pL=n.n(dL),vL=n(3457),mL=n.n(vL),yL=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===gL}(e)}(e)};var gL="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function bL(e,t){return!1!==t.clone&&t.isMergeableObject(e)?xL(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function wL(e,t,n){return e.concat(t).map((function(e){return bL(e,n)}))}function xL(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||wL,n.isMergeableObject=n.isMergeableObject||yL;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=bL(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=xL(e[i],t[i],n):r[i]=bL(t[i],n)})),r}(e,t,n):bL(t,n)}xL.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return xL(e,n,t)}),{})};var kL=xL,_L="object"==typeof global&&global&&global.Object===Object&&global,CL="object"==typeof self&&self&&self.Object===Object&&self,EL=_L||CL||Function("return this")(),SL=EL.Symbol,TL=Object.prototype,IL=TL.hasOwnProperty,NL=TL.toString,AL=SL?SL.toStringTag:void 0;var jL=function(e){var t=IL.call(e,AL),n=e[AL];try{e[AL]=void 0;var r=!0}catch(AF){}var i=NL.call(e);return r&&(t?e[AL]=n:delete e[AL]),i}
vendor: 4,678 bytes, line 2
2,OL=Object.prototype.toString;var PL=function(e){return OL.call(e)},RL=SL?SL.toStringTag:void 0;var DL=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":RL&&RL in Object(e)?jL(e):PL(e)};var FL=function(e,t){return function(n){return e(t(n))}},LL=FL(Object.getPrototypeOf,Object);var ML=function(e){return null!=e&&"object"==typeof e},VL=Function.prototype,BL=Object.prototype,zL=VL.toString,qL=BL.hasOwnProperty,UL=zL.call(Object);var HL=function(e){if(!ML(e)||"[object Object]"!=DL(e))return!1;var t=LL(e);if(null===t)return!0;var n=qL.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&zL.call(n)==UL};var WL=function(){this.__data__=[],this.size=0};var KL=function(e,t){return e===t||e!==e&&t!==t};var GL=function(e,t){for(var n=e.length;n--;)if(KL(e[n][0],t))return n;return-1},YL=Array.prototype.splice;var QL=function(e){var t=this.__data__,n=GL(t,e);return!(n<0)&&(n==t.length-1?t.pop():YL.call(t,n,1),--this.size,!0)};var $L=function(e){var t=this.__data__,n=GL(t,e);return n<0?void 0:t[n][1]};var XL=function(e){return GL(this.__data__,e)>-1};var JL=function(e,t){var n=this.__data__,r=GL(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function ZL(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ZL.prototype.clear=WL,ZL.prototype.delete=QL,ZL.prototype.get=$L,ZL.prototype.has=XL,ZL.prototype.set=JL;var eM=ZL;var tM=function(){this.__data__=new eM,this.size=0};var nM=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var rM=function(e){return this.__data__.get(e)};var iM=function(e){return this.__data__.has(e)};var aM=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var oM=function(e){if(!aM(e))return!1;var t=DL(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},sM=EL["__core-js_shared__"],uM=function(){var e=/[^.]+$/.exec(sM&&sM.keys&&sM.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var lM=function(e){return!!uM&&uM in e},cM=Function.prototype.toString;var fM=function(e){if(null!=e){try{return cM.call(e)}catch(AF){}try{return e+""}catch(AF){}}return""},hM=/^\[object .+?Constructor\]$/,dM=Function.prototype,pM=Object.prototype,vM=dM.toString,mM=pM.hasOwnProperty,yM=RegExp("^"+vM.call(mM).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var gM=function(e){return!(!aM(e)||lM(e))&&(oM(e)?yM:hM).test(fM(e))};var bM=function(e,t){return null==e?void 0:e[t]};var wM=function(e,t){var n=bM(e,t);return gM(n)?n:void 0},xM=wM(EL,"Map"),kM=wM(Object,"create");var _M=function(){this.__data__=kM?kM(null):{},this.size=0};var CM=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},EM=Object.prototype.hasOwnProperty;var SM=function(e){var t=this.__data__;if(kM){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return EM.call(t,e)?t[e]:void 0},TM=Object.prototype.hasOwnProperty;var IM=function(e){var t=this.__data__;return kM?void 0!==t[e]:TM.call(t,e)};var NM=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kM&&void 0===t?"__lodash_hash_undefined__":t,this};function AM(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}AM.prototype.clear=_M,AM.prototype.delete=CM,AM.prototype.get=SM,AM.prototype.has=IM,AM.prototype.set=NM;var jM=AM;var OM=function(){this.size=0,this.__data__={hash:new jM,map:new(xM||eM),string:new jM}};var PM=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var RM=function(e,t){var n=e.__data__;return PM(t)?n["string"==typeof t?"string":"hash"]:n.map};var DM=function(e){var t=RM(this,e).delete(e);return this.size-=t?1:0,t};var FM=function(e){return RM(this,e).get(e)};var LM=function(e){return RM(this,e).has(e)};var MM=function(e,t){var n=RM(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function VM(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}VM.prototype.clear=OM,VM.prototype.delete=DM,VM.prototype.get=FM,VM.prototype.has=LM,VM.prototype.set=MM;var BM=VM;var zM=function(e,t){var n=this.__data__;if(n instanceof eM){var r=n.__data__;if(!xM||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new BM(r)}return n.set(e,t),this.size=n.size,this};function qM(e){var t=this.__data__=new eM(e);this.size=t.size}qM.prototype.clear=tM,qM.prototype.delete=nM,qM.prototype.get=rM,qM.prototype.has=iM,qM.prototype.set=zM;var UM=qM;var HM=function(e,t){for(var n=-1,r=null==e?0:e.length;
2++n<r&&!1!==t(e[n],n,e););return e},WM=function(){try{var e=wM(Object,"defineProperty");return e({},"",{}),e}catch(AF){}}();var KM=function(e,t,n){"__proto__"==t&&WM?WM(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},GM=Object.prototype.hasOwnProperty;var YM=function(e,t,n){var r=e[t];GM.call(e,t)&&KL(r,n)&&(void 0!==n||t in e)||KM(e,t,n)};var QM=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),i?KM(n,s,u):YM(n,s,u)}return n};var $M=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var XM=function(e){return ML(e)&&"[object Arguments]"==DL(e)},JM=Object.prototype,ZM=JM.hasOwnProperty,eV=JM.propertyIsEnumerable,tV=XM(function(){return arguments}())?XM:function(e){return ML(e)&&ZM.call(e,"callee")&&!eV.call(e,"callee")},nV=tV,rV=Array.isArray;var iV=function(){return!1},aV="object"==typeof exports&&exports&&!exports.nodeType&&exports,oV=aV&&"object"==typeof module&&module&&!module.nodeType&&module,sV=oV&&oV.exports===aV?EL.Buffer:void 0,uV=(sV?sV.isBuffer:void 0)||iV,lV=/^(?:0|[1-9]\d*)$/;var cV=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&lV.test(e))&&e>-1&&e%1==0&&e<t};var fV=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},hV={};hV["[object Float32Array]"]=hV["[object Float64Array]"]=hV["[object Int8Array]"]=hV["[object Int16Array]"]=hV["[object Int32Array]"]=hV["[object Uint8Array]"]=hV["[object Uint8ClampedArray]"]=hV["[object Uint16Array]"]=hV["[object Uint32Array]"]=!0,hV["[object Arguments]"]=hV["[object Array]"]=hV["[object ArrayBuffer]"]=hV["[object Boolean]"]=hV["[object DataView]"]=hV["[object Date]"]=hV["[object Error]"]=hV["[object Function]"]=hV["[object Map]"]=hV["[object Number]"]=hV["[object Object]"]=hV["[object RegExp]"]=hV["[object Set]"]=hV["[object String]"]=hV["[object WeakMap]"]=!1;var dV=function(e){return ML(e)&&fV(e.length)&&!!hV[DL(e)]};var pV=function(e){return function(t){return e(t)}},vV="object"==typeof exports&&exports&&!exports.nodeType&&exports,mV=vV&&"object"==typeof module&&module&&!module.nodeType&&module,yV=mV&&mV.exports===vV&&_L.process,gV=function(){try{var e=mV&&mV.require&&mV.require("util").types;return e||yV&&yV.binding&&yV.binding("util")}catch(AF){}}(),bV=gV&&gV.isTypedArray,wV=bV?pV(bV):dV,xV=Object.prototype.hasOwnProperty;var kV=function(e,t){var n=rV(e),r=!n&&nV(e),i=!n&&!r&&uV(e),a=!n&&!r&&!i&&wV(e),o=n||r||i||a,s=o?$M(e.length,String):[],u=s.length;for(var l in e)!t&&!xV.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||cV(l,u))||s.push(l);return s},_V=Object.prototype;var CV=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_V)},EV=FL(Object.keys,Object),SV=Object.prototype.hasOwnProperty;var TV=function(e){if(!CV(e))return EV(e);var t=[];for(var n in Object(e))SV.call(e,n)&&"constructor"!=n&&t.push(n);return t};var IV=function(e){return null!=e&&fV(e.length)&&!oM(e)};var NV=function(e){return IV(e)?kV(e):TV(e)};var AV=function(e,t){return e&&QM(t,NV(t),e)};var jV=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},OV=Object.prototype.hasOwnProperty;var PV=function(e){if(!aM(e))return jV(e);var t=CV(e),n=[];for(var r in e)("constructor"!=r||!t&&OV.call(e,r))&&n.push(r);return n};var RV=function(e){return IV(e)?kV(e,!0):PV(e)};var DV=function(e,t){return e&&QM(t,RV(t),e)},FV="object"==typeof exports&&exports&&!exports.nodeType&&exports,LV=FV&&"object"==typeof module&&module&&!module.nodeType&&module,MV=LV&&LV.exports===FV?EL.Buffer:void 0,VV=MV?MV.allocUnsafe:void 0;var BV=function(e,t){if(t)return e.slice();var n=e.length,r=VV?VV(n):new e.constructor(n);return e.copy(r),r};var zV=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var qV=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a};var UV=function(){return[]},HV=Object.prototype.propertyIsEnumerable,WV=Object.getOwnPropertySymbols,KV=WV?function(e){return null==e?[]:(e=Object(e),qV(WV(e),(function(t){return HV.call(e,t)})))}:UV,GV=KV;var YV=function(e,t){return QM(e,GV(e),t)};var QV=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},$V=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)QV(t,GV(e)),e=LL(e);return t}:UV,XV=$V;var JV=function(e,t){return QM(e,XV(e),t)};var ZV=function(e,t,n){var r=t(e);return rV(e)?r:QV(r,n(e))};var eB=function(e){return ZV(e,NV,GV)};var tB=function(e){return ZV(e,RV,XV)},nB=wM(EL,"DataView"),rB=wM(EL,"Promise"),iB=wM(EL,"Set"),aB=wM(EL,"WeakMap"),oB="[object Map]",sB="[object Promise]",uB="[object Set]",lB="[object WeakMap]",cB="[object DataView]",fB=fM(nB),hB=fM(x
2M),dB=fM(rB),pB=fM(iB),vB=fM(aB),mB=DL;(nB&&mB(new nB(new ArrayBuffer(1)))!=cB||xM&&mB(new xM)!=oB||rB&&mB(rB.resolve())!=sB||iB&&mB(new iB)!=uB||aB&&mB(new aB)!=lB)&&(mB=function(e){var t=DL(e),n="[object Object]"==t?e.constructor:void 0,r=n?fM(n):"";if(r)switch(r){case fB:return cB;case hB:return oB;case dB:return sB;case pB:return uB;case vB:return lB}return t});var yB=mB,gB=Object.prototype.hasOwnProperty;var bB=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&gB.call(e,"index")&&(n.index=e.index,n.input=e.input),n},wB=EL.Uint8Array;var xB=function(e){var t=new e.constructor(e.byteLength);return new wB(t).set(new wB(e)),t};var kB=function(e,t){var n=t?xB(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},_B=/\w*$/;var CB=function(e){var t=new e.constructor(e.source,_B.exec(e));return t.lastIndex=e.lastIndex,t},EB=SL?SL.prototype:void 0,SB=EB?EB.valueOf:void 0;var TB=function(e){return SB?Object(SB.call(e)):{}};var IB=function(e,t){var n=t?xB(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var NB=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return xB(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return kB(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return IB(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return CB(e);case"[object Symbol]":return TB(e)}},AB=Object.create,jB=function(){function e(){}return function(t){if(!aM(t))return{};if(AB)return AB(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),OB=jB;var PB=function(e){return"function"!=typeof e.constructor||CV(e)?{}:OB(LL(e))};var RB=function(e){return ML(e)&&"[object Map]"==yB(e)},DB=gV&&gV.isMap,FB=DB?pV(DB):RB;var LB=function(e){return ML(e)&&"[object Set]"==yB(e)},MB=gV&&gV.isSet,VB=MB?pV(MB):LB,BB="[object Arguments]",zB="[object Function]",qB="[object Object]",UB={};UB[BB]=UB["[object Array]"]=UB["[object ArrayBuffer]"]=UB["[object DataView]"]=UB["[object Boolean]"]=UB["[object Date]"]=UB["[object Float32Array]"]=UB["[object Float64Array]"]=UB["[object Int8Array]"]=UB["[object Int16Array]"]=UB["[object Int32Array]"]=UB["[object Map]"]=UB["[object Number]"]=UB["[object Object]"]=UB["[object RegExp]"]=UB["[object Set]"]=UB["[object String]"]=UB["[object Symbol]"]=UB["[object Uint8Array]"]=UB["[object Uint8ClampedArray]"]=UB["[object Uint16Array]"]=UB["[object Uint32Array]"]=!0,UB["[object Error]"]=UB[zB]=UB["[object WeakMap]"]=!1;var HB=function e(t,n,r,i,a,o){var s,u=1&n,l=2&n,c=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!aM(t))return t;var f=rV(t);if(f){if(s=bB(t),!u)return zV(t,s)}else{var h=yB(t),d=h==zB||"[object GeneratorFunction]"==h;if(uV(t))return BV(t,u);if(h==qB||h==BB||d&&!a){if(s=l||d?{}:PB(t),!u)return l?JV(t,DV(s,t)):YV(t,AV(s,t))}else{if(!UB[h])return a?t:{};s=NB(t,h,u)}}o||(o=new UM);var p=o.get(t);if(p)return p;o.set(t,s),VB(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):FB(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var v=f?void 0:(c?l?tB:eB:l?RV:NV)(t);return HM(v||t,(function(i,a){v&&(i=t[a=i]),YM(s,a,e(i,n,r,a,t,o))})),s};var WB=function(e){return HB(e,4)};var KB=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var GB=function(e){return"symbol"==typeof e||ML(e)&&"[object Symbol]"==DL(e)};function YB(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(YB.Cache||BM),n}YB.Cache=BM;var QB=YB;var $B=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XB=/\\(\\)?/g,JB=function(e){var t=QB(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace($B,(function(e,n,r,i){t.push(r?i.replace(XB,"$1"):n||e)})),t})),ZB=JB;var ez=function(e){if("string"==typeof e||GB(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},tz=SL?SL.prototype:void 0,nz=tz?tz.toString:void 0;var rz=function e(t){if("string"==typeof t)return t;if(rV(t))return KB(t,e)+"";if(GB(t))return nz?nz.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};var iz=function(e){return null==e?"":rz(e)};var az=function(e){return rV(e)?KB(e,ez):GB(e)?[e]:zV(ZB(iz(e)))};var oz=function(e,t){};n(2110);var sz=function(e){return HB(e,5)};function uz(){return uz=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},uz.apply(this,arguments)}function lz(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function cz(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function fz(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hz=function(e){return Array.isArray(e)&&0===e.length},dz=function(e){return"function"===typeof e},pz=function(e){return null!==e&&"object"===typeof e},vz=function(e){return String(Math.floor(Number(e)))===e},mz=function(e){return"[object String]"===Object.prototype.toString.call(e)},yz=function(e){return 0===c.Children.count(e)},gz=function(e){return pz(e)&&dz(e.then)};function bz(e,t,n,r){void 0===r&&(r=0);for(var i=az(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function wz(e,t,n){for(var r=WB(e),i=r,a=0,o=az(t);a<o.length-1;a++){var s=o[a],u=bz(e,o.slice(0,a+1));if(u&&(pz(u)||Array.isArray(u)))i=i[s]=WB(u);else{var l=o[a+1];i=i[s]=vz(l)&&Number(l)>=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function xz(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];pz(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},xz(s,t,n,r[o])):r[o]=t}return r}var kz=(0,c.createContext)(void 0);kz.displayName="FormikContext";var _z=kz.Provider;kz.Consumer;function Cz(){var e=(0,c.useContext)(kz);return e||oz(!1),e}function Ez(e,t){switch(t.type){case"SET_VALUES":return uz({},e,{values:t.payload});case"SET_TOUCHED":return uz({},e,{touched:t.payload});case"SET_ERRORS":return mL()(e.errors,t.payload)?e:uz({},e,{errors:t.payload});case"SET_STATUS":return uz({},e,{status:t.payload});case"SET_ISSUBMITTING":return uz({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return uz({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return uz({},e,{values:wz(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return uz({},e,{touched:wz(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return uz({},e,{errors:wz(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return uz({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return uz({},e,{touched:xz(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return uz({},e,{isSubmitting:!1});default:return e}}var Sz={},Tz={};function Iz(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,a=e.validateOnMount,o=void 0!==a&&a,s=e.isInitialValid,u=e.enableReinitialize,l=void 0!==u&&u,f=e.onSubmit,h=cz(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=uz({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},h),p=(0,c.useRef)(d.initialValues),v=(0,c.useRef)(d.initialErrors||Sz),m=(0,c.useRef)(d.initialTouched||Tz),y=(0,c.useRef)(d.initialStatus),g=(0,c.useRef)(!1),b=(0,c.useRef)({});(0,c.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]);var w=(0,c.useReducer)(Ez,{values:d.initialValues,errors:d.initialErrors||Sz,touched:d.initialTouched||Tz,status:d.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),x=w[0],k=w[1],_=(0,c.useCallback)((function(e,t){return new Promise((function(n,r){var i=d.validate(e,t);null==i?n(Sz):gz(i)?i.then((function(e){n(e||Sz)}),(function(e){r(e)})):n(i)}))}),[d.validate]),C=(0,c.useCallback)((function(e,t){var n=d.validationSchema,r=
2dz(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var i=Az(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){i.then((function(){e(Sz)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return wz(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var o=a;bz(t,o.path)||(t=wz(t,o.path,o.message))}}return t}(n)):t(n)}))}))}),[d.validationSchema]),E=(0,c.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),S=(0,c.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return dz(b.current[e].validate)})),n=t.length>0?t.map((function(t){return E(t,bz(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=wz(e,t[r],n)),e}),{})}))}),[E]),T=(0,c.useCallback)((function(e){return Promise.all([S(e),d.validationSchema?C(e):{},d.validate?_(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return kL.all([t,n,r],{arrayMerge:jz})}))}),[d.validate,d.validationSchema,S,_,C]),I=Pz((function(e){return void 0===e&&(e=x.values),k({type:"SET_ISVALIDATING",payload:!0}),T(e).then((function(e){return g.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:e})),e}))}));(0,c.useEffect)((function(){o&&!0===g.current&&mL()(p.current,d.initialValues)&&I(p.current)}),[o,I]);var N=(0,c.useCallback)((function(e){var t=e&&e.values?e.values:p.current,n=e&&e.errors?e.errors:v.current?v.current:d.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:d.initialTouched||{},i=e&&e.status?e.status:y.current?y.current:d.initialStatus;p.current=t,v.current=n,m.current=r,y.current=i;var a=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(d.onReset){var o=d.onReset(x.values,Y);gz(o)?o.then(a):a()}else a()}),[d.initialErrors,d.initialStatus,d.initialTouched]);(0,c.useEffect)((function(){!0!==g.current||mL()(p.current,d.initialValues)||(l&&(p.current=d.initialValues,N()),o&&I(p.current))}),[l,d.initialValues,N,o,I]),(0,c.useEffect)((function(){l&&!0===g.current&&!mL()(v.current,d.initialErrors)&&(v.current=d.initialErrors||Sz,k({type:"SET_ERRORS",payload:d.initialErrors||Sz}))}),[l,d.initialErrors]),(0,c.useEffect)((function(){l&&!0===g.current&&!mL()(m.current,d.initialTouched)&&(m.current=d.initialTouched||Tz,k({type:"SET_TOUCHED",payload:d.initialTouched||Tz}))}),[l,d.initialTouched]),(0,c.useEffect)((function(){l&&!0===g.current&&!mL()(y.current,d.initialStatus)&&(y.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))}),[l,d.initialStatus,d.initialTouched]);var A=Pz((function(e){if(b.current[e]&&dz(b.current[e].validate)){var t=bz(x.values,e),n=b.current[e].validate(t);return gz(n)?(k({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),k({type:"SET_ISVALIDATING",payload:!1})}))):(k({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return d.validationSchema?(k({type:"SET_ISVALIDATING",payload:!0}),C(x.values,e).then((function(e){return e})).then((function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),k({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),j=(0,c.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),O=(0,c.useCallback)((function(e){delete b.current[e]}),[]),P=Pz((function(e,t){return k({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?I(x.values):Promise.resolve()})),R=(0,c.useCallback)((function(e){k({type:"SET_ERRORS",payload:e})}),[]),D=Pz((function(e,t){var r=dz(e)?e(x.values):e;return k({type:"SET_VALUES",payload:r}
2),(void 0===t?n:t)?I(r):Promise.resolve()})),F=(0,c.useCallback)((function(e,t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),L=Pz((function(e,t,r){return k({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?I(wz(x.values,e,t)):Promise.resolve()})),M=(0,c.useCallback)((function(e,t){var n,r=t,i=e;if(!mz(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,s=a.name,u=a.id,l=a.value,c=a.checked,f=(a.outerHTML,a.options),h=a.multiple;r=t||(s||u),i=/number|range/.test(o)?(n=parseFloat(l),isNaN(n)?"":n):/checkbox/.test(o)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,i=(a=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!i)return r.concat(n);if(!i)return r;return r.slice(0,a).concat(r.slice(a+1))}(bz(x.values,r),c,l):f&&h?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):l}r&&L(r,i)}),[L,x.values]),V=Pz((function(e){if(mz(e))return function(t){return M(t,e)};M(e)})),B=Pz((function(e,t,n){return void 0===t&&(t=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?I(x.values):Promise.resolve()})),z=(0,c.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,a=(n.outerHTML,t||(r||i));B(a,!0)}),[B]),q=Pz((function(e){if(mz(e))return function(t){return z(t,e)};z(e)})),U=(0,c.useCallback)((function(e){dz(e)?k({type:"SET_FORMIK_STATE",payload:e}):k({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),H=(0,c.useCallback)((function(e){k({type:"SET_STATUS",payload:e})}),[]),W=(0,c.useCallback)((function(e){k({type:"SET_ISSUBMITTING",payload:e})}),[]),K=Pz((function(){return k({type:"SUBMIT_ATTEMPT"}),I().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Q()))return}catch(ch){throw ch}return Promise.resolve(n).then((function(e){return g.current&&k({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(g.current)throw k({type:"SUBMIT_FAILURE"}),e}))}if(g.current&&(k({type:"SUBMIT_FAILURE"}),t))throw e}))})),G=Pz((function(e){e&&e.preventDefault&&dz(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&dz(e.stopPropagation)&&e.stopPropagation(),K().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Y={resetForm:N,validateForm:I,validateField:A,setErrors:R,setFieldError:F,setFieldTouched:B,setFieldValue:L,setStatus:H,setSubmitting:W,setTouched:P,setValues:D,setFormikState:U,submitForm:K},Q=Pz((function(){return f(x.values,Y)})),$=Pz((function(e){e&&e.preventDefault&&dz(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&dz(e.stopPropagation)&&e.stopPropagation(),N()})),X=(0,c.useCallback)((function(e){return{value:bz(x.values,e),error:bz(x.errors,e),touched:!!bz(x.touched,e),initialValue:bz(p.current,e),initialTouched:!!bz(m.current,e),initialError:bz(v.current,e)}}),[x.errors,x.touched,x.values]),J=(0,c.useCallback)((function(e){return{setValue:function(t,n){return L(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return F(e,t)}}}),[L,B,F]),Z=(0,c.useCallback)((function(e){var t=pz(e),n=t?e.name:e,r=bz(x.values,n),i={name:n,value:r,onChange:V,onBlur:q};if(t){var a=e.type,o=e.value,s=e.as,u=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&u&&(i.value=i.value||[],i.multiple=!0)}return i}),[q,V,x.values]),ee=(0,c.useMemo)((function(){return!mL()(p.current,x.values)}),[p.current,x.values]),te=(0,c.useMemo)((function(){return"undefined"!==typeof s?ee?x.errors&&0===Object.keys(x.errors).length:!1!==s&&dz(s)?s(d):s:x.errors&&0===Object.keys(x.errors).length}),[s,ee,x.errors,d]);return uz({},x,{initialValues:p.current,initialErrors:v.current,initialTouched:m.current,initialStatus:y.current,handleBlur:q,handleChange:V,handleReset:$,handleSubmit:G,resetForm:N,setErrors:R,setFormikState:U,setFieldTouched:B,setFieldValue:L,setFieldError:F,setStatus:H,setSubmitting:W,setTouched:P,setValues:D,submitForm:K,validateForm:I,val
2idateField:A,isValid:te,dirty:ee,unregisterField:O,registerField:j,getFieldProps:Z,getFieldMeta:X,getFieldHelpers:J,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function Nz(e){var t=Iz(e),n=e.component,r=e.children,i=e.render,a=e.innerRef;return(0,c.useImperativeHandle)(a,(function(){return t})),(0,c.createElement)(_z,{value:t},n?(0,c.createElement)(n,t):i?i(t):r?dz(r)?r(t):yz(r)?null:c.Children.only(r):null)}function Az(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||HL(e)?Az(e):""!==e?e:void 0})):HL(e[r])?t[r]=Az(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function jz(e,t,n){var r=e.slice();return t.forEach((function(t,i){if("undefined"===typeof r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?kL(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=kL(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Oz="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?c.useLayoutEffect:c.useEffect;function Pz(e){var t=(0,c.useRef)(e);return Oz((function(){t.current=e})),(0,c.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}function Rz(e){var t=e.validate,n=e.name,r=e.render,i=e.children,a=e.as,o=e.component,s=cz(e,["validate","name","render","children","as","component"]),u=cz(Cz(),["validate","validationSchema"]);var l=u.registerField,f=u.unregisterField;(0,c.useEffect)((function(){return l(n,{validate:t}),function(){f(n)}}),[l,f,n,t]);var h=u.getFieldProps(uz({name:n},s)),d=u.getFieldMeta(n),p={field:h,form:u};if(r)return r(uz({},p,{meta:d}));if(dz(i))return i(uz({},p,{meta:d}));if(o){if("string"===typeof o){var v=s.innerRef,m=cz(s,["innerRef"]);return(0,c.createElement)(o,uz({ref:v},h,m),i)}return(0,c.createElement)(o,uz({field:h,form:u},s),i)}var y=a||"input";if("string"===typeof y){var g=s.innerRef,b=cz(s,["innerRef"]);return(0,c.createElement)(y,uz({ref:g},h,b),i)}return(0,c.createElement)(y,uz({},h,s),i)}var Dz=(0,c.forwardRef)((function(e,t){var n=e.action,r=cz(e,["action"]),i=null!=n?n:"#",a=Cz(),o=a.handleReset,s=a.handleSubmit;return(0,c.createElement)("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))}));Dz.displayName="Form";var Fz=function(e,t,n){var r=Lz(e);return r.splice(t,0,n),r},Lz=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(uz({},e,{length:t+1}))}return[]},Mz=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)((function(n){var i="function"===typeof r?r:e,o="function"===typeof t?t:e,s=wz(n.values,a,e(bz(n.values,a))),u=r?i(bz(n.errors,a)):void 0,l=t?o(bz(n.touched,a)):void 0;return hz(u)&&(u=void 0),hz(l)&&(l=void 0),uz({},n,{values:s,errors:r?wz(n.errors,a,u):n.errors,touched:t?wz(n.touched,a,l):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(Lz(t),[sz(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Lz(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Lz(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return Fz(n,e,t)}),(function(t){return Fz(t,e,null)}),(function(t){return Fz(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Lz(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(fz(n)),n.pop=n.pop.bind(fz(n)),n}lz(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!mL()(bz(e.formik.values,e.name),bz(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?Lz(n):[];return t||(t=r[e]),dz(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=uz({},e,{form:cz(t.formik,["validate","validationSchema"]),name:a});return n?(0,c.createElement)(n,o):r?r(o):i?"function"===typeof i?i(o):yz(i)?null:c.Children.only(i):null},t}(c.Component);Mz.defaultProps={validateOnChange:!0};c.Component,c.Component;var Vz=n(2758),Bz=n(1564),zz=n(6514),qz=n.n(zz),Uz=Object.prototype.toString,Hz=Error.prototype.toString,Wz=RegExp.prototype.toString,Kz="undefined"!==typeof Symbol?Symbol.prototype.toString:function(){return""},Gz=/^Symbol\((.*)\)(.*)$/;function Yz(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}function Qz(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||!0===e||!1===e)return""+e;var n=typeof e;if("number"===n)return Yz(e);if("string"===n)return t?'"'.concat(e,'"'):e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Kz.call(e).replace(Gz,"Symbol($1)");var r=Uz.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Hz.call(e)+"]":"RegExp"===r?Wz.call(e):null}function $z(e,t){var n=Qz(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){var r=Qz(this[e],t);return null!==r?r:n}),2)}function Xz(e){return null==e?[]:[].concat(e)}var Jz=/\$\{\s*(\w+)\s*\}/g,Zz=function(e){ha(n,e);var t=pa(n);function n(e,r,i,a){var o;return ua(this,n),(o=t.call(this)).value=void 0,o.path=void 0,o.type=void 0,o.errors=void 0,o.params=void 0,o.inner=void 0,o.name="ValidationError",o.value=r,o.path=i,o.type=a,o.errors=[],o.inner=[],Xz(e).forEach((function(e){var t;n.isError(e)?((t=o.errors).push.apply(t,bn(e.errors)),o.inner=o.inner.concat(e.inner.length?e.inner:e)):o.errors.push(e)})),o.message=o.errors.length>1?"".concat(o.errors.length," errors occurred"):o.errors[0],Error.captureStackTrace&&Error.captureStackTrace(fa(o),n),o}return ca(n,null,[{key:"formatError",value:function(e,t){var n=t.label||t.path||"this";return n!==t.path&&(t=Object.assign({},t,{path:n})),"string"===typeof e?e.replace(Jz,(function(e,n){return $z(t[n])})):"function"===typeof e?e(t):e}},{key:"isError",value:function(e){return e&&"ValidationError"===e.name}}]),n}(sa(Error)),eq={default:"${path}
2 is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(e){var t=e.path,n=e.type,r=e.value,i=e.originalValue,a=null!=i&&i!==r?" (cast from the value `".concat($z(i,!0),"`)."):".";return"mixed"!==n?"".concat(t," must be a `").concat(n,"` type, ")+"but the final value was: `".concat($z(r,!0),"`")+a:"".concat(t," must match the configured type. ")+"The validated value was: `".concat($z(r,!0),"`")+a}},tq={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},nq={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},rq={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},iq={isValue:"${path} field must be ${value}"},aq={noUnknown:"${path} field has unspecified keys: ${unknown}"},oq={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},sq=function(e){var t=e.path,n=e.value,r=e.spec.types.length;if(Array.isArray(n)){if(n.length<r)return"".concat(t," tuple value has too few items, expected a length of ").concat(r," but got ").concat(n.length," for value: `").concat($z(n,!0),"`");if(n.length>r)return"".concat(t," tuple value has too many items, expected a length of ").concat(r," but got ").concat(n.length," for value: `").concat($z(n,!0),"`")}return Zz.formatError(eq.notType,e)},uq=(Object.assign(Object.create(null),{mixed:eq,string:tq,number:nq,date:rq,object:aq,array:oq,boolean:iq}),function(e){return e&&e.__isYupSchema__}),lq=function(){function e(t,n){ua(this,e),this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}return ca(e,[{key:"resolve",value:function(e,t){var n=this.refs.map((function(e){return e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)})),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!uq(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}],[{key:"fromOptions",value:function(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var r=n.is,i=n.then,a=n.otherwise,o="function"===typeof r?r:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every((function(e){return e===r}))};return new e(t,(function(e,t){var n,r=o.apply(void 0,bn(e))?i:a;return null!=(n=null==r?void 0:r(t))?n:t}))}}]),e}(),cq="$",fq=".";var hq=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ua(this,e),this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!==typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===cq,this.isValue=this.key[0]===fq,this.isSibling=!this.isContext&&!this.isValue;var r=this.isContext?cq:this.isValue?fq:"";this.path=this.key.slice(r.length),this.getter=this.path&&(0,Vz.getter)(this.path,!0),this.map=n.map}return ca(e,[{key:"getValue",value:function(e,t,n){var r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}},{key:"cast",value:function(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}},{key:"resolve",value:function(){return this}},{key:"describe",value:function(){return{type:"ref",key:this.key}}},{key:"toString",value:function(){return"Ref(".concat(this.key,")")}}],[{key:"isRef",value:function(e){return e&&e.__isYupRef}}]),e}();hq.prototype.__isYupRef=!0;var dq=function(e){return null==e};function pq(e){function t(t,n,r){var i=t.value,a=t.path,o=void 0===a?"":a,s=t.options,u=t.originalValue,l=t.schema,c=e.name,f=e.test,h=e.params,d=e.message,p=e.skipAbsent,v=s.parent,m=s.context,y=s.abortEarly;function g(e){return hq.isRef(e)?e.getValue(i,v,m):e}function b(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({value:i,originalValue:u,label:l.spec.label,path:e.path||o,spec:l.spec},h,e.params),n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];t[a]=g(t[a])}var s=new Zz(Zz.formatError(e.message||d,t),i,t.path,e.type||c);return s.params=t,s}var w=(void 0===y?l.spec.abortEarly:y)?n:r,x={path:o,parent:v,type:c,from:s.from,createError:b,resolve:g,options:s,originalValue:u,schema:l},k=function(e){Zz.isError(e)?w(e):e?r(null):w(b())},_=function(e){Zz.isError(e)?w(e):n(e)},C=p&&dq(i);if(s.sync){var E;try{var S;if("function"===typeof(null==(S=E=!!C||f.call(x,i,x))?void 0:S.then))throw new Error('Validation test of type: "'.concat(x.type,'" returned a Promise during a synchronous validate. ')+"This test will finish after the validate call has returned")}catch(T){return void _(T)}k(E)}else try{Promise.resolve(!!C||f.call(x,i,x)).then(k,_)}catch(T){_(T)}}return t.OPTIONS=e,t}function vq(e,t,n){var r,i,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return t?((0,Vz.forEach)(t,(function(s,u,l){var c=u?s.slice(1,s.length-1):s,f="tuple"===(e=e.resolve({context:o,parent:r,value:n})).type,h=l?parseInt(c,10):0;if(e.innerType||f){if(f&&!l)throw new Error('Yup.reach cannot implicitly index into a tuple type. the path part "'.concat(a,'" must contain an index to the tuple element, e.g. "').concat(a,'[0]"'));if(n&&h>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: ".concat(s,", in the path: ").concat(t,". ")+"because there is no value at that index. ");r=n,n=n&&n[h],e=f?e.spec.types[h]:e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error("The schema does not contain the path: ".concat(t,". ")+"(failed at: ".concat(a,' which is a type: "').concat(e.type,'")'));r=n,n=n&&n[c],e=e.fields[c]}i=c,a=u?"["+s+"]":"."+s})),{schema:e,parent:r,parentPath:i}):{parent:r,parentPath:t,schema:e}}var mq=function(e){ha(n,e);var t=pa(n);function n(){return ua(this,n),t.apply(this,arguments)}return ca(n,[{key:"describe",value:function(){var e,t=[],n=ya(this.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(hq.isRef(r)?r.describe():r)}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"resolveAll",value:function(e){var t,n=[],r=ya(this.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n.push(e(i))}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"clone",value:function(){return new n(this.values())}},{key:"merge",value:function(e,t){var n=this.clone();return e.forEach((function(e){return n.add(e)})),t.forEach((function(e){return n.delete(e)})),n}}]),n}(sa(Set));function yq(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;if(uq(e)||!e||"object"!==typeof e)return e;if(n.has(e))return n.get(e);if(e instanceof Date)t=new Date(e.getTime()),n.set(e,t);else if(e instanceof RegExp)t=new RegExp(e),n.set(e,t);else if(Array.isArray(e)){t=new Array(e.length),n.set(e,t);for(var r=0;r<e.length;r++)t[r]=yq(e[r],n)}else if(e instanceof Map){t=new Map,n.set(e,t);var i,a=ya(e.entries());try{for(a.s();!(i=a.n()).done;){var o=u(i.value,2),s=o[0],l=o[1];t.set(s,yq(l,n))}}catch(g){a.e(g)}finally{a.f()}}else if(e instanceof Set){t=new Set,n.set(e,t);var c,f=ya(e);try{for(f.s();!(c=f.n()).done;){var h=c.value;
2t.add(yq(h,n))}}catch(g){f.e(g)}finally{f.f()}}else{if(!(e instanceof Object))throw Error("Unable to clone ".concat(e));t={},n.set(e,t);for(var d=0,p=Object.entries(e);d<p.length;d++){var v=u(p[d],2),m=v[0],y=v[1];t[m]=yq(y,n)}}return t}var gq=function(){function e(t){var n=this;ua(this,e),this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new mq,this._blacklist=new mq,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((function(){n.typeError(eq.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,optional:!0,coerce:!0},null==t?void 0:t.spec),this.withMutation((function(e){e.nonNullable()}))}return ca(e,[{key:"_type",get:function(){return this.type}},{key:"clone",value:function(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;var t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=bn(this.deps),t.conditions=bn(this.conditions),t.tests=bn(this.tests),t.transforms=bn(this.transforms),t.spec=yq(Object.assign({},this.spec,e)),t}},{key:"label",value:function(e){var t=this.clone();return t.spec.label=e,t}},{key:"meta",value:function(){if(0===arguments.length)return this.spec.meta;var e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},arguments.length<=0?void 0:arguments[0]),e}},{key:"withMutation",value:function(e){var t=this._mutate;this._mutate=!0;var n=e(this);return this._mutate=t,n}},{key:"concat",value:function(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError("You cannot `concat()` schema's of different types: ".concat(this.type," and ").concat(e.type));var t=this,n=e.clone(),r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation((function(t){e.tests.forEach((function(e){t.test(e.OPTIONS)}))})),n.transforms=[].concat(bn(t.transforms),bn(n.transforms)),n}},{key:"isType",value:function(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}},{key:"resolve",value:function(e){var t=this;if(t.conditions.length){var n=t.conditions;(t=t.clone()).conditions=[],t=(t=n.reduce((function(t,n){return n.resolve(t,e)}),t)).resolve(e)}return t}},{key:"resolveOptions",value:function(e){var t,n,r;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive})}},{key:"cast",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&dq(i))return i;var a=$z(e),o=$z(i);throw new TypeError("The value of ".concat(t.path||"field"," could not be cast to a value ")+'that satisfies the schema type: "'.concat(n.type,'". \n\n')+"attempted value: ".concat(a," \n")+(o!==a?"result of cast: ".concat(o):""))}return i}},{key:"_cast",value:function(e,t){var n=this,r=void 0===e?e:this.transforms.reduce((function(t,r){return r.call(n,t,e,n)}),e);return void 0===r&&(r=this.getDefault()),r}},{key:"_validate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=n.path,o=n.originalValue,s=void 0===o?e:o,u=n.strict,l=void 0===u?this.spec.strict:u,c=e;l||(c=this._cast(c,Object.assign({assert:!1},n)));for(var f=[],h=0,d=Object.values(this.internalTests);h<d.length;h++){var p=d[h];p&&f.push(p)}this.runTests({path:a,value:c,originalValue:s,options:n,tests:f},r,(function(e){if(e.length)return i(e,c);t.runTests({path:a,value:c,originalValue:s,options:n,tests:t.tests},r,i)}))}},{key:"runTests",value:function(e,t,n){var r=!1,i=e.tests,a=e.value,o=e.originalValue,s=e.path,u=e.options,l=function(e){r||(r=!0,t(e,a))},c=function(e){r||(r=!0,n(e,a))},f=i.length,h=[];if(!f)return c([]);for(var d={value:a,originalValue:o,path:s,options:u,schema:this},p=0;p<i.length;p++){(0,i[p])(d,l,(function(e){e&&(h=h.concat(e)),--f<=0&&c(h)}))}}},{key:"asNestedTest",value:function(e){var t,n=this,r=e.key,i=e.index,a=e.parent,o=e.parentPath,s=e.originalParent,u=e.options,l=null!=r?r:i;
2if(null==l)throw TypeError("Must include `key` or `index` for nested validations");var c="number"===typeof l,f=a[l],h=Object.assign({},u,(oe(t={strict:!0,parent:a,value:f,originalValue:s[l],key:void 0},c?"index":"key",l),oe(t,"path",c||l.includes(".")?"".concat(o||"","[").concat(f?l:'"'.concat(l,'"'),"]"):(o?"".concat(o,"."):"")+r),t));return function(e,t,r){return n.resolve(h)._validate(f,h,t,r)}}},{key:"validate",value:function(e,t){var n=this.resolve(Object.assign({},t,{value:e}));return new Promise((function(r,i){return n._validate(e,t,(function(e,t){Zz.isError(e)&&(e.value=t),i(e)}),(function(e,t){e.length?i(new Zz(e,t)):r(t)}))}))}},{key:"validateSync",value:function(e,t){var n;return this.resolve(Object.assign({},t,{value:e}))._validate(e,Object.assign({},t,{sync:!0}),(function(e,t){throw Zz.isError(e)&&(e.value=t),e}),(function(t,r){if(t.length)throw new Zz(t,e);n=r})),n}},{key:"isValid",value:function(e,t){return this.validate(e,t).then((function(){return!0}),(function(e){if(Zz.isError(e))return!1;throw e}))}},{key:"isValidSync",value:function(e,t){try{return this.validateSync(e,t),!0}catch(n){if(Zz.isError(n))return!1;throw n}}},{key:"_getDefault",value:function(){var e=this.spec.default;return null==e?e:"function"===typeof e?e.call(this):yq(e)}},{key:"getDefault",value:function(e){return this.resolve(e||{})._getDefault()}},{key:"default",value:function(e){if(0===arguments.length)return this._getDefault();var t=this.clone({default:e});return t}},{key:"strict",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clone({strict:e})}},{key:"nullability",value:function(e,t){var n=this.clone({nullable:e});return n.internalTests.nullable=pq({message:t,name:"nullable",test:function(e){return null!==e||this.schema.spec.nullable}}),n}},{key:"optionality",value:function(e,t){var n=this.clone({optional:e});return n.internalTests.optionality=pq({message:t,name:"optionality",test:function(e){return void 0!==e||this.schema.spec.optional}}),n}},{key:"optional",value:function(){return this.optionality(!0)}},{key:"defined",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eq.defined;return this.optionality(!1,e)}},{key:"nullable",value:function(){return this.nullability(!0)}},{key:"nonNullable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eq.notNull;return this.nullability(!1,e)}},{key:"required",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eq.required;return this.clone().withMutation((function(t){return t.nonNullable(e).defined(e)}))}},{key:"notRequired",value:function(){return this.clone().withMutation((function(e){return e.nullable().optional()}))}},{key:"transform",value:function(e){var t=this.clone();return t.transforms.push(e),t}},{key:"test",value:function(){var e;if(void 0===(e=1===arguments.length?"function"===typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=eq.default),"function"!==typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),n=pq(e),r=e.exclusive||e.name&&!0===t.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(t.exclusiveTests[e.name]=!!e.exclusive),t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),t.tests.push(n),t}},{key:"when",value:function(e,t){Array.isArray(e)||"string"===typeof e||(t=e,e=".");var n=this.clone(),r=Xz(e).map((function(e){return new hq(e)}));return r.forEach((function(e){e.isSibling&&n.deps.push(e.key)})),n.conditions.push("function"===typeof t?new lq(r,t):lq.fromOptions(r,t)),n}},{key:"typeError",value:function(e){var t=this.clone();return t.internalTests.typeError=pq({message:e,name:"typeError",test:function(e){return!(!dq(e)&&!this.schema._typeCheck(e))||this.createError({params:{type:this.schema.type}})}}),t}},{key:"oneOf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eq.oneOf,n=this.clone();return e.forEach((function(e){n._whitelist.add(e),n._blacklist.delete(e)})),n.internalTests.whiteList=pq({message:t,name:"oneOf",skipAbsent:!0,test:function(e){var t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}},{key:"notOneOf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eq.notOneOf,n=this.clone();return e.forEach((function(e){n._blacklist.add(e),n._whitelist.delete(e)})),n.internalTests.blacklist=pq({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}},{key:"strip",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strip=e,t}},{key:"describe",value:function(e){var t=(e?this.resolve(e):this).clone(),n=t.spec,r=n.label,i={meta:n.meta,label:r,optional:n.optional,nullable:n.nullable,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blackl
2ist.describe(),tests:t.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t}))};return i}}]),e}();gq.prototype.__isYupSchema__=!0;for(var bq=function(){var e=xq[wq];gq.prototype["".concat(e,"At")]=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=vq(this,t,n,r.context),a=i.parent,o=i.parentPath,s=i.schema;return s[e](a&&a[o],Object.assign({},r,{parent:a,path:t}))}},wq=0,xq=["validate","validateSync"];wq<xq.length;wq++)bq();for(var kq=0,_q=["equals","is"];kq<_q.length;kq++){var Cq=_q[kq];gq.prototype[Cq]=gq.prototype.oneOf}for(var Eq=0,Sq=["not","nope"];Eq<Sq.length;Eq++){var Tq=Sq[Eq];gq.prototype[Tq]=gq.prototype.notOneOf}var Iq=function(){return!0};var Nq=function(e){ha(n,e);var t=pa(n);function n(e){return ua(this,n),t.call(this,"function"===typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Iq},e))}return ca(n)}(gq);Nq.prototype;var Aq=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),e=t.call(this,{type:"boolean",check:function(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"===typeof e}}),e.withMutation((function(){e.transform((function(e,t,n){if(n.spec.coerce&&!n.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))})),e}return ca(n,[{key:"isTrue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iq.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:function(e){return dq(e)||!0===e}})}},{key:"isFalse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iq.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:function(e){return dq(e)||!1===e}})}},{key:"default",value:function(e){return ma(ra(n.prototype),"default",this).call(this,e)}},{key:"defined",value:function(e){return ma(ra(n.prototype),"defined",this).call(this,e)}},{key:"optional",value:function(){return ma(ra(n.prototype),"optional",this).call(this)}},{key:"required",value:function(e){return ma(ra(n.prototype),"required",this).call(this,e)}},{key:"notRequired",value:function(){return ma(ra(n.prototype),"notRequired",this).call(this)}},{key:"nullable",value:function(){return ma(ra(n.prototype),"nullable",this).call(this)}},{key:"nonNullable",value:function(e){return ma(ra(n.prototype),"nonNullable",this).call(this,e)}},{key:"strip",value:function(e){return ma(ra(n.prototype),"strip",this).call(this,e)}}]),n}(gq);Aq.prototype;var jq=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Oq=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Pq=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Rq=function(e){return dq(e)||e===e.trim()},Dq={}.toString();function Fq(){return new Lq}var Lq=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.call(this,{type:"string",check:function(e){return e instanceof String&&(e=e.valueOf()),"string"===typeof e}})).withMutation((function(){e.transform((function(e,t,n){if(!n.spec.coerce||n.isType(e))return e;if(Array.isArray(e))return e;var r=null!=e&&e.toString?e.toString():e;return r===Dq?e:r}))})),e}return ca(n,[{key:"required",value:function(e){return ma(ra(n.prototype),"required",this).call(this,e).withMutation((function(t){return t.test({message:e||eq.required,name:"required",skipAbsent:!0,test:function(e){return!!e.length}})}))}},{key:"notRequired",value:function(){return ma(ra(n.prototype),"notRequired",this).call(this).withMutation((function(e){return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e}))}},{key:"length",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tq.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test:function(t){return t.length===this.resolve(e)}})}},{key:"min",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tq.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test:function(t){return t.length>=this.resolve(e)}})}},{key:"max",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tq.max;return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test:function(t){return t.length<=this.resolve(e)}})}},{key:"matches",value:function(e,t){var n,r,i=!1;if(t)if("object"===typeof t){var a=t.excludeEmptyString;i=void 0!==a&&a,n=t.message,r=t.name}else n=t;return this.test({name:r||"matches",message:n||tq.matches,params:{regex:e},skipAbsent:!0,test:function(t){return""===t&&i||-1!==t.search(e)}})}},{key:"email",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tq.email;return this.matches(jq,{name:"email",message:e,excludeEmptyString:!0})}},{key:"url",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tq.url;return this.matches(Oq,{name:"url",message:e,excludeEmptyString:!0})}},{key:"uuid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tq.uuid;return this.matches(Pq,{name:"uuid",message:e,excludeEmptyString:!1})}},{key:"ensure",value:function(){return this.default("").transform((function(e){return null===e?"":e}))}},{key:"trim",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tq.trim;return this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:Rq})}},{key:"lowercase",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tq.lowercase;return this.transform((function(e){return dq(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:function(e){return dq(e)||e===e.toLowerCase()}})}},{key:"uppercase",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tq.uppercase;return this.transform((function(e){return dq(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:function(e){return dq(e)||e===e.toUpperCase()}})}}]),n}(gq);Fq.prototype=Lq.prototype;var Mq=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),(e=t.call(this,{type:"number",check:function(e){return e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&!function(e){return e!=+e}(e)}})).withMutation((function(){e.transform((function(e,t,n){if(!n.spec.coerce)return e;var r=e;if("string"===typeof r){if(""===(r=r.replace(/\s/g,"")))return NaN;r=+r}return n.isType(r)?r:parseFloat(r)}))})),e}return ca(n,[{key:"min",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nq.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test:function(t){return t>=this.resolve(e)}})}},{key:"max",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nq.max;return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test:function(t){return t<=this.resolve(e)}})}},{key:"lessThan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nq.lessThan;return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test:function(t){return t<this.resolve(e)}})}},{key:"moreThan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nq.moreThan;return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test:function(t){return t>this.resolve(e)}})}},{key:"positive",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nq.positive;return this.moreThan(0,e)}},{key:"negative",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nq.negative;return this.lessThan(0,e)}},{key:"integer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nq.integer;
2return this.test({name:"integer",message:e,skipAbsent:!0,test:function(e){return Number.isInteger(e)}})}},{key:"truncate",value:function(){return this.transform((function(e){return dq(e)?e:0|e}))}},{key:"round",value:function(e){var t,n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform((function(t){return dq(t)?t:Math[e](t)}))}}]),n}(gq);Mq.prototype;var Vq=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var Bq=new Date("");function zq(){return new qq}var qq=function(e){ha(n,e);var t=pa(n);function n(){var e;return ua(this,n),e=t.call(this,{type:"date",check:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),e.withMutation((function(){e.transform((function(e,t,r){return!r.spec.coerce||r.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=Vq.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?n.INVALID_DATE:new Date(e))}))})),e}return ca(n,[{key:"prepareParam",value:function(e,t){var n;if(hq.isRef(e))n=e;else{var r=this.cast(e);if(!this._typeCheck(r))throw new TypeError("`".concat(t,"` must be a Date or a value that can be `cast()` to a Date"));n=r}return n}},{key:"min",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rq.min,n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test:function(e){return e>=this.resolve(n)}})}},{key:"max",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rq.max,n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test:function(e){return e<=this.resolve(n)}})}}]),n}(gq);function Uq(e,t){var n=1/0;return e.some((function(e,r){var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0})),n}function Hq(e){return function(t,n){return Uq(e,t)-Uq(e,n)}}qq.INVALID_DATE=Bq,zq.prototype=qq.prototype,zq.INVALID_DATE=Bq;var Wq=function(e,t,n){if("string"!==typeof e)return e;var r=e;try{r=JSON.parse(e)}catch(i){}return n.isType(r)?r:e};function Kq(e){if("fields"in e){for(var t={},n=0,r=Object.entries(e.fields);n<r.length;n++){var i=u(r[n],2),a=i[0],o=i[1];t[a]=Kq(o)}return e.setFields(t)}if("array"===e.type){var s=e.optional();return s.innerType&&(s.innerType=Kq(s.innerType)),s}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Kq)}):"optional"in e?e.optional():e}var Gq=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function Yq(e,t){var n=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===n.indexOf(e)}))}var Qq=Hq([]);function $q(e){return new Xq(e)}var Xq=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),(r=t.call(this,{type:"object",check:function(e){return Gq(e)||"function"===typeof e}})).fields=Object.create(null),r._sortErrors=Qq,r._nodes=[],r._excludedEdges=[],r.withMutation((function(){e&&r.shape(e)})),r}return ca(n,[{key:"_cast",value:function(e){var t,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=ma(ra(n.prototype),"_cast",this).call(this,e,i);if(void 0===a)return this.getDefault();if(!this._typeCheck(a))return a;var o,s=this.fields,u=null!=(t=i.stripUnknown)?t:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter((function(e){return!r._nodes.includes(e)}))),c={},f=Object.assign({},i,{parent:c,__validating:i.__validating||!1}),h=!1,d=ya(l);try{for(d.s();!(o=d.n()).done;){var p=o.value,v=s[p],m=p in a;if(v){var y=void 0,g=a[p];f.path=(i.path?"".concat(i.path,"."):"")+p;var b=(v=v.resolve({value:g,context:i.context,parent:c}))instanceof gq?v.spec:void 0,w=null==b?void 0:b.strict;if(null!=b&&b.strip){h=h||p in a;continue}void 0!==(y=i.__validating&&w?a[p]:v.cast(a[p],f))&&(c[p]=y)}else m&&!u&&(c[p]=a[p]);m===p in c&&c[p]===a[p]||(h=!0)}}catch(x){d.e(x)}finally{d.f()}return h?c:a}},{key:"_validate",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=r.from,s=void 0===o?[]:o,u=r.originalValue,l=void 0===u?e:u,c=r.recursive,f=void 0===c?this.spec.recursive:c;r.from=[{schema:this,value:l}
2].concat(bn(s)),r.__validating=!0,r.originalValue=l,ma(ra(n.prototype),"_validate",this).call(this,e,r,i,(function(e,n){if(f&&Gq(n)){l=l||n;var o,s=[],u=ya(t._nodes);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=t.fields[c];h&&!hq.isRef(h)&&s.push(h.asNestedTest({options:r,key:c,parent:n,parentPath:r.path,originalParent:l}))}}catch(d){u.e(d)}finally{u.f()}t.runTests({tests:s,value:n,originalValue:l,options:r},i,(function(r){a(r.sort(t._sortErrors).concat(e),n)}))}else a(e,n)}))}},{key:"clone",value:function(e){var t=ma(ra(n.prototype),"clone",this).call(this,e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}},{key:"concat",value:function(e){for(var t=this,r=ma(ra(n.prototype),"concat",this).call(this,e),i=r.fields,a=0,o=Object.entries(this.fields);a<o.length;a++){var s=u(o[a],2),l=s[0],c=s[1],f=i[l];i[l]=void 0===f?c:f}return r.withMutation((function(e){return e.setFields(i,t._excludedEdges)}))}},{key:"_getDefault",value:function(){var e=this;if("default"in this.spec)return ma(ra(n.prototype),"_getDefault",this).call(this);if(this._nodes.length){var t={};return this._nodes.forEach((function(n){var r=e.fields[n];t[n]=r&&"getDefault"in r?r.getDefault():void 0})),t}}},{key:"setFields",value:function(e,t){var n=this.clone();return n.fields=e,n._nodes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=new Set,i=new Set(t.map((function(e){var t=u(e,2),n=t[0],r=t[1];return"".concat(n,"-").concat(r)})));function a(e,t){var a=(0,Vz.split)(e)[0];r.add(a),i.has("".concat(t,"-").concat(a))||n.push([t,a])}for(var o=function(){var t=l[s],n=e[t];r.add(t),hq.isRef(n)&&n.isSibling?a(n.path,t):uq(n)&&"deps"in n&&n.deps.forEach((function(e){return a(e,t)}))},s=0,l=Object.keys(e);s<l.length;s++)o();return qz().array(Array.from(r),n).reverse()}(e,t),n._sortErrors=Hq(Object.keys(e)),t&&(n._excludedEdges=t),n}},{key:"shape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.clone().withMutation((function(n){var r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[].concat(bn(n._excludedEdges),bn(t))),n.setFields(Object.assign(n.fields,e),r)}))}},{key:"partial",value:function(){for(var e={},t=0,n=Object.entries(this.fields);t<n.length;t++){var r=u(n[t],2),i=r[0],a=r[1];e[i]="optional"in a&&a.optional instanceof Function?a.optional():a}return this.setFields(e)}},{key:"deepPartial",value:function(){return Kq(this)}},{key:"pick",value:function(e){var t,n={},r=ya(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.fields[i]&&(n[i]=this.fields[i])}}catch(a){r.e(a)}finally{r.f()}return this.setFields(n)}},{key:"omit",value:function(e){var t,n=Object.assign({},this.fields),r=ya(e);try{for(r.s();!(t=r.n()).done;){delete n[t.value]}}catch(i){r.e(i)}finally{r.f()}return this.setFields(n)}},{key:"from",value:function(e,t,n){var r=(0,Vz.getter)(e,!0);return this.transform((function(i){if(!i)return i;var a=i;return function(e,t){var n=bn((0,Vz.normalizePath)(t));if(1===n.length)return n[0]in e;var r=n.pop(),i=(0,Vz.getter)((0,Vz.join)(n),!0)(e);return!(!i||!(r in i))}(i,e)&&(a=Object.assign({},i),n||delete a[e],a[t]=r(i)),a}))}},{key:"json",value:function(){return this.transform(Wq)}},{key:"noUnknown",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aq.noUnknown;"boolean"!==typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){if(null==t)return!0;var n=Yq(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}},{key:"unknown",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aq.noUnknown;return this.noUnknown(!e,t)}},{key:"transformKeys",value:function(e){return this.transform((function(t){if(!t)return t;for(var n={},r=0,i=Object.keys(t);r<i.length;r++){var a=i[r];n[e(a)]=t[a]}return n}))}}
2,{key:"camelCase",value:function(){return this.transformKeys(Bz.camelCase)}},{key:"snakeCase",value:function(){return this.transformKeys(Bz.snakeCase)}},{key:"constantCase",value:function(){return this.transformKeys((function(e){return(0,Bz.snakeCase)(e).toUpperCase()}))}},{key:"describe",value:function(e){var t=ma(ra(n.prototype),"describe",this).call(this,e);t.fields={};for(var r=0,i=Object.entries(this.fields);r<i.length;r++){var a,o=u(i[r],2),s=o[0],l=o[1],c=e;null!=(a=c)&&a.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),t.fields[s]=l.describe(c)}return t}}]),n}(gq);$q.prototype=Xq.prototype;var Jq=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),r=t.call(this,{type:"array",check:function(e){return Array.isArray(e)}}),r.innerType=void 0,r.innerType=e,r}return ca(n,[{key:"_cast",value:function(e,t){var r=this,i=ma(ra(n.prototype),"_cast",this).call(this,e,t);if(!this._typeCheck(i)||!this.innerType)return i;var a=!1,o=i.map((function(e,n){var i=r.innerType.cast(e,Object.assign({},t,{path:"".concat(t.path||"","[").concat(n,"]")}));return i!==e&&(a=!0),i}));return a?o:i}},{key:"_validate",value:function(e){var t,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=this.innerType,u=null!=(t=i.recursive)?t:this.spec.recursive;null!=i.originalValue&&i.originalValue,ma(ra(n.prototype),"_validate",this).call(this,e,i,a,(function(t,n){var l;if(u&&s&&r._typeCheck(n)){for(var c=new Array(n.length),f=0;f<n.length;f++){var h;c[f]=s.asNestedTest({options:i,index:f,parent:n,parentPath:i.path,originalParent:null!=(h=i.originalValue)?h:e})}r.runTests({value:n,tests:c,originalValue:null!=(l=i.originalValue)?l:e,options:i},a,(function(e){return o(e.concat(t),n)}))}else o(t,n)}))}},{key:"clone",value:function(e){var t=ma(ra(n.prototype),"clone",this).call(this,e);return t.innerType=this.innerType,t}},{key:"json",value:function(){return this.transform(Wq)}},{key:"concat",value:function(e){var t=ma(ra(n.prototype),"concat",this).call(this,e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}},{key:"of",value:function(e){var t=this.clone();if(!uq(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+$z(e));return t.innerType=e,t}},{key:"length",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oq.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test:function(t){return t.length===this.resolve(e)}})}},{key:"min",value:function(e,t){return t=t||oq.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test:function(t){return t.length>=this.resolve(e)}})}},{key:"max",value:function(e,t){return t=t||oq.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test:function(t){return t.length<=this.resolve(e)}})}},{key:"ensure",value:function(){var e=this;return this.default((function(){return[]})).transform((function(t,n){return e._typeCheck(t)?t:null==n?[]:[].concat(n)}))}},{key:"compact",value:function(e){var t=e?function(t,n,r){return!e(t,n,r)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))}},{key:"describe",value:function(e){var t=ma(ra(n.prototype),"describe",this).call(this);if(this.innerType){var r,i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),t.innerType=this.innerType.describe(e)}return t}}]),n}(gq);Jq.prototype;var Zq=function(e){ha(n,e);var t=pa(n);function n(e){var r;return ua(this,n),r=t.call(this,{type:"tuple",spec:{types:e},check:function(e){var t=this.spec.types;return Array.isArray(e)&&e.length===t.length}}),r.withMutation((function(){r.typeError(sq)})),r}return ca(n,[{key:"_cast",value:function(e,t){var r=this.spec.types,i=ma(ra(n.prototype),"_cast",this).call(this,e,t);if(!this._typeCheck(i))return i;var a=!1,o=r.map((function(e,n){var r=e.cast(i[n],Object.assign({},t,{path:"".concat(t.path||"","[").concat(n,"]")}));return r!==i[n]&&(a=!0),r}));return a?o:i}},{key:"_validate",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=this.spec.types;ma(ra(n.prototype),"_validate",this).call(this,e,r,i,(function(n,s){var l;if(t._typeCheck(s)){var c,f=[],h=ya(o.entries());try{for(h.s();!(c=h.n()).done;){var d,p=u(c.value,2),v=p[0],m=p[1];f[v]=m.asNestedTest({options:r,index:v,parent:s,parentPath:r.path,originalParent:null!=(d=r.originalValue)?d:e})}}catch(y){h.e(y)}finally{h.f()}t.runTests({value:s,tests:f,originalValue:null!=(l=r.originalValue)?l:e,options:r},i,(function(e){return a(e.concat(n),s)}))}else a(n,s)}))}}]),n}(gq);Zq.prototype;$q().shape({clientName:Fq().min(2,"Too Short!").max(50,"Too Long!").required("Required"),
2clientAddress:Fq().min(10,"Address Too Short!").required("Required"),email:Fq().email("Invalid email").required("Required")});var eU=$q().shape({clientPhone:Fq().min(8,"Phone Number Too Short!").required("Required"),clientName:Fq().min(2,"Too Short!").max(50,"Too Long!").required("Required")}),tU=$q().shape({ReviewsStars:Fq().required("Required"),ReviewTitle:Fq().required("Required"),ReviewBody:Fq().required("Required")}),nU=function(e){var t,n,i,o,s=e.id,l=oL(),f=B(),h=aL(),d=iL(),p=(i="insertReview",mO(ho(l),i,o)),v=(0,c.useContext)(te).rpdata,m=u((0,c.useState)(5),2),y=m[0],g=m[1],b=u((0,c.useState)(void 0),2),w=b[0],x=b[1],k=Array(5).fill(0),_=function(){x(void 0)},C=function(e){return e.signOut().then((function(){f("/")}))},E=function(e,t){var n=t?lL(t):"NO_ID_FIELD";return zF("firestore:docData:".concat(e.firestore.app.name,":").concat(e.path,":idField=").concat(n),DF(e,{idField:n}),t)}(XA(h,"Users",s),{idField:"id"}),S=(E.status,E.data);S&&!1===S.active&&(pL().fire({icon:"error",title:"Oops...",text:"User has been disabled.",footer:'<a href="tel:+1718-585-5400">Contact Us To Solve Your Problem?</a>',confirmButtonColor:"#f98c1d"}),C(d));var T=u((0,c.useState)(!1),2),I=T[0],N=T[1],A=function(){var e=a(r().mark((function e(t){var n,i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={CompanyName:S.companyName,ReviewBody:t.ReviewBody,ReviewsStars:y,ReviewTitle:t.ReviewTitle,ClientName:S.clientName,ClientEmail:S.email,ClientPhone:S.clientPhone,PageId:S.pageId,Date:(new Date).toString()},e.next=3,p({newReview:n});case 3:i=e.sent,console.log(i.data),C(d);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,ne.jsxs)(ne.Fragment,{children:[!0===I?(0,ne.jsx)(hL,{isModalLogout:I,onClose:function(){return N(!1)}}):null,(0,ne.jsxs)("div",{className:"flex md:flex-row flex-col-reverse md:my-4 my-4 md:w-[94%] mx-auto",children:[(0,ne.jsx)("div",{className:"md:w-[50%] w-full py-10 px-4 border-2 border-gray-200 rounded-2xl md:m-4",children:(0,ne.jsx)(Nz,{initialValues:{ReviewsStars:1,ReviewTitle:"",ReviewBody:""},validationSchema:tU,onSubmit:function(){var e=a(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),e.next=3,A(t);case 3:n.resetForm(),pL().fire({icon:"success",title:"Review Sent",text:"Thank you for your review.",confirmButtonColor:"#f98c1d"}),window.location.reload();case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),children:function(e){var t=e.errors,n=e.touched;e.handleBlur,e.handleChange;return(0,ne.jsxs)(Dz,{className:"flex flex-col",children:[(0,ne.jsxs)("div",{className:"flex flex-col",children:[(0,ne.jsxs)("label",{htmlFor:"ReviewsStars",className:"text-[18px] font-bold my-2",children:["Name:"," ",(0,ne.jsx)("span",{className:"color-2 px-2",children:void 0!==S?S.clientName:"LOADING"})]}),(0,ne.jsx)("label",{htmlFor:"ReviewsStars",className:"text-[14px] font-bold capitalize",children:"your overall raiting"}),(0,ne.jsx)("div",{type:"text",name:"ReviewsStars",id:"ReviewsStars",className:"p-2 flex mb-5",children:k.map((function(e,t){var n=t+1;return(0,ne.jsx)(Qn,{value:n,onClick:function(){g(n)},onMouseOver:function(){x(n)},onMouseLeave:_,className:"cursor-pointer border-1 stroke-neutral-700 w-6 h-6 ",size:20,color:n<=(w||y)?"#ffc107":"#e4e5e9"},t)}))}),t.ReviewsStars&&n.ReviewsStars?(0,ne.jsx)("div",{className:"text-red-500 font-bold",children:t.ReviewsStars}):null]}),(0,ne.jsxs)("div",{className:"flex flex-col mb-5",children:[(0,ne.jsx)("label",{htmlFor:"ReviewTitle",className:"text-[14px] font-bold capitalize mb-5",children:"title of your review"}),(0,ne.jsxs)("div",{className:"inputBox",children:[(0,ne.jsx)(Rz,{type:"text",name:"ReviewTitle",id:"ReviewTitle",required:!0}),(0,ne.jsx)("span",{children:"summarize yout review or highilight and interesting detail"}),t.ReviewTitle&&n.ReviewTitle?(0,ne.jsx)("div",{className:"text-red-500 text-[12px]  font-bold",children:t.ReviewTitle}):null]})]}),(0,ne.jsxs)("div",{className:"flex flex-col mb-5",children:[(0,ne.jsx)("label",{htmlFor:"ReviewBody",className:"text-[14px] font-bold capitalize mb-5 ",children:"your review"}),(0,ne.jsxs)("div",{className:"inputBox",children:[(0,ne.jsx)(Rz,{as:"textarea",rows:"5",name:"ReviewBody",id:"ReviewBody",required:!0}),(0,ne.jsx)("span",{children:"tell people your review"}),t.ReviewBody&&n.ReviewBody?(0,ne.jsx)("div",{className:"text-red-500 text-[12px]  font-bold",children:t.ReviewBody}):null]})]}),(0,ne.jsx)("div",{className:"flex justify-start",children:(0,ne.jsx)("button",{type:"submit",className:"flex self-center items-center  text-white bg-btn ease-in-out duration-300 py-2 px-5 rounded-full capitalize",children:(0,ne.jsxs)("span",{className:"text-[18px] flex self-center items-center font-bold",children:["Send Review ",(0,ne.jsx)(Mn,{className:"mx-2 text-[18px]"})]})})})]})}})}),(0,ne.jsx)("div",{className:"md:w-[45%] w-full flex self-center md:my-1 my-4 ml-0 md:ml-auto",children:(0,ne.jsxs)("div",{style:{backgroundImage:'url("'.concat(null===v||void 0===v||null===(t=v.stock)||void 0===t?void 0:t[0],'")')},className:"bg-cover bg-center bg-no-repeat md:h-[500px] h-[300px] w-full relative reviews-area before:rounded-2xl rounded-2xl",children:[(0,ne.jsxs)("div",{className:"flex md:w-[80%] w-[90%] mx-auto my-6 relative",children:[(0,ne.jsx)("div",{className:"md:w-[50%] w-full",children:(0,ne.jsxs)("span",{className:"md:text-[48px] text-[22px] font-bold leading-2 leading-none\t text-white ",children:["Customer ",(0,ne.jsx)("br",{})," Reviews!"]})}),(0,ne.jsx)("div",{className:"md:w-[50%] w-full flex self-center",children:(0,ne.jsx)("img",{src:null===v||void 0===v||null===(n=v.dbPrincipal)||void 0===n?void 0:n.logo,alt:"logo",className:"absolute w-[60%] top-10 md:top-32 right-0 md:-right-8"})})]}),(0,ne.jsx)("div",{className:"",children:(0,ne.jsx)("img",{src:"https://firebasestorage.googleapis.com/v0/b/searchapp-25415.appspot.com/o/CustomerReviews_Mesa%20de%20trabajo%201.png?alt=media&token=b13e7f98-e8e2-4aa8-9557-24b9b286d5ae",alt:"CustomerReviews",className:"absolute bottom-3 right-0 w-[90%]"})})]})})]})]})},rU=function(e){var t=e.onClose,n=aL(),i=(0,c.useContext)(te).rpdata,o=function(){var e=a(r().mark((function e(){var t,a,o,s,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new _l,a=Kf(),e.prev=2,e.next=5,Yc(a,t);case 5:if(!(o=e.sent).user){e.next=12;break}return e.next=9,tO(XA(n,"Users",o.user.uid),{clientName:o.user.displayName,clientPhone:"No Defined",email:o.user.email,active:!0,createdAt:iO(),uid:o.user.uid,pageId:null===i||void 0===i?void 0:i.docId,companyName:null===i||void 0===i||null===(s=i.dbPrincipal)||void 0===s?void 0:s.name});case 9:window.location.reload(),e.next=13;break;case 12:pL().fire({icon:"error",title:"Oops...",text:"Something went wrong!"});case 13:e.next=20;break;case 15:e.prev=15,e.t0=e.catch(2),u=e.t0.message,console.log(u),pL().fire({icon:"error",title:"Oops...",text:"Something went wrong!"});case 20:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(){return e.apply(this,arguments)}}();return(0,ne.jsx)("div",{className:"fixed z-50 inset-0 bg-black bg-opacity-25 backdrop-blur-sm flex justify-center items-center",id:"modalLogout",children:(0,ne.jsxs)("div",{className:"w-[90%] md:w-[40%] flex flex-col",children:[(0,ne.jsx)("button",{className:"text-white text-[30px] place-self-end",onClick:function(){return t()},children:"X"}),(0,ne.jsxs)("div",{className:"bg-white flex flex-col items-center text-center px-10 md:px-0 py-10 rounded-2xl",children:[(0,ne.jsx)(ln,{className:"mb-5 text-[80px] color-2"}),(0,ne.jsx)("h1",{className:"capitalize text-[25px] font-semibold pb-10",children:"Sign in with"}),(0,ne.jsxs)("div",{className:"flex flex-col md:flex-row space-x-0 space-y-5 md:space-y-0 md:space-x-5 self-center items-center",children:[(0,ne.jsxs)(Z,{className:"flex self-center items-center text-white bg-2 py-3 px-4 mx-1 text-[18px] font-bold rounded-lg",to:"/login",children:[(0,ne.jsx)("span",{className:"pr-3",children:(0,ne.jsx)(fn,{})}),"Phone"]}),(0,ne.jsx)("span",{className:"font-bold text-[20px]",children:"or"}),(0,ne.jsxs)("button",{className:"flex self-center items-center text-white bg-2 py-3 px-4 mx-1 text-[18px] font-bold rounded-lg",onClick:o,children:[(0,ne.jsx)("span",{className:"pr-3",children:(0,ne.jsx)(sn,{})}),"Email"]})]})]})]})})};var iU=function(){var e,t,n,r,i,a,o,s=(0,c.useContext)(te).rpdata,l=u((0,c.useState)(!1),2),f=l[0],h=l[1],d=TF(),p=d.status,v=d.data;if("loading"===p)return(0,ne.jsx)(Xi,{});var m=v.signedIn,y=v.user;return(0,ne.jsxs)(wi,{PageName:"Reviews",children:[(0,ne.jsx)("div",{className:"md:max-w-full w-full",children:(0,ne.jsx)(Bi,{headertitle:"Reviews",Subheader:"Reviews",bgimg:"".concat(null===s||void 0===s||null===(e=s.gallery)||void 0===e?void 0:e[21])})}),(0,ne.jsxs)("div",{className:"w-[90%] md:w-4/5 mx-auto py-[100px]",children:[(0,ne.jsx)("h1",{className:"text-center pb-4",children:null===s||void 0===s||null===(t=s.labels)||void 0===t||null===(n=t.general)||void 0===n?void 0:n.titleReviews}),null!==s&&void 0!==s&&null!==(r=s.simpleWidgets)&&void 0!==r&&null!==(i=r[4])&&void 0!==i&&i.activo?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("div",{className:"w-full flex md:flex-col justify-between self-center items-center my-4",children:!0!==m?(0,ne.jsxs)("div",{className:"flex flex-col md:flex-row justify-center items-center md:justify-between w-full",children:[(0,ne.jsx)("span",{className:"text-[30px] font-bold mx-3 text-center color-2",children:"Leave Us a Review!"}),(0,ne.jsxs)("button",{className:"bg-white bg-btn text--slate-900 duration-300 ease-in-out hover:text-white  rounded-full px-5 py-2 w-[250px] flex items-center justify-center",onClick:function(){return h(!0)},children:[(0,ne.jsx)("span",{className:"px-2 text-[20px] font-bold text-white",children:"Write A Review"}),(0,ne.jsx)(un,{className:"text-[22px] font-bold text-white"})]})]}):(0,ne.jsx)(nU,{id:y.uid})}),(0,ne.jsx)(na,{})]}):null,(0,ne.jsx)("div",{className:"".concat(null===s||void 0===s||null===(a=s.reviews)||void 0===a||null===(o=a.links)||void 0===o?void 0:o[0]," mt-10")})]}),f?(0,ne.jsx)(rU,{isModalLogout:f,onClose:function(){return h(!1)}}):null]})};var aU=function(){var e,t,n,r=(0,c.useContext)(te).rpdata,i=u((0,c.useState)(!1),2),a=i[0],o=i[1],s=function(){o(!a)};return(0,ne.jsxs)(wi,{PageName:"Our Videos",children:[(0,ne.jsx)("div",{className:"md:max-w-full w-full",children:(0,ne.jsx)(Bi,{headertitle:"Our Videos",Subheader:"Our Videos",bgimg:"".concat(null===r||void 0===r||null===(e=r.stock)||void 0===e?void 0:e[0])})}),(0,ne.jsxs)("div",{className:"w-4/5 mx-auto py-[100px]",children:[(0,ne.jsx)("h1",{className:"text-center pb-10",children:"Our Videos"}),(0,ne.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:null!==r&&void 0!==r&&null!==(t=r.ytGallery)&&void 0!==t&&t.linkCanalYT?null===r||void 0===r||null===(n=r.ytGallery)||void 0===n?void 0:n.links.map((function(e,t){return(0,ne.jsxs)("div",{children:[(0,ne.jsx)("a",{href:"#".concat(e),className:"button",onClick:s,children:(0,ne.jsx)("div",{className:"relative before:absolute before:bg-zinc-900/5 before:w-full before:h-full before:top-0",children:(0,ne.jsx)("iframe",{width:"100%",height:"200",src:"https://www.youtube.com/embed/".concat(e,"?controls=0"),title:"Video Player Interscope Media",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0,className:"rounded-2xl shadow-xl"})})}),(0,ne.jsx)("div",{id:"".concat(e),className:a?"overlay":"hidden",children:(0,ne.jsxs)("div",{className:"modal",children:[(0,ne.jsx)("button",{className:"cancel",onClick:s,children:"X"}),(0,ne.jsx)("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(e),title:"Video Player Interscope Media",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:!0,className:"rounded-2xl shadow-xl"})]})})]},t)})):null})]})]})};var oU=function(){var e,t,n,r,i,a,o,s,u,l,f,h,d,p,v,m,y,g,b=(0,c.useContext)(te).rpdata;return(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsxs)(Qt,{children:[(0,ne.jsxs)("title",{children:["Find Us On | ","".concat(null===b||void 0===b||null===(e=b.dbPrincipal)||void 0===e?void 0:e.name)]}),(0,ne.jsx)("meta",{name:"description",content:"".concat((null===b||void 0===b||null===(t=b.dbAbout)||void 0===t?void 0:t[0].text.substring(0,150))+"...")}),(0,ne.jsx)("meta",{name:" ".concat(null===b||void 0===b||null===(n=b.dbPrincipal)||void 0===n?void 0:n.name),content:" ".concat(null===b||void 0===b||null===(r=b.dbPrincipal)||void 0===r?void 0:r.name)}),(0,ne.jsx)("meta",{name:"robots",content:"index,follow"}),(0,ne.jsx)("meta",{name:"googlebot",content:"index,follow"}),(0,ne.jsx)("link",{rel:"icon",href:null===b||void 0===b||null===(i=b.dbPrincipal)||void 0===i?void 0:i.favicon})]}),(0,ne.jsx)("div",{className:"bg-footer h-screen opacity-95",children:(0,ne.jsx)("div",{className:"w-4/5 mx-auto",children:(0,ne.jsxs)("div",{className:"flex items-center flex-col pt-10",children:[(0,ne.jsx)("img",{src:null===b||void 0===b||null===(a=b.dbPrincipal)||void 0===a?void 0:a.logo,alt:"logo",className:"md:w-[20%] mb-6"}),(null===b||void 0===b||null===(o=b.gmb)||void 0===o||null===(s=o.link)||void 0===s?void 0:s.length)>0?(0,ne.jsxs)("a",{href:null===b||void 0===b||null===(u=b.gmb)||void 0===u?void 0:u.link,className:"text-white bg-2 p-4 md:w-[500px] w-[250px] text-start my-2 rounded-lg",target:"_blank",rel:"noreferrer",children:[(0,ne.jsx)("i",{className:"fa fa-link mr-2"}),"Google My Business"]}
2):null,(0,ne.jsxs)("a",{href:"https://api.whatsapp.com/send?phone=1".concat(null===b||void 0===b||null===(l=b.dbPrincipal)||void 0===l||null===(f=l.phones)||void 0===f?void 0:f[0].phone.replaceAll("-","").toLowerCase()),className:"text-white bg-2 p-4 md:w-[500px] w-[250px] text-start my-2 rounded-lg",target:"_blank",rel:"noreferrer",children:[(0,ne.jsx)("i",{className:"fa fa-link mr-2"}),"Whatsapp"]}),(null===b||void 0===b||null===(h=b.dbSocialMedia)||void 0===h||null===(d=h.directorios)||void 0===d?void 0:d[0].url.length)>0?null===b||void 0===b||null===(p=b.dbSocialMedia)||void 0===p||null===(v=p.directorios)||void 0===v?void 0:v.map((function(e,t){return(0,ne.jsxs)("a",{href:e.url,className:"text-white bg-2 p-4 md:w-[500px] w-[250px] text-start my-2 rounded-lg",target:"_blank",rel:"noreferrer",children:[(0,ne.jsx)("i",{className:"fa fa-link mr-2"}),e.name]},t)})):null,(0,ne.jsx)("ul",{className:"social-icons icon-circle list-unstyled list-inline mt-6 mb-10",children:(null===b||void 0===b||null===(m=b.dbSocialMedia)||void 0===m||null===(y=m.redes)||void 0===y?void 0:y[0].url.length)>0?null===b||void 0===b||null===(g=b.dbSocialMedia)||void 0===g?void 0:g.redes.map((function(e,t){return(0,ne.jsx)("li",{children:(0,ne.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,ne.jsx)("i",{className:"fab fa-".concat(e.icon," wp-icon"),"aria-hidden":"true"})})},t)})):null})]})})})]})};var sU=function(){var e,t=(0,c.useContext)(te).rpdata;return(0,ne.jsx)(wi,{PageName:"page not found",children:(0,ne.jsxs)("div",{className:"md:max-w-full w-full",children:[(0,ne.jsx)(Bi,{headertitle:"page not found",Subheader:"page not found",bgimg:"".concat(null===t||void 0===t||null===(e=t.stock)||void 0===e?void 0:e[0])}),(0,ne.jsxs)("div",{className:"py-[100px] text-center",children:[(0,ne.jsx)("h3",{className:"capitalize ",children:"page not found"}),(0,ne.jsx)($t,{btnName:"return to home",btnLink:"/"})]})]})})},uU=n(3587),lU=n.n(uU),cU=(Object.freeze({Placed:"Placed",Confirmed:"Confirmed",Packed:"Packed",Shipped:"Shipped"}),["(",/[1-9]/,/\d/,/\d/,")"," ",/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/]);var fU=function(){var e=aL(),t=B(),n=Kf(),i=u((0,c.useState)(!1),2),o=i[0],s=i[1];n.languageCode="US";var l=(0,c.useContext)(te).rpdata,f=u((0,c.useState)(!1),2),h=f[0],d=f[1],p=u((0,c.useState)(""),2),v=p[0],m=p[1],y=u((0,c.useState)(""),2),g=y[0],b=y[1],w=u((0,c.useState)(!1),2),x=w[0],k=w[1],_=u((0,c.useState)({clientPhone:"",email:"",clientName:""}),2),C=_[0],E=_[1],S=function(e){var t=e.target.value;b(t)},T=function(){var i=a(r().mark((function i(){var a,o,u,c,f,h,d,p;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(6!==g.length){r.next=33;break}return s(!0),r.prev=2,a=window.confirmationResult,r.next=6,a.confirm(g);case 6:return o=r.sent,u=o.user,c=XA(e,"Users",u.uid),r.next=11,Zj(c);case 11:if(!(f=r.sent).exists()){r.next=22;break}if(!0!==f.data().active){r.next=18;break}return pL().mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:2e3,timerProgressBar:!0,didOpen:function(e){e.addEventListener("mouseenter",pL().stopTimer),e.addEventListener("mouseleave",pL().resumeTimer)}}).fire({icon:"success",title:"Signed in successfully"}),t("/reviews"),r.abrupt("return");case 18:pL().fire({icon:"error",title:"Oops...",text:"User has been disabled.",footer:'<a href="tel:+1718-585-5400">Contact Us To Solve Your Problem?</a>',confirmButtonColor:"#f98c1d"}),N(n),r.next=27;break;case 22:return p=o.user,r.next=25,tO(XA(e,"Users",p.uid),{clientName:C.clientName,clientPhone:v,email:C.email,active:!0,createdAt:iO(),uid:p.uid,pageId:null===l||void 0===l?void 0:l.docId,companyName:null===l||void 0===l||null===(h=l.dbPrincipal)||void 0===h?void 0:h.name});case 25:pL().fire("Success!","User Created WELCOME ".concat(null===l||void 0===l||null===(d=l.dbPrincipal)||void 0===d?void 0:d.name),"success"),t("/reviews");case 27:s(!1),r.next=33;break;case 30:r.prev=30,r.t0=r.catch(2),alert(r.t0);case 33:case"end":return r.stop()}}),i,null,[[2,30]])})));return function(){return i.apply(this,arguments)}}(),I=function(){var e=a(r().mark((function e(t){var i,a,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=window.recaptchaVerifier,e.next=4,Dc(n,t,i);case 4:a=e.sent,console.log(a),window.confirmationResult=a,k(!0),e.next=17;break;case 10:e.prev=10,e.t0=e.catch(0),o=e.t0.message,console.log(e.t0),console.log(o),s(!1),pL().fire({icon:"error",title:"Oops...",text:"".concat(o),footer:'<a href="tel:+1718-585-5400">Contact Us To Solve Your Problem?</a>',confirmButtonColor:"#f98c1d"});case 17:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}(),N=function(e){return e.signOut().then((function(){return t("/login")}))};return o?(0,ne.jsx)(cL,{}):(0,ne.jsx)("div",{className:"h-[100vh] bg-gray-100 text-gray-900 flex justify-center self-center items-center",children:(0,ne.jsxs)("div",{className:"container",children:[(0,ne.jsxs)("div",{className:"form-container sign-in-container",children:[(0,ne.jsx)("div",{className:"pt-5 pl-5",children:(0,ne.jsxs)(Z,{to:"/reviews",className:"flex items-center",children:[(0,ne.jsx)(Ln,{className:"text-[22px]"}),(0,ne.jsx)("span",{className:"px-2 text-[22px] font-bold",children:"Back"})]})}),(0,ne.jsx)("div",{className:"md:w-[50%] mx-auto",children:(0,ne.jsx)(Nz,{initialValues:{clientPhone:"",email:"",clientName:""},validationSchema:eU,onSubmit:function(){var e=a(r().mark((function e(t){var i;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),d(!0),E((function(e){return ue(ue({},e),t)})),i="+1".concat(t.clientPhone.replaceAll("-","").replaceAll(" ","").replaceAll("(","").replaceAll(")","")),m(i),console.log(i),window.recaptchaVerifier=new Oc("recaptcha-container",{size:"invisible",callback:function(e){}},n),e.next=9,I(i);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:function(e){var t=e.errors,n=e.touched,r=e.handleBlur,i=e.handleChange;return(0,ne.jsxs)(Dz,{className:"flex flex-col items-center justify-center h-full px-10 py-12 text-center bg-white m-6",children:[(0,ne.jsx)("h1",{className:"text-2xl font-extrabold xl:text-3xl",children:"Login with Phone"}),(0,ne.jsx)("div",{className:"my-3 text-center border-b",children:(0,ne.jsx)("div",{className:"inline-block px-2 text-sm font-medium leading-none tracking-wide text-gray-600 transform translate-y-1/2 bg-white",children:"Use your phone number for login"})}),(0,ne.jsx)(Rz,{type:"email",name:"email",placeholder:"Email",className:"w-full px-8 py-4 my-2 text-sm font-medium placeholder-gray-500 bg-gray-100 border border-gray-200 rounded-lg focus:outline-none focus:border-gray-400 focus:bg-white"}),(0,ne.jsx)(Rz,{name:"clientName",placeholder:"Doe",className:"w-full px-8 py-4 my-2 text-sm font-medium placeholder-gray-500 bg-gray-100 border border-gray-200 rounded-lg focus:outline-none focus:border-gray-400 focus:bg-white"}),t.clientName&&n.clientName?(0,ne.jsx)("div",{children:t.clientName}):null,(0,ne.jsx)(Rz,{name:"clientPhone",children:function(e){var t=e.field,n=e.form,a=n.touched,o=n.errors;e.meta;return(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(lU(),ue(ue({},t),{},{mask:cU,id:"clientPhone",placeholder:"Enter your phone number",type:"text",onCh
2ange:i,onBlur:r,className:"w-full px-8 py-4 my-2 text-sm font-medium placeholder-gray-500 bg-gray-100 border border-gray-200 rounded-lg focus:outline-none focus:border-gray-400 focus:bg-white"})),o.clientPhone&&a.clientPhone?(0,ne.jsx)("div",{children:o.clientPhone}):null]})}}),!0===h?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("input",{name:"OTP",type:"number",value:g,maxLength:6,onChange:S,placeholder:"Enter your 6 digits code sent to the number above",className:"w-full px-8 py-4 my-2 text-sm font-medium placeholder-gray-500 bg-gray-100 border border-gray-200 rounded-lg focus:outline-none focus:border-gray-400 focus:bg-white"}),!0===x?(0,ne.jsx)(ne.Fragment,{children:(0,ne.jsxs)("button",{type:"button",onClick:T,className:"mt-5 tracking-wide font-semibold bg-[#F18F34] text-gray-100 w-full py-4 rounded-lg hover:bg-[#F18F34] transition-all duration-300 ease-in-out flex items-center justify-center focus:shadow-outline focus:outline-none",children:[(0,ne.jsx)(Li,{className:"w-6 h-6 -ml-2"}),(0,ne.jsx)("span",{className:"ml-3",children:"Complete Registration"})]})}):null]}):null,!1===h?(0,ne.jsxs)("button",{type:"submit",className:"mt-5 tracking-wide font-semibold bg-2 text-gray-100 w-full py-4 rounded-full transition-all duration-300 ease-in-out flex items-center justify-center focus:shadow-outline focus:outline-none",children:[(0,ne.jsx)(Li,{className:"w-6 h-6 -ml-2"}),(0,ne.jsx)("span",{className:"ml-3",children:"Send Code"})]}):null]})}})})]}),(0,ne.jsx)("div",{className:"overlay-container bg-cover bg-[#E74E1C] relative left-[-100%] h-full w-full md:block hidden",children:(0,ne.jsxs)("div",{className:"overlay",children:[(0,ne.jsxs)("div",{className:"overlay-panel md:px-6 overlay-left",children:[(0,ne.jsx)("h1",{className:"text-[22px] md:text-3xl font-extrabold",children:"Welcome Back!"}),(0,ne.jsx)("p",{className:"hidden md:block",children:"To keep connected with us please login with your personal info"}),(0,ne.jsxs)("button",{className:"mt-5 tracking-wide font-semibold bg-white text-[#F18F34] w-full py-4 rounded-lg hover:bg-[#F18F34] hover:text-white transition-all duration-300 ease-in-out flex items-center justify-center focus:shadow-outline focus:outline-none",onClick:function(){},children:[(0,ne.jsx)("span",{className:"ml-3",children:"Sign Up"}),(0,ne.jsx)(Mn,{className:"w-4 h-4 ml-2"})]})]}),(0,ne.jsxs)("div",{className:"overlay-panel md:px-6 overlay-right",children:[(0,ne.jsx)("h1",{className:"text-2xl font-extrabold xl:text-3xl",children:"Hello, Welcome!"}),(0,ne.jsx)("p",{className:"hidden md:block",children:"Enter your personal details and start journey with us"}),(0,ne.jsxs)("button",{className:"mt-5 tracking-wide font-semibold bg-white text-[#F18F34] w-full py-4 rounded-lg hover:bg-[#F18F34] hover:text-white transition-all duration-300 ease-in-out flex items-center justify-center focus:shadow-outline focus:outline-none",onClick:function(){},children:[(0,ne.jsx)("span",{className:"ml-3",children:"Contact Us"}),(0,ne.jsx)(Mn,{className:"w-4 h-4 ml-2"})]})]})]})})]})})},hU=function(){return(0,ne.jsx)("div",{className:"h-[100vh] bg-gray-100 text-gray-900 flex justify-center self-center items-center",children:(0,ne.jsx)("div",{className:"container",children:(0,ne.jsxs)("div",{className:"form-container sign-in-container",children:[(0,ne.jsx)("div",{className:"pt-5 pl-5",children:(0,ne.jsxs)(Z,{to:"/reviews",className:"flex items-center",children:[(0,ne.jsx)(Ln,{className:"text-[22px]"}),(0,ne.jsx)("span",{className:"px-2 text-[22px] font-bold",children:"Back"})]})}),(0,ne.jsx)("div",{className:"w-full flex justify-center",children:(0,ne.jsxs)("button",{className:"bg-white bg-2 text--slate-900 duration-300 ease-in-out hover:text-white  rounded-full px-5 py-2 w-[250px] flex items-center justify-center",children:[(0,ne.jsx)("span",{className:"px-2 text-[20px] font-bold text-white",children:"Login With Email"}),(0,ne.jsx)(Li,{className:"text-[22px] font-bold text-white"})]})})]})})})},dU=function(){var e,t,n="640ff011a99a10e1b793860d",i=u((0,c.useState)({}),2),o=i[0],s=i[1],l=u((0,c.useState)(!1),2),f=l[0],h=l[1],d=SF(),p=Kf(d),v=function(e,t){return eL("firestore",GF,e,t)}(function(){var e=a(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=vj(t,{}),e.prev=1,e.next=4,gj(n);case 4:console.log("indexdb enabled"),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(1),console.log(e.t0.code),console.log(e.t0.message);case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()),m=v.status,y=v.data;return(0,c.useEffect)((function(){function e(){return(e=a(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,bi()({baseURL:"https://servidorpublico.herokuapp.com/api",url:"/paginas/".concat(n),method:"get"});case 4:t=e.sent,s(JSON.parse(JSON.stringify(t.data))),console.log(t.data),document.documentElement.style.setProperty("--main-color",t.data.styles.mainColor),document.documentElement.style.setProperty("--secondary-color",t.data.styles.secondaryColor),document.documentElement.style.setProperty("--three-color",t.data.styles.thirdColor),document.documentElement.style.setProperty("--heading-color",t.data.styles.headingTextColor),document.documentElement.style.setProperty("--paragraph-color",t.data.styles.paragraphTextColor),document.documentElement.style.setProperty("--bg-footer",t.data.styles.bgFooter),document.documentElement.style.setProperty("--btn",t.data.styles.btn),document.documentElement.style.setProperty("--btn-hover",t.data.styles.btnHover),document.documentElement.style.setProperty("--scroll-color",t.data.styles.scrollColor),document.documentElement.style.setProperty("--icons-menu-movil",t.data.styles.iconsMenuMovil),document.documentElement.style.setProperty("--overlay-video-content",t.data.styles.overlayColor),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(1),console.log(e.t0);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})))).apply(this,arguments)}!function(){e.apply(this,arguments)}(),setTimeout((function(){h(!1)}),1e3)}),[]),"loading"===m||f?(0,ne.jsx)(Xi,{}):(0,ne.jsxs)("div",{className:"App",children:[(0,ne.jsx)(te.Provider,{value:{rpdata:o},children:(0,ne.jsx)(tL,{sdk:p,children:(0,ne.jsx)(rL,{sdk:_O(d),children:(0,ne.jsx)(nL,{sdk:y,children:(0,ne.jsx)(J,{children:null!==o&&void 0!==o&&null!==(e=o.simpleWidgets)&&void 0!==e&&null!==(t=e[3])&&void 0!==t&&t.activo?(0,ne.jsxs)(K,{children:[(0,ne.jsx)(H,{exact:!0,path:"/",element:(0,ne.jsx)(Vi,{})}),(0,ne.jsx)(H,{path:"*",element:(0,ne.jsx)(sU,{})})]}):(0,ne.jsxs)(K,{children:[(0,ne.jsx)(H,{exact:!0,path:"/",element:(0,ne.jsx)(Vi,{})}),(0,ne.jsx)(H,{path:"/about",element:(0,ne.jsx)(Ui,{})}),(0,ne.jsx)(H,{path:"/services",element:(0,ne.jsx)(Hi,{})}),(0,ne.jsx)(H,{path:"/:id",element:(0,ne.jsx)(ea,{})}),(0,ne.jsx)(H,{path:"/gallery",element:(0,ne.jsx)(Ki,{})}),(0,ne.jsx)(H,{path:"/gallery/:id",element:(0,ne.jsx)(ta,{})}),(0,ne.jsx)(H,{path:"/reviews",element:(0,ne.jsx)(iU,{})}),(0,ne.jsx)(H,{path:"/our-videos",element:(0,ne.jsx)(aU,{})}),(0,ne.jsx)(H,{path:"/contact",element:(0,ne.jsx)($i,{})}),(0,ne.jsx)(H,{path:"/find-us-on",element:(0,ne.jsx)(oU,{})}),(0,ne.jsx)(H,{path:"/find-us-on",element:(0,ne.jsx)(oU,{})}),(0,ne.jsx)(H,{path:"/login",element:(0,ne.jsx)(fU,{})}),(0,ne.jsx)(H,{path:"/logout",element:(0,ne.jsx)(hL,{})}),(0,ne.jsx)(H,{path:"/login-email",element:(0,ne.jsx)(hU,{})}),(0,ne.jsx)(H,{path:"*",element:(0,ne.jsx)(sU,{})})]})})})})})}),(0,ne.jsx)("div",{id:"recaptcha-container"})]})},pU=document.getElementById("root");(0,e.s)(pU).render((0,ne.jsx)(CF,{firebaseConfig:{apiKey:"AIzaSyAWoBhZO31UWo1P8swWSc9c0JAfilt4Z6I",authDomain:"clientsreviews-b613a.firebaseapp.com",projectId:"clientsreviews-b613a",storageBucket:"clientsreviews-b613a.appspot.com",messagingSenderId:"417612883679",appId:"1:417612883679:web:ec1d24243985ea4be92b6a",measurementId:"G-E7V7GC7EXE"},suspence:!1,children:(0,ne.jsx)(dU,{})}))}()}();
3//# sourceMappingURL=main.81aefd89.js.map

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.