(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{74444:function(e,t,n){"use strict";n.d(t,{BH:function(){return w},G6:function(){return I},L:function(){return c},LL:function(){return O},L_:function(){return C},P0:function(){return g},Pz:function(){return y},Sg:function(){return b},ZR:function(){return k},aH:function(){return v},b$:function(){return x},eu:function(){return A},hl:function(){return P},m9:function(){return U},ne:function(){return V},pd:function(){return D},q4:function(){return m},ru:function(){return E},tV:function(){return u},uI:function(){return S},vZ:function(){return function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let o of r){if(!i.includes(o))return!1;let r=t[o],s=n[o];if(j(r)&&j(s)){if(!e(r,s))return!1}else if(r!==s)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}},w1:function(){return T},xO:function(){return L},xb:function(){return M},z$:function(){return _},zd:function(){return N}});var r=n(83454);let i=function(e){let t=[],n=0;for(let r=0;r>6|192:((64512&i)==55296&&r+1>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},o=function(e){let t=[],n=0,r=0;for(;n191&&i<224){let o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){let 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{let o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")},s={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t>2,u=(3&i)<<4|s>>4,h=(15&s)<<2|l>>6,d=63&l;a||(d=64,o||(h=64)),r.push(n[c],n[u],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):o(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t>4;if(r.push(c),64!==s){let e=o<<4&240|s>>2;if(r.push(e),64!==l){let e=s<<6&192|l;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let l=function(e){let t=i(e);return s.encodeByteArray(t,!0)},c=function(e){return l(e).replace(/\./g,"")},u=function(e){try{return s.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},h=()=>(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,d=()=>{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},f=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&u(e[1]);return t&&JSON.parse(t)},p=()=>{try{return h()||d()||f()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},m=e=>{var t,n;return null===(n=null===(t=p())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},g=e=>{let t=m(e);if(!t)return;let n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},v=()=>{var e;return null===(e=p())||void 0===e?void 0:e.config},y=e=>{var t;return null===(t=p())||void 0===t?void 0:t[`_${e}`]};class w{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,n))}}}function b(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[c(JSON.stringify({alg:"none",type:"JWT"})),c(JSON.stringify(o)),""].join(".")}function _(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function S(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(_())}function C(){return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function E(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function x(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function T(){let e=_();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function I(){return!function(){var e;let t=null===(e=p())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function P(){try{return"object"==typeof indexedDB}catch(e){return!1}}function A(){return new Promise((e,t)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}class k extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,k.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,O.prototype.create)}}class O{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],o=i?i.replace(R,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`}):"Error",s=`${this.serviceName}: ${o} (${r}).`;return new k(r,s,n)}}let R=/\{\$([^}]+)}/g;function M(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function j(e){return null!==e&&"object"==typeof e}function L(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function N(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function D(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function V(e,t){let n=new F(e,t);return n.subscribe.bind(n)}class F{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=B),void 0===r.error&&(r.error=B),void 0===r.complete&&(r.complete=B);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function B(){}function U(e){return e&&e._delegate?e._delegate:e}},19477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({html:e,height:t=null,width:n=null,children:o,dataNtpc:s=""}){return(0,i.useEffect)(()=>{s&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${s}`}})},[s]),(0,r.jsxs)(r.Fragment,{children:[o,e?(0,r.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=n?`${n}px`:"auto"},"data-ntpc":s,dangerouslySetInnerHTML:{__html:e}}):null]})};let r=n(85893),i=n(67294)},7834:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:n,dataLayerName:i="dataLayer",nonce:l}=e;return void 0===r&&(r=i),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:` window['${i}'] = window['${i}'] || []; function gtag(){window['${i}'].push(arguments);} gtag('js', new Date()); gtag('config', '${t}' ${n?",{ 'debug_mode': true }":""});`},nonce:l}),(0,o.jsx)(a.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:l})]})},t.sendGAEvent=function(...e){if(void 0===r){console.warn("@next/third-parties: GA has not been initialized");return}window[r]?window[r].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${r} does not exist`)};let o=n(85893),s=n(67294),a=i(n(4298))},83632:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{apiKey:t,...n}=e,r={...n,key:t},{html:a}=(0,o.GoogleMapsEmbed)(r);return(0,i.jsx)(s.default,{height:r.height||null,width:r.width||null,html:a,dataNtpc:"GoogleMapsEmbed"})};let i=n(85893),o=n(86257),s=r(n(19477))},30674:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:n="https://www.googletagmanager.com/gtm.js",dataLayerName:r="dataLayer",auth:l,preview:c,dataLayer:u,nonce:h}=e;a=r;let d="dataLayer"!==r?`&l=${r}`:"",f=l?`>m_auth=${l}`:"",p=c?`>m_preview=${c}>m_cookies_win=x`:"";return(0,o.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:` (function(w,l){ w[l]=w[l]||[]; w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); ${u?`w[l].push(${JSON.stringify(u)})`:""} })(window,'${r}');`},nonce:h}),(0,i.jsx)(s.default,{id:"_next-gtm","data-ntpc":"GTM",src:`${n}?id=${t}${d}${f}${p}`,nonce:h})]})};let i=n(85893),o=n(67294),s=r(n(4298)),a="dataLayer";t.sendGTMEvent=(e,t)=>{let n=t||a;window[n]=window[n]||[],window[n].push(e)}},19692:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=t.sendGTMEvent=t.GoogleTagManager=t.YouTubeEmbed=t.GoogleMapsEmbed=void 0;var i=n(83632);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return r(i).default}});var o=n(11494);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return r(o).default}});var s=n(30674);Object.defineProperty(t,"GoogleTagManager",{enumerable:!0,get:function(){return s.GoogleTagManager}}),Object.defineProperty(t,"sendGTMEvent",{enumerable:!0,get:function(){return s.sendGTMEvent}});var a=n(7834);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return a.GoogleAnalytics}}),Object.defineProperty(t,"sendGAEvent",{enumerable:!0,get:function(){return a.sendGAEvent}})},11494:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{html:t,scripts:n,stylesheets:r}=(0,s.YouTubeEmbed)(e);return(0,i.jsx)(a.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==n?void 0:n.map(e=>(0,i.jsx)(o.default,{src:e.url,strategy:l[e.strategy],stylesheets:r},e.url))})};let i=n(85893),o=r(n(4298)),s=n(86257),a=r(n(19477)),l={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"}},83454:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(77663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(69770)}])},83525:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(14001).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76361:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});let r=n(83525);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8199:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return f},usePathname:function(){return h},useRouter:function(){return d},useSearchParams:function(){return u},useSelectedLayoutSegment:function(){return m},useSelectedLayoutSegments:function(){return p},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let r=n(67294),i=n(60257),o=n(22608),s=n(11288),a=n(66406),l=n(72717),c=n(65988);function u(){let e=(0,r.useContext)(o.SearchParamsContext);return(0,r.useMemo)(()=>e?new l.ReadonlyURLSearchParams(e):null,[e])}function h(){return(0,r.useContext)(o.PathnameContext)}function d(){let e=(0,r.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function f(){return(0,r.useContext)(o.PathParamsContext)}function p(e){void 0===e&&(e="children");let t=(0,r.useContext)(i.LayoutRouterContext);return t?function e(t,n,r,i){let o;if(void 0===r&&(r=!0),void 0===i&&(i=[]),r)o=t[1][n];else{var l;let e=t[1];o=null!=(l=e.children)?l:Object.values(e)[0]}if(!o)return i;let c=o[0],u=(0,s.getSegmentValue)(c);return!u||u.startsWith(a.PAGE_SEGMENT_KEY)?i:(i.push(u),e(o,n,!1,i))}(t.tree,e):null}function m(e){void 0===e&&(e="children");let t=p(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72717:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return s},RedirectType:function(){return r.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(7511),i=n(73394);class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class s extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new o}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},73394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return i},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44234:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7511:function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return m},getRedirectTypeFromError:function(){return p},getURLFromRedirectError:function(){return f},isRedirectError:function(){return d},permanentRedirect:function(){return h},redirect:function(){return u}});let o=n(82595),s=n(76361),a=n(44234),l="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(l);r.digest=l+";"+t+";"+e+";"+n+";";let i=o.requestAsyncStorage.getStore();return i&&(r.mutableCookies=i.mutableCookies),r}function u(e,t){void 0===t&&(t="replace");let n=s.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function h(e,t){void 0===t&&(t="replace");let n=s.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,i]=e.digest.split(";",4),o=Number(i);return t===l&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(o)&&o in a.RedirectStatusCode}function f(e){return d(e)?e.digest.split(";",3)[2]:null}function p(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function m(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(i=r||(r={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25329:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(14001).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82595:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return i},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(25329);function i(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11288:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38199:function(e,t){"use strict";var n,r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return h},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return u},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return f}});let s="refresh",a="navigate",l="restore",c="server-patch",u="prefetch",h="fast-refresh",d="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=n||(n={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(o=r||(r={})).fresh="fresh",o.reusable="reusable",o.expired="expired",o.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},87195:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(98337),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98342:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let r=n(38754),i=n(85893),o=r._(n(67294)),s=n(36075),a=n(53955),l=n(48041),c=n(99903),u=n(65490),h=n(81928),d=n(60257),f=n(84229),p=n(87195),m=n(89470),g=n(38199),v=new Set;function y(e,t,n,r,i,o){if(o||(0,a.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let i=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(i))return;v.add(i)}(async()=>o?e.prefetch(t,i):e.prefetch(t,n,r))().catch(e=>{})}}function w(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=o.default.forwardRef(function(e,t){let n,r;let{href:l,as:v,children:b,prefetch:_=null,passHref:S,replace:C,shallow:E,scroll:x,locale:T,onClick:I,onMouseEnter:P,onTouchStart:A,legacyBehavior:k=!1,...O}=e;n=b,k&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let R=o.default.useContext(h.RouterContext),M=o.default.useContext(d.AppRouterContext),j=null!=R?R:M,L=!R,N=!1!==_,D=null===_?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:V,as:F}=o.default.useMemo(()=>{if(!R){let e=w(l);return{href:e,as:v?w(v):e}}let[e,t]=(0,s.resolveHref)(R,l,!0);return{href:e,as:v?(0,s.resolveHref)(R,v):t||e}},[R,l,v]),B=o.default.useRef(V),U=o.default.useRef(F);k&&(r=o.default.Children.only(n));let H=k?r&&"object"==typeof r&&r.ref:t,[q,z,$]=(0,f.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(U.current!==F||B.current!==V)&&($(),U.current=F,B.current=V),q(e),H&&("function"==typeof H?H(e):"object"==typeof H&&(H.current=e))},[F,H,V,$,q]);o.default.useEffect(()=>{j&&z&&N&&y(j,V,F,{locale:T},{kind:D},L)},[F,V,z,T,N,null==R?void 0:R.locale,j,L,D]);let K={ref:W,onClick(e){k||"function"!=typeof I||I(e),k&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),j&&!e.defaultPrevented&&function(e,t,n,r,i,s,l,c,u){let{nodeName:h}=e.currentTarget;if("A"===h.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:s,locale:c,scroll:e}):t[i?"replace":"push"](r||n,{scroll:e})};u?o.default.startTransition(d):d()}(e,j,V,F,C,E,x,T,L)},onMouseEnter(e){k||"function"!=typeof P||P(e),k&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),j&&(N||!L)&&y(j,V,F,{locale:T,priority:!0,bypassPrefetchedCheck:!0},{kind:D},L)},onTouchStart:function(e){k||"function"!=typeof A||A(e),k&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),j&&(N||!L)&&y(j,V,F,{locale:T,priority:!0,bypassPrefetchedCheck:!0},{kind:D},L)}};if((0,c.isAbsoluteUrl)(F))K.href=F;else if(!k||S||"a"===r.type&&!("href"in r.props)){let e=void 0!==T?T:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,p.getDomainLocale)(F,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);K.href=t||(0,m.addBasePath)((0,u.addLocale)(F,e,null==R?void 0:R.defaultLocale))}return k?o.default.cloneElement(r,K):(0,i.jsx)("a",{...O,...K,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84229:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(67294),i=n(84474),o="function"==typeof IntersectionObserver,s=new Map,a=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,c=l||!o,[u,h]=(0,r.useState)(!1),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(o){if(c||u)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:i,elements:o}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=a.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=s.get(r)))return t;let i=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:i},a.push(n),s.set(n,t),t}(n);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),s.delete(r);let e=a.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&h(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!u){let e=(0,i.requestIdleCallback)(()=>h(!0));return()=>(0,i.cancelIdleCallback)(e)}},[c,n,t,u,d.current]),[f,u,(0,r.useCallback)(()=>{h(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65988:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return o}});let r=n(61757)._(n(67294)),i=r.default.createContext(null);function o(e){let t=(0,r.useContext)(i);t&&t(e)}},2873:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});let r="rive-resource-cache";async function i(e,t){let n={data:t,timestamp:Date.now()},i=await caches.open(r),o=new Response(JSON.stringify(n));await i.put(new Request(e),o)}async function o(e,t,n){let i=await caches.open(r),o=await i.match(new Request(e));if(!o)return null;let s=await o.json();return!0!==t&&Date.now()-s.timestamp<144e5||!0===t&&Date.now()-s.timestamp<1e3*parseInt(n)?s.data:(await i.delete(new Request(e)),null)}var s=n(54312),a=n(83454);async function l(e){let{requestID:t,id:n,language:r="en-US",page:i=1,genreKeywords:o,sortBy:l,year:c,country:u,query:h,season:d,episode:f,service:p,limit:m,offset:g,proxyMode:v}=e,y="https://api.themoviedb.org/3",w=a.env.NEXT_PUBLIC_RANDOM_URL,b="https://scrapper.rivestream.org",_=a.env.NEXT_PUBLIC_EXTERNAL_PROVIDER_URL,S="https://recommendation.rivestream.net",C="https://streamed.su",E="https://backend.rivestream.org",x="https://de2.api.radio-browser.info",T="https://sub.wyzie.ru",I="https://api.mangadex.org",P=new URL({latestMovie:"".concat(y,"/movie/now_playing?language=").concat(r,"&page=").concat(i),latestTv:"".concat(y,"/tv/airing_today?language=").concat(r,"&page=").concat(i),popularMovie:"".concat(y,"/movie/popular?language=").concat(r,"&page=").concat(i,"&sort_by=").concat(l),popularTv:"".concat(y,"/tv/popular?language=").concat(r,"&page=").concat(i,"&sort_by=").concat(l),topRatedMovie:"".concat(y,"/movie/top_rated?language=").concat(r,"&page=").concat(i),topRatedTv:"".concat(y,"/tv/top_rated?language=").concat(r,"&page=").concat(i),filterMovie:"".concat(y,"/discover/movie?with_genres=").concat(o,"&language=").concat(r,"&sort_by=").concat(l).concat(void 0!=c?"&year="+c:"").concat(void 0!=u?"&with_origin_country="+u:"").concat(void 0!=p?"&with_watch_providers="+p+"&watch_region=US":"","&page=").concat(i,"&release_date.lte=").concat(new Date),filterTv:"".concat(y,"/discover/tv?with_genres=").concat(o,"&language=").concat(r,"&sort_by=").concat(l).concat(void 0!=c?"&first_air_date_year="+c:"").concat(void 0!=u?"&with_origin_country="+u:"").concat(void 0!=p?"&with_networks="+p:"","&page=").concat(i,"&with_runtime.gte=1&air_date.lte=").concat(new Date),onTheAirTv:"".concat(y,"/tv/on_the_air?language=").concat(r,"&page=").concat(i),trending:"".concat(y,"/trending/all/day?language=").concat(r,"&page=").concat(i),trendingMovie:"".concat(y,"/trending/movie/week?language=").concat(r,"&page=").concat(i),trendingTv:"".concat(y,"/trending/tv/week?language=").concat(r,"&page=").concat(i),trendingMovieDay:"".concat(y,"/trending/movie/day?language=").concat(r,"&page=").concat(i),trendingTvDay:"".concat(y,"/trending/tv/day?language=").concat(r,"&page=").concat(i),searchMulti:"".concat(y,"/search/multi?query=").concat(h,"&language=").concat(r,"&page=").concat(i),searchKeyword:"".concat(y,"/search/keyword?query=").concat(h,"&language=").concat(r,"&page=").concat(i),searchMovie:"".concat(y,"/search/movie?query=").concat(h,"&language=").concat(r,"&page=").concat(i),searchTv:"".concat(y,"/search/tv?query=").concat(h,"&language=").concat(r,"&page=").concat(i),movieData:"".concat(y,"/movie/").concat(n,"?language=").concat(r),tvData:"".concat(y,"/tv/").concat(n,"?language=").concat(r,"&append_to_response=external_ids"),personData:"".concat(y,"/person/").concat(n,"?language=").concat(r),movieVideos:"".concat(y,"/movie/").concat(n,"/videos?language=").concat(r),tvVideos:"".concat(y,"/tv/").concat(n,"/videos?language=").concat(r),movieImages:"".concat(y,"/movie/").concat(n,"/images"),tvImages:"".concat(y,"/tv/").concat(n,"/images"),personImages:"".concat(y,"/person/").concat(n,"/images"),movieCasts:"".concat(y,"/movie/").concat(n,"/credits?language=").concat(r),tvCasts:"".concat(y,"/tv/").concat(n,"/credits?language=").concat(r),movieReviews:"".concat(y,"/movie/").concat(n,"/reviews?language=").concat(r),tvReviews:"".concat(y,"/tv/").concat(n,"/reviews?language=").concat(r),movieRelated:"".concat(y,"/movie/").concat(n,"/recommendations?language=").concat(r,"&page=").concat(i),tvRelated:"".concat(y,"/tv/").concat(n,"/recommendations?language=").concat(r,"&page=").concat(i),tvEpisodes:"".concat(y,"/tv/").concat(n,"/season/").concat(d,"?language=").concat(r),tvEpisodeDetail:"".concat(y,"/tv/").concat(n,"/season/").concat(d,"/episode/").concat(f,"?language=").concat(r),movieSimilar:"".concat(y,"/movie/").concat(n,"/similar?language=").concat(r,"&page=").concat(i),tvSimilar:"".concat(y,"/tv/").concat(n,"/similar?language=").concat(r,"&page=").concat(i),personMovie:"".concat(y,"/person/").concat(n,"/movie_credits?language=").concat(r,"&page=").concat(i),personTv:"".concat(y,"/person/").concat(n,"/tv_credits?language=").concat(r,"&page=").concat(i),genresMovie:"".concat(y,"/genre/movie/list?language=").concat(r),genresTv:"".concat(y,"/genre/tv/list?language=").concat(r),countries:"".concat(y,"/configuration/countries?language=").concat(r),languages:"".concat(y,"/configuration/languages"),random:"".concat(w),collection:"".concat(y,"/collection/").concat(n,"?language=").concat(r),searchCollection:"".concat(y,"/search/collection?query=").concat(h,"&language=").concat(r,"&page=").concat(i),withKeywordsTv:"".concat(y,"/discover/tv?with_keywords=").concat(o,"&language=").concat(r,"&sort_by=").concat(l).concat(void 0!=c?"&first_air_date_year="+c:"").concat(void 0!=u?"&with_origin_country="+u:"","&page=").concat(i,"&air_date.lte=").concat(new Date().getFullYear(),"-").concat(new Date().getMonth(),"-").concat(new Date().getDate()).concat("first_air_date.desc"===l?"&with_runtime.gte=1":null),withKeywordsMovie:"".concat(y,"/discover/movie?with_keywords=").concat(o,"&language=").concat(r,"&sort_by=").concat(l).concat(void 0!=c?"&first_air_date_year="+c:"").concat(void 0!=u?"&with_origin_country="+u:"","&page=").concat(i,"&release_date.lte=").concat(new Date().getFullYear(),"-").concat(new Date().getMonth(),"-").concat(new Date().getDate(),"&with_runtime.gte=1"),VideoProviderServices:"".concat(b,"/api/providers"),movieVideoProvider:"".concat(b,"/api/provider?provider=").concat(p,"&id=").concat(n),tvVideoProvider:"".concat(b,"/api/provider?provider=").concat(p,"&id=").concat(n,"&season=").concat(d,"&episode=").concat(f),TorrentProviderServices:"".concat(b,"/api/torrents"),movieTorrentProvider:"".concat(b,"/api/torrent?provider=").concat(p,"&id=").concat(n),tvTorrentProvider:"".concat(b,"/api/torrent?provider=").concat(p,"&id=").concat(n,"&season=").concat(d,"&episode=").concat(f),EmbedProviderServices:"".concat(b,"/api/embeds"),movieEmbedProvider:"".concat(b,"/api/embed?provider=").concat(p,"&id=").concat(n),tvEmbedProvider:"".concat(b,"/api/embed?provider=").concat(p,"&id=").concat(n,"&season=").concat(d,"&episode=").concat(f),TorrentSearch:"".concat("https://torrents.corsflix.net","/api/1337x/").concat(h,"/").concat(i),movieExternalVideoProvider:"".concat(_,"/").concat(n,"?s=0&e=0"),tvExternalVideoProvider:"".concat(_,"/").concat(n,"?s=").concat(d,"e=").concat(f,"&e=0"),movieOnlineSubtitles:"https://proxy.valhallastream.com/?destination="+encodeURIComponent("".concat(T,"/search?id=").concat(n)),tvOnlineSubtitles:"https://proxy.valhallastream.com/?destination="+encodeURIComponent("".concat(T,"/search?id=").concat(n,"&season=").concat(d,"&episode=").concat(f)),aiRecommendation:"https://proxy.valhallastream.com/?destination="+encodeURIComponent("".concat(S,"/api/search?query=").concat(h)),aiRecommendationWithTitle:"https://proxy.valhallastream.com/?destination="+encodeURIComponent("".concat(S,"/api/search-with-title?query=").concat(h)),trancoDomainQuery:"https://tranco-list.eu/api/ranks/domain/".concat(h),liveSportsSportsList:"".concat(C,"/api/sports"),liveSportsMatches:"".concat(C,"/api/matches/").concat(h),liveSportsMatchesPopular:"".concat(C,"/api/matches/").concat(h,"/popular"),liveSportsStream:"".concat(C,"/api/stream/").concat(h,"/").concat(n),liveSportsSportsSchedule:"".concat(E,"/api/schedule"),liveSportsSportsExtra:"".concat(E,"/api/schedule?type=schedule-extra-generated"),mangaList:"".concat(I,"/manga?limit=21&order[latestUploadedChapter]=desc&includes[]=cover_art").concat(void 0!=g?"&offset="+g:"","&contentRating[]=safe&hasAvailableChapters=true"),mangaListPopular:"".concat(I,"/manga?limit=21&order[followedCount]=desc&includes[]=cover_art").concat(void 0!=g?"&offset="+g:"","&contentRating[]=safe&hasAvailableChapters=true"),mangaSearch:"".concat(I,"/manga?limit=21&order[latestUploadedChapter]=desc&includes[]=cover_art").concat(void 0!=g?"&offset="+g:"","&title=").concat(h),mangaInfo:"".concat(I,"/manga/").concat(n,"?includes[]=cover_art"),mangaChapters:"".concat(I,"/chapter?limit=").concat(m).concat(void 0!=g?"&offset="+g:"","&manga=").concat(n,"&includeFutureUpdates=1&order[chapter]=asc&order[volume]=asc&order[createdAt]=asc&order[updatedAt]=asc&order[publishAt]=asc&order[readableAt]=asc&translatedLanguage[]=").concat(r),mangaChapterRead:"".concat("https://consumet.valhallastream.com","/manga/mangadex/read/").concat(n),liveRadioLocal:"".concat("https://prod.radio-api.net","/stations/local?count=50"),liveRadioTags:"".concat(x,"/json/tags?limit=50&hidebroken=true&order=stationcount&reverse=true"),liveRadioCountries:"".concat(x,"/json/countries?order=name"),liveRadioLanguages:"".concat(x,"/json/languages?order=name"),liveRadioMostPopular:"".concat(x,"/json/stations/topvote/").concat(h,"?limit=40&hidebroken=true"),liveRadioMostPlayed:"".concat(x,"/json/stations/topclick/").concat(h,"?limit=40&hidebroken=true"),liveRadioByCountry:"".concat(x,"/json/stations/bycountry/").concat(h,"?limit=250&hidebroken=true&order=votes&reverse=true"),liveRadioByID:"".concat(x,"/json/stations/byuuid/").concat(h,"?limit=250&hidebroken=true&order=votes&reverse=true"),liveRadioByTag:"".concat(x,"/json/stations/bytag/").concat(h,"?limit=250&hidebroken=true&order=votes&reverse=true"),liveRadioSearch:"".concat(x,"/json/stations/search?name=").concat(h).concat(void 0!==u&&"undefined"!==u?"&country=".concat(u):"").concat(void 0!==r&&"undefined"!==r&&"en-US"!==r?"&language=".concat(r):"").concat(void 0!==p&&"undefined"!==p?"&tag=".concat(p):"","&limit=250&hidebroken=true&order=votes&reverse=true"),liveRadioLocalWorkaround:"".concat(x,"/json/stations/search?limit=40&hidebroken=true&order=votes&reverse=true").concat(void 0!==u&&"undefined"!==u?"&country=".concat(u):"").concat(void 0!==h&&"undefined"!==h?"&state=".concat(h):""),observability:"https://log-api.newrelic.com/log/v1"}[t]);if(t.includes("liveSports")||t.includes("OnlineSubtitles")||t.includes("manga")||P.searchParams.append("api_key","d64117f26031a428449f102ced3aba73"),"reverseProxy"===v&&!t.includes("VideoProvider")){let e=new URL("https://proxy.valhallastream.com/");e.searchParams.append("destination",P.toString()),P=e}try{let e="observability"===t?await (0,s.z)(p):await fetch(P.toString(),{method:"GET",headers:{Accept:"application/json"}}),n=await e.json();return await n}catch(e){console.error("Error fetching data:",e)}}let c=["9Y2","xzL","4zZZwK","B3Yt3","Z35YU9jLlf","FyKw3pA","5","1aD8","Jl","xGr","42ER1","jczYB","9hZ7dK9b","Rqor4wJOP","sL","frTaH42KRz","7iud","sM","YE7rmwUNfo","uvCRS5","g","Dpymw189","78Z1U2f","edPXPbD","wpTZ3","DqPZ","3BR","vt","Z4l2j","nAp1Tv","Z2","BPNbeQoy","ut7KZeQXn","7QvWEHrUq","EoVt","xKGWHoH","M0VnD","uKZz","CT5Sr4Qt","c","A6P8","y2QPgB","VJ","c2k","6pH1ABUJat","5","o","PpjP","jb2tLf29","yr1zHg8Lz","7opBBY","EQOwB","YSTIaExVc","tbrfwW","mV9kT14Yn","ctkGj","iuaMBA","RFYsuG6j3r","AYJ3bJv","wM6OsyrU8"];var u=n(85437),h=n(83454);async function d(e){var t,n;let{requestID:r,id:s,language:a="en-US",page:d=1,genreKeywords:f,sortBy:p="popularity.desc",year:m,country:g,query:v,season:y,episode:w,service:b,noCache:_,ttl:S,limit:C,offset:E}=e,x=await (null===(t=(0,u.G)())||void 0===t?void 0:t.fetchMode),T=await (null===(n=(0,u.G)())||void 0===n?void 0:n.proxyMode),I=h.env.NEXT_PUBLIC_BACKEND_API||"",P="".concat(I,"/api/backendfetch"),A={latestMovie:"".concat(P,"?requestID=latestMovie&language=").concat(a,"&page=").concat(d),latestTv:"".concat(P,"?requestID=latestTv&language=").concat(a,"&page=").concat(d),popularMovie:"".concat(P,"?requestID=popularMovie&language=").concat(a,"&page=").concat(d,"&sortBy=").concat(p),popularTv:"".concat(P,"?requestID=popularTv&language=").concat(a,"&page=").concat(d,"&sortBy=").concat(p),topRatedMovie:"".concat(P,"?requestID=topRatedMovie&language=").concat(a,"&page=").concat(d),topRatedTv:"".concat(P,"?requestID=topRatedTv&language=").concat(a,"&page=").concat(d),filterMovie:"".concat(P,"?requestID=filterMovie&genreKeywords=").concat(f,"&language=").concat(a,"&sortBy=").concat(p).concat(void 0!=m?"&year="+m:"").concat(void 0!=g?"&country="+g:"").concat(void 0!=b?"&service="+b:"","&page=").concat(d),filterTv:"".concat(P,"?requestID=filterTv&genreKeywords=").concat(f,"&language=").concat(a,"&sortBy=").concat(p).concat(void 0!=m?"&year="+m:"").concat(void 0!=g?"&country="+g:"").concat(void 0!=b?"&service="+b:"","&page=").concat(d),onTheAirTv:"".concat(P,"?requestID=onTheAirTv&language=").concat(a,"&page=").concat(d),trending:"".concat(P,"?requestID=trending&language=").concat(a,"&page=").concat(d),trendingMovie:"".concat(P,"?requestID=trendingMovie&language=").concat(a,"&page=").concat(d),trendingTv:"".concat(P,"?requestID=trendingTv&language=").concat(a,"&page=").concat(d),trendingMovieDay:"".concat(P,"?requestID=trendingMovieDay&language=").concat(a,"&page=").concat(d),trendingTvDay:"".concat(P,"?requestID=trendingTvDay&language=").concat(a,"&page=").concat(d),searchMulti:"".concat(P,"?requestID=searchMulti&query=").concat(v,"&language=").concat(a,"&page=").concat(d),searchKeyword:"".concat(P,"?requestID=searchKeyword&query=").concat(v,"&language=").concat(a,"&page=").concat(d),searchMovie:"".concat(P,"?requestID=searchMovie&query=").concat(v,"&language=").concat(a,"&page=").concat(d),searchTv:"".concat(P,"?requestID=searchTv&query=").concat(v,"&language=").concat(a,"&page=").concat(d),movieData:"".concat(P,"?id=").concat(s,"&requestID=movieData&language=").concat(a),tvData:"".concat(P,"?id=").concat(s,"&requestID=tvData&language=").concat(a),personData:"".concat(P,"?id=").concat(s,"&requestID=personData&language=").concat(a),movieVideos:"".concat(P,"?id=").concat(s,"&requestID=movieVideos&language=").concat(a),tvVideos:"".concat(P,"?id=").concat(s,"&requestID=tvVideos&language=").concat(a),movieImages:"".concat(P,"?id=").concat(s,"&requestID=movieImages"),tvImages:"".concat(P,"?id=").concat(s,"&requestID=tvImages"),personImages:"".concat(P,"?id=").concat(s,"&requestID=personImages"),movieCasts:"".concat(P,"?id=").concat(s,"&requestID=movieCasts&language=").concat(a),tvCasts:"".concat(P,"?id=").concat(s,"&requestID=tvCasts&language=").concat(a),movieReviews:"".concat(P,"?id=").concat(s,"&requestID=movieReviews&language=").concat(a),tvReviews:"".concat(P,"?id=").concat(s,"&requestID=tvReviews&language=").concat(a),movieRelated:"".concat(P,"?id=").concat(s,"&requestID=movieRelated&language=").concat(a,"&page=").concat(d),tvRelated:"".concat(P,"?id=").concat(s,"&requestID=tvRelated&language=").concat(a,"&page=").concat(d),tvEpisodes:"".concat(P,"?id=").concat(s,"&season=").concat(y,"&requestID=tvEpisodes&language=").concat(a),tvEpisodeDetail:"".concat(P,"?id=").concat(s,"&season=").concat(y,"&episode=").concat(w,"&requestID=tvEpisodeDetail&language=").concat(a),movieSimilar:"".concat(P,"?id=").concat(s,"&requestID=movieSimilar&language=").concat(a,"&page=").concat(d),tvSimilar:"".concat(P,"?id=").concat(s,"&requestID=tvSimilar&language=").concat(a,"&page=").concat(d),personMovie:"".concat(P,"?id=").concat(s,"&requestID=personMovie&language=").concat(a,"&page=").concat(d),personTv:"".concat(P,"?id=").concat(s,"&requestID=personTv&language=").concat(a,"&page=").concat(d),genresMovie:"".concat(P,"?requestID=genresMovie&language=").concat(a),genresTv:"".concat(P,"?requestID=genresTv&language=").concat(a),countries:"".concat(P,"?requestID=countries&language=").concat(a),languages:"".concat(P,"?requestID=languages"),collection:"".concat(P,"?requestID=collection&id=").concat(s),searchCollection:"".concat(P,"?requestID=searchCollection&query=").concat(v,"&page=").concat(d),withKeywordsTv:"".concat(P,"?requestID=withKeywordsTv&genreKeywords=").concat(f,"&language=").concat(a,"&sortBy=").concat(p).concat(void 0!=m?"&year="+m:"").concat(void 0!=g?"&country="+g:"","&page=").concat(d),withKeywordsMovie:"".concat(P,"?requestID=withKeywordsMovie&genreKeywords=").concat(f,"&language=").concat(a,"&sortBy=").concat(p).concat(void 0!=m?"&year="+m:"").concat(void 0!=g?"&country="+g:"","&page=").concat(d),VideoProviderServices:"".concat(P,"?requestID=VideoProviderServices"),movieVideoProvider:"".concat(P,"?requestID=movieVideoProvider&id=").concat(s,"&service=").concat(b),tvVideoProvider:"".concat(P,"?requestID=tvVideoProvider&id=").concat(s,"&season=").concat(y,"&episode=").concat(w,"&service=").concat(b),TorrentProviderServices:"".concat(P,"?requestID=TorrentProviderServices"),movieTorrentProvider:"".concat(P,"?requestID=movieTorrentProvider&id=").concat(s,"&service=").concat(b),tvTorrentProvider:"".concat(P,"?requestID=tvTorrentProvider&id=").concat(s,"&season=").concat(y,"&episode=").concat(w,"&service=").concat(b),EmbedProviderServices:"".concat(P,"?requestID=EmbedProviderServices"),movieEmbedProvider:"".concat(P,"?requestID=movieEmbedProvider&id=").concat(s,"&service=").concat(b),tvEmbedProvider:"".concat(P,"?requestID=tvEmbedProvider&id=").concat(s,"&season=").concat(y,"&episode=").concat(w,"&service=").concat(b),TorrentSearch:"".concat(P,"?requestID=TorrentSearch&query=").concat(v,"&page=").concat(d),movieExternalVideoProvider:"".concat(P,"?requestID=movieExternalVideoProvider&id=").concat(s),tvExternalVideoProvider:"".concat(P,"?requestID=tvExternalVideoProvider&id=").concat(s,"&season=").concat(y,"&episode=").concat(w),movieOnlineSubtitles:"".concat(P,"?requestID=movieOnlineSubtitles&id=").concat(s),tvOnlineSubtitles:"".concat(P,"?requestID=tvOnlineSubtitles&id=").concat(s,"&season=").concat(y,"&episode=").concat(w),aiRecommendation:"".concat(P,"?requestID=aiRecommendation&query=").concat(v),aiRecommendationWithTitle:"".concat(P,"?requestID=aiRecommendationWithTitle&query=").concat(v),trancoDomainQuery:"".concat(P,"?requestID=trancoDomainQuery&query=").concat(v),liveSportsSportsList:"".concat(P,"?requestID=liveSportsSportsList"),liveSportsMatches:"".concat(P,"?requestID=liveSportsMatchesSports&query=").concat(v),liveSportsMatchesPopular:"".concat(P,"?requestID=liveSportsMatchesPopular&query=").concat(v),liveSportsStream:"".concat(P,"?requestID=liveSportsStream&query=").concat(v,"&id=").concat(s),liveSportsSportsSchedule:"".concat(P,"?requestID=liveSportsSportsSchedule"),liveSportsSportsExtra:"".concat(P,"?requestID=liveSportsSportsExtra"),mangaList:"".concat(P,"?requestID=mangaList&limit=").concat(C,"&offset=").concat(E),mangaListPopular:"".concat(P,"?requestID=mangaListPopular&limit=").concat(C,"&offset=").concat(E),mangaSearch:"".concat(P,"?requestID=mangaSearch&query=").concat(v,"&limit=").concat(C,"&offset=").concat(E),mangaInfo:"".concat(P,"?requestID=mangaInfo&id=").concat(s),mangaChapters:"".concat(P,"?requestID=mangaChapters&id=").concat(s,"&language=").concat(a,"&limit=").concat(C,"&offset=").concat(E),mangaChapterRead:"".concat(P,"?requestID=mangaChapterRead&id=").concat(s),liveRadioLocal:"".concat(P,"?requestID=liveRadioLocal"),liveRadioTags:"".concat(P,"?requestID=liveRadioTags"),liveRadioCountries:"".concat(P,"?requestID=liveRadioCountries"),liveRadioLanguages:"".concat(P,"?requestID=liveRadioLanguages"),liveRadioMostPopular:"".concat(P,"?requestID=liveRadioMostPopular&query=").concat(v),liveRadioMostPlayed:"".concat(P,"?requestID=liveRadioMostPlayed&query=").concat(v),liveRadioByCountry:"".concat(P,"?requestID=liveRadioByCountry&query=").concat(v),liveRadioByID:"".concat(P,"?requestID=liveRadioByID&query=").concat(v),liveRadioByTag:"".concat(P,"?requestID=liveRadioByTag&query=").concat(v),liveRadioSearch:"".concat(P,"?requestID=liveRadioSearch&query=").concat(v).concat(void 0!==g&&"undefined"!==g?"&country=".concat(g):"").concat(void 0!==a&&"undefined"!==a&&"en-US"!==a?"&language=".concat(a):"").concat(void 0!==b&&"undefined"!==b?"&service=".concat(b):""),liveRadioLocalWorkaround:"".concat(P,"?requestID=liveRadioLocalWorkaround").concat(void 0!==v&&"undefined"!==v?"&query=".concat(v):"").concat(void 0!==g&&"undefined"!==g?"&country=".concat(g):""),observability:"".concat(P,"?requestID=observability&service=").concat(b)}[r],k=!0===_?await o(A,!0,S):await o(A);if(k&&null!=k&&(null==k?void 0:k.length)!==0&&""!==k)return await k;if(!(void 0!==A&&!r.includes("VideoProvider")&&!r.includes("Torrent")&&!r.includes("aiRecommendation")&&!r.includes("manga")&&"client"===x||void 0!==A&&r.includes("liveSports"))){if(void 0!==A)try{let e=function(e){if(void 0===e)return"rive";try{let t,n;let r=String(e),i=btoa(btoa(r));if(isNaN(Number(e))){let e=r.split("").reduce((e,t)=>e+t.charCodeAt(0),0);t=c[e%c.length]||btoa(r),n=Math.floor(e%i.length/2)}else t=c[Number(e)%c.length]||btoa(r),n=Math.floor(Number(e)%i.length/2);return i.slice(0,n)+t+i.slice(n)}catch(e){return"topSecret"}}(s||v||void 0),t=A+"&secretKey=".concat(e)+"&proxyMode=".concat(T),n=await fetch(t,{method:"GET",headers:{Accept:"application/json"}}),r=await n.json();return(null==r?void 0:r.success)!==!1&&i(A,r),await r}catch(e){console.error("Error fetching data:",e)}}else try{let e=await l({requestID:r,id:s,language:a,page:d,genreKeywords:f,sortBy:p,year:m,country:g,query:v,season:y,episode:w,service:b,limit:C,offset:E,proxyMode:T});return(null==e?void 0:e.success)!==!1&&i(A,e),await e}catch(e){console.error("Error fetching data: ",e)}}},44599:function(e,t,n){"use strict";n.d(t,{I8:function(){return a},db:function(){return l},Ap:function(){return c}});var r=n(25816);(0,r.KN)("firebase","10.14.1","app");var i=n(27385),o=n(90109);let s=(0,r.ZF)({apiKey:"AIzaSyCJdgu8xFz5wr5HjFPsTUhgV3NOLwNW5Ys",authDomain:"rive-5d1b4.firebaseapp.com",projectId:"rive-5d1b4",storageBucket:"rive-5d1b4.appspot.com",messagingSenderId:"282413972323",appId:"1:282413972323:web:8cc62020d8a48fdff03156",measurementId:"G-JJ5PGENLBB"}),a=(0,i.v0)(s),l=(0,o.ad)(s),c=new i.hJ},30779:function(e,t,n){"use strict";n.d(t,{DI:function(){return c},EM:function(){return a},I9:function(){return l},KO:function(){return m},P0:function(){return f},TX:function(){return u},WC:function(){return d},c0:function(){return h}});var r=n(44599),i=n(27385),o=n(90109),s=n(64712);let a=async e=>{let{username:t,email:n,password:a}=e,l=/\S+@\S+\.\S+/.test(n);if(!t||!n||!a)return s.Am.error("Fill all the fields"),!1;if(!l)return s.Am.error("Cloud: Enter valid Email"),!1;{let e=s.Am.loading("Connecting to cloud provider...");try{let l=(await (0,i.Xb)(r.I8,n,a)).user,c=(0,o.JU)(r.db,"users",l.uid);return await (0,o.pl)(c,{username:t}),s.Am.dismiss(e),s.Am.success("Cloud: User created! Welcome to Rive club"),!0}catch(t){if(!t.message.includes("already-in-use"))return console.log({error:t}),s.Am.dismiss(e),s.Am.error("".concat(t.message)),!1;s.Am.dismiss(e),s.Am.error("Cloud: user is already a Rive member")}}},l=async e=>{let{email:t,password:n}=e,o=/\S+@\S+\.\S+/.test(t),a=s.Am.loading("Connecting to cloud provider...");try{if(!t||!n)return s.Am.dismiss(a),s.Am.error("Some required fields are empty!"),!1;if(!o)return s.Am.dismiss(a),s.Am.error("Cloud: Enter valid Email"),!1;return await (0,i.e5)(r.I8,t,n),s.Am.dismiss(a),s.Am.success("Cloud: welcome back"),!0}catch(e){return e.message.includes("not-found")?(s.Am.dismiss(a),s.Am.error("Cloud: user not found, signup first")):e.message.includes("wrong-password")&&(s.Am.dismiss(a),s.Am.error("Cloud: Incorrect password")),s.Am.dismiss(a),s.Am.error("".concat(e.message)),!1}},c=async()=>{let e=s.Am.loading("Connecting to cloud provider...");try{let t=await (0,i.rh)(r.I8,r.Ap),n=i.hJ.credentialFromResult(t);null==n||n.accessToken;let o=null==t?void 0:t.user;return s.Am.dismiss(e),s.Am.success("Cloud: welcome ".concat(o.displayName)),!0}catch(t){return s.Am.dismiss(e),s.Am.error("".concat(t.message)),!1}},u=()=>{let e=s.Am.loading("Connecting to cloud provider...");(0,i.w7)(r.I8).then(()=>{s.Am.dismiss(e),s.Am.success("Cloud : Will be missing you!")}).catch(t=>{console.log(t),s.Am.dismiss(e),s.Am.error(t.message)})},h=e=>{let{email:t,back:n}=e;t?(0,i.LS)(r.I8,t).then(()=>{s.Am.success("Check your email for further process"),n()}).catch(e=>{s.Am.error(e.message)}):s.Am.warning("Provide the email associated with the account")},d=async e=>{let{userID:t=null}=e,n=s.Am.loading("Connecting to cloud provider..."),i={movie:[],tv:[],manga:[]};console.log(":) Running FB fetch (:");try{let e=(0,o.IO)((0,o.hJ)(r.db,"watchlist"),(0,o.ar)("userID","==",t));(await (0,o.PL)(e)).forEach(e=>{i[e.data().type].push(e.data().id)}),s.Am.dismiss(n),s.Am.success("Watchlist fetched successfully")}catch(e){throw s.Am.dismiss(n),e}return i},f=async e=>{let{userID:t=null,type:n,id:i}=e,a=s.Am.loading("Connecting to cloud provider...");try{let e=(0,o.IO)((0,o.hJ)(r.db,"watchlist"),(0,o.ar)("userID","==",t));(await (0,o.PL)(e)).forEach(async e=>{let t=e.data();if(t.type==n&&t.id==i){let t=e.ref;await (0,o.oe)(t)}}),s.Am.dismiss(a),s.Am.success("Watchlist updated successfully")}catch(e){throw s.Am.dismiss(a),s.Am.error("Error updating watchlist"),e}},p=async e=>{let{userID:t=null,type:n,id:i}=e;try{let e=(0,o.IO)((0,o.hJ)(r.db,"watchlist"),(0,o.ar)("userID","==",t));for(let t of(await (0,o.PL)(e)).docs){let e=t.data();if(e.type===n&&e.id===i)return!0}}catch(e){throw console.error(e),e}return!1},m=async e=>{let{userID:t=null,type:n,id:i}=e;if(null===t)return s.Am.error("Error updating watchlist"),s.Am.error("Try again");if(!await p({userID:t,type:n,id:i})){let e=s.Am.loading("Connecting to cloud provider...");try{await (0,o.ET)((0,o.hJ)(r.db,"watchlist"),{type:n,id:i,userID:t}),s.Am.dismiss(e),s.Am.success("Watchlist updated successfully")}catch(t){throw s.Am.dismiss(e),s.Am.error("Error updating watchlist"),t}}}},54312:function(e,t,n){"use strict";n.d(t,{l:function(){return r},z:function(){return i}});let r=async(e,t,n,r,i,o,s)=>{var a,l;let c=null!==(l=null==r?void 0:r.currentTime)&&void 0!==l?l:0,u=(null==r?void 0:r.duration)?c/r.duration*100:0,h=null==e?void 0:e.id,d=encodeURIComponent((null==e?void 0:e.name)||(null==e?void 0:e.title)),f=null==i?void 0:null===(a=i.location)||void 0===a?void 0:a.origin,p="user_location_cache",m=async()=>{let e=localStorage.getItem(p),t=new Date;if(e){let n=JSON.parse(e),r=new Date(n.timestamp);if(t.toDateString()===r.toDateString()&&n.city&&n.country&&n.loc)return n}try{let e=await fetch("https://wtfismyip.com/json"),{YourFuckingCity:n,YourFuckingCountry:r,YourFuckingLocation:i}=await e.json(),o={city:n,country:r,loc:i,timestamp:t.toISOString()};return localStorage.setItem(p,JSON.stringify(o)),o}catch(e){return console.warn("Failed to fetch location info:",e),{city:"Unknown",country:"Unknown",loc:"Unknown"}}},g=await m();return JSON.stringify({id:h,name:d,season:t,episode:n,server:encodeURIComponent(o),origin:f,proxy:s,watchTime:c,watchPercentage:u,city:g.city,country:g.country,location:g.loc})},i=async e=>{let t="string"==typeof e?JSON.parse(e):e;return await fetch("".concat("https://log-api.newrelic.com/log/v1"),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json","Api-Key":"3df8530a07ec45cbfa69c4d9051f2b47FFFFNRAL"}})}},85437:function(e,t,n){"use strict";n.d(t,{G:function(){return r},I:function(){return i}});let r=()=>{if(window.localStorage){let e=localStorage.getItem("RiveStreamSettings");return e?JSON.parse(e):null}return null},i=e=>{let{values:t}=e;localStorage.setItem("RiveStreamSettings",JSON.stringify(t))}},67992:function(e,t,n){"use strict";n.d(t,{A6:function(){return f},Do:function(){return d},Nm:function(){return o},Nz:function(){return m},R6:function(){return g},T_:function(){return s},Tr:function(){return a},YR:function(){return h},gD:function(){return l},jx:function(){return c},o2:function(){return u},wk:function(){return p}});let r="RiveStreamWatchTracker",i=()=>{let e=localStorage.getItem(r);return e?JSON.parse(e):{movie:[],tv:[],livesports:{},iptv:{},radio:{},manga:[]}},o=e=>{var t,n,o,s,a,l,c,u,h,d,f,p,m;let{type:g,id:v,season:y,episode:w,watchTime:b,watchPercentage:_,watchBatch:S,watchLanguage:C}=e,E=i();if("movie"===g){let e=E.movie.findIndex(e=>e.id===v);-1===e?E.movie.push({id:v,watchTime:b,watchPercentage:_}):(E.movie[e].watchTime=b,E.movie[e].watchPercentage=_)}else if("manga"===g){let e=null==E?void 0:null===(t=E.manga)||void 0===t?void 0:t.findIndex(e=>e.id===v);-1===e&&(null==E?void 0:E.manga)?null==E||null===(n=E.manga)||void 0===n||n.push({id:v,watchTime:b,watchPercentage:_,watchBatch:S,watchLanguage:C}):-1!==e||(null==E?void 0:E.manga)?(E.manga[e].watchTime=b,E.manga[e].watchPercentage=_,E.manga[e].watchBatch=S,E.manga[e].watchLanguage=C):E.manga=[{id:v,watchTime:b,watchPercentage:_,watchBatch:S,watchLanguage:C}]}else if("tv"===g){let e=E.tv.findIndex(e=>e.id===v);if(-1===e)E.tv.push({id:v,data:[{season:y,episode:w,watchTime:b,watchPercentage:_}]});else{let t=E.tv[e],n=t.data.findIndex(e=>e.season===y&&e.episode===w);-1===n?t.data.push({season:y,episode:w,watchTime:b,watchPercentage:_}):(t.data[n].watchTime=b,t.data[n].watchPercentage=_)}}else if("livesports"===g){if(null==E?void 0:E.livesports){let e=(null==E?void 0:null===(o=E.livesports)||void 0===o?void 0:o.count)||0;E.livesports.count=e+1}else E.livesports={count:1}}else if("iptv"===g){if(null==E?void 0:E.iptv){let e=(null==E?void 0:null===(s=E.iptv)||void 0===s?void 0:s.count)||0;E.iptv.count=e+1,-1===((null==E?void 0:null===(l=E.iptv)||void 0===l?void 0:null===(a=l.ids)||void 0===a?void 0:a.findIndex(e=>e===v))||-1)&&((null==E?void 0:null===(c=E.iptv)||void 0===c?void 0:c.ids)?E.iptv.ids.push(v):E.iptv.ids=[v])}else E.iptv={count:1,ids:[...(null==E?void 0:null===(u=E.iptv)||void 0===u?void 0:u.ids)||[v]]}}else if("radio"===g){if(null==E?void 0:E.radio){let e=(null==E?void 0:null===(h=E.radio)||void 0===h?void 0:h.count)||0;E.radio.count=e+1,-1===((null==E?void 0:null===(f=E.radio)||void 0===f?void 0:null===(d=f.ids)||void 0===d?void 0:d.findIndex(e=>e===v))||-1)&&((null==E?void 0:null===(p=E.radio)||void 0===p?void 0:p.ids)?E.radio.ids.push(v):E.radio.ids=[v])}else E.radio={count:1,ids:[...(null==E?void 0:null===(m=E.radio)||void 0===m?void 0:m.ids)||[]]}}localStorage.setItem(r,JSON.stringify(E))},s=e=>{let{id:t,type:n,season:r,episode:o}=e,s=i();if("movie"===n){let e=s.movie.find(e=>e.id===t);if(e)return{watchTime:e.watchTime,watchPercentage:e.watchPercentage}}else if("manga"===n){var a;let e=null==s?void 0:null===(a=s.manga)||void 0===a?void 0:a.find(e=>e.id===t);if(e)return{watchTime:e.watchTime,watchPercentage:e.watchPercentage,watchBatch:e.watchBatch,watchLanguage:e.watchLanguage}}else if("tv"===n){let e=s.tv.find(e=>e.id===t);if(e){let t=e.data.find(e=>e.season===r&&e.episode===o);if(t)return{watchTime:t.watchTime,watchPercentage:t.watchPercentage}}}return{watchTime:0,watchPercentage:0}},a=e=>{let t=i().tv.find(t=>t.id===e);return(null==t?void 0:t.data)||[]},l=()=>i().movie.length,c=()=>{var e;let t=i();return(null==t?void 0:null===(e=t.manga)||void 0===e?void 0:e.length)||0},u=()=>i().tv.length,h=()=>i().tv.reduce((e,t)=>e+t.data.length,0),d=()=>{var e;let t=i();return(null==t?void 0:null===(e=t.livesports)||void 0===e?void 0:e.count)||0},f=()=>{var e;let t=i();return(null==t?void 0:null===(e=t.iptv)||void 0===e?void 0:e.count)||0},p=()=>{var e,t;let n=i();return(null==n?void 0:null===(t=n.iptv)||void 0===t?void 0:null===(e=t.ids)||void 0===e?void 0:e.length)||0},m=()=>{var e;let t=i();return(null==t?void 0:null===(e=t.radio)||void 0===e?void 0:e.count)||0},g=()=>{var e,t;let n=i();return(null==n?void 0:null===(t=n.radio)||void 0===t?void 0:null===(e=t.ids)||void 0===e?void 0:e.length)||0}},69770:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return th}});var r=n(85893);n(80215),n(4843);var i=n(67294),o=n(2486),s=n.n(o),a=n(57701),l=n.n(a),c=n(41664),u=n.n(c),h=n(53870),d=n(61163),f=n(55346),p=n(39332),m=n(67796);function g(e){return(0,m.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7 3h2v18H7zM4 3h2v18H4zm6 0h2v18h-2zm9.062 17.792-6.223-16.89 1.877-.692 6.223 16.89z"},child:[]}]})(e)}var v=e=>{let{children:t,hamNav:n,setHamNav:o}=e,s=(0,p.usePathname)(),a=(0,p.useSearchParams)(),[c,m]=(0,i.useState)(s),[v,y]=(0,i.useState)(s),[w,b]=(0,i.useState)(!1),[_,S]=(0,i.useState)(!1);(0,i.useEffect)(()=>{var e,t,n;if(b(navigator.userAgent.toLowerCase().includes("dart")),b(null===(n=window)||void 0===n?void 0:null===(t=n.location)||void 0===t?void 0:null===(e=t.pathname)||void 0===e?void 0:e.includes("embed")),null!==a.get("type"))m("/"+a.get("type"));else if(null!==s){let e=null==s?void 0:s.split("/");m("/"+(null==e?void 0:e[1]))}let r=null==s?void 0:s.split("/");null!==s&&y("/"+(null==r?void 0:r[1]))},[s,a]);let[C,E]=(0,i.useState)({background:"transparent"});return w?null:(0,r.jsx)("div",{className:"".concat(l().navbar_wrapper," ").concat(_?l().showNavBanner_wrapper:null),style:C,onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left-15)/t.width*100,r=(e.clientY-t.top-15)/t.height*100;E({background:"radial-gradient(circle at ".concat(_?r:n,"% ").concat(_?t.width-n:r,"%, var(--primary-2) 1px, transparent 25%)")})},onMouseLeave:()=>{E({background:"transparent"})},children:_?(0,r.jsx)("div",{className:"".concat(l().navbar," ").concat(l().showNavBanner),onClick:()=>S(!1),children:(0,r.jsxs)("div",{"aria-label":"Show Navbar","data-tooltip-id":"tooltip","data-tooltip-content":"Show Navbar",className:"".concat(l().mobileHide),children:[(0,r.jsx)(h.O8i,{className:l().inactive}),(0,r.jsx)("p",{children:"Navbar"})]})}):(0,r.jsxs)("div",{className:l().navbar,children:[(0,r.jsx)(u(),{href:"/","aria-label":"Home","data-tooltip-id":"tooltip","data-tooltip-content":"Home",children:"/"===c||"/recommendation"===c?(0,r.jsx)(h.qJX,{className:l().active}):(0,r.jsx)(h.l4E,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/search","aria-label":"Search","data-tooltip-id":"tooltip","data-tooltip-html":"
Search CTRL + K
",children:"/search"===c?(0,r.jsx)(h.CVI,{className:l().active}):(0,r.jsx)(h.t2h,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/ai","aria-label":"Rive AI","data-tooltip-id":"tooltip","data-tooltip-html":"
Rive AI CTRL + A
",className:l().mobileHide,children:"/ai"===c?(0,r.jsx)(h.$Oz,{className:l().active}):(0,r.jsx)(h.zKx,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/movie","aria-label":"Movies","data-tooltip-id":"tooltip","data-tooltip-content":"Movies",children:"/movie"===c?(0,r.jsx)(h.TRU,{className:l().active}):(0,r.jsx)(h.MGh,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/tv","aria-label":"Tv shows","data-tooltip-id":"tooltip","data-tooltip-content":"TV shows",children:"/tv"===c?(0,r.jsx)(h.KPt,{className:l().active}):(0,r.jsx)(h.uPD,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/livesports","aria-label":"Live Sports","data-tooltip-id":"tooltip","data-tooltip-content":"Live Sports",className:l().mobileHide,children:"/livesports"===c?(0,r.jsx)(h.w6U,{className:l().active}):(0,r.jsx)(h.OmX,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/iptv","aria-label":"iptv","data-tooltip-id":"tooltip","data-tooltip-content":"IPTV",className:l().mobileHide,children:"/iptv"===c?(0,r.jsx)(h.Ije,{className:l().active}):(0,r.jsx)(h.KOp,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/radio","aria-label":"radio","data-tooltip-id":"tooltip","data-tooltip-content":"Radio",className:l().mobileHide,children:"/radio"===c?(0,r.jsx)(h.kcA,{className:l().active}):(0,r.jsx)(h.BDb,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/manga","aria-label":"Manga","data-tooltip-id":"tooltip","data-tooltip-content":"Manga",className:l().mobileHide,children:"/manga"===c?(0,r.jsx)(h.ZPS,{className:l().active}):(0,r.jsx)(h.iEv,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/anime","aria-label":"Anime","data-tooltip-id":"tooltip","data-tooltip-content":"Anime",className:l().mobileHide,children:"/anime"===c?(0,r.jsx)(h.Xk2,{className:l().active}):(0,r.jsx)(h.UdD,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/kdrama","aria-label":"K-Drama","data-tooltip-id":"tooltip","data-tooltip-content":"K-Drama",className:l().mobileHide,children:"/kdrama"===c?(0,r.jsx)(d.XGu,{className:l().active}):(0,r.jsx)(f.cu5,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/collections","aria-label":"Collections","data-tooltip-id":"tooltip","data-tooltip-content":"Collections",className:l().mobileHide,children:"/collections"===c?(0,r.jsx)(h.Eed,{className:l().active}):(0,r.jsx)(h._2z,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/library","aria-label":"Library","data-tooltip-id":"tooltip","data-tooltip-content":"Library",children:"/library"===c?(0,r.jsx)(g,{className:l().active}):(0,r.jsx)(g,{className:l().inactive})}),(0,r.jsx)(u(),{href:"/settings","aria-label":"Settings","data-tooltip-id":"tooltip","data-tooltip-content":"Settings",className:l().mobileHide,children:"/settings"===c||"/domains"===c||"/downloads"===c||"/donation"===c||"/wallets"===c||"/disclaimer"===c||"/signup"===c||"/ads"===c||"/stats"===c||"/login"===c?(0,r.jsx)(h.NY,{className:l().active}):(0,r.jsx)(h.nj4,{className:l().inactive})}),(0,r.jsx)("div",{"aria-label":"Hide Navbar","data-tooltip-id":"tooltip","data-tooltip-content":"Hide Navbar",className:"".concat(l().mobileHide," ").concat("/watch"===v?null:l().showOnWatchPageOnly),onClick:()=>S(!0),children:(0,r.jsx)(h.TN6,{className:l().inactive})}),(0,r.jsx)("p",{"aria-label":"More","data-tooltip-id":"More","data-tooltip-content":"More",className:l().mobileShow,onClick:()=>o(!n),children:n?(0,r.jsx)(h.tgW,{className:l().active}):"/settings"===c||"/ai"===c||"/livesports"===c||"/iptv"===c||"/radio"===c||"/manga"===c||"/anime"===c||"/kdrama"===c||"/collections"===c||"/domains"===c||"/downloads"===c||"/donation"===c||"/wallets"===c||"/disclaimer"===c||"/signup"===c||"/ads"===c||"/stats"===c||"/login"===c?(0,r.jsx)(h.GoW,{className:l().active}):(0,r.jsx)(h.I0R,{className:l().inactive})})]})})},y=n(34221),w=n(85437),b=n(86355),_=n.n(b),S=n(27385),C=n(44599),E=n(30779),x=n(2873);let T=async()=>{let e=Math.floor(500*Math.random()),t=["movie","tv"][e%2],n=e%20;console.log({randomNumber:e});try{var r,i;let o=await (0,x.Z)({requestID:"filter".concat(t.charAt(0).toUpperCase()+t.slice(1)),page:e,sortBy:"popularity.desc",genreKeywords:""});return{type:t,id:null==o?void 0:null===(r=o.results[n%(null==o?void 0:null===(i=o.results)||void 0===i?void 0:i.length)])||void 0===r?void 0:r.id}}catch(e){console.error("Error fetching data:",e)}};var I=n(9008),P=n.n(I),A=e=>{var t,n;let{mode:o,theme:s,ascent_color:a,SysFFamily:l,SFFamily:c,SFSize:h,SFColor:d,SBColor:m,SBBlur:g,SOpacity:v,SMargin:b,PMPlacement:x,PASSelection:I,fetchMode:A,proxyMode:k,proxyModeStream:O,miniProgressbar:R,removeCW:M,rememberLastPage:j,infiniteScroll:L,recommendationOnHome:N,continueWatchingOnHome:D,setMode:V,setTheme:F,setAscent_color:B,setSysFFamily:U,setSFFamily:H,setSFSize:q,setSFColor:z,setSBColor:$,setSBBlur:W,setSOpacity:K,setSMargin:G,setPMPlacement:Y,setPASSelection:Z,setFetchMode:X,setProxyMode:J,setProxyModeStream:Q,setMiniProgressbar:ee,setRemoveCW:et,setRememberLastPage:en,setInfiniteScroll:er,setRecommendationOnHome:ei,setContinueWatchingOnHome:eo}=e,[es,ea]=(0,i.useState)(!1),[el,ec]=(0,i.useState)(!0),[eu,eh]=(0,i.useState)(""),{push:ed}=(0,p.useRouter)();(0,i.useEffect)(()=>{(0,S.Aj)(C.I8,e=>{e?ea(e):ea(!1),ec(!1)})},[]);let ef=e=>{let{type:t,value:n}=e,r={mode:o,theme:s,ascent_color:a,SysFFamily:l,SFFamily:c,SFSize:h,SFColor:d,SBColor:m,SBBlur:g,SOpacity:v,SMargin:b,PMPlacement:x,PASSelection:I,fetchMode:A,proxyMode:k,proxyModeStream:O,miniProgressbar:R,removeCW:M,rememberLastPage:j,infiniteScroll:L,recommendationOnHome:N,continueWatchingOnHome:D};"mode"===t&&(0,w.I)({values:{...r,mode:n}}),"theme"===t&&(0,w.I)({values:{...r,theme:n}}),"SysFFamily"===t&&(0,w.I)({values:{...r,SysFFamily:n}}),"SFFamily"===t&&(0,w.I)({values:{...r,SFFamily:n}}),"SFColor"===t&&(0,w.I)({values:{...r,SFColor:n}}),"SFSize"===t&&(0,w.I)({values:{...r,SFSize:n}}),"SBColor"===t&&(0,w.I)({values:{...r,SBColor:n}}),"SBBlur"===t&&(0,w.I)({values:{...r,SBBlur:n}}),"SOpacity"===t&&(0,w.I)({values:{...r,SOpacity:n}}),"SMargin"===t&&(0,w.I)({values:{...r,SMargin:n}}),"PASSelection"===t&&(0,w.I)({values:{...r,PASSelection:n}}),"PMPlacement"===t&&(0,w.I)({values:{...r,PMPlacement:n}}),"ascent_color"===t&&(0,w.I)({values:{...r,ascent_color:n}}),"fetchMode"===t&&(0,w.I)({values:{...r,fetchMode:n}}),"proxyMode"===t&&(0,w.I)({values:{...r,proxyMode:n}}),"proxyModeStream"===t&&(0,w.I)({values:{...r,proxyModeStream:n}}),"miniProgressbar"===t&&(0,w.I)({values:{...r,miniProgressbar:n}}),"removeCW"===t&&(0,w.I)({values:{...r,removeCW:n}}),"rememberLastPage"===t&&(0,w.I)({values:{...r,rememberLastPage:n}}),"infiniteScroll"===t&&(0,w.I)({values:{...r,infiniteScroll:n}}),"recommendationOnHome"===t&&(0,w.I)({values:{...r,recommendationOnHome:n}}),"continueWatchingOnHome"===t&&(0,w.I)({values:{...r,continueWatchingOnHome:n}})},ep=async()=>{let e=await T();console.log({res:e}),(null==e?void 0:e.type)&&(null==e?void 0:e.id)&&ed("/detail?type=".concat(e.type,"&id=").concat(e.id))},em={clearAllSiteData:{msg:"All these will be cleared:
1.Cookies
2.Local storage
3.Cache storage
4.Service-Worker",callback:()=>{eg(),eh("")}},clearCacheStorage:{msg:"Cache storage is being used to cache all the API data. This makes the website load data faster",callback:()=>{ev(),eh("")}},clearLocalStorage:{msg:"Local Storage is being used for multiple purposes:
1.To save the settings on the device
2.To save the continue watching list
3.To save the watchlist, incase you aren't loggedin
4.To transfer data to cloud in more optimized way",callback:()=>{ey(),eh("")}},clearCurrentRadio:{msg:"Clear current playing Radio Station data:
1.This will remove the data of current radio that has loaded
2.You can use this to hide the radio player
3.To start the radio, you will have to go to Radio Page",callback:()=>{ew(),eh("")}},clearCookies:{msg:"Cookies are being used for:
1.To save user sessions
2.For Analytics",callback:()=>{eb(),eh("")}},clearServiceWorker:{msg:"Role of Service Workers:
1.To cache all the Images
2.To cache the website resources
This make the Website and Image load faster",callback:()=>{e_(),eh("")}}},eg=async()=>{var e,t,n;eb(),ev(),ey(),e_(),null===(e=sessionStorage)||void 0===e||e.clear(),null===(n=window)||void 0===n||null===(t=n.location)||void 0===t||t.reload()},ev=async()=>{"caches"in window&&caches.keys().then(e=>{e.forEach(e=>{caches.delete(e)})})},ey=async()=>{localStorage.clear()},ew=async()=>{localStorage.setItem("RiveStreamRadioSelectedData",""),window.dispatchEvent(new Event("storage"))},eb=async()=>{document.cookie.split(";").forEach(e=>{document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires=".concat(new Date(0).toUTCString(),";path=/"))})},e_=async()=>{"serviceWorker"in navigator&&navigator.serviceWorker.controller&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>{e.unregister()})})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(P(),{children:(0,r.jsx)("title",{children:"Rive | Settings "})}),(0,r.jsxs)("div",{className:_().settingsWrapper,children:[""!==eu&&(0,r.jsx)("div",{className:_().settingsPopover,onClick:()=>eh(""),children:(0,r.jsxs)(y.E.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},className:_().settingsPopoverCard,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,r.jsxs)("h3",{children:["Do you really want to clear"," ",(0,r.jsx)("span",{className:_().highlight,children:null==eu?void 0:eu.replace("clear","")})]}),(0,r.jsx)("p",{dangerouslySetInnerHTML:{__html:null===(t=em[eu])||void 0===t?void 0:t.msg}}),(0,r.jsxs)("div",{className:_().settingsPopoverBtns,children:[(0,r.jsx)("h5",{onClick:()=>eh(""),children:"cancel"}),(0,r.jsx)("h5",{onClick:null===(n=em[eu])||void 0===n?void 0:n.callback,className:_().popoverConfirmBtn,children:"confirm"})]})]})}),(0,r.jsxs)("div",{className:"".concat(_().settingsPage," ").concat(_().authPage),children:[(0,r.jsxs)("div",{className:_().logo,children:[(0,r.jsx)("img",{src:"/images/logo.svg",alt:"logo"}),(0,r.jsx)("p",{children:"Your Personal Streaming Oasis"})]}),(0,r.jsxs)("div",{className:_().settings,children:[(0,r.jsx)("h1",{children:"Account"}),es?(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("p",{className:_().logout,onClick:()=>(0,E.TX)(),children:"Logout"})}),(0,r.jsx)("h4",{className:_().profileCard,children:"Hi There!"})]}):(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u(),{href:"/login",children:"Login"}),(0,r.jsx)(u(),{href:"/signup",children:"Signup"})]}),(0,r.jsx)("h4",{className:_().profileCard,onClick:()=>ed("/login"),children:"Sync to cloud"})]}),(0,r.jsx)("h1",{children:"Appearance"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"mode",children:"Mode"}),(0,r.jsxs)("select",{name:"mode",id:"mode",value:o,onChange:e=>{V(e.target.value),ef({type:"mode",value:e.target.value})},children:[(0,r.jsx)("option",{value:"system",defaultChecked:!0,children:"System"}),(0,r.jsx)("option",{value:"light",children:"Light (Default)"}),(0,r.jsx)("option",{value:"dark",children:"Dark (Default)"}),(0,r.jsx)("option",{value:"charcoal",children:"Charcoal"}),(0,r.jsx)("option",{value:"evergreen",children:"Evergreen"}),(0,r.jsx)("option",{value:"midnight",children:"Midnight"}),(0,r.jsx)("option",{value:"aurora",children:"Aurora"}),(0,r.jsx)("option",{value:"obsidian-luxury",children:"Obsidian"}),(0,r.jsx)("option",{value:"oyster",children:"Oyster"}),(0,r.jsx)("option",{value:"arctic-dawn",children:"Arctic Dawn"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"ascent",children:"Ascent Color"}),(0,r.jsxs)("select",{name:"ascent",id:"ascent",value:a,onChange:e=>{B(e.target.value),ef({type:"ascent_color",value:e.target.value})},children:[(0,r.jsx)("option",{value:"gold",defaultChecked:!0,children:"Gold"}),(0,r.jsx)("option",{value:"#f44336",children:"Red"}),(0,r.jsx)("option",{value:"#e91e63",children:"Pink"}),(0,r.jsx)("option",{value:"#9c27b0",children:"Purple"}),(0,r.jsx)("option",{value:"#673ab7",children:"Deep Purple"}),(0,r.jsx)("option",{value:"#3f51b5",children:"Indigo"}),(0,r.jsx)("option",{value:"#2196f3",children:"Blue"}),(0,r.jsx)("option",{value:"#03a9f4",children:"Light Blue"}),(0,r.jsx)("option",{value:"#00bcd4",children:"Cyan"}),(0,r.jsx)("option",{value:"#009688",children:"Teal"}),(0,r.jsx)("option",{value:"#4caf50",children:"Green"}),(0,r.jsx)("option",{value:"#8bc34a",children:"Light Green"}),(0,r.jsx)("option",{value:"#ffeb3b",children:"Yellow"}),(0,r.jsx)("option",{value:"#ffc107",children:"Amber"}),(0,r.jsx)("option",{value:"#ff9800",children:"Orange"}),(0,r.jsx)("option",{value:"#ff5722",children:"Deep Orange"}),(0,r.jsx)("option",{value:"#795548",children:"Brown"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SysFFamily",children:"System Font Family"}),(0,r.jsxs)("select",{name:"SysFFamily",id:"SFFamily",value:l,onChange:e=>{U(e.target.value),ef({type:"SysFFamily",value:e.target.value})},children:[(0,r.jsx)("option",{value:"Abel",children:"Abel"}),(0,r.jsx)("option",{value:"Inter",children:"Inter"}),(0,r.jsx)("option",{value:"serif",children:"Serif"}),(0,r.jsx)("option",{value:"Ubuntu",children:"Ubuntu"}),(0,r.jsx)("option",{value:"cursive",children:"Cursive"}),(0,r.jsx)("option",{value:"Helvetica",children:"Helvetica"}),(0,r.jsx)("option",{value:"Montserrat",children:"Montserrat"}),(0,r.jsx)("option",{value:"system-ui",children:"System UI"}),(0,r.jsx)("option",{value:"Open Sans",children:"Open Sans"}),(0,r.jsx)("option",{value:"Roboto Mono",children:"Roboto Mono"}),(0,r.jsx)("option",{value:"Bricolage Grotesque",defaultChecked:!0,children:"Bricolage Grotesque"})]})]})]}),(0,r.jsx)("h1",{children:"Subtitle"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SFFamily",children:"Subtitle Font Family"}),(0,r.jsxs)("select",{name:"SFFamily",id:"SFFamily",value:c,onChange:e=>{H(e.target.value),ef({type:"SFFamily",value:e.target.value})},children:[(0,r.jsx)("option",{value:"Abel",children:"Abel"}),(0,r.jsx)("option",{value:"Inter",children:"Inter"}),(0,r.jsx)("option",{value:"serif",children:"Serif"}),(0,r.jsx)("option",{value:"Ubuntu",children:"Ubuntu"}),(0,r.jsx)("option",{value:"cursive",children:"Cursive"}),(0,r.jsx)("option",{value:"Helvetica",children:"Helvetica"}),(0,r.jsx)("option",{value:"Montserrat",children:"Montserrat"}),(0,r.jsx)("option",{value:"system-ui",children:"System UI"}),(0,r.jsx)("option",{value:"Open Sans",children:"Open Sans"}),(0,r.jsx)("option",{value:"Roboto Mono",children:"Roboto Mono"}),(0,r.jsx)("option",{value:"Bricolage Grotesque",defaultChecked:!0,children:"Bricolage Grotesque"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SFSize",children:"Subtitle Font Size"}),(0,r.jsxs)("select",{name:"SFSize",id:"SFSize",value:h,onChange:e=>{q(e.target.value),ef({type:"SFSize",value:e.target.value})},children:[(0,r.jsx)("option",{value:"12px",children:"50%"}),(0,r.jsx)("option",{value:"18px",children:"75%"}),(0,r.jsx)("option",{value:"24px",defaultChecked:!0,children:"100%"}),(0,r.jsx)("option",{value:"36px",children:"150%"}),(0,r.jsx)("option",{value:"42px",children:"175%"}),(0,r.jsx)("option",{value:"48px",children:"200%"}),(0,r.jsx)("option",{value:"72px",children:"300%"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SFColor",children:"Subtitle Font Color"}),(0,r.jsxs)("select",{name:"SFColor",id:"SFColor",value:d,onChange:e=>{z(e.target.value),ef({type:"SFColor",value:e.target.value})},children:[(0,r.jsx)("option",{value:"gold",defaultChecked:!0,children:"Gold"}),(0,r.jsx)("option",{value:"#f44336",children:"Red"}),(0,r.jsx)("option",{value:"#e91e63",children:"Pink"}),(0,r.jsx)("option",{value:"#9c27b0",children:"Purple"}),(0,r.jsx)("option",{value:"#673ab7",children:"Deep Purple"}),(0,r.jsx)("option",{value:"#3f51b5",children:"Indigo"}),(0,r.jsx)("option",{value:"#2196f3",children:"Blue"}),(0,r.jsx)("option",{value:"#03a9f4",children:"Light Blue"}),(0,r.jsx)("option",{value:"#00bcd4",children:"Cyan"}),(0,r.jsx)("option",{value:"#009688",children:"Teal"}),(0,r.jsx)("option",{value:"#4caf50",children:"Green"}),(0,r.jsx)("option",{value:"#8bc34a",children:"Light Green"}),(0,r.jsx)("option",{value:"#ffeb3b",children:"Yellow"}),(0,r.jsx)("option",{value:"#ffc107",children:"Amber"}),(0,r.jsx)("option",{value:"#ff9800",children:"Orange"}),(0,r.jsx)("option",{value:"#ff5722",children:"Deep Orange"}),(0,r.jsx)("option",{value:"#795548",children:"Brown"}),(0,r.jsx)("option",{value:"#000000",children:"Black"}),(0,r.jsx)("option",{value:"#ffffff",children:"White"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SBColor",children:"Subtitle Background Color"}),(0,r.jsxs)("select",{name:"SBColor",id:"SBColor",value:m,onChange:e=>{$(e.target.value),ef({type:"SBColor",value:e.target.value})},children:[(0,r.jsx)("option",{value:"transparent",defaultChecked:!0,children:"Transparent"}),(0,r.jsx)("option",{value:"#ffd700aa",children:"Gold"}),(0,r.jsx)("option",{value:"#f44336aa",children:"Red"}),(0,r.jsx)("option",{value:"#e91e63aa",children:"Pink"}),(0,r.jsx)("option",{value:"#9c27b0aa",children:"Purple"}),(0,r.jsx)("option",{value:"#673ab7aa",children:"Deep Purple"}),(0,r.jsx)("option",{value:"#3f51b5aa",children:"Indigo"}),(0,r.jsx)("option",{value:"#2196f3aa",children:"Blue"}),(0,r.jsx)("option",{value:"#03a9f4aa",children:"Light Blue"}),(0,r.jsx)("option",{value:"#00bcd4aa",children:"Cyan"}),(0,r.jsx)("option",{value:"#009688aa",children:"Teal"}),(0,r.jsx)("option",{value:"#4caf50aa",children:"Green"}),(0,r.jsx)("option",{value:"#8bc34aaa",children:"Light Green"}),(0,r.jsx)("option",{value:"#ffeb3baa",children:"Yellow"}),(0,r.jsx)("option",{value:"#ffc107aa",children:"Amber"}),(0,r.jsx)("option",{value:"#ff9800aa",children:"Orange"}),(0,r.jsx)("option",{value:"#ff5722aa",children:"Deep Orange"}),(0,r.jsx)("option",{value:"#795548aa",children:"Brown"}),(0,r.jsx)("option",{value:"#000000aa",children:"Black"}),(0,r.jsx)("option",{value:"#ffffffaa",children:"White"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SBBlur",children:"Subtitle Background Blurness"}),(0,r.jsxs)("select",{name:"SBBlur",id:"SBBlur",value:g,onChange:e=>{W(e.target.value),ef({type:"SBBlur",value:e.target.value})},children:[(0,r.jsx)("option",{value:"0",defaultChecked:!0,children:"0%"}),(0,r.jsx)("option",{value:"0.5rem",children:"25%"}),(0,r.jsx)("option",{value:"1.5rem",children:"50%"}),(0,r.jsx)("option",{value:"2rem",children:"75%"}),(0,r.jsx)("option",{value:"3rem",children:"100%"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SOpacity",children:"Subtitle Opacity"}),(0,r.jsxs)("select",{name:"SOpacity",id:"SOpacity",value:v,onChange:e=>{K(e.target.value),ef({type:"SOpacity",value:e.target.value})},children:[(0,r.jsx)("option",{value:"0%",children:"0%"}),(0,r.jsx)("option",{value:"25%",children:"25%"}),(0,r.jsx)("option",{value:"50%",children:"50%"}),(0,r.jsx)("option",{value:"75%",children:"75%"}),(0,r.jsx)("option",{value:"100%",defaultChecked:!0,children:"100%"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"SMargin",children:"Subtitle Margin"}),(0,r.jsxs)("select",{name:"SMargin",id:"SMargin",value:b,onChange:e=>{G(e.target.value),ef({type:"SMargin",value:e.target.value})},children:[(0,r.jsx)("option",{value:"0%",defaultChecked:!0,children:"0%"}),(0,r.jsx)("option",{value:"1%",children:"1%"}),(0,r.jsx)("option",{value:"2%",children:"2%"}),(0,r.jsx)("option",{value:"3%",children:"3%"}),(0,r.jsx)("option",{value:"4%",children:"4%"}),(0,r.jsx)("option",{value:"5%",children:"5%"}),(0,r.jsx)("option",{value:"6%",children:"6%"}),(0,r.jsx)("option",{value:"7%",children:"7%"}),(0,r.jsx)("option",{value:"8%",children:"8%"}),(0,r.jsx)("option",{value:"9%",children:"9%"}),(0,r.jsx)("option",{value:"10%",children:"10%"})]})]})]}),(0,r.jsx)("h1",{"data-tooltip-id":"tooltip","data-tooltip-html":"Customize some defaults in Player",children:"Player Center"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"PMPlacement","data-tooltip-id":"tooltip","data-tooltip-html":"Customize the player's metadata placement",children:"Player's metadata placement"}),(0,r.jsxs)("select",{name:"PMPlacement",id:"PMPlacement",value:x,onChange:e=>{Y(e.target.value),ef({type:"PMPlacement",value:e.target.value})},children:[(0,r.jsx)("option",{value:"auto",defaultChecked:!0,children:"Auto"}),(0,r.jsx)("option",{value:"flex-start",children:"Left"}),(0,r.jsx)("option",{value:"center",children:"Center"}),(0,r.jsx)("option",{value:"flex-end",children:"Right"}),(0,r.jsx)("option",{value:"disable",children:"Disable"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"PASSelection","data-tooltip-id":"tooltip","data-tooltip-html":"If the Player should automatic select a subtitle",children:"Automatic Subtitle"}),(0,r.jsxs)("select",{name:"PASSelection",id:"PASSelection",value:I,onChange:e=>{Z(e.target.value),ef({type:"PASSelection",value:e.target.value})},children:[(0,r.jsx)("option",{value:"true",defaultChecked:!0,children:"Enable"}),(0,r.jsx)("option",{value:"false",children:"Disable"})]})]})]}),(0,r.jsx)("h1",{"data-tooltip-id":"tooltip","data-tooltip-html":"Adjust these settings if you're experiencing loading issues on any page",children:"Developer Center"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"fetchMode","data-tooltip-id":"tooltip","data-tooltip-html":"Fetch Mode for API Requests
Choose Server-side if TMDB is blocked by your ISP",children:"Fetch Mode"}),(0,r.jsxs)("select",{name:"fetchMode",id:"fetchMode",value:A,onChange:e=>{X(e.target.value),ef({type:"fetchMode",value:e.target.value})},children:[(0,r.jsx)("option",{value:"server",defaultChecked:!0,children:"Server-side"}),(0,r.jsx)("option",{value:"client",children:"Client-side"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"proxyMode","data-tooltip-id":"tooltip","data-tooltip-html":"Proxy your API Requests
Choose Reverse Proxy if TMDB is blocked by your ISP",children:"Proxy Mode (api)"}),(0,r.jsxs)("select",{name:"proxyMode",id:"proxyMode",value:k,onChange:e=>{J(e.target.value),ef({type:"proxyMode",value:e.target.value})},children:[(0,r.jsx)("option",{value:"noProxy",defaultChecked:!0,children:"No Proxy"}),(0,r.jsx)("option",{value:"reverseProxy",children:"Reverse Proxy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"proxyModeStream","data-tooltip-id":"tooltip","data-tooltip-html":"Proxy your Streams
Choose M3U8 Proxy for better streaming",children:"Proxy Mode (stream)"}),(0,r.jsxs)("select",{name:"proxyModeStream",id:"proxyModeStream",value:O,onChange:e=>{Q(e.target.value),ef({type:"proxyModeStream",value:e.target.value})},children:[(0,r.jsx)("option",{value:"noProxy",defaultChecked:!0,children:"No Proxy"}),(0,r.jsx)("option",{value:"m3u8Proxy",children:"M3U8 Proxy"})]})]})]}),(0,r.jsx)("h1",{"data-tooltip-id":"tooltip","data-tooltip-html":"A collection of minor features and settings not specific to any single page.",children:"Miscellaneous Center"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"miniProgressbar","data-tooltip-id":"tooltip","data-tooltip-html":"Toggle the Mini Progress Bar on the Watch Page for Non-Embed Streaming Mode.",children:"Mini Progress Bar in Non-Embed Mode"}),(0,r.jsxs)("select",{name:"miniProgressbar",id:"miniProgressbar",value:R,onChange:e=>{ee(e.target.value),ef({type:"miniProgressbar",value:e.target.value})},children:[(0,r.jsx)("option",{value:"false",defaultChecked:!0,children:"Disable"}),(0,r.jsx)("option",{value:"true",children:"Enable"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"removeCW","data-tooltip-id":"tooltip","data-tooltip-html":"Enable or Disable the Delete Button for the 'Continue Watching' section on the Library Page.",children:"Continue Watching: Delete Option"}),(0,r.jsxs)("select",{name:"removeCW",id:"removeCW",value:M,onChange:e=>{et(e.target.value),ef({type:"removeCW",value:e.target.value})},children:[(0,r.jsx)("option",{value:"false",defaultChecked:!0,children:"Disable"}),(0,r.jsx)("option",{value:"true",children:"Enable"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"rememberLastPage","data-tooltip-id":"tooltip","data-tooltip-html":"Resume your session from the last visited page at the start of a new session. Remember this is not for resuming videos.",children:"Session Resume"}),(0,r.jsxs)("select",{name:"rememberLastPage",id:"rememberLastPage",value:j,onChange:e=>{en(e.target.value),ef({type:"rememberLastPage",value:e.target.value})},children:[(0,r.jsx)("option",{value:"false",defaultChecked:!0,children:"Disable"}),(0,r.jsx)("option",{value:"true",children:"Enable"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"infiniteScroll","data-tooltip-id":"tooltip","data-tooltip-html":"Enable for Infinite Scroll. Disable for Pagination",children:"Infinite Scroll"}),(0,r.jsxs)("select",{name:"infiniteScroll",id:"infiniteScroll",value:L,onChange:e=>{er(e.target.value),ef({type:"infiniteScroll",value:e.target.value})},children:[(0,r.jsx)("option",{value:"false",defaultChecked:!0,children:"Disable"}),(0,r.jsx)("option",{value:"true",children:"Enable"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"recommendationOnHome","data-tooltip-id":"tooltip","data-tooltip-html":"Enable/Disable Recommendation section on Home Page",children:"Recommendation on Home Page"}),(0,r.jsxs)("select",{name:"recommendationOnHome",id:"recommendationOnHome",value:N,onChange:e=>{ei(e.target.value),ef({type:"recommendationOnHome",value:e.target.value})},children:[(0,r.jsx)("option",{value:"true",defaultChecked:!0,children:"Enable"}),(0,r.jsx)("option",{value:"false",children:"Disable"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"continueWatchingOnHome","data-tooltip-id":"tooltip","data-tooltip-html":"Enable/Disable Continue Watching section on Home Page",children:"Continue Watching on Home Page"}),(0,r.jsxs)("select",{name:"continueWatchingOnHome",id:"continueWatchingOnHome",value:D,onChange:e=>{eo(e.target.value),ef({type:"continueWatchingOnHome",value:e.target.value})},children:[(0,r.jsx)("option",{value:"true",defaultChecked:!0,children:"Enable"}),(0,r.jsx)("option",{value:"false",children:"Disable"})]})]})]}),(0,r.jsx)("h1",{"data-tooltip-id":"tooltip","data-tooltip-html":"Clear your site data part-by-part or in one go. This will reset all the data of this site on this device. use carefully",children:"Site-Data Center"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{"data-tooltip-id":"tooltip","data-tooltip-html":"Clear all the site data in one go",children:"All site data"}),(0,r.jsx)("h5",{className:_().settingsActionBtn,onClick:()=>eh("clearAllSiteData"),children:"clear"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{"data-tooltip-id":"tooltip","data-tooltip-html":"Clear Cookies",children:"Cookies"}),(0,r.jsx)("h5",{className:_().settingsActionBtn,onClick:()=>eh("clearCookies"),children:"clear"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{"data-tooltip-id":"tooltip","data-tooltip-html":"Clear Cache Storage",children:"Cache storage"}),(0,r.jsx)("h5",{className:_().settingsActionBtn,onClick:()=>eh("clearCacheStorage"),children:"clear"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{"data-tooltip-id":"tooltip","data-tooltip-html":"Clear Local Storage",children:"Local storage"}),(0,r.jsx)("h5",{className:_().settingsActionBtn,onClick:()=>eh("clearLocalStorage"),children:"clear"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{"data-tooltip-id":"tooltip","data-tooltip-html":"Reset the Service Workers of this site",children:"Service-Worker cache"}),(0,r.jsx)("h5",{className:_().settingsActionBtn,onClick:()=>eh("clearServiceWorker"),children:"clear"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{"data-tooltip-id":"tooltip","data-tooltip-html":"Clear Current Radio Data",children:"Clear Current Radio"}),(0,r.jsx)("h5",{className:_().settingsActionBtn,onClick:()=>eh("clearCurrentRadio"),children:"clear"})]})]}),(0,r.jsx)("h1",{children:"App Center"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsx)(u(),{href:"/ai","data-tooltip-id":"tooltip","data-tooltip-html":"Go to RiveAI Page",children:"AI"}),(0,r.jsx)(u(),{href:"/ads","data-tooltip-id":"tooltip","data-tooltip-html":"Go to Ads Page",children:"Ads"}),(0,r.jsx)(u(),{href:"/stats","data-tooltip-id":"tooltip","data-tooltip-html":"Go to Stats Page",children:"Stats"}),(0,r.jsx)(u(),{href:"/manga","data-tooltip-id":"tooltip","data-tooltip-html":"Go to Manga Page",children:"Manga"}),(0,r.jsx)(u(),{href:"/anime","data-tooltip-id":"tooltip","data-tooltip-html":"Go to Anime Page",children:"Anime"}),(0,r.jsx)(u(),{href:"/kdrama","data-tooltip-id":"tooltip","data-tooltip-html":"Go to K-Drama Page",children:"K-Drama"}),(0,r.jsx)(u(),{href:"",onClick:ep,"data-tooltip-id":"tooltip","data-tooltip-html":"Random Movie/ Tv Show CTRL + SHIFT + R",children:"Random"}),(0,r.jsx)(u(),{href:"/domains","data-tooltip-id":"tooltip","data-tooltip-content":"Domain Status",children:"Domains"}),(0,r.jsx)(u(),{href:"/downloads","data-tooltip-id":"tooltip","data-tooltip-content":"Downloads",children:"Download"}),(0,r.jsx)(u(),{href:"/donation","data-tooltip-id":"tooltip","data-tooltip-content":"Donations",children:"Donations"}),(0,r.jsx)(u(),{href:"/disclaimer","data-tooltip-id":"tooltip","data-tooltip-content":"Disclaimer",children:"Disclaimer"}),(0,r.jsx)(u(),{href:"mailto:developer@rivestream.org",children:"Contact Us"}),(0,r.jsx)(u(),{href:"/embed/docs","data-tooltip-id":"tooltip","data-tooltip-content":"Embed API Docs",children:"Embed API"}),(0,r.jsx)(u(),{href:"/recommendation","data-tooltip-id":"tooltip","data-tooltip-content":"More Detailed Recommendation",children:"Recommendation"})]}),(0,r.jsx)("h1",{children:"Links"}),(0,r.jsxs)("div",{className:_().group,children:[(0,r.jsxs)(u(),{href:"https://discord.gg/6xJmJja8fV",children:[(0,r.jsx)(f.j2d,{})," Discord"]}),(0,r.jsxs)(u(),{href:"/",children:[(0,r.jsx)(f.ssk,{})," Website"]})]})]})]})]})]})},k=n(29983),O=n.n(k),R=e=>{let{setHamNav:t,hamNav:n}=e,o=(0,p.usePathname)(),s=(0,p.useSearchParams)(),[a,l]=(0,i.useState)(o),[c,m]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{m(navigator.userAgent.toLowerCase().includes("dart")),null!==s.get("type")?l("/"+s.get("type")):null!==o&&l("/"+(null==o?void 0:o.split("/"))[1])},[o,s]),c)?null:(0,r.jsx)("div",{className:O().HamNav,onClick:()=>t(!1),children:(0,r.jsxs)(y.E.div,{initial:{x:100,opacity:0},animate:{x:0,opacity:1},exit:{x:-100,opacity:0},className:O().settingsPopoverCard,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,r.jsx)("div",{className:O().logo,children:(0,r.jsx)("img",{src:"/images/logo.svg",alt:"logo"})}),(0,r.jsx)(u(),{href:"/","aria-label":"Home","data-tooltip-id":"tooltip","data-tooltip-content":"Home",onClick:()=>t(!1),children:"/"===a||"/recommendation"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.qJX,{className:O().active}),"Home"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.l4E,{className:O().inactive}),"Home"]})}),(0,r.jsx)(u(),{href:"/search","aria-label":"Search","data-tooltip-id":"tooltip","data-tooltip-html":"
Search CTRL + K
",onClick:()=>t(!1),children:"/search"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.CVI,{className:O().active}),"Search"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.t2h,{className:O().inactive}),"Search"]})}),(0,r.jsx)(u(),{href:"/ai","aria-label":"Rive AI","data-tooltip-id":"tooltip","data-tooltip-html":"
Rive AI CTRL + A
",onClick:()=>t(!1),className:O().mobileHide,children:"/ai"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.$Oz,{className:O().active}),"RiveAI"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.zKx,{className:O().inactive}),"RiveAI"]})}),(0,r.jsx)(u(),{href:"/movie","aria-label":"Movies","data-tooltip-id":"tooltip","data-tooltip-content":"Movies",onClick:()=>t(!1),children:"/movie"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.TRU,{className:O().active}),"Movies"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.MGh,{className:O().inactive}),"Movies"]})}),(0,r.jsx)(u(),{href:"/tv","aria-label":"Tv shows","data-tooltip-id":"tooltip","data-tooltip-content":"TV shows",onClick:()=>t(!1),children:"/tv"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.KPt,{className:O().active}),"Tv shows"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.uPD,{className:O().inactive}),"Tv shows"]})}),(0,r.jsx)(u(),{href:"/livesports","aria-label":"Live Sports","data-tooltip-id":"tooltip","data-tooltip-content":"Live Sports",className:O().mobileHide,children:"/livesports"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.w6U,{className:O().active}),"Live Sports"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.OmX,{className:O().inactive}),"Live Sports"]})}),(0,r.jsx)(u(),{href:"/iptv","aria-label":"IPTV","data-tooltip-id":"tooltip","data-tooltip-content":"IPTV",className:O().mobileHide,children:"/iptv"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.Ije,{className:O().active}),"IPTV"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.KOp,{className:O().inactive}),"IPTV"]})}),(0,r.jsx)(u(),{href:"/radio","aria-label":"Radio","data-tooltip-id":"tooltip","data-tooltip-content":"Radio",className:O().mobileHide,children:"/radio"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.kcA,{className:O().active}),"Radio"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.BDb,{className:O().inactive}),"Radio"]})}),(0,r.jsx)(u(),{href:"/manga","aria-label":"Manga","data-tooltip-id":"tooltip","data-tooltip-content":"Manga",className:O().mobileHide,children:"/manga"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.ZPS,{className:O().active}),"Manga"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.iEv,{className:O().inactive}),"Manga"]})}),(0,r.jsx)(u(),{href:"/anime","aria-label":"Anime","data-tooltip-id":"tooltip","data-tooltip-content":"Anime",onClick:()=>t(!1),className:O().mobileHide,children:"/anime"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.Xk2,{className:O().active}),"Anime"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.UdD,{className:O().inactive}),"Anime"]})}),(0,r.jsx)(u(),{href:"/kdrama","aria-label":"K-Drama","data-tooltip-id":"tooltip","data-tooltip-content":"K-Drama",onClick:()=>t(!1),className:O().mobileHide,children:"/kdrama"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(d.XGu,{className:O().active}),"Kdrama"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(f.cu5,{className:O().inactive}),"K-Drama"]})}),(0,r.jsx)(u(),{href:"/collections","aria-label":"Collections","data-tooltip-id":"tooltip","data-tooltip-content":"Collections",onClick:()=>t(!1),className:O().mobileHide,children:"/collections"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.Eed,{className:O().active}),"Collections"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h._2z,{className:O().inactive}),"Collections"]})}),(0,r.jsx)(u(),{href:"/library","aria-label":"Library","data-tooltip-id":"tooltip","data-tooltip-content":"Library",onClick:()=>t(!1),children:"/library"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(g,{className:O().active}),"Library"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(g,{className:O().inactive}),"Library"]})}),(0,r.jsx)(u(),{href:"/settings","aria-label":"Settings","data-tooltip-id":"tooltip","data-tooltip-content":"Settings",onClick:()=>t(!1),className:O().mobileHide,children:"/settings"===a||"/domains"===a||"/downloads"===a||"/donation"===a||"/wallets"===a||"/disclaimer"===a||"/signup"===a||"/ads"===a||"/stats"===a||"/login"===a?(0,r.jsxs)("div",{className:O().active,children:[(0,r.jsx)(h.NY,{className:O().active}),"Settings"]}):(0,r.jsxs)("div",{className:O().inactive,children:[(0,r.jsx)(h.nj4,{className:O().inactive}),"Settings"]})})]})})},M=n(95202),j=n.n(M),L=n(50788),N=n(10856),D=n(72679),V=n(74865),F=n.n(V),B=n(64712),U=n(67992),H=()=>{let[e,t]=(0,i.useState)({}),[n,o]=(0,i.useState)(!1),[s,a]=(0,i.useState)(!0),[l,c]=(0,i.useState)(!1),[u,d]=(0,i.useState)("85"),[f,p]=(0,i.useState)(!1),[m,g]=(0,i.useState)(!1),[v,y]=(0,i.useState)(!0),w=(0,i.useRef)(null);return(0,i.useEffect)(()=>{f?F().start():F().done(!1)},[f]),(0,i.useEffect)(()=>{let e=JSON.parse(localStorage.getItem("RiveStreamRadioSelectedData")||"[]")||[];t(e),o(null==e?void 0:e.playState)},[]),(0,i.useEffect)(()=>{let e=()=>{{let e=JSON.parse(localStorage.getItem("RiveStreamRadioSelectedData")||"[]")||[];console.log({data:e}),t(e),o(null==e?void 0:e.playState)}};return window.addEventListener("storage",e),e(),()=>{window.removeEventListener("storage",e)}},[]),(0,i.useEffect)(()=>{w.current&&(p(!0),w.current.load(),y(!1),n?w.current.play().then(()=>{console.log("Playback started successfully")}).catch(e=>{console.error("Playback failed:",e),o(!1)}).finally(()=>p(!1)):w.current.pause());try{localStorage.setItem("RiveStreamRadioSelectedData",JSON.stringify({...e,playState:n}))}catch(e){console.info(e)}},[e,n]),(0,i.useEffect)(()=>{void 0===n&&y(!0),((null==e?void 0:e.id)||(null==e?void 0:e.stationuuid))&&n&&(0,U.Nm)({type:"radio",id:(null==e?void 0:e.id)||(null==e?void 0:e.stationuuid)})},[n]),(0,i.useEffect)(()=>{w.current&&(w.current.volume=parseFloat(u)/100)},[u]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"".concat(j().closeRadio," ").concat(v?j().hidePlayer:j().showPlayer),onClick:()=>{localStorage.setItem("RiveStreamRadioSelectedData",""),window.dispatchEvent(new Event("storage"))},"data-tooltip-id":"tooltip","data-tooltip-content":"Close player",children:"x"}),(0,r.jsxs)("div",{className:"".concat(j().radioPlayer," ").concat((null==e?void 0:e.name)||(null==e?void 0:e.title)?null:j().inactivePlayer," ").concat(m?j().showMenu:j().hideMenu," ").concat(v?j().hidePlayer:j().showPlayer),children:[(0,r.jsx)("div",{className:"".concat(j().block," ").concat(j().showMobile),children:f?(0,r.jsx)(h.F9M,{className:"".concat(j().icons," ").concat(j().spinAnimation)}):(0,r.jsx)(L.FW,{className:"".concat(j().icons),onClick:()=>g(!m)})}),(0,r.jsx)("div",{className:"".concat(j().block),children:f?(0,r.jsx)(h.F9M,{className:"".concat(j().icons," ").concat(j().spinAnimation)}):n?(0,r.jsx)(L.hPq,{className:j().icons,onClick:()=>o(!1)}):(0,r.jsx)(h.PSd,{className:j().icons,onClick:()=>o(!0)})}),(0,r.jsx)("div",{className:"".concat(j().block," ").concat(j().hideMobile),children:(0,r.jsx)(N.hP8,{className:j().icons,onClick:()=>{w.current&&(w.current.currentTime+=10)}})}),(0,r.jsx)("div",{className:"".concat(j().block," ").concat(j().hideMobile),children:(0,r.jsx)(N.UPX,{className:j().icons,onClick:()=>{w.current&&(w.current.currentTime-=10)}})}),(0,r.jsx)("div",{className:"".concat("".concat(j().block)," ").concat(null===j()||void 0===j()?void 0:j().imageBlock),children:(0,r.jsx)("div",{className:"".concat(j().img," ").concat((null==e?void 0:e.favicon)!==null&&(null==e?void 0:e.favicon)!==void 0?"skeleton":null),children:(0,r.jsx)(D.LazyLoadImage,{src:"".concat(l?"/images/logo.svg":(null==e?void 0:e.favicon)!==null&&(null==e?void 0:e.favicon)!==void 0?null==e?void 0:e.favicon:"/images/logo.svg"),height:"100%",width:"100%",useIntersectionObserver:!0,effect:"opacity",className:"".concat(j().imgInside," ").concat(s?"skeleton":null),onLoad:()=>{setTimeout(()=>{a(!1)},500)},loading:"lazy",onError:e=>{console.log(e),c(!0),a(!1)},alt:(null==e?void 0:e.id)||(null==e?void 0:e.stationuuid)||"sm"},(null==e?void 0:e.id)||(null==e?void 0:e.stationuuid))})}),(0,r.jsxs)("div",{className:" ".concat(j().block," ").concat(j().detailBlock),children:[(0,r.jsx)("h4",{children:(null==e?void 0:e.name)||(null==e?void 0:e.title)||"No Audio"}),(0,r.jsx)("input",{type:"range",name:"volume",id:"volume",value:u,"data-tooltip-id":"tooltip","data-tooltip-html":"".concat(u),step:1,onChange:e=>{var t;return d(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value)}})]}),(0,r.jsx)("div",{className:" ".concat(j().block," ").concat(j().audioBlock),children:((null==e?void 0:e.resolved_url)||(null==e?void 0:e.url))&&(0,r.jsxs)("audio",{ref:w,onLoadStart:()=>p(!0),onCanPlay:()=>{p(!1)},onError:e=>{console.error("Audio failed to load:",e),p(!1),o(!1),B.Am.info("Audio failed to load")},controls:!0,children:[(0,r.jsx)("source",{src:(null==e?void 0:e.resolved_url)||(null==e?void 0:e.url),type:"audio/ogg"}),(0,r.jsx)("source",{src:(null==e?void 0:e.resolved_url)||(null==e?void 0:e.url),type:"audio/mpeg"}),"Your browser does not support the audio element"]})})]})]})},q=e=>{let{children:t}=e,[n,o]=(0,i.useState)("system"),[a,l]=(0,i.useState)("liquidate"),[c,u]=(0,i.useState)("gold"),[h,d]=(0,i.useState)("Bricolage Grotesque"),[f,m]=(0,i.useState)("Bricolage Grotesque"),[g,b]=(0,i.useState)("gold"),[_,S]=(0,i.useState)("24px"),[C,E]=(0,i.useState)("transparent"),[x,I]=(0,i.useState)("0"),[k,O]=(0,i.useState)("100%"),[M,j]=(0,i.useState)("0%"),[L,N]=(0,i.useState)("auto"),[D,V]=(0,i.useState)("true"),[F,B]=(0,i.useState)(),[U,q]=(0,i.useState)("server"),[z,$]=(0,i.useState)("noProxy"),[W,K]=(0,i.useState)("noProxy"),[G,Y]=(0,i.useState)("false"),[Z,X]=(0,i.useState)("false"),[J,Q]=(0,i.useState)("false"),[ee,et]=(0,i.useState)("false"),[en,er]=(0,i.useState)("true"),[ei,eo]=(0,i.useState)("true"),[es,ea]=(0,i.useState)(!1),{push:el}=(0,p.useRouter)(),ec=async()=>{let e=await T();console.log({res:e}),(null==e?void 0:e.type)&&(null==e?void 0:e.id)&&el("/detail?type=".concat(e.type,"&id=").concat(e.id))};(0,i.useEffect)(()=>{let e=(0,w.G)(),t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,r=t?"gold":"#2196f3",i=t?"gold":"#2196f3";if((null==e?void 0:e.ascent_color)||(u(r),b(i)),null!==e&&(l(null==e?void 0:e.theme),o(null==e?void 0:e.mode),u(null==e?void 0:e.ascent_color),d(null==e?void 0:e.SysFFamily),m(null==e?void 0:e.SFFamily),b(null==e?void 0:e.SFColor),S(null==e?void 0:e.SFSize),E(null==e?void 0:e.SBColor),I(null==e?void 0:e.SBBlur),O(null==e?void 0:e.SOpacity),j(null==e?void 0:e.SMargin),V(null==e?void 0:e.PASSelection),N(null==e?void 0:e.PMPlacement),q(null==e?void 0:e.fetchMode),$(null==e?void 0:e.proxyMode),K(null==e?void 0:e.proxyModeStream),Y(null==e?void 0:e.miniProgressbar),X(null==e?void 0:e.removeCW),Q(null==e?void 0:e.rememberLastPage),et(null==e?void 0:e.infiniteScroll),er(null==e?void 0:e.recommendationOnHome),eo(null==e?void 0:e.continueWatchingOnHome)),(null==e?void 0:e.fetchMode)===void 0){let t={mode:n,theme:a,ascent_color:(null==e?void 0:e.ascent_color)?c:r,SysFFamily:h,SFFamily:f,SFSize:_,SFColor:(null==e?void 0:e.SFColor)?g:i,SBColor:C,SBBlur:x,SOpacity:k,SMargin:M,PMPlacement:L,PASSelection:D,fetchMode:U,proxyMode:z,proxyModeStream:W,miniProgressbar:G,removeCW:Z,rememberLastPage:J,infiniteScroll:ee,recommendationOnHome:en,continueWatchingOnHome:ei};fetch("https://wtfismyip.com/json").then(e=>e.json()).then(e=>{(null==e?void 0:e.YourFuckingCountryCode)!=="CL"&&(null==e?void 0:e.YourFuckingCountryCode)!=="RU"&&(null==e?void 0:e.YourFuckingCountryCode)!=="NL"&&(null==e?void 0:e.YourFuckingCountryCode)!=="DE"&&(null==e?void 0:e.YourFuckingCountryCode)!=="IN"?(q("client"),(0,w.I)({values:{...t,fetchMode:"client"}})):(q("server"),(0,w.I)({values:{...t,fetchMode:"server"}}))})}console.log({values:e}),B(t?"#1b1919":"#f4f7fe"),window.addEventListener("keydown",e=>{e.ctrlKey&&"k"===e.key&&(e.preventDefault(),el("/search")),e.ctrlKey&&"a"===e.key&&(e.preventDefault(),el("/ai")),e.ctrlKey&&"R"===e.key&&(e.preventDefault(),ec())})},[]),(0,i.useEffect)(()=>{var e,t;let n=(0,w.G)(),r=localStorage.getItem("RiveStreamLastHref"),i=null===(t=window)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.href;console.log({lastHref:r,curHref:i,rememberLastPage:null==n?void 0:n.rememberLastPage}),r!==i&&(null==n?void 0:n.rememberLastPage)==="true"&&window.location.replace(r),window.addEventListener("beforeunload",function(e){var t,n;localStorage.setItem("RiveStreamLastHref",null===(n=window)||void 0===n?void 0:null===(t=n.location)||void 0===t?void 0:t.href)})},[]),(0,i.useEffect)(()=>{document.documentElement.style.setProperty("--mode",n),document.documentElement.style.setProperty("--ascent-color",c),document.documentElement.style.setProperty("--SysFFamily",h),document.documentElement.style.setProperty("--SFFamily",f),document.documentElement.style.setProperty("--SFSize",_),document.documentElement.style.setProperty("--SFColor",g),document.documentElement.style.setProperty("--SBColor",C),document.documentElement.style.setProperty("--SBBlur",x),document.documentElement.style.setProperty("--SOpacity",k),document.documentElement.style.setProperty("--SMargin",M),"Roboto Mono"===h?document.documentElement.classList.add("roboto-mono-active"):document.documentElement.classList.remove("roboto-mono-active")},[n,c,h,f,_,g,C,x,k,M]);let eu=(0,p.usePathname)();return(0,r.jsxs)(r.Fragment,{children:["dark"===n&&(0,r.jsxs)(P(),{children:[(0,r.jsx)("meta",{name:"theme-color",content:"#1b1919"}),(0,r.jsx)("meta",{name:"msapplication-TileColor",content:"#1b1919"})]}),"light"===n&&(0,r.jsxs)(P(),{children:[(0,r.jsx)("meta",{name:"theme-color",content:"#f4f7fe"}),(0,r.jsx)("meta",{name:"msapplication-TileColor",content:"#f4f7fe"})]}),"system"===n&&(0,r.jsxs)(P(),{children:[(0,r.jsx)("meta",{name:"theme-color",content:"".concat(F)}),(0,r.jsx)("meta",{name:"msapplication-TileColor",content:"".concat(F)})]}),(0,r.jsxs)("div",{className:"".concat(s().background," ").concat("system"!==n?n:""),children:[(0,r.jsx)(v,{setHamNav:ea,hamNav:es}),es&&(0,r.jsx)(R,{setHamNav:ea,hamNav:es}),(0,r.jsx)(y.E.div,{initial:{x:-150,opacity:0},animate:{x:0,opacity:1},exit:{x:150,opacity:0},layout:!0,transition:{type:"spring",stiffness:260,damping:20},children:t}),"/settings"===eu?(0,r.jsx)(A,{mode:n,theme:a,ascent_color:c,SysFFamily:h,SFFamily:f,SFColor:g,SFSize:_,SBColor:C,SBBlur:x,SOpacity:k,SMargin:M,PMPlacement:L,PASSelection:D,fetchMode:U,proxyMode:z,proxyModeStream:W,miniProgressbar:G,removeCW:Z,rememberLastPage:J,infiniteScroll:ee,recommendationOnHome:en,continueWatchingOnHome:ei,setMode:o,setTheme:l,setAscent_color:u,setSysFFamily:d,setSFFamily:m,setSFColor:b,setSFSize:S,setSBColor:E,setSBBlur:I,setSOpacity:O,setSMargin:j,setPMPlacement:N,setPASSelection:V,setFetchMode:q,setProxyMode:$,setProxyModeStream:K,setMiniProgressbar:Y,setRemoveCW:X,setRememberLastPage:Q,setInfiniteScroll:et,setRecommendationOnHome:er,setContinueWatchingOnHome:eo}):null,(0,r.jsx)(H,{})]})]})},z=n(4298),$=n.n(z);n(93962),n(39985);let W=Math.min,K=Math.max,G=Math.round,Y=Math.floor,Z=e=>({x:e,y:e}),X={left:"right",right:"left",bottom:"top",top:"bottom"},J={start:"end",end:"start"};function Q(e,t){return"function"==typeof e?e(t):e}function ee(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function en(e){return"x"===e?"y":"x"}function er(e){return"y"===e?"height":"width"}function ei(e){return["top","bottom"].includes(ee(e))?"y":"x"}function eo(e){return e.replace(/start|end/g,e=>J[e])}function es(e){return e.replace(/left|right|bottom|top/g,e=>X[e])}function ea(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function el(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ec(e,t,n){let r,{reference:i,floating:o}=e,s=ei(t),a=en(ei(t)),l=er(a),c=ee(t),u="y"===s,h=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,f=i[l]/2-o[l]/2;switch(c){case"top":r={x:h,y:i.y-o.height};break;case"bottom":r={x:h,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:d};break;case"left":r={x:i.x-o.width,y:d};break;default:r={x:i.x,y:i.y}}switch(et(t)){case"start":r[a]-=f*(n&&u?-1:1);break;case"end":r[a]+=f*(n&&u?-1:1)}return r}let eu=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await (null==s.isRTL?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=ec(c,r,l),d=r,f={},p=0;for(let n=0;n{try{return e.matches(t)}catch(e){return!1}})}function eC(e){let t=eE(),n=ey(e)?eT(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function eE(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function ex(e){return["html","body","#document"].includes(ep(e))}function eT(e){return em(e).getComputedStyle(e)}function eI(e){return ey(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eP(e){if("html"===ep(e))return e;let t=e.assignedSlot||e.parentNode||eb(e)&&e.host||eg(e);return eb(t)?t.host:t}function eA(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=eP(t);return ex(n)?t.ownerDocument?t.ownerDocument.body:t.body:ew(n)&&e_(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=em(i);if(o){let e=ek(s);return t.concat(s,s.visualViewport||[],e_(i)?i:[],e&&n?eA(e):[])}return t.concat(i,eA(i,[],n))}function ek(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eO(e){let t=eT(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ew(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=G(n)!==o||G(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function eR(e){return ey(e)?e:e.contextElement}function eM(e){let t=eR(e);if(!ew(t))return Z(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=eO(t),s=(o?G(n.width):n.width)/r,a=(o?G(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}let ej=Z(0);function eL(e){let t=em(e);return eE()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ej}function eN(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),s=eR(e),a=Z(1);t&&(r?ey(r)&&(a=eM(r)):a=eM(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===em(s))&&i)?eL(s):Z(0),c=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,h=o.width/a.x,d=o.height/a.y;if(s){let e=em(s),t=r&&ey(r)?em(r):r,n=e,i=ek(n);for(;i&&r&&t!==n;){let e=eM(i),t=i.getBoundingClientRect(),r=eT(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,h*=e.x,d*=e.y,c+=o,u+=s,i=ek(n=em(i))}}return el({width:h,height:d,x:c,y:u})}function eD(e,t){let n=eI(e).scrollLeft;return t?t.left+n:eN(eg(e)).left+n}function eV(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:eD(e,r)),y:r.top+t.scrollTop}}function eF(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=em(e),r=eg(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let e=eE();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){let t=eg(e),n=eI(e),r=e.ownerDocument.body,i=K(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=K(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+eD(e),a=-n.scrollTop;return"rtl"===eT(r).direction&&(s+=K(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(eg(e));else if(ey(t))r=function(e,t){let n=eN(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ew(e)?eM(e):Z(1),s=e.clientWidth*o.x;return{width:s,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=eL(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return el(r)}function eB(e){return"static"===eT(e).position}function eU(e,t){if(!ew(e)||"fixed"===eT(e).position)return null;if(t)return t(e);let n=e.offsetParent;return eg(e)===n&&(n=n.ownerDocument.body),n}function eH(e,t){let n=em(e);if(eS(e))return n;if(!ew(e)){let t=eP(e);for(;t&&!ex(t);){if(ey(t)&&!eB(t))return t;t=eP(t)}return n}let r=eU(e,t);for(;r&&["table","td","th"].includes(ep(r))&&eB(r);)r=eU(r,t);return r&&ex(r)&&eB(r)&&!eC(r)?n:r||function(e){let t=eP(e);for(;ew(t)&&!ex(t);){if(eC(t))return t;if(eS(t))break;t=eP(t)}return null}(e)||n}let eq=async function(e){let t=this.getOffsetParent||eH,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=ew(t),i=eg(t),o="fixed"===n,s=eN(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=Z(0);if(r||!r&&!o){if(("body"!==ep(t)||e_(i))&&(a=eI(t)),r){let e=eN(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=eD(i))}let c=!i||r||o?Z(0):eV(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ez={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,s=eg(r),a=!!t&&eS(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Z(1),u=Z(0),h=ew(r);if((h||!h&&!o)&&(("body"!==ep(r)||e_(s))&&(l=eI(r)),ew(r))){let e=eN(r);c=eM(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let d=!s||h||o?Z(0):eV(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:eg,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?eS(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eA(e,[],!1).filter(e=>ey(e)&&"body"!==ep(e)),i=null,o="fixed"===eT(e).position,s=o?eP(e):e;for(;ey(s)&&!ex(s);){let t=eT(s),n=eC(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||e_(s)&&!n&&function e(t,n){let r=eP(t);return!(r===n||!ey(r)||ex(r))&&("fixed"===eT(r).position||e(r,n))}(e,s))?r=r.filter(e=>e!==s):i=t,s=eP(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=o[0],a=o.reduce((e,n)=>{let r=eF(t,n,i);return e.top=K(r.top,e.top),e.right=W(r.right,e.right),e.bottom=W(r.bottom,e.bottom),e.left=K(r.left,e.left),e},eF(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:eH,getElementRects:eq,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eO(e);return{width:t,height:n}},getScale:eM,isElement:ey,isRTL:function(e){return"rtl"===eT(e).direction}};function e$(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eW=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:s,middlewareData:a}=t,l=await ed(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},eK=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Q(e,t),c={x:n,y:r},u=await eh(t,l),h=ei(ee(i)),d=en(h),f=c[d],p=c[h];if(o){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=f+u[e],r=f-u[t];f=K(n,W(f,r))}if(s){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=p+u[e],r=p-u[t];p=K(n,W(p,r))}let m=a.fn({...t,[d]:f,[h]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[h]:s}}}}}},eG=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,s;let{placement:a,middlewareData:l,rects:c,initialPlacement:u,platform:h,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...w}=Q(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let b=ee(a),_=ei(u),S=ee(u)===u,C=await (null==h.isRTL?void 0:h.isRTL(d.floating)),E=m||(S||!y?[es(u)]:function(e){let t=es(e);return[eo(e),t,eo(t)]}(u)),x="none"!==v;!m&&x&&E.push(...function(e,t,n,r){let i=et(e),o=function(e,t,n){let r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(n)return t?i:r;return t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(ee(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(eo)))),o}(u,y,v,C));let T=[u,...E],I=await eh(t,w),P=[],A=(null==(r=l.flip)?void 0:r.overflows)||[];if(f&&P.push(I[b]),p){let e=function(e,t,n){void 0===n&&(n=!1);let r=et(e),i=en(ei(e)),o=er(i),s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=es(s)),[s,es(s)]}(a,c,C);P.push(I[e[0]],I[e[1]])}if(A=[...A,{placement:a,overflows:P}],!P.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=T[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(o=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(g){case"bestFit":{let e=null==(s=A.filter(e=>{if(x){let t=ei(e.placement);return t===_||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:s[0];e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}},eY=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Q(e,t)||{};if(null==c)return{};let h=ea(u),d={x:n,y:r},f=en(ei(i)),p=er(f),m=await s.getDimensions(c),g="y"===f,v=g?"clientHeight":"clientWidth",y=o.reference[p]+o.reference[f]-d[f]-o.floating[p],w=d[f]-o.reference[f],b=await (null==s.getOffsetParent?void 0:s.getOffsetParent(c)),_=b?b[v]:0;_&&await (null==s.isElement?void 0:s.isElement(b))||(_=a.floating[v]||o.floating[p]);let S=_/2-m[p]/2-1,C=W(h[g?"top":"left"],S),E=W(h[g?"bottom":"right"],S),x=_-m[p]-E,T=_/2-m[p]/2+(y/2-w/2),I=K(C,W(T,x)),P=!l.arrow&&null!=et(i)&&T!==I&&o.reference[p]/2-(T{let r=new Map,i={platform:ez,...n},o={...i.platform,_c:r};return eu(e,t,{...i,platform:o})};var eX=n(93967),eJ=n(83454);let eQ={core:!1,base:!1};function e0({css:e,id:t="react-tooltip-base-styles",type:n="base",ref:r}){var i,o;if(!e||"undefined"==typeof document||eQ[n]||"core"===n&&void 0!==eJ&&(null===(i=null==eJ?void 0:eJ.env)||void 0===i?void 0:i.REACT_TOOLTIP_DISABLE_CORE_STYLES)||"base"!==n&&void 0!==eJ&&(null===(o=null==eJ?void 0:eJ.env)||void 0===o?void 0:o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===n&&(t="react-tooltip-core-styles"),r||(r={});let{insertAt:s}=r;if(document.getElementById(t))return;let a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css","top"===s&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),eQ[n]=!0}let e1=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:i=10,strategy:o="absolute",middlewares:s=[eW(Number(i)),eG({fallbackAxisSideDirection:"start"}),eK({padding:5})],border:a})=>e&&null!==t?n?(s.push(eY({element:n,padding:5})),eZ(e,t,{placement:r,strategy:o,middleware:s}).then(({x:e,y:t,placement:n,middlewareData:r})=>{var i,o;let s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(i=r.arrow)&&void 0!==i?i:{x:0,y:0},u=null!==(o=({top:"bottom",right:"left",bottom:"top",left:"right"})[n.split("-")[0]])&&void 0!==o?o:"bottom",h=0;if(a){let e=`${a}`.match(/(\d+)px/);h=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...a&&{borderBottom:a,borderRight:a},[u]:`-${4+h}px`},place:n}})):eZ(e,t,{placement:"bottom",strategy:o,middleware:s}).then(({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})):{tooltipStyles:{},tooltipArrowStyles:{},place:r},e2=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),e4=(e,t,n)=>{let r=null,i=function(...i){let o=()=>{r=null,n||e.apply(this,i)};n&&!r&&(e.apply(this,i),r=setTimeout(o,t)),n||(r&&clearTimeout(r),r=setTimeout(o,t))};return i.cancel=()=>{r&&(clearTimeout(r),r=null)},i},e5=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,e9=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>e9(e,t[n]));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!e5(e)||!e5(t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>e9(e[n],t[n]))},e3=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;let t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(e=>{let n=t.getPropertyValue(e);return"auto"===n||"scroll"===n})},e6=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(e3(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},e8="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,e7=e=>{e.current&&(clearTimeout(e.current),e.current=null)},te={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},tt=(0,i.createContext)({getTooltipData:()=>te});function tn(e="DEFAULT_TOOLTIP_ID"){return(0,i.useContext)(tt).getTooltipData(e)}var tr={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},ti={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};let to=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:s,anchorSelect:a,place:l="top",offset:c=10,events:u=["hover"],openOnClick:h=!1,positionStrategy:d="absolute",middlewares:f,wrapper:p,delayShow:m=0,delayHide:g=0,float:v=!1,hidden:y=!1,noArrow:w=!1,clickable:b=!1,closeOnEsc:_=!1,closeOnScroll:S=!1,closeOnResize:C=!1,openEvents:E,closeEvents:x,globalCloseEvents:T,imperativeModeOnly:I,style:P,position:A,afterShow:k,afterHide:O,disableTooltip:R,content:M,contentWrapperRef:j,isOpen:L,defaultIsOpen:N=!1,setIsOpen:D,activeAnchor:V,setActiveAnchor:F,border:B,opacity:U,arrowColor:H,role:q="tooltip"})=>{var z;let $=(0,i.useRef)(null),G=(0,i.useRef)(null),Z=(0,i.useRef)(null),X=(0,i.useRef)(null),J=(0,i.useRef)(null),[Q,ee]=(0,i.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[et,en]=(0,i.useState)(!1),[er,ei]=(0,i.useState)(!1),[eo,es]=(0,i.useState)(null),ea=(0,i.useRef)(!1),el=(0,i.useRef)(null),{anchorRefs:ec,setActiveAnchor:eu}=tn(t),eh=(0,i.useRef)(!1),[ed,ef]=(0,i.useState)([]),ep=(0,i.useRef)(!1),em=h||u.includes("click"),ev=em||(null==E?void 0:E.click)||(null==E?void 0:E.dblclick)||(null==E?void 0:E.mousedown),ey=E?{...E}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!E&&em&&Object.assign(ey,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});let ew=x?{...x}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!x&&em&&Object.assign(ew,{mouseleave:!1,blur:!1,mouseout:!1});let eb=T?{...T}:{escape:_||!1,scroll:S||!1,resize:C||!1,clickOutsideAnchor:ev||!1};I&&(Object.assign(ey,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(ew,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(eb,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),e8(()=>(ep.current=!0,()=>{ep.current=!1}),[]);let e_=e=>{ep.current&&(e&&ei(!0),setTimeout(()=>{ep.current&&(null==D||D(e),void 0===L&&en(e))},10))};(0,i.useEffect)(()=>{if(void 0===L)return()=>null;L&&ei(!0);let e=setTimeout(()=>{en(L)},10);return()=>{clearTimeout(e)}},[L]),(0,i.useEffect)(()=>{if(et!==ea.current){if(e7(J),ea.current=et,et)null==k||k();else{let e=(e=>{let t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;let[,n,r]=t;return Number(n)*("ms"===r?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));J.current=setTimeout(()=>{ei(!1),es(null),null==O||O()},e+25)}}},[et]);let eS=e=>{ee(t=>e9(t,e)?t:e)},eC=(e=m)=>{e7(Z),er?e_(!0):Z.current=setTimeout(()=>{e_(!0)},e)},eE=(e=g)=>{e7(X),X.current=setTimeout(()=>{eh.current||e_(!1)},e)},ex=e=>{var t;if(!e)return;let n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return F(null),void eu({current:null});m?eC():e_(!0),F(n),eu({current:n}),e7(X)},eT=()=>{b?eE(g||100):g?eE():e_(!1),e7(Z)},eI=({x:e,y:t})=>{var n;e1({place:null!==(n=null==eo?void 0:eo.place)&&void 0!==n?n:l,offset:c,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:$.current,tooltipArrowReference:G.current,strategy:d,middlewares:f,border:B}).then(e=>{eS(e)})},eP=e=>{if(!e)return;let t={x:e.clientX,y:e.clientY};eI(t),el.current=t},ek=e=>{var t;if(!et)return;let n=e.target;n.isConnected&&(null===(t=$.current)||void 0===t||!t.contains(n))&&([document.querySelector(`[id='${s}']`),...ed].some(e=>null==e?void 0:e.contains(n))||(e_(!1),e7(Z)))},eO=e4(ex,50,!0),eM=e4(eT,50,!0),ej=e=>{eM.cancel(),eO(e)},eL=()=>{eO.cancel(),eM()},eD=(0,i.useCallback)(()=>{var e,t;let n=null!==(e=null==eo?void 0:eo.position)&&void 0!==e?e:A;n?eI(n):v?el.current&&eI(el.current):(null==V?void 0:V.isConnected)&&e1({place:null!==(t=null==eo?void 0:eo.place)&&void 0!==t?t:l,offset:c,elementReference:V,tooltipReference:$.current,tooltipArrowReference:G.current,strategy:d,middlewares:f,border:B}).then(e=>{ep.current&&eS(e)})},[et,V,M,P,l,null==eo?void 0:eo.place,c,d,A,null==eo?void 0:eo.position,v]);(0,i.useEffect)(()=>{var e,t;let n=new Set(ec);ed.forEach(e=>{(null==R?void 0:R(e))||n.add({current:e})});let r=document.querySelector(`[id='${s}']`);!r||(null==R?void 0:R(r))||n.add({current:r});let i=()=>{e_(!1)},o=e6(V),a=e6($.current);eb.scroll&&(window.addEventListener("scroll",i),null==o||o.addEventListener("scroll",i),null==a||a.addEventListener("scroll",i));let l=null;eb.resize?window.addEventListener("resize",i):V&&$.current&&(l=function(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=eR(e),h=o||s?[...u?eA(u):[],...eA(t)]:[];h.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});let d=u&&l?function(e,t){let n,r=null,i=eg(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();let c=e.getBoundingClientRect(),{left:u,top:h,width:d,height:f}=c;if(a||t(),!d||!f)return;let p=Y(h),m=Y(i.clientWidth-(u+d)),g={rootMargin:-p+"px "+-m+"px "+-Y(i.clientHeight-(h+f))+"px "+-Y(u)+"px",threshold:K(0,W(1,l))||1},v=!0;function y(t){let r=t[0].intersectionRatio;if(r!==l){if(!v)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||e$(c,e.getBoundingClientRect())||s(),v=!1}try{r=new IntersectionObserver(y,{...g,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(y,g)}r.observe(e)}(!0),o}(u,n):null,f=-1,p=null;a&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m=c?eN(e):null;return c&&function t(){let r=eN(e);m&&!e$(m,r)&&n(),m=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{o&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(i)}}(V,$.current,eD,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));let c=e=>{"Escape"===e.key&&e_(!1)};eb.escape&&window.addEventListener("keydown",c),eb.clickOutsideAnchor&&window.addEventListener("click",ek);let u=[],h=e=>{et&&(null==e?void 0:e.target)===V||ex(e)},d=e=>{et&&(null==e?void 0:e.target)===V&&eT()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],p=["click","dblclick","mousedown","mouseup"];Object.entries(ey).forEach(([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:ej}):p.includes(e)&&u.push({event:e,listener:h}))}),Object.entries(ew).forEach(([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:eL}):p.includes(e)&&u.push({event:e,listener:d}))}),v&&u.push({event:"pointermove",listener:eP});let m=()=>{eh.current=!0},g=()=>{eh.current=!1,eT()};return b&&!ev&&(null===(e=$.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=$.current)||void 0===t||t.addEventListener("mouseleave",g)),u.forEach(({event:e,listener:t})=>{n.forEach(n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)})}),()=>{var e,t;eb.scroll&&(window.removeEventListener("scroll",i),null==o||o.removeEventListener("scroll",i),null==a||a.removeEventListener("scroll",i)),eb.resize?window.removeEventListener("resize",i):null==l||l(),eb.clickOutsideAnchor&&window.removeEventListener("click",ek),eb.escape&&window.removeEventListener("keydown",c),b&&!ev&&(null===(e=$.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=$.current)||void 0===t||t.removeEventListener("mouseleave",g)),u.forEach(({event:e,listener:t})=>{n.forEach(n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)})})}},[V,eD,er,ec,ed,E,x,T,em,m,g]),(0,i.useEffect)(()=>{var e,n;let r=null!==(n=null!==(e=null==eo?void 0:eo.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);let i=new MutationObserver(e=>{let n=[],i=[];e.forEach(e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&i.push(e.target)),"childList"===e.type){if(V){let t=[...e.removedNodes].filter(e=>1===e.nodeType);if(r)try{i.push(...t.filter(e=>e.matches(r))),i.push(...t.flatMap(e=>[...e.querySelectorAll(r)]))}catch(e){}t.some(e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,V))&&(ei(!1),e_(!1),F(null),e7(Z),e7(X),!0)})}if(r)try{let t=[...e.addedNodes].filter(e=>1===e.nodeType);n.push(...t.filter(e=>e.matches(r))),n.push(...t.flatMap(e=>[...e.querySelectorAll(r)]))}catch(e){}}}),(n.length||i.length)&&ef(e=>[...e.filter(e=>!i.includes(e)),...n])});return i.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{i.disconnect()}},[t,a,null==eo?void 0:eo.anchorSelect,V]),(0,i.useEffect)(()=>{eD()},[eD]),(0,i.useEffect)(()=>{if(!(null==j?void 0:j.current))return()=>null;let e=new ResizeObserver(()=>{setTimeout(()=>eD())});return e.observe(j.current),()=>{e.disconnect()}},[M,null==j?void 0:j.current]),(0,i.useEffect)(()=>{var e;let t=document.querySelector(`[id='${s}']`),n=[...ed,t];V&&n.includes(V)||F(null!==(e=ed[0])&&void 0!==e?e:t)},[s,ed,V]),(0,i.useEffect)(()=>(N&&e_(!0),()=>{e7(Z),e7(X)}),[]),(0,i.useEffect)(()=>{var e;let n=null!==(e=null==eo?void 0:eo.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{let e=Array.from(document.querySelectorAll(n));ef(e)}catch(e){ef([])}},[t,a,null==eo?void 0:eo.anchorSelect]),(0,i.useEffect)(()=>{Z.current&&(e7(Z),eC(m))},[m]);let eV=null!==(z=null==eo?void 0:eo.content)&&void 0!==z?z:M,eF=et&&Object.keys(Q.tooltipStyles).length>0;return(0,i.useImperativeHandle)(e,()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}es(null!=e?e:null),(null==e?void 0:e.delay)?eC(e.delay):e_(!0)},close:e=>{(null==e?void 0:e.delay)?eE(e.delay):e_(!1)},activeAnchor:V,place:Q.place,isOpen:!!(er&&!y&&eV&&eF)})),er&&!y&&eV?i.createElement(p,{id:t,role:q,className:eX("react-tooltip",tr.tooltip,ti.tooltip,ti[o],n,`react-tooltip__place-${Q.place}`,tr[eF?"show":"closing"],eF?"react-tooltip__show":"react-tooltip__closing","fixed"===d&&tr.fixed,b&&tr.clickable),onTransitionEnd:e=>{e7(J),et||"opacity"!==e.propertyName||(ei(!1),es(null),null==O||O())},style:{...P,...Q.tooltipStyles,opacity:void 0!==U&&eF?U:void 0},ref:$},eV,i.createElement(p,{className:eX("react-tooltip-arrow",tr.arrow,ti.arrow,r,w&&tr.noArrow),style:{...Q.tooltipArrowStyles,background:H?`linear-gradient(to right bottom, transparent 50%, ${H} 50%)`:void 0},ref:G})):null},ts=({content:e})=>i.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),ta=i.forwardRef(({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:s,className:a,classNameArrow:l,variant:c="dark",place:u="top",offset:h=10,wrapper:d="div",children:f=null,events:p=["hover"],openOnClick:m=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:w=0,float:b=!1,hidden:_=!1,noArrow:S=!1,clickable:C=!1,closeOnEsc:E=!1,closeOnScroll:x=!1,closeOnResize:T=!1,openEvents:I,closeEvents:P,globalCloseEvents:A,imperativeModeOnly:k=!1,style:O,position:R,isOpen:M,defaultIsOpen:j=!1,disableStyleInjection:L=!1,border:N,opacity:D,arrowColor:V,setIsOpen:F,afterShow:B,afterHide:U,disableTooltip:H,role:q="tooltip"},z)=>{let[$,W]=(0,i.useState)(r),[K,G]=(0,i.useState)(o),[Y,Z]=(0,i.useState)(u),[X,J]=(0,i.useState)(c),[Q,ee]=(0,i.useState)(h),[et,en]=(0,i.useState)(y),[er,ei]=(0,i.useState)(w),[eo,es]=(0,i.useState)(b),[ea,el]=(0,i.useState)(_),[ec,eu]=(0,i.useState)(d),[eh,ed]=(0,i.useState)(p),[ef,ep]=(0,i.useState)(g),[em,eg]=(0,i.useState)(null),[ev,ey]=(0,i.useState)(null),ew=(0,i.useRef)(L),{anchorRefs:eb,activeAnchor:e_}=tn(e),eS=e=>null==e?void 0:e.getAttributeNames().reduce((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t},{}),eC=e=>{let t={place:e=>{Z(null!=e?e:u)},content:e=>{W(null!=e?e:r)},html:e=>{G(null!=e?e:o)},variant:e=>{J(null!=e?e:c)},offset:e=>{ee(null===e?h:Number(e))},wrapper:e=>{eu(null!=e?e:d)},events:e=>{let t=null==e?void 0:e.split(" ");ed(null!=t?t:p)},"position-strategy":e=>{ep(null!=e?e:g)},"delay-show":e=>{en(null===e?y:Number(e))},"delay-hide":e=>{ei(null===e?w:Number(e))},float:e=>{es(null===e?b:"true"===e)},hidden:e=>{el(null===e?_:"true"===e)},"class-name":e=>{eg(e)}};Object.values(t).forEach(e=>e(null)),Object.entries(e).forEach(([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)})};(0,i.useEffect)(()=>{W(r)},[r]),(0,i.useEffect)(()=>{G(o)},[o]),(0,i.useEffect)(()=>{Z(u)},[u]),(0,i.useEffect)(()=>{J(c)},[c]),(0,i.useEffect)(()=>{ee(h)},[h]),(0,i.useEffect)(()=>{en(y)},[y]),(0,i.useEffect)(()=>{ei(w)},[w]),(0,i.useEffect)(()=>{es(b)},[b]),(0,i.useEffect)(()=>{el(_)},[_]),(0,i.useEffect)(()=>{ep(g)},[g]),(0,i.useEffect)(()=>{ew.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[L]),(0,i.useEffect)(()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))},[]),(0,i.useEffect)(()=>{var r;let i=new Set(eb),o=n;if(!o&&e&&(o=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),o)try{document.querySelectorAll(o).forEach(e=>{i.add({current:e})})}catch(e){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}let s=document.querySelector(`[id='${t}']`);if(s&&i.add({current:s}),!i.size)return()=>null;let a=null!==(r=null!=ev?ev:s)&&void 0!==r?r:e_.current,l=new MutationObserver(e=>{e.forEach(e=>{var t;a&&"attributes"===e.type&&(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-"))&&eC(eS(a))})});return a&&(eC(eS(a)),l.observe(a,{attributes:!0,childList:!1,subtree:!1})),()=>{l.disconnect()}},[eb,e_,ev,t,n]),(0,i.useEffect)(()=>{(null==O?void 0:O.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),N&&!e2("border",`${N}`)&&console.warn(`[react-tooltip] "${N}" is not a valid \`border\`.`),(null==O?void 0:O.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),D&&!e2("opacity",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`opacity\`.`)},[]);let eE=f,ex=(0,i.useRef)(null);if(s){let e=s({content:(null==ev?void 0:ev.getAttribute("data-tooltip-content"))||$||null,activeAnchor:ev});eE=e?i.createElement("div",{ref:ex,className:"react-tooltip-content-wrapper"},e):null}else $&&(eE=$);K&&(eE=i.createElement(ts,{content:K}));let eT={forwardRef:z,id:e,anchorId:t,anchorSelect:n,className:eX(a,em),classNameArrow:l,content:eE,contentWrapperRef:ex,place:Y,variant:X,offset:Q,wrapper:ec,events:eh,openOnClick:m,positionStrategy:ef,middlewares:v,delayShow:et,delayHide:er,float:eo,hidden:ea,noArrow:S,clickable:C,closeOnEsc:E,closeOnScroll:x,closeOnResize:T,openEvents:I,closeEvents:P,globalCloseEvents:A,imperativeModeOnly:k,style:O,position:R,isOpen:M,defaultIsOpen:j,border:N,opacity:D,arrowColor:V,setIsOpen:F,afterShow:B,afterHide:U,disableTooltip:H,activeAnchor:ev,setActiveAnchor:e=>ey(e),role:q};return i.createElement(to,{...eT})});"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||e0({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||e0({css:` .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});var tl=n(11163),tc=n.n(tl);n(51476),n(79102);var tu=n(19692);function th(e){let{Component:t,pageProps:n}=e,[o,s]=(0,i.useState)(!1);return F().configure({showSpinner:!1}),(0,i.useEffect)(()=>{tc().events.on("routeChangeStart",e=>{s(!0),F().start()}),tc().events.on("routeChangeComplete",e=>{s(!1),F().done(!1)}),tc().events.on("routeChangeError",e=>{s(!1)})},[tc()]),(0,i.useEffect)(()=>{let e=e=>{e.preventDefault(),B.Am.info("Context Menu has been disabled")},t=e=>{(e.ctrlKey&&e.shiftKey&&"I"===e.key||e.ctrlKey&&e.shiftKey&&"J"===e.key||e.ctrlKey&&e.shiftKey&&"C"===e.key||"F12"===e.key)&&(e.preventDefault(),B.Am.info("Dev Tools has been disabled"))};return window.addEventListener("contextmenu",e),window.addEventListener("keydown",t),()=>{window.removeEventListener("contextmenu",e),window.removeEventListener("keydown",t)}},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(P(),{children:[(0,r.jsx)("title",{children:"Rive"}),(0,r.jsx)("meta",{name:"description",content:"Your Personal Streaming Oasis"}),(0,r.jsx)("meta",{name:"keywords",content:"movie, streaming, tv, rive, stream. movie app, tv shows, movie download"}),(0,r.jsx)("meta",{name:"google-site-verification",content:"J0QUeScQSxufPJqGTaszgnI35U2jN98vVWSOkVR4HrI"}),(0,r.jsx)("link",{rel:"manifest",href:"manifest.json"}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,r.jsx)("meta",{name:"theme-color",content:"#f4f7fe"}),(0,r.jsx)("meta",{name:"apple-mobile-web-app-capable",content:"yes"}),(0,r.jsx)("meta",{name:"apple-mobile-web-app-status-bar-style",content:"default"}),(0,r.jsx)("meta",{name:"apple-mobile-web-app-title",content:"Rive"}),(0,r.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/icons/icon-192x192.png"}),(0,r.jsx)("link",{rel:"apple-touch-icon",href:"/icons/icon-192x192.png"}),(0,r.jsx)("meta",{name:"mobile-web-app-capable",content:"yes"}),(0,r.jsx)("meta",{name:"msapplication-tap-highlight",content:"no"}),(0,r.jsx)("link",{rel:"shortcut icon",href:"/images/logo512.png"}),(0,r.jsx)("link",{rel:"apple-touch-startup-image",href:"/images/logo512.svg"}),(0,r.jsx)("meta",{property:"og:title",content:"Rive"}),(0,r.jsx)("meta",{property:"og:description",content:"Your Personal Streaming Oasis"}),(0,r.jsx)("meta",{property:"og:image",content:"https://rivestream.org/images/MetaImage.jpg"}),(0,r.jsx)("meta",{property:"og:url",content:"https://rivestream.org"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:site_name",content:"Rive"}),(0,r.jsx)("meta",{name:"twitter:card",content:"https://rivestream.org/images/MetaImage.jpg"}),(0,r.jsx)("meta",{property:"twitter:domain",content:"rivestream.org"}),(0,r.jsx)("meta",{property:"twitter:url",content:"https://rivestream.org"}),(0,r.jsx)("meta",{name:"twitter:title",content:"Rive"}),(0,r.jsx)("meta",{name:"twitter:description",content:"Your Personal Streaming Oasis"}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://rivestream.org/images/MetaImage.jpg"})]}),(0,r.jsxs)(q,{children:[(0,r.jsx)(B.x7,{toastOptions:{className:"sooner-toast-desktop"},position:"bottom-right",expand:!0}),(0,r.jsx)(B.x7,{toastOptions:{className:"sooner-toast-mobile"},position:"top-center"}),(0,r.jsx)(t,{...n}),(0,r.jsx)(ta,{id:"tooltip",className:"react-tooltip"})]}),(0,r.jsx)(tu.GoogleAnalytics,{gaId:"G-TY1B74WN3B"}),(0,r.jsx)($(),{"disable-devtool-auto":!0,src:"https://cdn.jsdelivr.net/npm/disable-devtool"})]})}},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,o=l(e),s=o[0],a=o[1],c=new i((s+a)*3/4-a),u=0,h=a>0?s-4:s;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&o.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,n){"use strict";var r=n(675),i=n(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);var n=0|f(e,t),r=s(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(A(e,ArrayBuffer)||e&&A(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(A(e,SharedArrayBuffer)||e&&A(e.buffer,SharedArrayBuffer)))return function(e,t,n){var r;if(t<0||e.byteLength=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||A(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return x(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return I(e).length;default:if(i)return r?-1:x(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var i,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(o=n=+n)!=o&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=n;oa&&(n=a-l),o=n;o>=0;o--){for(var h=!0,d=0;d239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rn)throw RangeError("Trying to access beyond buffer length")}function b(e,t,n,r,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function _(e,t,n,r,i,o){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function S(e,t,n,r,o){return t=+t,n>>>=0,o||_(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,o){return t=+t,n>>>=0,o||_(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(A(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),A(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);in&&(e+=" ... "),""},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(A(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),h=0;h>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,l,c,u,h,d,f,p,m,g=this.length-t;if((void 0===n||n>g)&&(n=g),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var v=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var s=0;s>8,i.push(n%256),i.push(r);return i}(e,this.length-p),this,p,m);default:if(v)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),v=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||w(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||w(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||w(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||w(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;b(this,e,t,n,i,0)}var o=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;b(this,e,t,n,i,0)}var o=n-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);b(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);b(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return S(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return S(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!i){if(n>56319||s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function T(e){for(var t=[],n=0;n=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var k=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},783:function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<>1,d=23===i?5960464477539062e-23:0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<0;e[n+f]=255&s,f+=p,s/=256,c-=8);e[n+f-p]|=128*m}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}},s=!0;try{t[e](o,o.exports,r),s=!1}finally{s&&delete n[e]}return o.exports}r.ab="//";var i=r(72);e.exports=i}()},29983:function(e){e.exports={HamNav:"style_HamNav__4PZw1",settingsPopoverCard:"style_settingsPopoverCard__8vUJf",logo:"style_logo__zAOTa",inactive:"style_inactive__her3F",active:"style_active__sz_Xk"}},2486:function(e){e.exports={background:"style_background__ON_IT"}},57701:function(e){e.exports={navbar:"style_navbar__qSEpZ",navbar_wrapper:"style_navbar_wrapper__BmV0s",inactive:"style_inactive__EPRfk",active:"style_active__3b48a",mobileHide:"style_mobileHide__3q3RG",mobileShow:"style_mobileShow__mA_Nq",showNavBanner:"style_showNavBanner__JNy5Q",showNavBanner_wrapper:"style_showNavBanner_wrapper__8scdV",showOnWatchPageOnly:"style_showOnWatchPageOnly__xWtRm"}},95202:function(e){e.exports={inactivePlayer:"style_inactivePlayer__ECwk0",closeRadio:"style_closeRadio__U2_Ik",radioPlayer:"style_radioPlayer__Xi7qp",block:"style_block__2Ypsr",detailBlock:"style_detailBlock__778XD",imageBlock:"style_imageBlock__5rTCi",audioBlock:"style_audioBlock__f_g2Z",icons:"style_icons__kNsQ_",img:"style_img__mCCKu",imgInside:"style_imgInside__qLLVI",showMobile:"style_showMobile___u_jb",hidePlayer:"style_hidePlayer__YH1rF",hideMobile:"style_hideMobile__8cRwJ",hideMenu:"style_hideMenu__STrJi",showMenu:"style_showMenu__SLE_1",spinAnimation:"style_spinAnimation___RqJK",spin:"style_spin__W54Bh"}},86355:function(e){e.exports={settingsPage:"Settings_settingsPage__OJVd_",highlight:"Settings_highlight__C_6PB",logo:"Settings_logo__jb_Jv",settings:"Settings_settings__RfMts",group:"Settings_group__sReDH",group2:"Settings_group2__Xra6D",settingsActionBtn:"Settings_settingsActionBtn__KgIj0",logout:"Settings_logout__hwDVk",downloadButton:"Settings_downloadButton__Qjlk4",input:"Settings_input__1emGf",forgotPassword:"Settings_forgotPassword__Zi6UL",profileCard:"Settings_profileCard__rA_NW",downloadsGroup:"Settings_downloadsGroup___VvIz",downloadsHeading:"Settings_downloadsHeading__IClTe",authPage:"Settings_authPage__vxszY",signin:"Settings_signin__AKV2S",errorData:"Settings_errorData__NPgWc",hide:"Settings_hide__bi18l",donation:"Settings_donation__V7neP",walletAdd:"Settings_walletAdd__B_xmg",settingsPopover:"Settings_settingsPopover__jie0j",settingsPopoverCard:"Settings_settingsPopoverCard__mc0H7",settingsPopoverBtns:"Settings_settingsPopoverBtns__B8gCb",popoverConfirmBtn:"Settings_popoverConfirmBtn__q0ccZ",adsPage:"Settings_adsPage__BcMuZ",statsList:"Settings_statsList__kyEBE",statsCard:"Settings_statsCard__WOspJ",showSpan:"Settings_showSpan__dYt_0",domainPage:"Settings_domainPage__1G3WN",domain:"Settings_domain__XOU1b",active:"Settings_active__BCCw_",inactive:"Settings_inactive__CcjYH",settingsWrapper:"Settings_settingsWrapper__92lBM",adsPageLogo:"Settings_adsPageLogo__tHk1E"}},79102:function(){},39985:function(){},93962:function(){},4843:function(){},80215:function(){},51476:function(){},77663:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var l=[],c=!1,u=-1;function h(){c&&r&&(c=!1,r.length?l=r.concat(l):u=-1,l.length&&d())}function d(){if(!c){var e=a(h);c=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n
'};function o(e,t,n){return en?n:e}r.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(i[t]=n);return this},r.status=null,r.set=function(e){var t=r.isStarted();e=o(e,i.minimum,1),r.status=1===e?null:e;var n=r.render(!t),l=n.querySelector(i.barSelector),c=i.speed,u=i.easing;return n.offsetWidth,s(function(t){var o,s;""===i.positionUsing&&(i.positionUsing=r.getPositioningCSS()),a(l,(o=e,(s="translate3d"===i.positionUsing?{transform:"translate3d("+(-1+o)*100+"%,0,0)"}:"translate"===i.positionUsing?{transform:"translate("+(-1+o)*100+"%,0)"}:{"margin-left":(-1+o)*100+"%"}).transition="all "+c+"ms "+u,s)),1===e?(a(n,{transition:"none",opacity:1}),n.offsetWidth,setTimeout(function(){a(n,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){r.remove(),t()},c)},c)):setTimeout(t,c)}),this},r.isStarted=function(){return"number"==typeof r.status},r.start=function(){r.status||r.set(0);var e=function(){setTimeout(function(){r.status&&(r.trickle(),e())},i.trickleSpeed)};return i.trickle&&e(),this},r.done=function(e){return e||r.status?r.inc(.3+.5*Math.random()).set(1):this},r.inc=function(e){var t=r.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),r.set(t)):r.start()},r.trickle=function(){return r.inc(Math.random()*i.trickleRate)},e=0,t=0,r.promise=function(n){return n&&"resolved"!==n.state()&&(0===t&&r.start(),e++,t++,n.always(function(){0==--t?(e=0,r.done()):r.set((e-t)/e)})),this},r.render=function(e){if(r.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=i.template;var n,o=t.querySelector(i.barSelector),s=e?"-100":(-1+(r.status||0))*100,l=document.querySelector(i.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),!i.showSpinner&&(n=t.querySelector(i.spinnerSelector))&&d(n),l!=document.body&&c(l,"nprogress-custom-parent"),l.appendChild(t),t},r.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(i.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective" in e?"translate3d":t+"Transform" in e?"translate":"margin"};var s=(n=[],function(e){n.push(e),1==n.length&&function e(){var t=n.shift();t&&t(e)}()}),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n,r,i){var o;r=t[o=(o=r).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]||(t[o]=function(t){var n=document.body.style;if(t in n)return t;for(var r,i=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+o)in n)return r;return t}(o)),n.style[r]=i}return function(e,t){var r,i,o=arguments;if(2==o.length)for(r in t)void 0!==(i=t[r])&&t.hasOwnProperty(r)&&n(e,r,i);else n(e,o[1],o[2])}}();function l(e,t){return("string"==typeof e?e:h(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=h(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function u(e,t){var n,r=h(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function h(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return r})?r.call(t,n,t,e):r)&&(e.exports=i)},72679:function(e,t,n){(()=>{var t={296:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),h=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return NaN;if(m(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=m(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var l=o.test(e);return l||s.test(e)?a(e.slice(2),l?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,s,a,l,c=0,u=!1,h=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function w(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=o}function b(){var e,n=p();if(w(n))return _(n);a=setTimeout(b,(e=t-(n-l),h?f(e,o-(n-c)):e))}function _(e){return a=void 0,v&&r?y(e):(r=i=void 0,s)}function S(){var e,n=p(),o=w(n);if(r=arguments,i=this,l=n,o){if(void 0===a)return c=e=l,a=setTimeout(b,t),u?y(e):s;if(h)return a=setTimeout(b,t),y(l)}return void 0===a&&(a=setTimeout(b,t)),s}return t=g(t)||0,m(n)&&(u=!!n.leading,o=(h="maxWait"in n)?d(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},S.flush=function(){return void 0===a?s:_(p())},S}},96:(e,t,n)=>{var r="Expected a function",i=NaN,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),f=Object.prototype.toString,p=Math.max,m=Math.min,g=function(){return d.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==f.call(t))return i;if(v(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=v(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):s.test(e)?i:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw TypeError(r);return v(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(e,t,n){var i,o,s,a,l,c,u=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw TypeError(r);function w(t){var n=i,r=o;return i=o=void 0,u=t,a=e.apply(r,n)}function b(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-u>=s}function _(){var e,n=g();if(b(n))return S(n);l=setTimeout(_,(e=t-(n-c),d?m(e,s-(n-u)):e))}function S(e){return l=void 0,f&&i?w(e):(i=o=void 0,a)}function C(){var e,n=g(),r=b(n);if(i=arguments,o=this,c=n,r){if(void 0===l)return u=e=c,l=setTimeout(_,t),h?w(e):a;if(d)return l=setTimeout(_,t),w(c)}return void 0===l&&(l=setTimeout(_,t)),a}return t=y(t)||0,v(n)&&(h=!!n.leading,s=(d="maxWait"in n)?p(y(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),C.cancel=function(){void 0!==l&&clearTimeout(l),u=0,i=c=o=l=void 0},C.flush=function(){return void 0===l?a:S(g())},C}(e,t,{leading:i,maxWait:t,trailing:o})}},703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=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 a.name="Invariant Violation",a}}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:o,resetWarningCache:i};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{LazyLoadComponent:()=>B,LazyLoadImage:()=>Z,trackWindowScroll:()=>k});let e=n(67294);var t=i.n(e),r=i(697);function s(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(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 c(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==a(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===a(t)?t:String(t)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){e.forEach(function(e){e.isIntersecting&&e.target.onVisible()})},f={},p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(o,e);var n,r,i=(r=function(){if("undefined"==typeof Reflect||!Reflect.construct||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}}(),function(){var e,t=h(o);return e=r?Reflect.construct(t,arguments,h(this).constructor):t.apply(this,arguments),function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function o(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).supportsObserver=!e.scrollPosition&&e.useIntersectionObserver&&s(),t.supportsObserver){var n=e.threshold;t.observer=(f[n]=f[n]||new IntersectionObserver(d,{rootMargin:n+"px"}),f[n])}return t}return n=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollPosition,t=this.placeholder.getBoundingClientRect(),n=this.placeholder.style,r=parseInt(n.getPropertyValue("margin-left"),10)||0,i=parseInt(n.getPropertyValue("margin-top"),10)||0;return{bottom:e.y+t.bottom+i,left:e.x+t.left+r,right:e.x+t.right+r,top:e.y+t.top+i}}},{key:"isPlaceholderInViewport",value:function(){if("undefined"==typeof window||!this.placeholder)return!1;var e=this.props,t=e.scrollPosition,n=e.threshold,r=this.getPlaceholderBoundingBox(t),i=t.y+window.innerHeight,o=t.x,s=t.x+window.innerWidth;return!!(t.y-n<=r.bottom&&i+n>=r.top&&o-n<=r.right&&s+n>=r.left)}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var e=this,n=this.props,r=n.className,i=n.height,o=n.placeholder,s=n.style,a=n.width;if(o&&"function"!=typeof o.type)return t().cloneElement(o,{ref:function(t){return e.placeholder=t}});var u=function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,S)),i=this.useIntersectionObserver?null:this.state.scrollPosition;return t().createElement(e,C({forwardRef:this.baseComponentRef,scrollPosition:i},r))}}],function(e,t){for(var n,r=0;r=0&&Number.isFinite(s.y)&&s.y>=0),t}return n=[{key:"componentDidUpdate",value:function(e,t){t.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var e=this.props,n=e.className,r=e.delayMethod,i=e.delayTime,o=e.height,a=e.placeholder,l=e.scrollPosition,c=e.style,u=e.threshold,h=e.useIntersectionObserver,d=e.width;return this.isScrollTracked||h&&s()?t().createElement(p,{className:n,height:o,onVisible:this.onVisible,placeholder:a,scrollPosition:l,style:c,threshold:u,useIntersectionObserver:h,width:d}):t().createElement(j,{className:n,delayMethod:r,delayTime:i,height:o,onVisible:this.onVisible,placeholder:a,style:c,threshold:u,width:d})}}],function(e,t){for(var n,r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,H));return t().createElement("img",$({},n,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var e=this.props,n=e.beforeLoad,r=e.className,i=e.delayMethod,o=e.delayTime,s=e.height,a=e.placeholder,l=e.scrollPosition,c=e.style,u=e.threshold,h=e.useIntersectionObserver,d=e.visibleByDefault,f=e.width;return t().createElement(B,{beforeLoad:n,className:r,delayMethod:i,delayTime:o,height:s,placeholder:a,scrollPosition:l,style:c,threshold:u,useIntersectionObserver:h,visibleByDefault:d,width:f},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(e){var n=this.props,r=n.effect,i=n.height,o=n.placeholderSrc,s=n.width,a=n.wrapperClassName,l=n.wrapperProps,c=this.state.loaded;return t().createElement("span",$({className:a+" lazy-load-image-background "+r+(c?" lazy-load-image-loaded":""),style:z(z({},c||!o?{}:{backgroundImage:"url(".concat(o,")"),backgroundSize:"100% 100%"}),{},{color:"transparent",display:"inline-block",height:i,width:s})},l),e)}},{key:"render",value:function(){var e=this.props,t=e.effect,n=e.placeholderSrc,r=e.visibleByDefault,i=e.wrapperClassName,o=e.wrapperProps,s=this.getLazyLoadImage();return(t||n)&&!r||i||o?this.getWrappedLazyLoadImage(s):s}}],function(e,t){for(var n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let o=i(n(89426)),s=n(17058);t.GoogleAnalytics=e=>{var t=r(e,[]);return(0,s.formatData)(o.default,t)}},34248:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleMapsEmbed=void 0;let o=i(n(27395)),s=n(17058);t.GoogleMapsEmbed=e=>{var t=r(e,[]);return(0,s.formatData)(o.default,t)}},92239:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let o=i(n(88420)),s=n(17058);t.YouTubeEmbed=e=>{var t=r(e,[]);return(0,s.formatData)(o.default,t)}},17058:function(e,t){"use strict";function n(e,t,n=!1){return t?Object.keys(e).filter(e=>n?!t.includes(e):t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}):{}}function r(e,t,n,r){let i=r&&Object.keys(r).length>0?new URL(Object.values(r)[0],e):new URL(e);return t&&n&&t.forEach(e=>{n[e]&&i.searchParams.set(e,n[e])}),i.toString()}function i(e,t,n,i,o){var s;if(!t)return`<${e}>`;let a=(null===(s=t.src)||void 0===s?void 0:s.url)?Object.assign(Object.assign({},t),{src:r(t.src.url,t.src.params,i,o)}):t,l=Object.keys(Object.assign(Object.assign({},a),n)).reduce((e,t)=>{let r=null==n?void 0:n[t],i=a[t],o=null!=r?r:i,s=!0===o?t:`${t}="${o}"`;return o?e+` ${s}`:e},"");return`<${e}${l}>`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatData=t.createHtml=t.formatUrl=void 0,t.formatUrl=r,t.createHtml=i,t.formatData=function(e,t){var o,s,a,l,c;let u=n(t,null===(o=e.scripts)||void 0===o?void 0:o.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[])),h=n(t,null===(a=null===(s=e.html)||void 0===s?void 0:s.attributes.src)||void 0===a?void 0:a.params),d=n(t,[null===(c=null===(l=e.html)||void 0===l?void 0:l.attributes.src)||void 0===c?void 0:c.slugParam]),f=n(t,[...Object.keys(u),...Object.keys(h),...Object.keys(d)],!0);return Object.assign(Object.assign({},e),{html:e.html?i(e.html.element,e.html.attributes,f,h,d):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:r(e.url,e.params,u)})):null})}},93967:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;tt.some(t=>e instanceof t),u=new WeakMap,h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("objectStoreNames"===t)return e.objectStoreNames||d.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function g(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(g(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&u.set(t,e)}).catch(()=>{}),p.set(t,e),t}(e);if(f.has(e))return f.get(e);let n="function"==typeof(t=e)?t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(v(this),e),g(u.get(this))}:function(...e){return g(t.apply(v(this),e))}:function(e,...n){let r=t.call(v(this),e,...n);return d.set(r,e.sort?e.sort():[e]),g(r)}:(t instanceof IDBTransaction&&function(e){if(h.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});h.set(e,t)}(t),c(t,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,m):t;return n!==e&&(f.set(e,n),p.set(n,e)),n}let v=e=>p.get(e),y=["get","getKey","getAll","getAllKeys","count"],w=["put","add","delete","clear"],b=new Map;function _(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(b.get(t))return b.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=w.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||y.includes(n)))return;let o=async function(e,...t){let o=this.transaction(e,i?"readwrite":"readonly"),s=o.store;return r&&(s=s.index(t.shift())),(await Promise.all([s[n](...t),i&&o.done]))[0]};return b.set(t,o),o}m={...o=m,get:(e,t,n)=>_(e,t)||o.get(e,t,n),has:(e,t)=>!!_(e,t)||o.has(e,t)};class S{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let C="@firebase/app",E="0.10.13",x=new a.Yd("@firebase/app"),T="[DEFAULT]",I={[C]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/data-connect":"fire-data-connect","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/vertexai-preview":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},P=new Map,A=new Map,k=new Map;function O(e,t){try{e.container.addComponent(t)}catch(n){x.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function R(e){let t=e.name;if(k.has(t))return x.debug(`There were multiple attempts to register component ${t}.`),!1;for(let n of(k.set(t,e),P.values()))O(n,e);for(let t of A.values())O(t,e);return!0}function M(e,t){let n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function j(e){return void 0!==e.settings}let L=new l.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class N{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new s.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw L.create("app-deleted",{appName:this._name})}}let D="10.14.1";function V(e,t={}){let n=e;"object"!=typeof t&&(t={name:t});let r=Object.assign({name:T,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw L.create("bad-app-name",{appName:String(i)});if(n||(n=(0,l.aH)()),!n)throw L.create("no-options");let o=P.get(i);if(o){if((0,l.vZ)(n,o.options)&&(0,l.vZ)(r,o.config))return o;throw L.create("duplicate-app",{appName:i})}let a=new s.H0(i);for(let e of k.values())a.addComponent(e);let c=new N(n,r,a);return P.set(i,c),c}function F(e=T){let t=P.get(e);if(!t&&e===T&&(0,l.aH)())return V();if(!t)throw L.create("no-app",{appName:e});return t}function B(e,t,n){var r;let i=null!==(r=I[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);let o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){let e=[`Unable to register library "${i}" with version "${t}":`];o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),x.warn(e.join(" "));return}R(new s.wA(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}let U="firebase-heartbeat-store",H=null;function q(){return H||(H=(function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){let s=indexedDB.open(e,1),a=g(s);return r&&s.addEventListener("upgradeneeded",e=>{r(g(s.result),e.oldVersion,e.newVersion,g(s.transaction),e)}),n&&s.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a})("firebase-heartbeat-database",0,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(U)}catch(e){console.warn(e)}}}).catch(e=>{throw L.create("idb-open",{originalErrorMessage:e.message})})),H}async function z(e){try{let t=(await q()).transaction(U),n=await t.objectStore(U).get(W(e));return await t.done,n}catch(e){if(e instanceof l.ZR)x.warn(e.message);else{let t=L.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});x.warn(t.message)}}}async function $(e,t){try{let n=(await q()).transaction(U,"readwrite"),r=n.objectStore(U);await r.put(t,W(e)),await n.done}catch(e){if(e instanceof l.ZR)x.warn(e.message);else{let t=L.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});x.warn(t.message)}}}function W(e){return`${e.name}!${e.options.appId}`}class K{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new Y(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){var e,t;try{let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=G();if((null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(e=>e.date===r))return;return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache)}catch(e){x.warn(e)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null||0===this._heartbeatsCache.heartbeats.length)return"";let t=G(),{heartbeatsToSend:n,unsentEntries:r}=function(e,t=1024){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),Z(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Z(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=(0,l.L)(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return x.warn(e),""}}}function G(){return new Date().toISOString().substring(0,10)}class Y{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,l.hl)()&&(0,l.eu)().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await z(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return $(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return $(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Z(e){return(0,l.L)(JSON.stringify({version:2,heartbeats:e})).length}R(new s.wA("platform-logger",e=>new S(e),"PRIVATE")),R(new s.wA("heartbeat",e=>new K(e),"PRIVATE")),B(C,E,""),B(C,E,"esm2017"),B("fire-js","")},8463:function(e,t,n){"use strict";n.d(t,{H0:function(){return a},wA:function(){return i}});var r=n(74444);class i{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}let o="[DEFAULT]";class s{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new r.BH;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:o})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=o){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=o){return this.instances.has(e)}getOptions(e=o){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){var n;let r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);let o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:e===o?void 0:e,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}return n||null}normalizeInstanceIdentifier(e=o){return this.component?this.component.multipleInstances?e:o:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new s(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},53333:function(e,t,n){"use strict";var r,i;n.d(t,{Yd:function(){return u},in:function(){return r}});let o=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let s={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,l={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},c=(e,t,...n)=>{if(tt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}"function"==typeof SuppressedError&&SuppressedError;var l=n(8463);function c(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}let u=new o.LL("auth","Firebase",c()),h=new s.Yd("@firebase/auth");function d(e,...t){h.logLevel<=s.in.ERROR&&h.error(`Auth (${i.Jn}): ${e}`,...t)}function f(e,...t){throw v(e,...t)}function p(e,...t){return v(e,...t)}function m(e,t,n){let r=Object.assign(Object.assign({},c()),{[t]:n});return new o.LL("auth","Firebase",r).create(t,{appName:e.name})}function g(e){return m(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function v(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return u.create(e,...t)}function y(e,t,...n){if(!e)throw v(t,...n)}function w(e){let t="INTERNAL ASSERTION FAILED: "+e;throw d(t),Error(t)}function b(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function _(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class S{constructor(e,t){var n;this.shortDelay=e,this.longDelay=t,n="Short delay should be less than long delay!",t>e||w(n),this.isMobile=(0,o.uI)()||(0,o.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===_()||"https:"===_()||(0,o.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function C(e,t){var n,r;n=e.emulator,r="Emulator should always be set here",n||w(r);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}class E{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void w("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void w("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void w("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let x={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},T=new S(3e4,6e4);function I(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function P(e,t,n,r,i={}){return A(e,i,async()=>{let i={},s={};r&&("GET"===t?s=r:i={body:JSON.stringify(r)});let a=(0,o.xO)(Object.assign({key:e.config.apiKey},s)).slice(1),l=await e._getAdditionalHeaders();l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode);let c=Object.assign({method:t,headers:l},i);return(0,o.L_)()||(c.referrerPolicy="no-referrer"),E.fetch()(O(e,e.config.apiHost,n,a),c)})}async function A(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},x),t);try{let t=new R(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let o=await i.json();if("needConfirmation"in o)throw M(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{let[t,n]=(i.ok?o.errorMessage:o.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw M(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===t)throw M(e,"email-already-in-use",o);if("USER_DISABLED"===t)throw M(e,"user-disabled",o);let s=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(n)throw m(e,s,n);f(e,s)}}catch(t){if(t instanceof o.ZR)throw t;f(e,"network-request-failed",{message:String(t)})}}async function k(e,t,n,r,i={}){let o=await P(e,t,n,r,i);return"mfaPendingCredential"in o&&f(e,"multi-factor-auth-required",{_serverResponse:o}),o}function O(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?C(e.config,i):`${e.config.apiScheme}://${i}`}class R{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(p(this.auth,"network-request-failed")),T.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function M(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=p(e,t,r);return i.customData._tokenResponse=n,i}function j(e){return void 0!==e&&void 0!==e.enterprise}class L{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function N(e,t){return P(e,"GET","/v2/recaptchaConfig",I(e,t))}async function D(e,t){return P(e,"POST","/v1/accounts:delete",t)}async function V(e,t){return P(e,"POST","/v1/accounts:lookup",t)}function F(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function B(e,t=!1){let n=(0,o.m9)(e),r=await n.getIdToken(t),i=H(r);y(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");let s="object"==typeof i.firebase?i.firebase:void 0,a=null==s?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:F(U(i.auth_time)),issuedAtTime:F(U(i.iat)),expirationTime:F(U(i.exp)),signInProvider:a||null,signInSecondFactor:(null==s?void 0:s.sign_in_second_factor)||null}}function U(e){return 1e3*Number(e)}function H(e){let[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return d("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,o.tV)(n);if(!e)return d("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return d("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}function q(e){let t=H(e);return y(t,"internal-error"),y(void 0!==t.exp,"internal-error"),y(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function z(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof o.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class ${constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class W{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=F(this.lastLoginAt),this.creationTime=F(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function K(e){var t;let n=e.auth,r=await e.getIdToken(),i=await z(e,V(n,{idToken:r}));y(null==i?void 0:i.users.length,n,"internal-error");let o=i.users[0];e._notifyReloadListener(o);let s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?Y(o.providerUserInfo):[],a=[...e.providerData.filter(e=>!s.some(t=>t.providerId===e.providerId)),...s],l=e.isAnonymous,c=!(e.email&&o.passwordHash)&&!(null==a?void 0:a.length);Object.assign(e,{uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new W(o.createdAt,o.lastLoginAt),isAnonymous:!!l&&c})}async function G(e){let t=(0,o.m9)(e);await K(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function Y(e){return e.map(e=>{var{providerId:t}=e,n=a(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}async function Z(e,t){let n=await A(e,{},async()=>{let n=(0,o.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,s=O(e,r,"/v1/token",`key=${i}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",E.fetch()(s,{method:"POST",headers:a,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function X(e,t){return P(e,"POST","/v2/accounts:revokeToken",I(e,t))}class J{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){y(e.idToken,"internal-error"),y(void 0!==e.idToken,"internal-error"),y(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):q(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){y(0!==e.length,"internal-error");let t=q(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(y(this.refreshToken,e,"user-token-expired"),this.refreshToken)?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await Z(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){let{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new J;return n&&(y("string"==typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(y("string"==typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(y("number"==typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new J,this.toJSON())}_performRefresh(){return w("not implemented")}}function Q(e,t){y("string"==typeof e||void 0===e,"internal-error",{appName:t})}class ee{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=a(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new $(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new W(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await z(this,this.stsTokenManager.getToken(this.auth,e));return y(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return B(this,e)}reload(){return G(this)}_assign(e){this!==e&&(y(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new ee(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){y(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await K(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if((0,i.rh)(this.auth.app))return Promise.reject(g(this.auth));let e=await this.getIdToken();return await z(this,D(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,o,s,a,l,c;let u=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,v=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:w,emailVerified:b,isAnonymous:_,providerData:S,stsTokenManager:C}=t;y(w&&C,e,"internal-error");let E=J.fromJSON(this.name,C);y("string"==typeof w,e,"internal-error"),Q(u,e.name),Q(h,e.name),y("boolean"==typeof b,e,"internal-error"),y("boolean"==typeof _,e,"internal-error"),Q(d,e.name),Q(f,e.name),Q(p,e.name),Q(m,e.name),Q(g,e.name),Q(v,e.name);let x=new ee({uid:w,auth:e,email:h,emailVerified:b,displayName:u,isAnonymous:_,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:E,createdAt:g,lastLoginAt:v});return S&&Array.isArray(S)&&(x.providerData=S.map(e=>Object.assign({},e))),m&&(x._redirectEventId=m),x}static async _fromIdTokenResponse(e,t,n=!1){let r=new J;r.updateFromServerResponse(t);let i=new ee({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await K(i),i}static async _fromGetAccountInfoResponse(e,t,n){let r=t.users[0];y(void 0!==r.localId,"internal-error");let i=void 0!==r.providerUserInfo?Y(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!(null==i?void 0:i.length),s=new J;s.updateFromIdToken(n);let a=new ee({uid:r.localId,auth:e,stsTokenManager:s,isAnonymous:o});return Object.assign(a,{uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:i,metadata:new W(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null==i?void 0:i.length)}),a}}let et=new Map;function en(e){var t,n;t="Expected a class definition",e instanceof Function||w(t);let r=et.get(e);return r?(n="Instance stored in cache mismatched with class",r instanceof e||w(n)):(r=new e,et.set(e,r)),r}class er{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function ei(e,t,n){return`firebase:${e}:${t}:${n}`}er.type="NONE";class eo{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=ei(this.userKey,r.apiKey,i),this.fullPersistenceKey=ei("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?ee._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new eo(en(er),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||en(er),o=ei(n,e.config.apiKey,e.name),s=null;for(let n of t)try{let t=await n._get(o);if(t){let r=ee._fromJSON(e,t);n!==i&&(s=r),i=n;break}}catch(e){}let a=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&a.length&&(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(o)}catch(e){}}))),new eo(i,e,n)}}function es(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(eu(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(ea(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ed(t))return"Blackberry";if(ef(t))return"Webos";if(el(t))return"Safari";if((t.includes("chrome/")||ec(t))&&!t.includes("edge/"))return"Chrome";if(eh(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function ea(e=(0,o.z$)()){return/firefox\//i.test(e)}function el(e=(0,o.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ec(e=(0,o.z$)()){return/crios\//i.test(e)}function eu(e=(0,o.z$)()){return/iemobile/i.test(e)}function eh(e=(0,o.z$)()){return/android/i.test(e)}function ed(e=(0,o.z$)()){return/blackberry/i.test(e)}function ef(e=(0,o.z$)()){return/webos/i.test(e)}function ep(e=(0,o.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function em(e=(0,o.z$)()){return ep(e)||eh(e)||ef(e)||ed(e)||/windows phone/i.test(e)||eu(e)}function eg(e,t=[]){let n;switch(e){case"Browser":n=es((0,o.z$)());break;case"Worker":n=`${es((0,o.z$)())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${i.Jn}/${r}`}class ev{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let r=e(t);n(r)}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}async function ey(e,t={}){return P(e,"GET","/v2/passwordPolicy",I(e,t))}class ew{constructor(e){var t,n,r,i;let o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(n=e.allowedNonAlphanumericCharacters)||void 0===n?void 0:n.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,i,o,s;let a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(n=a.meetsMaxPasswordLength)||void 0===n||n),a.isValid&&(a.isValid=null===(r=a.containsLowercaseLetter)||void 0===r||r),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class eb{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eS(this),this.idTokenSubscription=new eS(this),this.beforeStateQueue=new ev(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=u,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=en(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await eo.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await V(this,{idToken:e}),n=await ee._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if((0,i.rh)(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let n=await this.assertedPersistence.getCurrentUser(),r=n,o=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,i=null==r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);(!n||n===i)&&(null==s?void 0:s.user)&&(r=s.user,o=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(y(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await K(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if((0,i.rh)(this.app))return Promise.reject(g(this));let t=e?(0,o.m9)(e):null;return t&&y(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&y(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return(0,i.rh)(this.app)?Promise.reject(g(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return(0,i.rh)(this.app)?Promise.reject(g(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(en(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new ew(await ey(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new o.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let n=this.onAuthStateChanged(()=>{n(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await X(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&en(e)||this._popupRedirectResolver;y(t,this,"argument-error"),this.redirectPersistenceManager=await eo.create(this,[en(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),o=!1,s=this._isInitialized?Promise.resolve():this._initializationPromise;if(y(s,this,"internal-error"),s.then(()=>{o||i(this.currentUser)}),"function"==typeof t){let i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{let n=e.addObserver(t);return()=>{o=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return y(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=eg(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){h.logLevel<=s.in.WARN&&h.warn(`Auth (${i.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function e_(e){return(0,o.m9)(e)}class eS{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,o.ne)(e=>this.observer=e)}get next(){return y(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let eC={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function eE(e){return`__${e}${Math.floor(1e6*Math.random())}`}class ex{constructor(e){this.type="recaptcha-enterprise",this.auth=e_(e)}async verify(e="verify",t=!1){async function n(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{N(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)n(Error("recaptcha Enterprise site key undefined"));else{let n=new L(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;j(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&j(window.grecaptcha))r(n,e,i);else{var o;if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}let t=eC.recaptchaEnterpriseScript;0!==t.length&&(t+=n),(o=t,eC.loadJS(o)).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function eT(e,t,n,r=!1){let i;let o=new ex(e);try{i=await o.verify(n)}catch(e){i=await o.verify(n,!0)}let s=Object.assign({},t);return r?Object.assign(s,{captchaResp:i}):Object.assign(s,{captchaResponse:i}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function eI(e,t,n,r){var i;if(null===(i=e._getRecaptchaConfig())||void 0===i||!i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return r(e,t).catch(async i=>{if("auth/missing-recaptcha-token"!==i.code)return Promise.reject(i);{console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let i=await eT(e,t,n,"getOobCode"===n);return r(e,i)}});{let i=await eT(e,t,n,"getOobCode"===n);return r(e,i)}}function eP(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eA(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class ek{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return w("not implemented")}_getIdTokenResponse(e){return w("not implemented")}_linkToIdToken(e,t){return w("not implemented")}_getReauthenticationResolver(e){return w("not implemented")}}async function eO(e,t){return P(e,"POST","/v1/accounts:signUp",t)}async function eR(e,t){return k(e,"POST","/v1/accounts:signInWithPassword",I(e,t))}async function eM(e,t){return P(e,"POST","/v1/accounts:sendOobCode",I(e,t))}async function ej(e,t){return eM(e,t)}async function eL(e,t){return k(e,"POST","/v1/accounts:signInWithEmailLink",I(e,t))}async function eN(e,t){return k(e,"POST","/v1/accounts:signInWithEmailLink",I(e,t))}class eD extends ek{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new eD(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new eD(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return eI(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",eR);case"emailLink":return eL(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return eI(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",eO);case"emailLink":return eN(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function eV(e,t){return k(e,"POST","/v1/accounts:signInWithIdp",I(e,t))}class eF extends ek{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eF(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):f("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=a(t,["providerId","signInMethod"]);if(!n||!r)return null;let o=new eF(n,r);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return eV(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eV(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eV(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,o.xO)(t)}return e}}async function eB(e,t){return P(e,"POST","/v1/accounts:sendVerificationCode",I(e,t))}async function eU(e,t){return k(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,t))}async function eH(e,t){let n=await k(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,t));if(n.temporaryProof)throw M(e,"account-exists-with-different-credential",n);return n}let eq={USER_NOT_FOUND:"user-not-found"};async function ez(e,t){return k(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eq)}class e$ extends ek{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new e$({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new e$({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eU(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return eH(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return ez(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new e$({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eW{constructor(e){var t,n,r,i,s,a;let l=(0,o.zd)((0,o.pd)(e)),c=null!==(t=l.apiKey)&&void 0!==t?t:null,u=null!==(n=l.oobCode)&&void 0!==n?n:null,h=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=l.mode)&&void 0!==r?r:null);y(c&&u&&h,"argument-error"),this.apiKey=c,this.operation=h,this.code=u,this.continueUrl=null!==(i=l.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(s=l.languageCode)&&void 0!==s?s:null,this.tenantId=null!==(a=l.tenantId)&&void 0!==a?a:null}static parseLink(e){let t=function(e){let t=(0,o.zd)((0,o.pd)(e)).link,n=t?(0,o.zd)((0,o.pd)(t)).deep_link_id:null,r=(0,o.zd)((0,o.pd)(e)).deep_link_id;return(r?(0,o.zd)((0,o.pd)(r)).link:null)||r||n||t||e}(e);try{return new eW(t)}catch(e){return null}}}class eK{constructor(){this.providerId=eK.PROVIDER_ID}static credential(e,t){return eD._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eW.parseLink(t);return y(n,"argument-error"),eD._fromEmailAndCode(e,n.code,n.tenantId)}}eK.PROVIDER_ID="password",eK.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eK.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class eG{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class eY extends eG{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class eZ extends eY{constructor(){super("facebook.com")}static credential(e){return eF._fromParams({providerId:eZ.PROVIDER_ID,signInMethod:eZ.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eZ.credentialFromTaggedObject(e)}static credentialFromError(e){return eZ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eZ.credential(e.oauthAccessToken)}catch(e){return null}}}eZ.FACEBOOK_SIGN_IN_METHOD="facebook.com",eZ.PROVIDER_ID="facebook.com";class eX extends eY{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eF._fromParams({providerId:eX.PROVIDER_ID,signInMethod:eX.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eX.credentialFromTaggedObject(e)}static credentialFromError(e){return eX.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return eX.credential(t,n)}catch(e){return null}}}eX.GOOGLE_SIGN_IN_METHOD="google.com",eX.PROVIDER_ID="google.com";class eJ extends eY{constructor(){super("github.com")}static credential(e){return eF._fromParams({providerId:eJ.PROVIDER_ID,signInMethod:eJ.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eJ.credentialFromTaggedObject(e)}static credentialFromError(e){return eJ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eJ.credential(e.oauthAccessToken)}catch(e){return null}}}eJ.GITHUB_SIGN_IN_METHOD="github.com",eJ.PROVIDER_ID="github.com";class eQ extends eY{constructor(){super("twitter.com")}static credential(e,t){return eF._fromParams({providerId:eQ.PROVIDER_ID,signInMethod:eQ.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eQ.credentialFromTaggedObject(e)}static credentialFromError(e){return eQ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return eQ.credential(t,n)}catch(e){return null}}}async function e0(e,t){return k(e,"POST","/v1/accounts:signUp",I(e,t))}eQ.TWITTER_SIGN_IN_METHOD="twitter.com",eQ.PROVIDER_ID="twitter.com";class e1{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){return new e1({user:await ee._fromIdTokenResponse(e,n,r),providerId:e2(n),_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){return await e._updateTokensIfNecessary(n,!0),new e1({user:e,providerId:e2(n),_tokenResponse:n,operationType:t})}}function e2(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class e4 extends o.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,e4.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new e4(e,t,n,r)}}function e5(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw e4._fromErrorAndOperation(e,n,t,r);throw n})}async function e9(e,t,n=!1){let r=await z(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return e1._forOperation(e,"link",r)}async function e3(e,t,n=!1){let{auth:r}=e;if((0,i.rh)(r.app))return Promise.reject(g(r));let o="reauthenticate";try{let i=await z(e,e5(r,o,t,e),n);y(i.idToken,r,"internal-error");let s=H(i.idToken);y(s,r,"internal-error");let{sub:a}=s;return y(e.uid===a,r,"user-mismatch"),e1._forOperation(e,o,i)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&f(r,"user-mismatch"),e}}async function e6(e,t,n=!1){if((0,i.rh)(e.app))return Promise.reject(g(e));let r="signIn",o=await e5(e,r,t),s=await e1._fromIdTokenResponse(e,r,o);return n||await e._updateCurrentUser(s.user),s}async function e8(e,t){return e6(e_(e),t)}async function e7(e){let t=e_(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function te(e,t,n){let r=e_(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};if(n){var o;y((null===(o=n.url)||void 0===o?void 0:o.length)>0,r,"invalid-continue-uri"),y(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,r,"invalid-dynamic-link-domain"),i.continueUrl=n.url,i.dynamicLinkDomain=n.dynamicLinkDomain,i.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(y(n.iOS.bundleId.length>0,r,"missing-ios-bundle-id"),i.iOSBundleId=n.iOS.bundleId),n.android&&(y(n.android.packageName.length>0,r,"missing-android-pkg-name"),i.androidInstallApp=n.android.installApp,i.androidMinimumVersionCode=n.android.minimumVersion,i.androidPackageName=n.android.packageName)}await eI(r,i,"getOobCode",ej)}async function tt(e,t,n){if((0,i.rh)(e.app))return Promise.reject(g(e));let r=e_(e),o=eI(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",e0),s=await o.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&e7(e),t}),a=await e1._fromIdTokenResponse(r,"signIn",s);return await r._updateCurrentUser(a.user),a}function tn(e,t,n){return(0,i.rh)(e.app)?Promise.reject(g(e)):e8((0,o.m9)(e),eK.credential(t,n)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&e7(e),t})}function tr(e,t,n,r){return(0,o.m9)(e).onAuthStateChanged(t,n,r)}function ti(e){return(0,o.m9)(e).signOut()}new WeakMap;let to="__sak";class ts{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(to,"1"),this.storage.removeItem(to),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class ta extends ts{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=em(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;t?this.detachListener():this.stopPolling();let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);(0,o.w1)()&&10===document.documentMode&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}ta.type="LOCAL";class tl extends ts{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}tl.type="SESSION";class tc{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new tc(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:n,data:r}=e.data,i=this.handlersMap[n];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:n});let o=Array.from(i).map(async t=>t(e.origin,r)),s=await Promise.all(o.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:n,response:s})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function tu(e="",t=10){let n="";for(let e=0;e{let l=tu("",20);o.port1.start();let c=setTimeout(()=>{a(Error("unsupported_event"))},n);i={messageChannel:o,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(c),r=setTimeout(()=>{a(Error("timeout"))},3e3);break;case"done":clearTimeout(r),s(e.data.response);break;default:clearTimeout(c),clearTimeout(r),a(Error("invalid_response"))}}},this.handlers.add(i),o.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[o.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}function td(){return window}function tf(){return void 0!==td().WorkerGlobalScope&&"function"==typeof td().importScripts}async function tp(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}let tm="firebaseLocalStorageDb",tg="firebaseLocalStorage",tv="fbase_key";class ty{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function tw(e,t){return e.transaction([tg],t?"readwrite":"readonly").objectStore(tg)}function tb(){let e=indexedDB.open(tm,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(tg,{keyPath:tv})}catch(e){n(e)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(tg)?t(n):(n.close(),await new ty(indexedDB.deleteDatabase(tm)).toPromise(),t(await tb()))})})}async function t_(e,t,n){return new ty(tw(e,!0).put({[tv]:t,value:n})).toPromise()}async function tS(e,t){let n=tw(e,!1).get(t),r=await new ty(n).toPromise();return void 0===r?null:r.value}function tC(e,t){return new ty(tw(e,!0).delete(t)).toPromise()}class tE{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await tb()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return tf()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=tc._getInstance(tf()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await tp(),!this.activeServiceWorker)return;this.sender=new th(this.activeServiceWorker);let n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await tb();return await t_(e,to,"1"),await tC(e,to),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>t_(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tS(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>tC(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new ty(tw(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;if(0!==e.length)for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}async function tx(e,t,n){var r,i,o;let s=await n.verify();try{let a;if(y("string"==typeof s,e,"argument-error"),y("recaptcha"===n.type,e,"argument-error"),a="string"==typeof t?{phoneNumber:t}:t,"session"in a){let t=a.session;if("phoneNumber"in a)return y("enroll"===t.type,e,"internal-error"),(await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:a.phoneNumber,recaptchaToken:s}},P(e,"POST","/v2/accounts/mfaEnrollment:start",I(e,i)))).phoneSessionInfo.sessionInfo;{y("signin"===t.type,e,"internal-error");let n=(null===(r=a.multiFactorHint)||void 0===r?void 0:r.uid)||a.multiFactorUid;return y(n,e,"missing-multi-factor-info"),(await (o={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:s}},P(e,"POST","/v2/accounts/mfaSignIn:start",I(e,o)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eB(e,{phoneNumber:a.phoneNumber,recaptchaToken:s});return t}}finally{n._reset()}}tE.type="LOCAL",eE("rcb"),new S(3e4,6e4);class tT{constructor(e){this.providerId=tT.PROVIDER_ID,this.auth=e_(e)}verifyPhoneNumber(e,t){return tx(this.auth,e,(0,o.m9)(t))}static credential(e,t){return e$._fromVerification(e,t)}static credentialFromResult(e){return tT.credentialFromTaggedObject(e)}static credentialFromError(e){return tT.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?e$._fromTokenResponse(t,n):null}}function tI(e,t){return t?en(t):(y(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}tT.PROVIDER_ID="phone",tT.PHONE_SIGN_IN_METHOD="phone";class tP extends ek{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eV(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eV(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eV(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function tA(e){return e6(e.auth,new tP(e),e.bypassAuthState)}function tk(e){let{auth:t,user:n}=e;return y(n,t,"internal-error"),e3(n,new tP(e),e.bypassAuthState)}async function tO(e){let{auth:t,user:n}=e;return y(n,t,"internal-error"),e9(n,new tP(e),e.bypassAuthState)}class tR{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o){this.reject(o);return}let a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tA;case"linkViaPopup":case"linkViaRedirect":return tO;case"reauthViaPopup":case"reauthViaRedirect":return tk;default:f(this.auth,"internal-error")}}resolve(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||w(n),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||w(n),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let tM=new S(2e3,1e4);async function tj(e,t,n){if((0,i.rh)(e.app))return Promise.reject(p(e,"operation-not-supported-in-this-environment"));let r=e_(e);!function(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&f(e,"argument-error"),m(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}(e,t,eG);let o=tI(r,n);return new tL(r,"signInViaPopup",t,o).executeNotNull()}class tL extends tR{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,tL.currentPopupAction&&tL.currentPopupAction.cancel(),tL.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return y(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||w(t);let n=tu();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],n),this.authWindow.associatedEvent=n,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(p(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(p(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tL.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(p(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,tM.get())};e()}}tL.currentPopupAction=null;let tN=new Map;class tD extends tR{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=tN.get(this.auth._key());if(!e){try{let t=await tV(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}tN.set(this.auth._key(),e)}return this.bypassAuthState||tN.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tV(e,t){let n=ei("pendingRedirect",t.config.apiKey,t.name),r=en(e._redirectPersistence);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function tF(e,t){tN.set(e._key(),t)}async function tB(e,t,n=!1){if((0,i.rh)(e.app))return Promise.reject(g(e));let r=e_(e),o=tI(r,t),s=new tD(r,o,n),a=await s.execute();return a&&!n&&(delete a.user._redirectEventId,await r._persistUserIfCurrent(a.user),await r._setRedirectUser(null,t)),a}class tU{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tq(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!tq(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(p(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(tH(e))}saveEventToCache(e){this.cachedEventUids.add(tH(e)),this.lastProcessedEventTime=Date.now()}}function tH(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tq({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}async function tz(e,t={}){return P(e,"GET","/v1/projects",t)}let t$=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tW=/^https?/;async function tK(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tz(e);for(let e of t)try{if(function(e){let t=b(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!tW.test(n))return!1;if(t$.test(e))return r===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}(e))return}catch(e){}f(e,"unauthorized-domain")}let tG=new S(3e4,6e4);function tY(){let e=td().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t{var r,i,o,s;function a(){tY(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{tY(),n(p(e,"network-request-failed"))},timeout:tG.get()})}if(null===(i=null===(r=td().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(o=td().gapi)||void 0===o?void 0:o.load)a();else{let t=eE("iframefcb");return td()[t]=()=>{gapi.load?a():n(p(e,"network-request-failed"))},(s=`${eC.gapiScript}?onload=${t}`,eC.loadJS(s)).catch(e=>n(e))}}).catch(e=>{throw tZ=null,e})),n=td().gapi;return y(n,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;y(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?C(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:i.Jn},s=tQ.get(e.config.apiHost);s&&(r.eid=s);let a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),`${n}?${(0,o.xO)(r).slice(1)}`}(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tJ,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=p(e,"network-request-failed"),o=td().setTimeout(()=>{r(i)},tX.get());function s(){td().clearTimeout(o),n(t)}t.ping(s).then(s,()=>{r(i)})}))}let t1={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class t2{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let t4=encodeURIComponent("fac");async function t5(e,t,n,r,s,a){y(e.config.authDomain,e,"auth-domain-config-required"),y(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:i.Jn,eventId:s};if(t instanceof eG)for(let[n,r]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,o.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(a||{})))l[n]=r;if(t instanceof eY){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(l.scopes=e.join(","))}for(let t of(e.tenantId&&(l.tid=e.tenantId),Object.keys(l)))void 0===l[t]&&delete l[t];let c=await e._getAppCheckToken(),u=c?`#${t4}=${encodeURIComponent(c)}`:"";return`${function({config:e}){return e.emulator?C(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,o.xO)(l).slice(1)}${u}`}let t9="webStorageSupport";class t3{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=tl,this._completeRedirectFn=tB,this._overrideRedirectResult=tF}async _openPopup(e,t,n,r){var i,s,a;s=null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,a="_initialize() not called before _openPopup()",s||w(a);let l=await t5(e,t,n,b(),r);return function(e,t,n,r=500,i=600){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",c=Object.assign(Object.assign({},t1),{width:r.toString(),height:i.toString(),top:s,left:a}),u=(0,o.z$)().toLowerCase();n&&(l=ec(u)?"_blank":n),ea(u)&&(t=t||"http://localhost",c.scrollbars="yes");let h=Object.entries(c).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=(0,o.z$)()){var t;return ep(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(u)&&"_self"!==l)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",l),new t2(null);let d=window.open(t||"",l,h);y(d,e,"popup-blocked");try{d.focus()}catch(e){}return new t2(d)}(e,l,tu())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=await t5(e,t,n,b(),r),td().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var n;let{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(n="If manager is not set, promise should be",r||w(n),r)}let r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){let t=await t0(e),n=new tU(e);return t.register("authEvent",t=>(y(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(t9,{type:t9},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[t9];void 0!==i&&t(!!i),f(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=tK(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return em()||el()||ep()}}class t6{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return w("unexpected MultiFactorSessionType")}}}class t8 extends t6{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new t8(e)}_finalizeEnroll(e,t,n){return P(e,"POST","/v2/accounts/mfaEnrollment:finalize",I(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:finalize",I(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class t7{constructor(){}static assertion(e){return t8._fromCredential(e)}}t7.FACTOR_ID="phone";class ne{static assertionForEnrollment(e,t){return nt._fromSecret(e,t)}static assertionForSignIn(e,t){return nt._fromEnrollmentId(e,t)}static async generateSecret(e){var t,n;y(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let r=await P(n=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",I(n,{idToken:e.credential,totpEnrollmentInfo:{}}));return nn._fromStartTotpMfaEnrollmentResponse(r,e.user.auth)}}ne.FACTOR_ID="totp";class nt extends t6{constructor(e,t,n){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(e,t){return new nt(t,void 0,e)}static _fromEnrollmentId(e,t){return new nt(t,e)}async _finalizeEnroll(e,t,n){return y(void 0!==this.secret,e,"argument-error"),P(e,"POST","/v2/accounts/mfaEnrollment:finalize",I(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){y(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let n={verificationCode:this.otp};return P(e,"POST","/v2/accounts/mfaSignIn:finalize",I(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n}))}}class nn{constructor(e,t,n,r,i,o,s){this.sessionInfo=o,this.auth=s,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nn(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var n;let r=!1;return(nr(e)||nr(t))&&(r=!0),r&&(nr(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),nr(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function nr(e){return void 0===e||(null==e?void 0:e.length)===0}var ni="@firebase/auth",no="1.7.9";class ns{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){y(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let na=(0,o.Pz)("authIdTokenMaxAge")||300,nl=null,nc=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>na)return;let i=null==n?void 0:n.token;nl!==i&&(nl=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function nu(e=(0,i.Mq)()){let t=(0,i.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let n=function(e,t){let n=(0,i.qX)(e,"auth");if(n.isInitialized()){let e=n.getImmediate(),r=n.getOptions();if((0,o.vZ)(r,null!=t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:t3,persistence:[tE,ta,tl]}),r=(0,o.Pz)("authTokenSyncURL");if(r&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(r,location.origin);if(location.origin===e.origin){var s,a;let t=nc(e.toString());s=()=>t(n.currentUser),(0,o.m9)(n).beforeAuthStateChanged(t,s),a=e=>t(e),(0,o.m9)(n).onIdTokenChanged(a,void 0,void 0)}}let l=(0,o.q4)("auth");return l&&function(e,t,n){let r=e_(e);y(r._canInitEmulator,r,"emulator-config-failed"),y(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=eP(t),{host:o,port:s}=function(e){let t=eP(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:eA(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:eA(t)}}}(t),a=null===s?"":`:${s}`;r.config.emulator={url:`${i}//${o}${a}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:s,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:!1})}),function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}(n,`http://${l}`),n}eC={loadJS:e=>new Promise((t,n)=>{var r,i;let o=document.createElement("script");o.setAttribute("src",e),o.onload=t,o.onerror=e=>{let t=p("internal-error");t.customData=e,n(t)},o.type="text/javascript",o.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(o)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},r="Browser",(0,i.Xd)(new l.wA("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=n.options;y(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});let l=new eb(n,i,o,{apiKey:s,authDomain:a,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:eg(r)});return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(en);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(l,t),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),(0,i.Xd)(new l.wA("auth-internal",e=>new ns(e_(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,i.KN)(ni,no,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(r)),(0,i.KN)(ni,no,"esm2017")},90109:function(e,t,n){"use strict";n.d(t,{ET:function(){return oT},hJ:function(){return iq},oe:function(){return ox},JU:function(){return iz},PL:function(){return oC},ad:function(){return iK},IO:function(){return oc},pl:function(){return oE},ar:function(){return oh}});var r,i,o,s,a,l,c,u,h,d,f,p,m,g,v=n(25816),y=n(8463),w=n(53333),b=n(74444),_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S={};(function(){function e(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function t(e,t,n){n||(n=0);var r=Array(16);if("string"==typeof t)for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];var o=e.g[3],s=t+(o^n&(i^o))+r[0]+3614090360&4294967295;s=o+(i^(t=n+(s<<7&4294967295|s>>>25))&(n^i))+r[1]+3905402710&4294967295,s=i+(n^(o=t+(s<<12&4294967295|s>>>20))&(t^n))+r[2]+606105819&4294967295,s=n+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+r[3]+3250441966&4294967295,s=t+(o^(n=i+(s<<22&4294967295|s>>>10))&(i^o))+r[4]+4118548399&4294967295,s=o+(i^(t=n+(s<<7&4294967295|s>>>25))&(n^i))+r[5]+1200080426&4294967295,s=i+(n^(o=t+(s<<12&4294967295|s>>>20))&(t^n))+r[6]+2821735955&4294967295,s=n+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+r[7]+4249261313&4294967295,s=t+(o^(n=i+(s<<22&4294967295|s>>>10))&(i^o))+r[8]+1770035416&4294967295,s=o+(i^(t=n+(s<<7&4294967295|s>>>25))&(n^i))+r[9]+2336552879&4294967295,s=i+(n^(o=t+(s<<12&4294967295|s>>>20))&(t^n))+r[10]+4294925233&4294967295,s=n+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+r[11]+2304563134&4294967295,s=t+(o^(n=i+(s<<22&4294967295|s>>>10))&(i^o))+r[12]+1804603682&4294967295,s=o+(i^(t=n+(s<<7&4294967295|s>>>25))&(n^i))+r[13]+4254626195&4294967295,s=i+(n^(o=t+(s<<12&4294967295|s>>>20))&(t^n))+r[14]+2792965006&4294967295,s=n+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+r[15]+1236535329&4294967295,n=i+(s<<22&4294967295|s>>>10),s=t+(i^o&(n^i))+r[1]+4129170786&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[6]+3225465664&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[11]+643717713&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[0]+3921069994&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(n^i))+r[5]+3593408605&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[10]+38016083&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[15]+3634488961&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[4]+3889429448&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(n^i))+r[9]+568446438&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[14]+3275163606&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[3]+4107603335&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[8]+1163531501&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(n^i))+r[13]+2850285829&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[2]+4243563512&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[7]+1735328473&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[12]+2368359562&4294967295,s=t+((n=i+(s<<20&4294967295|s>>>12))^i^o)+r[5]+4294588738&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^i)+r[8]+2272392833&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^n)+r[11]+1839030562&4294967295,s=n+((i=o+(s<<16&4294967295|s>>>16))^o^t)+r[14]+4259657740&4294967295,s=t+((n=i+(s<<23&4294967295|s>>>9))^i^o)+r[1]+2763975236&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^i)+r[4]+1272893353&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^n)+r[7]+4139469664&4294967295,s=n+((i=o+(s<<16&4294967295|s>>>16))^o^t)+r[10]+3200236656&4294967295,s=t+((n=i+(s<<23&4294967295|s>>>9))^i^o)+r[13]+681279174&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^i)+r[0]+3936430074&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^n)+r[3]+3572445317&4294967295,s=n+((i=o+(s<<16&4294967295|s>>>16))^o^t)+r[6]+76029189&4294967295,s=t+((n=i+(s<<23&4294967295|s>>>9))^i^o)+r[9]+3654602809&4294967295,s=o+((t=n+(s<<4&4294967295|s>>>28))^n^i)+r[12]+3873151461&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^n)+r[15]+530742520&4294967295,s=n+((i=o+(s<<16&4294967295|s>>>16))^o^t)+r[2]+3299628645&4294967295,n=i+(s<<23&4294967295|s>>>9),s=t+(i^(n|~o))+r[0]+4096336452&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[7]+1126891415&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[14]+2878612391&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[5]+4237533241&4294967295,n=i+(s<<21&4294967295|s>>>11),s=t+(i^(n|~o))+r[12]+1700485571&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[3]+2399980690&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[10]+4293915773&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[1]+2240044497&4294967295,n=i+(s<<21&4294967295|s>>>11),s=t+(i^(n|~o))+r[8]+1873313359&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[15]+4264355552&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[6]+2734768916&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[13]+1309151649&4294967295,n=i+(s<<21&4294967295|s>>>11),s=t+(i^(n|~o))+r[4]+4149444226&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[11]+3174756917&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[2]+718787259&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(s<<21&4294967295|s>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+o&4294967295}function n(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var o=0|e[i];r&&o==t||(n[i]=o,r=!1)}this.g=n}!function(e,t){function n(){}n.prototype=t.prototype,e.D=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.C=function(e,n,r){for(var i=Array(arguments.length-2),o=2;othis.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;tt;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};var o,s={};function a(e){var t;return -128<=e&&128>e?(t=function(e){return new n([0|e],0>e?-1:0)},Object.prototype.hasOwnProperty.call(s,e)?s[e]:s[e]=t(e)):new n([0|e],0>e?-1:0)}function l(e){if(isNaN(e)||!isFinite(e))return c;if(0>e)return p(l(-e));for(var t=[],r=1,i=0;e>=r;i++)t[i]=e/r|0,r*=4294967296;return new n(t,0)}var c=a(0),u=a(1),h=a(16777216);function d(e){if(0!=e.h)return!1;for(var t=0;t>>16,e[t]&=65535,t++}function v(e,t){this.g=e,this.h=t}function y(e,t){if(d(t))throw Error("division by zero");if(d(e))return new v(c,c);if(f(e))return t=y(p(e),t),new v(p(t.g),p(t.h));if(f(t))return t=y(e,p(t)),new v(p(t.g),t.h);if(30=r.l(e);)n=w(n),r=w(r);var i=b(n,1),o=b(r,1);for(r=b(r,2),n=b(n,2);!d(r);){var s=o.add(r);0>=s.l(e)&&(i=i.add(n),o=s),r=b(r,1),n=b(n,1)}return t=m(e,i.j(t)),new v(i,t)}for(i=c;0<=e.l(t);){for(r=48>=(r=Math.ceil(Math.log(n=Math.max(1,Math.floor(e.m()/t.m())))/Math.LN2))?1:Math.pow(2,r-48),s=(o=l(n)).j(t);f(s)||0>>31;return new n(r,e.h)}function b(e,t){var r=t>>5;t%=32;for(var i=e.g.length-r,o=[],s=0;s>>t|e.i(s+r+1)<<32-t:e.i(s+r);return new n(o,e.h)}(o=n.prototype).m=function(){if(f(this))return-p(this).m();for(var e=0,t=1,n=0;n(e=e||10)||36>>0).toString(e);if(d(n=i))return o+r;for(;6>o.length;)o="0"+o;r=o+r}},o.i=function(e){return 0>e?0:e>>16)+(this.i(o)>>>16)+(e.i(o)>>>16);i=a>>>16,s&=65535,a&=65535,r[o]=a<<16|s}return new n(r,-2147483648&r[r.length-1]?-1:0)},o.j=function(e){if(d(this)||d(e))return c;if(f(this))return f(e)?p(this).j(p(e)):p(p(this).j(e));if(f(e))return p(this.j(p(e)));if(0>this.l(h)&&0>e.l(h))return l(this.m()*e.m());for(var t=this.g.length+e.g.length,r=[],i=0;i<2*t;i++)r[i]=0;for(i=0;i>>16,a=65535&this.i(i),u=e.i(o)>>>16,m=65535&e.i(o);r[2*i+2*o]+=a*m,g(r,2*i+2*o),r[2*i+2*o+1]+=s*m,g(r,2*i+2*o+1),r[2*i+2*o+1]+=a*u,g(r,2*i+2*o+1),r[2*i+2*o+2]+=s*u,g(r,2*i+2*o+2)}for(i=0;i(n=n||10)||36s?(s=l(Math.pow(n,s)),i=i.j(s).add(l(a))):i=(i=i.j(r)).add(l(a))}return i},r=S.Integer=n}).apply(void 0!==_?_:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},E={};(function(){var e,t,n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},i=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof C&&C];for(var t=0;tnew D,e=>e.reset());class D{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let V,F=!1,B=new L,U=()=>{let e=p.Promise.resolve(void 0);V=()=>{e.then(H)}};var H=()=>{let e;for(var t;e=null,B.g&&(e=B.g,B.g=B.g.next,B.g||(B.h=null),e.next=null),t=e;){try{t.h.call(t.g)}catch(e){!function(e){p.setTimeout(()=>{throw e},0)}(e)}N.j(t),100>N.h&&(N.h++,t.next=N.g,N.g=t)}F=!1};function q(){this.s=this.s,this.C=this.C}function z(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}q.prototype.s=!1,q.prototype.ma=function(){this.s||(this.s=!0,this.N())},q.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},z.prototype.h=function(){this.defaultPrevented=!0};var $=function(){if(!p.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{let e=()=>{};p.addEventListener("test",e,t),p.removeEventListener("test",e,t)}catch(e){}return e}();function W(e,t){if(z.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(k){e:{try{A(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:K[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&W.aa.h.call(this)}}_(W,z);var K={2:"touch",3:"pen",4:"mouse"};W.prototype.h=function(){W.aa.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var G="closure_listenable_"+(1e6*Math.random()|0),Y=0;function Z(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=++Y,this.da=this.fa=!1}function X(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function J(e){this.src=e,this.g={},this.h=0}function Q(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],o=Array.prototype.indexOf.call(i,t,void 0);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(X(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ee(e,t,n,r){for(var i=0;i>>0);function ec(e){return"function"==typeof e?e:(e[el]||(e[el]=function(t){return e.handleEvent(t)}),e[el])}function eu(){q.call(this),this.i=new J(this),this.M=this,this.F=null}function eh(e,t){var n,r=e.F;if(r)for(n=[];r;r=r.F)n.push(r);if(e=e.M,r=t.type||t,"string"==typeof t)t=new z(t,e);else if(t instanceof z)t.target=t.target||e;else{var i=t;j(t=new z(r,e),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var s=t.g=n[o];i=ed(s,r,!0,t)&&i}if(i=ed(s=t.g=e,r,!0,t)&&i,i=ed(s,r,!1,t)&&i,n)for(o=0;o{t.g=null,t.i&&(t.i=!1,e(t))},t.l);let n=t.h;t.h=null,t.m.apply(null,n)}(this)}N(){super.N(),this.g&&(p.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function em(e){q.call(this),this.h=e,this.g={}}_(em,q);var eg=[];function ev(e){O(e.g,function(e,t){this.g.hasOwnProperty(t)&&ei(e)},e),e.g={}}em.prototype.N=function(){em.aa.N.call(this),ev(this)},em.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var ey=p.JSON.stringify,ew=p.JSON.parse,eb=class{stringify(e){return p.JSON.stringify(e,void 0)}parse(e){return p.JSON.parse(e,void 0)}};function e_(){}function eS(e){return e.h||(e.h=e.i())}function eC(){}e_.prototype.h=null;var eE={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function ex(){z.call(this,"d")}function eT(){z.call(this,"c")}_(ex,z),_(eT,z);var eI={},eP=null;function eA(){return eP=eP||new eu}function ek(e){z.call(this,eI.La,e)}function eO(e){let t=eA();eh(t,new ek(t))}function eR(e,t){z.call(this,eI.STAT_EVENT,e),this.stat=t}function eM(e){let t=eA();eh(t,new eR(t,e))}function ej(e,t){z.call(this,eI.Ma,e),this.size=t}function eL(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return p.setTimeout(function(){e()},t)}function eN(){this.g=!0}function eD(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;er.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var s=1;si[2]&&n.F&&0==n.v&&!n.C&&(n.C=eL(w(n.Za,n),6e3));if(1>=e4(n.h)&&n.ca){try{n.ca()}catch(e){}n.ca=void 0}}else t2(n,11)}else if((e.K||n.g==e)&&tQ(n),!I(t))for(i=n.Da.g.parse(t),t=0;th)&&(3!=h||this.g&&(this.h.h||this.g.oa()||tF(this.g)))){this.J||4!=h||7==t||(8==t||0>=d?eO(3):eO(2)),eZ(this);var n=this.g.Z();this.X=n;t:if(eK(this)){var r=tF(this.g);e="";var i=r.length,o=4==tV(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){eJ(this),eX(this);var s="";break t}this.h.i=new p.TextDecoder}for(t=0;tt.length?ez:(t=t.slice(r,r+n),e.C=r+n,t)}(this,s))==ez){4==h&&(this.s=4,eM(14),n=!1),eD(this.i,this.l,null,"[Incomplete Response]");break}else if(e==eq){this.s=4,eM(15),eD(this.i,this.l,s,"[Invalid Chunk]"),n=!1;break}else eD(this.i,this.l,e,null),eQ(this,e);if(eK(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=h||0!=s.length||this.h.h||(this.s=1,eM(16),n=!1),this.o=this.o&&n,n){if(0=e.j}function e4(e){return e.h?1:e.g?e.g.size:0}function e5(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function e9(e,t){e.g?e.g.add(t):e.h=t}function e3(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function e6(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){let t=e.i;for(let n of e.g.values())t=t.concat(n.D);return t}return S(e.i)}function e8(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(m(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.na&&"function"==typeof e.na)return e.na();if(!e.V||"function"!=typeof e.V){if("undefined"!=typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!=typeof Set&&e instanceof Set)){if(m(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;nt)throw Error("Bad port number "+t);e.s=t}else e.s=null}function ti(e,t,n){var r,i;t instanceof tm?(e.i=t,r=e.i,(i=e.h)&&!r.j&&(tg(r),r.i=null,r.g.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(tv(this,t),tw(this,n,e))},r)),r.j=i):(n||(t=tl(t,tf)),e.i=new tm(t,e.h))}function to(e,t,n){e.i.set(t,n)}function ts(e){return to(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function ta(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function tl(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,tc),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function tc(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}te.prototype.toString=function(){var e=[],t=this.j;t&&e.push(tl(t,tu,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(tl(t,tu,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.s)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(tl(n,"/"==n.charAt(0)?td:th,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.m)&&e.push("#",tl(n,tp)),e.join("")};var tu=/[#\/\?@]/g,th=/[#\?:]/g,td=/[#\?]/g,tf=/[#\?@]/g,tp=/#/g;function tm(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function tg(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{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,tT(this)),this.readyState=0},n.Sa=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,tI(this)),this.g&&(this.readyState=3,tI(this),this.g))){if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(void 0!==p.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;tx(this)}else e.text().then(this.Ra.bind(this),this.ga.bind(this))}},n.Pa=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array(0);(t=this.v.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?tT(this):tI(this),3==this.readyState&&tx(this)}},n.Ra=function(e){this.g&&(this.response=this.responseText=e,tT(this))},n.Qa=function(e){this.g&&(this.response=e,tT(this))},n.ga=function(){this.g&&tT(this)},n.setRequestHeader=function(e,t){this.u.append(e,t)},n.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},n.getAllResponseHeaders=function(){if(!this.h)return"";let e=[],t=this.h.entries();for(var n=t.next();!n.done;)e.push((n=n.value)[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(tE.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),_(tk,eu);var tO=/^https?$/i,tR=["POST","PUT"];function tM(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.m=5,tj(e),tN(e)}function tj(e){e.A||(e.A=!0,eh(e,"complete"),eh(e,"error"))}function tL(e){if(e.h&&void 0!==f&&(!e.v[1]||4!=tV(e)||2!=e.Z())){if(e.u&&4==tV(e))ef(e.Ea,0,e);else if(eh(e,"readystatechange"),4==tV(e)){e.h=!1;try{let s=e.Z();switch(s){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t,n,r=!0;break;default:r=!1}if(!(t=r)){if(n=0===s){var i=String(e.D).match(e7)[1]||null;!i&&p.self&&p.self.location&&(i=p.self.location.protocol.slice(0,-1)),n=!tO.test(i?i.toLowerCase():"")}t=n}if(t)eh(e,"complete"),eh(e,"success");else{e.m=6;try{var o=2{}:null;e.g=null,e.v=null,t||eh(e,"ready");try{n.onreadystatechange=r}catch(e){}}}function tD(e){e.I&&(p.clearTimeout(e.I),e.I=null)}function tV(e){return e.g?e.g.readyState:0}function tF(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.H){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function tB(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function tU(e){this.Aa=0,this.i=[],this.j=new eN,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=tB("failFast",!1,e),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=tB("baseRetryDelayMs",5e3,e),this.cb=tB("retryDelaySeedMs",1e4,e),this.Wa=tB("forwardChannelMaxRetries",2,e),this.wa=tB("forwardChannelRequestTimeoutMs",2e4,e),this.pa=e&&e.xmlHttpFactory||void 0,this.Xa=e&&e.Tb||void 0,this.Ca=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.h=new e1(e&&e.concurrentRequestLimit),this.Da=new tS,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=e&&e.Rb||!1,e&&e.xa&&this.j.xa(),e&&e.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&e&&e.detectBufferingProxy||!1,this.ja=void 0,e&&e.longPollingTimeout&&0(n-=t))t=Math.max(0,i[s].g-100),o=!1;else try{!function(e,t,n){let r=n||"";try{e8(e,function(e,n){let i=e;g(e)&&(i=ey(e)),t.push(r+n+"="+encodeURIComponent(i))})}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}(a,e,"req"+n+"_")}catch(e){r&&r(a)}}if(o){r=e.join("&");break e}}}return e=e.i.splice(0,n),t.D=e,r}function tY(e){if(!e.g&&!e.u){e.Y=1;var t=e.Fa;V||U(),F||(V(),F=!0),B.add(t,e),e.v=0}}function tZ(e){return!e.g&&!e.u&&!(3<=e.v)&&(e.Y++,e.u=eL(w(e.Fa,e),t1(e,e.v)),e.v++,!0)}function tX(e){null!=e.A&&(p.clearTimeout(e.A),e.A=null)}function tJ(e){e.g=new eU(e,e.j,"rpc",e.Y),null===e.m&&(e.g.H=e.o),e.g.O=0;var t=tt(e.qa);to(t,"RID","rpc"),to(t,"SID",e.K),to(t,"AID",e.T),to(t,"CI",e.F?"0":"1"),!e.F&&e.ja&&to(t,"TO",e.ja),to(t,"TYPE","xmlhttp"),tK(e,t),e.m&&e.o&&tA(t,e.m,e.o),e.L&&(e.g.I=e.L);var n=e.g;e=e.ia,n.L=1,n.v=ts(tt(t)),n.m=null,n.P=!0,eW(n,e)}function tQ(e){null!=e.C&&(p.clearTimeout(e.C),e.C=null)}function t0(e,t){var n=null;if(e.g==t){tQ(e),tX(e),e.g=null;var r=2}else{if(!e5(e.h,t))return;n=t.D,e3(e.h,t),r=1}if(0!=e.G){if(t.o){if(1==r){n=t.m?t.m.length:0,t=Date.now()-t.F;var i,o=e.B;eh(r=eA(),new ej(r,n)),t$(e)}else tY(e)}else if(3==(o=t.s)||0==o&&0=e.h.j-(e.s?1:0))&&(e.s?(e.i=i.D.concat(e.i),!0):1!=e.G&&2!=e.G&&!(e.B>=(e.Va?0:e.Wa))&&(e.s=eL(w(e.Ga,e,i),t1(e,e.B)),e.B++,!0)))||2==r&&tZ(e)))switch(n&&0{r.abort(),t_(n,"TestPingServer: timeout",!1,t)},1e4);fetch(e,{signal:r.signal}).then(e=>{clearTimeout(i),e.ok?t_(n,"TestPingServer: ok",!0,t):t_(n,"TestPingServer: server error",!1,t)}).catch(()=>{clearTimeout(i),t_(n,"TestPingServer: error",!1,t)})}(r.toString(),n)}else eM(2);e.G=0,e.l&&e.l.sa(t),t4(e),tz(e)}function t4(e){if(e.G=0,e.ka=[],e.l){let t=e6(e.h);(0!=t.length||0!=e.i.length)&&(x(e.ka,t),x(e.ka,e.i),e.h.i.length=0,S(e.i),e.i.length=0),e.l.ra()}}function t5(e,t,n){var r=n instanceof te?tt(n):new te(n);if(""!=r.g)t&&(r.g=t+"."+r.g),tr(r,r.s);else{var i=p.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var o=new te(null);r&&tn(o,r),t&&(o.g=t),i&&tr(o,i),n&&(o.l=n),r=o}return n=e.D,t=e.ya,n&&t&&to(r,n,t),to(r,"VER",e.la),tK(e,r),r}function t9(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new tk(e.Ca&&!e.pa?new tC({eb:n}):e.pa)).Ha(e.J),t}function t3(){}function t6(){}function t8(e,t){eu.call(this),this.g=new tU(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.o=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.va&&(e?e["X-WebChannel-Client-Profile"]=t.va:e={"X-WebChannel-Client-Profile":t.va}),this.g.S=e,(e=t&&t.Sb)&&!I(e)&&(this.g.m=e),this.v=t&&t.supportsCrossDomainXhr||!1,this.u=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!I(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&t in(e=this.h)&&delete e[t]),this.j=new nt(this)}function t7(e){ex.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(let 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 ne(){eT.call(this),this.status=1}function nt(e){this.g=e}(n=tk.prototype).Ha=function(e){this.J=e},n.ea=function(e,n,r,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+e);n=n?n.toUpperCase():"GET",this.D=e,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():t.g(),this.v=this.o?eS(this.o):eS(t),this.g.onreadystatechange=w(this.Ea,this);try{this.B=!0,this.g.open(n,String(e),!0),this.B=!1}catch(e){tM(this,e);return}if(e=r||"",r=new Map(this.headers),i){if(Object.getPrototypeOf(i)===Object.prototype)for(var o in i)r.set(o,i[o]);else if("function"==typeof i.keys&&"function"==typeof i.get)for(let e of i.keys())r.set(e,i.get(e));else throw Error("Unknown input type for opt_headers: "+String(i))}for(let[t,s]of(i=Array.from(r.keys()).find(e=>"content-type"==e.toLowerCase()),o=p.FormData&&e instanceof p.FormData,!(0<=Array.prototype.indexOf.call(tR,n,void 0))||i||o||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),r))this.g.setRequestHeader(t,s);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{tD(this),this.u=!0,this.g.send(e),this.u=!1}catch(e){tM(this,e)}},n.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=e||7,eh(this,"complete"),eh(this,"abort"),tN(this))},n.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),tN(this,!0)),tk.aa.N.call(this)},n.Ea=function(){this.s||(this.B||this.u||this.j?tL(this):this.bb())},n.bb=function(){tL(this)},n.isActive=function(){return!!this.g},n.Z=function(){try{return 2=this.R)){var e=2*this.R;this.j.info("BP detection timer enabled: "+e),this.A=eL(w(this.ab,this),e)}},n.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,eM(10),tq(this),tJ(this))},n.Za=function(){null!=this.C&&(this.C=null,tq(this),tZ(this),eM(19))},n.fb=function(e){e?(this.j.info("Successfully pinged google.com"),eM(2)):(this.j.info("Failed to ping google.com"),eM(1))},n.isActive=function(){return!!this.l&&this.l.isActive(this)},(n=t3.prototype).ua=function(){},n.ta=function(){},n.sa=function(){},n.ra=function(){},n.isActive=function(){return!0},n.Na=function(){},t6.prototype.g=function(e,t){return new t8(e,t)},_(t8,eu),t8.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},t8.prototype.close=function(){tH(this.g)},t8.prototype.o=function(e){var t=this.g;if("string"==typeof e){var n={};n.__data__=e,e=n}else this.u&&((n={}).__data__=ey(e),e=n);t.i.push(new e0(t.Ya++,e)),3==t.G&&t$(t)},t8.prototype.N=function(){this.g.l=null,delete this.j,tH(this.g),delete this.g,t8.aa.N.call(this)},_(t7,ex),_(ne,eT),_(nt,t3),nt.prototype.ua=function(){eh(this.g,"a")},nt.prototype.ta=function(e){eh(this.g,new t7(e))},nt.prototype.sa=function(e){eh(this.g,new ne)},nt.prototype.ra=function(){eh(this.g,"b")},t6.prototype.createWebChannel=t6.prototype.g,t8.prototype.send=t8.prototype.o,t8.prototype.open=t8.prototype.m,t8.prototype.close=t8.prototype.close,d=E.createWebChannelTransport=function(){return new t6},h=E.getStatEventTarget=function(){return eA()},u=E.Event=eI,c=E.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},eV.NO_ERROR=0,eV.TIMEOUT=8,eV.HTTP_ERROR=6,l=E.ErrorCode=eV,eF.COMPLETE="complete",a=E.EventType=eF,eC.EventType=eE,eE.OPEN="a",eE.CLOSE="b",eE.ERROR="c",eE.MESSAGE="d",eu.prototype.listen=eu.prototype.K,s=E.WebChannel=eC,E.FetchXmlHttpFactory=tC,tk.prototype.listenOnce=tk.prototype.L,tk.prototype.getLastError=tk.prototype.Ka,tk.prototype.getLastErrorCode=tk.prototype.Ba,tk.prototype.getStatus=tk.prototype.Z,tk.prototype.getResponseJson=tk.prototype.Oa,tk.prototype.getResponseText=tk.prototype.oa,tk.prototype.send=tk.prototype.ea,tk.prototype.setWithCredentials=tk.prototype.Ha,o=E.XhrIo=tk}).apply(void 0!==C?C:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),n(83454);var x=n(21876).Buffer;let T="@firebase/firestore";class I{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}I.UNAUTHENTICATED=new I(null),I.GOOGLE_CREDENTIALS=new I("google-credentials-uid"),I.FIRST_PARTY=new I("first-party-uid"),I.MOCK_USER=new I("mock-user");let P="10.14.0",A=new w.Yd("@firebase/firestore");function k(){return A.logLevel}function O(e,...t){if(A.logLevel<=w.in.DEBUG){let n=t.map(j);A.debug(`Firestore (${P}): ${e}`,...n)}}function R(e,...t){if(A.logLevel<=w.in.ERROR){let n=t.map(j);A.error(`Firestore (${P}): ${e}`,...n)}}function M(e,...t){if(A.logLevel<=w.in.WARN){let n=t.map(j);A.warn(`Firestore (${P}): ${e}`,...n)}}function j(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return e}}function L(e="Unexpected state"){let t=`FIRESTORE (${P}) INTERNAL ASSERTION FAILED: `+e;throw R(t),Error(t)}let N={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class D extends b.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class V{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class F{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class B{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(I.UNAUTHENTICATED))}shutdown(){}}class U{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class H{constructor(e){this.t=e,this.currentUser=I.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){void 0===this.o||L();let n=this.i,r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve(),i=new V;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new V,e.enqueueRetryable(()=>r(this.currentUser))};let o=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await r(this.currentUser)})},s=e=>{O("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(e=>s(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?s(e):(O("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new V)}},0),o()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(O("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||L(),new F(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||L(),new I(e)}}class q{constructor(e,t,n){this.l=e,this.h=t,this.P=n,this.type="FirstParty",this.user=I.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class z{constructor(e,t,n){this.l=e,this.h=t,this.P=n}getToken(){return Promise.resolve(new q(this.l,this.h,this.P))}start(e,t){e.enqueueRetryable(()=>t(I.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class ${constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class W{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,t){void 0===this.o||L();let n=e=>{null!=e.error&&O("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let n=e.token!==this.R;return this.R=e.token,O("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>n(t))};let r=e=>{O("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(e=>r(e)),setTimeout(()=>{if(!this.appCheck){let e=this.A.getImmediate({optional:!0});e?r(e):O("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?("string"==typeof e.token||L(),this.R=e.token,new $(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}class K{static newId(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";for(;n.length<20;){let r=function(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(40);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let e=0;e<40;e++)n[e]=Math.floor(256*Math.random());return n}(0);for(let i=0;it?1:0}function Y(e,t,n){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}class Z{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new D(N.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new D(N.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Z.fromMillis(Date.now())}static fromDate(e){return Z.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new Z(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?G(this.nanoseconds,e.nanoseconds):G(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class X{constructor(e){this.timestamp=e}static fromTimestamp(e){return new X(e)}static min(){return new X(new Z(0,0))}static max(){return new X(new Z(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class J{constructor(e,t,n){void 0===t?t=0:t>e.length&&L(),void 0===n?n=e.length-t:n>e.length-t&&L(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===J.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof J?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.lengthi)return 1}return e.lengtht.length?1:0}}class Q extends J{construct(e,t,n){return new Q(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){let t=[];for(let n of e){if(n.indexOf("//")>=0)throw new D(N.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(e=>e.length>0))}return new Q(t)}static emptyPath(){return new Q([])}}let ee=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class et extends J{construct(e,t,n){return new et(e,t,n)}static isValidIdentifier(e){return ee.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),et.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new et(["__name__"])}static fromServerFormat(e){let t=[],n="",r=0,i=()=>{if(0===n.length)throw new D(N.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""},o=!1;for(;r=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===Q.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return Q.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new en(new Q(e.slice()))}}class er{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}er.UNKNOWN_ID=-1;class ei{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new ei(X.min(),en.empty(),-1)}static max(){return new ei(X.max(),en.empty(),-1)}}class eo{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}async function es(e){if(e.code!==N.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;O("LocalStore","Unexpectedly lost primary lease")}class ea{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&L(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new ea((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof ea?t:ea.resolve(t)}catch(e){return ea.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):ea.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):ea.reject(t)}static resolve(e){return new ea((t,n)=>{t(e)})}static reject(e){return new ea((t,n)=>{n(e)})}static waitFor(e){return new ea((t,n)=>{let r=0,i=0,o=!1;e.forEach(e=>{++r,e.next(()=>{++i,o&&i===r&&t()},e=>n(e))}),o=!0,i===r&&t()})}static or(e){let t=ea.resolve(!1);for(let n of e)t=t.next(e=>e?ea.resolve(e):n());return t}static forEach(e,t){let n=[];return e.forEach((e,r)=>{n.push(t.call(this,e,r))}),this.waitFor(n)}static mapArray(e,t){return new ea((n,r)=>{let i=e.length,o=Array(i),s=0;for(let a=0;a{o[l]=e,++s===i&&n(o)},e=>r(e))}})}static doWhile(e,t){return new ea((n,r)=>{let i=()=>{!0===e()?t().next(()=>{i()},r):n()};i()})}}function el(e){return"IndexedDbTransactionError"===e.name}class ec{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ie(e),this.se=e=>t.writeSequenceNumber(e))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.se&&this.se(e),e}}function eu(e){return 0===e&&1/e==-1/0}function eh(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function ed(e,t){for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function ef(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}ec.oe=-1;class ep{constructor(e,t){this.comparator=e,this.root=t||eg.EMPTY}insert(e,t){return new ep(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,eg.BLACK,null,null))}remove(e){return new ep(this.comparator,this.root.remove(e,this.comparator).copy(null,null,eg.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){let r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,n)=>(e(t,n),!1))}toString(){let e=[];return this.inorderTraversal((t,n)=>(e.push(`${t}:${n}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new em(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new em(this.root,e,this.comparator,!1)}getReverseIterator(){return new em(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new em(this.root,e,this.comparator,!0)}}class em{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class eg{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:eg.RED,this.left=null!=r?r:eg.EMPTY,this.right=null!=i?i:eg.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new eg(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this,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()}removeMin(){if(this.left.isEmpty())return eg.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let n,r=this;if(0>t(e,r.key))r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return eg.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,eg.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,eg.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){return Math.pow(2,this.check())<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw L();let e=this.left.check();if(e!==this.right.check())throw L();return e+(this.isRed()?0:1)}}eg.EMPTY=null,eg.RED=!0,eg.BLACK=!1,eg.EMPTY=new class{constructor(){this.size=0}get key(){throw L()}get value(){throw L()}get color(){throw L()}get left(){throw L()}get right(){throw L()}copy(e,t,n,r,i){return this}insert(e,t,n){return new eg(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class ev{constructor(e){this.comparator=e,this.data=new ep(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,n)=>(e(t),!1))}forEachInRange(e,t){let n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new ey(this.data.getIterator())}getIteratorFrom(e){return new ey(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size{t=t.add(e)}),t}isEqual(e){if(!(e instanceof ev)||this.size!==e.size)return!1;let t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new ev(this.comparator);return t.data=e,t}}class ey{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class ew{constructor(e){this.fields=e,e.sort(et.comparator)}static empty(){return new ew([])}unionWith(e){let t=new ev(et.comparator);for(let e of this.fields)t=t.add(e);for(let n of e)t=t.add(n);return new ew(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Y(this.fields,e.fields,(e,t)=>e.isEqual(t))}}class eb extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class e_{constructor(e){this.binaryString=e}static fromBase64String(e){return new e_(function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new eb("Invalid base64 string: "+e):e}}(e))}static fromUint8Array(e){return new e_(function(e){let t="";for(let n=0;neeM(e,t))}function eL(e,t){if(e===t)return 0;let n=eR(e),r=eR(t);if(n!==r)return G(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return G(e.booleanValue,t.booleanValue);case 2:return function(e,t){let n=eE(e.integerValue||e.doubleValue),r=eE(t.integerValue||t.doubleValue);return nr?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return eN(e.timestampValue,t.timestampValue);case 4:return eN(eP(e),eP(t));case 5:return G(e.stringValue,t.stringValue);case 6:return function(e,t){let n=ex(e),r=ex(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let n=e.split("/"),r=t.split("/");for(let e=0;et.mapValue.fields[e]=eW(n)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=eW(e.arrayValue.values[n]);return t}return Object.assign({},e)}function eK(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class eG{constructor(e){this.value=e}static empty(){return new eG({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=eW(e):r.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){let t=this.field(e.popLast());ez(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return eM(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;ne[t]=n),n))delete e[r]}clone(){return new eG(eW(this.value))}}class eY{constructor(e,t,n,r,i,o,s){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=o,this.documentState=s}static newInvalidDocument(e){return new eY(e,0,X.min(),X.min(),X.min(),eG.empty(),0)}static newFoundDocument(e,t,n,r){return new eY(e,1,t,X.min(),n,r,0)}static newNoDocument(e,t){return new eY(e,2,t,X.min(),X.min(),eG.empty(),0)}static newUnknownDocument(e,t){return new eY(e,3,t,X.min(),X.min(),eG.empty(),2)}convertToFoundDocument(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}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=eG.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=eG.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=X.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof eY&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new eY(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class eZ{constructor(e,t){this.position=e,this.inclusive=t}}function eX(e,t,n){let r=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return L()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class e2 extends e0{constructor(e,t){super(),this.filters=e,this.op=t,this.ae=null}static create(e,t){return new e2(e,t)}matches(e){return e4(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.ae||(this.ae=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function e4(e){return"and"===e.op}function e5(e){for(let t of e.filters)if(t instanceof e2)return!1;return!0}class e9 extends e1{constructor(e,t,n){super(e,t,n),this.key=en.fromName(n.referenceValue)}matches(e){let t=en.comparator(e.key,this.key);return this.matchesComparison(t)}}class e3 extends e1{constructor(e,t){super(e,"in",t),this.keys=e8("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class e6 extends e1{constructor(e,t){super(e,"not-in",t),this.keys=e8("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function e8(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map(e=>en.fromName(e.referenceValue))}class e7 extends e1{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return eU(t)&&ej(t.arrayValue,this.value)}}class te extends e1{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&ej(this.value.arrayValue,t)}}class tt extends e1{constructor(e,t){super(e,"not-in",t)}matches(e){if(ej(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!ej(this.value.arrayValue,t)}}class tn extends e1{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!eU(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>ej(this.value.arrayValue,e))}}class tr{constructor(e,t=null,n=[],r=[],i=null,o=null,s=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=s,this.ue=null}}function ti(e,t=null,n=[],r=[],i=null,o=null,s=null){return new tr(e,t,n,r,i,o,s)}function to(e){if(null===e.ue){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:"+e.filters.map(e=>(function e(t){if(t instanceof e1)return t.field.canonicalString()+t.op.toString()+eV(t.value);if(e5(t)&&e4(t))return t.filters.map(t=>e(t)).join(",");{let n=t.filters.map(t=>e(t)).join(",");return`${t.op}(${n})`}})(e)).join(",")+"|ob:"+e.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==e.limit||(t+="|l:"+e.limit),e.startAt&&(t+="|lb:"+(e.startAt.inclusive?"b:":"a:")+e.startAt.position.map(e=>eV(e)).join(",")),e.endAt&&(t+="|ub:"+(e.endAt.inclusive?"a:":"b:")+e.endAt.position.map(e=>eV(e)).join(",")),e.ue=t}return e.ue}function ts(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;it&&e(r,n.filters[i]),!0):void L()}(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!eJ(e.startAt,t.startAt)&&eJ(e.endAt,t.endAt)}function ta(e){return en.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class tl{constructor(e,t=null,n=[],r=[],i=null,o="F",s=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=s,this.endAt=a,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function tc(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 tu(e){return null!==e.collectionGroup}function th(e){if(null===e.ce){let t;e.ce=[];let n=new Set;for(let t of e.explicitOrderBy)e.ce.push(t),n.add(t.field.canonicalString());let r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(t=new ev(et.comparator),e.filters.forEach(e=>{e.getFlattenedFilters().forEach(e=>{e.isInequality()&&(t=t.add(e.field))})}),t).forEach(t=>{n.has(t.canonicalString())||t.isKeyField()||e.ce.push(new eQ(t,r))}),n.has(et.keyField().canonicalString())||e.ce.push(new eQ(et.keyField(),r))}return e.ce}function td(e){return e.le||(e.le=function(e,t){if("F"===e.limitType)return ti(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map(e=>{let t="desc"===e.dir?"asc":"desc";return new eQ(e.field,t)});let n=e.endAt?new eZ(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new eZ(e.startAt.position,e.startAt.inclusive):null;return ti(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}(e,th(e))),e.le}function tf(e,t){let n=e.filters.concat([t]);return new tl(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function tp(e,t,n){return new tl(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function tm(e,t){return ts(td(e),td(t))&&e.limitType===t.limitType}function tg(e){return`${to(td(e))}|lt:${e.limitType}`}function tv(e){var t;let n;return`Query(target=${n=(t=td(e)).path.canonicalString(),null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof e1?`${t.field.canonicalString()} ${t.op} ${eV(t.value)}`:t instanceof e2?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(n+=", startAt: "+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>eV(e)).join(",")),t.endAt&&(n+=", endAt: "+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>eV(e)).join(",")),`Target(${n})`}; limitType=${e.limitType})`}function ty(e,t){return t.isFoundDocument()&&function(e,t){let n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):en.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(let n of th(e))if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(let n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,n){let r=eX(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,th(e),t))&&(!e.endAt||!!function(e,t,n){let r=eX(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,th(e),t))}function tw(e){return(t,n)=>{let r=!1;for(let i of th(e)){let e=function(e,t,n){let r=e.field.isKeyField()?en.comparator(t.key,n.key):function(e,t,n){let r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?eL(r,i):L()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return -1*r;default:return L()}}(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}class tb{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){for(let[t,r]of n)if(this.equalsFn(t,e))return r}}has(e){return void 0!==this.get(e)}set(e,t){let n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let n=0;n{for(let[t,r]of n)e(t,r)})}isEmpty(){return ef(this.inner)}size(){return this.innerSize}}let t_=new ep(en.comparator),tS=new ep(en.comparator);function tC(...e){let t=tS;for(let n of e)t=t.insert(n.key,n);return t}function tE(e){let t=tS;return e.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t}function tx(){return new tb(e=>e.toString(),(e,t)=>e.isEqual(t))}let tT=new ep(en.comparator),tI=new ev(en.comparator);function tP(...e){let t=tI;for(let n of e)t=t.add(n);return t}let tA=new ev(G);function tk(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:eu(t)?"-0":t}}function tO(e){return{integerValue:""+e}}class tR{constructor(){this._=void 0}}function tM(e,t){return e instanceof tF?eB(t)||t&&"doubleValue"in t?t:{integerValue:0}:null}class tj extends tR{}class tL extends tR{constructor(e){super(),this.elements=e}}function tN(e,t){let n=tU(t);for(let t of e.elements)n.some(e=>eM(e,t))||n.push(t);return{arrayValue:{values:n}}}class tD extends tR{constructor(e){super(),this.elements=e}}function tV(e,t){let n=tU(t);for(let t of e.elements)n=n.filter(e=>!eM(e,t));return{arrayValue:{values:n}}}class tF extends tR{constructor(e,t){super(),this.serializer=e,this.Pe=t}}function tB(e){return eE(e.integerValue||e.doubleValue)}function tU(e){return eU(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class tH{constructor(e,t){this.version=e,this.transformResults=t}}class tq{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new tq}static exists(e){return new tq(void 0,e)}static updateTime(e){return new tq(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function tz(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class t${}function tW(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new t0(e.key,tq.none()):new tY(e.key,e.data,tq.none());{let n=e.data,r=eG.empty(),i=new ev(et.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new tZ(e.key,r,new ew(i.toArray()),tq.none())}}function tK(e,t,n,r){return e instanceof tY?function(e,t,n,r){if(!tz(e.precondition,t))return n;let i=e.value.clone(),o=tQ(e.fieldTransforms,r,t);return i.setAll(o),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof tZ?function(e,t,n,r){if(!tz(e.precondition,t))return n;let i=tQ(e.fieldTransforms,r,t),o=t.data;return(o.setAll(tX(e)),o.setAll(i),t.convertToFoundDocument(t.version,o).setHasLocalMutations(),null===n)?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,n,r):tz(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}function tG(e,t){var n,r;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(n=e.fieldTransforms,r=t.fieldTransforms,!!(void 0===n&&void 0===r||!(!n||!r)&&Y(n,r,(e,t)=>{var n,r;return e.field.isEqual(t.field)&&(n=e.transform,r=t.transform,n instanceof tL&&r instanceof tL||n instanceof tD&&r instanceof tD?Y(n.elements,r.elements,eM):n instanceof tF&&r instanceof tF?eM(n.Pe,r.Pe):n instanceof tj&&r instanceof tj)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class tY extends t${constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class tZ extends t${constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function tX(e){let t=new Map;return e.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){let r=e.data.field(n);t.set(n,r)}}),t}function tJ(e,t,n){var r;let i=new Map;e.length===n.length||L();for(let o=0;o{let i=e.get(r.key),o=i.overlayedDocument,s=this.applyToLocalView(o,i.mutatedFields),a=tW(o,s=t.has(r.key)?null:s);null!==a&&n.set(r.key,a),o.isValidDocument()||o.convertToNoDocument(X.min())}),n}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),tP())}isEqual(e){return this.batchId===e.batchId&&Y(this.mutations,e.mutations,(e,t)=>tG(e,t))&&Y(this.baseMutations,e.baseMutations,(e,t)=>tG(e,t))}}class t4{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){e.mutations.length===n.length||L();let r=tT,i=e.mutations;for(let e=0;e=8)throw new nt(`Invalid padding: ${t}`);if(n<0||e.length>0&&0===this.hashCount)throw new nt(`Invalid hash count: ${n}`);if(0===e.length&&0!==t)throw new nt(`Invalid padding when bitmap length is 0: ${t}`);this.Ie=8*e.length-t,this.Te=r.fromNumber(this.Ie)}Ee(e,t,n){let i=e.add(t.multiply(r.fromNumber(n)));return 1===i.compare(t6)&&(i=new r([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Te).toNumber()}de(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<r.insert(e)),r}insert(e){if(0===this.Ie)return;let[t,n]=t7(t8(e));for(let e=0;e0&&(this.we=!0,this.pe=e)}ve(){let e=tP(),t=tP(),n=tP();return this.ge.forEach((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:L()}}),new nr(this.pe,this.ye,e,t,n)}Ce(){this.we=!1,this.ge=nu()}Fe(e,t){this.we=!0,this.ge=this.ge.insert(e,t)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,this.fe>=0||L()}Ne(){this.we=!0,this.ye=!0}}class nl{constructor(e){this.Le=e,this.Be=new Map,this.ke=t_,this.qe=nc(),this.Qe=new ep(G)}Ke(e){for(let t of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(t,e.Ve):this.Ue(t,e.key,e.Ve);for(let t of e.removedTargetIds)this.Ue(t,e.key,e.Ve)}We(e){this.forEachTarget(e,t=>{let n=this.Ge(t);switch(e.state){case 0:this.ze(t)&&n.De(e.resumeToken);break;case 1:n.Oe(),n.Se||n.Ce(),n.De(e.resumeToken);break;case 2:n.Oe(),n.Se||this.removeTarget(t);break;case 3:this.ze(t)&&(n.Ne(),n.De(e.resumeToken));break;case 4:this.ze(t)&&(this.je(t),n.De(e.resumeToken));break;default:L()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Be.forEach((e,n)=>{this.ze(n)&&t(n)})}He(e){let t=e.targetId,n=e.me.count,r=this.Je(t);if(r){let i=r.target;if(ta(i)){if(0===n){let e=new en(i.path);this.Ue(t,e,eY.newNoDocument(e,X.min()))}else 1===n||L()}else{let r=this.Ye(t);if(r!==n){let n=this.Ze(e),i=n?this.Xe(n,e,r):1;0!==i&&(this.je(t),this.Qe=this.Qe.insert(t,2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Ze(e){let t,n;let r=e.me.unchangedNames;if(!r||!r.bits)return null;let{bits:{bitmap:i="",padding:o=0},hashCount:s=0}=r;try{t=ex(i).toUint8Array()}catch(e){if(e instanceof eb)return M("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{n=new ne(t,o,s)}catch(e){return M(e instanceof nt?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===n.Ie?null:n}Xe(e,t,n){return t.me.count===n-this.nt(e,t.targetId)?0:2}nt(e,t){let n=this.Le.getRemoteKeysForTarget(t),r=0;return n.forEach(n=>{let i=this.Le.tt(),o=`projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;e.mightContain(o)||(this.Ue(t,n,null),r++)}),r}rt(e){let t=new Map;this.Be.forEach((n,r)=>{let i=this.Je(r);if(i){if(n.current&&ta(i.target)){let t=new en(i.target.path);null!==this.ke.get(t)||this.it(r,t)||this.Ue(r,t,eY.newNoDocument(t,e))}n.be&&(t.set(r,n.ve()),n.Ce())}});let n=tP();this.qe.forEach((e,t)=>{let r=!0;t.forEachWhile(e=>{let t=this.Je(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(r=!1,!1)}),r&&(n=n.add(e))}),this.ke.forEach((t,n)=>n.setReadTime(e));let r=new nn(e,t,this.Qe,this.ke,n);return this.ke=t_,this.qe=nc(),this.Qe=new ep(G),r}$e(e,t){if(!this.ze(e))return;let n=this.it(e,t.key)?2:0;this.Ge(e).Fe(t.key,n),this.ke=this.ke.insert(t.key,t),this.qe=this.qe.insert(t.key,this.st(t.key).add(e))}Ue(e,t,n){if(!this.ze(e))return;let r=this.Ge(e);this.it(e,t)?r.Fe(t,1):r.Me(t),this.qe=this.qe.insert(t,this.st(t).delete(e)),n&&(this.ke=this.ke.insert(t,n))}removeTarget(e){this.Be.delete(e)}Ye(e){let t=this.Ge(e).ve();return this.Le.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let t=this.Be.get(e);return t||(t=new na,this.Be.set(e,t)),t}st(e){let t=this.qe.get(e);return t||(t=new ev(G),this.qe=this.qe.insert(e,t)),t}ze(e){let t=null!==this.Je(e);return t||O("WatchChangeAggregator","Detected inactive target",e),t}Je(e){let t=this.Be.get(e);return t&&t.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new na),this.Le.getRemoteKeysForTarget(e).forEach(t=>{this.Ue(e,t,null)})}it(e,t){return this.Le.getRemoteKeysForTarget(e).has(t)}}function nc(){return new ep(en.comparator)}function nu(){return new ep(en.comparator)}let nh={asc:"ASCENDING",desc:"DESCENDING"},nd={"<":"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"},nf={and:"AND",or:"OR"};class np{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function nm(e,t){return e.useProto3Json||null==t?t:{value:t}}function ng(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function nv(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function ny(e){return e||L(),X.fromTimestamp(function(e){let t=eC(e);return new Z(t.seconds,t.nanos)}(e))}function nw(e,t){return nb(e,t).canonicalString()}function nb(e,t){let n=new Q(["projects",e.projectId,"databases",e.database]).child("documents");return void 0===t?n:n.child(t)}function n_(e){let t=Q.fromString(e);return nk(t)||L(),t}function nS(e,t){return nw(e.databaseId,t.path)}function nC(e,t){let n=n_(t);if(n.get(1)!==e.databaseId.projectId)throw new D(N.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 D(N.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new en(nT(n))}function nE(e,t){return nw(e.databaseId,t)}function nx(e){return new Q(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function nT(e){return e.length>4&&"documents"===e.get(4)||L(),e.popFirst(5)}function nI(e,t,n){return{name:nS(e,t),fields:n.value.mapValue.fields}}function nP(e){return{fieldPath:e.canonicalString()}}function nA(e){return et.fromServerFormat(e.fieldPath)}function nk(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class nO{constructor(e,t,n,r,i=X.min(),o=X.min(),s=e_.EMPTY_BYTE_STRING,a=null){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=s,this.expectedCount=a}withSequenceNumber(e){return new nO(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new nO(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new nO(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new nO(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class nR{constructor(e){this.ct=e}}class nM{constructor(){}It(e,t){this.Tt(e,t),t.Et()}Tt(e,t){if("nullValue"in e)this.dt(t,5);else if("booleanValue"in e)this.dt(t,10),t.At(e.booleanValue?1:0);else if("integerValue"in e)this.dt(t,15),t.At(eE(e.integerValue));else if("doubleValue"in e){let n=eE(e.doubleValue);isNaN(n)?this.dt(t,13):(this.dt(t,15),eu(n)?t.At(0):t.At(n))}else if("timestampValue"in e){let n=e.timestampValue;this.dt(t,20),"string"==typeof n&&(n=eC(n)),t.Rt(`${n.seconds||""}`),t.At(n.nanos||0)}else if("stringValue"in e)this.Vt(e.stringValue,t),this.ft(t);else if("bytesValue"in e)this.dt(t,30),t.gt(ex(e.bytesValue)),this.ft(t);else if("referenceValue"in e)this.yt(e.referenceValue,t);else if("geoPointValue"in e){let n=e.geoPointValue;this.dt(t,45),t.At(n.latitude||0),t.At(n.longitude||0)}else"mapValue"in e?eK(e)?this.dt(t,Number.MAX_SAFE_INTEGER):e$(e)?this.wt(e.mapValue,t):(this.St(e.mapValue,t),this.ft(t)):"arrayValue"in e?(this.bt(e.arrayValue,t),this.ft(t)):L()}Vt(e,t){this.dt(t,25),this.Dt(e,t)}Dt(e,t){t.Rt(e)}St(e,t){let n=e.fields||{};for(let e of(this.dt(t,55),Object.keys(n)))this.Vt(e,t),this.Tt(n[e],t)}wt(e,t){var n,r;let i=e.fields||{};this.dt(t,53);let o="value",s=(null===(r=null===(n=i[o].arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.length)||0;this.dt(t,15),t.At(eE(s)),this.Vt(o,t),this.Tt(i[o],t)}bt(e,t){let n=e.values||[];for(let e of(this.dt(t,50),n))this.Tt(e,t)}yt(e,t){this.dt(t,37),en.fromName(e).path.forEach(e=>{this.dt(t,60),this.Dt(e,t)})}dt(e,t){e.At(t)}ft(e){e.At(2)}}nM.vt=new nM;class nj{constructor(){this.un=new nL}addToCollectionParentIndex(e,t){return this.un.add(t),ea.resolve()}getCollectionParents(e,t){return ea.resolve(this.un.getEntries(t))}addFieldIndex(e,t){return ea.resolve()}deleteFieldIndex(e,t){return ea.resolve()}deleteAllFieldIndexes(e){return ea.resolve()}createTargetIndexes(e,t){return ea.resolve()}getDocumentsMatchingTarget(e,t){return ea.resolve(null)}getIndexType(e,t){return ea.resolve(0)}getFieldIndexes(e,t){return ea.resolve([])}getNextCollectionGroupToUpdate(e){return ea.resolve(null)}getMinOffset(e,t){return ea.resolve(ei.min())}getMinOffsetFromCollectionGroup(e,t){return ea.resolve(ei.min())}updateCollectionGroup(e,t,n){return ea.resolve()}updateIndexEntries(e,t){return ea.resolve()}}class nL{constructor(){this.index={}}add(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new ev(Q.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new ev(Q.comparator)).toArray()}}new Uint8Array(0);class nN{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new nN(e,nN.DEFAULT_COLLECTION_PERCENTILE,nN.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}nN.DEFAULT_COLLECTION_PERCENTILE=10,nN.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,nN.DEFAULT=new nN(41943040,nN.DEFAULT_COLLECTION_PERCENTILE,nN.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),nN.DISABLED=new nN(-1,0,0);class nD{constructor(e){this.Ln=e}next(){return this.Ln+=2,this.Ln}static Bn(){return new nD(0)}static kn(){return new nD(-1)}}class nV{constructor(){this.changes=new tb(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,eY.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let n=this.changes.get(t);return void 0!==n?ea.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class nF{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class nB{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next(r=>(n=r,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==n&&tK(n.mutation,e,ew.empty(),Z.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,tP()).next(()=>t))}getLocalViewOfDocuments(e,t,n=tP()){let r=tx();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,n).next(e=>{let t=tC();return e.forEach((e,n)=>{t=t.insert(e,n.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let n=tx();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,tP()))}populateOverlays(e,t,n){let r=[];return n.forEach(e=>{t.has(e)||r.push(e)}),this.documentOverlayCache.getOverlays(e,r).next(e=>{e.forEach((e,n)=>{t.set(e,n)})})}computeViews(e,t,n,r){let i=t_,o=tx(),s=tx();return t.forEach((e,t)=>{let s=n.get(t.key);r.has(t.key)&&(void 0===s||s.mutation instanceof tZ)?i=i.insert(t.key,t):void 0!==s?(o.set(t.key,s.mutation.getFieldMask()),tK(s.mutation,t,s.mutation.getFieldMask(),Z.now())):o.set(t.key,ew.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>o.set(e,t)),t.forEach((e,t)=>{var n;return s.set(e,new nF(t,null!==(n=o.get(e))&&void 0!==n?n:null))}),s))}recalculateAndSaveOverlays(e,t){let n=tx(),r=new ep((e,t)=>e-t),i=tP();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let o=t.get(e);if(null===o)return;let s=n.get(e)||ew.empty();s=i.applyToLocalView(o,s),n.set(e,s);let a=(r.get(i.batchId)||tP()).add(e);r=r.insert(i.batchId,a)})}).next(()=>{let o=[],s=r.getReverseIterator();for(;s.hasNext();){let r=s.getNext(),a=r.key,l=r.value,c=tx();l.forEach(e=>{if(!i.has(e)){let r=tW(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}}),o.push(this.documentOverlayCache.saveOverlays(e,a,c))}return ea.waitFor(o)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,n,r){return en.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):tu(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n,r):this.getDocumentsMatchingCollectionQuery(e,t,n,r)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next(i=>{let o=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):ea.resolve(tx()),s=-1,a=i;return o.next(t=>ea.forEach(t,(t,n)=>(s{a=a.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,a,t,tP())).next(e=>({batchId:s,changes:tE(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new en(t)).next(e=>{let t=tC();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,n,r){let i=t.collectionGroup,o=tC();return this.indexManager.getCollectionParents(e,i).next(s=>ea.forEach(s,s=>{let a=new tl(s.child(i),null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt);return this.getDocumentsMatchingCollectionQuery(e,a,n,r).next(e=>{e.forEach((e,t)=>{o=o.insert(e,t)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,t,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next(o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,i,r))).next(e=>{i.forEach((t,n)=>{let r=n.getKey();null===e.get(r)&&(e=e.insert(r,eY.newInvalidDocument(r)))});let n=tC();return e.forEach((e,r)=>{let o=i.get(e);void 0!==o&&tK(o.mutation,r,ew.empty(),Z.now()),ty(t,r)&&(n=n.insert(e,r))}),n})}}class nU{constructor(e){this.serializer=e,this.hr=new Map,this.Pr=new Map}getBundleMetadata(e,t){return ea.resolve(this.hr.get(t))}saveBundleMetadata(e,t){return this.hr.set(t.id,{id:t.id,version:t.version,createTime:ny(t.createTime)}),ea.resolve()}getNamedQuery(e,t){return ea.resolve(this.Pr.get(t))}saveNamedQuery(e,t){return this.Pr.set(t.name,{name:t.name,query:function(e){let t=function(e){var t;let n,r=function(e){let t=n_(e);return 4===t.length?Q.emptyPath():nT(t)}(e.parent),i=e.structuredQuery,o=i.from?i.from.length:0,s=null;if(o>0){1===o||L();let e=i.from[0];e.allDescendants?s=e.collectionId:r=r.child(e.collectionId)}let a=[];i.where&&(a=function(e){var t;let n=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=nA(e.unaryFilter.field);return e1.create(t,"==",{doubleValue:NaN});case"IS_NULL":let n=nA(e.unaryFilter.field);return e1.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let r=nA(e.unaryFilter.field);return e1.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=nA(e.unaryFilter.field);return e1.create(i,"!=",{nullValue:"NULL_VALUE"});default:return L()}}(t):void 0!==t.fieldFilter?e1.create(nA(t.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 L()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?e2.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return L()}}(t.compositeFilter.op)):L()}(e);return n instanceof e2&&e5(t=n)&&e4(t)?n.getFilters():[n]}(i.where));let l=[];i.orderBy&&(l=i.orderBy.map(e=>new eQ(nA(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let c=null;i.limit&&(c=null==(n="object"==typeof(t=i.limit)?t.value:t)?null:n);let u=null;i.startAt&&(u=function(e){let t=!!e.before;return new eZ(e.values||[],t)}(i.startAt));let h=null;return i.endAt&&(h=function(e){let t=!e.before;return new eZ(e.values||[],t)}(i.endAt)),new tl(r,s,l,a,c,"F",u,h)}({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?tp(t,t.limit,"L"):t}(t.bundledQuery),readTime:ny(t.readTime)}),ea.resolve()}}class nH{constructor(){this.overlays=new ep(en.comparator),this.Ir=new Map}getOverlay(e,t){return ea.resolve(this.overlays.get(t))}getOverlays(e,t){let n=tx();return ea.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&n.set(t,e)})).next(()=>n)}saveOverlays(e,t,n){return n.forEach((n,r)=>{this.ht(e,t,r)}),ea.resolve()}removeOverlaysForBatchId(e,t,n){let r=this.Ir.get(n);return void 0!==r&&(r.forEach(e=>this.overlays=this.overlays.remove(e)),this.Ir.delete(n)),ea.resolve()}getOverlaysForCollection(e,t,n){let r=tx(),i=t.length+1,o=new en(t.child("")),s=this.overlays.getIteratorFrom(o);for(;s.hasNext();){let e=s.getNext().value,o=e.getKey();if(!t.isPrefixOf(o.path))break;o.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return ea.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new ep((e,t)=>e-t),o=this.overlays.getIterator();for(;o.hasNext();){let e=o.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=tx(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let s=tx(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach((e,t)=>s.set(e,t)),!(s.size()>=r)););return ea.resolve(s)}ht(e,t,n){let r=this.overlays.get(n.key);if(null!==r){let e=this.Ir.get(r.largestBatchId).delete(n.key);this.Ir.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new t5(t,n));let i=this.Ir.get(t);void 0===i&&(i=tP(),this.Ir.set(t,i)),this.Ir.set(t,i.add(n.key))}}class nq{constructor(){this.sessionToken=e_.EMPTY_BYTE_STRING}getSessionToken(e){return ea.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,ea.resolve()}}class nz{constructor(){this.Tr=new ev(n$.Er),this.dr=new ev(n$.Ar)}isEmpty(){return this.Tr.isEmpty()}addReference(e,t){let n=new n$(e,t);this.Tr=this.Tr.add(n),this.dr=this.dr.add(n)}Rr(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.Vr(new n$(e,t))}mr(e,t){e.forEach(e=>this.removeReference(e,t))}gr(e){let t=new en(new Q([])),n=new n$(t,e),r=new n$(t,e+1),i=[];return this.dr.forEachInRange([n,r],e=>{this.Vr(e),i.push(e.key)}),i}pr(){this.Tr.forEach(e=>this.Vr(e))}Vr(e){this.Tr=this.Tr.delete(e),this.dr=this.dr.delete(e)}yr(e){let t=new en(new Q([])),n=new n$(t,e),r=new n$(t,e+1),i=tP();return this.dr.forEachInRange([n,r],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new n$(e,0),n=this.Tr.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class n${constructor(e,t){this.key=e,this.wr=t}static Er(e,t){return en.comparator(e.key,t.key)||G(e.wr,t.wr)}static Ar(e,t){return G(e.wr,t.wr)||en.comparator(e.key,t.key)}}class nW{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.Sr=1,this.br=new ev(n$.Er)}checkEmpty(e){return ea.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){let i=this.Sr;this.Sr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let o=new t2(i,t,n,r);for(let t of(this.mutationQueue.push(o),r))this.br=this.br.add(new n$(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return ea.resolve(o)}lookupMutationBatch(e,t){return ea.resolve(this.Dr(t))}getNextMutationBatchAfterBatchId(e,t){let n=this.vr(t+1),r=n<0?0:n;return ea.resolve(this.mutationQueue.length>r?this.mutationQueue[r]:null)}getHighestUnacknowledgedBatchId(){return ea.resolve(0===this.mutationQueue.length?-1:this.Sr-1)}getAllMutationBatches(e){return ea.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let n=new n$(t,0),r=new n$(t,Number.POSITIVE_INFINITY),i=[];return this.br.forEachInRange([n,r],e=>{let t=this.Dr(e.wr);i.push(t)}),ea.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new ev(G);return t.forEach(e=>{let t=new n$(e,0),r=new n$(e,Number.POSITIVE_INFINITY);this.br.forEachInRange([t,r],e=>{n=n.add(e.wr)})}),ea.resolve(this.Cr(n))}getAllMutationBatchesAffectingQuery(e,t){let n=t.path,r=n.length+1,i=n;en.isDocumentKey(i)||(i=i.child(""));let o=new n$(new en(i),0),s=new ev(G);return this.br.forEachWhile(e=>{let t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(s=s.add(e.wr)),!0)},o),ea.resolve(this.Cr(s))}Cr(e){let t=[];return e.forEach(e=>{let n=this.Dr(e);null!==n&&t.push(n)}),t}removeMutationBatch(e,t){0===this.Fr(t.batchId,"removed")||L(),this.mutationQueue.shift();let n=this.br;return ea.forEach(t.mutations,r=>{let i=new n$(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)}).next(()=>{this.br=n})}On(e){}containsKey(e,t){let n=new n$(t,0),r=this.br.firstAfterOrEqual(n);return ea.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,ea.resolve()}Fr(e,t){return this.vr(e)}vr(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Dr(e){let t=this.vr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class nK{constructor(e){this.Mr=e,this.docs=new ep(en.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let n=t.key,r=this.docs.get(n),i=r?r.size:0,o=this.Mr(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:o}),this.size+=o-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let n=this.docs.get(t);return ea.resolve(n?n.document.mutableCopy():eY.newInvalidDocument(t))}getEntries(e,t){let n=t_;return t.forEach(e=>{let t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():eY.newInvalidDocument(e))}),ea.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=t_,o=t.path,s=new en(o.child("")),a=this.docs.getIteratorFrom(s);for(;a.hasNext();){let{key:e,value:{document:s}}=a.getNext();if(!o.isPrefixOf(e.path))break;e.path.length>o.length+1||0>=function(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=en.comparator(e.documentKey,t.documentKey))?n:G(e.largestBatchId,t.largestBatchId)}(new ei(s.readTime,s.key,-1),n)||(r.has(s.key)||ty(t,s))&&(i=i.insert(s.key,s.mutableCopy()))}return ea.resolve(i)}getAllFromCollectionGroup(e,t,n,r){L()}Or(e,t){return ea.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new nG(this)}getSize(e){return ea.resolve(this.size)}}class nG extends nV{constructor(e){super(),this.cr=e}applyChanges(e){let t=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.cr.addEntry(e,r)):this.cr.removeEntry(n)}),ea.waitFor(t)}getFromCache(e,t){return this.cr.getEntry(e,t)}getAllFromCache(e,t){return this.cr.getEntries(e,t)}}class nY{constructor(e){this.persistence=e,this.Nr=new tb(e=>to(e),ts),this.lastRemoteSnapshotVersion=X.min(),this.highestTargetId=0,this.Lr=0,this.Br=new nz,this.targetCount=0,this.kr=nD.Bn()}forEachTarget(e,t){return this.Nr.forEach((e,n)=>t(n)),ea.resolve()}getLastRemoteSnapshotVersion(e){return ea.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return ea.resolve(this.Lr)}allocateTargetId(e){return this.highestTargetId=this.kr.next(),ea.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Lr&&(this.Lr=t),ea.resolve()}Kn(e){this.Nr.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.kr=new nD(t),this.highestTargetId=t),e.sequenceNumber>this.Lr&&(this.Lr=e.sequenceNumber)}addTargetData(e,t){return this.Kn(t),this.targetCount+=1,ea.resolve()}updateTargetData(e,t){return this.Kn(t),ea.resolve()}removeTargetData(e,t){return this.Nr.delete(t.target),this.Br.gr(t.targetId),this.targetCount-=1,ea.resolve()}removeTargets(e,t,n){let r=0,i=[];return this.Nr.forEach((o,s)=>{s.sequenceNumber<=t&&null===n.get(s.targetId)&&(this.Nr.delete(o),i.push(this.removeMatchingKeysForTargetId(e,s.targetId)),r++)}),ea.waitFor(i).next(()=>r)}getTargetCount(e){return ea.resolve(this.targetCount)}getTargetData(e,t){let n=this.Nr.get(t)||null;return ea.resolve(n)}addMatchingKeys(e,t,n){return this.Br.Rr(t,n),ea.resolve()}removeMatchingKeys(e,t,n){this.Br.mr(t,n);let r=this.persistence.referenceDelegate,i=[];return r&&t.forEach(t=>{i.push(r.markPotentiallyOrphaned(e,t))}),ea.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Br.gr(t),ea.resolve()}getMatchingKeysForTargetId(e,t){let n=this.Br.yr(t);return ea.resolve(n)}containsKey(e,t){return ea.resolve(this.Br.containsKey(t))}}class nZ{constructor(e,t){this.qr={},this.overlays={},this.Qr=new ec(0),this.Kr=!1,this.Kr=!0,this.$r=new nq,this.referenceDelegate=e(this),this.Ur=new nY(this),this.indexManager=new nj,this.remoteDocumentCache=new nK(e=>this.referenceDelegate.Wr(e)),this.serializer=new nR(t),this.Gr=new nU(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Kr=!1,Promise.resolve()}get started(){return this.Kr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new nH,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.qr[e.toKey()];return n||(n=new nW(t,this.referenceDelegate),this.qr[e.toKey()]=n),n}getGlobalsCache(){return this.$r}getTargetCache(){return this.Ur}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Gr}runTransaction(e,t,n){O("MemoryPersistence","Starting transaction:",e);let r=new nX(this.Qr.next());return this.referenceDelegate.zr(),n(r).next(e=>this.referenceDelegate.jr(r).next(()=>e)).toPromise().then(e=>(r.raiseOnCommittedEvent(),e))}Hr(e,t){return ea.or(Object.values(this.qr).map(n=>()=>n.containsKey(e,t)))}}class nX extends eo{constructor(e){super(),this.currentSequenceNumber=e}}class nJ{constructor(e){this.persistence=e,this.Jr=new nz,this.Yr=null}static Zr(e){return new nJ(e)}get Xr(){if(this.Yr)return this.Yr;throw L()}addReference(e,t,n){return this.Jr.addReference(n,t),this.Xr.delete(n.toString()),ea.resolve()}removeReference(e,t,n){return this.Jr.removeReference(n,t),this.Xr.add(n.toString()),ea.resolve()}markPotentiallyOrphaned(e,t){return this.Xr.add(t.toString()),ea.resolve()}removeTarget(e,t){this.Jr.gr(t.targetId).forEach(e=>this.Xr.add(e.toString()));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Xr.add(e.toString()))}).next(()=>n.removeTargetData(e,t))}zr(){this.Yr=new Set}jr(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return ea.forEach(this.Xr,n=>{let r=en.fromPath(n);return this.ei(e,r).next(e=>{e||t.removeEntry(r,X.min())})}).next(()=>(this.Yr=null,t.apply(e)))}updateLimboDocument(e,t){return this.ei(e,t).next(e=>{e?this.Xr.delete(t.toString()):this.Xr.add(t.toString())})}Wr(e){return 0}ei(e,t){return ea.or([()=>ea.resolve(this.Jr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Hr(e,t)])}}class nQ{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.$i=n,this.Ui=r}static Wi(e,t){let n=tP(),r=tP();for(let e of t.docChanges)switch(e.type){case 0:n=n.add(e.doc.key);break;case 1:r=r.add(e.doc.key)}return new nQ(e,t.fromCache,n,r)}}class n0{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class n1{constructor(){this.Gi=!1,this.zi=!1,this.ji=100,this.Hi=(0,b.G6)()?8:function(e){let t=e.match(/Android ([\d.]+)/i);return Number(t?t[1].split(".").slice(0,2).join("."):"-1")}((0,b.z$)())>0?6:4}initialize(e,t){this.Ji=e,this.indexManager=t,this.Gi=!0}getDocumentsMatchingQuery(e,t,n,r){let i={result:null};return this.Yi(e,t).next(e=>{i.result=e}).next(()=>{if(!i.result)return this.Zi(e,t,r,n).next(e=>{i.result=e})}).next(()=>{if(i.result)return;let n=new n0;return this.Xi(e,t,n).next(r=>{if(i.result=r,this.zi)return this.es(e,t,n,r.size)})}).next(()=>i.result)}es(e,t,n,r){return n.documentReadCountthis.Hi*r?(k()<=w.in.DEBUG&&O("QueryEngine","The SDK decides to create cache indexes for query:",tv(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,td(t))):ea.resolve())}Yi(e,t){if(tc(t))return ea.resolve(null);let n=td(t);return this.indexManager.getIndexType(e,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(n=td(t=tp(t,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,n).next(r=>{let i=tP(...r);return this.Ji.getDocuments(e,i).next(r=>this.indexManager.getMinOffset(e,n).next(n=>{let o=this.ts(t,r);return this.ns(t,o,i,n.readTime)?this.Yi(e,tp(t,null,"F")):this.rs(e,o,t,n)}))})))}Zi(e,t,n,r){return tc(t)||r.isEqual(X.min())?ea.resolve(null):this.Ji.getDocuments(e,n).next(i=>{let o=this.ts(t,i);return this.ns(t,o,n,r)?ea.resolve(null):(k()<=w.in.DEBUG&&O("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),tv(t)),this.rs(e,o,t,function(e,t){let n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1;return new ei(X.fromTimestamp(1e9===r?new Z(n+1,0):new Z(n,r)),en.empty(),-1)}(r,0)).next(e=>e))})}ts(e,t){let n=new ev(tw(e));return t.forEach((t,r)=>{ty(e,r)&&(n=n.add(r))}),n}ns(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Xi(e,t,n){return k()<=w.in.DEBUG&&O("QueryEngine","Using full collection scan to execute query:",tv(t)),this.Ji.getDocumentsMatchingQuery(e,t,ei.min(),n)}rs(e,t,n,r){return this.Ji.getDocumentsMatchingQuery(e,n,r).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}class n2{constructor(e,t,n,r){this.persistence=e,this.ss=t,this.serializer=r,this.os=new ep(G),this._s=new tb(e=>to(e),ts),this.us=new Map,this.cs=e.getRemoteDocumentCache(),this.Ur=e.getTargetCache(),this.Gr=e.getBundleCache(),this.ls(n)}ls(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new nB(this.cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.cs.setIndexManager(this.indexManager),this.ss.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.os))}}async function n4(e,t){return await e.persistence.runTransaction("Handle user change","readonly",n=>{let r;return e.mutationQueue.getAllMutationBatches(n).next(i=>(r=i,e.ls(t),e.mutationQueue.getAllMutationBatches(n))).next(t=>{let i=[],o=[],s=tP();for(let e of r)for(let t of(i.push(e.batchId),e.mutations))s=s.add(t.key);for(let e of t)for(let t of(o.push(e.batchId),e.mutations))s=s.add(t.key);return e.localDocuments.getDocuments(n,s).next(e=>({hs:e,removedBatchIds:i,addedBatchIds:o}))})})}function n5(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Ur.getLastRemoteSnapshotVersion(t))}async function n9(e,t,n){let r=e.os.get(t);try{n||await e.persistence.runTransaction("Release target",n?"readwrite":"readwrite-primary",t=>e.persistence.referenceDelegate.removeTarget(t,r))}catch(e){if(!el(e))throw e;O("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}e.os=e.os.remove(t),e._s.delete(r.target)}function n3(e,t,n){let r=X.min(),i=tP();return e.persistence.runTransaction("Execute query","readwrite",o=>(function(e,t,n){let r=e._s.get(n);return void 0!==r?ea.resolve(e.os.get(r)):e.Ur.getTargetData(t,n)})(e,o,td(t)).next(t=>{if(t)return r=t.lastLimboFreeSnapshotVersion,e.Ur.getMatchingKeysForTargetId(o,t.targetId).next(e=>{i=e})}).next(()=>e.ss.getDocumentsMatchingQuery(o,t,n?r:X.min(),n?i:tP())).next(n=>{var r;let o;return r=t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2)),o=e.us.get(r)||X.min(),n.forEach((e,t)=>{t.readTime.compareTo(o)>0&&(o=t.readTime)}),e.us.set(r,o),{documents:n,Ts:i}}))}class n6{constructor(){this.activeTargetIds=tA}fs(e){this.activeTargetIds=this.activeTargetIds.add(e)}gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Vs(){return JSON.stringify({activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()})}}class n8{constructor(){this.so=new n6,this.oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e,t=!0){return t&&this.so.fs(e),this.oo[e]||"not-current"}updateQueryState(e,t,n){this.oo[e]=t}removeLocalQueryTarget(e){this.so.gs(e)}isLocalQueryTarget(e){return this.so.activeTargetIds.has(e)}clearQueryState(e){delete this.oo[e]}getAllActiveQueryTargets(){return this.so.activeTargetIds}isActiveQueryTarget(e){return this.so.activeTargetIds.has(e)}start(){return this.so=new n6,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class n7{_o(e){}shutdown(){}}class re{constructor(){this.ao=()=>this.uo(),this.co=()=>this.lo(),this.ho=[],this.Po()}_o(e){this.ho.push(e)}shutdown(){window.removeEventListener("online",this.ao),window.removeEventListener("offline",this.co)}Po(){window.addEventListener("online",this.ao),window.addEventListener("offline",this.co)}uo(){for(let e of(O("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.ho))e(0)}lo(){for(let e of(O("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.ho))e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let rt=null;function rn(){return null===rt?rt=268435456+Math.round(2147483648*Math.random()):rt++,"0x"+rt.toString(16)}let rr={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class ri{constructor(e){this.Io=e.Io,this.To=e.To}Eo(e){this.Ao=e}Ro(e){this.Vo=e}mo(e){this.fo=e}onMessage(e){this.po=e}close(){this.To()}send(e){this.Io(e)}yo(){this.Ao()}wo(){this.Vo()}So(e){this.fo(e)}bo(e){this.po(e)}}let ro="WebChannelConnection";class rs extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http",n=encodeURIComponent(this.databaseId.projectId),r=encodeURIComponent(this.databaseId.database);this.Do=t+"://"+e.host,this.vo=`projects/${n}/databases/${r}`,this.Co="(default)"===this.databaseId.database?`project_id=${n}`:`project_id=${n}&database_id=${r}`}get Fo(){return!1}Mo(e,t,n,r,i){let o=rn(),s=this.xo(e,t.toUriEncodedString());O("RestConnection",`Sending RPC '${e}' ${o}:`,s,n);let a={"google-cloud-resource-prefix":this.vo,"x-goog-request-params":this.Co};return this.Oo(a,r,i),this.No(e,s,a,n).then(t=>(O("RestConnection",`Received RPC '${e}' ${o}: `,t),t),t=>{throw M("RestConnection",`RPC '${e}' ${o} failed with error: `,t,"url: ",s,"request:",n),t})}Lo(e,t,n,r,i,o){return this.Mo(e,t,n,r,i)}Oo(e,t,n){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+P}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,n)=>e[n]=t),n&&n.headers.forEach((t,n)=>e[n]=t)}xo(e,t){let n=rr[e];return`${this.Do}/v1/${t}:${n}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}No(e,t,n,r){let i=rn();return new Promise((s,c)=>{let u=new o;u.setWithCredentials(!0),u.listenOnce(a.COMPLETE,()=>{try{switch(u.getLastErrorCode()){case l.NO_ERROR:let t=u.getResponseJson();O(ro,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),s(t);break;case l.TIMEOUT:O(ro,`RPC '${e}' ${i} timed out`),c(new D(N.DEADLINE_EXCEEDED,"Request time out"));break;case l.HTTP_ERROR:let n=u.getStatus();if(O(ro,`RPC '${e}' ${i} failed with status:`,n,"response text:",u.getResponseText()),n>0){let e=u.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=null==e?void 0:e.error;if(t&&t.status&&t.message){let e=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(N).indexOf(t)>=0?t:N.UNKNOWN}(t.status);c(new D(e,t.message))}else c(new D(N.UNKNOWN,"Server responded with status "+u.getStatus()))}else c(new D(N.UNAVAILABLE,"Connection failed."));break;default:L()}}finally{O(ro,`RPC '${e}' ${i} completed.`)}});let h=JSON.stringify(r);O(ro,`RPC '${e}' ${i} sending request:`,r),u.send(t,"POST",h,n,15)})}Bo(e,t,n){let r=rn(),i=[this.Do,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=d(),a=h(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},p=this.longPollingOptions.timeoutSeconds;void 0!==p&&(l.longPollingTimeout=Math.round(1e3*p)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Oo(l.initMessageHeaders,t,n),l.encodeInitMessageHeaders=!0;let m=i.join("");O(ro,`Creating RPC '${e}' stream ${r}: ${m}`,l);let g=o.createWebChannel(m,l),v=!1,y=!1,w=new ri({Io:t=>{y?O(ro,`Not sending because RPC '${e}' stream ${r} is closed:`,t):(v||(O(ro,`Opening RPC '${e}' stream ${r} transport.`),g.open(),v=!0),O(ro,`RPC '${e}' stream ${r} sending:`,t),g.send(t))},To:()=>g.close()}),b=(e,t,n)=>{e.listen(t,e=>{try{n(e)}catch(e){setTimeout(()=>{throw e},0)}})};return b(g,s.EventType.OPEN,()=>{y||(O(ro,`RPC '${e}' stream ${r} transport opened.`),w.yo())}),b(g,s.EventType.CLOSE,()=>{y||(y=!0,O(ro,`RPC '${e}' stream ${r} transport closed`),w.So())}),b(g,s.EventType.ERROR,t=>{y||(y=!0,M(ro,`RPC '${e}' stream ${r} transport errored:`,t),w.So(new D(N.UNAVAILABLE,"The operation could not be completed")))}),b(g,s.EventType.MESSAGE,t=>{var n;if(!y){let i=t.data[0];i||L();let o=i.error||(null===(n=i[0])||void 0===n?void 0:n.error);if(o){O(ro,`RPC '${e}' stream ${r} received error:`,o);let t=o.status,n=function(e){let t=f[e];if(void 0!==t)return t3(t)}(t),i=o.message;void 0===n&&(n=N.INTERNAL,i="Unknown error status: "+t+" with message "+o.message),y=!0,w.So(new D(n,i)),g.close()}else O(ro,`RPC '${e}' stream ${r} received:`,i),w.bo(i)}}),b(a,u.STAT_EVENT,t=>{t.stat===c.PROXY?O(ro,`RPC '${e}' stream ${r} detected buffering proxy`):t.stat===c.NOPROXY&&O(ro,`RPC '${e}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{w.wo()},0),w}}function ra(){return"undefined"!=typeof document?document:null}function rl(e){return new np(e,!0)}class rc{constructor(e,t,n=1e3,r=1.5,i=6e4){this.ui=e,this.timerId=t,this.ko=n,this.qo=r,this.Qo=i,this.Ko=0,this.$o=null,this.Uo=Date.now(),this.reset()}reset(){this.Ko=0}Wo(){this.Ko=this.Qo}Go(e){this.cancel();let t=Math.floor(this.Ko+this.zo()),n=Math.max(0,Date.now()-this.Uo),r=Math.max(0,t-n);r>0&&O("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.Ko} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.$o=this.ui.enqueueAfterDelay(this.timerId,r,()=>(this.Uo=Date.now(),e())),this.Ko*=this.qo,this.Kothis.Qo&&(this.Ko=this.Qo)}jo(){null!==this.$o&&(this.$o.skipDelay(),this.$o=null)}cancel(){null!==this.$o&&(this.$o.cancel(),this.$o=null)}zo(){return(Math.random()-.5)*this.Ko}}class ru{constructor(e,t,n,r,i,o,s,a){this.ui=e,this.Ho=n,this.Jo=r,this.connection=i,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=s,this.listener=a,this.state=0,this.Yo=0,this.Zo=null,this.Xo=null,this.stream=null,this.e_=0,this.t_=new rc(e,t)}n_(){return 1===this.state||5===this.state||this.r_()}r_(){return 2===this.state||3===this.state}start(){this.e_=0,4!==this.state?this.auth():this.i_()}async stop(){this.n_()&&await this.close(0)}s_(){this.state=0,this.t_.reset()}o_(){this.r_()&&null===this.Zo&&(this.Zo=this.ui.enqueueAfterDelay(this.Ho,6e4,()=>this.__()))}a_(e){this.u_(),this.stream.send(e)}async __(){if(this.r_())return this.close(0)}u_(){this.Zo&&(this.Zo.cancel(),this.Zo=null)}c_(){this.Xo&&(this.Xo.cancel(),this.Xo=null)}async close(e,t){this.u_(),this.c_(),this.t_.cancel(),this.Yo++,4!==e?this.t_.reset():t&&t.code===N.RESOURCE_EXHAUSTED?(R(t.toString()),R("Using maximum backoff delay to prevent overloading the backend."),this.t_.Wo()):t&&t.code===N.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.l_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.mo(t)}l_(){}auth(){this.state=1;let e=this.h_(this.Yo),t=this.Yo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,n])=>{this.Yo===t&&this.P_(e,n)},t=>{e(()=>{let e=new D(N.UNKNOWN,"Fetching auth token failed: "+t.message);return this.I_(e)})})}P_(e,t){let n=this.h_(this.Yo);this.stream=this.T_(e,t),this.stream.Eo(()=>{n(()=>this.listener.Eo())}),this.stream.Ro(()=>{n(()=>(this.state=2,this.Xo=this.ui.enqueueAfterDelay(this.Jo,1e4,()=>(this.r_()&&(this.state=3),Promise.resolve())),this.listener.Ro()))}),this.stream.mo(e=>{n(()=>this.I_(e))}),this.stream.onMessage(e=>{n(()=>1==++this.e_?this.E_(e):this.onNext(e))})}i_(){this.state=5,this.t_.Go(async()=>{this.state=0,this.start()})}I_(e){return O("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}h_(e){return t=>{this.ui.enqueueAndForget(()=>this.Yo===e?t():(O("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class rh extends ru{constructor(e,t,n,r,i,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,o),this.serializer=i}T_(e,t){return this.connection.Bo("Listen",e,t)}E_(e){return this.onNext(e)}onNext(e){this.t_.reset();let t=function(e,t){let n;if("targetChange"in t){var r,i;t.targetChange;let o="NO_CHANGE"===(r=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===r?1:"REMOVE"===r?2:"CURRENT"===r?3:"RESET"===r?4:L(),s=t.targetChange.targetIds||[],a=(i=t.targetChange.resumeToken,e.useProto3Json?(void 0===i||"string"==typeof i||L(),e_.fromBase64String(i||"")):(void 0===i||i instanceof x||i instanceof Uint8Array||L(),e_.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause;n=new ns(o,s,a,l&&new D(void 0===l.code?N.UNKNOWN:t3(l.code),l.message||"")||null)}else if("documentChange"in t){t.documentChange;let r=t.documentChange;r.document,r.document.name,r.document.updateTime;let i=nC(e,r.document.name),o=ny(r.document.updateTime),s=r.document.createTime?ny(r.document.createTime):X.min(),a=new eG({mapValue:{fields:r.document.fields}}),l=eY.newFoundDocument(i,o,s,a);n=new ni(r.targetIds||[],r.removedTargetIds||[],l.key,l)}else if("documentDelete"in t){t.documentDelete;let r=t.documentDelete;r.document;let i=nC(e,r.document),o=r.readTime?ny(r.readTime):X.min(),s=eY.newNoDocument(i,o);n=new ni([],r.removedTargetIds||[],s.key,s)}else if("documentRemove"in t){t.documentRemove;let r=t.documentRemove;r.document;let i=nC(e,r.document);n=new ni([],r.removedTargetIds||[],i,null)}else{if(!("filter"in t))return L();{t.filter;let e=t.filter;e.targetId;let{count:r=0,unchangedNames:i}=e,o=new t9(r,i);n=new no(e.targetId,o)}}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return X.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?X.min():t.readTime?ny(t.readTime):X.min()}(e);return this.listener.d_(t,n)}A_(e){let t={};t.database=nx(this.serializer),t.addTarget=function(e,t){let n;let r=t.target;if((n=ta(r)?{documents:{documents:[nE(e,r.path)]}}:{query:function(e,t){var n,r;let i;let o={structuredQuery:{}},s=t.path;null!==t.collectionGroup?(i=s,o.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=s.popLast(),o.structuredQuery.from=[{collectionId:s.lastSegment()}]),o.parent=nE(e,i);let a=function(e){if(0!==e.length)return function e(t){return t instanceof e1?function(e){if("=="===e.op){if(eq(e.value))return{unaryFilter:{field:nP(e.field),op:"IS_NAN"}};if(eH(e.value))return{unaryFilter:{field:nP(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(eq(e.value))return{unaryFilter:{field:nP(e.field),op:"IS_NOT_NAN"}};if(eH(e.value))return{unaryFilter:{field:nP(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:nP(e.field),op:nd[e.op],value:e.value}}}(t):t instanceof e2?function(t){let n=t.getFilters().map(t=>e(t));return 1===n.length?n[0]:{compositeFilter:{op:nf[t.op],filters:n}}}(t):L()}(e2.create(e,"and"))}(t.filters);a&&(o.structuredQuery.where=a);let l=function(e){if(0!==e.length)return e.map(e=>({field:nP(e.field),direction:nh[e.dir]}))}(t.orderBy);l&&(o.structuredQuery.orderBy=l);let c=nm(e,t.limit);return null!==c&&(o.structuredQuery.limit=c),t.startAt&&(o.structuredQuery.startAt={before:(n=t.startAt).inclusive,values:n.position}),t.endAt&&(o.structuredQuery.endAt={before:!(r=t.endAt).inclusive,values:r.position}),{_t:o,parent:i}}(e,r)._t}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=nv(e,t.resumeToken);let r=nm(e,t.expectedCount);null!==r&&(n.expectedCount=r)}else if(t.snapshotVersion.compareTo(X.min())>0){n.readTime=ng(e,t.snapshotVersion.toTimestamp());let r=nm(e,t.expectedCount);null!==r&&(n.expectedCount=r)}return n}(this.serializer,e);let n=function(e,t){let n=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return L()}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.a_(t)}R_(e){let t={};t.database=nx(this.serializer),t.removeTarget=e,this.a_(t)}}class rd extends ru{constructor(e,t,n,r,i,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,o),this.serializer=i}get V_(){return this.e_>0}start(){this.lastStreamToken=void 0,super.start()}l_(){this.V_&&this.m_([])}T_(e,t){return this.connection.Bo("Write",e,t)}E_(e){return e.streamToken||L(),this.lastStreamToken=e.streamToken,e.writeResults&&0!==e.writeResults.length&&L(),this.listener.f_()}onNext(e){var t,n;e.streamToken||L(),this.lastStreamToken=e.streamToken,this.t_.reset();let r=(t=e.writeResults,n=e.commitTime,t&&t.length>0?(void 0!==n||L(),t.map(e=>{let t;return(t=e.updateTime?ny(e.updateTime):ny(n)).isEqual(X.min())&&(t=ny(n)),new tH(t,e.transformResults||[])})):[]),i=ny(e.commitTime);return this.listener.g_(i,r)}p_(){let e={};e.database=nx(this.serializer),this.a_(e)}m_(e){let t={streamToken:this.lastStreamToken,writes:e.map(e=>(function(e,t){var n;let r;if(t instanceof tY)r={update:nI(e,t.key,t.value)};else if(t instanceof t0)r={delete:nS(e,t.key)};else if(t instanceof tZ)r={update:nI(e,t.key,t.data),updateMask:function(e){let t=[];return e.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}(t.fieldMask)};else{if(!(t instanceof t1))return L();r={verify:nS(e,t.key)}}return t.fieldTransforms.length>0&&(r.updateTransforms=t.fieldTransforms.map(e=>(function(e,t){let n=t.transform;if(n instanceof tj)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof tL)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof tD)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof tF)return{fieldPath:t.field.canonicalString(),increment:n.Pe};throw L()})(0,e))),t.precondition.isNone||(r.currentDocument=void 0!==(n=t.precondition).updateTime?{updateTime:ng(e,n.updateTime.toTimestamp())}:void 0!==n.exists?{exists:n.exists}:L()),r})(this.serializer,e))};this.a_(t)}}class rf extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.y_=!1}w_(){if(this.y_)throw new D(N.FAILED_PRECONDITION,"The client has already been terminated.")}Mo(e,t,n,r){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,o])=>this.connection.Mo(e,nb(t,n),r,i,o)).catch(e=>{throw"FirebaseError"===e.name?(e.code===N.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new D(N.UNKNOWN,e.toString())})}Lo(e,t,n,r,i){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.Lo(e,nb(t,n),r,o,s,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===N.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new D(N.UNKNOWN,e.toString())})}terminate(){this.y_=!0,this.connection.terminate()}}class rp{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.S_=0,this.b_=null,this.D_=!0}v_(){0===this.S_&&(this.C_("Unknown"),this.b_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.b_=null,this.F_("Backend didn't respond within 10 seconds."),this.C_("Offline"),Promise.resolve())))}M_(e){"Online"===this.state?this.C_("Unknown"):(this.S_++,this.S_>=1&&(this.x_(),this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.C_("Offline")))}set(e){this.x_(),this.S_=0,"Online"===e&&(this.D_=!1),this.C_(e)}C_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}F_(e){let t=`Could not reach Cloud Firestore backend. ${e} This 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.D_?(R(t),this.D_=!1):O("OnlineStateTracker",t)}x_(){null!==this.b_&&(this.b_.cancel(),this.b_=null)}}class rm{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.O_=[],this.N_=new Map,this.L_=new Set,this.B_=[],this.k_=i,this.k_._o(e=>{n.enqueueAndForget(async()=>{rE(this)&&(O("RemoteStore","Restarting streams for network reachability change."),await async function(e){e.L_.add(4),await rv(e),e.q_.set("Unknown"),e.L_.delete(4),await rg(e)}(this))})}),this.q_=new rp(n,r)}}async function rg(e){if(rE(e))for(let t of e.B_)await t(!0)}async function rv(e){for(let t of e.B_)await t(!1)}function ry(e,t){e.N_.has(t.targetId)||(e.N_.set(t.targetId,t),rC(e)?rS(e):rB(e).r_()&&rb(e,t))}function rw(e,t){let n=rB(e);e.N_.delete(t),n.r_()&&r_(e,t),0===e.N_.size&&(n.r_()?n.o_():rE(e)&&e.q_.set("Unknown"))}function rb(e,t){if(e.Q_.xe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(X.min())>0){let n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}rB(e).A_(t)}function r_(e,t){e.Q_.xe(t),rB(e).R_(t)}function rS(e){e.Q_=new nl({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),ot:t=>e.N_.get(t)||null,tt:()=>e.datastore.serializer.databaseId}),rB(e).start(),e.q_.v_()}function rC(e){return rE(e)&&!rB(e).n_()&&e.N_.size>0}function rE(e){return 0===e.L_.size}async function rx(e){e.q_.set("Online")}async function rT(e){e.N_.forEach((t,n)=>{rb(e,t)})}async function rI(e,t){e.Q_=void 0,rC(e)?(e.q_.M_(t),rS(e)):e.q_.set("Unknown")}async function rP(e,t,n){if(e.q_.set("Online"),t instanceof ns&&2===t.state&&t.cause)try{await async function(e,t){let n=t.cause;for(let r of t.targetIds)e.N_.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.N_.delete(r),e.Q_.removeTarget(r))}(e,t)}catch(n){O("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await rA(e,n)}else if(t instanceof ni?e.Q_.Ke(t):t instanceof no?e.Q_.He(t):e.Q_.We(t),!n.isEqual(X.min()))try{let t=await n5(e.localStore);n.compareTo(t)>=0&&await function(e,t){let n=e.Q_.rt(t);return n.targetChanges.forEach((n,r)=>{if(n.resumeToken.approximateByteSize()>0){let i=e.N_.get(r);i&&e.N_.set(r,i.withResumeToken(n.resumeToken,t))}}),n.targetMismatches.forEach((t,n)=>{let r=e.N_.get(t);if(!r)return;e.N_.set(t,r.withResumeToken(e_.EMPTY_BYTE_STRING,r.snapshotVersion)),r_(e,t);let i=new nO(r.target,t,n,r.sequenceNumber);rb(e,i)}),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){O("RemoteStore","Failed to raise snapshot:",t),await rA(e,t)}}async function rA(e,t,n){if(!el(t))throw t;e.L_.add(1),await rv(e),e.q_.set("Offline"),n||(n=()=>n5(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{O("RemoteStore","Retrying IndexedDB access"),await n(),e.L_.delete(1),await rg(e)})}function rk(e,t){return t().catch(n=>rA(e,n,t))}async function rO(e){let t=rU(e),n=e.O_.length>0?e.O_[e.O_.length-1].batchId:-1;for(;rE(e)&&e.O_.length<10;)try{let r=await function(e,t){return e.persistence.runTransaction("Get next mutation batch","readonly",n=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)))}(e.localStore,n);if(null===r){0===e.O_.length&&t.o_();break}n=r.batchId,function(e,t){e.O_.push(t);let n=rU(e);n.r_()&&n.V_&&n.m_(t.mutations)}(e,r)}catch(t){await rA(e,t)}rR(e)&&rM(e)}function rR(e){return rE(e)&&!rU(e).n_()&&e.O_.length>0}function rM(e){rU(e).start()}async function rj(e){rU(e).p_()}async function rL(e){let t=rU(e);for(let n of e.O_)t.m_(n.mutations)}async function rN(e,t,n){let r=e.O_.shift(),i=t4.from(r,t,n);await rk(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await rO(e)}async function rD(e,t){t&&rU(e).V_&&await async function(e,t){var n;if(function(e){switch(e){default:return L();case N.CANCELLED:case N.UNKNOWN:case N.DEADLINE_EXCEEDED:case N.RESOURCE_EXHAUSTED:case N.INTERNAL:case N.UNAVAILABLE:case N.UNAUTHENTICATED:return!1;case N.INVALID_ARGUMENT:case N.NOT_FOUND:case N.ALREADY_EXISTS:case N.PERMISSION_DENIED:case N.FAILED_PRECONDITION:case N.ABORTED:case N.OUT_OF_RANGE:case N.UNIMPLEMENTED:case N.DATA_LOSS:return!0}}(n=t.code)&&n!==N.ABORTED){let n=e.O_.shift();rU(e).s_(),await rk(e,()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t)),await rO(e)}}(e,t),rR(e)&&rM(e)}async function rV(e,t){e.asyncQueue.verifyOperationInProgress(),O("RemoteStore","RemoteStore received new credentials");let n=rE(e);e.L_.add(3),await rv(e),n&&e.q_.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.L_.delete(3),await rg(e)}async function rF(e,t){t?(e.L_.delete(2),await rg(e)):t||(e.L_.add(2),await rv(e),e.q_.set("Unknown"))}function rB(e){var t,n,r;return e.K_||(e.K_=(t=e.datastore,n=e.asyncQueue,r={Eo:rx.bind(null,e),Ro:rT.bind(null,e),mo:rI.bind(null,e),d_:rP.bind(null,e)},t.w_(),new rh(n,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,r)),e.B_.push(async t=>{t?(e.K_.s_(),rC(e)?rS(e):e.q_.set("Unknown")):(await e.K_.stop(),e.Q_=void 0)})),e.K_}function rU(e){var t,n,r;return e.U_||(e.U_=(t=e.datastore,n=e.asyncQueue,r={Eo:()=>Promise.resolve(),Ro:rj.bind(null,e),mo:rD.bind(null,e),f_:rL.bind(null,e),g_:rN.bind(null,e)},t.w_(),new rd(n,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,r)),e.B_.push(async t=>{t?(e.U_.s_(),await rO(e)):(await e.U_.stop(),e.O_.length>0&&(O("RemoteStore",`Stopping write stream with ${e.O_.length} pending writes`),e.O_=[]))})),e.U_}class rH{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new V,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,n,r,i){let o=new rH(e,t,Date.now()+n,r,i);return o.start(n),o}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new D(N.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function rq(e,t){if(R("AsyncQueue",`${t}: ${e}`),el(e))return new D(N.UNAVAILABLE,`${t}: ${e}`);throw e}class rz{constructor(e){this.comparator=e?(t,n)=>e(t,n)||en.comparator(t.key,n.key):(e,t)=>en.comparator(e.key,t.key),this.keyedMap=tC(),this.sortedSet=new ep(this.comparator)}static emptySet(e){return new rz(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,n)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof rz)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){let n=new rz;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}class r${constructor(){this.W_=new ep(en.comparator)}track(e){let t=e.doc.key,n=this.W_.get(t);n?0!==e.type&&3===n.type?this.W_=this.W_.insert(t,e):3===e.type&&1!==n.type?this.W_=this.W_.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.W_=this.W_.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.W_=this.W_.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.W_=this.W_.remove(t):1===e.type&&2===n.type?this.W_=this.W_.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.W_=this.W_.insert(t,{type:2,doc:e.doc}):L():this.W_=this.W_.insert(t,e)}G_(){let e=[];return this.W_.inorderTraversal((t,n)=>{e.push(n)}),e}}class rW{constructor(e,t,n,r,i,o,s,a,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=s,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){let o=[];return t.forEach(e=>{o.push({type:0,doc:e})}),new rW(e,t,rz.emptySet(t),o,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&tm(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;ee.J_())}}class rG{constructor(){this.queries=rY(),this.onlineState="Unknown",this.Y_=new Set}terminate(){!function(e,t){let n=e.queries;e.queries=rY(),n.forEach((e,n)=>{for(let e of n.j_)e.onError(t)})}(this,new D(N.ABORTED,"Firestore shutting down"))}}function rY(){return new tb(e=>tg(e),tm)}async function rZ(e,t){let n=3,r=t.query,i=e.queries.get(r);i?!i.H_()&&t.J_()&&(n=2):(i=new rK,n=t.J_()?0:1);try{switch(n){case 0:i.z_=await e.onListen(r,!0);break;case 1:i.z_=await e.onListen(r,!1);break;case 2:await e.onFirstRemoteStoreListen(r)}}catch(n){let e=rq(n,`Initialization of query '${tv(t.query)}' failed`);return void t.onError(e)}e.queries.set(r,i),i.j_.push(t),t.Z_(e.onlineState),i.z_&&t.X_(i.z_)&&r0(e)}async function rX(e,t){let n=t.query,r=3,i=e.queries.get(n);if(i){let e=i.j_.indexOf(t);e>=0&&(i.j_.splice(e,1),0===i.j_.length?r=t.J_()?0:1:!i.H_()&&t.J_()&&(r=2))}switch(r){case 0:return e.queries.delete(n),e.onUnlisten(n,!0);case 1:return e.queries.delete(n),e.onUnlisten(n,!1);case 2:return e.onLastRemoteStoreUnlisten(n);default:return}}function rJ(e,t){let n=!1;for(let r of t){let t=r.query,i=e.queries.get(t);if(i){for(let e of i.j_)e.X_(r)&&(n=!0);i.z_=r}}n&&r0(e)}function rQ(e,t,n){let r=e.queries.get(t);if(r)for(let e of r.j_)e.onError(n);e.queries.delete(t)}function r0(e){e.Y_.forEach(e=>{e.next()})}(g=m||(m={})).ea="default",g.Cache="cache";class r1{constructor(e,t,n){this.query=e,this.ta=t,this.na=!1,this.ra=null,this.onlineState="Unknown",this.options=n||{}}X_(e){if(!this.options.includeMetadataChanges){let t=[];for(let n of e.docChanges)3!==n.type&&t.push(n);e=new rW(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.na?this.ia(e)&&(this.ta.next(e),t=!0):this.sa(e,this.onlineState)&&(this.oa(e),t=!0),this.ra=e,t}onError(e){this.ta.error(e)}Z_(e){this.onlineState=e;let t=!1;return this.ra&&!this.na&&this.sa(this.ra,e)&&(this.oa(this.ra),t=!0),t}sa(e,t){return!(e.fromCache&&this.J_())||(!this.options._a||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}ia(e){if(e.docChanges.length>0)return!0;let t=this.ra&&this.ra.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}oa(e){e=rW.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.na=!0,this.ta.next(e)}J_(){return this.options.source!==m.Cache}}class r2{constructor(e){this.key=e}}class r4{constructor(e){this.key=e}}class r5{constructor(e,t){this.query=e,this.Ta=t,this.Ea=null,this.hasCachedResults=!1,this.current=!1,this.da=tP(),this.mutatedKeys=tP(),this.Aa=tw(e),this.Ra=new rz(this.Aa)}get Va(){return this.Ta}ma(e,t){let n=t?t.fa:new r$,r=t?t.Ra:this.Ra,i=t?t.mutatedKeys:this.mutatedKeys,o=r,s=!1,a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal((e,t)=>{let c=r.get(e),u=ty(this.query,t)?t:null,h=!!c&&this.mutatedKeys.has(c.key),d=!!u&&(u.hasLocalMutations||this.mutatedKeys.has(u.key)&&u.hasCommittedMutations),f=!1;c&&u?c.data.isEqual(u.data)?h!==d&&(n.track({type:3,doc:u}),f=!0):this.ga(c,u)||(n.track({type:2,doc:u}),f=!0,(a&&this.Aa(u,a)>0||l&&0>this.Aa(u,l))&&(s=!0)):!c&&u?(n.track({type:0,doc:u}),f=!0):c&&!u&&(n.track({type:1,doc:c}),f=!0,(a||l)&&(s=!0)),f&&(u?(o=o.add(u),i=d?i.add(e):i.delete(e)):(o=o.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;o.size>this.query.limit;){let e="F"===this.query.limitType?o.last():o.first();o=o.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{Ra:o,fa:n,ns:s,mutatedKeys:i}}ga(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n,r){let i=this.Ra;this.Ra=e.Ra,this.mutatedKeys=e.mutatedKeys;let o=e.fa.G_();o.sort((e,t)=>(function(e,t){let n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return L()}};return n(e)-n(t)})(e.type,t.type)||this.Aa(e.doc,t.doc)),this.pa(n),r=null!=r&&r;let s=t&&!r?this.ya():[],a=0===this.da.size&&this.current&&!r?1:0,l=a!==this.Ea;return(this.Ea=a,0!==o.length||l)?{snapshot:new rW(this.query,e.Ra,i,o,e.mutatedKeys,0===a,l,!1,!!n&&n.resumeToken.approximateByteSize()>0),wa:s}:{wa:s}}Z_(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Ra:this.Ra,fa:new r$,mutatedKeys:this.mutatedKeys,ns:!1},!1)):{wa:[]}}Sa(e){return!this.Ta.has(e)&&!!this.Ra.has(e)&&!this.Ra.get(e).hasLocalMutations}pa(e){e&&(e.addedDocuments.forEach(e=>this.Ta=this.Ta.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Ta=this.Ta.delete(e)),this.current=e.current)}ya(){if(!this.current)return[];let e=this.da;this.da=tP(),this.Ra.forEach(e=>{this.Sa(e.key)&&(this.da=this.da.add(e.key))});let t=[];return e.forEach(e=>{this.da.has(e)||t.push(new r4(e))}),this.da.forEach(n=>{e.has(n)||t.push(new r2(n))}),t}ba(e){this.Ta=e.Ts,this.da=tP();let t=this.ma(e.documents);return this.applyChanges(t,!0)}Da(){return rW.fromInitialDocuments(this.query,this.Ra,this.mutatedKeys,0===this.Ea,this.hasCachedResults)}}class r9{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class r3{constructor(e){this.key=e,this.va=!1}}class r6{constructor(e,t,n,r,i,o){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.Ca={},this.Fa=new tb(e=>tg(e),tm),this.Ma=new Map,this.xa=new Set,this.Oa=new ep(en.comparator),this.Na=new Map,this.La=new nz,this.Ba={},this.ka=new Map,this.qa=nD.kn(),this.onlineState="Unknown",this.Qa=void 0}get isPrimaryClient(){return!0===this.Qa}}async function r8(e,t,n=!0){let r;let i=i_(e),o=i.Fa.get(t);return o?(i.sharedClientState.addLocalQueryTarget(o.targetId),r=o.view.Da()):r=await ie(i,t,n,!0),r}async function r7(e,t){let n=i_(e);await ie(n,t,!0,!1)}async function ie(e,t,n,r){var i,o;let s;let a=await (i=e.localStore,o=td(t),i.persistence.runTransaction("Allocate target","readwrite",e=>{let t;return i.Ur.getTargetData(e,o).next(n=>n?(t=n,ea.resolve(t)):i.Ur.allocateTargetId(e).next(n=>(t=new nO(o,n,"TargetPurposeListen",e.currentSequenceNumber),i.Ur.addTargetData(e,t).next(()=>t))))}).then(e=>{let t=i.os.get(e.targetId);return(null===t||e.snapshotVersion.compareTo(t.snapshotVersion)>0)&&(i.os=i.os.insert(e.targetId,e),i._s.set(o,e.targetId)),e})),l=a.targetId,c=e.sharedClientState.addLocalQueryTarget(l,n);return r&&(s=await it(e,t,l,"current"===c,a.resumeToken)),e.isPrimaryClient&&n&&ry(e.remoteStore,a),s}async function it(e,t,n,r,i){e.Ka=(t,n,r)=>(async function(e,t,n,r){let i=t.view.ma(n);i.ns&&(i=await n3(e.localStore,t.query,!1).then(({documents:e})=>t.view.ma(e,i)));let o=r&&r.targetChanges.get(t.targetId),s=r&&null!=r.targetMismatches.get(t.targetId),a=t.view.applyChanges(i,e.isPrimaryClient,o,s);return ig(e,t.targetId,a.wa),a.snapshot})(e,t,n,r);let o=await n3(e.localStore,t,!0),s=new r5(t,o.Ts),a=s.ma(o.documents),l=nr.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),c=s.applyChanges(a,e.isPrimaryClient,l);ig(e,n,c.wa);let u=new r9(t,n,s);return e.Fa.set(t,u),e.Ma.has(n)?e.Ma.get(n).push(t):e.Ma.set(n,[t]),c.snapshot}async function ir(e,t,n){let r=e.Fa.get(t),i=e.Ma.get(r.targetId);if(i.length>1)return e.Ma.set(r.targetId,i.filter(e=>!tm(e,t))),void e.Fa.delete(t);e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(r.targetId),e.sharedClientState.isActiveQueryTarget(r.targetId)||await n9(e.localStore,r.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(r.targetId),n&&rw(e.remoteStore,r.targetId),ip(e,r.targetId)}).catch(es)):(ip(e,r.targetId),await n9(e.localStore,r.targetId,!0))}async function ii(e,t){let n=e.Fa.get(t),r=e.Ma.get(n.targetId);e.isPrimaryClient&&1===r.length&&(e.sharedClientState.removeLocalQueryTarget(n.targetId),rw(e.remoteStore,n.targetId))}async function io(e,t,n){var r;let i=(e.remoteStore.remoteSyncer.applySuccessfulWrite=ic.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=iu.bind(null,e),e);try{let e;let o=await function(e,t){let n,r;let i=Z.now(),o=t.reduce((e,t)=>e.add(t.key),tP());return e.persistence.runTransaction("Locally write mutations","readwrite",s=>{let a=t_,l=tP();return e.cs.getEntries(s,o).next(e=>{(a=e).forEach((e,t)=>{t.isValidDocument()||(l=l.add(e))})}).next(()=>e.localDocuments.getOverlayedDocuments(s,a)).next(r=>{n=r;let o=[];for(let e of t){let t=function(e,t){let n=null;for(let r of e.fieldTransforms){let e=t.data.field(r.field),i=tM(r.transform,e||null);null!=i&&(null===n&&(n=eG.empty()),n.set(r.field,i))}return n||null}(e,n.get(e.key).overlayedDocument);null!=t&&o.push(new tZ(e.key,t,function e(t){let n=[];return ed(t.fields,(t,r)=>{let i=new et([t]);if(ez(r)){let t=e(r.mapValue).fields;if(0===t.length)n.push(i);else for(let e of t)n.push(i.child(e))}else n.push(i)}),new ew(n)}(t.value.mapValue),tq.exists(!0)))}return e.mutationQueue.addMutationBatch(s,i,o,t)}).next(t=>{r=t;let i=t.applyToLocalDocumentSet(n,l);return e.documentOverlayCache.saveOverlays(s,t.batchId,i)})}).then(()=>({batchId:r.batchId,changes:tE(n)}))}(i.localStore,t);i.sharedClientState.addPendingMutation(o.batchId),r=o.batchId,(e=i.Ba[i.currentUser.toKey()])||(e=new ep(G)),e=e.insert(r,n),i.Ba[i.currentUser.toKey()]=e,await iy(i,o.changes),await rO(i.remoteStore)}catch(t){let e=rq(t,"Failed to persist write");n.reject(e)}}async function is(e,t){try{let n=await function(e,t){let n=t.snapshotVersion,r=e.os;return e.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{var o;let s,a;let l=e.cs.newChangeBuffer({trackRemovals:!0});r=e.os;let c=[];t.targetChanges.forEach((o,s)=>{var a;let l=r.get(s);if(!l)return;c.push(e.Ur.removeMatchingKeys(i,o.removedDocuments,s).next(()=>e.Ur.addMatchingKeys(i,o.addedDocuments,s)));let u=l.withSequenceNumber(i.currentSequenceNumber);null!==t.targetMismatches.get(s)?u=u.withResumeToken(e_.EMPTY_BYTE_STRING,X.min()).withLastLimboFreeSnapshotVersion(X.min()):o.resumeToken.approximateByteSize()>0&&(u=u.withResumeToken(o.resumeToken,n)),r=r.insert(s,u),a=u,(0===l.resumeToken.approximateByteSize()||a.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||o.addedDocuments.size+o.modifiedDocuments.size+o.removedDocuments.size>0)&&c.push(e.Ur.updateTargetData(i,u))});let u=t_,h=tP();if(t.documentUpdates.forEach(n=>{t.resolvedLimboDocuments.has(n)&&c.push(e.persistence.referenceDelegate.updateLimboDocument(i,n))}),c.push((o=t.documentUpdates,s=tP(),a=tP(),o.forEach(e=>s=s.add(e)),l.getEntries(i,s).next(e=>{let t=t_;return o.forEach((n,r)=>{let i=e.get(n);r.isFoundDocument()!==i.isFoundDocument()&&(a=a.add(n)),r.isNoDocument()&&r.version.isEqual(X.min())?(l.removeEntry(n,r.readTime),t=t.insert(n,r)):!i.isValidDocument()||r.version.compareTo(i.version)>0||0===r.version.compareTo(i.version)&&i.hasPendingWrites?(l.addEntry(r),t=t.insert(n,r)):O("LocalStore","Ignoring outdated watch update for ",n,". Current version:",i.version," Watch version:",r.version)}),{Ps:t,Is:a}})).next(e=>{u=e.Ps,h=e.Is})),!n.isEqual(X.min())){let t=e.Ur.getLastRemoteSnapshotVersion(i).next(t=>e.Ur.setTargetsMetadata(i,i.currentSequenceNumber,n));c.push(t)}return ea.waitFor(c).next(()=>l.apply(i)).next(()=>e.localDocuments.getLocalViewOfDocuments(i,u,h)).next(()=>u)}).then(t=>(e.os=r,t))}(e.localStore,t);t.targetChanges.forEach((t,n)=>{let r=e.Na.get(n);r&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||L(),t.addedDocuments.size>0?r.va=!0:t.modifiedDocuments.size>0?r.va||L():t.removedDocuments.size>0&&(r.va||L(),r.va=!1))}),await iy(e,n,t)}catch(e){await es(e)}}function ia(e,t,n){var r;if(e.isPrimaryClient&&0===n||!e.isPrimaryClient&&1===n){let n;let i=[];e.Fa.forEach((e,n)=>{let r=n.view.Z_(t);r.snapshot&&i.push(r.snapshot)}),(r=e.eventManager).onlineState=t,n=!1,r.queries.forEach((e,r)=>{for(let e of r.j_)e.Z_(t)&&(n=!0)}),n&&r0(r),i.length&&e.Ca.d_(i),e.onlineState=t,e.isPrimaryClient&&e.sharedClientState.setOnlineState(t)}}async function il(e,t,n){e.sharedClientState.updateQueryState(t,"rejected",n);let r=e.Na.get(t),i=r&&r.key;if(i){let n=new ep(en.comparator);n=n.insert(i,eY.newNoDocument(i,X.min()));let r=tP().add(i),o=new nn(X.min(),new Map,new ep(G),n,r);await is(e,o),e.Oa=e.Oa.remove(i),e.Na.delete(t),iv(e)}else await n9(e.localStore,t,!1).then(()=>ip(e,t,n)).catch(es)}async function ic(e,t){var n;let r=t.batch.batchId;try{let i=await (n=e.localStore).persistence.runTransaction("Acknowledge batch","readwrite-primary",e=>{let r=t.batch.keys(),i=n.cs.newChangeBuffer({trackRemovals:!0});return(function(e,t,n,r){let i=n.batch,o=i.keys(),s=ea.resolve();return o.forEach(e=>{s=s.next(()=>r.getEntry(t,e)).next(t=>{let o=n.docVersions.get(e);null!==o||L(),0>t.version.compareTo(o)&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))})}),s.next(()=>e.mutationQueue.removeMutationBatch(t,i))})(n,e,t,i).next(()=>i.apply(e)).next(()=>n.mutationQueue.performConsistencyCheck(e)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=tP();for(let n=0;n0&&(t=t.add(e.batch.mutations[n].key));return t}(t))).next(()=>n.localDocuments.getDocuments(e,r))});id(e,r,null),ih(e,r),e.sharedClientState.updateMutationState(r,"acknowledged"),await iy(e,i)}catch(e){await es(e)}}async function iu(e,t,n){var r;try{let i=await (r=e.localStore).persistence.runTransaction("Reject batch","readwrite-primary",e=>{let n;return r.mutationQueue.lookupMutationBatch(e,t).next(t=>(null!==t||L(),n=t.keys(),r.mutationQueue.removeMutationBatch(e,t))).next(()=>r.mutationQueue.performConsistencyCheck(e)).next(()=>r.documentOverlayCache.removeOverlaysForBatchId(e,n,t)).next(()=>r.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,n)).next(()=>r.localDocuments.getDocuments(e,n))});id(e,t,n),ih(e,t),e.sharedClientState.updateMutationState(t,"rejected",n),await iy(e,i)}catch(e){await es(e)}}function ih(e,t){(e.ka.get(t)||[]).forEach(e=>{e.resolve()}),e.ka.delete(t)}function id(e,t,n){let r=e.Ba[e.currentUser.toKey()];if(r){let i=r.get(t);i&&(n?i.reject(n):i.resolve(),r=r.remove(t)),e.Ba[e.currentUser.toKey()]=r}}function ip(e,t,n=null){for(let r of(e.sharedClientState.removeLocalQueryTarget(t),e.Ma.get(t)))e.Fa.delete(r),n&&e.Ca.$a(r,n);e.Ma.delete(t),e.isPrimaryClient&&e.La.gr(t).forEach(t=>{e.La.containsKey(t)||im(e,t)})}function im(e,t){e.xa.delete(t.path.canonicalString());let n=e.Oa.get(t);null!==n&&(rw(e.remoteStore,n),e.Oa=e.Oa.remove(t),e.Na.delete(n),iv(e))}function ig(e,t,n){for(let r of n)r instanceof r2?(e.La.addReference(r.key,t),function(e,t){let n=t.key,r=n.path.canonicalString();e.Oa.get(n)||e.xa.has(r)||(O("SyncEngine","New document in limbo: "+n),e.xa.add(r),iv(e))}(e,r)):r instanceof r4?(O("SyncEngine","Document no longer in limbo: "+r.key),e.La.removeReference(r.key,t),e.La.containsKey(r.key)||im(e,r.key)):L()}function iv(e){for(;e.xa.size>0&&e.Oa.size{o.push(e.Ka(a,t,n).then(t=>{var o;if((t||n)&&e.isPrimaryClient){let r=t?!t.fromCache:null===(o=null==n?void 0:n.targetChanges.get(a.targetId))||void 0===o?void 0:o.current;e.sharedClientState.updateQueryState(a.targetId,r?"current":"not-current")}if(t){r.push(t);let e=nQ.Wi(a.targetId,t);i.push(e)}}))}),await Promise.all(o),e.Ca.d_(r),await async function(e,t){try{await e.persistence.runTransaction("notifyLocalViewChanges","readwrite",n=>ea.forEach(t,t=>ea.forEach(t.$i,r=>e.persistence.referenceDelegate.addReference(n,t.targetId,r)).next(()=>ea.forEach(t.Ui,r=>e.persistence.referenceDelegate.removeReference(n,t.targetId,r)))))}catch(e){if(!el(e))throw e;O("LocalStore","Failed to update sequence numbers: "+e)}for(let n of t){let t=n.targetId;if(!n.fromCache){let n=e.os.get(t),r=n.snapshotVersion,i=n.withLastLimboFreeSnapshotVersion(r);e.os=e.os.insert(t,i)}}}(e.localStore,i))}async function iw(e,t){var n;if(!e.currentUser.isEqual(t)){O("SyncEngine","User change. New user:",t.toKey());let r=await n4(e.localStore,t);e.currentUser=t,n="'waitForPendingWrites' promise is rejected due to a user change.",e.ka.forEach(e=>{e.forEach(e=>{e.reject(new D(N.CANCELLED,n))})}),e.ka.clear(),e.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await iy(e,r.hs)}}function ib(e,t){let n=e.Na.get(t);if(n&&n.va)return tP().add(n.key);{let n=tP(),r=e.Ma.get(t);if(!r)return n;for(let t of r){let r=e.Fa.get(t);n=n.unionWith(r.view.Va)}return n}}function i_(e){return e.remoteStore.remoteSyncer.applyRemoteEvent=is.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=ib.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=il.bind(null,e),e.Ca.d_=rJ.bind(null,e.eventManager),e.Ca.$a=rQ.bind(null,e.eventManager),e}class iS{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=rl(e.databaseInfo.databaseId),this.sharedClientState=this.Wa(e),this.persistence=this.Ga(e),await this.persistence.start(),this.localStore=this.za(e),this.gcScheduler=this.ja(e,this.localStore),this.indexBackfillerScheduler=this.Ha(e,this.localStore)}ja(e,t){return null}Ha(e,t){return null}za(e){var t;return t=this.persistence,new n2(t,new n1,e.initialUser,this.serializer)}Ga(e){return new nZ(nJ.Zr,this.serializer)}Wa(e){return new n8}async terminate(){var e,t;null===(e=this.gcScheduler)||void 0===e||e.stop(),null===(t=this.indexBackfillerScheduler)||void 0===t||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}iS.provider={build:()=>new iS};class iC{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>ia(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=iw.bind(null,this.syncEngine),await rF(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new rG}createDatastore(e){let t=rl(e.databaseInfo.databaseId),n=new rs(e.databaseInfo);return new rf(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){var t;return t=this.localStore,new rm(t,this.datastore,e.asyncQueue,e=>ia(this.syncEngine,e,0),re.D()?new re:new n7)}createSyncEngine(e,t){return function(e,t,n,r,i,o,s){let a=new r6(e,t,n,r,i,o);return s&&(a.Qa=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(e){O("RemoteStore","RemoteStore shutting down."),e.L_.add(5),await rv(e),e.k_.shutdown(),e.q_.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate(),null===(t=this.eventManager)||void 0===t||t.terminate()}}iC.provider={build:()=>new iC};class iE{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ya(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ya(this.observer.error,e):R("Uncaught Error in snapshot listener:",e.toString()))}Za(){this.muted=!0}Ya(e,t){setTimeout(()=>{this.muted||e(t)},0)}}class ix{constructor(e,t,n,r,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=I.UNAUTHENTICATED,this.clientId=K.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(n,async e=>{O("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(n,e=>(O("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();let e=new V;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){let t=rq(n,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function iT(e,t){e.asyncQueue.verifyOperationInProgress(),O("FirestoreClient","Initializing OfflineComponentProvider");let n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async e=>{r.isEqual(e)||(await n4(t.localStore,e),r=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function iI(e,t){e.asyncQueue.verifyOperationInProgress();let n=await iP(e);O("FirestoreClient","Initializing OnlineComponentProvider"),await t.initialize(n,e.configuration),e.setCredentialChangeListener(e=>rV(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,n)=>rV(t.remoteStore,n)),e._onlineComponents=t}async function iP(e){if(!e._offlineComponents){if(e._uninitializedComponentsProvider){O("FirestoreClient","Using user provided OfflineComponentProvider");try{await iT(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===N.FAILED_PRECONDITION||t.code===N.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;M("Error using user provided cache. Falling back to memory cache: "+t),await iT(e,new iS)}}else O("FirestoreClient","Using default OfflineComponentProvider"),await iT(e,new iS)}return e._offlineComponents}async function iA(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(O("FirestoreClient","Using user provided OnlineComponentProvider"),await iI(e,e._uninitializedComponentsProvider._online)):(O("FirestoreClient","Using default OnlineComponentProvider"),await iI(e,new iC))),e._onlineComponents}async function ik(e){let t=await iA(e),n=t.eventManager;return n.onListen=r8.bind(null,t.syncEngine),n.onUnlisten=ir.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=r7.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=ii.bind(null,t.syncEngine),n}function iO(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}let iR=new Map;function iM(e,t,n){if(!n)throw new D(N.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function ij(e){if(!en.isDocumentKey(e))throw new D(N.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function iL(e){if(en.isDocumentKey(e))throw new D(N.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function iN(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let n=(t=e).constructor?t.constructor.name:null;return n?`a custom ${n} object`:"an object"}}return"function"==typeof e?"a function":L()}function iD(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new D(N.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let n=iN(e);throw new D(N.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}class iV{constructor(e){var t,n;if(void 0===e.host){if(void 0!==e.ssl)throw new D(N.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new D(N.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new D(N.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=iO(null!==(n=e.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new D(N.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new D(N.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new D(N.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,n;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&&(t=this.experimentalLongPollingOptions,n=e.experimentalLongPollingOptions,t.timeoutSeconds===n.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class iF{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new iV({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new D(N.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return"notTerminated"!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new D(N.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 iV(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new B;switch(e.type){case"firstParty":return new z(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new D(N.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return"notTerminated"===this._terminateTask&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){"notTerminated"===this._terminateTask?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=iR.get(e);t&&(O("ComponentProvider","Removing Datastore"),iR.delete(e),t.terminate())}(this),Promise.resolve()}}class iB{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new iB(this.firestore,e,this._query)}}class iU{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new iH(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new iU(this.firestore,e,this._key)}}class iH extends iB{constructor(e,t,n){super(e,t,new tl(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new iU(this.firestore,null,new en(e))}withConverter(e){return new iH(this.firestore,e,this._path)}}function iq(e,t,...n){if(e=(0,b.m9)(e),iM("collection","path",t),e instanceof iF){let r=Q.fromString(t,...n);return iL(r),new iH(e,null,r)}{if(!(e instanceof iU||e instanceof iH))throw new D(N.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=e._path.child(Q.fromString(t,...n));return iL(r),new iH(e.firestore,null,r)}}function iz(e,t,...n){if(e=(0,b.m9)(e),1==arguments.length&&(t=K.newId()),iM("doc","path",t),e instanceof iF){let r=Q.fromString(t,...n);return ij(r),new iU(e,null,new en(r))}{if(!(e instanceof iU||e instanceof iH))throw new D(N.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=e._path.child(Q.fromString(t,...n));return ij(r),new iU(e.firestore,e instanceof iH?e.converter:null,new en(r))}}class i${constructor(e=Promise.resolve()){this.Pu=[],this.Iu=!1,this.Tu=[],this.Eu=null,this.du=!1,this.Au=!1,this.Ru=[],this.t_=new rc(this,"async_queue_retry"),this.Vu=()=>{let e=ra();e&&O("AsyncQueue","Visibility state changed to "+e.visibilityState),this.t_.jo()},this.mu=e;let t=ra();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.Vu)}get isShuttingDown(){return this.Iu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.fu(),this.gu(e)}enterRestrictedMode(e){if(!this.Iu){this.Iu=!0,this.Au=e||!1;let t=ra();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Vu)}}enqueue(e){if(this.fu(),this.Iu)return new Promise(()=>{});let t=new V;return this.gu(()=>this.Iu&&this.Au?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Pu.push(e),this.pu()))}async pu(){if(0!==this.Pu.length){try{await this.Pu[0](),this.Pu.shift(),this.t_.reset()}catch(e){if(!el(e))throw e;O("AsyncQueue","Operation failed with retryable error: "+e)}this.Pu.length>0&&this.t_.Go(()=>this.pu())}}gu(e){let t=this.mu.then(()=>(this.du=!0,e().catch(e=>{let t;throw this.Eu=e,this.du=!1,R("INTERNAL UNHANDLED ERROR: ",(t=e.message||"",e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t)),e}).then(e=>(this.du=!1,e))));return this.mu=t,t}enqueueAfterDelay(e,t,n){this.fu(),this.Ru.indexOf(e)>-1&&(t=0);let r=rH.createAndSchedule(this,e,t,n,e=>this.yu(e));return this.Tu.push(r),r}fu(){this.Eu&&L()}verifyOperationInProgress(){}async wu(){let e;do e=this.mu,await e;while(e!==this.mu)}Su(e){for(let t of this.Tu)if(t.timerId===e)return!0;return!1}bu(e){return this.wu().then(()=>{for(let t of(this.Tu.sort((e,t)=>e.targetTimeMs-t.targetTimeMs),this.Tu))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.wu()})}Du(e){this.Ru.push(e)}yu(e){let t=this.Tu.indexOf(e);this.Tu.splice(t,1)}}class iW extends iF{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new i$,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){let e=this._firestoreClient.terminate();this._queue=new i$(e),this._firestoreClient=void 0,await e}}}function iK(e,t){let n="object"==typeof e?e:(0,v.Mq)(),r=(0,v.qX)(n,"firestore").getImmediate({identifier:"string"==typeof e?e:t||"(default)"});if(!r._initialized){let e=(0,b.P0)("firestore");e&&function(e,t,n,r={}){var i;let o=(e=iD(e,iF))._getSettings(),s=`${t}:${n}`;if("firestore.googleapis.com"!==o.host&&o.host!==s&&M("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),r.mockUserToken){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=I.MOCK_USER;else{t=(0,b.Sg)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let o=r.mockUserToken.sub||r.mockUserToken.user_id;if(!o)throw new D(N.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new I(o)}e._authCredentials=new U(new F(t,n))}}(r,...e)}return r}function iG(e){if(e._terminated)throw new D(N.FAILED_PRECONDITION,"The client has already been terminated.");return e._firestoreClient||function(e){var t,n,r,i;let o=e._freezeSettings(),s=(i=e._databaseId,new eA(i,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,o.host,o.ssl,o.experimentalForceLongPolling,o.experimentalAutoDetectLongPolling,iO(o.experimentalLongPollingOptions),o.useFetchStreams));e._componentsProvider||(null===(n=o.localCache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=o.localCache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._componentsProvider={_offline:o.localCache._offlineComponentProvider,_online:o.localCache._onlineComponentProvider}),e._firestoreClient=new ix(e._authCredentials,e._appCheckCredentials,e._queue,s,e._componentsProvider&&function(e){let t=null==e?void 0:e._online.build();return{_offline:null==e?void 0:e._offline.build(t),_online:t}}(e._componentsProvider))}(e),e._firestoreClient}class iY{constructor(e){this._byteString=e}static fromBase64String(e){try{return new iY(e_.fromBase64String(e))}catch(e){throw new D(N.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new iY(e_.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class iZ{constructor(...e){for(let t=0;t90)throw new D(N.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new D(N.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return G(this._lat,e._lat)||G(this._long,e._long)}}class iQ{constructor(e){this._values=(e||[]).map(e=>e)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let n=0;ne.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}vu(){if(this.path)for(let e=0;ee.isEqual(t))})(e,i)||e.push(i)}s=new ew(e),a=l.fieldTransforms.filter(e=>s.covers(e.field))}else s=null,a=l.fieldTransforms;return new i1(new eG(c),s,a)}function i6(e,t){if(i7(e=(0,b.m9)(e)))return oe("Unsupported field value:",t,e),i8(e,t);if(e instanceof iX)return function(e,t){if(!i2(t.Cu))throw t.Bu(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.Bu(`${e._methodName}() is not currently supported inside arrays`);let 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.xu&&4!==t.Cu)throw t.Bu("Nested arrays are not supported");return function(e,t){let n=[],r=0;for(let i of e){let e=i6(i,t.Lu(r));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){var n,r,i;if(null===(e=(0,b.m9)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return n=t.serializer,"number"==typeof(i=r=e)&&Number.isInteger(i)&&!eu(i)&&i<=Number.MAX_SAFE_INTEGER&&i>=Number.MIN_SAFE_INTEGER?tO(r):tk(n,r);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let n=Z.fromDate(e);return{timestampValue:ng(t.serializer,n)}}if(e instanceof Z){let n=new Z(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:ng(t.serializer,n)}}if(e instanceof iJ)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof iY)return{bytesValue:nv(t.serializer,e._byteString)};if(e instanceof iU){let n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.Bu(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:nw(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof iQ)return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:e.toArray().map(e=>{if("number"!=typeof e)throw t.Bu("VectorValues must only contain numeric values.");return tk(t.serializer,e)})}}}}};throw t.Bu(`Unsupported field value: ${iN(e)}`)}(e,t)}function i8(e,t){let n={};return ef(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):ed(e,(e,r)=>{let i=i6(r,t.Mu(e));null!=i&&(n[e]=i)}),{mapValue:{fields:n}}}function i7(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Z||e instanceof iJ||e instanceof iY||e instanceof iU||e instanceof iX||e instanceof iQ)}function oe(e,t,n){if(!i7(n)||!("object"==typeof n&&null!==n&&(Object.getPrototypeOf(n)===Object.prototype||null===Object.getPrototypeOf(n)))){let r=iN(n);throw"an object"===r?t.Bu(e+" a custom object"):t.Bu(e+" "+r)}}let ot=RegExp("[~\\*/\\[\\]]");function on(e,t,n){if(t.search(ot)>=0)throw or(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new iZ(...t.split("."))._internalPath}catch(r){throw or(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function or(e,t,n,r,i){let o=r&&!r.isEmpty(),s=void 0!==i,a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${r}`),s&&(l+=` in document ${i}`),l+=")"),new D(N.INVALID_ARGUMENT,a+e+l)}class oi{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new iU(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new oo(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(os("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class oo extends oi{data(){return super.data()}}function os(e,t){return"string"==typeof t?on(e,t):t instanceof iZ?t._internalPath:t._delegate._internalPath}class oa{}class ol extends oa{}function oc(e,t,...n){let r=[];for(let i of(t instanceof oa&&r.push(t),function(e){let t=e.filter(e=>e instanceof od).length,n=e.filter(e=>e instanceof ou).length;if(t>1||t>0&&n>0)throw new D(N.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r=r.concat(n)),r))e=i._apply(e);return e}class ou extends ol{constructor(e,t,n){super(),this._field=e,this._op=t,this._value=n,this.type="where"}static _create(e,t,n){return new ou(e,t,n)}_apply(e){let t=this._parse(e);return om(e._query,t),new iB(e.firestore,e.converter,tf(e._query,t))}_parse(e){let t=i9(e.firestore);return function(e,t,n,r,i,o,s){let a;if(i.isKeyField()){if("array-contains"===o||"array-contains-any"===o)throw new D(N.INVALID_ARGUMENT,`Invalid Query. You can't perform '${o}' queries on documentId().`);if("in"===o||"not-in"===o){op(s,o);let t=[];for(let n of s)t.push(of(r,e,n));a={arrayValue:{values:t}}}else a=of(r,e,s)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||op(s,o),a=function(e,t,n,r=!1){return i6(n,e.Qu(r?4:3,t))}(n,t,s,"in"===o||"not-in"===o);return e1.create(i,o,a)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value)}}function oh(e,t,n){let r=os("where",e);return ou._create(r,t,n)}class od extends oa{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new od(e,t)}_parse(e){let t=this._queryConstraints.map(t=>t._parse(e)).filter(e=>e.getFilters().length>0);return 1===t.length?t[0]:e2.create(t,this._getOperator())}_apply(e){let t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){let n=e;for(let e of t.getFlattenedFilters())om(n,e),n=tf(n,e)}(e._query,t),new iB(e.firestore,e.converter,tf(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}function of(e,t,n){if("string"==typeof(n=(0,b.m9)(n))){if(""===n)throw new D(N.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!tu(t)&&-1!==n.indexOf("/"))throw new D(N.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);let r=t.path.child(Q.fromString(n));if(!en.isDocumentKey(r))throw new D(N.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return eF(e,new en(r))}if(n instanceof iU)return eF(e,n._key);throw new D(N.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${iN(n)}.`)}function op(e,t){if(!Array.isArray(e)||0===e.length)throw new D(N.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function om(e,t){let n=function(e,t){for(let n of e)for(let e of n.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==n)throw n===t.op?new D(N.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new D(N.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}class og{convertValue(e,t="none"){switch(eR(e)){case 0:return null;case 1:return e.booleanValue;case 2:return eE(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(ex(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 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw L()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let n={};return ed(e,(e,r)=>{n[e]=this.convertValue(r,t)}),n}convertVectorValue(e){var t,n,r;return new iQ(null===(r=null===(n=null===(t=e.fields)||void 0===t?void 0:t.value.arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.map(e=>eE(e.doubleValue)))}convertGeoPoint(e){return new iJ(eE(e.latitude),eE(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let n=eI(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(eP(e));default:return null}}convertTimestamp(e){let t=eC(e);return new Z(t.seconds,t.nanos)}convertDocumentKey(e,t){let n=Q.fromString(e);nk(n)||L();let r=new ek(n.get(1),n.get(3)),i=new en(n.popFirst(5));return r.isEqual(t)||R(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}function ov(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}class oy{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class ow extends oi{constructor(e,t,n,r,i,o){super(e,t,n,r,o),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new ob(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){let n=this._document.data.field(os("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class ob extends ow{data(e={}){return super.data(e)}}class o_{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new oy(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(n=>{e.call(t,new ob(this._firestore,this._userDataWriter,n.key,n,new oy(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new D(N.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map(n=>{let r=new ob(e._firestore,e._userDataWriter,n.doc.key,n.doc,new oy(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:r,oldIndex:-1,newIndex:t++}})}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let r=new ob(e._firestore,e._userDataWriter,t.doc.key,t.doc,new oy(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,o=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(o=(n=n.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return L()}}(t.type),doc:r,oldIndex:i,newIndex:o}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}class oS extends og{constructor(e){super(),this.firestore=e}convertBytes(e){return new iY(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new iU(this.firestore,null,t)}}function oC(e){e=iD(e,iB);let t=iD(e.firestore,iW),n=iG(t),r=new oS(t);return function(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new D(N.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query),(function(e,t,n={}){let r=new V;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,n,r,i){let o=new iE({next:n=>{o.Za(),t.enqueueAndForget(()=>rX(e,s)),n.fromCache&&"server"===r.source?i.reject(new D(N.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),s=new r1(n,o,{includeMetadataChanges:!0,_a:!0});return rZ(e,s)})(await ik(e),e.asyncQueue,t,n,r)),r.promise})(n,e._query).then(n=>new o_(t,r,e,n))}function oE(e,t,n){e=iD(e,iU);let r=iD(e.firestore,iW),i=ov(e.converter,t,n);return oI(r,[i3(i9(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,tq.none())])}function ox(e){return oI(iD(e.firestore,iW),[new t0(e._key,tq.none())])}function oT(e,t){let n=iD(e.firestore,iW),r=iz(e),i=ov(e.converter,t);return oI(n,[i3(i9(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,tq.exists(!1))]).then(()=>r)}function oI(e,t){return function(e,t){let n=new V;return e.asyncQueue.enqueueAndForget(async()=>io(await iA(e).then(e=>e.syncEngine),t,n)),n.promise}(iG(e),t)}new WeakMap,function(e=!0){P=v.Jn,(0,v.Xd)(new y.wA("firestore",(t,{instanceIdentifier:n,options:r})=>{let i=t.getProvider("app").getImmediate(),o=new iW(new H(t.getProvider("auth-internal")),new W(t.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new D(N.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new ek(e.options.projectId,t)}(i,n),i);return r=Object.assign({useFetchStreams:e},r),o._setSettings(r),o},"PUBLIC").setMultipleInstances(!0)),(0,v.KN)(T,"4.7.3",void 0),(0,v.KN)(T,"4.7.3","esm2017")}()},15947:function(e,t,n){"use strict";n.d(t,{oO:function(){return o}});var r=n(67294),i=n(240);function o(e=!0){let t=(0,r.useContext)(i.O);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:o,register:s}=t,a=(0,r.useId)();(0,r.useEffect)(()=>{e&&s(a)},[e]);let l=(0,r.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,l]:[!0]}},25364:function(e,t,n){"use strict";n.d(t,{p:function(){return r}});let r=(0,n(67294).createContext)({})},16014:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});let r=(0,n(67294).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},240:function(e,t,n){"use strict";n.d(t,{O:function(){return r}});let r=(0,n(67294).createContext)(null)},34221:function(e,t,n){"use strict";let r;function i(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}n.d(t,{E:function(){return og}});let o=e=>Array.isArray(e);function s(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function c(e,t,n,r){if("function"==typeof t){let[i,o]=l(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=l(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function u(e,t,n){let r=e.getProps();return c(r,t,void 0!==n?n:r.custom,e)}let h=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],d=["initial",...h];function f(e){let t;return()=>(void 0===t&&(t=e()),t)}let p=f(()=>void 0!==window.ScrollTimeline);class m{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;np()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;tt[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class g extends m{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function v(e,t){return e?e[t]||e.default||e:void 0}function y(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function w(e){return"function"==typeof e}function b(e,t){e.timeline=t,e.onfinish=null}let _=e=>Array.isArray(e)&&"number"==typeof e[0],S={linearEasing:void 0},C=function(e,t){let n=f(e);return()=>{var e;return null!==(e=S[t])&&void 0!==e?e:n()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),E=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},x=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t`cubic-bezier(${e}, ${t}, ${n}, ${r})`,I={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:T([0,.65,.55,1]),circOut:T([.55,0,1,.45]),backIn:T([.31,.01,.66,-.59]),backOut:T([.33,1.53,.69,.99])},P={x:!1,y:!1};function A(e,t){let n=function(e,t,n){if(e instanceof Element)return[e];if("string"==typeof e){let t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function k(e){return t=>{"touch"===t.pointerType||P.x||P.y||e(t)}}let O=(e,t)=>!!t&&(e===t||O(e,t.parentElement)),R=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,M=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),j=new WeakSet;function L(e){return t=>{"Enter"===t.key&&e(t)}}function N(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}let D=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=L(()=>{if(j.has(n))return;N(n,"down");let e=L(()=>{N(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>N(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function V(e){return R(e)&&!(P.x||P.y)}let F=e=>1e3*e,B=e=>e/1e3,U=e=>e,H=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],q=new Set(H),z=new Set(["width","height","top","left","right","bottom",...H]),$=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),W=e=>o(e)?e[e.length-1]||0:e,K={skipAnimations:!1,useManualTiming:!1},G=["read","resolveKeyframes","update","preRender","render","postRender"];function Y(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=G.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,i=!1,s=!1)=>{let a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:h,postRender:d}=s,f=()=>{let o=K.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(f))},p=()=>{n=!0,r=!0,i.isProcessing||e(f)};return{schedule:G.reduce((e,t)=>{let r=s[t];return e[t]=(e,t=!1,i=!1)=>(n||p(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t(void 0===r&&et.set(J.isProcessing||K.useManualTiming?J.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(ee)}};function en(e,t){-1===e.indexOf(t)&&e.push(t)}function er(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class ei{constructor(){this.subscriptions=[]}add(e){return en(this.subscriptions,e),()=>er(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i!isNaN(parseFloat(e)),es={current:void 0};class ea{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=et.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=et.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=eo(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ei);let n=this.events[e].add(t);return"change"===e?()=>{n(),Z.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return es.current&&es.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=et.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function el(e,t){return new ea(e,t)}let ec=e=>!!(e&&e.getVelocity);function eu(e,t){let n=e.getValue("willChange");if(ec(n)&&n.add)return n.add(t)}let eh=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ed="data-"+eh("framerAppearId"),ef={current:!1},ep=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function em(e,t,n,r){if(e===t&&n===r)return U;let i=t=>(function(e,t,n,r,i){let o,s;let a=0;do(o=ep(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s;while(Math.abs(o)>1e-7&&++a<12);return s})(t,0,1,e,n);return e=>0===e||1===e?e:ep(i(e),t,r)}let eg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ev=e=>t=>1-e(1-t),ey=em(.33,1.53,.69,.99),ew=ev(ey),eb=eg(ew),e_=e=>(e*=2)<1?.5*ew(e):.5*(2-Math.pow(2,-10*(e-1))),eS=e=>1-Math.sin(Math.acos(e)),eC=ev(eS),eE=eg(eS),ex=e=>/^0[^.\s]+$/u.test(e),eT=(e,t,n)=>n>t?t:n"number"==typeof e,parse:parseFloat,transform:e=>e},eP={...eI,transform:e=>eT(0,1,e)},eA={...eI,default:1},ek=e=>Math.round(1e5*e)/1e5,eO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,eR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eM=(e,t)=>n=>!!("string"==typeof n&&eR.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),ej=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,s,a]=r.match(eO);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},eL=e=>eT(0,255,e),eN={...eI,transform:e=>Math.round(eL(e))},eD={test:eM("rgb","red"),parse:ej("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+eN.transform(e)+", "+eN.transform(t)+", "+eN.transform(n)+", "+ek(eP.transform(r))+")"},eV={test:eM("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:eD.transform},eF=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),eB=eF("deg"),eU=eF("%"),eH=eF("px"),eq=eF("vh"),ez=eF("vw"),e$={...eU,parse:e=>eU.parse(e)/100,transform:e=>eU.transform(100*e)},eW={test:eM("hsl","hue"),parse:ej("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+eU.transform(ek(t))+", "+eU.transform(ek(n))+", "+ek(eP.transform(r))+")"},eK={test:e=>eD.test(e)||eV.test(e)||eW.test(e),parse:e=>eD.test(e)?eD.parse(e):eW.test(e)?eW.parse(e):eV.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eD.transform(e):eW.transform(e)},eG=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eY="number",eZ="color",eX=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eJ(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,s=t.replace(eX,e=>(eK.test(e)?(r.color.push(o),i.push(eZ),n.push(eK.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(eY),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:r,types:i}}function eQ(e){return eJ(e).values}function e0(e){let{split:t,types:n}=eJ(e),r=t.length;return e=>{let i="";for(let o=0;o"number"==typeof e?0:e,e2={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(eO))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(eG))||void 0===n?void 0:n.length)||0)>0},parse:eQ,createTransformer:e0,getAnimatableNone:function(e){let t=eQ(e);return e0(e)(t.map(e1))}},e4=new Set(["brightness","contrast","saturate","opacity"]);function e5(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(eO)||[];if(!r)return e;let i=n.replace(r,""),o=e4.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let e9=/\b([a-z-]*)\(.*?\)/gu,e3={...e2,getAnimatableNone:e=>{let t=e.match(e9);return t?t.map(e5).join(" "):e}},e6={...eI,transform:Math.round},e8={borderWidth:eH,borderTopWidth:eH,borderRightWidth:eH,borderBottomWidth:eH,borderLeftWidth:eH,borderRadius:eH,radius:eH,borderTopLeftRadius:eH,borderTopRightRadius:eH,borderBottomRightRadius:eH,borderBottomLeftRadius:eH,width:eH,maxWidth:eH,height:eH,maxHeight:eH,top:eH,right:eH,bottom:eH,left:eH,padding:eH,paddingTop:eH,paddingRight:eH,paddingBottom:eH,paddingLeft:eH,margin:eH,marginTop:eH,marginRight:eH,marginBottom:eH,marginLeft:eH,backgroundPositionX:eH,backgroundPositionY:eH,rotate:eB,rotateX:eB,rotateY:eB,rotateZ:eB,scale:eA,scaleX:eA,scaleY:eA,scaleZ:eA,skew:eB,skewX:eB,skewY:eB,distance:eH,translateX:eH,translateY:eH,translateZ:eH,x:eH,y:eH,z:eH,perspective:eH,transformPerspective:eH,opacity:eP,originX:e$,originY:e$,originZ:eH,zIndex:e6,size:eH,fillOpacity:eP,strokeOpacity:eP,numOctaves:e6},e7={...e8,color:eK,backgroundColor:eK,outlineColor:eK,fill:eK,stroke:eK,borderColor:eK,borderTopColor:eK,borderRightColor:eK,borderBottomColor:eK,borderLeftColor:eK,filter:e3,WebkitFilter:e3},te=e=>e7[e];function tt(e,t){let n=te(e);return n!==e3&&(n=e2),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let tn=new Set(["auto","none","0"]),tr=e=>e===eI||e===eH,ti=(e,t)=>parseFloat(e.split(", ")[t]),to=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return ti(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?ti(t[1],e):0}},ts=new Set(["x","y","z"]),ta=H.filter(e=>!ts.has(e)),tl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:to(4,13),y:to(5,14)};tl.translateX=tl.x,tl.translateY=tl.y;let tc=new Set,tu=!1,th=!1;function td(){if(th){let e=Array.from(tc).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return ta.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}th=!1,tu=!1,tc.forEach(e=>e.complete()),tc.clear()}function tf(){tc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(th=!0)})}class tp{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(tc.add(this),tu||(tu=!0,Z.read(tf),Z.resolveKeyframes(td))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),tg=e=>t=>"string"==typeof t&&t.startsWith(e),tv=tg("--"),ty=tg("var(--"),tw=e=>!!ty(e)&&tb.test(e.split("/*")[0].trim()),tb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,t_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tS=e=>t=>t.test(e),tC=[eI,eH,eU,eB,ez,eq,{test:e=>"auto"===e,parse:e=>e}],tE=e=>tC.find(tS(e));class tx extends tp{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}let tT=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(e2.test(e)||"0"===e)&&!e.startsWith("url(")),tI=e=>null!==e;function tP(e,{repeat:t,repeatType:n="loop"},r){let i=e.filter(tI),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}class tA{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=et.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(tf(),td()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=et.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=tT(i,t),a=tT(o,t);return U(s===a,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n{this.resolveFinishedPromise=e})}}let tk=(e,t,n)=>e+(t-e)*n;function tO(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tR(e,t){return n=>n>0?t:e}let tM=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},tj=[eV,eD,eW],tL=e=>tj.find(t=>t.test(e));function tN(e){let t=tL(e);if(U(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===eW&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=tO(a,r,e+1/3),o=tO(a,r,e),s=tO(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(n)),n}let tD=(e,t)=>{let n=tN(e),r=tN(t);if(!n||!r)return tR(e,t);let i={...n};return e=>(i.red=tM(n.red,r.red,e),i.green=tM(n.green,r.green,e),i.blue=tM(n.blue,r.blue,e),i.alpha=tk(n.alpha,r.alpha,e),eD.transform(i))},tV=(e,t)=>n=>t(e(n)),tF=(...e)=>e.reduce(tV),tB=new Set(["none","hidden"]);function tU(e,t){return n=>tk(e,t,n)}function tH(e){return"number"==typeof e?tU:"string"==typeof e?tw(e)?tR:eK.test(e)?tD:t$:Array.isArray(e)?tq:"object"==typeof e?eK.test(e)?tD:tz:tR}function tq(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tH(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}let t$=(e,t)=>{let n=e2.createTransformer(t),r=eJ(e),i=eJ(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?tB.has(e)&&!i.values.length||tB.has(t)&&!r.values.length?tB.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:tF(tq(function(e,t){var n;let r=[],i={color:0,var:0,number:0};for(let o=0;ovoid 0!==e[t])}function tQ(e=tG.visualDuration,t=tG.bounce){let n;let r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:i,restDelta:o}=r,s=r.keyframes[0],a=r.keyframes[r.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:h,duration:d,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:tG.velocity,stiffness:tG.stiffness,damping:tG.damping,mass:tG.mass,isResolvedFromDuration:!1,...e};if(!tJ(e,tX)&&tJ(e,tZ)){if(e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*eT(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:tG.mass,stiffness:r,damping:i}}else{let n=function({duration:e=tG.duration,bounce:t=tG.bounce,velocity:n=tG.velocity,mass:r=tG.mass}){let i,o;U(e<=F(tG.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=eT(tG.minDamping,tG.maxDamping,s),e=eT(tG.minDuration,tG.maxDuration,B(e)),s<1?(i=t=>{let r=t*s,i=r*e;return .001-(r-n)/tY(t,s)*Math.exp(-i)},o=t=>{let r=t*s*e,o=Math.pow(s,2)*Math.pow(t,2)*e,a=tY(Math.pow(t,2),s);return(r*n+n-o)*Math.exp(-r)*(-i(t)+.001>0?-1:1)/a}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let a=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=F(e),isNaN(a))return{stiffness:tG.stiffness,damping:tG.damping,duration:e};{let t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);(t={...t,...n,mass:tG.mass}).isResolvedFromDuration=!0}}return t}({...r,velocity:-B(r.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(c*h)),v=a-s,w=B(Math.sqrt(c/h)),b=5>Math.abs(v);if(i||(i=b?tG.restSpeed.granular:tG.restSpeed.default),o||(o=b?tG.restDelta.granular:tG.restDelta.default),g<1){let e=tY(w,g);n=t=>a-Math.exp(-g*w*t)*((m+g*w*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}else if(1===g)n=e=>a-Math.exp(-w*e)*(v+(m+w*v)*e);else{let e=w*Math.sqrt(g*g-1);n=t=>{let n=Math.exp(-g*w*t),r=Math.min(e*t,300);return a-n*((m+g*w*v)*Math.sinh(r)+e*v*Math.cosh(r))/e}}let _={calculatedDuration:p&&d||null,next:e=>{let t=n(e);if(p)l.done=e>=d;else{let r=0;g<1&&(r=0===e?F(m):tK(n,e,t));let s=Math.abs(r)<=i,c=Math.abs(a-t)<=o;l.done=s&&c}return l.value=l.done?a:t,l},toString:()=>{let e=Math.min(y(_),2e4),t=x(t=>_.next(e*t).value,e,30);return e+"ms "+t}};return _}function t0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){let h,d;let f=e[0],p={done:!1,value:f},m=e=>void 0!==a&&el,g=e=>void 0===a?l:void 0===l?a:Math.abs(a-e)-v*Math.exp(-e/r),_=e=>w+b(e),S=e=>{let t=b(e),n=_(e);p.done=Math.abs(t)<=c,p.value=p.done?w:n},C=e=>{m(p.value)&&(h=e,d=tQ({keyframes:[p.value,g(p.value)],velocity:tK(_,e,p.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return(d||void 0!==h||(t=!0,S(e),C(e)),void 0!==h&&e>=h)?d.next(e-h):(t||S(e),p)}}}let t1=em(.42,0,1,1),t2=em(0,0,.58,1),t4=em(.42,0,.58,1),t5=e=>Array.isArray(e)&&"number"!=typeof e[0],t9={linear:U,easeIn:t1,easeInOut:t4,easeOut:t2,circIn:eS,circInOut:eE,circOut:eC,backIn:ew,backInOut:eb,backOut:ey,anticipate:e_},t3=e=>{if(_(e)){U(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,n,r,i]=e;return em(t,n,r,i)}return"string"==typeof e?(U(void 0!==t9[e],`Invalid easing type '${e}'`),t9[e]):e};function t6({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){let i=t5(r)?r.map(t3):t3(r),o={done:!1,value:t[0]},s=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(U(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=function(e,t,n){let r=[],i=n||tW,o=e.length-1;for(let n=0;n{if(s&&n1)for(;rc(eT(e[0],e[o-1],t)):c}((n&&n.length===t.length?n:function(e){let t=[0];return function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=E(0,t,r);e.push(tk(n,1,i))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(i)?i:t.map(()=>i||t4).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}let t8=e=>{let t=({timestamp:t})=>e(t);return{start:()=>Z.update(t,!0),stop:()=>X(t),now:()=>J.isProcessing?J.timestamp:et.now()}},t7={decay:t0,inertia:t0,tween:t6,keyframes:t6,spring:tQ},ne=e=>e/100;class nt extends tA{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||tp;this.resolver=new o(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let t,n;let{type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=this.options,l=w(r)?r:t7[r]||t6;l!==t6&&"number"!=typeof e[0]&&(t=tF(ne,tW(e[0],e[1])),e=[0,100]);let c=l({...this.options,keyframes:e});"mirror"===s&&(n=l({...this.options,keyframes:[...e].reverse(),velocity:-a})),null===c.calculatedDuration&&(c.calculatedDuration=y(c));let{calculatedDuration:u}=c,h=u+o;return{generator:c,mirroredGenerator:n,mapPercentToKeyframes:t,calculatedDuration:u,resolvedDuration:h,totalDuration:h*(i+1)-o}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return i.next(0);let{delay:h,repeat:d,repeatType:f,repeatDelay:p,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,w=i;if(d){let e=Math.min(this.currentTime,c)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===f?(n=1-n,p&&(n-=p/u)):"mirror"===f&&(w=o)),y=eT(0,1,n)*u}let b=v?{done:!1,value:a[0]}:w.next(y);s&&(b.value=s(b.value));let{done:_}=b;v||null===l||(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);let S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&_);return S&&void 0!==r&&(b.value=tP(a,this.options,r)),m&&m(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?B(e.calculatedDuration):0}get time(){return B(this.currentTime)}set time(e){e=F(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=B(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=t8,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let nn=new Set(["opacity","clipPath","filter","transform"]),nr=f(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ni={anticipate:e_,backInOut:eb,circInOut:eE};class no extends tA{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new tx(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:i,ease:o,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if("string"==typeof o&&C()&&o in ni&&(o=ni[o]),w((n=this.options).type)||"spring"===n.type||!function e(t){return!!("function"==typeof t&&C()||!t||"string"==typeof t&&(t in I||C())||_(t)||Array.isArray(t)&&t.every(e))}(n.ease)){let{onComplete:t,onUpdate:n,motionValue:a,element:l,...c}=this.options,u=function(e,t){let n=new nt({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],o=0;for(;!r.done&&o<2e4;)i.push((r=n.sample(o)).value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),r=u.duration,i=u.times,o=u.ease,s="keyframes"}let u=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){let c={[t]:n};l&&(c.offset=l);let u=function e(t,n){if(t)return"function"==typeof t&&C()?x(t,n):_(t)?T(t):Array.isArray(t)?t.map(t=>e(t,n)||I.easeOut):I[t]}(a,i);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:i,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(b(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:n}=this.options;a.set(tP(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:i,type:s,ease:o,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return B(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return B(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=F(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return U;let{animation:n}=t;b(n,e)}else this.pendingTimeline=e;return U}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new nt({...c,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),h=F(this.time);e.setWithVelocity(u.sample(h-10).value,u.sample(h).value,10)}let{onStop:a}=this.options;a&&a(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:a,transformTemplate:l}=t.owner.getProps();return nr()&&n&&nn.has(n)&&!a&&!l&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}let ns={type:"spring",stiffness:500,damping:25,restSpeed:10},na=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),nl={type:"keyframes",duration:.8},nc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nu=(e,{keyframes:t})=>t.length>2?nl:q.has(e)?e.startsWith("scale")?na(t[1]):ns:nc,nh=(e,t,n,r={},i,o)=>s=>{let a=v(r,e)||{},l=a.delay||r.delay||0,{elapsed:c=0}=r;c-=F(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(a)&&(u={...u,...nu(e,u)}),u.duration&&(u.duration=F(u.duration)),u.repeatDelay&&(u.repeatDelay=F(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(u.duration=0,0!==u.delay||(h=!0)),(ef.current||K.skipAnimations)&&(h=!0,u.duration=0,u.delay=0),h&&!o&&void 0!==t.get()){let e=tP(u.keyframes,a);if(void 0!==e)return Z.update(()=>{u.onUpdate(e),u.onComplete()}),new g([])}return!o&&no.supports(u)?new no(u):new nt(u)};function nd(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);let c=[],h=i&&e.animationState&&e.animationState.getState()[i];for(let t in l){let r=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),i=l[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let a={delay:n,...v(s||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=e.props[ed];if(n){let e=window.MotionHandoffAnimation(n,t,Z);null!==e&&(a.startTime=e,u=!0)}}eu(e,t),r.start(nh(t,r,i,e.shouldReduceMotion&&z.has(t)?{type:!1}:a,e,u));let d=r.animation;d&&c.push(d)}return a&&Promise.all(c).then(()=>{Z.update(()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=u(e,t)||{};for(let t in i={...i,...n}){let n=W(i[t]);e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,el(n))}}(e,a)})}),c}function nf(e,t,n={}){var r;let i=u(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);let s=i?()=>Promise.all(nd(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){let s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(np).forEach((e,r)=>{e.notify("AnimationStart",t),s.push(nf(e,t,{...o,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(!l)return Promise.all([s(),a(n.delay)]);{let[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}}function np(e,t){return e.sortNodePosition(t)}let nm=d.length,ng=[...h].reverse(),nv=h.length;function ny(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nw(){return{animate:ny(!0),whileInView:ny(),whileHover:ny(),whileTap:ny(),whileDrag:ny(),whileFocus:ny(),exit:ny()}}class nb{constructor(e){this.isMounted=!1,this.node=e}update(){}}class n_ extends nb{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>nf(e,t,n)));else if("string"==typeof t)r=nf(e,t,n);else{let i="function"==typeof t?u(e,t,n.custom):t;r=Promise.all(nd(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=nw(),r=!0,l=t=>(n,r)=>{var i;let o=u(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){let{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function c(c){let{props:u}=e,h=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;eg&&b,x=!1,T=Array.isArray(w)?w:[w],I=T.reduce(l(d),{});!1===_&&(I={});let{prevResolvedValues:P={}}=y,A={...P,...I},k=t=>{E=!0,p.has(t)&&(x=!0,p.delete(t)),y.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in A){let t=I[e],n=P[e];if(!m.hasOwnProperty(e))(o(t)&&o(n)?s(t,n):t===n)?void 0!==t&&p.has(e)?k(e):y.protectedKeys[e]=!0:null!=t?k(e):p.add(e)}y.prevProp=w,y.prevResolvedValues=I,y.isActive&&(m={...m,...I}),r&&e.blockInitialAnimation&&(E=!1);let O=!(S&&C)||x;E&&O&&f.push(...T.map(e=>({animation:e,options:{type:d}})))}if(p.size){let t={};p.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null}),f.push({animation:t})}let y=!!f.length;return r&&(!1===u.initial||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}return{animateChanges:c,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;let o=c(t);for(let e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=nw(),r=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();i(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}let nS=0;class nC extends nb{constructor(){super(...arguments),this.id=nS++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}function nE(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nx(e){return{point:{x:e.pageX,y:e.pageY}}}let nT=e=>t=>R(t)&&e(t,nx(t));function nI(e,t,n,r){return nE(e,t,nT(n),r)}let nP=(e,t)=>Math.abs(e-t);class nA{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=nR(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(nP(e.x,t.x)**2+nP(e.y,t.y)**2)>=3);if(!r&&!i)return;let{point:o}=n,{timestamp:s}=J;this.history.push({...o,timestamp:s});let{onStart:a,onMove:l}=this.handlers;r||(a&&a(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=nk(t,this.transformPagePoint),Z.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=nR("pointercancel"===e.type?this.lastMoveEventInfo:nk(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!R(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let o=nk(nx(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=J;this.history=[{...s,timestamp:a}];let{onSessionStart:l}=t;l&&l(e,nR(o,this.history)),this.removeListeners=tF(nI(this.contextWindow,"pointermove",this.handlePointerMove),nI(this.contextWindow,"pointerup",this.handlePointerUp),nI(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),X(this.updatePoint)}}function nk(e,t){return t?{point:t(e.point)}:e}function nO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nR({point:e},t){return{point:e,delta:nO(e,nM(t)),offset:nO(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=nM(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F(.1)));)n--;if(!r)return{x:0,y:0};let o=B(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};let s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,0)}}function nM(e){return e[e.length-1]}function nj(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function nL(e){return e.max-e.min}function nN(e,t,n,r=.5){e.origin=r,e.originPoint=tk(t.min,t.max,e.origin),e.scale=nL(n)/nL(t),e.translate=tk(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function nD(e,t,n,r){nN(e.x,t.x,n.x,r?r.originX:void 0),nN(e.y,t.y,n.y,r?r.originY:void 0)}function nV(e,t,n){e.min=n.min+t.min,e.max=e.min+nL(t)}function nF(e,t,n){e.min=t.min-n.min,e.max=e.min+nL(t)}function nB(e,t,n){nF(e.x,t.x,n.x),nF(e.y,t.y,n.y)}function nU(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function nH(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min({translate:0,scale:1,origin:0,originPoint:0}),nW=()=>({x:n$(),y:n$()}),nK=()=>({min:0,max:0}),nG=()=>({x:nK(),y:nK()});function nY(e){return[e("x"),e("y")]}function nZ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nX(e){return void 0===e||1===e}function nJ({scale:e,scaleX:t,scaleY:n}){return!nX(e)||!nX(t)||!nX(n)}function nQ(e){return nJ(e)||n0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function n0(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function n1(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function n2(e,t=0,n=1,r,i){e.min=n1(e.min,t,n,r,i),e.max=n1(e.max,t,n,r,i)}function n4(e,{x:t,y:n}){n2(e.x,t.translate,t.scale,t.originPoint),n2(e.y,n.translate,n.scale,n.originPoint)}function n5(e,t){e.min=e.min+t,e.max=e.max+t}function n9(e,t,n,r,i=.5){let o=tk(e.min,e.max,i);n2(e,t,n,o,r)}function n3(e,t){n9(e.x,t.x,t.scaleX,t.scale,t.originX),n9(e.y,t.y,t.scaleY,t.scale,t.originY)}function n6(e,t){return nZ(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let n8=({current:e})=>e?e.ownerDocument.defaultView:null,n7=new WeakMap;class re{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nG(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let{dragSnapToOrigin:r}=this.getProps();this.panSession=new nA(e,{onSessionStart:e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(nx(e).point)},onStart:(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===n||"y"===n?P[n]?null:(P[n]=!0,()=>{P[n]=!1}):P.x||P.y?null:(P.x=P.y=!0,()=>{P.x=P.y=!1}),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nY(e=>{let t=this.getAxisMotionValue(e).get()||0;if(eU.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=nL(r);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),i&&Z.postRender(()=>i(e,t)),eu(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>nY(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:n8(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&Z.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!rt(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?tk(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&nj(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:nU(e.x,n,i),y:nU(e.y,t,r)}}(r.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:nq(e,"left","right"),y:nq(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&nY(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nj(t))return!1;let r=t.current;U(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=n6(e,n),{scroll:i}=t;return i&&(n5(r.x,i.offset.x),n5(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),s={x:nH((e=i.layout.layoutBox).x,o.x),y:nH(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=nZ(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(nY(s=>{if(!rt(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});let c={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,c)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return eu(this.visualElement,e),n.start(nh(e,n,0,t,this.visualElement,!1))}stopAnimation(){nY(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){nY(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){nY(t=>{let{drag:n}=this.getProps();if(!rt(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-tk(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nj(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};nY(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=nL(e),i=nL(t);return i>r?n=E(t.min,t.max-r,e.min):r>i&&(n=E(e.min,e.max-i,t.min)),eT(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),nY(t=>{if(!rt(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tk(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;n7.set(this.visualElement,this);let e=nI(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();nj(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Z.read(t);let i=nE(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(nY(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),r(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function rt(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class rn extends nb{constructor(e){super(e),this.removeGroupControls=U,this.removeListeners=U,this.controls=new re(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||U}unmount(){this.removeGroupControls(),this.removeListeners()}}let rr=e=>(t,n)=>{e&&Z.postRender(()=>e(t,n))};class ri extends nb{constructor(){super(...arguments),this.removePointerDownListener=U}onPointerDown(e){this.session=new nA(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n8(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:rr(e),onStart:rr(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Z.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=nI(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var ro,rs,ra,rl=n(85893),rc=n(67294),ru=n(15947),rh=n(25364);let rd=(0,rc.createContext)({}),rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let rm={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!eH.test(e))return e;e=parseFloat(e)}let n=rp(e,t.target.x),r=rp(e,t.target.y);return`${n}% ${r}%`}},rg={},{schedule:rv,cancel:ry}=Y(queueMicrotask,!1);class rw extends rc.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Object.assign(rg,r_),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||Z.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),rv.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rb(e){let[t,n]=(0,ru.oO)(),r=(0,rc.useContext)(rh.p);return(0,rl.jsx)(rw,{...e,layoutGroup:r,switchLayoutGroup:(0,rc.useContext)(rd),isPresent:t,safeToRemove:n})}let r_={borderRadius:{...rm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rm,borderTopRightRadius:rm,borderBottomLeftRadius:rm,borderBottomRightRadius:rm,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e2.parse(e);if(r.length>5)return e;let i=e2.createTransformer(e),o="number"!=typeof r[0]?1:0,s=n.x.scale*t.x,a=n.y.scale*t.y;r[0+o]/=s,r[1+o]/=a;let l=tk(s,a,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}},rS=(e,t)=>e.depth-t.depth;class rC{constructor(){this.children=[],this.isDirty=!1}add(e){en(this.children,e),this.isDirty=!0}remove(e){er(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rS),this.isDirty=!1,this.children.forEach(e)}}function rE(e){let t=ec(e)?e.get():e;return $(t)?t.toValue():t}let rx=["TopLeft","TopRight","BottomLeft","BottomRight"],rT=rx.length,rI=e=>"string"==typeof e?parseFloat(e):e,rP=e=>"number"==typeof e||eH.test(e);function rA(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let rk=rR(0,.5,eC),rO=rR(.5,.95,U);function rR(e,t,n){return r=>rt?1:n(E(e,t,r))}function rM(e,t){e.min=t.min,e.max=t.max}function rj(e,t){rM(e.x,t.x),rM(e.y,t.y)}function rL(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function rN(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function rD(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(eU.test(t)&&(t=parseFloat(t),t=tk(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=tk(o.min,o.max,r);e===o&&(a-=t),e.min=rN(e.min,t,n,a,i),e.max=rN(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}let rV=["x","scaleX","originX"],rF=["y","scaleY","originY"];function rB(e,t,n,r){rD(e.x,t,rV,n?n.x:void 0,r?r.x:void 0),rD(e.y,t,rF,n?n.y:void 0,r?r.y:void 0)}function rU(e){return 0===e.translate&&1===e.scale}function rH(e){return rU(e.x)&&rU(e.y)}function rq(e,t){return e.min===t.min&&e.max===t.max}function rz(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function r$(e,t){return rz(e.x,t.x)&&rz(e.y,t.y)}function rW(e){return nL(e.x)/nL(e.y)}function rK(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class rG{constructor(){this.members=[]}add(e){en(this.members,e),e.scheduleRender()}remove(e){if(er(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let rY={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rZ="undefined"!=typeof window&&void 0!==window.MotionDebug,rX=["","X","Y","Z"],rJ={visibility:"hidden"},rQ=0;function r0(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function r1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=null==t?void 0:t()){this.id=rQ++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,rZ&&(rY.totalNodes=rY.resolvedTargetDeltas=rY.recalculatedProjection=0),this.nodes.forEach(r5),this.nodes.forEach(it),this.nodes.forEach(ir),this.nodes.forEach(r9),rZ&&window.MotionDebug.record(rY)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=et.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(X(r),e(i-250))};return Z.read(r,!0),()=>X(r)}(r,0),rf.hasAnimatedSinceResize&&(rf.hasAnimatedSinceResize=!1,this.nodes.forEach(ie))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||o.getDefaultTransition()||ic,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!r$(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);let t={...v(i,"layout"),onPlay:s,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||ie(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,X(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ii),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[ed];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",Z,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=nG());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rL(this.prevProjectionDelta.x,this.projectionDelta.x),rL(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nD(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&rK(this.projectionDelta.x,this.prevProjectionDelta.x)&&rK(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),rZ&&rY.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nW(),this.projectionDelta=nW(),this.projectionDeltaWithTransform=nW()}setAnimationOrigin(e,t=!1){let n;let r=this.snapshot,i=r?r.latestValues:{},o={...this.latestValues},s=nW();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let a=nG(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(il));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(is(s.x,e.x,r),is(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,d,f,p;nB(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,p=this.relativeTargetOrigin,ia(f.x,p.x,a.x,r),ia(f.y,p.y,a.y,r),n&&(c=this.relativeTarget,d=n,rq(c.x,d.x)&&rq(c.y,d.y))&&(this.isProjectionDirty=!1),n||(n=nG()),rj(n,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,n,r,i,o){i?(e.opacity=tk(0,void 0!==n.opacity?n.opacity:1,rk(r)),e.opacityExit=tk(void 0!==t.opacity?t.opacity:1,0,rO(r))):o&&(e.opacity=tk(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i{rf.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){let r=ec(0)?0:el(0);return r.start(nh("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ip(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||nG();let t=nL(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=nL(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}rj(t,n),n3(t,i),nD(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new rG),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&r0("z",e,r,this.animationValues);for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(r6),this.root.sharedNodes.clear()}}}function r2(e){e.updateLayout()}function r4(e){var t;let n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?nY(e=>{let r=o?n.measuredBox[e]:n.layoutBox[e],i=nL(r);r.min=t[e].min,r.max=r.min+i}):ip(i,n.layoutBox,t)&&nY(r=>{let i=o?n.measuredBox[r]:n.layoutBox[r],s=nL(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=nW();nD(s,t,n.layoutBox);let a=nW();o?nD(a,e.applyTransform(r,!0),n.measuredBox):nD(a,t,n.layoutBox);let l=!rH(s),c=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let s=nG();nB(s,n.layoutBox,i.layoutBox);let a=nG();nB(a,t,o.layoutBox),r$(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function r5(e){rZ&&rY.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function r9(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r3(e){e.clearSnapshot()}function r6(e){e.clearMeasurements()}function r8(e){e.isLayoutDirty=!1}function r7(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ie(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function it(e){e.resolveTargetDelta()}function ir(e){e.calcProjection()}function ii(e){e.resetSkewAndRotation()}function io(e){e.removeLeadSnapshot()}function is(e,t,n){e.translate=tk(t.translate,0,n),e.scale=tk(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ia(e,t,n,r){e.min=tk(t.min,n.min,r),e.max=tk(t.max,n.max,r)}function il(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let ic={duration:.45,ease:[.4,0,.1,1]},iu=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ih=iu("applewebkit/")&&!iu("chrome/")?Math.round:U;function id(e){e.min=ih(e.min),e.max=ih(e.max)}function ip(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(rW(t)-rW(n)))}function im(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let ig=r1({attachResizeListener:(e,t)=>nE(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),iv={current:void 0},iy=r1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!iv.current){let e=new ig({});e.mount(window),e.setOptions({layoutScroll:!0}),iv.current=e}return iv.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function iw(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&Z.postRender(()=>i(t,nx(t)))}class ib extends nb{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=A(e,n),s=k(e=>{let{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;let o=k(e=>{r(e),n.removeEventListener("pointerleave",o)});n.addEventListener("pointerleave",o,i)});return r.forEach(e=>{e.addEventListener("pointerenter",s,i)}),o}(e,e=>(iw(this.node,e,"Start"),e=>iw(this.node,e,"End"))))}unmount(){}}class i_ extends nb{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tF(nE(this.node.current,"focus",()=>this.onFocus()),nE(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function iS(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&Z.postRender(()=>i(t,nx(t)))}class iC extends nb{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=A(e,n),s=e=>{let r=e.currentTarget;if(!V(e)||j.has(r))return;j.add(r);let o=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),V(e)&&j.has(r)&&(j.delete(r),"function"==typeof o&&o(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||O(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{M.has(e.tagName)||-1!==e.tabIndex||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),e.addEventListener("focus",e=>D(e,i),i)}),o}(e,e=>(iS(this.node,e,"Start"),(e,{success:t})=>iS(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let iE=new WeakMap,ix=new WeakMap,iT=e=>{let t=iE.get(e.target);t&&t(e)},iI=e=>{e.forEach(iT)},iP={some:0,all:1};class iA extends nb{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:iP[r]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;ix.has(n)||ix.set(n,{});let r=ix.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(iI,{root:e,...t})),r[i]}(t);return iE.set(e,n),r.observe(e),()=>{iE.delete(e),r.unobserve(e)}}(this.node.current,o,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}let ik=(0,rc.createContext)({strict:!1});var iO=n(16014);let iR=(0,rc.createContext)({});function iM(e){return i(e.animate)||d.some(t=>a(e[t]))}function ij(e){return!!(iM(e)||e.variants)}function iL(e){return Array.isArray(e)?e.join(" "):e}var iN=n(11741);let iD={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iV={};for(let e in iD)iV[e]={isEnabled:t=>iD[e].some(e=>!!t[e])};let iF=Symbol.for("motionComponentSymbol");var iB=n(240),iU=n(58868);let iH=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function iq(e){if("string"!=typeof e||e.includes("-"));else if(iH.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var iz=n(96681);let i$=e=>(t,n)=>{let r=(0,rc.useContext)(iR),o=(0,rc.useContext)(iB.O),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){let a={latestValues:function(e,t,n,r){let o={},s=r(e,{});for(let e in s)o[e]=rE(s[e]);let{initial:a,animate:l}=e,u=iM(e),h=ij(e);t&&h&&!u&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial,f=(d=d||!1===a)?l:a;if(f&&"boolean"!=typeof f&&!i(f)){let t=Array.isArray(f)?f:[f];for(let n=0;nn({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a})(e,t,r,o);return n?s():(0,iz.h)(s)},iW=(e,t)=>t&&"number"==typeof e?t.transform(e):e,iK={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iG=H.length;function iY(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,s=!1,a=!1;for(let e in t){let n=t[e];if(q.has(e)){s=!0;continue}if(tv(e)){i[e]=n;continue}{let t=iW(n,e8[e]);e.startsWith("origin")?(a=!0,o[e]=t):r[e]=t}}if(!t.transform&&(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o({style:{},transform:{},transformOrigin:{},vars:{}}),i1=()=>({...i0(),attrs:{}}),i2=e=>"string"==typeof e&&"svg"===e.toLowerCase();function i4(e,{style:t,vars:n},r,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(o,n[o])}let i5=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function i9(e,t,n,r){for(let n in i4(e,t,void 0,r),t.attrs)e.setAttribute(i5.has(n)?n:eh(n),t.attrs[n])}function i3(e,{layout:t,layoutId:n}){return q.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!rg[e]||"opacity"===e)}function i6(e,t,n){var r;let{style:i}=e,o={};for(let s in i)(ec(i[s])||t.style&&ec(t.style[s])||i3(s,e)||(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function i8(e,t,n){let r=i6(e,t,n);for(let n in e)(ec(e[n])||ec(t[n]))&&(r[-1!==H.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}let i7=["x","y","width","height","cx","cy","r"],oe={useVisualState:i$({scrapeMotionValuesFromProps:i8,createRenderState:i1,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let o=!!e.drag;if(!o){for(let e in i)if(q.has(e)){o=!0;break}}if(!o)return;let s=!t;if(t)for(let n=0;n{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),Z.render(()=>{iQ(r,i,i2(n.tagName),e.transformTemplate),i9(n,r)})})}})},ot={useVisualState:i$({scrapeMotionValuesFromProps:i6,createRenderState:i0})};function on(e,t,n){for(let r in t)ec(t[r])||i3(r,n)||(e[r]=t[r])}let or=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function oi(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||or.has(e)}let oo=e=>!oi(e);try{(ro=require("@emotion/is-prop-valid").default)&&(oo=e=>e.startsWith("on")?!oi(e):ro(e))}catch(e){}let os={current:null},oa={current:!1},ol=[...tC,eK,e2],oc=e=>ol.find(tS(e)),ou=new WeakMap,oh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class od{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=et.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),oa.current||function(){if(oa.current=!0,iN.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>os.current=e.matches;e.addListener(t),t()}else os.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||os.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in ou.delete(this.current),this.projection&&this.projection.unmount(),X(this.notifyUpdate),X(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let r=q.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),o(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in iV){let t=iV[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nG()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=el(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(tm(r)||ex(r))?r=parseFloat(r):!oc(r)&&e2.test(t)&&(r=tt(e,t)),this.setBaseTarget(e,ec(r)?r.get():r)),ec(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let n;let{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let i=c(this.props,r,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(n=i[e])}if(r&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||ec(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new ei),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class of extends od{constructor(){super(...arguments),this.KeyframeResolver=tx}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;ec(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class op extends of{constructor(){super(...arguments),this.type="html",this.renderInstance=i4}readValueFromInstance(e,t){if(q.has(t)){let e=te(t);return e&&e.default||0}{let n=window.getComputedStyle(e),r=(tv(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return n6(e,t)}build(e,t,n){iY(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return i6(e,t,n)}}class om extends of{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nG}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(q.has(t)){let e=te(t);return e&&e.default||0}return t=i5.has(t)?t:eh(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return i8(e,t,n)}build(e,t,n){iQ(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){i9(e,t,n,r)}mount(e){this.isSVGTag=i2(e.tagName),super.mount(e)}}let og=function(e){if("undefined"==typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}((rs={animation:{Feature:n_},exit:{Feature:nC},inView:{Feature:iA},tap:{Feature:iC},focus:{Feature:i_},hover:{Feature:ib},pan:{Feature:ri},drag:{Feature:rn,ProjectionNode:iy,MeasureLayout:rb},layout:{ProjectionNode:iy,MeasureLayout:rb}},ra=(e,t)=>iq(e)?new om(t):new op(t,{allowProjection:e!==rc.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var o,s;function l(e,o){var s;let l;let c={...(0,rc.useContext)(iO._),...e,layoutId:function({layoutId:e}){let t=(0,rc.useContext)(rh.p).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:u}=c,h=function(e){let{initial:t,animate:n}=function(e,t){if(iM(e)){let{initial:t,animate:n}=e;return{initial:!1===t||a(t)?t:void 0,animate:a(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,rc.useContext)(iR));return(0,rc.useMemo)(()=>({initial:t,animate:n}),[iL(t),iL(n)])}(e),d=r(e,u);if(!u&&iN.j){(0,rc.useContext)(ik).strict;let e=function(e){let{drag:t,layout:n}=iV;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=e.MeasureLayout,h.visualElement=function(e,t,n,r,i){var o,s;let{visualElement:a}=(0,rc.useContext)(iR),l=(0,rc.useContext)(ik),c=(0,rc.useContext)(iB.O),u=(0,rc.useContext)(iO._).reducedMotion,h=(0,rc.useRef)(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));let d=h.current,f=(0,rc.useContext)(rd);d&&!d.projection&&i&&("html"===d.type||"svg"===d.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&nj(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,n,i,f);let p=(0,rc.useRef)(!1);(0,rc.useInsertionEffect)(()=>{d&&p.current&&d.update(n,c)});let m=n[ed],g=(0,rc.useRef)(!!m&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,m))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,m)));return(0,iU.L)(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),rv.render(d.render),g.current&&d.animationState&&d.animationState.animateChanges())}),(0,rc.useEffect)(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,m)}),g.current=!1))}),d}(i,d,c,t,e.ProjectionNode)}return(0,rl.jsxs)(iR.Provider,{value:h,children:[l&&h.visualElement?(0,rl.jsx)(l,{visualElement:h.visualElement,...c}):null,n(i,e,(s=h.visualElement,(0,rc.useCallback)(e=>{e&&d.onMount&&d.onMount(e),s&&(e?s.mount(e):s.unmount()),o&&("function"==typeof o?o(e):nj(o)&&(o.current=e))},[s])),d,u,h.visualElement)]})}e&&function(e){for(let t in e)iV[t]={...iV[t],...e[t]}}(e),l.displayName=`motion.${"string"==typeof i?i:`create(${null!==(s=null!==(o=i.displayName)&&void 0!==o?o:i.name)&&void 0!==s?s:""})`}`;let c=(0,rc.forwardRef)(l);return c[iF]=i,c}({...iq(e)?oe:ot,preloadedFeatures:rs,useRender:function(e=!1){return(t,n,r,{latestValues:i},o)=>{let s=(iq(t)?function(e,t,n,r){let i=(0,rc.useMemo)(()=>{let n=i1();return iQ(n,t,i2(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};on(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return on(r,n,e),Object.assign(r,function({transformTemplate:e},t){return(0,rc.useMemo)(()=>{let n=i0();return iY(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(n,i,o,t),a=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(oo(i)||!0===n&&oi(i)||!t&&!oi(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==rc.Fragment?{...a,...s,ref:r}:{},{children:c}=n,u=(0,rc.useMemo)(()=>ec(c)?c.get():c,[c]);return(0,rc.createElement)(t,{...l,children:u})}}(t),createVisualElement:ra,Component:e})}))},11741:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});let r="undefined"!=typeof window},96681:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(67294);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},58868:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(67294);let i=n(11741).j?r.useLayoutEffect:r.useEffect},55346:function(e,t,n){"use strict";n.d(t,{QJe:function(){return l},V2E:function(){return o},cu5:function(){return c},gmG:function(){return a},j2d:function(){return i},ssk:function(){return s}});var r=n(67796);function i(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"},child:[]}]})(e)}function o(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"},child:[]}]})(e)}function s(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(e)}function a(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"},child:[]}]})(e)}function l(e){return(0,r.w_)({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-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"},child:[]}]})(e)}function c(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M206.86 245.15c-35.88 10.45-59.95 41.2-57.53 74.1 11.4-12.72 28.81-23.7 49.9-30.92l7.63-43.18zM95.81 295L64.08 115.49c-.29-1.62.28-2.62.24-2.65 57.76-32.06 123.12-49.01 189.01-49.01 1.61 0 3.23.17 4.85.19 13.95-13.47 31.73-22.83 51.59-26 18.89-3.02 38.05-4.55 57.18-5.32-9.99-13.95-24.48-24.23-41.77-27C301.27 1.89 277.24 0 253.32 0 176.66 0 101.02 19.42 33.2 57.06 9.03 70.48-3.92 98.48 1.05 126.58l31.73 179.51c14.23 80.52 136.33 142.08 204.45 142.08 3.59 0 6.75-.46 10.01-.8-13.52-17.08-28.94-40.48-39.5-67.58-47.61-12.98-106.06-51.62-111.93-84.79zm97.55-137.46c-.73-4.12-2.23-7.87-4.07-11.4-8.25 8.91-20.67 15.75-35.32 18.32-14.65 2.58-28.67.4-39.48-5.17-.52 3.94-.64 7.98.09 12.1 3.84 21.7 24.58 36.19 46.34 32.37 21.75-3.82 36.28-24.52 32.44-46.22zM606.8 120.9c-88.98-49.38-191.43-67.41-291.98-51.35-27.31 4.36-49.08 26.26-54.04 54.36l-31.73 179.51c-15.39 87.05 95.28 196.27 158.31 207.35 63.03 11.09 204.47-53.79 219.86-140.84l31.73-179.51c4.97-28.11-7.98-56.11-32.15-69.52zm-273.24 96.8c3.84-21.7 24.58-36.19 46.34-32.36 21.76 3.83 36.28 24.52 32.45 46.22-.73 4.12-2.23 7.87-4.07 11.4-8.25-8.91-20.67-15.75-35.32-18.32-14.65-2.58-28.67-.4-39.48 5.17-.53-3.95-.65-7.99.08-12.11zm70.47 198.76c-55.68-9.79-93.52-59.27-89.04-112.9 20.6 25.54 56.21 46.17 99.49 53.78 43.28 7.61 83.82.37 111.93-16.6-14.18 51.94-66.71 85.51-122.38 75.72zm130.3-151.34c-8.25-8.91-20.68-15.75-35.33-18.32-14.65-2.58-28.67-.4-39.48 5.17-.52-3.94-.64-7.98.09-12.1 3.84-21.7 24.58-36.19 46.34-32.37 21.75 3.83 36.28 24.52 32.45 46.22-.73 4.13-2.23 7.88-4.07 11.4z"},child:[]}]})(e)}},61163:function(e,t,n){"use strict";n.d(t,{Ain:function(){return i},XGu:function(){return s},vdW:function(){return o}});var r=n(67796);function i(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M267.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-320c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160L64 241 64 96c0-17.7-14.3-32-32-32S0 78.3 0 96L0 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-145 11.5 9.6 192 160z"},child:[]}]})(e)}function o(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416L0 96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4l192 160L256 241l0-145c0-17.7 14.3-32 32-32s32 14.3 32 32l0 320c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-145-11.5 9.6-192 160z"},child:[]}]})(e)}function s(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M74.6 373.2c41.7 36.1 108 82.5 166.1 73.7c6.1-.9 12.1-2.5 18-4.5c-9.2-12.3-17.3-24.4-24.2-35.4c-21.9-35-28.8-75.2-25.9-113.6c-20.6 4.1-39.2 13-54.7 25.4c-6.5 5.2-16.3 1.3-14.8-7c6.4-33.5 33-60.9 68.2-66.3c2.6-.4 5.3-.7 7.9-.8l19.4-131.3c2-13.8 8-32.7 25-45.9C278.2 53.2 310.5 37 363.2 32.2c-.8-.7-1.6-1.4-2.4-2.1C340.6 14.5 288.4-11.5 175.7 5.6S20.5 63 5.7 83.9C0 91.9-.8 102 .6 111.8L24.8 276.1c5.5 37.3 21.5 72.6 49.8 97.2zm87.7-219.6c4.4-3.1 10.8-2 11.8 3.3c.1 .5 .2 1.1 .3 1.6c3.2 21.8-11.6 42-33.1 45.3s-41.5-11.8-44.7-33.5c-.1-.5-.1-1.1-.2-1.6c-.6-5.4 5.2-8.4 10.3-6.7c9 3 18.8 3.9 28.7 2.4s19.1-5.3 26.8-10.8zM261.6 390c29.4 46.9 79.5 110.9 137.6 119.7s124.5-37.5 166.1-73.7c28.3-24.5 44.3-59.8 49.8-97.2l24.2-164.3c1.4-9.8 .6-19.9-5.1-27.9c-14.8-20.9-57.3-61.2-170-78.3S299.4 77.2 279.2 92.8c-7.8 6-11.5 15.4-12.9 25.2L242.1 282.3c-5.5 37.3-.4 75.8 19.6 107.7zM404.5 235.3c-7.7-5.5-16.8-9.3-26.8-10.8s-19.8-.6-28.7 2.4c-5.1 1.7-10.9-1.3-10.3-6.7c.1-.5 .1-1.1 .2-1.6c3.2-21.8 23.2-36.8 44.7-33.5s36.3 23.5 33.1 45.3c-.1 .5-.2 1.1-.3 1.6c-1 5.3-7.4 6.4-11.8 3.3zm136.2 15.5c-1 5.3-7.4 6.4-11.8 3.3c-7.7-5.5-16.8-9.3-26.8-10.8s-19.8-.6-28.7 2.4c-5.1 1.7-10.9-1.3-10.3-6.7c.1-.5 .1-1.1 .2-1.6c3.2-21.8 23.2-36.8 44.7-33.5s36.3 23.5 33.1 45.3c-.1 .5-.2 1.1-.3 1.6zM530 350.2c-19.6 44.7-66.8 72.5-116.8 64.9s-87.1-48.2-93-96.7c-1-8.3 8.9-12.1 15.2-6.7c23.9 20.8 53.6 35.3 87 40.3s66.1 .1 94.9-12.8c7.6-3.4 16 3.2 12.6 10.9z"},child:[]}]})(e)}},67796:function(e,t,n){"use strict";n.d(t,{w_:function(){return u}});var r=n(67294),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=r.createContext&&r.createContext(i),s=["attr","size","title"];function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement(h,a({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,n)=>r.createElement(t.tag,c({key:n},t.attr),e(t.child)))}(e.child))}function h(e){var t=t=>{var n,{attr:i,size:o,title:l}=e,u=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,s),h=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),r.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,u,{className:n,style:c(c({color:e.color||t.color},t.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&r.createElement("title",null,l),e.children)};return void 0!==o?r.createElement(o.Consumer,null,e=>t(e)):t(i)}},50788:function(e,t,n){"use strict";n.d(t,{$l_:function(){return l},EGO:function(){return i},FNi:function(){return h},FW:function(){return c},G1X:function(){return u},HOZ:function(){return s},O$5:function(){return o},hPq:function(){return a}});var r=n(67796);function i(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19.79 5.61A.998.998 0 0 0 19 4H6.83l7.97 7.97 4.99-6.36zM2.81 2.81 1.39 4.22 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78 1.41-1.41L2.81 2.81z"},child:[]}]})(e)}function o(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24m0 24H0"},child:[]},{tag:"path",attr:{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]}]})(e)}function s(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"},child:[]}]})(e)}function a(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},child:[]}]})(e)}function l(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"},child:[]}]})(e)}function c(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"},child:[]}]})(e)}function u(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(e)}function h(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}},53870:function(e,t,n){"use strict";n.d(t,{$Oz:function(){return W},BDb:function(){return A},CVI:function(){return F},Eed:function(){return v},F9M:function(){return N},G0_:function(){return C},GoW:function(){return D},I0R:function(){return V},Ije:function(){return f},Jtq:function(){return $},KOp:function(){return p},KPt:function(){return h},MGh:function(){return T},NY:function(){return U},O8i:function(){return s},OmX:function(){return S},PSd:function(){return I},TN6:function(){return o},TRU:function(){return x},Taf:function(){return q},U4K:function(){return l},UdD:function(){return L},X8Q:function(){return i},Xk2:function(){return j},ZPS:function(){return m},_2z:function(){return y},_L$:function(){return a},_x5:function(){return w},e1i:function(){return M},eSQ:function(){return R},iEv:function(){return g},kcA:function(){return P},l4E:function(){return u},nj4:function(){return H},p22:function(){return k},qJX:function(){return c},t2h:function(){return B},tRC:function(){return E},tRM:function(){return z},tgW:function(){return O},uPD:function(){return d},w6U:function(){return _},zKx:function(){return K},ztG:function(){return b}});var r=n(67796);function i(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 19.1642L18.2071 12.9571L16.7929 11.5429L12 16.3358L7.20712 11.5429L5.79291 12.9571L12 19.1642ZM12 13.5143L18.2071 7.30722L16.7929 5.89301L12 10.6859L7.20712 5.89301L5.79291 7.30722L12 13.5143Z"},child:[]}]})(e)}function o(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"},child:[]}]})(e)}function s(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 4.83582L5.79291 11.0429L7.20712 12.4571L12 7.66424L16.7929 12.4571L18.2071 11.0429L12 4.83582ZM12 10.4857L5.79291 16.6928L7.20712 18.107L12 13.3141L16.7929 18.107L18.2071 16.6928L12 10.4857Z"},child:[]}]})(e)}function a(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13.9142 12L18.7071 7.20712L17.2929 5.79291L11.0858 12L17.2929 18.2071L18.7071 16.7929L13.9142 12ZM7 18V6.00001H9V18H7Z"},child:[]}]})(e)}function l(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10.0858 12L5.29291 16.7929L6.70712 18.2071L12.9142 12L6.70712 5.79291L5.29291 7.20712L10.0858 12ZM17 6.00002L17 18H15L15 6.00002L17 6.00002Z"},child:[]}]})(e)}function c(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 20C20 20.5523 19.5523 21 19 21H5C4.44772 21 4 20.5523 4 20V11L1 11L11.3273 1.6115C11.7087 1.26475 12.2913 1.26475 12.6727 1.6115L23 11L20 11V20ZM8 15V17H16V15H8Z"},child:[]}]})(e)}function u(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19 21H5C4.44772 21 4 20.5523 4 20V11L1 11L11.3273 1.6115C11.7087 1.26475 12.2913 1.26475 12.6727 1.6115L23 11L20 11V20C20 20.5523 19.5523 21 19 21ZM6 19H18V9.15745L12 3.7029L6 9.15745V19ZM8 15H16V17H8V15Z"},child:[]}]})(e)}function h(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2 4.00087C2 3.44811 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44463 22 4.00087V17.9991C22 18.5519 21.5447 19 21.0082 19H2.9918C2.44405 19 2 18.5554 2 17.9991V4.00087ZM5 20H19V22H5V20Z"},child:[]}]})(e)}function d(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2 4.00087C2 3.44811 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44463 22 4.00087V17.9991C22 18.5519 21.5447 19 21.0082 19H2.9918C2.44405 19 2 18.5554 2 17.9991V4.00087ZM4 5V17H20V5H4ZM5 20H19V22H5V20Z"},child:[]}]})(e)}function f(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15.4142 4.99998H21.0082C21.556 4.99998 22 5.44461 22 6.00085V19.9991C22 20.5519 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5553 2 19.9991V6.00085C2 5.44808 2.45531 4.99998 2.9918 4.99998H8.58579L6.05025 2.46445L7.46447 1.05023L11.4142 4.99998H12.5858L16.5355 1.05023L17.9497 2.46445L15.4142 4.99998Z"},child:[]}]})(e)}function p(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15.4142 4.99998H21.0082C21.556 4.99998 22 5.44461 22 6.00085V19.9991C22 20.5519 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5553 2 19.9991V6.00085C2 5.44808 2.45531 4.99998 2.9918 4.99998H8.58579L6.05025 2.46445L7.46447 1.05023L11.4142 4.99998H12.5858L16.5355 1.05023L17.9497 2.46445L15.4142 4.99998ZM4 6.99998V19H20V6.99998H4Z"},child:[]}]})(e)}function m(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 21H13V6C13 4.34315 14.3431 3 16 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21ZM11 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H8C9.65685 3 11 4.34315 11 6V21ZM11 21H13V23H11V21Z"},child:[]}]})(e)}function g(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 21V23H11V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H9C10.1947 3 11.2671 3.52375 12 4.35418C12.7329 3.52375 13.8053 3 15 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H13ZM20 19V5H15C13.8954 5 13 5.89543 13 7V19H20ZM11 19V7C11 5.89543 10.1046 5 9 5H4V19H11Z"},child:[]}]})(e)}function v(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 5C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H16V7H18V5H21ZM18 13H16V15H14V18H18V13ZM16 11H14V13H16V11ZM18 9H16V11H18V9ZM16 7H14V9H16V7Z"},child:[]}]})(e)}function y(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10.4142 3L12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142ZM18 18H14V15H16V13H14V11H16V9H14V7H11.5858L9.58579 5H4V19H20V7H16V9H18V11H16V13H18V18Z"},child:[]}]})(e)}function w(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16.5 3C19.5376 3 22 5.5 22 9C22 16 14.5 20 12 21.5C9.5 20 2 16 2 9C2 5.5 4.5 3 7.5 3C9.35997 3 11 4 12 5C13 4 14.64 3 16.5 3Z"},child:[]}]})(e)}function b(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16.5 3C19.5376 3 22 5.5 22 9C22 16 14.5 20 12 21.5C9.5 20 2 16 2 9C2 5.5 4.5 3 7.5 3C9.35997 3 11 4 12 5C13 4 14.64 3 16.5 3ZM12.9339 18.6038C13.8155 18.0485 14.61 17.4955 15.3549 16.9029C18.3337 14.533 20 11.9435 20 9C20 6.64076 18.463 5 16.5 5C15.4241 5 14.2593 5.56911 13.4142 6.41421L12 7.82843L10.5858 6.41421C9.74068 5.56911 8.5759 5 7.5 5C5.55906 5 4 6.6565 4 9C4 11.9435 5.66627 14.533 8.64514 16.9029C9.39 17.4955 10.1845 18.0485 11.0661 18.6038C11.3646 18.7919 11.6611 18.9729 12 19.1752C12.3389 18.9729 12.6354 18.7919 12.9339 18.6038Z"},child:[]}]})(e)}function _(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2C6.47939 2 2 6.47939 2 12C2 17.5206 6.47939 22 12 22C17.5098 22 22 17.5206 22 12C22 6.47939 17.5098 2 12 2ZM18.6052 6.60954C19.7983 8.06291 20.5141 9.91756 20.5358 11.9241C20.2538 11.8699 17.4338 11.295 14.5922 11.6529C14.5271 11.5119 14.4729 11.3601 14.4078 11.2083C14.2343 10.7961 14.0391 10.3731 13.8438 9.97181C16.9891 8.692 18.4208 6.84816 18.6052 6.60954ZM12 3.47506C14.1692 3.47506 16.154 4.28851 17.6616 5.62256C17.5098 5.83948 16.2191 7.56399 13.1822 8.70281C11.7831 6.13232 10.2321 4.0282 9.9935 3.70282C10.6334 3.55097 11.3059 3.47506 12 3.47506ZM8.36662 4.27766C8.59437 4.58134 10.1128 6.69631 11.5336 9.21256C7.5423 10.2755 4.01736 10.2538 3.63774 10.2538C4.19089 7.60738 5.98047 5.40564 8.36662 4.27766ZM3.45336 12.0109C3.45336 11.9241 3.45336 11.8373 3.45336 11.7506C3.82212 11.7614 7.96529 11.8156 12.2277 10.5358C12.4773 11.013 12.705 11.5011 12.9219 11.9891C12.8134 12.0217 12.6941 12.0542 12.5857 12.0868C8.18221 13.5076 5.83948 17.3904 5.64425 17.7158C4.2885 16.2083 3.45336 14.2017 3.45336 12.0109ZM12 20.5466C10.026 20.5466 8.20391 19.8742 6.76139 18.7462C6.91323 18.4317 8.64856 15.0911 13.4642 13.41C13.4859 13.3991 13.4967 13.3991 13.5184 13.3883C14.7223 16.5011 15.2104 19.1149 15.3406 19.8633C14.3102 20.308 13.1822 20.5466 12 20.5466ZM16.7614 19.0824C16.6746 18.5618 16.2191 16.0672 15.1019 12.9978C17.7809 12.5748 20.1236 13.269 20.4165 13.3666C20.0478 15.7419 18.6811 17.7917 16.7614 19.0824Z"},child:[]}]})(e)}function S(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19.9887 11.5716C19.9029 9.94513 19.3313 8.44745 18.4163 7.22097C18.1749 7.48407 17.8785 7.7698 17.4957 8.09159C16.5881 8.85458 15.4887 9.54307 14.1834 10.101C14.3498 10.4506 14.5029 10.7899 14.6376 11.1098L14.6388 11.1125C14.6652 11.1742 14.6879 11.2306 14.7321 11.3418C14.7379 11.3562 14.7433 11.3697 14.7485 11.3825C16.2621 11.2122 17.8576 11.2749 19.4049 11.4845C19.6106 11.5123 19.805 11.5415 19.9887 11.5716ZM10.6044 4.1213C10.7783 4.36621 10.9602 4.62859 11.1803 4.95378C11.7929 5.8589 12.396 6.81391 12.9604 7.79507C13.0749 7.99416 13.187 8.19289 13.2964 8.39112C14.5193 7.90993 15.5296 7.30281 16.3438 6.62486C16.6731 6.35063 16.9383 6.093 17.1403 5.86972C15.7501 4.70277 13.9571 4 12 4C11.524 4 11.0576 4.04158 10.6044 4.1213ZM4.25266 9.99755C4.83145 9.98452 5.48467 9.94941 6.29303 9.87518C7.90024 9.72758 9.54141 9.46249 11.1549 9.05274C10.5719 8.03721 9.93888 7.02331 9.29452 6.05378C8.98479 5.58775 8.68357 5.14992 8.45484 4.82642C6.39541 5.84613 4.83794 7.72658 4.25266 9.99755ZM5.78366 17.036C6.17111 16.4693 6.68061 15.8314 7.35797 15.1374C8.81199 13.6478 10.5286 12.4878 12.5139 11.8473C12.5417 11.8391 12.5604 11.8336 12.576 11.829C12.411 11.4651 12.2562 11.1405 12.1003 10.8342C10.2643 11.3687 8.3303 11.703 6.40279 11.8762C5.46319 11.9606 4.62005 11.9981 4 12.0044C4.00102 13.9112 4.66915 15.662 5.78366 17.036ZM15.0045 19.4166C14.9001 18.8745 14.7669 18.2706 14.5899 17.574C14.2689 16.3112 13.8668 15.012 13.373 13.7078C11.3712 14.4343 9.77574 15.4974 8.54309 16.7649C7.94904 17.3757 7.51244 17.9537 7.22642 18.4203C8.55892 19.4127 10.2109 20 12 20C13.0626 20 14.0769 19.7928 15.0045 19.4166ZM16.8778 18.3414C18.4073 17.1632 19.4985 15.444 19.8652 13.4703C19.5253 13.3865 19.094 13.3005 18.6196 13.2346C17.5756 13.0897 16.5014 13.0655 15.4409 13.2018C15.8933 14.4764 16.2642 15.7332 16.5608 16.9361C16.6903 17.4614 16.7958 17.9358 16.8778 18.3414ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22Z"},child:[]}]})(e)}function C(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"},child:[]}]})(e)}function E(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z"},child:[]}]})(e)}function x(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M18.001 20H20V22H12C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 15.2712 20.4293 18.1755 18.001 20ZM12 10C13.1046 10 14 9.10457 14 8C14 6.89543 13.1046 6 12 6C10.8954 6 10 6.89543 10 8C10 9.10457 10.8954 10 12 10ZM8 14C9.10457 14 10 13.1046 10 12C10 10.8954 9.10457 10 8 10C6.89543 10 6 10.8954 6 12C6 13.1046 6.89543 14 8 14ZM16 14C17.1046 14 18 13.1046 18 12C18 10.8954 17.1046 10 16 10C14.8954 10 14 10.8954 14 12C14 13.1046 14.8954 14 16 14ZM12 18C13.1046 18 14 17.1046 14 16C14 14.8954 13.1046 14 12 14C10.8954 14 10 14.8954 10 16C10 17.1046 10.8954 18 12 18Z"},child:[]}]})(e)}function T(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 20H20V22H12C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 14.2512 21.2561 16.3287 20.0007 18H17.2916C18.9525 16.5341 20 14.3894 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 10C10.8954 10 10 9.10457 10 8C10 6.89543 10.8954 6 12 6C13.1046 6 14 6.89543 14 8C14 9.10457 13.1046 10 12 10ZM8 14C6.89543 14 6 13.1046 6 12C6 10.8954 6.89543 10 8 10C9.10457 10 10 10.8954 10 12C10 13.1046 9.10457 14 8 14ZM16 14C14.8954 14 14 13.1046 14 12C14 10.8954 14.8954 10 16 10C17.1046 10 18 10.8954 18 12C18 13.1046 17.1046 14 16 14ZM12 18C10.8954 18 10 17.1046 10 16C10 14.8954 10.8954 14 12 14C13.1046 14 14 14.8954 14 16C14 17.1046 13.1046 18 12 18Z"},child:[]}]})(e)}function I(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6 20.1957V3.80421C6 3.01878 6.86395 2.53993 7.53 2.95621L20.6432 11.152C21.2699 11.5436 21.2699 12.4563 20.6432 12.848L7.53 21.0437C6.86395 21.46 6 20.9812 6 20.1957Z"},child:[]}]})(e)}function P(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6 3V1H8V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6ZM9 15C10.6569 15 12 13.6569 12 12C12 10.3431 10.6569 9 9 9C7.34315 9 6 10.3431 6 12C6 13.6569 7.34315 15 9 15ZM14 9V11H18V9H14ZM14 13V15H18V13H14Z"},child:[]}]})(e)}function A(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6 3V1H8V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6ZM4 5V19H20V5H4ZM9 15C7.34315 15 6 13.6569 6 12C6 10.3431 7.34315 9 9 9C10.6569 9 12 10.3431 12 12C12 13.6569 10.6569 15 9 15ZM14 9H18V11H14V9ZM14 13H18V15H14V13Z"},child:[]}]})(e)}function k(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"},child:[]}]})(e)}function O(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"},child:[]}]})(e)}function R(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"},child:[]}]})(e)}function M(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9H19L12 16L5 9H10V3H14V9Z"},child:[]}]})(e)}function j(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 7C11.4872 7 10.9925 7.07719 10.5269 7.21995C11.3954 7.61175 12 8.48527 12 9.5C12 10.8807 10.8807 12 9.5 12C8.48527 12 7.61175 11.3954 7.22057 10.5268C7.07719 10.9925 7 11.4872 7 12C7 14.7614 9.23858 17 12 17C14.7614 17 17 14.7614 17 12C17 9.23858 14.7614 7 12 7Z"},child:[]}]})(e)}function L(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12 7C14.7614 7 17 9.23858 17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 11.4872 7.07719 10.9925 7.22057 10.5268C7.61175 11.3954 8.48527 12 9.5 12C10.8807 12 12 10.8807 12 9.5C12 8.48527 11.3954 7.61175 10.5269 7.21995C10.9925 7.07719 11.4872 7 12 7Z"},child:[]}]})(e)}function N(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z"},child:[]}]})(e)}function D(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 18V20H5V18H16ZM21 11V13H3V11H21ZM19 4V6H8V4H19Z"},child:[]}]})(e)}function V(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 18V20H5V18H16ZM21 11V13H3V11H21ZM19 4V6H8V4H19Z"},child:[]}]})(e)}function F(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 2C15.968 2 20 6.032 20 11C20 15.968 15.968 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2ZM19.4853 18.0711L22.3137 20.8995L20.8995 22.3137L18.0711 19.4853L19.4853 18.0711Z"},child:[]}]})(e)}function B(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 2C15.968 2 20 6.032 20 11C20 15.968 15.968 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2ZM11 18C14.8675 18 18 14.8675 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18ZM19.4853 18.0711L22.3137 20.8995L20.8995 22.3137L18.0711 19.4853L19.4853 18.0711Z"},child:[]}]})(e)}function U(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.33409 4.54491C6.3494 3.63637 7.55145 2.9322 8.87555 2.49707C9.60856 3.4128 10.7358 3.99928 12 3.99928C13.2642 3.99928 14.3914 3.4128 15.1245 2.49707C16.4486 2.9322 17.6506 3.63637 18.6659 4.54491C18.2405 5.637 18.2966 6.90531 18.9282 7.99928C19.5602 9.09388 20.6314 9.77679 21.7906 9.95392C21.9279 10.6142 22 11.2983 22 11.9993C22 12.7002 21.9279 13.3844 21.7906 14.0446C20.6314 14.2218 19.5602 14.9047 18.9282 15.9993C18.2966 17.0932 18.2405 18.3616 18.6659 19.4536C17.6506 20.3622 16.4486 21.0664 15.1245 21.5015C14.3914 20.5858 13.2642 19.9993 12 19.9993C10.7358 19.9993 9.60856 20.5858 8.87555 21.5015C7.55145 21.0664 6.3494 20.3622 5.33409 19.4536C5.75952 18.3616 5.7034 17.0932 5.0718 15.9993C4.43983 14.9047 3.36862 14.2218 2.20935 14.0446C2.07212 13.3844 2 12.7002 2 11.9993C2 11.2983 2.07212 10.6142 2.20935 9.95392C3.36862 9.77679 4.43983 9.09388 5.0718 7.99928C5.7034 6.90531 5.75952 5.637 5.33409 4.54491ZM13.5 14.5974C14.9349 13.7689 15.4265 11.9342 14.5981 10.4993C13.7696 9.0644 11.9349 8.57277 10.5 9.4012C9.06512 10.2296 8.5735 12.0644 9.40192 13.4993C10.2304 14.9342 12.0651 15.4258 13.5 14.5974Z"},child:[]}]})(e)}function H(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2 11.9998C2 11.1353 2.1097 10.2964 2.31595 9.49631C3.40622 9.55283 4.48848 9.01015 5.0718 7.99982C5.65467 6.99025 5.58406 5.78271 4.99121 4.86701C6.18354 3.69529 7.66832 2.82022 9.32603 2.36133C9.8222 3.33385 10.8333 3.99982 12 3.99982C13.1667 3.99982 14.1778 3.33385 14.674 2.36133C16.3317 2.82022 17.8165 3.69529 19.0088 4.86701C18.4159 5.78271 18.3453 6.99025 18.9282 7.99982C19.5115 9.01015 20.5938 9.55283 21.6841 9.49631C21.8903 10.2964 22 11.1353 22 11.9998C22 12.8643 21.8903 13.7032 21.6841 14.5033C20.5938 14.4468 19.5115 14.9895 18.9282 15.9998C18.3453 17.0094 18.4159 18.2169 19.0088 19.1326C17.8165 20.3043 16.3317 21.1794 14.674 21.6383C14.1778 20.6658 13.1667 19.9998 12 19.9998C10.8333 19.9998 9.8222 20.6658 9.32603 21.6383C7.66832 21.1794 6.18354 20.3043 4.99121 19.1326C5.58406 18.2169 5.65467 17.0094 5.0718 15.9998C4.48848 14.9895 3.40622 14.4468 2.31595 14.5033C2.1097 13.7032 2 12.8643 2 11.9998ZM6.80385 14.9998C7.43395 16.0912 7.61458 17.3459 7.36818 18.5236C7.77597 18.8138 8.21005 19.0652 8.66489 19.2741C9.56176 18.4712 10.7392 17.9998 12 17.9998C13.2608 17.9998 14.4382 18.4712 15.3351 19.2741C15.7899 19.0652 16.224 18.8138 16.6318 18.5236C16.3854 17.3459 16.566 16.0912 17.1962 14.9998C17.8262 13.9085 18.8225 13.1248 19.9655 12.7493C19.9884 12.5015 20 12.2516 20 11.9998C20 11.7481 19.9884 11.4981 19.9655 11.2504C18.8225 10.8749 17.8262 10.0912 17.1962 8.99982C16.566 7.90845 16.3854 6.65378 16.6318 5.47605C16.224 5.18588 15.7899 4.93447 15.3351 4.72552C14.4382 5.52844 13.2608 5.99982 12 5.99982C10.7392 5.99982 9.56176 5.52844 8.66489 4.72552C8.21005 4.93447 7.77597 5.18588 7.36818 5.47605C7.61458 6.65378 7.43395 7.90845 6.80385 8.99982C6.17376 10.0912 5.17754 10.8749 4.03451 11.2504C4.01157 11.4981 4 11.7481 4 11.9998C4 12.2516 4.01157 12.5015 4.03451 12.7493C5.17754 13.1248 6.17376 13.9085 6.80385 14.9998ZM12 14.9998C10.3431 14.9998 9 13.6567 9 11.9998C9 10.343 10.3431 8.99982 12 8.99982C13.6569 8.99982 15 10.343 15 11.9998C15 13.6567 13.6569 14.9998 12 14.9998ZM12 12.9998C12.5523 12.9998 13 12.5521 13 11.9998C13 11.4475 12.5523 10.9998 12 10.9998C11.4477 10.9998 11 11.4475 11 11.9998C11 12.5521 11.4477 12.9998 12 12.9998Z"},child:[]}]})(e)}function q(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M11 2.04938V4.06189C7.05369 4.55399 4 7.92038 4 12C4 16.4183 7.58172 20 12 20C16.0796 20 19.446 16.9463 19.9381 13H21.9506C21.4489 18.0533 17.1853 22 12 22C6.47715 22 2 17.5228 2 12C2 6.81465 5.94668 2.5511 11 2.04938ZM20 5.41421L12 13.4142L10.5858 12L18.5858 4H14V2H22V10H20V5.41421Z"},child:[]}]})(e)}function z(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5 11V13H19V11H5Z"},child:[]}]})(e)}function $(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9V15H10V9H5L12 2L19 9H14Z"},child:[]}]})(e)}function W(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13.5 2C13.5 2.44425 13.3069 2.84339 13 3.11805V5H18C19.6569 5 21 6.34315 21 8V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V8C3 6.34315 4.34315 5 6 5H11V3.11805C10.6931 2.84339 10.5 2.44425 10.5 2C10.5 1.17157 11.1716 0.5 12 0.5C12.8284 0.5 13.5 1.17157 13.5 2ZM0 10H2V16H0V10ZM24 10H22V16H24V10ZM9 14.5C9.82843 14.5 10.5 13.8284 10.5 13C10.5 12.1716 9.82843 11.5 9 11.5C8.17157 11.5 7.5 12.1716 7.5 13C7.5 13.8284 8.17157 14.5 9 14.5ZM16.5 13C16.5 12.1716 15.8284 11.5 15 11.5C14.1716 11.5 13.5 12.1716 13.5 13C13.5 13.8284 14.1716 14.5 15 14.5C15.8284 14.5 16.5 13.8284 16.5 13Z"},child:[]}]})(e)}function K(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13.5 2C13.5 2.44425 13.3069 2.84339 13 3.11805V5H18C19.6569 5 21 6.34315 21 8V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V8C3 6.34315 4.34315 5 6 5H11V3.11805C10.6931 2.84339 10.5 2.44425 10.5 2C10.5 1.17157 11.1716 0.5 12 0.5C12.8284 0.5 13.5 1.17157 13.5 2ZM6 7C5.44772 7 5 7.44772 5 8V18C5 18.5523 5.44772 19 6 19H18C18.5523 19 19 18.5523 19 18V8C19 7.44772 18.5523 7 18 7H13H11H6ZM2 10H0V16H2V10ZM22 10H24V16H22V10ZM9 14.5C9.82843 14.5 10.5 13.8284 10.5 13C10.5 12.1716 9.82843 11.5 9 11.5C8.17157 11.5 7.5 12.1716 7.5 13C7.5 13.8284 8.17157 14.5 9 14.5ZM15 14.5C15.8284 14.5 16.5 13.8284 16.5 13C16.5 12.1716 15.8284 11.5 15 11.5C14.1716 11.5 13.5 12.1716 13.5 13C13.5 13.8284 14.1716 14.5 15 14.5Z"},child:[]}]})(e)}},10856:function(e,t,n){"use strict";n.d(t,{UPX:function(){return u},aSH:function(){return d},c4D:function(){return l},e8L:function(){return s},hP8:function(){return h},hlg:function(){return c},j$H:function(){return a},muo:function(){return o},zB3:function(){return i}});var r=n(67796);function i(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 18.004h-6.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.396 0 2.6 .831 3.148 2.03"},child:[]},{tag:"path",attr:{d:"M19 16l-2 3h4l-2 3"},child:[]}]})(e)}function o(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z"},child:[]},{tag:"path",attr:{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"},child:[]}]})(e)}function s(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},child:[]},{tag:"path",attr:{d:"M14 9.75a3.016 3.016 0 0 0 -4.163 .173a2.993 2.993 0 0 0 0 4.154a3.016 3.016 0 0 0 4.163 .173"},child:[]}]})(e)}function a(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 4m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M7 20h10"},child:[]},{tag:"path",attr:{d:"M9 16v4"},child:[]},{tag:"path",attr:{d:"M15 16v4"},child:[]},{tag:"path",attr:{d:"M9 12v-4"},child:[]},{tag:"path",attr:{d:"M12 12v-1"},child:[]},{tag:"path",attr:{d:"M15 12v-2"},child:[]},{tag:"path",attr:{d:"M12 12v-1"},child:[]}]})(e)}function l(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M18 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6 8l0 8"},child:[]},{tag:"path",attr:{d:"M11 6h5a2 2 0 0 1 2 2v8"},child:[]},{tag:"path",attr:{d:"M14 9l-3 -3l3 -3"},child:[]}]})(e)}function c(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M8 4l0 16"},child:[]},{tag:"path",attr:{d:"M16 4l0 16"},child:[]},{tag:"path",attr:{d:"M4 8l4 0"},child:[]},{tag:"path",attr:{d:"M4 16l4 0"},child:[]},{tag:"path",attr:{d:"M4 12l16 0"},child:[]},{tag:"path",attr:{d:"M16 8l4 0"},child:[]},{tag:"path",attr:{d:"M16 16l4 0"},child:[]}]})(e)}function u(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 9l-3 -3l3 -3"},child:[]},{tag:"path",attr:{d:"M15.997 17.918a6.002 6.002 0 0 0 -.997 -11.918h-11"},child:[]},{tag:"path",attr:{d:"M6 14v6"},child:[]},{tag:"path",attr:{d:"M9 15.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z"},child:[]}]})(e)}function h(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 9l3 -3l-3 -3"},child:[]},{tag:"path",attr:{d:"M8 17.918a5.997 5.997 0 0 1 -5 -5.918a6 6 0 0 1 6 -6h11"},child:[]},{tag:"path",attr:{d:"M12 14v6"},child:[]},{tag:"path",attr:{d:"M15 15.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0 -3 0z"},child:[]}]})(e)}function d(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 4l-8 4l8 4l8 -4l-8 -4"},child:[]},{tag:"path",attr:{d:"M4 12l8 4l8 -4"},child:[]},{tag:"path",attr:{d:"M4 16l8 4l8 -4"},child:[]}]})(e)}},64712:function(e,t,n){"use strict";n.d(t,{Am:function(){return v},x7:function(){return S}});var r=n(67294),i=n(73935),o=e=>{switch(e){case"success":return l;case"info":return u;case"warning":return c;case"error":return h;default:return null}},s=Array(12).fill(0),a=({visible:e,className:t})=>r.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},r.createElement("div",{className:"sonner-spinner"},s.map((e,t)=>r.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),l=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),c=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),u=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),h=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),d=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),f=()=>{let[e,t]=r.useState(document.hidden);return r.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e},p=1,m=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:p++,o=this.toasts.find(e=>e.id===i),s=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:s,title:n}):t):this.addToast({title:n,...r,dismissible:s,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let n;if(!t)return;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let i=e instanceof Promise?e:e(),o=void 0!==n,s,a=i.then(async e=>{if(s=["resolve",e],r.isValidElement(e))o=!1,this.create({id:n,type:"default",message:e});else if(g(e)&&!e.ok){o=!1;let r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,i="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:"error",message:r,description:i})}else if(void 0!==t.success){o=!1;let r="function"==typeof t.success?await t.success(e):t.success,i="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"success",message:r,description:i})}}).catch(async e=>{if(s=["reject",e],void 0!==t.error){o=!1;let r="function"==typeof t.error?await t.error(e):t.error,i="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"error",message:r,description:i})}}).finally(()=>{var e;o&&(this.dismiss(n),n=void 0),null==(e=t.finally)||e.call(t)}),l=()=>new Promise((e,t)=>a.then(()=>"reject"===s[0]?t(s[1]):e(s[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(null==t?void 0:t.id)||p++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},g=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,v=Object.assign((e,t)=>{let n=(null==t?void 0:t.id)||p++;return m.addToast({title:e,...t,id:n}),n},{success:m.success,info:m.info,warning:m.warning,error:m.error,custom:m.custom,message:m.message,promise:m.promise,dismiss:m.dismiss,loading:m.loading},{getHistory:()=>m.toasts,getToasts:()=>m.getActiveToasts()});function y(e){return void 0!==e.label}function w(...e){return e.filter(Boolean).join(" ")}!function(e,{insertAt:t}={}){if(!e||"undefined"==typeof document)return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);var b=e=>{var t,n,i,s,l,c,u,h,p,m,g,v,b,_;let{invert:S,toast:C,unstyled:E,interacting:x,setHeights:T,visibleToasts:I,heights:P,index:A,toasts:k,expanded:O,removeToast:R,defaultRichColors:M,closeButton:j,style:L,cancelButtonStyle:N,actionButtonStyle:D,className:V="",descriptionClassName:F="",duration:B,position:U,gap:H,loadingIcon:q,expandByDefault:z,classNames:$,icons:W,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:G}=e,[Y,Z]=r.useState(null),[X,J]=r.useState(null),[Q,ee]=r.useState(!1),[et,en]=r.useState(!1),[er,ei]=r.useState(!1),[eo,es]=r.useState(!1),[ea,el]=r.useState(!1),[ec,eu]=r.useState(0),[eh,ed]=r.useState(0),ef=r.useRef(C.duration||B||4e3),ep=r.useRef(null),em=r.useRef(null),eg=0===A,ev=A+1<=I,ey=C.type,ew=!1!==C.dismissible,eb=C.className||"",e_=C.descriptionClassName||"",eS=r.useMemo(()=>P.findIndex(e=>e.toastId===C.id)||0,[P,C.id]),eC=r.useMemo(()=>{var e;return null!=(e=C.closeButton)?e:j},[C.closeButton,j]),eE=r.useMemo(()=>C.duration||B||4e3,[C.duration,B]),ex=r.useRef(0),eT=r.useRef(0),eI=r.useRef(0),eP=r.useRef(null),[eA,ek]=U.split("-"),eO=r.useMemo(()=>P.reduce((e,t,n)=>n>=eS?e:e+t.height,0),[P,eS]),eR=f(),eM=C.invert||S,ej="loading"===ey;eT.current=r.useMemo(()=>eS*H+eO,[eS,eO]),r.useEffect(()=>{ef.current=eE},[eE]),r.useEffect(()=>{ee(!0)},[]),r.useEffect(()=>{let e=em.current;if(e){let t=e.getBoundingClientRect().height;return ed(t),T(e=>[{toastId:C.id,height:t,position:C.position},...e]),()=>T(e=>e.filter(e=>e.toastId!==C.id))}},[T,C.id]),r.useLayoutEffect(()=>{if(!Q)return;let e=em.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,ed(n),T(e=>e.find(e=>e.toastId===C.id)?e.map(e=>e.toastId===C.id?{...e,height:n}:e):[{toastId:C.id,height:n,position:C.position},...e])},[Q,C.title,C.description,T,C.id]);let eL=r.useCallback(()=>{en(!0),eu(eT.current),T(e=>e.filter(e=>e.toastId!==C.id)),setTimeout(()=>{R(C)},200)},[C,R,T,eT]);return r.useEffect(()=>{let e;if((!C.promise||"loading"!==ey)&&C.duration!==1/0&&"loading"!==C.type)return O||x||G&&eR?(()=>{if(eI.current{var e;null==(e=C.onAutoClose)||e.call(C,C),eL()},ef.current)),()=>clearTimeout(e)},[O,x,C,ey,G,eR,eL]),r.useEffect(()=>{C.delete&&eL()},[eL,C.delete]),r.createElement("li",{tabIndex:0,ref:em,className:w(V,eb,null==$?void 0:$.toast,null==(t=null==C?void 0:C.classNames)?void 0:t.toast,null==$?void 0:$.default,null==$?void 0:$[ey],null==(n=null==C?void 0:C.classNames)?void 0:n[ey]),"data-sonner-toast":"","data-rich-colors":null!=(i=C.richColors)?i:M,"data-styled":!(C.jsx||C.unstyled||E),"data-mounted":Q,"data-promise":!!C.promise,"data-swiped":ea,"data-removed":et,"data-visible":ev,"data-y-position":eA,"data-x-position":ek,"data-index":A,"data-front":eg,"data-swiping":er,"data-dismissible":ew,"data-type":ey,"data-invert":eM,"data-swipe-out":eo,"data-swipe-direction":X,"data-expanded":!!(O||z&&Q),style:{"--index":A,"--toasts-before":A,"--z-index":k.length-A,"--offset":`${et?ec:eT.current}px`,"--initial-height":z?"auto":`${eh}px`,...L,...C.style},onDragEnd:()=>{ei(!1),Z(null),eP.current=null},onPointerDown:e=>{ej||!ew||(ep.current=new Date,eu(eT.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(ei(!0),eP.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r;if(eo||!ew)return;eP.current=null;let i=Number((null==(e=em.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=em.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=new Date().getTime()-(null==(n=ep.current)?void 0:n.getTime()),a="x"===Y?i:o;if(Math.abs(a)>=20||Math.abs(a)/s>.11){eu(eT.current),null==(r=C.onDismiss)||r.call(C,C),J("x"===Y?i>0?"right":"left":o>0?"down":"up"),eL(),es(!0),el(!1);return}ei(!1),Z(null)},onPointerMove:t=>{var n,r,i,o;if(!eP.current||!ew||(null==(n=window.getSelection())?void 0:n.toString().length)>0)return;let s=t.clientY-eP.current.y,a=t.clientX-eP.current.x,l=null!=(r=e.swipeDirections)?r:function(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(U);!Y&&(Math.abs(a)>1||Math.abs(s)>1)&&Z(Math.abs(a)>Math.abs(s)?"x":"y");let c={x:0,y:0};"y"===Y?(l.includes("top")||l.includes("bottom"))&&(l.includes("top")&&s<0||l.includes("bottom")&&s>0)&&(c.y=s):"x"===Y&&(l.includes("left")||l.includes("right"))&&(l.includes("left")&&a<0||l.includes("right")&&a>0)&&(c.x=a),(Math.abs(c.x)>0||Math.abs(c.y)>0)&&el(!0),null==(i=em.current)||i.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(o=em.current)||o.style.setProperty("--swipe-amount-y",`${c.y}px`)}},eC&&!C.jsx?r.createElement("button",{"aria-label":K,"data-disabled":ej,"data-close-button":!0,onClick:ej||!ew?()=>{}:()=>{var e;eL(),null==(e=C.onDismiss)||e.call(C,C)},className:w(null==$?void 0:$.closeButton,null==(s=null==C?void 0:C.classNames)?void 0:s.closeButton)},null!=(l=null==W?void 0:W.close)?l:d):null,C.jsx||(0,r.isValidElement)(C.title)?C.jsx?C.jsx:"function"==typeof C.title?C.title():C.title:r.createElement(r.Fragment,null,ey||C.icon||C.promise?r.createElement("div",{"data-icon":"",className:w(null==$?void 0:$.icon,null==(c=null==C?void 0:C.classNames)?void 0:c.icon)},C.promise||"loading"===C.type&&!C.icon?C.icon||(null!=W&&W.loading?r.createElement("div",{className:w(null==$?void 0:$.loader,null==(v=null==C?void 0:C.classNames)?void 0:v.loader,"sonner-loader"),"data-visible":"loading"===ey},W.loading):q?r.createElement("div",{className:w(null==$?void 0:$.loader,null==(b=null==C?void 0:C.classNames)?void 0:b.loader,"sonner-loader"),"data-visible":"loading"===ey},q):r.createElement(a,{className:w(null==$?void 0:$.loader,null==(_=null==C?void 0:C.classNames)?void 0:_.loader),visible:"loading"===ey})):null,"loading"!==C.type?C.icon||(null==W?void 0:W[ey])||o(ey):null):null,r.createElement("div",{"data-content":"",className:w(null==$?void 0:$.content,null==(u=null==C?void 0:C.classNames)?void 0:u.content)},r.createElement("div",{"data-title":"",className:w(null==$?void 0:$.title,null==(h=null==C?void 0:C.classNames)?void 0:h.title)},"function"==typeof C.title?C.title():C.title),C.description?r.createElement("div",{"data-description":"",className:w(F,e_,null==$?void 0:$.description,null==(p=null==C?void 0:C.classNames)?void 0:p.description)},"function"==typeof C.description?C.description():C.description):null),(0,r.isValidElement)(C.cancel)?C.cancel:C.cancel&&y(C.cancel)?r.createElement("button",{"data-button":!0,"data-cancel":!0,style:C.cancelButtonStyle||N,onClick:e=>{var t,n;y(C.cancel)&&ew&&(null==(n=(t=C.cancel).onClick)||n.call(t,e),eL())},className:w(null==$?void 0:$.cancelButton,null==(m=null==C?void 0:C.classNames)?void 0:m.cancelButton)},C.cancel.label):null,(0,r.isValidElement)(C.action)?C.action:C.action&&y(C.action)?r.createElement("button",{"data-button":!0,"data-action":!0,style:C.actionButtonStyle||D,onClick:e=>{var t,n;y(C.action)&&(null==(n=(t=C.action).onClick)||n.call(t,e),e.defaultPrevented||eL())},className:w(null==$?void 0:$.actionButton,null==(g=null==C?void 0:C.classNames)?void 0:g.actionButton)},C.action.label):null))};function _(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var S=(0,r.forwardRef)(function(e,t){let{invert:n,position:o="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:h,theme:d="light",richColors:f,duration:p,style:g,visibleToasts:v=3,toastOptions:y,dir:w=_(),gap:S=14,loadingIcon:C,icons:E,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:T}=e,[I,P]=r.useState([]),A=r.useMemo(()=>Array.from(new Set([o].concat(I.filter(e=>e.position).map(e=>e.position)))),[I,o]),[k,O]=r.useState([]),[R,M]=r.useState(!1),[j,L]=r.useState(!1),[N,D]=r.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=r.useRef(null),F=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=r.useRef(null),U=r.useRef(!1),H=r.useCallback(e=>{P(t=>{var n;return null!=(n=t.find(t=>t.id===e.id))&&n.delete||m.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return r.useEffect(()=>m.subscribe(e=>{if(e.dismiss){P(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{i.flushSync(()=>{P(t=>{let n=t.findIndex(t=>t.id===e.id);return -1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[]),r.useEffect(()=>{if("system"!==d){D(d);return}if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{D(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{D(e?"dark":"light")}catch(e){console.error(e)}})}},[d]),r.useEffect(()=>{I.length<=1&&M(!1)},[I]),r.useEffect(()=>{let e=e=>{var t,n;s.every(t=>e[t]||e.code===t)&&(M(!0),null==(t=V.current)||t.focus()),"Escape"===e.code&&(document.activeElement===V.current||null!=(n=V.current)&&n.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]),r.useEffect(()=>{if(V.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,U.current=!1)}},[V.current]),r.createElement("section",{ref:t,"aria-label":`${x} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((t,i)=>{var o;let s;let[d,m]=t.split("-");return I.length?r.createElement("ol",{key:t,dir:"auto"===w?_():w,tabIndex:-1,ref:V,className:c,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":d,"data-lifted":R&&I.length>1&&!a,"data-x-position":m,style:{"--front-toast-height":`${(null==(o=k[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${S}px`,...g,...(s={},[u,h].forEach((e,t)=>{let n=1===t,r=n?"--mobile-offset":"--offset",i=n?"16px":"32px";function o(e){["top","right","bottom","left"].forEach(t=>{s[`${r}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?o(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?s[`${r}-${t}`]=i:s[`${r}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):o(i)}),s)},onBlur:e=>{U.current&&!e.currentTarget.contains(e.relatedTarget)&&(U.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||U.current||(U.current=!0,B.current=e.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{j||M(!1)},onDragEnd:()=>M(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L(!0)},onPointerUp:()=>L(!1)},I.filter(e=>!e.position&&0===i||e.position===t).map((i,o)=>{var s,c;return r.createElement(b,{key:i.id,icons:E,index:o,toast:i,defaultRichColors:f,duration:null!=(s=null==y?void 0:y.duration)?s:p,className:null==y?void 0:y.className,descriptionClassName:null==y?void 0:y.descriptionClassName,invert:n,visibleToasts:v,closeButton:null!=(c=null==y?void 0:y.closeButton)?c:l,interacting:j,position:t,style:null==y?void 0:y.style,unstyled:null==y?void 0:y.unstyled,classNames:null==y?void 0:y.classNames,cancelButtonStyle:null==y?void 0:y.cancelButtonStyle,actionButtonStyle:null==y?void 0:y.actionButtonStyle,removeToast:H,toasts:I.filter(e=>e.position==i.position),heights:k.filter(e=>e.position==i.position),setHeights:O,expandByDefault:a,gap:S,loadingIcon:C,expanded:R,pauseWhenPageIsHidden:T,swipeDirections:e.swipeDirections})})):null}))})},89426:function(e){"use strict";e.exports=JSON.parse('{"id":"google-analytics","description":"Install a Google Analytics tag on your website","website":"https://analytics.google.com/analytics/web/","scripts":[{"url":"https://www.googletagmanager.com/gtag/js","params":["id"],"strategy":"worker","location":"head","action":"append"},{"code":"window.dataLayer=window.dataLayer||[];window.gtag=function gtag(){window.dataLayer.push(arguments);};gtag(\'js\',new Date());gtag(\'config\',\'${args.id}\')","strategy":"worker","location":"head","action":"append"}]}')},27395:function(e){"use strict";e.exports=JSON.parse('{"id":"google-maps-embed","description":"Embed a Google Maps embed on your webpage","website":"https://developers.google.com/maps/documentation/embed/get-started","html":{"element":"iframe","attributes":{"loading":"lazy","src":{"url":"https://www.google.com/maps/embed/v1/place","slugParam":"mode","params":["key","q","center","zoom","maptype","language","region"]},"referrerpolicy":"no-referrer-when-downgrade","frameborder":"0","style":"border:0","allowfullscreen":true,"width":null,"height":null}}}')},88420:function(e){"use strict";e.exports=JSON.parse('{"id":"youtube-embed","description":"Embed a YouTube embed on your webpage.","website":"https://github.com/paulirish/lite-youtube-embed","html":{"element":"lite-youtube","attributes":{"videoid":null,"playlabel":null}},"stylesheets":["https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.css"],"scripts":[{"url":"https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.js","strategy":"idle","location":"head","action":"append"}]}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(43079)}),_N_E=e.O()}]);