1(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1590],{53080:(B,G,a)=>{"use strict";a.d(G,{SM:()=>Ne,AN:()=>Ie,KC:()=>ye,Yz:()=>ee});var v=a(53252),b=a(70800),_={error:"cordova_not_available"},C={error:"plugin_not_installed"};function P(We){if(typeof window<"u"&&window.angular){var Ut=window.document,it=window.angular.element(Ut.querySelector("[ng-app]")||Ut.body).injector();if(it)return it.get("$q")(function(se,ce){We(se,ce)});console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise(function(se,ce){We(se,ce)});console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function D(We,At,Ut){var it,ue;"string"==typeof We?it=We:(it=We.constructor.getPluginRef(),Ut=We.constructor.getPluginName(),ue=We.constructor.getPluginInstallName());var se=we(it);return!(!se||At&&typeof se[At]>"u")||(typeof window>"u"||!window.cordova?(function Se(We,At){typeof process>"u"&&console.warn(At?"Native: tried calling "+We+"."+At+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator":"Native: tried accessing the "+We+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}(Ut,At),_):(function Y(We,At,Ut){console.warn(Ut?"Native: tried calling "+We+"."+Ut+", but the "+We+" plugin is not installed.":"Native: tried accessing the "+We+" plugin but it's not installed."),At&&console.warn("Install the "+We+" plugin: 'ionic cordova plugin add "+At+"'")}(Ut,ue,At),C))}function ee(We,At){return We._objectInstance&&(!At||typeof We._objectInstance[At]<"u")}function te(We,At,Ut,it){if(void 0===At&&(At={}),At.sync)return We;if("reverse"===At.callbackOrder)We.unshift(it),We.unshift(Ut);else if("node"===At.callbackStyle)We.push(function(K,_e){K?it(K):Ut(_e)});else if("object"===At.callbackStyle&&At.successName&&At.errorName){var ue={};ue[At.successName]=Ut,ue[At.errorName]=it,We.push(ue)}else if(typeof At.successIndex<"u"||typeof At.errorIndex<"u"){var se=function(){At.successIndex>We.length?We[At.successIndex]=Ut:We.splice(At.successIndex,0,Ut)},ce=function(){At.errorIndex>We.length?We[At.errorIndex]=it:We.splice(At.errorIndex,0,it)};At.successIndex>At.errorIndex?(ce(),se()):(se(),ce())}else We.push(Ut),We.push(it);return We}function J(We,At,Ut,it,ue,se){void 0===it&&(it={}),Ut=te(Ut,it,ue,se);var ce=D(We,At);if(!0===ce){var K=we(We.constructor.getPluginRef());return K[At].apply(K,Ut)}return ce}function Q(We,At,Ut,it,ue,se){if(void 0===it&&(it={}),Ut=te(Ut,it,ue,se),ee(We,At))return We._objectInstance[At].apply(We._objectInstance,Ut)}function we(We){return typeof window<"u"?de(window,We):null}function de(We,At){for(var Ut=At.split("."),it=We,ue=0;ue<Ut.length;ue++){if(!it)return null;it=it[Ut[ue]]}return it}var Ye=function(We,At,Ut){return void 0===Ut&&(Ut={}),function(){for(var it=[],ue=0;ue<arguments.length;ue++)it[ue]=arguments[ue];return Ut.sync?J(We,At,it,Ut):Ut.observable?function k(We,At,Ut,it){return void 0===it&&(it={}),new v._(function(ue){var se;return se=it.destruct?J(We,At,Ut,it,function(){for(var ce=[],K=0;K<arguments.length;K++)ce[K]=arguments[K];return ue.next(ce)},function(){for(var ce=[],K=0;K<arguments.length;K++)ce[K]=arguments[K];return ue.error(ce)}):J(We,At,Ut,it,ue.next.bind(ue),ue.error.bind(ue)),se&&se.error&&(ue.error(se.error),ue.complete()),function(){try{if(it.clearFunction)return it.clearWithArgs?J(We,it.clearFunction,Ut,it,ue.next.bind(ue),ue.error.bind(ue)):J(We,it.clearFunction,[])}catch(ce){console.warn("Unable to clear the previous observable watch for",We.constructor.getPluginName(),At),console.warn(ce)}}})}(We,At,it,Ut):Ut.eventObservable&&Ut.event?function x(We,At){return At=typeof window<"u"&&At?de(window,At):At||(typeof window<"u"?window:{}),(0,b.w)(At,We)}(Ut.event,Ut.element):Ut.otherPromise?function R(We,At,Ut,it){return void 0===it&&(it={}),P(function(ue,se){var ce=J(We,At,Ut,it);ce?ce.error?se(ce.error):ce.then&&ce.then(ue).catch(se):se({error:"unexpected_error"})})}(We,At,it,Ut):function S(We,At,Ut,it){void 0===it&&(it={});var ue,se,ce=P(function(K,_e){ue=it.destruct?J(We,At,Ut,it,function(){for(var Pe=[],De=0;De<arguments.length;De++)Pe[De]=arguments[De];return K(Pe)},function(){for(var Pe=[],De=0;De<arguments.length;De++)Pe[De]=arguments[De];return _e(Pe)}):J(We,At,Ut,it,K,_e),se=_e});return ue&&ue.error&&(ce.catch(function(){}),"function"==typeof se&&se(ue.error)),ce}(We,At,it,Ut)}},Ne=function(){function We(){}return We.installed=function(){return!0===D(this.pluginRef)},We.getPlugin=function(){return typeof window<"u"?function ae(We,At){for(var Ut=At.split("."),it=We,ue=0;ue<Ut.length;ue++){if(!it)return null;it=it[Ut[ue]]}return it}(window,this.pluginRef):null},We.getPluginName=function(){return this.pluginName},We.getPluginRef=function(){return this.pluginRef},We.getPluginInstallName=function(){return this.plugin}
1,We.getSupportedPlatforms=function(){return this.platforms},We.pluginName="",We.pluginRef="",We.plugin="",We.repo="",We.platforms=[],We.install="",We}();function Ie(We,At,Ut,it){return Ye(We,At,Ut).apply(this,it)}function ye(We,At,Ut,it){return it=Array.from(it),function pe(We,At,Ut){return void 0===Ut&&(Ut={}),function(){for(var it=[],ue=0;ue<arguments.length;ue++)it[ue]=arguments[ue];if(Ut.sync)return Q(We,At,it,Ut);if(Ut.observable)return new v._(function(_e){var Pe;return Pe=Ut.destruct?Q(We,At,it,Ut,function(){for(var De=[],ke=0;ke<arguments.length;ke++)De[ke]=arguments[ke];return _e.next(De)},function(){for(var De=[],ke=0;ke<arguments.length;ke++)De[ke]=arguments[ke];return _e.error(De)}):Q(We,At,it,Ut,_e.next.bind(_e),_e.error.bind(_e)),Pe&&Pe.error&&_e.error(Pe.error),function(){try{return Ut.clearWithArgs?Q(We,Ut.clearFunction,it,Ut,_e.next.bind(_e),_e.error.bind(_e)):Q(We,Ut.clearFunction,[])}catch(De){console.warn("Unable to clear the previous observable watch for",We.constructor.getPluginName(),At),console.warn(De)}}});if(Ut.otherPromise)return P(function(_e,Pe){var De;De=Ut.destruct?Q(We,At,it,Ut,function(){for(var ke=[],Lt=0;Lt<arguments.length;Lt++)ke[Lt]=arguments[Lt];return _e(ke)},function(){for(var ke=[],Lt=0;Lt<arguments.length;Lt++)ke[Lt]=arguments[Lt];return Pe(ke)}):Q(We,At,it,Ut,_e,Pe),De&&De.then?De.then(_e,Pe):Pe()});var se,ce,K=P(function(_e,Pe){se=Ut.destruct?Q(We,At,it,Ut,function(){for(var De=[],ke=0;ke<arguments.length;ke++)De[ke]=arguments[ke];return _e(De)},function(){for(var De=[],ke=0;ke<arguments.length;ke++)De[ke]=arguments[ke];return Pe(De)}):Q(We,At,it,Ut,_e,Pe),ce=Pe});return se&&se.error&&(K.catch(function(){}),"function"==typeof ce&&ce(se.error)),K}}(We,At,Ut).apply(this,it)}!function i(){if(typeof process>"u"){var We=typeof window<"u"?window:{},Ut=Date.now(),it=!1;We.document.addEventListener("deviceready",function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-Ut)+" ms"),it=!0}),setTimeout(function(){!it&&We.cordova&&console.warn("Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")},5e3)}}()},73940:(B,G,a)=>{"use strict";a.d(G,{E:()=>_,Y:()=>C});var i=a(81316),v=a(53080),b=a(32116),_=function(){function P(){}return P.ASAuthorizationScopeFullName=0,P.ASAuthorizationScopeEmail=1,P}(),C=function(P){function S(){return null!==P&&P.apply(this,arguments)||this}return(0,i.ct)(S,P),S.prototype.signin=function(R){return void 0===R&&(R={}),(0,v.AN)(this,"signin",{},arguments)},S.\u0275fac=(()=>{let R;return function(x){return(R||(R=b.otF(S)))(x||S)}})(),S.\u0275prov=b.wxM({token:S,factory:S.\u0275fac}),S.pluginName="Sign in with Apple",S.plugin="cordova-plugin-sign-in-with-apple",S.pluginRef="cordova.plugins.SignInWithApple",S.repo="https://github.com/twogate/cordova-plugin-sign-in-with-apple",S.platforms=["iOS"],S=(0,i.UN)([],S)}(v.SM)},25718:(B,G,a)=>{"use strict";a.d(G,{wP:()=>Om,Km:()=>kd,Om:()=>Ap,YD:()=>ma,E3:()=>Zc,UD:()=>Yc,Mm:()=>Xr,Ez:()=>Rp,EL:()=>gh,uI:()=>qc,kR:()=>io,k5:()=>Fp,K2:()=>Ga,o1:()=>Vi,gH:()=>zs,YX:()=>to,K4:()=>ji,Qj:()=>eu,ss:()=>yt,k1:()=>Tp,sB:()=>TE,AX:()=>yb,cT:()=>vb,y0:()=>lE,oV:()=>_p,c7:()=>iE,Cw:()=>bf,oh:()=>SE,cr:()=>Ry,Mp:()=>cE,UN:()=>ty,_Q:()=>aE,Ej:()=>ny,If:()=>uE,eg:()=>ph,Ar:()=>mE,Ws:()=>va,_M:()=>Vd,i4:()=>Ey,yS:()=>bE,cb:()=>IE,uY:()=>Lm,MP:()=>Fm,aC:()=>wy,AF:()=>Eb,Yf:()=>hh,_6:()=>fb,uG:()=>Tm,ee:()=>dE,ag:()=>CE,oX:()=>_E,k$:()=>cy,kt:()=>Qc,C:()=>Sm,G6:()=>sE,k9:()=>Py,S:()=>xE,Sm:()=>Um,QN:()=>X,iW:()=>yy,SQ:()=>fy,kf:()=>dy,gD:()=>Vm,cl:()=>iy,A9:()=>uy});var R,i=a(73448),v=a(99360),b=a(12540),_=a(95976),C=a(27144),P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S={},k=k||{},x=P||self;function D(o){var e=typeof o;return"array"==(e="object"!=e?e:o?Array.isArray(o)?"array":e:"null")||"object"==e&&"number"==typeof o.length}function ee(o){var e=typeof o;return"object"==e&&null!=o||"function"==e}var J="closure_uid_"+(1e9*Math.random()>>>0),Q=0;function we(o,e,r){return o.call.apply(o.bind,arguments)}function de(o,e,r){if(!o)throw Error();if(2<arguments.length){var u=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(d,u),o.apply(e,d)}}return function(){return o.apply(e,arguments)}}function Y(o,e,r){return(Y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?we:de).apply(null,arguments)}
1function Se(o,e){var r=Array.prototype.slice.call(arguments,1);return function(){var u=r.slice();return u.push.apply(u,arguments),o.apply(this,u)}}function Ye(o,e){function r(){}r.prototype=e.prototype,o.$=e.prototype,o.prototype=new r,o.prototype.constructor=o,o.ac=function(u,d,p){for(var w=Array(arguments.length-2),re=2;re<arguments.length;re++)w[re-2]=arguments[re];return e.prototype[d].apply(u,w)}}function pe(){this.s=this.s,this.o=this.o}pe.prototype.s=!1,pe.prototype.sa=function(){!this.s&&(this.s=!0,this.N(),0)&&function te(o){Object.prototype.hasOwnProperty.call(o,J)&&o[J]||(o[J]=++Q)}(this)},pe.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const Ve=Array.prototype.indexOf?function(o,e){return Array.prototype.indexOf.call(o,e,void 0)}:function(o,e){if("string"==typeof o)return"string"!=typeof e||1!=e.length?-1:o.indexOf(e,0);for(let r=0;r<o.length;r++)if(r in o&&o[r]===e)return r;return-1};function Ne(o){const e=o.length;if(0<e){const r=Array(e);for(let u=0;u<e;u++)r[u]=o[u];return r}return[]}function Ie(o,e){for(let r=1;r<arguments.length;r++){const u=arguments[r];if(D(u)){const d=o.length||0,p=u.length||0;o.length=d+p;for(let w=0;w<p;w++)o[d+w]=u[w]}else o.push(u)}}function H(o,e){this.type=o,this.g=this.target=e,this.defaultPrevented=!1}H.prototype.h=function(){this.defaultPrevented=!0};var j=function(){if(!x.addEventListener||!Object.defineProperty)return!1;var o=!1,e=Object.defineProperty({},"passive",{get:function(){o=!0}});try{const r=()=>{};x.addEventListener("test",r,e),x.removeEventListener("test",r,e)}catch{}return o}();function ye(o){return/^[\s\xa0]*$/.test(o)}function Le(){var o=x.navigator;return o&&(o=o.userAgent)?o:""}function W(o){return-1!=Le().indexOf(o)}function We(o){return We[" "](o),o}We[" "]=function(){};var Pe,o,Ut=W("Opera"),it=W("Trident")||W("MSIE"),ue=W("Edge"),se=ue||it,ce=W("Gecko")&&!(-1!=Le().toLowerCase().indexOf("webkit")&&!W("Edge"))&&!(W("Trident")||W("MSIE"))&&!W("Edge"),K=-1!=Le().toLowerCase().indexOf("webkit")&&!W("Edge");function _e(){var o=x.document;return o?o.documentMode:void 0}e:{var De="",ke=(o=Le(),ce?/rv:([^\);]+)(\)|;)/.exec(o):ue?/Edge\/([\d\.]+)/.exec(o):it?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(o):K?/WebKit\/(\S+)/.exec(o):Ut?/(?:Version)[ \/]?(\S+)/.exec(o):void 0);if(ke&&(De=ke?ke[1]:""),it){var Lt=_e();if(null!=Lt&&Lt>parseFloat(De)){Pe=String(Lt);break e}}Pe=De}var ge=x.document&&it&&(_e()||parseInt(Pe,10))||void 0;function xt(o,e){if(H.call(this,o?o.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,o){var r=this.type=o.type,u=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:null;if(this.target=o.target||o.srcElement,this.g=e,e=o.relatedTarget){if(ce){e:{try{We(e.nodeName);var d=!0;break e}catch{}d=!1}d||(e=null)}}else"mouseover"==r?e=o.fromElement:"mouseout"==r&&(e=o.toElement);this.relatedTarget=e,u?(this.clientX=void 0!==u.clientX?u.clientX:u.pageX,this.clientY=void 0!==u.clientY?u.clientY:u.pageY,this.screenX=u.screenX||0,this.screenY=u.screenY||0):(this.clientX=void 0!==o.clientX?o.clientX:o.pageX,this.clientY=void 0!==o.clientY?o.clientY:o.pageY,this.screenX=o.screenX||0,this.screenY=o.screenY||0),this.button=o.button,this.key=o.key||"",this.ctrlKey=o.ctrlKey,this.altKey=o.altKey,this.shiftKey=o.shiftKey,this.metaKey=o.metaKey,this.pointerId=o.pointerId||0,this.pointerType="string"==typeof o.pointerType?o.pointerType:pt[o.pointerType]||"",this.state=o.state,this.i=o,o.defaultPrevented&&xt.$.h.call(this)}}Ye(xt,H);var pt={2:"touch",3:"pen",4:"mouse"};xt.prototype.h=function(){xt.$.h.call(this);var o=this.i;o.preventDefault?o.preventDefault():o.returnValue=!1};var rn="closure_listenable_"+(1e6*Math.random()|0),cn=0;function mn(o,e,r,u,d){this.listener=o,this.proxy=null,this.src=e,this.type=r,this.capture=!!u,this.la=d,this.key=++cn,this.fa=this.ia=!1}function dt(o){o.fa=!0,o.listener=null,o.proxy=null,o.src=null,o.la=null}function lt(o,e,r){for(const u in o)e.call(r,o[u],u,o)}function kt(o){const e={};for(const r in o)e[r]=o[r];return e}const an="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
1ing toString valueOf".split(" ");function Yn(o,e){let r,u;for(let d=1;d<arguments.length;d++){for(r in u=arguments[d],u)o[r]=u[r];for(let p=0;p<an.length;p++)r=an[p],Object.prototype.hasOwnProperty.call(u,r)&&(o[r]=u[r])}}function bn(o){this.src=o,this.g={},this.h=0}function Hn(o,e){var r=e.type;if(r in o.g){var p,u=o.g[r],d=Ve(u,e);(p=0<=d)&&Array.prototype.splice.call(u,d,1),p&&(dt(e),0==o.g[r].length&&(delete o.g[r],o.h--))}}function Fn(o,e,r,u){for(var d=0;d<o.length;++d){var p=o[d];if(!p.fa&&p.listener==e&&p.capture==!!r&&p.la==u)return d}return-1}bn.prototype.add=function(o,e,r,u,d){var p=o.toString();(o=this.g[p])||(o=this.g[p]=[],this.h++);var w=Fn(o,e,u,d);return-1<w?(e=o[w],r||(e.ia=!1)):((e=new mn(e,this.src,p,!!u,d)).ia=r,o.push(e)),e};var On="closure_lm_"+(1e6*Math.random()|0),gr={};function Mr(o,e,r,u,d){if(u&&u.once)return ti(o,e,r,u,d);if(Array.isArray(e)){for(var p=0;p<e.length;p++)Mr(o,e[p],r,u,d);return null}return r=sn(r),o&&o[rn]?o.O(e,r,ee(u)?!!u.capture:!!u,d):Vr(o,e,r,!1,u,d)}function Vr(o,e,r,u,d,p){if(!e)throw Error("Invalid event type");var w=ee(d)?!!d.capture:!!d,re=or(o);if(re||(o[On]=re=new bn(o)),(r=re.add(e,r,u,w,p)).proxy)return r;if(u=function Fr(){const e=sr;return function o(r){return e.call(o.src,o.listener,r)}}(),r.proxy=u,u.src=o,u.listener=r,o.addEventListener)j||(d=w),void 0===d&&(d=!1),o.addEventListener(e.toString(),u,d);else if(o.attachEvent)o.attachEvent(Jr(e.toString()),u);else{if(!o.addListener||!o.removeListener)throw Error("addEventListener and attachEvent are unavailable.");o.addListener(u)}return r}function ti(o,e,r,u,d){if(Array.isArray(e)){for(var p=0;p<e.length;p++)ti(o,e[p],r,u,d);return null}return r=sn(r),o&&o[rn]?o.P(e,r,ee(u)?!!u.capture:!!u,d):Vr(o,e,r,!0,u,d)}function Nr(o,e,r,u,d){if(Array.isArray(e))for(var p=0;p<e.length;p++)Nr(o,e[p],r,u,d);else u=ee(u)?!!u.capture:!!u,r=sn(r),o&&o[rn]?(o=o.i,(e=String(e).toString())in o.g&&-1<(r=Fn(p=o.g[e],r,u,d))&&(dt(p[r]),Array.prototype.splice.call(p,r,1),0==p.length&&(delete o.g[e],o.h--))):o&&(o=or(o))&&(e=o.g[e.toString()],o=-1,e&&(o=Fn(e,r,u,d)),(r=-1<o?e[o]:null)&&Kr(r))}function Kr(o){if("number"!=typeof o&&o&&!o.fa){var e=o.src;if(e&&e[rn])Hn(e.i,o);else{var r=o.type,u=o.proxy;e.removeEventListener?e.removeEventListener(r,u,o.capture):e.detachEvent?e.detachEvent(Jr(r),u):e.addListener&&e.removeListener&&e.removeListener(u),(r=or(e))?(Hn(r,o),0==r.h&&(r.src=null,e[On]=null)):dt(o)}}}function Jr(o){return o in gr?gr[o]:gr[o]="on"+o}function sr(o,e){if(o.fa)o=!0;else{e=new xt(e,this);var r=o.listener,u=o.la||o.src;o.ia&&Kr(o),o=r.call(u,e)}return o}function or(o){return(o=o[On])instanceof bn?o:null}var zr="__closure_events_fn_"+(1e9*Math.random()>>>0);function sn(o){return"function"==typeof o?o:(o[zr]||(o[zr]=function(e){return o.handleEvent(e)}),o[zr])}function Qe(){pe.call(this),this.i=new bn(this),this.S=this,this.J=null}function ut(o,e){var r,u=o.J;if(u)for(r=[];u;u=u.J)r.push(u);if(o=o.S,u=e.type||e,"string"==typeof e)e=new H(e,o);else if(e instanceof H)e.target=e.target||o;else{var d=e;Yn(e=new H(u,o),d)}if(d=!0,r)for(var p=r.length-1;0<=p;p--){var w=e.g=r[p];d=Xt(w,u,!0,e)&&d}if(d=Xt(w=e.g=o,u,!0,e)&&d,d=Xt(w,u,!1,e)&&d,r)for(p=0;p<r.length;p++)d=Xt(w=e.g=r[p],u,!1,e)&&d}function Xt(o,e,r,u){if(!(e=o.i.g[String(e)]))return!0;e=e.concat();for(var d=!0,p=0;p<e.length;++p){var w=e[p];if(w&&!w.fa&&w.capture==r){var re=w.listener,Te=w.la||w.src;w.ia&&Hn(o.i,w),d=!1!==re.call(Te,u)&&d}}return d&&!u.defaultPrevented}Ye(Qe,pe),Qe.prototype[rn]=!0,Qe.prototype.removeEventListener=function(o,e,r,u){Nr(this,o,e,r,u)},Qe.prototype.N=function(){if(Qe.$.N.call(this),this.i){var e,o=this.i;for(e in o.g){for(var r=o.g[e],u=0;u<r.length;u++)dt(r[u]);delete o.g[e],o.h--}}this.J=null},Qe.prototype.O=function(o,e,r,u){return this.i.add(String(o),e,!1,r,u)},Qe.prototype.P=function(o,e,r,u){return this.i.add(String(o),e,!0,r,u)};var wn=x.JSON.stringify;function vn(){var o=ft;let e=null;return o.g&&(e=o.g,o.g=o.g.next,o.g||(o.h=null),e.next=null),e}var Ct=new class dr{constructor(e,r){this.i=e,this.j=r,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}(()=>new Mt,o=>o.reset());class Mt{constructor(){this.next=this.g=this.h=null}set(e,r){this.h=e,this.g=r,this.next=null}reset(){this.next=this.g=this.h=null}}function Ze(o){var e=1;o=o.split(":");const r=[];for(;0<e&&o.length;)r.push(o.shift()),e--;return o.length&&r.push(o.join(":")),r}function et(o){x.setTimeout(()=>{throw o},0)}
1let Zt,Fe=!1,ft=new class jt{constructor(){this.h=this.g=null}add(e,r){const u=Ct.get();u.set(e,r),this.h?this.h.next=u:this.g=u,this.h=u}},dn=()=>{const o=x.Promise.resolve(void 0);Zt=()=>{o.then(Tn)}};var Tn=()=>{for(var o;o=vn();){try{o.h.call(o.g)}catch(r){et(r)}var e=Ct;e.j(o),100>e.h&&(e.h++,o.next=e.g,e.g=o)}Fe=!1};function Bn(o,e){Qe.call(this),this.h=o||1,this.g=e||x,this.j=Y(this.qb,this),this.l=Date.now()}function mr(o){o.ga=!1,o.T&&(o.g.clearTimeout(o.T),o.T=null)}function tr(o,e,r){if("function"==typeof o)r&&(o=Y(o,r));else{if(!o||"function"!=typeof o.handleEvent)throw Error("Invalid listener argument");o=Y(o.handleEvent,o)}return 2147483647<Number(e)?-1:x.setTimeout(o,e||0)}function Ir(o){o.g=tr(()=>{o.g=null,o.i&&(o.i=!1,Ir(o))},o.j);const e=o.h;o.h=null,o.m.apply(null,e)}Ye(Bn,Qe),(R=Bn.prototype).ga=!1,R.T=null,R.qb=function(){if(this.ga){var o=Date.now()-this.l;0<o&&o<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-o):(this.T&&(this.g.clearTimeout(this.T),this.T=null),ut(this,"tick"),this.ga&&(mr(this),this.start()))}},R.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())},R.N=function(){Bn.$.N.call(this),mr(this),delete this.g};class ur extends pe{constructor(e,r){super(),this.m=e,this.j=r,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:Ir(this)}N(){super.N(),this.g&&(x.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Er(o){pe.call(this),this.h=o,this.g={}}Ye(Er,pe);var Ai=[];function Di(o,e,r,u){Array.isArray(r)||(r&&(Ai[0]=r.toString()),r=Ai);for(var d=0;d<r.length;d++){var p=Mr(e,r[d],u||o.handleEvent,!1,o.h||o);if(!p)break;o.g[p.key]=p}}function Pi(o){lt(o.g,function(e,r){this.g.hasOwnProperty(r)&&Kr(e)},o),o.g={}}function nr(){this.g=!0}function $n(o,e,r,u){o.info(function(){return"XMLHTTP TEXT ("+e+"): "+function wr(o,e){if(!o.g)return e;if(!e)return null;try{var r=JSON.parse(e);if(r)for(o=0;o<r.length;o++)if(Array.isArray(r[o])){var u=r[o];if(!(2>u.length)){var d=u[1];if(Array.isArray(d)&&!(1>d.length)){var p=d[0];if("noop"!=p&&"stop"!=p&&"close"!=p)for(var w=1;w<d.length;w++)d[w]=""}}}return wn(r)}catch{return e}}(o,r)+(u?" "+u:"")})}Er.prototype.N=function(){Er.$.N.call(this),Pi(this)},Er.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},nr.prototype.Ea=function(){this.g=!1},nr.prototype.info=function(){};var mi={},di=null;function Mi(){return di=di||new Qe}function Qt(o){H.call(this,mi.Ta,o)}function _n(o){const e=Mi();ut(e,new Qt(e))}function Ln(o,e){H.call(this,mi.STAT_EVENT,o),this.stat=e}function Cn(o){const e=Mi();ut(e,new Ln(e,o))}function kr(o,e){H.call(this,mi.Ua,o),this.size=e}function si(o,e){if("function"!=typeof o)throw Error("Fn must not be null and must be a function");return x.setTimeout(function(){o()},e)}mi.Ta="serverreachability",Ye(Qt,H),mi.STAT_EVENT="statevent",Ye(Ln,H),mi.Ua="timingevent",Ye(kr,H);var oi={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},Ii={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function yi(){}function le(){}yi.prototype.h=null;var ln,me={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function Re(){H.call(this,"d")}function Pt(){H.call(this,"c")}function En(){}function Mn(o,e,r,u){this.l=o,this.j=e,this.m=r,this.W=u||1,this.U=new Er(this),this.P=Br,this.V=new Bn(o=se?125:void 0),this.I=null,this.i=!1,this.u=this.B=this.A=this.L=this.G=this.Y=this.C=null,this.F=[],this.g=null,this.o=0,this.s=this.v=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new br}function br(){this.i=null,this.g="",this.h=!1}Ye(Re,H),Ye(Pt,H),Ye(En,yi),En.prototype.g=function(){return new XMLHttpRequest},En.prototype.i=function(){return{}},ln=new En;var Br=45e3,jr={},gn={};function Xe(o,e,r){o.L=1,o.A=Sr(T(e)),o.u=r,o.S=!0,Tt(o,null)}function Tt(o,e){o.G=Date.now(),pr(o),o.B=T(o.A);var r=o.B,u=o.W;Array.isArray(u)||(u=[String(u)]),fr(r.i,"t",u),o.o=0,r=o.l.J,o.h=new br,o.g=fo(o.l,r?e:null,!o.u),0<o.O&&(o.M=new ur(Y(o.Pa,o,o.g),o.O)),Di(o.U,o.g,"readystatechange",o.nb),e=o.I?kt(o.I):{},o.u?(o.v||(o.v="POST"),e["Content-Type"]="application/x-www-form-urlencoded",o.g.ha(o.B,o.v,o.u,e)):(o.v="GET",o.g.ha(o.B,o.v,null,e)),_n(),function Ht(o,e,r,u,d,p){o.info(function(){if(o.g)if(p)for(var w="",re=p.split("&"),Te=0;Te<re.length;Te++){var ct=re[Te].split("=");if(1<ct.length){var Jt=ct[0];ct=ct[1];var Dn=Jt.split("_");w=2<=Dn.length&&"type"==Dn[1]?w+(Jt+"=")+ct+"&":w+(Jt+"=redacted&")}}else w=null;else w=p;return"XMLHTTP REQ ("+u+") [attempt "+d+"]: "+e+"\n"+r+"\n"+w})}(o.j,o.v,o.B,o.m,o.W,o.u)}function An(o){return!!o.g&&"GET"==o.v&&2!=o.L&&o.l.Ha}function Nn(o,e,r){let d,u=!0;for(;!o.J&&o.o<r.length;){if(d=ir(o,r),d==gn){4==e&&(o.s=4,Cn(14),u=!1),$n(o.j,o.m,null,"[Incomplete Response]");break}if(d==jr){o.s=4,Cn(15),$n(o.j,o.m,r,"[Invalid Chunk]"),u=!1;break}$n(o.j,o.m,d,null),Hr(o,d)}An(o)&&0!=o.o&&(o.h.g=o.h.g.slice(o.o),o.o=0),4!=e||0!=r.length||o.h.h||(o.s=1,Cn(16),u=!1),o.i=o.i&&u,u?0<r.length&&!o.ba&&(o.ba=!0,(e=o.l).g==o&&e.ca&&!e.M&&(e.l.info("Great, no buffering proxy detected. Bytes received: "+r.length),ks(e),e.M=!0,Cn(11))):($n(o.j,o.m,r,"[Invalid Chunked Response]"),ri(o),qr(o))}function ir(o,e){var r=o.o,u=e.indexOf("\n",r);return-1==u?gn:(r=Number(e.substring(r,u)),isNaN(r)?jr:(u+=1)+r>e.length?gn:(e=e.slice(u,u+r),o.o=u+r,e))}function pr(o){o.Y=Date.now()+o.P,Tr(o,o.P)}function Tr(o,e){if(null!=o.C)throw Error("WatchDog timer not null");o.C=si(Y(o.lb,o),e)}function Gr(o){o.C&&(x.clearTimeout(o.C),o.C=null)}function qr(o){0==o.l.H||o.J||vo(o.l,o)}function ri(o){Gr(o);var e=o.M;e&&"function"==typeof e.sa&&e.sa(),o.M=null,mr(o.V),Pi(o.U),o.g&&(e=o.g,o.g=null,e.abort(),e.sa())}function Hr(o,e){try{var r=o.l;if(0!=r.H&&(r.g==o||Ns(r.i,o)))if(!o.K&&Ns(r.i,o)&&3==r.H){try{var u=r.Ja.g.parse(e)}catch{u=null}if(Array.isArray(u)&&3==u.length){var d=u;if(0==d[0]){e:if(!r.u){if(r.g){if(!(r.g.G+3e3<o.G))break e;as(r),Ge(r)}Ms(r),Cn(18)}}else r.Fa=d[1],0<r.Fa-r.V&&37500>d[2]&&r.G&&0==r.A&&!r.v&&(r.v=si(Y(r.ib,r),6e3));if(1>=Gs(r.i)&&r.oa){try{r.oa()}catch{}r.oa=void 0}}else ss(r,11)}else if((o.K||r.g==o)&&as(r),!ye(e))for(d=r.Ja.g.parse(e),e=0;e<d.length;e++){let ct=d[e];if(r.V=ct[0],ct=ct[1],2==r.H)if("c"==ct[0]){r.K=ct[1],r.pa=ct[2];const Jt=ct[3];null!=Jt&&(r.ra=Jt,r.l.info("VER="+r.ra));const Dn=ct[4];null!=Dn&&(r.Ga=Dn,r.l.info("SVER="+r.Ga));const lr=ct[5];null!=lr&&"number"==typeof lr&&0<lr&&(r.L=u=1.5*lr,r.l.info("backChannelRequestTimeoutMs_="+u)),u=r;const Yr=o.g;if(Yr){const Ni=Yr.g?Yr.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Ni){var p=u.i;p.g||-1==Ni.indexOf("spdy")&&-1==Ni.indexOf("quic")&&-1==Ni.indexOf("h2")||(p.j=p.l,p.g=new Set,p.h&&(Ci(p,p.h),p.h=null))}if(u.F){const Ki=Yr.g?Yr.g.getResponseHeader("X-HTTP-Session-Id"):null;Ki&&(u.Da=Ki,Vt(u.I,u.F,Ki))}}r.H=3,r.h&&r.h.Ba(),r.ca&&(r.S=Date.now()-o.G,r.l.info("Handshake RTT: "+r.S+"ms"));var w=o;if((u=r).wa=qo(u,u.J?u.pa:null,u.Y),w.K){Js(u.i,w);var re=w,Te=u.L;Te&&re.setTimeout(Te),re.C&&(Gr(re),pr(re)),u.g=w}else us(u);0<r.j.length&&he(r)}else"stop"!=ct[0]&&"close"!=ct[0]||ss(r,7);else 3==r.H&&("stop"==ct[0]||"close"==ct[0]?"stop"==ct[0]?ss(r,7):Fi(r):"noop"!=ct[0]&&r.h&&r.h.Aa(ct),r.A=0)}_n()}catch{}}
1function bt(o,e){if(o.forEach&&"function"==typeof o.forEach)o.forEach(e,void 0);else if(D(o)||"string"==typeof o)Array.prototype.forEach.call(o,e,void 0);else for(var r=function en(o){if(o.ta&&"function"==typeof o.ta)return o.ta();if(!o.Z||"function"!=typeof o.Z){if(typeof Map<"u"&&o instanceof Map)return Array.from(o.keys());if(!(typeof Set<"u"&&o instanceof Set)){if(D(o)||"string"==typeof o){var e=[];o=o.length;for(var r=0;r<o;r++)e.push(r);return e}e=[],r=0;for(const u in o)e[r++]=u;return e}}}(o),u=function zt(o){if(o.Z&&"function"==typeof o.Z)return o.Z();if(typeof Map<"u"&&o instanceof Map||typeof Set<"u"&&o instanceof Set)return Array.from(o.values());if("string"==typeof o)return o.split("");if(D(o)){for(var e=[],r=o.length,u=0;u<r;u++)e.push(o[u]);return e}for(u in e=[],r=0,o)e[r++]=o[u];return e}(o),d=u.length,p=0;p<d;p++)e.call(void 0,u[p],r&&r[p],o)}(R=Mn.prototype).setTimeout=function(o){this.P=o},R.nb=function(o){o=o.target;const e=this.M;e&&3==Kt(o)?e.l():this.Pa(o)},R.Pa=function(o){try{if(o==this.g)e:{const Jt=Kt(this.g);var e=this.g.Ia();if(this.g.da(),!(3>Jt)&&(3!=Jt||se||this.g&&(this.h.h||this.g.ja()||Bt(this.g)))){this.J||4!=Jt||7==e||_n(),Gr(this);var r=this.g.da();this.ca=r;t:if(An(this)){var u=Bt(this.g);o="";var d=u.length,p=4==Kt(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){ri(this),qr(this);var w="";break t}this.h.i=new x.TextDecoder}for(e=0;e<d;e++)this.h.h=!0,o+=this.h.i.decode(u[e],{stream:p&&e==d-1});u.length=0,this.h.g+=o,this.o=0,w=this.h.g}else w=this.g.ja();if(this.i=200==r,function Wn(o,e,r,u,d,p,w){o.info(function(){return"XMLHTTP RESP ("+u+") [ attempt "+d+"]: "+e+"\n"+r+"\n"+p+" "+w})}
1(this.j,this.v,this.B,this.m,this.W,Jt,r),this.i){if(this.aa&&!this.K){t:{if(this.g){var re,Te=this.g;if((re=Te.g?Te.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!ye(re)){var ct=re;break t}}ct=null}if(!(r=ct)){this.i=!1,this.s=3,Cn(12),ri(this),qr(this);break e}$n(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,Hr(this,r)}this.S?(Nn(this,Jt,w),se&&this.i&&3==Jt&&(Di(this.U,this.V,"tick",this.mb),this.V.start())):($n(this.j,this.m,w,null),Hr(this,w)),4==Jt&&ri(this),this.i&&!this.J&&(4==Jt?vo(this.l,this):(this.i=!1,pr(this)))}else(function Qn(o){const e={};o=(o.g&&2<=Kt(o)&&o.g.getAllResponseHeaders()||"").split("\r\n");for(let u=0;u<o.length;u++){if(ye(o[u]))continue;var r=Ze(o[u]);const d=r[0];if("string"!=typeof(r=r[1]))continue;r=r.trim();const p=e[d]||[];e[d]=p,p.push(r)}!function rt(o,e){for(const r in o)e.call(void 0,o[r],r,o)}(e,function(u){return u.join(", ")})})(this.g),400==r&&0<w.indexOf("Unknown SID")?(this.s=3,Cn(12)):(this.s=0,Cn(13)),ri(this),qr(this)}}}catch{}},R.mb=function(){if(this.g){var o=Kt(this.g),e=this.g.ja();this.o<e.length&&(Gr(this),Nn(this,o,e),this.i&&4!=o&&pr(this))}},R.cancel=function(){this.J=!0,ri(this)},R.lb=function(){this.C=null;const o=Date.now();0<=o-this.Y?(function jn(o,e){o.info(function(){return"TIMEOUT: "+e})}(this.j,this.B),2!=this.L&&(_n(),Cn(17)),ri(this),this.s=2,qr(this)):Tr(this,this.Y-o)};var It=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function hn(o){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,o instanceof hn){this.h=o.h,st(this,o.j),this.s=o.s,this.g=o.g,Z(this,o.m),this.l=o.l;var e=o.i,r=new $e;r.i=e.i,e.g&&(r.g=new Map(e.g),r.h=e.h),wt(this,r),this.o=o.o}else o&&(e=String(o).match(It))?(this.h=!1,st(this,e[1]||"",!0),this.s=St(e[2]||""),this.g=St(e[3]||"",!0),Z(this,e[4]),this.l=St(e[5]||"",!0),wt(this,e[6]||"",!0),this.o=St(e[7]||"")):(this.h=!1,this.i=new $e(null,this.h))}function T(o){return new hn(o)}function st(o,e,r){o.j=r?St(e,!0):e,o.j&&(o.j=o.j.replace(/:$/,""))}function Z(o,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);o.m=e}else o.m=null}function wt(o,e,r){e instanceof $e?(o.i=e,function Rr(o,e){e&&!o.j&&(Wt(o),o.i=null,o.g.forEach(function(r,u){var d=u.toLowerCase();u!=d&&(In(this,u),fr(this,d,r))},o)),o.j=e}(o.i,o.h)):(r||(e=Rt(e,ne)),o.i=new $e(e,o.h))}function Vt(o,e,r){o.i.set(e,r)}function Sr(o){return Vt(o,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),o}function St(o,e){return o?e?decodeURI(o.replace(/%25/g,"%2525")):decodeURIComponent(o):""}function Rt(o,e,r){return"string"==typeof o?(o=encodeURI(o).replace(e,Ee),r&&(o=o.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),o):null}function Ee(o){return"%"+((o=o.charCodeAt(0))>>4&15).toString(16)+(15&o).toString(16)}hn.prototype.toString=function(){var o=[],e=this.j;e&&o.push(Rt(e,U,!0),":");var r=this.g;return(r||"file"==e)&&(o.push("//"),(e=this.s)&&o.push(Rt(e,U,!0),"@"),o.push(encodeURIComponent(String(r)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(r=this.m)&&o.push(":",String(r))),(r=this.l)&&(this.g&&"/"!=r.charAt(0)&&o.push("/"),o.push(Rt(r,"/"==r.charAt(0)?V:ie,!0))),(r=this.i.toString())&&o.push("?",r),(r=this.o)&&o.push("#",Rt(r,je)),o.join("")};var U=/[#\/\?@]/g,ie=/[#\?:]/g,V=/[#\?]/g,ne=/[#\?@]/g,je=/#/g;function $e(o,e){this.h=this.g=null,this.i=o||null,this.j=!!e}function Wt(o){o.g||(o.g=new Map,o.h=0,o.i&&function _t(o,e){if(o){o=o.split("&");for(var r=0;r<o.length;r++){var u=o[r].indexOf("="),d=null;if(0<=u){var p=o[r].substring(0,u);d=o[r].substring(u+1)}else p=o[r];e(p,d?decodeURIComponent(d.replace(/\+/g," ")):"")}}}(o.i,function(e,r){o.add(decodeURIComponent(e.replace(/\+/g," ")),r)}))}function In(o,e){Wt(o),e=Xn(o,e),o.g.has(e)&&(o.i=null,o.h-=o.g.get(e).length,o.g.delete(e))}function rr(o,e){return Wt(o),e=Xn(o,e),o.g.has(e)}function fr(o,e,r){In(o,e),0<r.length&&(o.i=null,o.g.set(Xn(o,e),Ne(r)),o.h+=r.length)}function Xn(o,e){return e=String(e),o.j&&(e=e.toLowerCase()),e}(R=$e.prototype).add=function(o,e){Wt(this),this.i=null,o=Xn(this,o);var r=this.g.get(o);return r||this.g.set(o,r=[]),r.push(e),this.h+=1,this},R.forEach=function(o,e){Wt(this),this.g.forEach(function(r,u){r.forEach(function(d){o.call(e,d,u,this)},this)},this)},R.ta=function(){Wt(this);const o=Array.from(this.g.values()),e=Array.from(this.g.keys()),r=[];for(let u=0;u<e.length;u++){const d=o[u];for(let p=0;p<d.length;p++)r.push(e[u])}return r},R.Z=function(o){Wt(this);let e=[];
1if("string"==typeof o)rr(this,o)&&(e=e.concat(this.g.get(Xn(this,o))));else{o=Array.from(this.g.values());for(let r=0;r<o.length;r++)e=e.concat(o[r])}return e},R.set=function(o,e){return Wt(this),this.i=null,rr(this,o=Xn(this,o))&&(this.h-=this.g.get(o).length),this.g.set(o,[e]),this.h+=1,this},R.get=function(o,e){return o&&0<(o=this.Z(o)).length?String(o[0]):e},R.toString=function(){if(this.i)return this.i;if(!this.g)return"";const o=[],e=Array.from(this.g.keys());for(var r=0;r<e.length;r++){var u=e[r];const p=encodeURIComponent(String(u)),w=this.Z(u);for(u=0;u<w.length;u++){var d=p;""!==w[u]&&(d+="="+encodeURIComponent(String(w[u]))),o.push(d)}}return this.i=o.join("&")};var xi=class{constructor(o,e){this.g=o,this.map=e}};function Oi(o){this.l=o||bs,o=x.PerformanceNavigationTiming?0<(o=x.performance.getEntriesByType("navigation")).length&&("hq"==o[0].nextHopProtocol||"h2"==o[0].nextHopProtocol):!!(x.g&&x.g.Ka&&x.g.Ka()&&x.g.Ka().dc),this.j=o?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var bs=10;function fs(o){return!!o.h||!!o.g&&o.g.size>=o.j}function Gs(o){return o.h?1:o.g?o.g.size:0}function Ns(o,e){return o.h?o.h==e:!!o.g&&o.g.has(e)}function Ci(o,e){o.g?o.g.add(e):o.h=e}function Js(o,e){o.h&&o.h==e?o.h=null:o.g&&o.g.has(e)&&o.g.delete(e)}function Nt(o){if(null!=o.h)return o.i.concat(o.h.F);if(null!=o.g&&0!==o.g.size){let e=o.i;for(const r of o.g.values())e=e.concat(r.F);return e}return Ne(o.i)}Oi.prototype.cancel=function(){if(this.i=Nt(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const o of this.g.values())o.cancel();this.g.clear()}};var $t=class{stringify(o){return x.JSON.stringify(o,void 0)}parse(o){return x.JSON.parse(o,void 0)}};function Je(){this.g=new $t}function be(o,e,r){const u=r||"";try{bt(o,function(d,p){let w=d;ee(d)&&(w=wn(d)),e.push(u+p+"="+encodeURIComponent(w))})}catch(d){throw e.push(u+"type="+encodeURIComponent("_badmap")),d}}function qe(o,e,r,u,d){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,d(u)}catch{}}function Me(o){this.l=o.ec||null,this.j=o.ob||!1}function Ce(o,e){Qe.call(this),this.F=o,this.u=e,this.m=void 0,this.readyState=Ke,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Ye(Me,yi),Me.prototype.g=function(){return new Ce(this.l,this.j)},Me.prototype.i=function(o){return function(){return o}}({}),Ye(Ce,Qe);var Ke=0;function tt(o){o.j.read().then(o.Xa.bind(o)).catch(o.ka.bind(o))}function Et(o){o.readyState=4,o.l=null,o.j=null,o.A=null,Vn(o)}function Vn(o){o.onreadystatechange&&o.onreadystatechange.call(o)}(R=Ce.prototype).open=function(o,e){if(this.readyState!=Ke)throw this.abort(),Error("Error reopening a connection");this.C=o,this.B=e,this.readyState=1,Vn(this)},R.send=function(o){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};o&&(e.body=o),(this.F||x).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))},R.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Et(this)),this.readyState=Ke},R.$a=function(o){if(this.g&&(this.l=o,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=o.headers,this.readyState=2,Vn(this)),this.g&&(this.readyState=3,Vn(this),this.g)))if("arraybuffer"===this.responseType)o.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof x.ReadableStream<"u"&&"body"in o){if(this.j=o.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;tt(this)}else o.text().then(this.Za.bind(this),this.ka.bind(this))},R.Xa=function(o){if(this.g){if(this.u&&o.value)this.response.push(o.value);else if(!this.u){var e=o.value?o.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!o.done}))&&(this.response=this.responseText+=e)}
1o.done?Et(this):Vn(this),3==this.readyState&&tt(this)}},R.Za=function(o){this.g&&(this.response=this.responseText=o,Et(this))},R.Ya=function(o){this.g&&(this.response=o,Et(this))},R.ka=function(){this.g&&Et(this)},R.setRequestHeader=function(o,e){this.v.append(o,e)},R.getResponseHeader=function(o){return this.h&&this.h.get(o.toLowerCase())||""},R.getAllResponseHeaders=function(){if(!this.h)return"";const o=[],e=this.h.entries();for(var r=e.next();!r.done;)o.push((r=r.value)[0]+": "+r[1]),r=e.next();return o.join("\r\n")},Object.defineProperty(Ce.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(o){this.m=o?"include":"same-origin"}});var Gn=x.JSON.parse;function Jn(o){Qe.call(this),this.headers=new Map,this.u=o||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=ar,this.L=this.M=!1}Ye(Jn,Qe);var ar="",Gi=/^https?$/i,zi=["POST","PUT"];function es(o,e){o.h=!1,o.g&&(o.l=!0,o.g.abort(),o.l=!1),o.j=e,o.m=5,go(o),Ue(o)}function go(o){o.F||(o.F=!0,ut(o,"complete"),ut(o,"error"))}function hs(o){if(o.h&&typeof k<"u"&&(!o.C[1]||4!=Kt(o)||2!=o.da()))if(o.v&&4==Kt(o))tr(o.La,0,o);else if(ut(o,"readystatechange"),4==Kt(o)){o.h=!1;try{const w=o.da();e:switch(w){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var r;if(!(r=e)){var u;if(u=0===w){var d=String(o.I).match(It)[1]||null;!d&&x.self&&x.self.location&&(d=x.self.location.protocol.slice(0,-1)),u=!Gi.test(d?d.toLowerCase():"")}r=u}if(r)ut(o,"complete"),ut(o,"success");else{o.m=6;try{var p=2<Kt(o)?o.g.statusText:""}catch{p=""}o.j=p+" ["+o.da()+"]",go(o)}}finally{Ue(o)}}}function Ue(o,e){if(o.g){yn(o);const r=o.g,u=o.C[0]?()=>{}:null;o.g=null,o.C=null,e||ut(o,"ready");try{r.onreadystatechange=u}catch{}}}function yn(o){o.g&&o.L&&(o.g.ontimeout=null),o.A&&(x.clearTimeout(o.A),o.A=null)}function Kt(o){return o.g?o.g.readyState:0}function Bt(o){try{if(!o.g)return null;if("response"in o.g)return o.g.response;switch(o.K){case ar:case"text":return o.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in o.g)return o.g.mozResponseArrayBuffer}return null}catch{return null}}function cr(o){let e="";return lt(o,function(r,u){e+=u,e+=":",e+=r,e+="\r\n"}),e}function Or(o,e,r){e:{for(u in r){var u=!1;break e}u=!0}u||(r=cr(r),"string"==typeof o?null!=r&&encodeURIComponent(String(r)):Vt(o,e,r))}function ii(o,e,r){return r&&r.internalChannelParams&&r.internalChannelParams[o]||e}function fi(o){this.Ga=0,this.j=[],this.l=new nr,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=ii("failFast",!1,o),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=ii("baseRetryDelayMs",5e3,o),this.hb=ii("retryDelaySeedMs",1e4,o),this.eb=ii("forwardChannelMaxRetries",2,o),this.xa=ii("forwardChannelRequestTimeoutMs",2e4,o),this.va=o&&o.xmlHttpFactory||void 0,this.Ha=o&&o.useFetchStreams||!1,this.L=void 0,this.J=o&&o.supportsCrossDomainXhr||!1,this.K="",this.i=new Oi(o&&o.concurrentRequestLimit),this.Ja=new Je,this.P=o&&o.fastHandshake||!1,this.O=o&&o.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=o&&o.bc||!1,o&&o.Ea&&this.l.Ea(),o&&o.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&o&&o.detectBufferingProxy||!1,this.qa=void 0,o&&o.longPollingTimeout&&0<o.longPollingTimeout&&(this.qa=o.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}function Fi(o){if(ze(o),3==o.H){var e=o.W++,r=T(o.I);if(Vt(r,"SID",o.K),Vt(r,"RID",e),Vt(r,"TYPE","terminate"),bi(o,r),(e=new Mn(o,o.l,e)).L=2,e.A=Sr(T(r)),r=!1,x.navigator&&x.navigator.sendBeacon)try{r=x.navigator.sendBeacon(e.A.toString(),"")}catch{}!r&&x.Image&&((new Image).src=e.A,r=!0),r||(e.g=fo(e.l,null),e.g.ha(e.A)),e.G=Date.now(),pr(e)}ra(o)}function Ge(o){o.g&&(ks(o),o.g.cancel(),o.g=null)}function ze(o){Ge(o),o.u&&(x.clearTimeout(o.u),o.u=null),as(o),o.i.cancel(),o.m&&("number"==typeof o.m&&x.clearTimeout(o.m),o.m=null)}function he(o){if(!fs(o.i)&&!o.m){o.m=!0;var e=o.Na;Zt||dn(),Fe||(Zt(),Fe=!0),ft.add(e,o),o.C=0}}function Un(o,e){var r;r=e?e.m:o.W++;const u=T(o.I);Vt(u,"SID",o.K),Vt(u,"RID",r),Vt(u,"AID",o.V),bi(o,u),o.o&&o.s&&Or(u,o.o,o.s),r=new Mn(o,o.l,r,o.C+1),null===o.o&&(r.I=o.s),e&&(o.j=e.F.concat(o.j)),e=Ti(o,r,1e3),r.setTimeout(
1Math.round(.5*o.xa)+Math.round(.5*o.xa*Math.random())),Ci(o.i,r),Xe(r,u,e)}function bi(o,e){o.na&<(o.na,function(r,u){Vt(e,u,r)}),o.h&&bt({},function(r,u){Vt(e,u,r)})}function Ti(o,e,r){r=Math.min(o.j.length,r);var u=o.h?Y(o.h.Va,o.h,o):null;e:{var d=o.j;let p=-1;for(;;){const w=["count="+r];-1==p?0<r?(p=d[0].g,w.push("ofs="+p)):p=0:w.push("ofs="+p);let re=!0;for(let Te=0;Te<r;Te++){let ct=d[Te].g;const Jt=d[Te].map;if(ct-=p,0>ct)p=Math.max(0,d[Te].g-100),re=!1;else try{be(Jt,w,"req"+ct+"_")}catch{u&&u(Jt)}}if(re){u=w.join("&");break e}}}return o=o.j.splice(0,r),e.F=o,u}function us(o){if(!o.g&&!o.u){o.ba=1;var e=o.Ma;Zt||dn(),Fe||(Zt(),Fe=!0),ft.add(e,o),o.A=0}}function Ms(o){return!(o.g||o.u||3<=o.A||(o.ba++,o.u=si(Y(o.Ma,o),No(o,o.A)),o.A++,0))}function ks(o){null!=o.B&&(x.clearTimeout(o.B),o.B=null)}function Us(o){o.g=new Mn(o,o.l,"rpc",o.ba),null===o.o&&(o.g.I=o.s),o.g.O=0;var e=T(o.wa);Vt(e,"RID","rpc"),Vt(e,"SID",o.K),Vt(e,"AID",o.V),Vt(e,"CI",o.G?"0":"1"),!o.G&&o.qa&&Vt(e,"TO",o.qa),Vt(e,"TYPE","xmlhttp"),bi(o,e),o.o&&o.s&&Or(e,o.o,o.s),o.L&&o.g.setTimeout(o.L);var r=o.g;o=o.pa,r.L=1,r.A=Sr(T(e)),r.u=null,r.S=!0,Tt(r,o)}function as(o){null!=o.v&&(x.clearTimeout(o.v),o.v=null)}function vo(o,e){var r=null;if(o.g==e){as(o),ks(o),o.g=null;var u=2}else{if(!Ns(o.i,e))return;r=e.F,Js(o.i,e),u=1}if(0!=o.H)if(e.i)if(1==u){r=e.u?e.u.length:0,e=Date.now()-e.G;var d=o.C;ut(u=Mi(),new kr(u,r)),he(o)}else us(o);else if(3==(d=e.s)||0==d&&0<e.ca||!(1==u&&function Ft(o,e){return!(Gs(o.i)>=o.i.j-(o.m?1:0)||(o.m?(o.j=e.F.concat(o.j),0):1==o.H||2==o.H||o.C>=(o.cb?0:o.eb)||(o.m=si(Y(o.Na,o,e),No(o,o.C)),o.C++,0)))}(o,e)||2==u&&Ms(o)))switch(r&&0<r.length&&(e=o.i,e.i=e.i.concat(r)),d){case 1:ss(o,5);break;case 4:ss(o,10);break;case 3:ss(o,6);break;default:ss(o,2)}}function No(o,e){let r=o.ab+Math.floor(Math.random()*o.hb);return o.isActive()||(r*=2),r*e}function ss(o,e){if(o.l.info("Error code "+e),2==e){var r=null;o.h&&(r=null);var u=Y(o.pb,o);r||(r=new hn("//www.google.com/images/cleardot.gif"),x.location&&"http"==x.location.protocol||st(r,"https"),Sr(r)),function oe(o,e){const r=new nr;if(x.Image){const u=new Image;u.onload=Se(qe,r,u,"TestLoadImage: loaded",!0,e),u.onerror=Se(qe,r,u,"TestLoadImage: error",!1,e),u.onabort=Se(qe,r,u,"TestLoadImage: abort",!1,e),u.ontimeout=Se(qe,r,u,"TestLoadImage: timeout",!1,e),x.setTimeout(function(){u.ontimeout&&u.ontimeout()},1e4),u.src=o}else e(!1)}(r.toString(),u)}else Cn(2);o.H=0,o.h&&o.h.za(e),ra(o),ze(o)}function ra(o){if(o.H=0,o.ma=[],o.h){const e=Nt(o.i);(0!=e.length||0!=o.j.length)&&(Ie(o.ma,e),Ie(o.ma,o.j),o.i.i.length=0,Ne(o.j),o.j.length=0),o.h.ya()}}function qo(o,e,r){var u=r instanceof hn?T(r):new hn(r);if(""!=u.g)e&&(u.g=e+"."+u.g),Z(u,u.m);else{var d=x.location;u=d.protocol,e=e?e+"."+d.hostname:d.hostname,d=+d.port;var p=new hn(null);u&&st(p,u),e&&(p.g=e),d&&Z(p,d),r&&(p.l=r),u=p}return e=o.Da,(r=o.F)&&e&&Vt(u,r,e),Vt(u,"VER",o.ra),bi(o,u),u}function fo(o,e,r){if(e&&!o.J)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new Jn(o.Ha&&!o.va?new Me({ob:r}):o.va)).Oa(o.J),e}function Uo(){}function da(){if(it&&!(10<=Number(ge)))throw Error("Environmental error: no available transport.")}function bo(o,e){Qe.call(this),this.g=new fi(e),this.l=o,this.h=e&&e.messageUrlParams||null,o=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(o?o["X-Client-Protocol"]="webchannel":o={"X-Client-Protocol":"webchannel"}),this.g.s=o,o=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(o?o["X-WebChannel-Content-Type"]=e.messageContentType:o={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.Ca&&(o?o["X-WebChannel-Client-Profile"]=e.Ca:o={"X-WebChannel-Client-Profile":e.Ca}),this.g.U=o,(o=e&&e.cc)&&!ye(o)&&(this.g.o=o),this.A=e&&e.supportsCrossDomainXhr||!1,this.v=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!ye(e)&&(this.g.F=e,null!==(o=this.h)&&e in o&&e in(o=this.h)&&delete o[e]),this.j=new Sa(this)}function nl(o){Re.call(this),o.__headers__&&(this.headers=o.__headers__,this.statusCode=o.__status__,delete o.__headers__,delete o.__status__);var e=o.__sm__;if(e){e:{for(const r in e){o=r;break e}o=void 0}(this.i=o)&&(o=this.i,e=null!==e&&o in e?e[o]:void 0),this.data=e}else this.data=o}function Co(){Pt.call(this),this.status=1}function Sa(o){this.g=o}function Go(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}function Ta(o,e,r){r||(r=0);var u=Array(16);if("string"==typeof e)for(var d=0;16>d;++d)u[d]=e.charCodeAt(r++)|e.charCodeAt(r++)<<8|e.charCodeAt(r++)<<16|e.charCodeAt(r++)<<24;else for(d=0;16>d;++d)u[d]=e[r++]|e[r++]<<8|e[r++]<<16|e[r++]<<24;var p=o.g[3],w=(e=o.g[0])+(p^(r=o.g[1])&((d=o.g[2])^p))+u[0]+3614090360&4294967295;w=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=(r=(d=(p=(e=r+(w<<7&4294967295|w>>>25))+((w=p+(d^e&(r^d))+u[1]+3905402710&4294967295)<<12&4294967295|w>>>20))+((w=d+(r^p&(e^r))+u[2]+606105819&4294967295)<<17&4294967295|w>>>15))+((w=r+(e^d&(p^e))+u[3]+3250441966&4294967295)<<22&4294967295|w>>>10))+((w=e+(p^r&(d^p))+u[4]+4118548399&4294967295)<<7&4294967295|w>>>25))+((w=p+(d^e&(r^d))+u[5]+1200080426&4294967295)<<12&4294967295|w>>>20))+((w=d+(r^p&(e^r))+u[6]+2821735955&4294967295)<<17&4294967295|w>>>15))+((w=r+(e^d&(p^e))+u[7]+4249261313&4294967295)<<22&4294967295|w>>>10))+((w=e+(p^r&(d^p))+u[8]+1770035416&4294967295)<<7&4294967295|w>>>25))+((w=p+(d^e&(r^d))+u[9]+2336552879&4294967295)<<12&4294967295|w>>>20))+((w=d+(r^p&(e^r))+u[10]+4294925233&4294967295)<<17&4294967295|w>>>15))+((w=r+(e^d&(p^e))+u[11]+2304563134&4294967295)<<22&4294967295|w>>>10))+((w=e+(p^r&(d^p))+u[12]+1804603682&4294967295)<<7&4294967295|w>>>25))+((w=p+(d^e&(r^d))+u[13]+4254626195&4294967295)<<12&4294967295|w>>>20))+((w=d+(r^p&(e^r))+u[14]+2792965006&4294967295)<<17&4294967295|w>>>15))+((w=r+(e^d&(p^e))+u[15]+1236535329&4294967295)<<22&4294967295|w>>>10))+((w=e+(d^p&(r^d))+u[1]+4129170786&4294967295)<<5&4294967295|w>>>27))+((w=p+(r^d&(e^r))+u[6]+3225465664&4294967295)<<9&4294967295|w>>>23))+((w=d+(e^r&(p^e))+u[11]+643717713&4294967295)<<14&4294967295|w>>>18))+((w=r+(p^e&(d^p))+u[0]+3921069994&4294967295)<<20&4294967295|w>>>12))+((w=e+(d^p&(r^d))+u[5]+3593408605&4294967295)<<5&4294967295|w>>>27))+((w=p+(r^d&(e^r))+u[10]+38016083&4294967295)<<9&4294967295|w>>>23))+((w=d+(e^r&(p^e))+u[15]+3634488961&4294967295)<<14&4294967295|w>>>18))+((w=r+(p^e&(d^p))+u[4]+3889429448&4294967295)<<20&4294967295|w>>>12))+((w=e+(d^p&(r^d))+u[9]+568446438&4294967295)<<5&4294967295|w>>>27))+((w=p+(r^d&(e^r))+u[14]+3275163606&4294967295)<<9&4294967295|w>>>23))+((w=d+(e^r&(p^e))+u[3]+4107603335&4294967295)<<14&4294967295|w>>>18))+((w=r+(p^e&(d^p))+u[8]+1163531501&4294967295)<<20&4294967295|w>>>12))+((w=e+(d^p&(r^d))+u[13]+2850285829&4294967295)<<5&4294967295|w>>>27))+((w=p+(r^d&(e^r))+u[2]+4243563512&4294967295)<<9&4294967295|w>>>23))+((w=d+(e^r&(p^e))+u[7]+1735328473&4294967295)<<14&4294967295|w>>>18))+((w=r+(p^e&(d^p))+u[12]+2368359562&4294967295)<<20&4294967295|w>>>12))+((w=e+(r^d^p)+u[5]+4294588738&4294967295)<<4&4294967295|w>>>28))+((w=p+(e^r^d)+u[8]+2272392833&4294967295)<<11&4294967295|w>>>21))+((w=d+(p^e^r)+u[11]+1839030562&4294967295)<<16&4294967295|w>>>16))+((w=r+(d^p^e)+u[14]+4259657740&4294967295)<<23&4294967295|w>>>9))+((w=e+(r^d^p)+u[1]+2763975236&4294967295)<<4&4294967295|w>>>28))+((w=p+(e^r^d)+u[4]+1272893353&4294967295)<<11&4294967295|w>>>21))+((w=d+(p^e^r)+u[7]+4139469664&4294967295)<<16&4294967295|w>>>16))+((w=r+(d^p^e)+u[10]+3200236656&4294967295)<<23&4294967295|w>>>9))+((w=e+(r^d^p)+u[13]+681279174&4294967295)<<4&4294967295|w>>>28))+((w=p+(e^r^d)+u[0]+3936430074&4294967295)<<11&4294967295|w>>>21))+((w=d+(p^e^r)+u[3]+3572445317&4294967295)<<16&4294967295|w>>>16))+((w=r+(d^p^e)+u[6]+76029189&4294967295)<<23&4294967295|w>>>9))+((w=e+(r^d^p)+u[9]+3654602809&4294967295)<<4&4294967295|w>>>28))+((w=p+(e^r^d)+u[12]+3873151461&4294967295)<<11&4294967295|w>>>21))+((w=d+(p^e^r)+u[15]+530742520&4294967295)<<16&4294967295|w>>>16))+((w=r+(d^p^e)+u[2]+3299628645&4294967295)<<23&4294967295|w>>>9))+((w=e+(d^(r|~p))+u[0]+4096336452&4294967295)<<6&4294967295|w>>>26))+((w=p+(r^(e|~d))+u[7]+1126891415&4294967295)<<10&4294967295|w>>>22))+((w=d+(e^(p|~r))+u[14]+2878612391&4294967295)<<15&4294967295|w>>>17))+((w=r+(p^(d|~e))+u[5]+4237533241&4294967295)<<21&4294967295|w>>>11))+((w=e+(d^(r|~p))+u[12]+1700485571&4294967295)<<6&4294967295|w>>>26))+((w=p+(r^(e|~d))+u[3]+2399980690&4294967295)<<10&4294967295|w>>>22))+((w=d+(e^(p|~r))+u[10]+4293915773&4294967295)<<15&4294967295|w>>>17))+((w=r+(p^(d|~e))+u[1]+2240044497&4294967295)<<21&4294967295|w>>>11))+((w=e+(d^(r|~p))+u[8]+1873313359&4294967295)<<6&4294967295|w>>>26))+((w=p+(r^(e|~d))+u[15]+4264355552&4294967295)<<10&4294967295|w>>>22))+((w=d+(e^(p|~r))+u[6]+2734768916&4294967295)<<15&4294967295|w>>>17))+((w=r+(p^(d|~e))+u[13]+1309151649&4294967295)<<21&4294967295|w>>>11))+((p=(e=r+((w=e+(d^(r|~p))+u[4]+4149444226&4294967295)<<6&4294967295|w>>>26))+((w=p+(r^(e|~d))+u[11]+3174756917&4294967295)<<10&4294967295|w>>>22))^((d=p+((w=d+(e^(p|~r))+u[2]+718787259&4294967295)<<15&4294967295|w>>>17))|~e))+u[9]+3951481745&4294967295,o.g[0]=o.g[0]+e&4294967295,o.g[1]=o.g[1]+(d+(w<<21&4294967295|w>>>11))&4294967295,o.g[2]=o.g[2]+d&4294967295,o.g[3]=o.g[3]+p&4294967295}function Vs(o,e){this.h=e;for(var r=[],u=!0,d=o.length-1;0<=d;d--){var p=0|o[d];u&&p==e||(r[d]=p,u=!1)}this.g=r}(R=Jn.prototype).Oa=function(o){this.M=o},R.ha=function(o,e,r,u){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+o);e=e?e.toUpperCase():"GET",this.I=o,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():ln.g(),this.C=function on(o){return o.h||(o.h=o.i())}(this.u?this.u:ln),this.g.onreadystatechange=Y(this.La,this);try{this.G=!0,this.g.open(e,String(o),!0),this.G=!1}catch(p){return void es(this,p)}if(o=r||"",r=new Map(this.headers),u)if(Object.getPrototypeOf(u)===Object.prototype)for(var d in u)r.set(d,u[d]);else{if("function"!=typeof u.keys||"function"!=typeof u.get)throw Error("Unknown input type for opt_headers: "+String(u));for(const p of u.keys())r.set(p,u.get(p))}u=Array.from(r.keys()).find(p=>"content-type"==p.toLowerCase()),d=x.FormData&&o instanceof x.FormData,!(0<=Ve(zi,e))||u||d||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[p,w]of r)this.g.setRequestHeader(p,w);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{yn(this),0<this.B&&((this.L=function is(o){return it&&"number"==typeof o.timeout&&void 0!==o.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Y(this.ua,this)):this.A=tr(this.ua,this.B,this)),this.v=!0,this.g.send(o),this.v=!1}catch(p){es(this,p)}},R.ua=function(){typeof k<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,ut(this,"timeout"),this.abort(8))},R.abort=function(o){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=o||7,ut(this,"complete"),ut(this,"abort"),Ue(this))},R.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Ue(this,!0)),Jn.$.N.call(this)},R.La=function(){this.s||(this.G||this.v||this.l?hs(this):this.kb())},R.kb=function(){hs(this)},R.isActive=function(){return!!this.g},R.da=function(){try{return 2<Kt(this)?this.g.status:-1}catch{return-1}},R.ja=function(){try{return this.g?this.g.responseText:""}catch{return""}}
1,R.Wa=function(o){if(this.g){var e=this.g.responseText;return o&&0==e.indexOf(o)&&(e=e.substring(o.length)),Gn(e)}},R.Ia=function(){return this.m},R.Sa=function(){return"string"==typeof this.j?this.j:String(this.j)},(R=fi.prototype).ra=8,R.H=1,R.Na=function(o){if(this.m)if(this.m=null,1==this.H){if(!o){this.W=Math.floor(1e5*Math.random()),o=this.W++;const d=new Mn(this,this.l,o);let p=this.s;if(this.U&&(p?(p=kt(p),Yn(p,this.U)):p=this.U),null!==this.o||this.O||(d.I=p,p=null),this.P)e:{for(var e=0,r=0;r<this.j.length;r++){var u=this.j[r];if(void 0===(u="__data__"in u.map&&"string"==typeof(u=u.map.__data__)?u.length:void 0))break;if(4096<(e+=u)){e=r;break e}if(4096===e||r===this.j.length-1){e=r+1;break e}}e=1e3}else e=1e3;e=Ti(this,d,e),Vt(r=T(this.I),"RID",o),Vt(r,"CVER",22),this.F&&Vt(r,"X-HTTP-Session-Id",this.F),bi(this,r),p&&(this.O?e="headers="+encodeURIComponent(String(cr(p)))+"&"+e:this.o&&Or(r,this.o,p)),Ci(this.i,d),this.bb&&Vt(r,"TYPE","init"),this.P?(Vt(r,"$req",e),Vt(r,"SID","null"),d.aa=!0,Xe(d,r,null)):Xe(d,r,e),this.H=2}}else 3==this.H&&(o?Un(this,o):0==this.j.length||fs(this.i)||Un(this))},R.Ma=function(){if(this.u=null,Us(this),this.ca&&!(this.M||null==this.g||0>=this.S)){var o=2*this.S;this.l.info("BP detection timer enabled: "+o),this.B=si(Y(this.jb,this),o)}},R.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Cn(10),Ge(this),Us(this))},R.ib=function(){null!=this.v&&(this.v=null,Ge(this),Ms(this),Cn(19))},R.pb=function(o){o?(this.l.info("Successfully pinged google.com"),Cn(2)):(this.l.info("Failed to ping google.com"),Cn(1))},R.isActive=function(){return!!this.h&&this.h.isActive(this)},(R=Uo.prototype).Ba=function(){},R.Aa=function(){},R.za=function(){},R.ya=function(){},R.isActive=function(){return!0},R.Va=function(){},da.prototype.g=function(o,e){return new bo(o,e)},Ye(bo,Qe),bo.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var o=this.g,e=this.l,r=this.h||void 0;Cn(0),o.Y=e,o.na=r||{},o.G=o.aa,o.I=qo(o,null,o.Y),he(o)},bo.prototype.close=function(){Fi(this.g)},bo.prototype.u=function(o){var e=this.g;if("string"==typeof o){var r={};r.__data__=o,o=r}else this.v&&((r={}).__data__=wn(o),o=r);e.j.push(new xi(e.fb++,o)),3==e.H&&he(e)},bo.prototype.N=function(){this.g.h=null,delete this.j,Fi(this.g),delete this.g,bo.$.N.call(this)},Ye(nl,Re),Ye(Co,Pt),Ye(Sa,Uo),Sa.prototype.Ba=function(){ut(this.g,"a")},Sa.prototype.Aa=function(o){ut(this.g,new nl(o))},Sa.prototype.za=function(o){ut(this.g,new Co)},Sa.prototype.ya=function(){ut(this.g,"b")},Ye(Go,function Ll(){this.blockSize=-1}),Go.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},Go.prototype.j=function(o,e){void 0===e&&(e=o.length);for(var r=e-this.blockSize,u=this.m,d=this.h,p=0;p<e;){if(0==d)for(;p<=r;)Ta(this,o,p),p+=this.blockSize;if("string"==typeof o){for(;p<e;)if(u[d++]=o.charCodeAt(p++),d==this.blockSize){Ta(this,u),d=0;break}}else for(;p<e;)if(u[d++]=o[p++],d==this.blockSize){Ta(this,u),d=0;break}}this.h=d,this.i+=e},Go.prototype.l=function(){var o=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);o[0]=128;for(var e=1;e<o.length-8;++e)o[e]=0;var r=8*this.i;for(e=o.length-8;e<o.length;++e)o[e]=255&r,r/=256;for(this.j(o),o=Array(16),e=r=0;4>e;++e)for(var u=0;32>u;u+=8)o[r++]=this.g[e]>>>u&255;return o};var rl={};function Ua(o){return-128<=o&&128>o?function At(o,e){var r=rl;return Object.prototype.hasOwnProperty.call(r,o)?r[o]:r[o]=e(o)}(o,function(e){return new Vs([0|e],0>e?-1:0)}):new Vs([0|o],0>o?-1:0)}function ia(o){if(isNaN(o)||!isFinite(o))return Va;if(0>o)return ko(ia(-o));for(var e=[],r=1,u=0;o>=r;u++)e[u]=o/r|0,r*=os;return new Vs(e,0)}var os=4294967296,Va=Ua(0),uu=Ua(1),Fl=Ua(16777216);function Ra(o){if(0!=o.h)return!1;for(var e=0;e<o.g.length;e++)if(0!=o.g[e])return!1;return!0}function Jo(o){return-1==o.h}function ko(o){for(var e=o.g.length,r=[],u=0;u<e;u++)r[u]=~o.g[u];return new Vs(r,~o.h).add(uu)}function Ba(o,e){return o.add(ko(e))}function Ha(o,e){for(;(65535&o[e])!=o[e];)o[e+1]+=o[e]>>>16,o[e]&=65535,e++}function Ul(o,e){this.g=o,this.h=e}function Vl(o,e){if(Ra(e))throw Error("division by zero");if(Ra(o))return new Ul(Va,Va);if(Jo(o))return e=Vl(ko(o),e),new Ul(ko(e.g),ko(e.h));if(Jo(e))return e=Vl(o,ko(e)),new Ul(ko(e.g),e.h);if(30<o.g.length){if(Jo(o)||Jo(e))throw Error("slowDivide_ only works with positive integers.");for(var r=uu,u=e;0>=u.X(o);)r=il(r),u=il(u);var d=sl(r,1),p=sl(u,1);for(u=sl(u,2),r=sl(r,2);!Ra(u);){var w=p.add(u);0>=w.X(o)&&(d=d.add(r),p=w),u=sl(u,1),r=sl(r,1)}return e=Ba(o,d.R(e)),new Ul(d,e)}for(d=Va;0<=o.X(e);){for(r=Math.max(1,Math.floor(o.ea()/e.ea())),u=48>=(u=Math.ceil(Math.log(r)/Math.LN2))?1:Math.pow(2,u-48),w=(p=ia(r)).R(e);Jo(w)||0<w.X(o);)w=(p=ia(r-=u)).R(e);Ra(p)&&(p=uu),d=d.add(p),o=Ba(o,w)}return new Ul(d,o)}function il(o){for(var e=o.g.length+1,r=[],u=0;u<e;u++)r[u]=o.D(u)<<1|o.D(u-1)>>>31;return new Vs(r,o.h)}function sl(o,e){var r=e>>5;e%=32;for(var u=o.g.length-r,d=[],p=0;p<u;p++)d[p]=0<e?o.D(p+r)>>>e|o.D(p+r+1)<<32-e:o.D(p+r);return new Vs(d,o.h)}(R=Vs.prototype).ea=function(){if(Jo(this))return-ko(this).ea();for(var o=0,e=1,r=0;r<this.g.length;r++){var u=this.D(r);o+=(0<=u?u:os+u)*e,e*=os}return o}
1,R.toString=function(o){if(2>(o=o||10)||36<o)throw Error("radix out of range: "+o);if(Ra(this))return"0";if(Jo(this))return"-"+ko(this).toString(o);for(var e=ia(Math.pow(o,6)),r=this,u="";;){var d=Vl(r,e).g,p=((0<(r=Ba(r,d.R(e))).g.length?r.g[0]:r.h)>>>0).toString(o);if(Ra(r=d))return p+u;for(;6>p.length;)p="0"+p;u=p+u}},R.D=function(o){return 0>o?0:o<this.g.length?this.g[o]:this.h},R.X=function(o){return Jo(o=Ba(this,o))?-1:Ra(o)?0:1},R.abs=function(){return Jo(this)?ko(this):this},R.add=function(o){for(var e=Math.max(this.g.length,o.g.length),r=[],u=0,d=0;d<=e;d++){var p=u+(65535&this.D(d))+(65535&o.D(d)),w=(p>>>16)+(this.D(d)>>>16)+(o.D(d)>>>16);u=w>>>16,r[d]=(w&=65535)<<16|(p&=65535)}return new Vs(r,-2147483648&r[r.length-1]?-1:0)},R.R=function(o){if(Ra(this)||Ra(o))return Va;if(Jo(this))return Jo(o)?ko(this).R(ko(o)):ko(ko(this).R(o));if(Jo(o))return ko(this.R(ko(o)));if(0>this.X(Fl)&&0>o.X(Fl))return ia(this.ea()*o.ea());for(var e=this.g.length+o.g.length,r=[],u=0;u<2*e;u++)r[u]=0;for(u=0;u<this.g.length;u++)for(var d=0;d<o.g.length;d++){var p=this.D(u)>>>16,w=65535&this.D(u),re=o.D(d)>>>16,Te=65535&o.D(d);r[2*u+2*d]+=w*Te,Ha(r,2*u+2*d),r[2*u+2*d+1]+=p*Te,Ha(r,2*u+2*d+1),r[2*u+2*d+1]+=w*re,Ha(r,2*u+2*d+1),r[2*u+2*d+2]+=p*re,Ha(r,2*u+2*d+2)}for(u=0;u<e;u++)r[u]=r[2*u+1]<<16|r[2*u];for(u=e;u<2*e;u++)r[u]=0;return new Vs(r,0)},R.gb=function(o){return Vl(this,o).h},R.and=function(o){for(var e=Math.max(this.g.length,o.g.length),r=[],u=0;u<e;u++)r[u]=this.D(u)&o.D(u);return new Vs(r,this.h&o.h)},R.or=function(o){for(var e=Math.max(this.g.length,o.g.length),r=[],u=0;u<e;u++)r[u]=this.D(u)|o.D(u);return new Vs(r,this.h|o.h)},R.xor=function(o){for(var e=Math.max(this.g.length,o.g.length),r=[],u=0;u<e;u++)r[u]=this.D(u)^o.D(u);return new Vs(r,this.h^o.h)},da.prototype.createWebChannel=da.prototype.g,bo.prototype.send=bo.prototype.u,bo.prototype.open=bo.prototype.m,bo.prototype.close=bo.prototype.close,oi.NO_ERROR=0,oi.TIMEOUT=8,oi.HTTP_ERROR=6,Ii.COMPLETE="complete",le.EventType=me,me.OPEN="a",me.CLOSE="b",me.ERROR="c",me.MESSAGE="d",Qe.prototype.listen=Qe.prototype.O,Jn.prototype.listenOnce=Jn.prototype.P,Jn.prototype.getLastError=Jn.prototype.Sa,Jn.prototype.getLastErrorCode=Jn.prototype.Ia,Jn.prototype.getStatus=Jn.prototype.da,Jn.prototype.getResponseJson=Jn.prototype.Wa,Jn.prototype.getResponseText=Jn.prototype.ja,Jn.prototype.send=Jn.prototype.ha,Jn.prototype.setWithCredentials=Jn.prototype.Oa,Go.prototype.digest=Go.prototype.l,Go.prototype.reset=Go.prototype.reset,Go.prototype.update=Go.prototype.j,Vs.prototype.add=Vs.prototype.add,Vs.prototype.multiply=Vs.prototype.R,Vs.prototype.modulo=Vs.prototype.gb,Vs.prototype.compare=Vs.prototype.X,Vs.prototype.toNumber=Vs.prototype.ea,Vs.prototype.toString=Vs.prototype.toString,Vs.prototype.getBits=Vs.prototype.D,Vs.fromNumber=ia,Vs.fromString=function Qo(o,e){if(0==o.length)throw Error("number format error: empty string");if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if("-"==o.charAt(0))return ko(Qo(o.substring(1),e));if(0<=o.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=ia(Math.pow(e,8)),u=Va,d=0;d<o.length;d+=8){var p=Math.min(8,o.length-d),w=parseInt(o.substring(d,d+p),e);8>p?(p=ia(Math.pow(e,p)),u=u.R(p).add(ia(w))):u=(u=u.R(r)).add(ia(w))}return u};var li=S.createWebChannelTransport=function(){return new da},Cs=S.getStatEventTarget=function(){return Mi()},ol=S.ErrorCode=oi,cu=S.EventType=Ii,Ws=S.Event=mi,Tl=S.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},ea=(S.FetchXmlHttpFactory=Me,S.WebChannel=le),Ca=S.XhrIo=Jn,yo=S.Md5=Go,Ma=S.Integer=Vs;const Io="@firebase/firestore";class ho{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}}ho.UNAUTHENTICATED=new ho(null),ho.GOOGLE_CREDENTIALS=new ho("google-credentials-uid"),ho.FIRST_PARTY=new ho("first-party-uid"),ho.MOCK_USER=new ho("mock-user");let lo="10.9.0";const po=new _.YJ("@firebase/firestore");function Vo(){return po.logLevel}function X(o){po.setLogLevel(o)}function ot(o,...e){if(po.logLevel<=_.Ge.DEBUG){const r=e.map(xn);po.debug(`Firestore (${lo}): ${o}`,...r)}}function Ae(o,...e){if(po.logLevel<=_.Ge.ERROR){const r=e.map(xn);po.error(`Firestore (${lo}): ${o}`,...r)}}function yt(o,...e){if(po.logLevel<=_.Ge.WARN){const r=e.map(xn);po.warn(`Firestore (${lo}): ${o}`,...r)}}function xn(o){if("string"==typeof o)return o;try{return JSON.stringify(o)}catch{return o}}function qn(o="Unexpected state"){const e=`FIRESTORE (${lo}) INTERNAL ASSERTION FAILED: `+o;throw Ae(e),new Error(e)}function Pr(o,e){o||qn()}function ji(o,e){o||qn()}function pi(o,e){return o}const Ar={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
1ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Xr extends C.kx{constructor(e,r){super(e,r),this.code=e,this.message=r,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class Qi{constructor(){this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}}class no{constructor(e,r){this.user=r,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Qs{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,r){e.enqueueRetryable(()=>r(ho.UNAUTHENTICATED))}shutdown(){}}class uo{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,r){this.changeListener=r,e.enqueueRetryable(()=>r(this.token.user))}shutdown(){this.changeListener=null}}class sa{constructor(e){this.t=e,this.currentUser=ho.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,r){var u=this;let d=this.i;const p=ct=>this.i!==d?(d=this.i,r(ct)):Promise.resolve();let w=new Qi;this.o=()=>{this.i++,this.currentUser=this.u(),w.resolve(),w=new Qi,e.enqueueRetryable(()=>p(this.currentUser))};const re=()=>{const ct=w;e.enqueueRetryable((0,i.c)(function*(){yield ct.promise,yield p(u.currentUser)}))},Te=ct=>{ot("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=ct,this.auth.addAuthTokenListener(this.o),re()};this.t.onInit(ct=>Te(ct)),setTimeout(()=>{if(!this.auth){const ct=this.t.getImmediate({optional:!0});ct?Te(ct):(ot("FirebaseAuthCredentialsProvider","Auth not yet detected"),w.resolve(),w=new Qi)}},0),re()}getToken(){const e=this.i,r=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(r).then(u=>this.i!==e?(ot("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):u?(Pr("string"==typeof u.accessToken),new no(u.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return Pr(null===e||"string"==typeof e),new ho(e)}}class ro{constructor(e,r,u){this.l=e,this.h=r,this.P=u,this.type="FirstParty",this.user=ho.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const 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 ya{constructor(e,r,u){this.l=e,this.h=r,this.P=u}getToken(){return Promise.resolve(new ro(this.l,this.h,this.P))}start(e,r){e.enqueueRetryable(()=>r(ho.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class _a{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 Zi{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,r){const u=p=>{null!=p.error&&ot("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${p.error.message}`);const w=p.token!==this.R;return this.R=p.token,ot("FirebaseAppCheckTokenProvider",`Received ${w?"new":"existing"} token.`),w?r(p.token):Promise.resolve()};this.o=p=>{e.enqueueRetryable(()=>u(p))};const d=p=>{ot("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=p,this.appCheck.addTokenListener(this.o)};this.A.onInit(p=>d(p)),setTimeout(()=>{if(!this.appCheck){const p=this.A.getImmediate({optional:!0});p?d(p):ot("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(r=>r?(Pr("string"==typeof r.token),this.R=r.token,new _a(r.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Is(o){const e=typeof self<"u"&&(self.crypto||self.msCrypto),r=new Uint8Array(o);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(r);else for(let u=0;u<o;u++)r[u]=Math.floor(256*Math.random());return r}class xa{static newId(){const r=62*Math.floor(256/62);let u="";for(;u.length<20;){const d=Is(40);for(let p=0;p<d.length;++p)u.length<20&&d[p]<r&&(u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(d[p]%62))}return u}}function vs(o,e){return o<e?-1:o>e?1:0}function Bl(o,e,r){return o.length===e.length&&o.every((u,d)=>r(u,e[d]))}function Fu(o){return o+"\0"}class io{constructor(e,r){if(this.seconds=e,this.nanoseconds=r,r<0)throw new Xr(Ar.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+r);if(r>=1e9)throw new Xr(Ar.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+r);if(e<-62135596800)throw new Xr(Ar.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Xr(Ar.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return io.fromMillis(Date.now())}static fromDate(e){return io.fromMillis(e.getTime())}static fromMillis(e){const r=Math.floor(e/1e3),u=Math.floor(1e6*(e-1e3*r));return new io(r,u)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?vs(this.nanoseconds,e.nanoseconds):vs(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")}
1}class ts{constructor(e){this.timestamp=e}static fromTimestamp(e){return new ts(e)}static min(){return new ts(new io(0,0))}static max(){return new ts(new io(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 ja{constructor(e,r,u){void 0===r?r=0:r>e.length&&qn(),void 0===u?u=e.length-r:u>e.length-r&&qn(),this.segments=e,this.offset=r,this.len=u}get length(){return this.len}isEqual(e){return 0===ja.comparator(this,e)}child(e){const r=this.segments.slice(this.offset,this.limit());return e instanceof ja?e.forEach(u=>{r.push(u)}):r.push(e),this.construct(r)}limit(){return this.offset+this.length}popFirst(e){return this.construct(this.segments,this.offset+(e=void 0===e?1:e),this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let r=0;r<this.length;r++)if(this.get(r)!==e.get(r))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let r=0;r<this.length;r++)if(this.get(r)!==e.get(r))return!1;return!0}forEach(e){for(let r=this.offset,u=this.limit();r<u;r++)e(this.segments[r])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,r){const u=Math.min(e.length,r.length);for(let d=0;d<u;d++){const p=e.get(d),w=r.get(d);if(p<w)return-1;if(p>w)return 1}return e.length<r.length?-1:e.length>r.length?1:0}}class Es extends ja{construct(e,r,u){return new Es(e,r,u)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const r=[];for(const u of e){if(u.indexOf("//")>=0)throw new Xr(Ar.INVALID_ARGUMENT,`Invalid segment (${u}). Paths must not contain // in them.`);r.push(...u.split("/").filter(d=>d.length>0))}return new Es(r)}static emptyPath(){return new Es([])}}const Aa=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class zs extends ja{construct(e,r,u){return new zs(e,r,u)}static isValidIdentifier(e){return Aa.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),zs.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new zs(["__name__"])}static fromServerFormat(e){const r=[];let u="",d=0;const p=()=>{if(0===u.length)throw new Xr(Ar.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);r.push(u),u=""};let w=!1;for(;d<e.length;){const re=e[d];if("\\"===re){if(d+1===e.length)throw new Xr(Ar.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const Te=e[d+1];if("\\"!==Te&&"."!==Te&&"`"!==Te)throw new Xr(Ar.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);u+=Te,d+=2}else"`"===re?(w=!w,d++):"."!==re||w?(u+=re,d++):(p(),d++)}if(p(),w)throw new Xr(Ar.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new zs(r)}static emptyPath(){return new zs([])}}class Vi{constructor(e){this.path=e}static fromPath(e){return new Vi(Es.fromString(e))}static fromName(e){return new Vi(Es.fromString(e).popFirst(5))}static empty(){return new Vi(Es.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===Es.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,r){return Es.comparator(e.path,r.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Vi(new Es(e.slice()))}}class Cl{constructor(e,r,u,d){this.indexId=e,this.collectionGroup=r,this.fields=u,this.indexState=d}}function Uu(o){return o.fields.find(e=>2===e.kind)}function Do(o){return o.fields.filter(e=>2!==e.kind)}Cl.UNKNOWN_ID=-1;class fa{constructor(e,r){this.fieldPath=e,this.kind=r}}class Bo{constructor(e,r){this.sequenceNumber=e,this.offset=r}static empty(){return new Bo(0,Wo.min())}}function $l(o,e){const r=o.toTimestamp().seconds,u=o.toTimestamp().nanoseconds+1,d=ts.fromTimestamp(1e9===u?new io(r+1,0):new io(r,u));return new Wo(d,Vi.empty(),e)}function Jl(o){return new Wo(o.readTime,o.key,-1)}class Wo{constructor(e,r,u){this.readTime=e,this.documentKey=r,this.largestBatchId=u}static min(){return new Wo(ts.min(),Vi.empty(),-1)}static max(){return new Wo(ts.max(),Vi.empty(),-1)}}function lc(o,e){let r=o.readTime.compareTo(e.readTime);return 0!==r?r:(r=Vi.comparator(o.documentKey,e.documentKey),0!==r?r:vs(o.largestBatchId,e.largestBatchId))}const Ks="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class fu{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}
1raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}function oa(o){return Vu.apply(this,arguments)}function Vu(){return Vu=(0,i.c)(function*(o){if(o.code!==Ar.FAILED_PRECONDITION||o.message!==Ks)throw o;ot("LocalStore","Unexpectedly lost primary lease")}),Vu.apply(this,arguments)}class Lr{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(r=>{this.isDone=!0,this.result=r,this.nextCallback&&this.nextCallback(r)},r=>{this.isDone=!0,this.error=r,this.catchCallback&&this.catchCallback(r)})}catch(e){return this.next(void 0,e)}next(e,r){return this.callbackAttached&&qn(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(r,this.error):this.wrapSuccess(e,this.result):new Lr((u,d)=>{this.nextCallback=p=>{this.wrapSuccess(e,p).next(u,d)},this.catchCallback=p=>{this.wrapFailure(r,p).next(u,d)}})}toPromise(){return new Promise((e,r)=>{this.next(e,r)})}wrapUserFunction(e){try{const r=e();return r instanceof Lr?r:Lr.resolve(r)}catch(r){return Lr.reject(r)}}wrapSuccess(e,r){return e?this.wrapUserFunction(()=>e(r)):Lr.resolve(r)}wrapFailure(e,r){return e?this.wrapUserFunction(()=>e(r)):Lr.reject(r)}static resolve(e){return new Lr((r,u)=>{r(e)})}static reject(e){return new Lr((r,u)=>{u(e)})}static waitFor(e){return new Lr((r,u)=>{let d=0,p=0,w=!1;e.forEach(re=>
1{++d,re.next(()=>{++p,w&&p===d&&r()},Te=>u(Te))}),w=!0,p===d&&r()})}static or(e){let r=Lr.resolve(!1);for(const u of e)r=r.next(d=>d?Lr.resolve(d):u());return r}static forEach(e,r){const u=[];return e.forEach((d,p)=>{u.push(r.call(this,d,p))}),this.waitFor(u)}static mapArray(e,r){return new Lr((u,d)=>{const p=e.length,w=new Array(p);let re=0;for(let Te=0;Te<p;Te++){const ct=Te;r(e[ct]).next(Jt=>{w[ct]=Jt,++re,re===p&&u(w)},Jt=>d(Jt))}})}static doWhile(e,r){return new Lr((u,d)=>{const p=()=>{!0===e()?r().next(()=>{p()},d):u()};p()})}}class jl{constructor(e,r){this.action=e,this.transaction=r,this.aborted=!1,this.V=new Qi,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{r.error?this.V.reject(new Gl(e,r.error)):this.V.resolve()},this.transaction.onerror=u=>{const d=Al(u.target.error);this.V.reject(new Gl(e,d))}}static open(e,r,u,d){try{return new jl(r,e.transaction(d,u))}catch(p){throw new Gl(r,p)}}get m(){return this.V.promise}abort(e){e&&this.V.reject(e),this.aborted||(ot("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){const e=this.transaction;this.aborted||"function"!=typeof e.commit||e.commit()}store(e){const r=this.transaction.objectStore(e);return new hu(r)}}class ha{constructor(e,r,u){this.name=e,this.version=r,this.p=u,12.2===ha.S((0,C.Su)())&&Ae("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return ot("SimpleDb","Removing database:",e),pa(window.indexedDB.deleteDatabase(e)).toPromise()}static D(){if(!(0,C.yy)())return!1;if(ha.C())return!0;const e=(0,C.Su)(),r=ha.S(e),u=0<r&&r<10,d=ha.v(e),p=0<d&&d<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||u||p)}static C(){var e;return typeof process<"u"&&"YES"===(null===(e=process.__PRIVATE_env)||void 0===e?void 0:e.F)}static M(e,r){return e.store(r)}static S(e){const r=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),u=r?r[1].split("_").slice(0,2).join("."):"-1";return Number(u)}static v(e){const r=e.match(/Android ([\d.]+)/i),u=r?r[1].split(".").slice(0,2).join("."):"-1";return Number(u)}O(e){var r=this;return(0,i.c)(function*(){return r.db||(ot("SimpleDb","Opening database:",r.name),r.db=yield new Promise((u,d)=>{const p=indexedDB.open(r.name,r.version);p.onsuccess=w=>{u(w.target.result)},p.onblocked=()=>{d(new Gl(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},p.onerror=w=>{const re=w.target.error;d("VersionError"===re.name?new Xr(Ar.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh."):"InvalidStateError"===re.name?new Xr(Ar.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+re):new Gl(e,re))},p.onupgradeneeded=w=>{ot("SimpleDb",'Database "'+r.name+'" requires upgrade from version:',w.oldVersion),r.p.N(w.target.result,p.transaction,w.oldVersion,r.version).next(()=>{ot("SimpleDb","Database upgrade to version "+r.version+" complete")})}})),r.L&&(r.db.onversionchange=u=>r.L(u)),r.db})()}B(e){this.L=e,this.db&&(this.db.onversionchange=r=>e(r))}runTransaction(e,r,u,d){var p=this;return(0,i.c)(function*(){const w="readonly"===r;let re=0;for(;;){++re;try{p.db=yield p.O(e);const Te=jl.open(p.db,e,w?"readonly":"readwrite",u),ct=d(Te).next(Jt=>(Te.g(),Jt)).catch(Jt=>(Te.abort(Jt),Lr.reject(Jt))).toPromise();return ct.catch(()=>{}),yield Te.m,ct}catch(Te){const ct=Te,Jt="FirebaseError"!==ct.name&&re<3;if(ot("SimpleDb","Transaction failed with error:",ct.message,"Retrying:",Jt),p.
1close(),!Jt)return Promise.reject(ct)}}})()}close(){this.db&&this.db.close(),this.db=void 0}}class _l{constructor(e){this.k=e,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(e){this.k=e}done(){this.q=!0}U(e){this.K=e}delete(){return pa(this.k.delete())}}class Gl extends Xr{constructor(e,r){super(Ar.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${r}`),this.name="IndexedDbTransactionError"}}function Ea(o){return"IndexedDbTransactionError"===o.name}class hu{constructor(e){this.store=e}put(e,r){let u;return void 0!==r?(ot("SimpleDb","PUT",this.store.name,e,r),u=this.store.put(r,e)):(ot("SimpleDb","PUT",this.store.name,"<auto-key>",e),u=this.store.put(e)),pa(u)}add(e){return ot("SimpleDb","ADD",this.store.name,e,e),pa(this.store.add(e))}get(e){return pa(this.store.get(e)).next(r=>(void 0===r&&(r=null),ot("SimpleDb","GET",this.store.name,e,r),r))}delete(e){return ot("SimpleDb","DELETE",this.store.name,e),pa(this.store.delete(e))}count(){return ot("SimpleDb","COUNT",this.store.name),pa(this.store.count())}W(e,r){const u=this.options(e,r),d=u.index?this.store.index(u.index):this.store;if("function"==typeof d.getAll){const p=d.getAll(u.range);return new Lr((w,re)=>{p.onerror=Te=>{re(Te.target.error)},p.onsuccess=Te=>{w(Te.target.result)}})}{const p=this.cursor(u),w=[];return this.G(p,(re,Te)=>{w.push(Te)}).next(()=>w)}}j(e,r){const u=this.store.getAll(e,null===r?void 0:r);return new Lr((d,p)=>{u.onerror=w=>{p(w.target.error)},u.onsuccess=w=>{d(w.target.result)}})}H(e,r){ot("SimpleDb","DELETE ALL",this.store.name);const u=this.options(e,r);u.J=!1;const d=this.cursor(u);return this.G(d,(p,w,re)=>re.delete())}Y(e,r){let u;r?u=e:(u={},r=e);const d=this.cursor(u);return this.G(d,r)}Z(e){const r=this.cursor({});return new Lr((u,d)=>{r.onerror=p=>{const w=Al(p.target.error);d(w)},r.onsuccess=p=>{const w=p.target.result;w?e(w.primaryKey,w.value).next(re=>{re?w.continue():u()}):u()}})}G(e,r){const u=[];return new Lr((d,p)=>{e.onerror=w=>{p(w.target.error)},e.onsuccess=w=>{const re=w.target.result;if(!re)return void d();const Te=new _l(re),ct=r(re.primaryKey,re.value,Te);if(ct instanceof Lr){const Jt=ct.catch(Dn=>(Te.done(),Lr.reject(Dn)));u.push(Jt)}Te.isDone?d():null===Te.$?re.continue():re.continue(Te.$)}}).next(()=>Lr.waitFor(u))}options(e,r){let u;return void 0!==e&&("string"==typeof e?u=e:r=e),{index:u,range:r}}cursor(e){let r="next";if(e.reverse&&(r="prev"),e.index){const u=this.store.index(e.index);return e.J?u.openKeyCursor(e.range,r):u.openCursor(e.range,r)}return this.store.openCursor(e.range,r)}}function pa(o){return new Lr((e,r)=>{o.onsuccess=u=>{e(u.target.result)},o.onerror=u=>{const d=Al(u.target.error);r(d)}})}let al=!1;function Al(o){const e=ha.S((0,C.Su)());if(e>=12.2&&e<13){const r="An internal error was encountered in the Indexed Database server";if(o.message.indexOf(r)>=0){const u=new Xr("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${r}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return al||(al=!0,setTimeout(()=>{throw u},0)),u}}return o}class pu{constructor(e,r){this.asyncQueue=e,this.X=r,this.task=null}start(){this.ee(15e3)}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return null!==this.task}ee(e){var r=this;ot("IndexBackfiller",`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,(0,i.c)(function*(){r.task=null;try{ot("IndexBackfiller",`Documents written: ${yield r.X.te()}`)}catch(u){Ea(u)?ot("IndexBackfiller","Ignoring IndexedDB error during index backfill: ",u):yield oa(u)}yield r.ee(6e4)}))}}class ll{constructor(e,r){this.localStore=e,this.persistence=r}te(e=50){var r=this;return(0,i.c)(function*(){return r.persistence.runTransaction("Backfill Indexes","readwrite-primary",u=>r.ne(u,e))})()}ne(e,r){const u=new Set;let d=r,p=!0;return Lr.doWhile(()=>!0===p&&d>0,()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next(w=>{if(null!==w&&!u.has(w))return ot("IndexBackfiller",`Processing collection: ${w}`),this.re(e,w,d).next(re=>{d-=re,u.add(w)});p=!1})).next(()=>r-d)}re(e,r,u){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,r).next(d=>this.localStore.localDocuments.getNextDocuments(e,r,d,u).next(p=>{const w=p.changes;return this.localStore.indexManager.updateIndexEntries(e,w).next(()=>this.ie(d,p)).next(re=>(ot("IndexBackfiller",`Updating offset: ${re}`),this.localStore.indexManager.updateCollectionGroup(e,r,re))).next(()=>w.size)}))}ie(e,r){let u=e;
1return r.changes.forEach((d,p)=>{const w=Jl(p);lc(w,u)>0&&(u=w)}),new Wo(u.readTime,u.documentKey,Math.max(r.batchId,e.largestBatchId))}}let Ds=(()=>{class o{constructor(r,u){this.previousValue=r,u&&(u.sequenceNumberHandler=d=>this.se(d),this.oe=d=>u.writeSequenceNumber(d))}se(r){return this.previousValue=Math.max(r,this.previousValue),this.previousValue}next(){const r=++this.previousValue;return this.oe&&this.oe(r),r}}return o._e=-1,o})();function gu(o){return null==o}function Ka(o){return 0===o&&1/o==-1/0}function Dl(o){return"number"==typeof o&&Number.isInteger(o)&&!Ka(o)&&o<=Number.MAX_SAFE_INTEGER&&o>=Number.MIN_SAFE_INTEGER}function aa(o){let e="";for(let r=0;r<o.length;r++)e.length>0&&(e=fe(e)),e=F(o.get(r),e);return fe(e)}function F(o,e){let r=e;const u=o.length;for(let d=0;d<u;d++){const p=o.charAt(d);switch(p){case"\0":r+="\x01\x10";break;case"\x01":r+="\x01\x11";break;default:r+=p}}return r}function fe(o){return o+"\x01\x01"}function $(o){const e=o.length;if(Pr(e>=2),2===e)return Pr("\x01"===o.charAt(0)&&"\x01"===o.charAt(1)),Es.emptyPath();const r=e-2,u=[];let d="";for(let p=0;p<e;){const w=o.indexOf("\x01",p);switch((w<0||w>r)&&qn(),o.charAt(w+1)){case"\x01":const re=o.substring(p,w);let Te;0===d.length?Te=re:(d+=re,Te=d,d=""),u.push(Te);break;case"\x10":d+=o.substring(p,w),d+="\0";break;case"\x11":d+=o.substring(p,w+1);break;default:qn()}p=w+2}return new Es(u)}const ve=["userId","batchId"];function ht(o,e){return[o,aa(e)]}function qt(o,e,r){return[o,aa(e),r]}const zn={},Cr=["prefixPath","collectionGroup","readTime","documentId"],Ur=["prefixPath","collectionGroup","documentId"],Hi=["collectionGroup","readTime","prefixPath","documentId"],Ss=["canonicalId","targetId"],Ps=["targetId","path"],So=["path","targetId"],Wl=["collectionId","parent"],zl=["indexId","uid"],Hl=["uid","sequenceNumber"],mu=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],Ya=["indexId","uid","orderedDocumentKey"],vu=["userId","collectionPath","documentId"],ys=["userId","collectionPath","largestBatchId"],Bu=["userId","collectionGroup","largestBatchId"],Kl=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],uc=[...Kl,"documentOverlays"],Zl=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],$u=Zl,cc=[...$u,"indexConfiguration","indexState","indexEntries"];class yu extends fu{constructor(e,r){super(),this.ae=e,this.currentSequenceNumber=r}}function zo(o,e){const r=pi(o);return ha.M(r.ae,e)}function ju(o){let e=0;for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&e++;return e}function yl(o,e){for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&e(r,o[r])}function id(o){for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e))return!1;return!0}class Zs{constructor(e,r){this.comparator=e,this.root=r||ls.EMPTY}insert(e,r){return new Zs(this.comparator,this.root.insert(e,r,this.comparator).copy(null,null,ls.BLACK,null,null))}remove(e){return new Zs(this.comparator,this.root.remove(e,this.comparator).copy(null,null,ls.BLACK,null,null))}get(e){let r=this.root;for(;!r.isEmpty();){const u=this.comparator(e,r.key);if(0===u)return r.value;u<0?r=r.left:u>0&&(r=r.right)}return null}indexOf(e){let r=0,u=this.root;for(;!u.isEmpty();){const d=this.comparator(e,u.key);if(0===d)return r+u.left.size;d<0?u=u.left:(r+=u.left.size+1,u=u.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((r,u)=>(e(r,u),!1))}toString(){const e=[];return this.inorderTraversal((r,u)=>(e.push(`${r}:${u}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new cs(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new cs(this.root,e,this.comparator,!1)}getReverseIterator(){return new cs(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new cs(this.root,e,this.comparator,!0)}}class cs{constructor(e,r,u,d){this.isReverse=d,this.nodeStack=[];let p=1;for(;!e.isEmpty();)if(p=r?u(e.key,r):1,r&&d&&(p*=-1),p<0)e=this.isReverse?e.left:e.right;else{if(0===p){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const r={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 r}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class ls{constructor(e,r,u,d,p){this.key=e,this.value=r,this.color=u??ls.RED,this.left=d??ls.EMPTY,this.right=p??ls.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,r,u,d,p){return new ls(e??this.key,r??this.value,u??this.color,d??this.left,p??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,r,u){let d=this;const p=u(e,d.key);return d=p<0?d.copy(null,null,null,d.left.insert(e,r,u),null):0===p?d.copy(null,r,null,null,null):d.copy(null,null,null,null,d.right.insert(e,r,u)),d.fixUp()}removeMin(){if(this.left.isEmpty())return ls.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,r){let u,d=this;if(r(e,d.key)<0)d.left.isEmpty()||d.left.isRed()||d.left.left.isRed()||(d=d.moveRedLeft()),d=d.copy(null,null,null,d.left.remove(e,r),null);else{if(d.left.isRed()&&(d=d.rotateRight()),d.right.isEmpty()||d.right.isRed()||d.right.left.isRed()||(d=d.moveRedRight()),0===r(e,d.key)){if(d.right.isEmpty())return ls.EMPTY;u=d.right.min(),d=d.copy(u.key,u.value,null,null,d.right.removeMin())}d=d.copy(null,null,null,null,d.right.remove(e,r))}return d.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,ls.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,ls.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),r=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,r)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw qn();const e=this.left.check();if(e!==this.right.check())throw qn();return e+(this.isRed()?0:1)}}
1ls.EMPTY=null,ls.RED=!0,ls.BLACK=!1,ls.EMPTY=new class{constructor(){this.size=0}get key(){throw qn()}get value(){throw qn()}get color(){throw qn()}get left(){throw qn()}get right(){throw qn()}copy(e,r,u,d,p){return this}insert(e,r,u){return new ls(e,r)}remove(e,r){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 so{constructor(e){this.comparator=e,this.data=new Zs(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((r,u)=>(e(r),!1))}forEachInRange(e,r){const u=this.data.getIteratorFrom(e[0]);for(;u.hasNext();){const d=u.getNext();if(this.comparator(d.key,e[1])>=0)return;r(d.key)}}forEachWhile(e,r){let u;for(u=void 0!==r?this.data.getIteratorFrom(r):this.data.getIterator();u.hasNext();)if(!e(u.getNext().key))return}firstAfterOrEqual(e){const r=this.data.getIteratorFrom(e);return r.hasNext()?r.getNext().key:null}getIterator(){return new Da(this.data.getIterator())}getIteratorFrom(e){return new Da(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 r=this;return r.size<e.size&&(r=e,e=this),e.forEach(u=>{r=r.add(u)}),r}isEqual(e){if(!(e instanceof so)||this.size!==e.size)return!1;const r=this.data.getIterator(),u=e.data.getIterator();for(;r.hasNext();){const d=r.getNext().key,p=u.getNext().key;if(0!==this.comparator(d,p))return!1}return!0}toArray(){const e=[];return this.forEach(r=>{e.push(r)}),e}toString(){const e=[];return this.forEach(r=>e.push(r)),"SortedSet("+e.toString()+")"}copy(e){const r=new so(this.comparator);return r.data=e,r}}class Da{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}function ql(o){return o.hasNext()?o.getNext():void 0}
1class Oa{constructor(e){this.fields=e,e.sort(zs.comparator)}static empty(){return new Oa([])}unionWith(e){let r=new so(zs.comparator);for(const u of this.fields)r=r.add(u);for(const u of e)r=r.add(u);return new Oa(r.toArray())}covers(e){for(const r of this.fields)if(r.isPrefixOf(e))return!0;return!1}isEqual(e){return Bl(this.fields,e.fields,(r,u)=>r.isEqual(u))}}class Gu extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}function eu(){return typeof atob<"u"}class $o{constructor(e){this.binaryString=e}static fromBase64String(e){const r=function(d){try{return atob(d)}catch(p){throw typeof DOMException<"u"&&p instanceof DOMException?new Gu("Invalid base64 string: "+p):p}}(e);return new $o(r)}static fromUint8Array(e){const r=function(d){let p="";for(let w=0;w<d.length;++w)p+=String.fromCharCode(d[w]);return p}(e);return new $o(r)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function(r){const u=new Uint8Array(r.length);for(let d=0;d<r.length;d++)u[d]=r.charCodeAt(d);return u}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return vs(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}$o.EMPTY_BYTE_STRING=new $o("");const ul=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Po(o){if(Pr(!!o),"string"==typeof o){let e=0;const r=ul.exec(o);if(Pr(!!r),r[1]){let d=r[1];d=(d+"000000000").substr(0,9),e=Number(d)}const u=new Date(o);return{seconds:Math.floor(u.getTime()/1e3),nanos:e}}return{seconds:Ro(o.seconds),nanos:Ro(o.nanos)}}function Ro(o){return"number"==typeof o?o:"string"==typeof o?Number(o):0}function Hs(o){return"string"==typeof o?$o.fromBase64String(o):$o.fromUint8Array(o)}function tu(o){var e,r;return"server_timestamp"===(null===(r=((null===(e=o?.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===r?void 0:r.stringValue)}function cl(o){const e=o.mapValue.fields.__previous_value__;return tu(e)?cl(e):e}function El(o){const e=Po(o.mapValue.fields.__local_write_time__.timestampValue);return new io(e.seconds,e.nanos)}class Wu{constructor(e,r,u,d,p,w,re,Te,ct){this.databaseId=e,this.appId=r,this.persistenceKey=u,this.host=d,this.ssl=p,this.forceLongPolling=w,this.autoDetectLongPolling=re,this.longPollingOptions=Te,this.useFetchStreams=ct}}class Ga{constructor(e,r){this.projectId=e,this.database=r||"(default)"}static empty(){return new Ga("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof Ga&&e.projectId===this.projectId&&e.database===this.database}}const Xa={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},Eu={nullValue:"NULL_VALUE"};function dl(o){return"nullValue"in o?0:"booleanValue"in o?1:"integerValue"in o||"doubleValue"in o?2:"timestampValue"in o?3:"stringValue"in o?5:"bytesValue"in o?6:"referenceValue"in o?7:"geoPointValue"in o?8:"arrayValue"in o?9:"mapValue"in o?tu(o)?4:Os(o)?9007199254740991:10:qn()}function la(o,e){if(o===e)return!0;const r=dl(o);if(r!==dl(e))return!1;switch(r){case 0:case 9007199254740991:return!0;case 1:return o.booleanValue===e.booleanValue;case 4:return El(o).isEqual(El(e));case 3:return function(d,p){if("string"==typeof d.timestampValue&&"string"==typeof p.timestampValue&&d.timestampValue.length===p.timestampValue.length)return d.timestampValue===p.timestampValue;const w=Po(d.timestampValue),re=Po(p.timestampValue);return w.seconds===re.seconds&&w.nanos===re.nanos}(o,e);case 5:return o.stringValue===e.stringValue;case 6:return p=e,Hs(o.bytesValue).isEqual(Hs(p.bytesValue));case 7:return o.referenceValue===e.referenceValue;case 8:return function(d,p){return Ro(d.geoPointValue.latitude)===Ro(p.geoPointValue.latitude)&&Ro(d.geoPointValue.longitude)===Ro(p.geoPointValue.longitude)}(o,e);case 2:return function(d,p){if("integerValue"in d&&"integerValue"in p)return Ro(d.integerValue)===Ro(p.integerValue);if("doubleValue"in d&&"doubleValue"in p){const w=Ro(d.doubleValue),re=Ro(p.doubleValue);return w===re?Ka(w)===Ka(re):isNaN(w)&&isNaN(re)}return!1}(o,e);case 9:return Bl(o.arrayValue.values||[],e.arrayValue.values||[],la);case 10:return function(d,p){const w=d.mapValue.fields||{},re=p.mapValue.fields||{};if(ju(w)!==ju(re))return!1;for(const Te in w)if(w.hasOwnProperty(Te)&&(void 0===re[Te]||!la(w[Te],re[Te])))return!1;return!0}(o,e);default:return qn()}var p}function Yl(o,e){return void 0!==(o.values||[]).find(r=>la(r,e))}function ta(o,e){if(o===e)return 0;const r=dl(o),u=dl(e);if(r!==u)return vs(r,u);switch(r){case 0:case 9007199254740991:return 0;case 1:return vs(o.booleanValue,e.booleanValue);case 2:return function(p,w){const re=Ro(p.integerValue||p.doubleValue),Te=Ro(w.integerValue||w.doubleValue);return re<Te?-1:re>Te?1:re===Te?0:isNaN(re)?isNaN(Te)?0:-1:1}(o,e);case 3:return zu(o.timestampValue,e.timestampValue);case 4:return zu(El(o),El(e));case 5:return vs(o.stringValue,e.stringValue);case 6:return function(p,w){const re=Hs(p),Te=Hs(w);return re.compareTo(Te)}(o.bytesValue,e.bytesValue);case 7:return function(p,w){const re=p.split("/"),Te=w.split("/");for(let ct=0;ct<re.length&&ct<Te.length;ct++){const Jt=vs(re[ct],Te[ct]);if(0!==Jt)return Jt}return vs(re.length,Te.length)}(o.referenceValue,e.referenceValue);case 8:return function(p,w){const re=vs(Ro(p.latitude),Ro(w.latitude));return 0!==re?re:vs(Ro(p.longitude),Ro(w.longitude))}(o.geoPointValue,e.geoPointValue);case 9:return function(p,w){const re=p.values||[],Te=w.values||[];for(let ct=0;ct<re.length&&ct<Te.length;++ct){const Jt=ta(re[ct],Te[ct]);if(Jt)return Jt}return vs(re.length,Te.length)}(o.arrayValue,e.arrayValue);case 10:return function(p,w){if(p===Xa.mapValue&&w===Xa.mapValue)return 0;if(p===Xa.mapValue)return 1;if(w===Xa.mapValue)return-1;const re=p.fields||{},Te=Object.keys(re),ct=w.fields||{},Jt=Object.keys(ct);Te.sort(),Jt.sort();for(let Dn=0;Dn<Te.length&&Dn<Jt.length;++Dn){const lr=vs(Te[Dn],Jt[Dn]);if(0!==lr)return lr;const Yr=ta(re[Te[Dn]],ct[Jt[Dn]]);if(0!==Yr)return Yr}return vs(Te.length,Jt.length)}(o.mapValue,e.mapValue);default:throw qn()}}function zu(o,e){if("string"==typeof o&&"string"==typeof e&&o.length===e.length)return vs(o,e);const r=Po(o),u=Po(e),d=vs(r.seconds,u.seconds);return 0!==d?d:vs(r.nanos,u.nanos)}function Lo(o){return wu(o)}function wu(o){return"nullValue"in o?"null":"booleanValue"in o?""+o.booleanValue:"integerValue"in o?""+o.integerValue:"doubleValue"in o?""+o.doubleValue:"timestampValue"in o?function(r){const u=Po(r);return`time(${u.seconds},${u.nanos})`}(o.timestampValue):"stringValue"in o?o.stringValue:"bytesValue"in o?Hs(o.bytesValue).toBase64():"referenceValue"in o?Vi.fromName(o.referenceValue).toString():"geoPointValue"in o?function(r){return`geo(${r.latitude},${r.longitude})`}(o.geoPointValue):"arrayValue"in o?function(r){let u="[",d=!0;for(const p of r.values||[])d?d=!1:u+=",",u+=wu(p);return u+"]"}(o.arrayValue):"mapValue"in o?function(r){const u=Object.keys(r.fields||{}).sort();let d="{",p=!0;for(const w of u)p?p=!1:d+=",",d+=`${w}:${wu(r.fields[w])}`;return d+"}"}(o.mapValue):qn()}function nn(o,e){return{referenceValue:`projects/${o.projectId}/databases/${o.database}/documents/${e.path.canonicalString()}`}}
1function _r(o){return!!o&&"integerValue"in o}function Wr(o){return!!o&&"arrayValue"in o}function Li(o){return!!o&&"nullValue"in o}function $i(o){return!!o&&"doubleValue"in o&&isNaN(Number(o.doubleValue))}function _s(o){return!!o&&"mapValue"in o}function Ls(o){if(o.geoPointValue)return{geoPointValue:Object.assign({},o.geoPointValue)};if(o.timestampValue&&"object"==typeof o.timestampValue)return{timestampValue:Object.assign({},o.timestampValue)};if(o.mapValue){const e={mapValue:{fields:{}}};return yl(o.mapValue.fields,(r,u)=>e.mapValue.fields[r]=Ls(u)),e}if(o.arrayValue){const e={arrayValue:{values:[]}};for(let r=0;r<(o.arrayValue.values||[]).length;++r)e.arrayValue.values[r]=Ls(o.arrayValue.values[r]);return e}return Object.assign({},o)}function Os(o){return"__max__"===(((o.mapValue||{}).fields||{}).__type__||{}).stringValue}function oo(o){return"nullValue"in o?Eu:"booleanValue"in o?{booleanValue:!1}:"integerValue"in o||"doubleValue"in o?{doubleValue:NaN}:"timestampValue"in o?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in o?{stringValue:""}:"bytesValue"in o?{bytesValue:""}:"referenceValue"in o?nn(Ga.empty(),Vi.empty()):"geoPointValue"in o?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in o?{arrayValue:{}}:"mapValue"in o?{mapValue:{}}:qn()}function wo(o){return"nullValue"in o?{booleanValue:!1}:"booleanValue"in o?{doubleValue:NaN}:"integerValue"in o||"doubleValue"in o?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in o?{stringValue:""}:"stringValue"in o?{bytesValue:""}:"bytesValue"in o?nn(Ga.empty(),Vi.empty()):"referenceValue"in o?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in o?{arrayValue:{}}:"arrayValue"in o?{mapValue:{}}:"mapValue"in o?Xa:qn()}function Mo(o,e){const r=ta(o.value,e.value);return 0!==r?r:o.inclusive&&!e.inclusive?-1:!o.inclusive&&e.inclusive?1:0}function xo(o,e){const r=ta(o.value,e.value);return 0!==r?r:o.inclusive&&!e.inclusive?1:!o.inclusive&&e.inclusive?-1:0}class Bs{constructor(e){this.value=e}static empty(){return new Bs({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let r=this.value;for(let u=0;u<e.length-1;++u)if(r=(r.mapValue.fields||{})[e.get(u)],!_s(r))return null;return r=(r.mapValue.fields||{})[e.lastSegment()],r||null}}set(e,r){this.getFieldsMap(e.popLast())[e.lastSegment()]=Ls(r)}setAll(e){let r=zs.emptyPath(),u={},d=[];e.forEach((w,re)=>{if(!r.isImmediateParentOf(re)){const Te=this.getFieldsMap(r);this.applyChanges(Te,u,d),u={},d=[],r=re.popLast()}w?u[re.lastSegment()]=Ls(w):d.push(re.lastSegment())});const p=this.getFieldsMap(r);this.applyChanges(p,u,d)}delete(e){const r=this.field(e.popLast());_s(r)&&r.mapValue.fields&&delete r.mapValue.fields[e.lastSegment()]}isEqual(e){return la(this.value,e.value)}getFieldsMap(e){let r=this.value;r.mapValue.fields||(r.mapValue={fields:{}});for(let u=0;u<e.length;++u){let d=r.mapValue.fields[e.get(u)];_s(d)&&d.mapValue.fields||(d={mapValue:{fields:{}}},r.mapValue.fields[e.get(u)]=d),r=d}return r.mapValue.fields}applyChanges(e,r,u){yl(r,(d,p)=>e[d]=p);for(const d of u)delete e[d]}clone(){return new Bs(Ls(this.value))}}function To(o){const e=[];return yl(o.fields,(r,u)=>{const d=new zs([r]);if(_s(u)){const p=To(u.mapValue).fields;if(0===p.length)e.push(d);else for(const w of p)e.push(d.child(w))}else e.push(d)}),new Oa(e)}class qs{constructor(e,r,u,d,p,w,re){this.key=e,this.documentType=r,this.version=u,this.readTime=d,this.createTime=p,this.data=w,this.documentState=re}static newInvalidDocument(e){return new qs(e,0,ts.min(),ts.min(),ts.min(),Bs.empty(),0)}static newFoundDocument(e,r,u,d){return new qs(e,1,r,ts.min(),u,d,0)}static newNoDocument(e,r){return new qs(e,2,r,ts.min(),ts.min(),Bs.empty(),0)}
1static newUnknownDocument(e,r){return new qs(e,3,r,ts.min(),ts.min(),Bs.empty(),2)}convertToFoundDocument(e,r){return!this.createTime.isEqual(ts.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),this.version=e,this.documentType=1,this.data=r,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Bs.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Bs.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=ts.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 qs&&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 qs(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 Ho{constructor(e,r){this.position=e,this.inclusive=r}}function As(o,e,r){let u=0;for(let d=0;d<o.position.length;d++){const p=e[d],w=o.position[d];if(u=p.field.isKeyField()?Vi.comparator(Vi.fromName(w.referenceValue),r.key):ta(w,r.data.field(p.field)),"desc"===p.dir&&(u*=-1),0!==u)break}return u}function ao(o,e){if(null===o)return null===e;if(null===e||o.inclusive!==e.inclusive||o.position.length!==e.position.length)return!1;for(let r=0;r<o.position.length;r++)if(!la(o.position[r],e.position[r]))return!1;return!0}class ws{constructor(e,r="asc"){this.field=e,this.dir=r}}function Rs(o,e){return o.dir===e.dir&&o.field.isEqual(e.field)}class co{}class qi extends co{constructor(e,r,u){super(),this.field=e,this.op=r,this.value=u}static create(e,r,u){return e.isKeyField()?"in"===r||"not-in"===r?this.createKeyFieldInFilter(e,r,u):new Af(e,r,u):"array-contains"===r?new od(e,u):"in"===r?new Df(e,u):"not-in"===r?new Th(e,u):"array-contains-any"===r?new I(e,u):new qi(e,r,u)}static createKeyFieldInFilter(e,r,u){return"in"===r?new Hu(e,u):new jd(e,u)}matches(e){const r=e.data.field(this.field);return"!="===this.op?null!==r&&this.matchesComparison(ta(r,this.value)):null!==r&&dl(this.value)===dl(r)&&this.matchesComparison(ta(r,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return qn()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class ps extends co{constructor(e,r){super(),this.filters=e,this.op=r,this.ue=null}static create(e,r){return new ps(e,r)}matches(e){return fl(this)?void 0===this.filters.find(r=>!r.matches(e)):void 0!==this.filters.find(r=>r.matches(e))}getFlattenedFilters(){return null!==this.ue||(this.ue=this.filters.reduce((e,r)=>e.concat(r.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function fl(o){return"and"===o.op}function bu(o){return"or"===o.op}function Tc(o){return $d(o)&&fl(o)}function $d(o){for(const e of o.filters)if(e instanceof ps)return!1;return!0}function dc(o){if(o instanceof qi)return o.field.canonicalString()+o.op.toString()+Lo(o.value);if(Tc(o))return o.filters.map(e=>dc(e)).join(",");{const e=o.filters.map(r=>dc(r)).join(",");return`${o.op}(${e})`}}function fc(o,e){return o instanceof qi?(u=o,(d=e)instanceof qi&&u.op===d.op&&u.field.isEqual(d.field)&&la(u.value,d.value)):o instanceof ps?function(u,d){return d instanceof ps&&u.op===d.op&&u.filters.length===d.filters.length&&u.filters.reduce((p,w,re)=>p&&fc(w,d.filters[re]),!0)}(o,e):void qn();var u,d}function Iu(o,e){const r=o.filters.concat(e);return ps.create(r,o.op)}function sd(o){return o instanceof qi?`${(r=o).field.canonicalString()} ${r.op} ${Lo(r.value)}`:o instanceof ps?function(r){return r.op.toString()+" {"+r.getFilters().map(sd).join(" ,")+"}"}(o):"Filter";var r}class Af extends qi{constructor(e,r,u){super(e,r,u),this.key=Vi.fromN
1ame(u.referenceValue)}matches(e){const r=Vi.comparator(e.key,this.key);return this.matchesComparison(r)}}class Hu extends qi{constructor(e,r){super(e,"in",r),this.keys=Cc(0,r)}matches(e){return this.keys.some(r=>r.isEqual(e.key))}}class jd extends qi{constructor(e,r){super(e,"not-in",r),this.keys=Cc(0,r)}matches(e){return!this.keys.some(r=>r.isEqual(e.key))}}function Cc(o,e){var r;return((null===(r=e.arrayValue)||void 0===r?void 0:r.values)||[]).map(u=>Vi.fromName(u.referenceValue))}class od extends qi{constructor(e,r){super(e,"array-contains",r)}matches(e){const r=e.data.field(this.field);return Wr(r)&&Yl(r.arrayValue,this.value)}}class Df extends qi{constructor(e,r){super(e,"in",r)}matches(e){const r=e.data.field(this.field);return null!==r&&Yl(this.value.arrayValue,r)}}class Th extends qi{constructor(e,r){super(e,"not-in",r)}matches(e){if(Yl(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const r=e.data.field(this.field);return null!==r&&!Yl(this.value.arrayValue,r)}}class I extends qi{constructor(e,r){super(e,"array-contains-any",r)}matches(e){const r=e.data.field(this.field);return!(!Wr(r)||!r.arrayValue.values)&&r.arrayValue.values.some(u=>Yl(this.value.arrayValue,u))}}class l{constructor(e,r=null,u=[],d=[],p=null,w=null,re=null){this.path=e,this.collectionGroup=r,this.orderBy=u,this.filters=d,this.limit=p,this.startAt=w,this.endAt=re,this.ce=null}}function h(o,e=null,r=[],u=[],d=null,p=null,w=null){return new l(o,e,r,u,d,p,w)}function y(o){const e=pi(o);if(null===e.ce){let r=e.path.canonicalString();null!==e.collectionGroup&&(r+="|cg:"+e.collectionGroup),r+="|f:",r+=e.filters.map(u=>dc(u)).join(","),r+="|ob:",r+=e.orderBy.map(u=>{return(p=u).field.canonicalString()+p.dir;var p}).join(","),gu(e.limit)||(r+="|l:",r+=e.limit),e.startAt&&(r+="|lb:",r+=e.startAt.inclusive?"b:":"a:",r+=e.startAt.position.map(u=>Lo(u)).join(",")),e.endAt&&(r+="|ub:",r+=e.endAt.inclusive?"a:":"b:",r+=e.endAt.position.map(u=>Lo(u)).join(",")),e.ce=r}return e.ce}function O(o,e){if(o.limit!==e.limit||o.orderBy.length!==e.orderBy.length)return!1;for(let r=0;r<o.orderBy.length;r++)if(!Rs(o.orderBy[r],e.orderBy[r]))return!1;if(o.filters.length!==e.filters.length)return!1;for(let r=0;r<o.filters.length;r++)if(!fc(o.filters[r],e.filters[r]))return!1;return o.collectionGroup===e.collectionGroup&&!!o.path.isEqual(e.path)&&!!ao(o.startAt,e.startAt)&&ao(o.endAt,e.endAt)}function z(o){return Vi.isDocumentKey(o.path)&&null===o.collectionGroup&&0===o.filters.length}function Oe(o,e){return o.filters.filter(r=>r instanceof qi&&r.field.isEqual(e))}function Be(o,e,r){let u=Eu,d=!0;for(const p of Oe(o,e)){let w=Eu,re=!0;switch(p.op){case"<":case"<=":w=oo(p.value);break;case"==":case"in":case">=":w=p.value;break;case">":w=p.value,re=!1;break;case"!=":case"not-in":w=Eu}Mo({value:u,inclusive:d},{value:w,inclusive:re})<0&&(u=w,d=re)}if(null!==r)for(let p=0;p<o.orderBy.length;++p)if(o.orderBy[p].field.isEqual(e)){const w=r.position[p];Mo({value:u,inclusive:d},{value:w,inclusive:r.inclusive})<0&&(u=w,d=r.inclusive);break}return{value:u,inclusive:d}}function xe(o,e,r){let u=Xa,d=!0;for(const p of Oe(o,e)){let w=Xa,re=!0;switch(p.op){case">=":case">":w=wo(p.value),re=!1;break;case"==":case"in":case"<=":w=p.value;break;case"<":w=p.value,re=!1;break;case"!=":case"not-in":w=Xa}xo({value:u,inclusive:d},{value:w,inclusive:re})>0&&(u=w,d=re)}if(null!==r)for(let p=0;p<o.orderBy.length;++p)if(o.orderBy[p].field.isEqual(e)){const w=r.position[p];xo({value:u,inclusive:d},{value:w,inclusive:r.inclusive})>0&&(u=w,d=r.inclusive);break}return{value:u,inclusive:d}}class mt{constructor(e,r=null,u=[],d=[],p=null,w="F",re=null,Te=null){this.path=e,this.collectionGroup=r,this.explicitOrderBy=u,this.filters=d,this.limit=p,this.limitType=w,this.startAt=re,this.endAt=Te,this.le=null,this.he=null,this.Pe=null}}function gt(o,e,r,u,d,p,w,re){return new mt(o,e,r,u,d,p,w,re)}function vt(o){return new mt(o)}function Gt(o){return 0===o.filters.length&&null===o.limit&&null==o.startAt&&null==o.endAt&&(0===o.explicitOrderBy.length||1===o.explicitOrderBy.length&&o.explicitOrderBy[0].field.isKeyField())}function un(o){return null!==o.collectionGroup}function fn(o){const e=pi(o);if(null===e.le){e.le=[];const r=new Set;for(const p of e.explicitOrderBy)e.le.push(p),r.add(p.field.canonicalString());const u=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(w){let re=new so(zs.comparator);
1return w.filters.forEach(Te=>{Te.getFlattenedFilters().forEach(ct=>{ct.isInequality()&&(re=re.add(ct.field))})}),re})(e).forEach(p=>{r.has(p.canonicalString())||p.isKeyField()||e.le.push(new ws(p,u))}),r.has(zs.keyField().canonicalString())||e.le.push(new ws(zs.keyField(),u))}return e.le}function Sn(o){const e=pi(o);return e.he||(e.he=function Pn(o,e){if("F"===o.limitType)return h(o.path,o.collectionGroup,e,o.filters,o.limit,o.startAt,o.endAt);{e=e.map(d=>new ws(d.field,"desc"===d.dir?"asc":"desc"));const r=o.endAt?new Ho(o.endAt.position,o.endAt.inclusive):null,u=o.startAt?new Ho(o.startAt.position,o.startAt.inclusive):null;return h(o.path,o.collectionGroup,e,o.filters,o.limit,r,u)}}(e,fn(o))),e.he}function tn(o,e){const r=o.filters.concat([e]);return new mt(o.path,o.collectionGroup,o.explicitOrderBy.slice(),r,o.limit,o.limitType,o.startAt,o.endAt)}function kn(o,e,r){return new mt(o.path,o.collectionGroup,o.explicitOrderBy.slice(),o.filters.slice(),e,r,o.startAt,o.endAt)}function Rn(o,e){return O(Sn(o),Sn(e))&&o.limitType===e.limitType}function vr(o){return`${y(Sn(o))}|lt:${o.limitType}`}function hi(o){return`Query(target=${function(r){let u=r.path.canonicalString();return null!==r.collectionGroup&&(u+=" collectionGroup="+r.collectionGroup),r.filters.length>0&&(u+=`, filters: [${r.filters.map(d=>sd(d)).join(", ")}]`),gu(r.limit)||(u+=", limit: "+r.limit),r.orderBy.length>0&&(u+=`, orderBy: [${r.orderBy.map(d=>{return`${(w=d).field.canonicalString()} (${w.dir})`;var w}).join(", ")}]`),r.startAt&&(u+=", startAt: ",u+=r.startAt.inclusive?"b:":"a:",u+=r.startAt.position.map(d=>Lo(d)).join(",")),r.endAt&&(u+=", endAt: ",u+=r.endAt.inclusive?"a:":"b:",u+=r.endAt.position.map(d=>Lo(d)).join(",")),`Target(${u})`}(Sn(o))}; limitType=${o.limitType})`}function ui(o,e){return e.isFoundDocument()&&function(u,d){const p=d.key.path;return null!==u.collectionGroup?d.key.hasCollectionId(u.collectionGroup)&&u.path.isPrefixOf(p):Vi.isDocumentKey(u.path)?u.path.isEqual(p):u.path.isImmediateParentOf(p)}(o,e)&&function(u,d){for(const p of fn(u))if(!p.field.isKeyField()&&null===d.data.field(p.field))return!1;return!0}(o,e)&&function(u,d){for(const p of u.filters)if(!p.matches(d))return!1;return!0}(o,e)&&(d=e,!((u=o).startAt&&!function(w,re,Te){const ct=As(w,re,Te);return w.inclusive?ct<=0:ct<0}(u.startAt,fn(u),d)||u.endAt&&!function(w,re,Te){const ct=As(w,re,Te);return w.inclusive?ct>=0:ct>0}(u.endAt,fn(u),d)));var u,d}function Ri(o){return o.collectionGroup||(o.path.length%2==1?o.path.lastSegment():o.path.get(o.path.length-2))}function ni(o){return(e,r)=>{let u=!1;for(const d of fn(o)){const p=Qr(d,e,r);if(0!==p)return p;u=u||d.field.isKeyField()}return 0}}function Qr(o,e,r){const u=o.field.isKeyField()?Vi.comparator(e.key,r.key):function(p,w,re){const Te=w.data.field(p),ct=re.data.field(p);return null!==Te&&null!==ct?ta(Te,ct):qn()}(o.field,e,r);switch(o.dir){case"asc":return u;case"desc":return-1*u;default:return qn()}}class Zr{constructor(e,r){this.mapKeyFn=e,this.equalsFn=r,this.inner={},this.innerSize=0}get(e){const r=this.mapKeyFn(e),u=this.inner[r];if(void 0!==u)for(const[d,p]of u)if(this.equalsFn(d,e))return p}has(e){return void 0!==this.get(e)}set(e,r){const u=this.mapKeyFn(e),d=this.inner[u];if(void 0===d)return this.inner[u]=[[e,r]],void this.innerSize++;for(let p=0;p<d.length;p++)if(this.equalsFn(d[p][0],e))return void(d[p]=[e,r]);d.push([e,r]),this.innerSize++}delete(e){const r=this.mapKeyFn(e),u=this.inner[r];if(void 0===u)return!1;for(let d=0;d<u.length;d++)if(this.equalsFn(u[d][0],e))return 1===u.length?delete this.inner[r]:u.splice(d,1),this.innerSize--,!0;return!1}forEach(e){yl(this.inner,(r,u)=>{for(const[d,p]of u)e(d,p)})}isEmpty(){return id(this.inner)}size(){return this.innerSize}}const Si=new Zs(Vi.comparator);function $r(){return Si}const Kn=new Zs(Vi.comparator);function yr(...o){let e=Kn;for(const r of o)e=e.insert(r.key,r);return e}function gi(o){let e=Kn;return o.forEach((r,u)=>e=e.insert(r,u.overlayedDocument)),e}function ci(){return Dr()}function Ui(){return Dr()}function Dr(){return new Zr(o=>o.toString(),(o,e)=>o.isEqual(e))}
1const ai=new Zs(Vi.comparator),Ei=new so(Vi.comparator);function Bi(...o){let e=Ei;for(const r of o)e=e.add(r);return e}const Ys=new so(vs);function rs(){return Ys}function gs(o,e){if(o.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Ka(e)?"-0":e}}function Ko(o){return{integerValue:""+o}}function Pl(o,e){return Dl(e)?Ko(e):gs(o,e)}class $s{constructor(){this._=void 0}}function Yo(o,e,r){return o instanceof Qa?function(d,p){const w={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:d.seconds,nanos:d.nanoseconds}}}};return p&&tu(p)&&(p=cl(p)),p&&(w.fields.__previous_value__=p),{mapValue:w}}(r,e):o instanceof Xl?Rl(o,e):o instanceof Ml?_c(o,e):function(d,p){const w=nu(d,p),re=Su(w)+Su(d.Ie);return _r(w)&&_r(d.Ie)?Ko(re):gs(d.serializer,re)}(o,e)}function wa(o,e,r){return o instanceof Xl?Rl(o,e):o instanceof Ml?_c(o,e):r}function nu(o,e){return o instanceof ru?_r(u=e)||(p=u)&&"doubleValue"in p?e:{integerValue:0}:null;var u,p}class Qa extends $s{}class Xl extends $s{constructor(e){super(),this.elements=e}}function Rl(o,e){const r=Ku(e);for(const u of o.elements)r.some(d=>la(d,u))||r.push(u);return{arrayValue:{values:r}}}class Ml extends $s{constructor(e){super(),this.elements=e}}function _c(o,e){let r=Ku(e);for(const u of o.elements)r=r.filter(d=>!la(d,u));return{arrayValue:{values:r}}}class ru extends $s{constructor(e,r){super(),this.serializer=e,this.Ie=r}}function Su(o){return Ro(o.integerValue||o.doubleValue)}function Ku(o){return Wr(o)&&o.arrayValue.values?o.arrayValue.values.slice():[]}class hl{constructor(e,r){this.field=e,this.transform=r}}class Cu{constructor(e,r){this.version=e,this.transformResults=r}}class Fo{constructor(e,r){this.updateTime=e,this.exists=r}static none(){return new Fo}static exists(e){return new Fo(void 0,e)}static updateTime(e){return new Fo(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 na(o,e){return void 0!==o.updateTime?e.isFoundDocument()&&e.version.isEqual(o.updateTime):void 0===o.exists||o.exists===e.isFoundDocument()}class ad{}function ld(o,e){if(!o.hasLocalMutations||e&&0===e.fields.length)return null;if(null===e)return o.isNoDocument()?new Dc(o.key,Fo.none()):new Ac(o.key,o.data,Fo.none());{const r=o.data,u=Bs.empty();let d=new so(zs.comparator);for(let p of e.fields)if(!d.has(p)){let w=r.field(p);null===w&&p.length>1&&(p=p.popLast(),w=r.field(p)),null===w?u.delete(p):u.set(p,w),d=d.add(p)}return new _u(o.key,u,new Oa(d.toArray()),Fo.none())}}function ud(o,e,r){o instanceof Ac?function(d,p,w){const re=d.value.clone(),Te=Gd(d.fieldTransforms,p,w.transformResults);re.setAll(Te),p.convertToFoundDocument(w.version,re).setHasCommittedMutations()}(o,e,r):o instanceof _u?function(d,p,w){if(!na(d.precondition,p))return void p.convertToUnknownDocument(w.version);const re=Gd(d.fieldTransforms,p,w.transformResults),Te=p.data;Te.setAll(Ch(d)),Te.setAll(re),p.convertToFoundDocument(w.version,Te).setHasCommittedMutations()}(o,e,r):e.convertToNoDocument(r.version).setHasCommittedMutations()}function cd(o,e,r,u){return o instanceof Ac?function(p,w,re,Te){if(!na(p.precondition,w))return re;const ct=p.value.clone(),Jt=Au(p.fieldTransforms,Te,w);return ct.setAll(Jt),w.convertToFoundDocument(w.version,ct).setHasLocalMutations(),null}(o,e,r,u):o instanceof _u?function(p,w,re,Te){if(!na(p.precondition,w))return re;const ct=Au(p.fieldTransforms,Te,w),Jt=w.data;return Jt.setAll(Ch(p)),Jt.setAll(ct),w.convertToFoundDocument(w.version,Jt).setHasLocalMutations(),null===re?null:re.unionWith(p.fieldMask.fields).unionWith(p.fieldTransforms.map(Dn=>Dn.field))}(o,e,r,u):(re=r,na(o.precondition,w=e)?(w.convertToNoDocument(w.version).setHasLocalMutations(),null):re);var w,re}function lg(o,e){let r=null;for(const u of o.fieldTransforms){const d=e.data.field(u.field),p=nu(u.transform,d||null);null!=p&&(null===r&&(r=Bs.empty()),r.set(u.field,p))}return r||null}function Pf(o,e){return o.type===e.type&&!!o.key.isEqual(e.key)&&!!o.precondition.isEqual(e.precondition)&&(d=e.fieldTransforms,!!(void 0===(u=o.fieldTransforms)&&void 0===d||u&&d&&Bl(u,d,(p,w)=>function Tu(o,e){return o.field.isEqual(e.field)&&(d=e.transform,(u=o.transform)instanceof Xl&&d instanceof Xl||u instanceof Ml&&d instanceof Ml?Bl(u.elements,d.elements,la):u instanceof ru&&d instanceof ru?la(u.Ie,d.Ie):u instanceof Qa&&d instanceof Qa);var u,d}(p,w))))&&(0===o.type?o.value.isEqual(e.value):1!==o.type||o.data.isEqual(e.data)&&o.fieldMask.isEqual(e.fieldMask));var u,d}class Ac extends ad{constructor(e,r,u,d=[]){super(),this.key=e,this.value=r,this.prec
1ondition=u,this.fieldTransforms=d,this.type=0}getFieldMask(){return null}}class _u extends ad{constructor(e,r,u,d,p=[]){super(),this.key=e,this.data=r,this.fieldMask=u,this.precondition=d,this.fieldTransforms=p,this.type=1}getFieldMask(){return this.fieldMask}}function Ch(o){const e=new Map;return o.fieldMask.fields.forEach(r=>{if(!r.isEmpty()){const u=o.data.field(r);e.set(r,u)}}),e}function Gd(o,e,r){const u=new Map;Pr(o.length===r.length);for(let d=0;d<r.length;d++){const p=o[d],w=p.transform,re=e.data.field(p.field);u.set(p.field,wa(w,re,r[d]))}return u}function Au(o,e,r){const u=new Map;for(const d of o){const p=d.transform,w=r.data.field(d.field);u.set(d.field,Yo(p,w,e))}return u}class Dc extends ad{constructor(e,r){super(),this.key=e,this.precondition=r,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class dd extends ad{constructor(e,r){super(),this.key=e,this.precondition=r,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class fd{constructor(e,r,u,d){this.batchId=e,this.localWriteTime=r,this.baseMutations=u,this.mutations=d}applyToRemoteDocument(e,r){const u=r.mutationResults;for(let d=0;d<this.mutations.length;d++){const p=this.mutations[d];p.key.isEqual(e.key)&&ud(p,e,u[d])}}applyToLocalView(e,r){for(const u of this.baseMutations)u.key.isEqual(e.key)&&(r=cd(u,e,r,this.localWriteTime));for(const u of this.mutations)u.key.isEqual(e.key)&&(r=cd(u,e,r,this.localWriteTime));return r}applyToLocalDocumentSet(e,r){const u=Ui();return this.mutations.forEach(d=>{const p=e.get(d.key),w=p.overlayedDocument;let re=this.applyToLocalView(w,p.mutatedFields);re=r.has(d.key)?null:re;const Te=ld(w,re);null!==Te&&u.set(d.key,Te),w.isValidDocument()||w.convertToNoDocument(ts.min())}),u}keys(){return this.mutations.reduce((e,r)=>e.add(r.key),Bi())}isEqual(e){return this.batchId===e.batchId&&Bl(this.mutations,e.mutations,(r,u)=>Pf(r,u))&&Bl(this.baseMutations,e.baseMutations,(r,u)=>Pf(r,u))}}class Wd{constructor(e,r,u,d){this.batch=e,this.commitVersion=r,this.mutationResults=u,this.docVersions=d}static from(e,r,u){Pr(e.mutations.length===u.length);let d=function(){return ai}();const p=e.mutations;for(let w=0;w<p.length;w++)d=d.insert(p[w].key,u[w].version);return new Wd(e,r,u,d)}}class Rf{constructor(e,r){this.largestBatchId=e,this.mutation=r}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{\n largestBatchId: ${this.largestBatchId},\n mutation: ${this.mutation.toString()}\n }`}}class Mf{constructor(e,r){this.count=e,this.unchangedNames=r}}var Zo,eo;function hd(o){switch(o){default:return qn();case Ar.CANCELLED:case Ar.UNKNOWN:case Ar.DEADLINE_EXCEEDED:case Ar.RESOURCE_EXHAUSTED:case Ar.INTERNAL:case Ar.UNAVAILABLE:case Ar.UNAUTHENTICATED:return!1;case Ar.INVALID_ARGUMENT:case Ar.NOT_FOUND:case Ar.ALREADY_EXISTS:case Ar.PERMISSION_DENIED:case Ar.FAILED_PRECONDITION:case Ar.ABORTED:case Ar.OUT_OF_RANGE:case Ar.UNIMPLEMENTED:case Ar.DATA_LOSS:return!0}}function _h(o){if(void 0===o)return Ae("GRPC error has no .code"),Ar.UNKNOWN;switch(o){case Zo.OK:return Ar.OK;case Zo.CANCELLED:return Ar.CANCELLED;case Zo.UNKNOWN:return Ar.UNKNOWN;case Zo.DEADLINE_EXCEEDED:return Ar.DEADLINE_EXCEEDED;case Zo.RESOURCE_EXHAUSTED:return Ar.RESOURCE_EXHAUSTED;case Zo.INTERNAL:return Ar.INTERNAL;case Zo.UNAVAILABLE:return Ar.UNAVAILABLE;case Zo.UNAUTHENTICATED:return Ar.UNAUTHENTICATED;case Zo.INVALID_ARGUMENT:return Ar.INVALID_ARGUMENT;case Zo.NOT_FOUND:return Ar.NOT_FOUND;case Zo.ALREADY_EXISTS:return Ar.ALREADY_EXISTS;case Zo.PERMISSION_DENIED:return Ar.PERMISSION_DENIED;case Zo.FAILED_PRECONDITION:return Ar.FAILED_PRECONDITION;case Zo.ABORTED:return Ar.ABORTED;case Zo.OUT_OF_RANGE:return Ar.OUT_OF_RANGE;case Zo.UNIMPLEMENTED:return Ar.UNIMPLEMENTED;case Zo.DATA_LOSS:return Ar.DATA_LOSS;default:return qn()}}(eo=Zo||(Zo={}))[eo.OK=0]="OK",eo[eo.CANCELLED=1]="CANCELLED",eo[eo.UNKNOWN=2]="UNKNOWN",eo[eo.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",eo[eo.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",eo[eo.NOT_FOUND=5]="NOT_FOUND",eo[eo.ALREADY_EXISTS=6]="ALREADY_EXISTS",eo[eo.PERMISSION_DENIED=7]="PERMISSION_DENIED",eo[eo.UNAUTHENTICATED=16]="UNAUTHENTICATED",eo[eo.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",eo[eo.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",eo[eo.ABORTED=10]="ABORTED",eo[eo.OUT_OF_RANGE=11]="OUT_OF_RANGE",eo[eo.UNIMPLEMENT
1ED=12]="UNIMPLEMENTED",eo[eo.INTERNAL=13]="INTERNAL",eo[eo.UNAVAILABLE=14]="UNAVAILABLE",eo[eo.DATA_LOSS=15]="DATA_LOSS";function Ah(){return new TextEncoder}const Wa=new Ma([4294967295,4294967295],0);function Du(o){const e=Ah().encode(o),r=new yo;return r.update(e),new Uint8Array(r.digest())}function Pc(o){const e=new DataView(o.buffer),r=e.getUint32(0,!0),u=e.getUint32(4,!0),d=e.getUint32(8,!0),p=e.getUint32(12,!0);return[new Ma([r,u],0),new Ma([d,p],0)]}class pd{constructor(e,r,u){if(this.bitmap=e,this.padding=r,this.hashCount=u,r<0||r>=8)throw new Yu(`Invalid padding: ${r}`);if(u<0)throw new Yu(`Invalid hash count: ${u}`);if(e.length>0&&0===this.hashCount)throw new Yu(`Invalid hash count: ${u}`);if(0===e.length&&0!==r)throw new Yu(`Invalid padding when bitmap length is 0: ${r}`);this.Te=8*e.length-r,this.Ee=Ma.fromNumber(this.Te)}de(e,r,u){let d=e.add(r.multiply(Ma.fromNumber(u)));return 1===d.compare(Wa)&&(d=new Ma([d.getBits(0),d.getBits(1)],0)),d.modulo(this.Ee).toNumber()}Ae(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(0===this.Te)return!1;const r=Du(e),[u,d]=Pc(r);for(let p=0;p<this.hashCount;p++){const w=this.de(u,d,p);if(!this.Ae(w))return!1}return!0}static create(e,r,u){const d=e%8==0?0:8-e%8,p=new Uint8Array(Math.ceil(e/8)),w=new pd(p,d,r);return u.forEach(re=>w.insert(re)),w}insert(e){if(0===this.Te)return;const r=Du(e),[u,d]=Pc(r);for(let p=0;p<this.hashCount;p++){const w=this.de(u,d,p);this.Re(w)}}Re(e){const r=Math.floor(e/8);this.bitmap[r]|=1<<e%8}}class Yu extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class Xu{constructor(e,r,u,d,p){this.snapshotVersion=e,this.targetChanges=r,this.targetMismatches=u,this.documentUpdates=d,this.resolvedLimboDocuments=p}static createSynthesizedRemoteEventForCurrentChange(e,r,u){const d=new Map;return d.set(e,gd.createSynthesizedTargetChangeForCurrentChange(e,r,u)),new Xu(ts.min(),d,new Zs(vs),$r(),Bi())}}class gd{constructor(e,r,u,d,p){this.resumeToken=e,this.current=r,this.addedDocuments=u,this.modifiedDocuments=d,this.removedDocuments=p}static createSynthesizedTargetChangeForCurrentChange(e,r,u){return new gd(u,r,Bi(),Bi(),Bi())}}class iu{constructor(e,r,u,d){this.Ve=e,this.removedTargetIds=r,this.key=u,this.me=d}}class Rc{constructor(e,r){this.targetId=e,this.fe=r}}class Pu{constructor(e,r,u=$o.EMPTY_BYTE_STRING,d=null){this.state=e,this.targetIds=r,this.resumeToken=u,this.cause=d}}class md{constructor(){this.ge=0,this.pe=Ph(),this.ye=$o.EMPTY_BYTE_STRING,this.we=!1,this.Se=!0}get current(){return this.we}get resumeToken(){return this.ye}get be(){return 0!==this.ge}get De(){return this.Se}Ce(e){e.approximateByteSize()>0&&(this.Se=!0,this.ye=e)}ve(){let e=Bi(),r=Bi(),u=Bi();return this.pe.forEach((d,p)=>{switch(p){case 0:e=e.add(d);break;case 2:r=r.add(d);break;case 1:u=u.add(d);break;default:qn()}}),new gd(this.ye,this.we,e,r,u)}Fe(){this.Se=!1,this.pe=Ph()}Me(e,r){this.Se=!0,this.pe=this.pe.insert(e,r)}xe(e){this.Se=!0,this.pe=this.pe.remove(e)}Oe(){this.ge+=1}Ne(){this.ge-=1,Pr(this.ge>=0)}Le(){this.Se=!0,this.we=!0}}class cg{constructor(e){this.Be=e,this.ke=new Map,this.qe=$r(),this.Qe=Dh(),this.Ke=new Zs(vs)}$e(e){for(const r of e.Ve)e.me&&e.me.isFoundDocument()?this.Ue(r,e.me):this.We(r,e.key,e.me);for(const r of e.removedTargetIds)this.We(r,e.key,e.me)}Ge(e){this.forEachTarget(e,r=>{const u=this.ze(r);switch(e.state){case 0:this.je(r)&&u.Ce(e.resumeToken);break;case 1:u.Ne(),u.be||u.Fe(),u.Ce(e.resumeToken);break;case 2:u.Ne(),u.be||this.removeTarget(r);break;case 3:this.je(r)&&(u.Le(),u.Ce(e.resumeToken));break;case 4:this.je(r)&&(this.He(r),u.Ce(e.resumeToken));break;default:qn()}})}forEachTarget(e,r){e.targetIds.length>0?e.targetIds.forEach(r):this.ke.forEach((u,d)=>{this.je(d)&&r(d)})}Je(e){const r=e.targetId,u=e.fe.count,d=this.Ye(r);if(d){const p=d.target;if(z(p))if(0===u){const w=new Vi(p.path);this.We(r,w,qs.newNoDocument(w,ts.min()))}else Pr(1===u);else{const w=this.Ze(r);if(w!==u){const re=this.Xe(e),Te=re?this.et(re,e,w):1;0!==Te&&(this.He(r),this.Ke=this.Ke.insert(r,2===Te?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Xe(e){const r=e.fe.unchangedNames;if(!r||!r.bits)return null;const{bits:{bitmap:u="",padding:d=0},hashCount:p=0}=r;let w,re;try{w=Hs(u).toUint8Array()}catch(Te){if(Te instanceof Gu)return yt("Decoding the base64 bloom filter in existence filter failed ("+Te.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw Te}try{re=new pd(w,d,p)}catch(Te){return yt(Te instanceof Yu?"BloomFilter error: ":"Applying bloom filter failed: ",Te),null}return 0===re.Te?null:re}et(e,r,u){return r.fe.count===u-this.rt(e,r.targetId)?0:2}rt(e,r){const u=this.Be.getRemoteKeysForTarget(r);let d=0;return u.forEach(p=>{const w=this.Be.nt(),re=`projects/${w.projectId}/databases/${w.database}/documents/${p.path.canonicalString()}`;e.mightContain(re)||(this.We(r,p,null),d++)}),d}it(e){const r=new Map;this.ke.forEach((p,w)=>{const re=this.Ye(w);if(re){if(p.current&&z(re.target)){const Te=new Vi(re.target.path);null!==this.qe.get(Te)||this.st(w,Te)||this.We(w,Te,qs.newNoDocument(Te,e))}p.De&&(r.set(w,p.ve()),p.Fe())}});let u=Bi();this.Qe.forEach((p,w)=>{let re=!0;
1w.forEachWhile(Te=>{const ct=this.Ye(Te);return!ct||"TargetPurposeLimboResolution"===ct.purpose||(re=!1,!1)}),re&&(u=u.add(p))}),this.qe.forEach((p,w)=>w.setReadTime(e));const d=new Xu(e,r,this.Ke,this.qe,u);return this.qe=$r(),this.Qe=Dh(),this.Ke=new Zs(vs),d}Ue(e,r){if(!this.je(e))return;const u=this.st(e,r.key)?2:0;this.ze(e).Me(r.key,u),this.qe=this.qe.insert(r.key,r),this.Qe=this.Qe.insert(r.key,this.ot(r.key).add(e))}We(e,r,u){if(!this.je(e))return;const d=this.ze(e);this.st(e,r)?d.Me(r,1):d.xe(r),this.Qe=this.Qe.insert(r,this.ot(r).delete(e)),u&&(this.qe=this.qe.insert(r,u))}removeTarget(e){this.ke.delete(e)}Ze(e){const r=this.ze(e).ve();return this.Be.getRemoteKeysForTarget(e).size+r.addedDocuments.size-r.removedDocuments.size}Oe(e){this.ze(e).Oe()}ze(e){let r=this.ke.get(e);return r||(r=new md,this.ke.set(e,r)),r}ot(e){let r=this.Qe.get(e);return r||(r=new so(vs),this.Qe=this.Qe.insert(e,r)),r}je(e){const r=null!==this.Ye(e);return r||ot("WatchChangeAggregator","Detected inactive target",e),r}Ye(e){const r=this.ke.get(e);return r&&r.be?null:this.Be._t(e)}He(e){this.ke.set(e,new md),this.Be.getRemoteKeysForTarget(e).forEach(r=>{this.We(e,r,null)})}st(e,r){return this.Be.getRemoteKeysForTarget(e).has(r)}}function Dh(){return new Zs(Vi.comparator)}function Ph(){return new Zs(Vi.comparator)}const dg={asc:"ASCENDING",desc:"DESCENDING"},wl={"<":"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"},vd={and:"AND",or:"OR"};class hc{constructor(e,r){this.databaseId=e,this.useProto3Json=r}}function xf(o,e){return o.useProto3Json||gu(e)?e:{value:e}}function Pa(o,e){return o.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Qu(o,e){return o.useProto3Json?e.toBase64():e.toUint8Array()}function yd(o,e){return Pa(o,e.toTimestamp())}function ua(o){return Pr(!!o),ts.fromTimestamp(function(r){const u=Po(r);return new io(u.seconds,u.nanos)}(o))}function zd(o,e){return Mc(o,e).canonicalString()}function Mc(o,e){const r=(d=o,new Es(["projects",d.projectId,"databases",d.database])).child("documents");var d;return void 0===e?r:r.child(e)}function Rh(o){const e=Es.fromString(o);return Pr(bd(e)),e}function pl(o,e){return zd(o.databaseId,e.path)}function su(o,e){const r=Rh(e);if(r.get(1)!==o.databaseId.projectId)throw new Xr(Ar.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+r.get(1)+" vs "+o.databaseId.projectId);if(r.get(3)!==o.databaseId.database)throw new Xr(Ar.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+r.get(3)+" vs "+o.databaseId.database);return new Vi(E(r))}function Ed(o,e){return zd(o.databaseId,e)}function M(o){const e=Rh(o);return 4===e.length?Es.emptyPath():E(e)}function m(o){return new Es(["projects",o.databaseId.projectId,"databases",o.databaseId.database]).canonicalString()}function E(o){return Pr(o.length>4&&"documents"===o.get(4)),o.popFirst(5)}function L(o,e,r){return{name:pl(o,e),fields:r.value.mapValue.fields}}function at(o,e,r){const u=su(o,e.name),d=ua(e.updateTime),p=e.createTime?ua(e.createTime):ts.min(),w=new Bs({mapValue:{fields:e.fields}}),re=qs.newFoundDocument(u,d,p,w);return r&&re.setHasCommittedMutations(),r?re.setHasCommittedMutations():re}function xr(o,e){let r;if(e instanceof Ac)r={update:L(o,e.key,e.value)};else if(e instanceof Dc)r={delete:pl(o,e.key)};else if(e instanceof _u)r={update:L(o,e.key,e.data),updateMask:Mh(e.fieldMask)};else{if(!(e instanceof dd))return qn();r={verify:pl(o,e.key)}}return e.fieldTransforms.length>0&&(r.updateTransforms=e.fieldTransforms.map(u=>function(p,w){const re=w.transform;if(re instanceof Qa)return{fieldPath:w.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(re instanceof Xl)return{fieldPath:w.field.canonicalString(),appendMissingElements:{values:re.elements}};if(re instanceof Ml)return{fieldPath:w.field.canonicalString(),removeAllFromArray:{values:re.elements}};if(re instanceof ru)return{fieldPath:w.field.canonicalString(),increment:re.Ie};throw qn()}(0,u))),e.precondition.isNone||(r.currentDocument=void 0!==(p=e.precondition).updateTime?{updateTime:yd(o,p.updateTime)}:void 0!==p.exists?{exists:p.exists}:qn()),r;var p}function vi(o,e){const r=e.currentDocument?void 0!==(p=e.currentDocument).updateTime?Fo.updateTime(ua(p.updateTime)):void 0!==p.exists?Fo.exists(p.exists):Fo.none():Fo.none(),u=e.updateTransforms?e.updateTransforms.map(d=>function(w,re){let Te=null;"setToServerValue"in re?(Pr("REQUEST_TIME"===re.setToServerValue),Te=new Qa):"appendMissingElements"in re?Te=new Xl(re.appendMissingElements.values||[]):"removeAllFromArray"in re?Te=new Ml(re.removeAllFromArray.values||[]):"increment"in re?Te=new ru(w,re.increment):qn();const ct=zs.fromServerFormat(re.fieldPath);return new hl(ct,Te)}(o,d)):[];var p;if(e.update){const d=su(o,e.update.name),p=new Bs({mapValue:{fields:e.update.fields}});if(e.updateMask){const w=new Oa((e.updateMask.fieldPaths||[]).map(Jt=>zs.fromServerFormat(Jt)));return new _u(d,p,w,r,u)}return new Ac(d,p,r,u)}if(e.delete){const d=su(o,e.delete);return new Dc(d,r)}if(e.verify){const d=su(o,e.verify);return new dd(d,r)}return qn()}function Ji(o,e){return{documents:[Ed(o,e.path)]}}function Xi(o,e){const r={structuredQuery:{}},u=e.path;let d;null!==e.collectionGroup?(d=u,r.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(d=u.popLast(),r.structuredQuery.from=[{collectionId:u.lastSegment()}]),r.parent=Ed(o,d);const p=function(ct){if(0!==ct.length)return wd(ps.create(ct,"and"))}(e.filters);p&&(r.structuredQuery.where=p);const w=function(ct){if(0!==ct.length)return ct.map(Jt=>{return{field:Ru((lr=Jt).field),direction:pc(lr.dir)};var lr})}(e.orderBy);w&&(r.structuredQuery.orderBy=w);const re=xf(o,e.limit);return null!==re&&(r.structuredQuery.limit=re),e.startAt&&(r.structuredQuery.startAt={before:(ct=e.startAt).inclusive,values:ct.position}),e.endAt&&(r.structuredQuery.endAt=function(ct){return{before:!ct.inclusive,values:ct.position}}(e.endAt)),{ut:r,parent:d};var ct}function Xo(o){let e=M(o.parent);const r=o.structuredQuery,u=r.from?r.from.length:0;let d=null;if(u>0){Pr(1===u);const Jt=r.from[0];Jt.allDescendants?d=Jt.collectionId:e=e.child(Jt.collectionId)}let p=[];r.where&&(p=function(Dn){const lr=xc(Dn);return lr instanceof ps&&Tc(lr)?lr.getFilters():[lr]}(r.where));let w=[];r.orderBy&&(w=r.orderBy.map(lr=>{return new ws(Mu((Ni=lr).field),function(Wi){switch(Wi){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(Ni.direction));var Ni}));let re=null;r.limit&&(re=function(Dn){let lr;return lr="object"==typeof Dn?Dn.value:Dn,gu(lr)?null:lr}(r.limit));let Te=null;var Dn;r.startAt&&(Te=new Ho((Dn=r.startAt).values||[],!!Dn.before));let ct=null;return r.endAt&&(ct=function(Dn){return new Ho(Dn.values||[],!Dn.before)}(r.endAt)),gt(e,d,w,p,re,"F",Te,ct)}function xc(o){return void 0!==o.unaryFilter?function(r){switch(r.unaryFilter.op){case"IS_NAN":const u=Mu(r.unaryFilter.field);return qi.create(u,"==",{doubleValue:NaN});case"IS_NULL":const d=Mu(r.unaryFilter.field);return qi.create(d,"==",{nullValue:"NULL_VALUE"});
1case"IS_NOT_NAN":const p=Mu(r.unaryFilter.field);return qi.create(p,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const w=Mu(r.unaryFilter.field);return qi.create(w,"!=",{nullValue:"NULL_VALUE"});default:return qn()}}(o):void 0!==o.fieldFilter?qi.create(Mu((r=o).fieldFilter.field),function(d){switch(d){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 qn()}}(r.fieldFilter.op),r.fieldFilter.value):void 0!==o.compositeFilter?function(r){return ps.create(r.compositeFilter.filters.map(u=>xc(u)),function(d){switch(d){case"AND":return"and";case"OR":return"or";default:return qn()}}(r.compositeFilter.op))}(o):qn();var r}function pc(o){return dg[o]}function Ju(o){return wl[o]}function ga(o){return vd[o]}function Ru(o){return{fieldPath:o.canonicalString()}}function Mu(o){return zs.fromServerFormat(o.fieldPath)}function wd(o){return o instanceof qi?function(r){if("=="===r.op){if($i(r.value))return{unaryFilter:{field:Ru(r.field),op:"IS_NAN"}};if(Li(r.value))return{unaryFilter:{field:Ru(r.field),op:"IS_NULL"}}}else if("!="===r.op){if($i(r.value))return{unaryFilter:{field:Ru(r.field),op:"IS_NOT_NAN"}};if(Li(r.value))return{unaryFilter:{field:Ru(r.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Ru(r.field),op:Ju(r.op),value:r.value}}}(o):o instanceof ps?function(r){const u=r.getFilters().map(d=>wd(d));return 1===u.length?u[0]:{compositeFilter:{op:ga(r.op),filters:u}}}(o):qn()}function Mh(o){const e=[];return o.fields.forEach(r=>e.push(r.canonicalString())),{fieldPaths:e}}function bd(o){return o.length>=4&&"projects"===o.get(0)&&"databases"===o.get(2)}class Ol{constructor(e,r,u,d,p=ts.min(),w=ts.min(),re=$o.EMPTY_BYTE_STRING,Te=null){this.target=e,this.targetId=r,this.purpose=u,this.sequenceNumber=d,this.snapshotVersion=p,this.lastLimboFreeSnapshotVersion=w,this.resumeToken=re,this.expectedCount=Te}withSequenceNumber(e){return new Ol(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,r){return new Ol(this.target,this.targetId,this.purpose,this.sequenceNumber,r,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Ol(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Ol(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class xh{constructor(e){this.ct=e}}function Kd(o,e){const r=e.key,u={prefixPath:r.getCollectionPath().popLast().toArray(),collectionGroup:r.collectionGroup,documentId:r.path.lastSegment(),readTime:Id(e.readTime),hasCommittedMutations:e.hasCommittedMutations};if(e.isFoundDocument())u.document={name:pl(p=o.ct,(w=e).key),fields:w.data.value.mapValue.fields,updateTime:Pa(p,w.version.toTimestamp()),createTime:Pa(p,w.createTime.toTimestamp())};else if(e.isNoDocument())u.noDocument={path:r.path.toArray(),readTime:Oc(e.version)};else{if(!e.isUnknownDocument())return qn();u.unknownDocument={path:r.path.toArray(),version:Oc(e.version)}}var p,w;return u}function Id(o){const e=o.toTimestamp();return[e.seconds,e.nanoseconds]}function Oc(o){const e=o.toTimestamp();return{seconds:e.seconds,nanoseconds:e.nanoseconds}}function Sd(o){const e=new io(o.seconds,o.nanoseconds);return ts.fromTimestamp(e)}function Td(o,e){const r=(e.baseMutations||[]).map(p=>vi(o.ct,p));for(let p=0;p<e.mutations.length-1;++p)p+1<e.mutations.length&&void 0!==e.mutations[p+1].transform&&(e.mutations[p].updateTransforms=e.mutations[p+1].transform.fieldTransforms,e.mutations.splice(p+1,1),++p);const u=e.mutations.map(p=>vi(o.ct,p)),d=io.fromMillis(e.localWriteTimeMs);return new fd(e.batchId,d,r,u)}function Of(o){const e=Sd(o.readTime),r=void 0!==o.lastLimboFreeSnapshotVersion?Sd(o.lastLimboFreeSnapshotVersion):ts.min();let u;return u=void 0!==o.query.documents?(Pr(1===(p=o.query).documents.length),Sn(vt(M(p.documents[0])))):function(p){return Sn(Xo(p))}(o.query),new Ol(u,o.targetId,"TargetPurposeListen",o.lastListenSequenceNumber,e,r,$o.fromBase64String(o.resumeToken));var p}function fg(o,e){const r=Oc(e.snapshotVersion),u=Oc(e.lastLimboFreeSnapshotVersion);let d;d=z(e.target)?Ji(o.ct,e.target):Xi(o.ct,e.target).ut;const p=e.resumeToken.toBase64();return{targetId:e.targetId,canonicalId:y(e.target),readTime:r,resumeToken:p,lastListenSequenceNumber:e.sequenceNumber,lastLimboFreeSnapshotVersion:u,query:d}}function hg(o){const e=Xo({parent:o.parent,structuredQuery:o.structuredQuery});return"LAST"===o.limitType?kn(e,e.limit,"L"):e}function Oh(o,e){return new Rf(e.largestBatchId,vi(o.ct,e.overlayMutation))}function rv(o,e){const r=e.path.lastSegment();return[o,aa(e.path.popLast()),r]}function iv(o,e,r,u){return{indexId:o,uid:e,sequenceNumber:r,readTime:Oc(u.readTime),documentKey:aa(u.documentKey.path),largestBatchId:u.largestBatchId}}class f0{getBundleMetadata(e,r){return pg(e).get(r).next(u=>{if(u)return{id:(p=u).bundleId,createTime:Sd(p.createTime),version:p.version};var p})}saveBundleMetadata(e,r){return pg(e).put({bundleId:(d=r).id,createTime:Oc(ua(d.createTime)),version:d.version});var d}getNamedQuery(e,r){return gg(e).get(r).next(u=>{if(u)return{name:(p=u).name,query:hg(p.bundledQuery),readTime:Sd(p.readTime)};var p})}saveNamedQuery(e,r){return gg(e).put({name:(d=r).name,readTime:Oc(ua(d.readTime)),bundledQuery:d.bundledQuery});var d}}function pg(o){return zo(o,"bundles")}function gg(o){return zo(o,"namedQueries")}
1class gl{constructor(e,r){this.serializer=e,this.userId=r}static lt(e,r){return new gl(e,r.uid||"")}getOverlay(e,r){return Yd(e).get(rv(this.userId,r)).next(u=>u?Oh(this.serializer,u):null)}getOverlays(e,r){const u=ci();return Lr.forEach(r,d=>this.getOverlay(e,d).next(p=>{null!==p&&u.set(d,p)})).next(()=>u)}saveOverlays(e,r,u){const d=[];return u.forEach((p,w)=>{const re=new Rf(r,w);d.push(this.ht(e,re))}),Lr.waitFor(d)}removeOverlaysForBatchId(e,r,u){const d=new Set;r.forEach(w=>d.add(aa(w.getCollectionPath())));const p=[];return d.forEach(w=>{const re=IDBKeyRange.bound([this.userId,w,u],[this.userId,w,u+1],!1,!0);p.push(Yd(e).H("collectionPathOverlayIndex",re))}),Lr.waitFor(p)}getOverlaysForCollection(e,r,u){const d=ci(),p=aa(r),w=IDBKeyRange.bound([this.userId,p,u],[this.userId,p,Number.POSITIVE_INFINITY],!0);return Yd(e).W("collectionPathOverlayIndex",w).next(re=>{for(const Te of re){const ct=Oh(this.serializer,Te);d.set(ct.getKey(),ct)}return d})}getOverlaysForCollectionGroup(e,r,u,d){const p=ci();let w;const re=IDBKeyRange.bound([this.userId,r,u],[this.userId,r,Number.POSITIVE_INFINITY],!0);return Yd(e).Y({index:"collectionGroupOverlayIndex",range:re},(Te,ct,Jt)=>{const Dn=Oh(this.serializer,ct);p.size()<d||Dn.largestBatchId===w?(p.set(Dn.getKey(),Dn),w=Dn.largestBatchId):Jt.done()}).next(()=>p)}ht(e,r){return Yd(e).put(function(d,p,w){const[re,Te,ct]=rv(p,w.mutation.key);return{userId:p,collectionPath:Te,documentId:ct,collectionGroup:w.mutation.key.getCollectionGroup(),largestBatchId:w.largestBatchId,overlayMutation:xr(d.ct,w.mutation)}}(this.serializer,this.userId,r))}}function Yd(o){return zo(o,"documentOverlays")}class Xd{constructor(){}Pt(e,r){this.It(e,r),r.Tt()}It(e,r){if("nullValue"in e)this.Et(r,5);else if("booleanValue"in e)this.Et(r,10),r.dt(e.booleanValue?1:0);else if("integerValue"in e)this.Et(r,15),r.dt(Ro(e.integerValue));else if("doubleValue"in e){const u=Ro(e.doubleValue);isNaN(u)?this.Et(r,13):(this.Et(r,15),Ka(u)?r.dt(0):r.dt(u))}else if("timestampValue"in e){const u=e.timestampValue;this.Et(r,20),"string"==typeof u?r.At(u):(r.At(`${u.seconds||""}`),r.dt(u.nanos||0))}else if("stringValue"in e)this.Rt(e.stringValue,r),this.Vt(r);else if("bytesValue"in e)this.Et(r,30),r.ft(Hs(e.bytesValue)),this.Vt(r);else if("referenceValue"in e)this.gt(e.referenceValue,r);else if("geoPointValue"in e){const u=e.geoPointValue;this.Et(r,45),r.dt(u.latitude||0),r.dt(u.longitude||0)}else"mapValue"in e?Os(e)?this.Et(r,Number.MAX_SAFE_INTEGER):(this.yt(e.mapValue,r),this.Vt(r)):"arrayValue"in e?(this.wt(e.arrayValue,r),this.Vt(r)):qn()}Rt(e,r){this.Et(r,25),this.St(e,r)}St(e,r){r.At(e)}yt(e,r){const u=e.fields||{};this.Et(r,55);for(const d of Object.keys(u))this.Rt(d,r),this.It(u[d],r)}wt(e,r){const u=e.values||[];this.Et(r,50);for(const d of u)this.It(d,r)}gt(e,r){this.Et(r,37),Vi.fromName(e).path.forEach(u=>{this.Et(r,60),this.St(u,r)})}Et(e,r){e.dt(r)}Vt(e){e.dt(2)}}function mg(o){if(0===o)return 8;let e=0;return!(o>>4)&&(e+=4,o<<=4),!(o>>6)&&(e+=2,o<<=2),!(o>>7)&&(e+=1),e}function gc(o){const e=64-function(u){let d=0;for(let p=0;p<8;++p){const w=mg(255&u[p]);if(d+=w,8!==w)break}return d}(o);return Math.ceil(e/8)}Xd.bt=new Xd;class sv{constructor(){this.buffer=new Uint8Array(1024),this.position=0}Dt(e){const r=e[Symbol.iterator]();let u=r.next();for(;!u.done;)this.Ct(u.value),u=r.next();this.vt()}Ft(e){const r=e[Symbol.iterator]();let u=r.next();for(;!u.done;)this.Mt(u.value),u=r.next();this.xt()}Ot(e){for(const r of e){const u=r.charCodeAt(0);if(u<128)this.Ct(u);else if(u<2048)this.Ct(960|u>>>6),this.Ct(128|63&u);else if(r<"\ud800"||"\udbff"<r)this.Ct(480|u>>>12),this.Ct(128|63&u>>>6),this.Ct(128|63&u);else{const d=r.codePointAt(0);this.Ct(240|d>>>18),this.Ct(128|63&d>>>12),this.Ct(128|63&d>>>6),this.Ct(128|63&d)}}this.vt()}Nt(e){for(const r of e){const u=r.charCodeAt(0);if(u<128)this.Mt(u);else if(u<2048)this.Mt(960|u>>>6),this.Mt(128|63&u);else if(r<"\ud800"||"\udbff"<r)this.Mt(480|u>>>12),this.Mt(128|63&u>>>6),this.Mt(128|63&u);else{const d=r.codePointAt(0);this.Mt(240|d>>>18),this.Mt(128|63&d>>>12),this.Mt(128|63&d>>>6),this.Mt(128|63&d)}}this.xt()}Lt(e){const r=this.Bt(e),u=gc(r);this.kt(1+u),this.buffer[this.position++]=255&u;for(let d=r.length-u;d<r.length;++d)this.buffer[this.position++]=255&r[d]}qt(e){const r=this.Bt(e),u=gc(r);this.kt(1+u),this.buffer[this.position++]=~(255&u);for(let d=r.length-u;d<r.length;++d)this.buffer[this.position++]=~(255&r[d])}Qt(){this.Kt(255),this.Kt(255)}$t(){this.Ut(255),this.Ut(255)}reset(){this.position=0}seed(e){this.kt(e.length),this.buffer.set(e,this.position),this.position+=e.length}Wt(){return this.buffer.slice(0,this.position)}Bt(e){const r=function(p){const w=new DataView(new ArrayBuffer(8));return w.setFloat64(0,p,!1),new Uint8Array(w.buffer)}(e),u=0!=(128&r[0]);r[0]^=u?255:128;for(let d=1;d<r.length;++d)r[d]^=u?255:0;return r}Ct(e){const r=255&e;0===r?(this.Kt(0),this.Kt(255)):255===r?(this.Kt(255),this.Kt(0)):this.Kt(r)}Mt(e){const r=255&e;0===r?(this.Ut(0),this.Ut(255)):255===r?(this.Ut(255),this.Ut(0)):this.Ut(e)}vt(){this.Kt(0),this.Kt(1)}xt(){this.Ut(0),this.Ut(1)}Kt(e){this.kt(1),this.buffer[this.position++]=e}Ut(e){this.kt(1),this.buffer[this.position++]=~e}kt(e){const r=e+this.position;if(r<=this.buffer.length)return;let u=2*this.buffer.length;u<r&&(u=r);const d=new Uint8Array(u);d.set(this.buffer),this.buffer=d}}
1class Nh{constructor(e){this.Gt=e}ft(e){this.Gt.Dt(e)}At(e){this.Gt.Ot(e)}dt(e){this.Gt.Lt(e)}Tt(){this.Gt.Qt()}}class ov{constructor(e){this.Gt=e}ft(e){this.Gt.Ft(e)}At(e){this.Gt.Nt(e)}dt(e){this.Gt.qt(e)}Tt(){this.Gt.$t()}}class Qd{constructor(){this.Gt=new sv,this.zt=new Nh(this.Gt),this.jt=new ov(this.Gt)}seed(e){this.Gt.seed(e)}Ht(e){return 0===e?this.zt:this.jt}Wt(){return this.Gt.Wt()}reset(){this.Gt.reset()}}class Zu{constructor(e,r,u,d){this.indexId=e,this.documentKey=r,this.arrayValue=u,this.directionalValue=d}Jt(){const e=this.directionalValue.length,r=0===e||255===this.directionalValue[e-1]?e+1:e,u=new Uint8Array(r);return u.set(this.directionalValue,0),r!==e?u.set([0],this.directionalValue.length):++u[u.length-1],new Zu(this.indexId,this.documentKey,this.arrayValue,u)}}function qu(o,e){let r=o.indexId-e.indexId;return 0!==r?r:(r=Cd(o.arrayValue,e.arrayValue),0!==r?r:(r=Cd(o.directionalValue,e.directionalValue),0!==r?r:Vi.comparator(o.documentKey,e.documentKey)))}function Cd(o,e){for(let r=0;r<o.length&&r<e.length;++r){const u=o[r]-e[r];if(0!==u)return u}return o.length-e.length}class av{constructor(e){this.Yt=new so((r,u)=>zs.comparator(r.field,u.field)),this.collectionId=null!=e.collectionGroup?e.collectionGroup:e.path.lastSegment(),this.Zt=e.orderBy,this.Xt=[];for(const r of e.filters){const u=r;u.isInequality()?this.Yt=this.Yt.add(u):this.Xt.push(u)}}get en(){return this.Yt.size>1}tn(e){if(Pr(e.collectionGroup===this.collectionId),this.en)return!1;const r=Uu(e);if(void 0!==r&&!this.nn(r))return!1;const u=Do(e);let d=new Set,p=0,w=0;for(;p<u.length&&this.nn(u[p]);++p)d=d.add(u[p].fieldPath.canonicalString());if(p===u.length)return!0;if(this.Yt.size>0){const re=this.Yt.getIterator().getNext();if(!d.has(re.field.canonicalString())){const Te=u[p];if(!this.rn(re,Te)||!this.sn(this.Zt[w++],Te))return!1}++p}for(;p<u.length;++p)if(w>=this.Zt.length||!this.sn(this.Zt[w++],u[p]))return!1;return!0}on(){if(this.en)return null;let e=new so(zs.comparator);const r=[];for(const u of this.Xt)if(!u.field.isKeyField())if("array-contains"===u.op||"array-contains-any"===u.op)r.push(new fa(u.field,2));else{if(e.has(u.field))continue;e=e.add(u.field),r.push(new fa(u.field,0))}for(const u of this.Zt)u.field.isKeyField()||e.has(u.field)||(e=e.add(u.field),r.push(new fa(u.field,"asc"===u.dir?0:1)));return new Cl(Cl.UNKNOWN_ID,this.collectionId,r,Bo.empty())}nn(e){for(const r of this.Xt)if(this.rn(r,e))return!0;return!1}rn(e,r){return!(void 0===e||!e.field.isEqual(r.fieldPath))&&2===r.kind==("array-contains"===e.op||"array-contains-any"===e.op)}sn(e,r){return!!e.field.isEqual(r.fieldPath)&&(0===r.kind&&"asc"===e.dir||1===r.kind&&"desc"===e.dir)}}function lv(o){var e,r;if(Pr(o instanceof qi||o instanceof ps),o instanceof qi){if(o instanceof Df){const d=(null===(r=null===(e=o.value.arrayValue)||void 0===e?void 0:e.values)||void 0===r?void 0:r.map(p=>qi.create(o.field,"==",p)))||[];return ps.create(d,"or")}return o}const u=o.filters.map(d=>lv(d));return ps.create(u,o.op)}function Jw(o){if(0===o.getFilters().length)return[];const e=kh(lv(o));return Pr(vg(e)),Jd(e)||Nf(e)?[e]:e.getFilters()}function Jd(o){return o instanceof qi}function Nf(o){return o instanceof ps&&Tc(o)}function vg(o){return Jd(o)||Nf(o)||function(r){if(r instanceof ps&&bu(r)){for(const u of r.getFilters())if(!Jd(u)&&!Nf(u))return!1;return!0}return!1}(o)}function kh(o){if(Pr(o instanceof qi||o instanceof ps),o instanceof qi)return o;if(1===o.filters.length)return kh(o.filters[0]);const e=o.filters.map(u=>kh(u));let r=ps.create(e,o.op);return r=Fh(r),vg(r)?r:(Pr(r instanceof ps),Pr(fl(r)),Pr(r.filters.length>1),r.filters.reduce((u,d)=>Lh(u,d)))}function Lh(o,e){let r;return Pr(o instanceof qi||o instanceof ps),Pr(e instanceof qi||e instanceof ps),r=o instanceof qi?e instanceof qi?ps.create([o,e],"and"):yg(o,e):e instanceof qi?yg(e,o):function(d,p){if(Pr(d.filters.length>0&&p.filters.length>0),fl(d)&&fl(p))return Iu(d,p.getFilters());const w=bu(d)?d:p,re=bu(d)?p:d,Te=w.filters.map(ct=>Lh(ct,re));return ps.create(Te,"or")}(o,e),Fh(r)}function yg(o,e){if(fl(e))return Iu(e,o.getFilters());{const r=e.filters.map(u=>Lh(o,u));return ps.create(r,"or")}}function Fh(o){if(Pr(o instanceof qi||o instanceof ps),o instanceof qi)return o;const e=o.getFilters();if(1===e.length)return Fh(e[0]);if($d(o))return o;const r=e.map(d=>Fh(d)),u=[];return r.forEach(d=>{d instanceof qi?u.push(d):d instanceof ps&&(d.op===o.op?u.push(...d.filters):u.push(d))}),1===u.length?u[0]:ps.create(u,o.op)}class h0{constructor(){this._n=new Eg}addToCollectionParentIndex(e,r){return this._n.add(r),Lr.resolve()}getCollectionParents(e,r){return Lr.resolve(this._n.getEntries(r))}addFieldIndex(e,r){return Lr.resolve()}deleteFieldIndex(e,r){return Lr.resolve()}deleteAllFieldIndexes(e){return Lr.resolve()}createTargetIndexes(e,r){return Lr.resolve()}getDocumentsMatchingTarget(e,r){return Lr.resolve(null)}getIndexType(e,r){return Lr.resolve(0)}getFieldIndexes(e,r){return Lr.resolve([])}getNextCollectionGroupToUpdate(e){return Lr.resolve(null)}getMinOffset(e,r){return Lr.resolve(Wo.min())}getMinOffsetFromCollectionGroup(e,r){return Lr.resolve(Wo.min())}updateCollectionGroup(e,r,u){return Lr.resolve()}updateIndexEntries(e,r){return Lr.resolve()}}class Eg{constructor(){this.index={}}add(e){const r=e.lastSegment(),u=e.popLast(),d=this.index[r]||new so(Es.comparator),p=!d.has(u);return this.index[r]=d.add(u),p}has(e){const r=e.lastSegment(),u=e.popLast(),d=this.index[r];return d&&d.has(u)}getEntries(e){return(this.index[e]||new so(Es.comparator)).toArray()}}const Uh=new Uint8Array(0);class p0{constructor(e,r){this.databaseId=r,this.an=new Eg,this.un=new Zr(u=>y(u),(u,d)=>O(u,d)),this.uid=e.uid||""}addToCollectionParentIndex(e,r){if(!this.an.has(r)){const u=r.lastSegment(),d=r.popLast();e.addOnCommittedListener(()=>{this.an.add(r)});const p={collectionId:u,parent:aa(d)};return mc(e).put(p)}return Lr.resolve()}getCollectionParents(e,r){const u=[],d=IDBKeyRange.bound([r,""],[Fu(r),""],!1,!0);return mc(e).W(d).next(p=>
1{for(const w of p){if(w.collectionId!==r)break;u.push($(w.parent))}return u})}addFieldIndex(e,r){const u=kf(e),d={indexId:(re=r).indexId,collectionGroup:re.collectionGroup,fields:re.fields.map(Te=>[Te.fieldPath.canonicalString(),Te.kind])};var re;delete d.indexId;const p=u.add(d);if(r.indexState){const w=Lf(e);return p.next(re=>{w.put(iv(re,this.uid,r.indexState.sequenceNumber,r.indexState.offset))})}return p.next()}deleteFieldIndex(e,r){const u=kf(e),d=Lf(e),p=ec(e);return u.delete(r.indexId).next(()=>d.delete(IDBKeyRange.bound([r.indexId],[r.indexId+1],!1,!0))).next(()=>p.delete(IDBKeyRange.bound([r.indexId],[r.indexId+1],!1,!0)))}deleteAllFieldIndexes(e){const r=kf(e),u=ec(e),d=Lf(e);return r.H().next(()=>u.H()).next(()=>d.H())}createTargetIndexes(e,r){return Lr.forEach(this.cn(r),u=>this.getIndexType(e,u).next(d=>{if(0===d||1===d){const p=new av(u).on();if(null!=p)return this.addFieldIndex(e,p)}}))}getDocumentsMatchingTarget(e,r){const u=ec(e);let d=!0;const p=new Map;return Lr.forEach(this.cn(r),w=>this.ln(e,w).next(re=>{d&&(d=!!re),p.set(w,re)})).next(()=>{if(d){let w=Bi();const re=[];return Lr.forEach(p,(Te,ct)=>{var ms;ot("IndexedDbIndexManager",`Using index ${ms=Te,`id=${ms.indexId}|cg=${ms.collectionGroup}|f=${ms.fields.map(Xs=>`${Xs.fieldPath}:${Xs.kind}`).join(",")}`} to execute ${y(r)}`);const Jt=function(ms,Xs){const jo=Uu(Xs);if(void 0===jo)return null;for(const _o of Oe(ms,jo.fieldPath))switch(_o.op){case"array-contains-any":return _o.value.arrayValue.values||[];case"array-contains":return[_o.value]}return null}(ct,Te),Dn=function(ms,Xs){const jo=new Map;for(const _o of Do(Xs))for(const Ia of Oe(ms,_o.fieldPath))switch(Ia.op){case"==":case"in":jo.set(_o.fieldPath.canonicalString(),Ia.value);break;case"not-in":case"!=":return jo.set(_o.fieldPath.canonicalString(),Ia.value),Array.from(jo.values())}return null}(ct,Te),lr=function(ms,Xs){const jo=[];let _o=!0;for(const Ia of Do(Xs)){const au=0===Ia.kind?Be(ms,Ia.fieldPath,ms.startAt):xe(ms,Ia.fieldPath,ms.startAt);jo.push(au.value),_o&&(_o=au.inclusive)}return new Ho(jo,_o)}(ct,Te),Yr=function(ms,Xs){const jo=[];let _o=!0;for(const Ia of Do(Xs)){const au=0===Ia.kind?xe(ms,Ia.fieldPath,ms.endAt):Be(ms,Ia.fieldPath,ms.endAt);jo.push(au.value),_o&&(_o=au.inclusive)}return new Ho(jo,_o)}(ct,Te),Ni=this.hn(Te,ct,lr),Ki=this.hn(Te,ct,Yr),Wi=this.Pn(Te,ct,Dn),ds=this.In(Te.indexId,Jt,Ni,lr.inclusive,Ki,Yr.inclusive,Wi);return Lr.forEach(ds,js=>u.j(js,r.limit).next(ms=>{ms.forEach(Xs=>{const jo=Vi.fromSegments(Xs.documentKey);w.has(jo)||(w=w.add(jo),re.push(jo))})}))}).next(()=>re)}return Lr.resolve(null)})}cn(e){let r=this.un.get(e);return r||(r=0===e.filters.length?[e]:Jw(ps.create(e.filters,"and")).map(u=>h(e.path,e.collectionGroup,e.orderBy,u.getFilters(),e.limit,e.startAt,e.endAt)),this.un.set(e,r),r)}In(e,r,u,d,p,w,re){const Te=(null!=r?r.length:1)*Math.max(u.length,p.length),ct=Te/(null!=r?r.length:1),Jt=[];for(let Dn=0;Dn<Te;++Dn){const lr=r?this.Tn(r[Dn/ct]):Uh,Yr=this.En(e,lr,u[Dn%ct],d),Ni=this.dn(e,lr,p[Dn%ct],w),Ki=re.map(Wi=>this.En(e,lr,Wi,!0));Jt.push(...this.createRange(Yr,Ni,Ki))}return Jt}En(e,r,u,d){const p=new Zu(e,Vi.empty(),r,u);return d?p:p.Jt()}dn(e,r,u,d){const p=new Zu(e,Vi.empty(),r,u);return d?p.Jt():p}ln(e,r){const u=new av(r),d=null!=r.collectionGroup?r.collectionGroup:r.path.lastSegment();return this.getFieldIndexes(e,d).next(p=>{let w=null;for(const re of p)u.tn(re)&&(!w||re.fields.length>w.fields.length)&&(w=re);return w})}getIndexType(e,r){let u=2;const d=this.cn(r);return Lr.forEach(d,p=>this.ln(e,p).next(w=>{w?0!==u&&w.fields.length<function(Te){let ct=new so(zs.comparator),Jt=!1;for(const Dn of Te.filters)for(const lr of Dn.getFlattenedFilters())lr.field.isKeyField()||("array-contains"===lr.op||"array-contains-any"===lr.op?Jt=!0:ct=ct.add(lr.field));for(const Dn of Te.orderBy)Dn.field.isKeyField()||(ct=ct.add(Dn.field));return ct.size+(Jt?1:0)}(p)&&(u=1):u=0})).next(()=>null!==r.limit&&d.length>1&&2===u?1:u)}An(e,r){const u=new Qd;for(const d of Do(e)){const p=r.data.field(d.fieldPath);if(null==p)return null;const w=u.Ht(d.kind);Xd.bt.Pt(p,w)}return u.Wt()}Tn(e){const r=new Qd;return Xd.bt.Pt(e,r.Ht(0)),r.Wt()}Rn(e,r){const u=new Qd;return Xd.bt.Pt(nn(this.databaseId,r),u.Ht(function(p){const w=Do(p);return 0===w.length?0:w[w.length-1].kind}(e))),u.Wt()}Pn(e,r,u){if(null===u)return[];let d=[];d.push(new Qd);let p=0;for(const w of Do(e)){const re=u[p++];for(const Te of d)if(this.Vn(r,w.fieldPath)&&Wr(re))d=this.mn(d,w,re);else{const ct=Te.Ht(w.kind);Xd.bt.Pt(re,ct)}}return this.fn(d)}hn(e,r,u){return this.Pn(e,r,u.position)}fn(e){const r=[];for(let u=0;u<e.length;++u)r[u]=e[u].Wt();return r}mn(e,r,u){const d=[...e],p=[];for(const w of u.arrayValue.values||[])for(const re of d){const Te=new Qd;Te.seed(re.Wt()),Xd.bt.Pt(w,Te.Ht(r.kind)),p.push(Te)}return p}Vn(e,r){return!!e.filters.find(u=>u instanceof qi&&u.field.isEqual(r)&&("in"===u.op||"not-in"===u.op))}getFieldIndexes(e,r){const u=kf(e),d=Lf(e);return(r?u.W("collectionGroupIndex",IDBKeyRange.bound(r,r)):u.W()).next(p=>{const w=[];return Lr.forEach(p,re=>d.get([re.indexId,this.uid]).next(Te=>{w.push(function(Jt,Dn){const lr=Dn?new Bo(Dn.sequenceNumber,new Wo(Sd(Dn.readTime),new Vi($(Dn.documentKey)),Dn.largestBatchId)):Bo.empty(),Yr=Jt.fields.map(([Ni,Ki])=>new fa(zs.fromServerFormat(Ni),Ki));return new Cl(Jt.indexId,Jt.collectionGroup,Yr,lr)}(re,Te))})).next(()=>w)})}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next(r=>0===r.length?null:(r.sort((u,d)=>{const p=u.indexState.sequenceNumber-d.indexState.sequenceNumber;return 0!==p?p:vs(u.collectionGroup,d.collectionGroup)}),r[0].collectionGroup))}updateCollectionGroup(e,r,u){const d=kf(e),p=Lf(e);return this.gn(e).next(w=>d.W("collectionGroupIndex",IDBKeyRange.bound(r,r)).next(re=>Lr.forEach(re,Te=>p.put(iv(Te.indexId,this.uid,w,u)))))}updateIndexEntries(e,r){const u=new Map;return Lr.forEach(r,(d,p)=>{const w=u.get(d.collectionGroup);return(w?Lr.resolve(w):this.getFieldIndexes(e,d.collectionGroup)).next(re=>(u.set(d.collectionGroup,re),Lr.forEach(re,Te=>this.pn(e,d,Te).next(ct=>{const Jt=this.yn(p,Te);return ct.isEqual(Jt)?Lr.resolve():this.wn(e,p,Te,ct,Jt)}))))})}Sn(e,r,u,d){return ec(e).put({indexId:d.indexId,uid:this.uid,arrayValue:d.arrayValue,directionalValue:d.directionalValue,orderedDocumentKey:this.Rn(u,r.key),documentKey:r.key.path.toArray()})}bn(e,r,u,d){return ec(e).delete([d.indexId,this.uid,d.arrayValue,d.directionalValue,this.Rn(u,r.key),r.key.path.toArray()])}pn(e,r,u){const d=ec(e);let p=new so(qu);return d.Y({index:"documentKeyIndex",range:IDBKeyRange.only([u.indexId,this.uid,this.Rn(u,r)])},(w,re)=>{p=p.add(new Zu(u.indexId,r,re.arrayValue,re.directionalValue))}).next(()=>p)}yn(e,r){let u=new so(qu);const d=this.An(r,e);if(null==d)return u;const p=Uu(r);if(null!=p){const w=e.data.field(p.fieldPath);if(Wr(w))for(const re of w.arrayValue.values||[])u=u.add(new Zu(r.indexId,e.key,this.Tn(re),d))}else u=u.add(new Zu(r.indexId,e.key,Uh,d));return u}wn(e,r,u,d,p){ot("IndexedDbIndexManager","Updating index entries for document '%s'",r.key);const w=[];return function(Te,ct,Jt,Dn,lr){const Yr=Te.getIterator(),Ni=ct.getIterator();let Ki=ql(Yr),Wi=ql(Ni);for(;Ki||Wi;){let ds=!1,js=!1;if(Ki&&Wi){const ms=Jt(Ki,Wi);ms<0?js=!0:ms>0&&(ds=!0)}else null!=Ki?js=!0:ds=!0;ds?(Dn(Wi),Wi=ql(Ni)):js?(lr(Ki),Ki=ql(Yr)):(Ki=ql(Yr),Wi=ql(Ni))}}(d,p,qu,re=>{w.push(this.Sn(e,r,u,re))},re=>{w.push(this.bn(e,r,u,re))}),Lr.waitFor(w)}gn(e){let r=1;return Lf(e).Y({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(u,d,p)=>{p.done(),r=d.sequenceNumber+1}
1).next(()=>r)}createRange(e,r,u){u=u.sort((w,re)=>qu(w,re)).filter((w,re,Te)=>!re||0!==qu(w,Te[re-1]));const d=[];d.push(e);for(const w of u){const re=qu(w,e),Te=qu(w,r);if(0===re)d[0]=e.Jt();else if(re>0&&Te<0)d.push(w),d.push(w.Jt());else if(Te>0)break}d.push(r);const p=[];for(let w=0;w<d.length;w+=2){if(this.Dn(d[w],d[w+1]))return[];p.push(IDBKeyRange.bound([d[w].indexId,this.uid,d[w].arrayValue,d[w].directionalValue,Uh,[]],[d[w+1].indexId,this.uid,d[w+1].arrayValue,d[w+1].directionalValue,Uh,[]]))}return p}Dn(e,r){return qu(e,r)>0}getMinOffsetFromCollectionGroup(e,r){return this.getFieldIndexes(e,r).next(g0)}getMinOffset(e,r){return Lr.mapArray(this.cn(r),u=>this.ln(e,u).next(d=>d||qn())).next(g0)}}function mc(o){return zo(o,"collectionParents")}function ec(o){return zo(o,"indexEntries")}function kf(o){return zo(o,"indexConfiguration")}function Lf(o){return zo(o,"indexState")}function g0(o){Pr(0!==o.length);let e=o[0].indexState.offset,r=e.largestBatchId;for(let u=1;u<o.length;u++){const d=o[u].indexState.offset;lc(d,e)<0&&(e=d),r<d.largestBatchId&&(r=d.largestBatchId)}return new Wo(e.readTime,e.documentKey,r)}const m0={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class bl{constructor(e,r,u){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=r,this.maximumSequenceNumbersToCollect=u}static withCacheSize(e){return new bl(e,bl.DEFAULT_COLLECTION_PERCENTILE,bl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}function v0(o,e,r){const u=o.store("mutations"),d=o.store("documentMutations"),p=[],w=IDBKeyRange.only(r.batchId);let re=0;const Te=u.Y({range:w},(Jt,Dn,lr)=>(re++,lr.delete()));p.push(Te.next(()=>{Pr(1===re)}));const ct=[];for(const Jt of r.mutations){const Dn=qt(e,Jt.key.path,r.batchId);p.push(d.delete(Dn)),ct.push(Jt.key)}return Lr.waitFor(p).next(()=>ct)}function Ff(o){if(!o)return 0;let e;if(o.document)e=o.document;else if(o.unknownDocument)e=o.unknownDocument;else{if(!o.noDocument)throw qn();e=o.noDocument}return JSON.stringify(e).length}bl.DEFAULT_COLLECTION_PERCENTILE=10,bl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,bl.DEFAULT=new bl(41943040,bl.DEFAULT_COLLECTION_PERCENTILE,bl.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),bl.DISABLED=new bl(-1,0,0);class Vh{constructor(e,r,u,d){this.userId=e,this.serializer=r,this.indexManager=u,this.referenceDelegate=d,this.Cn={}}static lt(e,r,u,d){Pr(""!==e.uid);const p=e.isAuthenticated()?e.uid:"";return new Vh(p,r,u,d)}checkEmpty(e){let r=!0;const u=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Nc(e).Y({index:"userMutationsIndex",range:u},(d,p,w)=>{r=!1,w.done()}).next(()=>r)}addMutationBatch(e,r,u,d){const p=Zd(e),w=Nc(e);return w.add({}).next(re=>{Pr("number"==typeof re);const Te=new fd(re,r,u,d),ct=function(Yr,Ni,Ki){const Wi=Ki.baseMutations.map(js=>xr(Yr.ct,js)),ds=Ki.mutations.map(js=>xr(Yr.ct,js));return{userId:Ni,batchId:Ki.batchId,localWriteTimeMs:Ki.localWriteTime.toMillis(),baseMutations:Wi,mutations:ds}}(this.serializer,this.userId,Te),Jt=[];let Dn=new so((lr,Yr)=>vs(lr.canonicalString(),Yr.canonicalString()));for(const lr of d){const Yr=qt(this.userId,lr.key.path,re);Dn=Dn.add(lr.key.path.popLast()),Jt.push(w.put(ct)),Jt.push(p.put(Yr,zn))}return Dn.forEach(lr=>{Jt.push(this.indexManager.addToCollectionParentIndex(e,lr))}),e.addOnCommittedListener(()=>{this.Cn[re]=Te.keys()}),Lr.waitFor(Jt).next(()=>Te)}
1)}lookupMutationBatch(e,r){return Nc(e).get(r).next(u=>u?(Pr(u.userId===this.userId),Td(this.serializer,u)):null)}vn(e,r){return this.Cn[r]?Lr.resolve(this.Cn[r]):this.lookupMutationBatch(e,r).next(u=>{if(u){const d=u.keys();return this.Cn[r]=d,d}return null})}getNextMutationBatchAfterBatchId(e,r){const u=r+1,d=IDBKeyRange.lowerBound([this.userId,u]);let p=null;return Nc(e).Y({index:"userMutationsIndex",range:d},(w,re,Te)=>{re.userId===this.userId&&(Pr(re.batchId>=u),p=Td(this.serializer,re)),Te.done()}).next(()=>p)}getHighestUnacknowledgedBatchId(e){const r=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let u=-1;return Nc(e).Y({index:"userMutationsIndex",range:r,reverse:!0},(d,p,w)=>{u=p.batchId,w.done()}).next(()=>u)}getAllMutationBatches(e){const r=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Nc(e).W("userMutationsIndex",r).next(u=>u.map(d=>Td(this.serializer,d)))}getAllMutationBatchesAffectingDocumentKey(e,r){const u=ht(this.userId,r.path),d=IDBKeyRange.lowerBound(u),p=[];return Zd(e).Y({range:d},(w,re,Te)=>{const[ct,Jt,Dn]=w,lr=$(Jt);if(ct===this.userId&&r.path.isEqual(lr))return Nc(e).get(Dn).next(Yr=>{if(!Yr)throw qn();Pr(Yr.userId===this.userId),p.push(Td(this.serializer,Yr))});Te.done()}).next(()=>p)}getAllMutationBatchesAffectingDocumentKeys(e,r){let u=new so(vs);const d=[];return r.forEach(p=>{const w=ht(this.userId,p.path),re=IDBKeyRange.lowerBound(w),Te=Zd(e).Y({range:re},(ct,Jt,Dn)=>{const[lr,Yr,Ni]=ct,Ki=$(Yr);lr===this.userId&&p.path.isEqual(Ki)?u=u.add(Ni):Dn.done()});d.push(Te)}),Lr.waitFor(d).next(()=>this.Fn(e,u))}getAllMutationBatchesAffectingQuery(e,r){const u=r.path,d=u.length+1,p=ht(this.userId,u),w=IDBKeyRange.lowerBound(p);let re=new so(vs);return Zd(e).Y({range:w},(Te,ct,Jt)=>{const[Dn,lr,Yr]=Te,Ni=$(lr);Dn===this.userId&&u.isPrefixOf(Ni)?Ni.length===d&&(re=re.add(Yr)):Jt.done()}).next(()=>this.Fn(e,re))}Fn(e,r){const u=[],d=[];return r.forEach(p=>{d.push(Nc(e).get(p).next(w=>{if(null===w)throw qn();Pr(w.userId===this.userId),u.push(Td(this.serializer,w))}))}),Lr.waitFor(d).next(()=>u)}removeMutationBatch(e,r){return v0(e.ae,this.userId,r).next(u=>(e.addOnCommittedListener(()=>{this.Mn(r.batchId)}),Lr.forEach(u,d=>this.referenceDelegate.markPotentiallyOrphaned(e,d))))}Mn(e){delete this.Cn[e]}performConsistencyCheck(e){return this.checkEmpty(e).next(r=>{if(!r)return Lr.resolve();const u=IDBKeyRange.lowerBound(function(w){return[w]}(this.userId)),d=[];return Zd(e).Y({range:u},(p,w,re)=>{if(p[0]===this.userId){const Te=$(p[1]);d.push(Te)}else re.done()}).next(()=>{Pr(0===d.length)})})}containsKey(e,r){return uv(e,this.userId,r)}xn(e){return Bh(e).get(this.userId).next(r=>r||{userId:this.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""})}}function uv(o,e,r){const u=ht(e,r.path),d=u[1],p=IDBKeyRange.lowerBound(u);let w=!1;return Zd(o).Y({range:p,J:!0},(re,Te,ct)=>{const[Jt,Dn,lr]=re;Jt===e&&Dn===d&&(w=!0),ct.done()}).next(()=>w)}function Nc(o){return zo(o,"mutations")}function Zd(o){return zo(o,"documentMutations")}function Bh(o){return zo(o,"mutationQueues")}class Il{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new Il(0)}static Ln(){return new Il(-1)}}class Uf{constructor(e,r){this.referenceDelegate=e,this.serializer=r}allocateTargetId(e){return this.Bn(e).next(r=>{const u=new Il(r.highestTargetId);return r.highestTargetId=u.next(),this.kn(e,r).next(()=>r.highestTargetId)})}getLastRemoteSnapshotVersion(e){return this.Bn(e).next(r=>ts.fromTimestamp(new io(r.lastRemoteSnapshotVersion.seconds,r.lastRemoteSnapshotVersion.nanoseconds)))}getHighestSequenceNumber(e){return this.Bn(e).next(r=>r.highestListenSequenceNumber)}setTargetsMetadata(e,r,u){return this.Bn(e).next(d=>(d.highestListenSequenceNumber=r,u&&(d.lastRemoteSnapshotVersion=u.toTimestamp()),r>d.highestListenSequenceNumber&&(d.highestListenSequenceNumber=r),this.kn(e,d)))}addTargetData(e,r){return this.qn(e,r).next(()=>this.Bn(e).next(u=>(u.targetCount+=1,this.Qn(r,u),this.kn(e,u))))}updateTargetData(e,r){return this.qn(e,r)}removeTargetData(e,r){return this.removeMatchingKeysForTargetId(e,r.targetId).next(()=>_d(e).delete(r.targetId)).next(()=>this.Bn(e)).next(u=>(Pr(u.targetCount>0),u.targetCount-=1,this.kn(e,u)))}removeTargets(e,r,u){let d=0;const p=[];return _d(e).Y((w,re)=>{const Te=Of(re);Te.sequenceNumber<=r&&null===u.get(Te.targetId)&&(d++,p.push(this.removeTargetData(e,Te)))}).next(()=>Lr.waitFor(p)).next(()=>d)}forEachTarget(e,r){return _d(e).Y((u,d)=>{const p=Of(d);r(p)})}Bn(e){return wg(e).get("targetGlobalKey").next(r=>(Pr(null!==r),r))}kn(e,r){return wg(e).put("targetGlobalKey",r)}qn(e,r){return _d(e).put(fg(this.serializer,r))}Qn(e,r){let u=!1;return e.targetId>r.highestTargetId&&(r.highestTargetId=e.targetId,u=!0),e.sequenceNumber>r.highestListenSequenceNumber&&(r.highestListenSequenceNumber=e.sequenceNumber,u=!0),u}getTargetCount(e){return this.Bn(e).next(r=>r.targetCount)}getTargetData(e,r){const u=y(r),d=IDBKeyRange.bound([u,Number.NEGATIVE_INFINITY],[u,Number.POSITIVE_INFINITY]);let p=null;return _d(e).Y({range:d,index:"queryTargetsIndex"},(w,re,Te)=>{const ct=Of(re);O(r,ct.target)&&(p=ct,Te.done())}).next(()=>p)}addMatchingKeys(e,r,u){const d=[],p=vc(e);return r.forEach(w=>{const re=aa(w.path);d.push(p.put({targetId:u,path:re})),d.push(this.referenceDelegate.addReference(e,u,w))}),Lr.waitFor(d)}removeMatchingKeys(e,r,u){const d=vc(e);return Lr.forEach(r,p=>{const w=aa(p.path);return Lr.waitFor([d.delete([u,w]),this.referenceDelegate.removeReference(e,u,p)])})}removeMatchingKeysForTargetId(e,r){const u=vc(e),d=IDBKeyRange.bound([r],[r+1],!1,!0);return u.delete(d)}getMatchingKeysForTargetId(e,r){const u=IDBKeyRange.bound([r],[r+1],!1,!0),d=vc(e);let p=Bi();return d.Y({range:u,J:!0},(w,re,Te)=>{const ct=$(w[1]),Jt=new Vi(ct);p=p.add(Jt)}).next(()=>p)}containsKey(e,r){const u=aa(r.path),d=IDBKeyRange.bound([u],[Fu(u)],!1,!0);let p=0;
1return vc(e).Y({index:"documentTargetsIndex",J:!0,range:d},([w,re],Te,ct)=>{0!==w&&(p++,ct.done())}).next(()=>p>0)}_t(e,r){return _d(e).get(r).next(u=>u?Of(u):null)}}function _d(o){return zo(o,"targets")}function wg(o){return zo(o,"targetGlobal")}function vc(o){return zo(o,"targetDocuments")}function y0([o,e],[r,u]){const d=vs(o,r);return 0===d?vs(e,u):d}class Zw{constructor(e){this.Kn=e,this.buffer=new so(y0),this.$n=0}Un(){return++this.$n}Wn(e){const r=[e,this.Un()];if(this.buffer.size<this.Kn)this.buffer=this.buffer.add(r);else{const u=this.buffer.last();y0(r,u)<0&&(this.buffer=this.buffer.delete(u).add(r))}}get maxValue(){return this.buffer.last()[0]}}class E0{constructor(e,r,u){this.garbageCollector=e,this.asyncQueue=r,this.localStore=u,this.Gn=null}start(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.zn(6e4)}stop(){this.Gn&&(this.Gn.cancel(),this.Gn=null)}get started(){return null!==this.Gn}zn(e){var r=this;ot("LruGarbageCollector",`Garbage collection scheduled in ${e}ms`),this.Gn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(0,i.c)(function*(){r.Gn=null;try{yield r.localStore.collectGarbage(r.garbageCollector)}catch(u){Ea(u)?ot("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",u):yield oa(u)}yield r.zn(3e5)}))}}class bg{constructor(e,r){this.jn=e,this.params=r}calculateTargetCount(e,r){return this.jn.Hn(e).next(u=>Math.floor(r/100*u))}nthSequenceNumber(e,r){if(0===r)return Lr.resolve(Ds._e);const u=new Zw(r);return this.jn.forEachTarget(e,d=>u.Wn(d.sequenceNumber)).next(()=>this.jn.Jn(e,d=>u.Wn(d))).next(()=>u.maxValue)}removeTargets(e,r,u){return this.jn.removeTargets(e,r,u)}removeOrphanedDocuments(e,r){return this.jn.removeOrphanedDocuments(e,r)}collect(e,r){return-1===this.params.cacheSizeCollectionThreshold?(ot("LruGarbageCollector","Garbage collection skipped; disabled"),Lr.resolve(m0)):this.getCacheSize(e).next(u=>u<this.params.cacheSizeCollectionThreshold?(ot("LruGarbageCollector",`Garbage collection skipped; Cache size ${u} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),m0):this.Yn(e,r))}getCacheSize(e){return this.jn.getCacheSize(e)}Yn(e,r){let u,d,p,w,re,Te,ct;const Jt=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(Dn=>(Dn>this.params.maximumSequenceNumbersToCollect?(ot("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${Dn}`),d=this.params.maximumSequenceNumbersToCollect):d=Dn,w=Date.now(),this.nthSequenceNumber(e,d))).next(Dn=>(u=Dn,re=Date.now(),this.removeTargets(e,u,r))).next(Dn=>(p=Dn,Te=Date.now(),this.removeOrphanedDocuments(e,u))).next(Dn=>(ct=Date.now(),Vo()<=_.Ge.DEBUG&&ot("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${w-Jt}ms\n\tDetermined least recently used ${d} in `+(re-w)+`ms\n\tRemoved ${p} targets in `+(Te-re)+`ms\n\tRemoved ${Dn} documents in `+(ct-Te)+`ms\nTotal Duration: ${ct-Jt}ms`),Lr.resolve({didRun:!0,sequenceNumbersCollected:d,targetsRemoved:p,documentsRemoved:Dn})))}}class qw{constructor(e,r){this.db=e,this.garbageCollector=function $h(o,e){return new bg(o,e)}(this,r)}Hn(e){const r=this.Zn(e);return this.db.getTargetCache().getTargetCount(e).next(u=>r.next(d=>u+d))}Zn(e){let r=0;return this.Jn(e,u=>{r++}).next(()=>r)}forEachTarget(e,r){return this.db.getTargetCache().forEachTarget(e,r)}Jn(e,r){return this.Xn(e,(u,d)=>r(d))}addReference(e,r,u){return Ig(e,u)}removeReference(e,r,u){return Ig(e,u)}removeTargets(e,r,u){return this.db.getTargetCache().removeTargets(e,r,u)}markPotentiallyOrphaned(e,r){return Ig(e,r)}er(e,r){return function(d,p){let w=!1;return Bh(d).Z(re=>uv(d,re,p).next(Te=>(Te&&(w=!0),Lr.resolve(!Te)))).next(()=>w)}(e,r)}removeOrphanedDocuments(e,r){const u=this.db.getRemoteDocumentCache().newChangeBuffer(),d=[];let p=0;return this.Xn(e,(w,re)=>{if(re<=r){const Te=this.er(e,w).next(ct=>{if(!ct)return p++,u.getEntry(e,w).next(()=>(u.removeEntry(w,ts.min()),vc(e).delete([0,aa(w.path)])))});d.push(Te)}}).next(()=>Lr.waitFor(d)).next(()=>u.apply(e)).next(()=>p)}removeTarget(e,r){const u=r.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,u)}updateLimboDocument(e,r){return Ig(e,r)}Xn(e,r){const u=vc(e);let d,p=Ds._e;return u.Y({index:"documentTargetsIndex"},([w,re],{path:Te,sequenceNumber:ct})=>{0===w?(p!==Ds._e&&r(new Vi($(d)),p),p=ct,d=Te):p=Ds._e}).next(()=>{p!==Ds._e&&r(new Vi($(d)),p)})}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}
1function Ig(o,e){return vc(o).put((d=o.currentSequenceNumber,{targetId:0,path:aa(e.path),sequenceNumber:d}));var d}class Sg{constructor(){this.changes=new Zr(e=>e.toString(),(e,r)=>e.isEqual(r)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,r){this.assertNotApplied(),this.changes.set(e,qs.newInvalidDocument(e).setReadTime(r))}getEntry(e,r){this.assertNotApplied();const u=this.changes.get(r);return void 0!==u?Lr.resolve(u):this.getFromCache(e,r)}getEntries(e,r){return this.getAllFromCache(e,r)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class w0{constructor(e){this.serializer=e}setIndexManager(e){this.indexManager=e}addEntry(e,r,u){return kc(e).put(u)}removeEntry(e,r,u){return kc(e).delete(function(p,w){const re=p.path.toArray();return[re.slice(0,re.length-2),re[re.length-2],Id(w),re[re.length-1]]}(r,u))}updateMetadata(e,r){return this.getMetadata(e).next(u=>(u.byteSize+=r,this.tr(e,u)))}getEntry(e,r){let u=qs.newInvalidDocument(r);return kc(e).Y({index:"documentKeyIndex",range:IDBKeyRange.only(Lc(r))},(d,p)=>{u=this.nr(r,p)}).next(()=>u)}rr(e,r){let u={size:0,document:qs.newInvalidDocument(r)};return kc(e).Y({index:"documentKeyIndex",range:IDBKeyRange.only(Lc(r))},(d,p)=>{u={document:this.nr(r,p),size:Ff(p)}}).next(()=>u)}getEntries(e,r){let u=$r();return this.ir(e,r,(d,p)=>{const w=this.nr(d,p);u=u.insert(d,w)}).next(()=>u)}sr(e,r){let u=$r(),d=new Zs(Vi.comparator);return this.ir(e,r,(p,w)=>{const re=this.nr(p,w);u=u.insert(p,re),d=d.insert(p,Ff(w))}).next(()=>({documents:u,_r:d}))}ir(e,r,u){if(r.isEmpty())return Lr.resolve();let d=new so(jh);r.forEach(Te=>d=d.add(Te));const p=IDBKeyRange.bound(Lc(d.first()),Lc(d.last())),w=d.getIterator();let re=w.getNext();return kc(e).Y({index:"documentKeyIndex",range:p},(Te,ct,Jt)=>{const Dn=Vi.fromSegments([...ct.prefixPath,ct.collectionGroup,ct.documentId]);for(;re&&jh(re,Dn)<0;)u(re,null),re=w.getNext();re&&re.isEqual(Dn)&&(u(re,ct),re=w.hasNext()?w.getNext():null),re?Jt.U(Lc(re)):Jt.done()}).next(()=>{for(;re;)u(re,null),re=w.hasNext()?w.getNext():null})}getDocumentsMatchingQuery(e,r,u,d,p){const w=r.path,re=[w.popLast().toArray(),w.lastSegment(),Id(u.readTime),u.documentKey.path.isEmpty()?"":u.documentKey.path.lastSegment()],Te=[w.popLast().toArray(),w.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return kc(e).W(IDBKeyRange.bound(re,Te,!0)).next(ct=>{p?.incrementDocumentReadCount(ct.length);let Jt=$r();for(const Dn of ct){const lr=this.nr(Vi.fromSegments(Dn.prefixPath.concat(Dn.collectionGroup,Dn.documentId)),Dn);lr.isFoundDocument()&&(ui(r,lr)||d.has(lr.key))&&(Jt=Jt.insert(lr.key,lr))}return Jt})}getAllFromCollectionGroup(e,r,u,d){let p=$r();const w=fv(r,u),re=fv(r,Wo.max());return kc(e).Y({index:"collectionGroupIndex",range:IDBKeyRange.bound(w,re,!0)},(Te,ct,Jt)=>{const Dn=this.nr(Vi.fromSegments(ct.prefixPath.concat(ct.collectionGroup,ct.documentId)),ct);p=p.insert(Dn.key,Dn),p.size===d&&Jt.done()}).next(()=>p)}newChangeBuffer(e){return new b0(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next(r=>r.byteSize)}getMetadata(e){return dv(e).get("remoteDocumentGlobalKey").next(r=>(Pr(!!r),r))}tr(e,r){return dv(e).put("remoteDocumentGlobalKey",r)}nr(e,r){if(r){const u=function Hd(o,e){let r;if(e.document)r=at(o.ct,e.document,!!e.hasCommittedMutations);else if(e.noDocument){const u=Vi.fromSegments(e.noDocument.path),d=Sd(e.noDocument.readTime);r=qs.newNoDocument(u,d),e.hasCommittedMutations&&r.setHasCommittedMutations()}else{if(!e.unknownDocument)return qn();{const u=Vi.fromSegments(e.unknownDocument.path),d=Sd(e.unknownDocument.version);r=qs.newUnknownDocument(u,d)}}return e.readTime&&r.setReadTime(function(d){const p=new io(d[0],d[1]);return ts.fromTimestamp(p)}(e.readTime)),r}(this.serializer,r);if(!u.isNoDocument()||!u.version.isEqual(ts.min()))return u}return qs.newInvalidDocument(e)}}function cv(o){return new w0(o)}class b0 extends Sg{constructor(e,r){super(),this.ar=e,this.trackRemovals=r,this.ur=new Zr(u=>u.toString(),(u,d)=>u.isEqual(d))}applyChanges(e){const r=[];let u=0,d=new so((p,w)=>vs(p.canonicalString(),w.canonicalString()));
1return this.changes.forEach((p,w)=>{const re=this.ur.get(p);if(r.push(this.ar.removeEntry(e,p,re.readTime)),w.isValidDocument()){const Te=Kd(this.ar.serializer,w);d=d.add(p.path.popLast());const ct=Ff(Te);u+=ct-re.size,r.push(this.ar.addEntry(e,p,Te))}else if(u-=re.size,this.trackRemovals){const Te=Kd(this.ar.serializer,w.convertToNoDocument(ts.min()));r.push(this.ar.addEntry(e,p,Te))}}),d.forEach(p=>{r.push(this.ar.indexManager.addToCollectionParentIndex(e,p))}),r.push(this.ar.updateMetadata(e,u)),Lr.waitFor(r)}getFromCache(e,r){return this.ar.rr(e,r).next(u=>(this.ur.set(r,{size:u.size,readTime:u.document.readTime}),u.document))}getAllFromCache(e,r){return this.ar.sr(e,r).next(({documents:u,_r:d})=>(d.forEach((p,w)=>{this.ur.set(p,{size:w,readTime:u.get(p).readTime})}),u))}}function dv(o){return zo(o,"remoteDocumentGlobal")}function kc(o){return zo(o,"remoteDocumentsV14")}function Lc(o){const e=o.path.toArray();return[e.slice(0,e.length-2),e[e.length-2],e[e.length-1]]}function fv(o,e){const r=e.documentKey.path.toArray();return[o,Id(e.readTime),r.slice(0,r.length-2),r.length>0?r[r.length-1]:""]}function jh(o,e){const r=o.path.toArray(),u=e.path.toArray();let d=0;for(let p=0;p<r.length-2&&p<u.length-2;++p)if(d=vs(r[p],u[p]),d)return d;return d=vs(r.length,u.length),d||(d=vs(r[r.length-2],u[u.length-2]),d||vs(r[r.length-1],u[u.length-1]))}class I0{constructor(e,r){this.overlayedDocument=e,this.mutatedFields=r}}class Ad{constructor(e,r,u,d){this.remoteDocumentCache=e,this.mutationQueue=r,this.documentOverlayCache=u,this.indexManager=d}getDocument(e,r){let u=null;return this.documentOverlayCache.getOverlay(e,r).next(d=>(u=d,this.remoteDocumentCache.getEntry(e,r))).next(d=>(null!==u&&cd(u.mutation,d,Oa.empty(),io.now()),d))}getDocuments(e,r){return this.remoteDocumentCache.getEntries(e,r).next(u=>this.getLocalViewOfDocuments(e,u,Bi()).next(()=>u))}getLocalViewOfDocuments(e,r,u=Bi()){const d=ci();return this.populateOverlays(e,d,r).next(()=>this.computeViews(e,r,d,u).next(p=>{let w=yr();return p.forEach((re,Te)=>{w=w.insert(re,Te.overlayedDocument)}),w}))}getOverlayedDocuments(e,r){const u=ci();return this.populateOverlays(e,u,r).next(()=>this.computeViews(e,r,u,Bi()))}populateOverlays(e,r,u){const d=[];return u.forEach(p=>{r.has(p)||d.push(p)}),this.documentOverlayCache.getOverlays(e,d).next(p=>{p.forEach((w,re)=>{r.set(w,re)})})}computeViews(e,r,u,d){let p=$r();const w=Dr(),re=Dr();return r.forEach((Te,ct)=>{const Jt=u.get(ct.key);d.has(ct.key)&&(void 0===Jt||Jt.mutation instanceof _u)?p=p.insert(ct.key,ct):void 0!==Jt?(w.set(ct.key,Jt.mutation.getFieldMask()),cd(Jt.mutation,ct,Jt.mutation.getFieldMask(),io.now())):w.set(ct.key,Oa.empty())}),this.recalculateAndSaveOverlays(e,p).next(Te=>(Te.forEach((ct,Jt)=>w.set(ct,Jt)),r.forEach((ct,Jt)=>{var Dn;return re.set(ct,new I0(Jt,null!==(Dn=w.get(ct))&&void 0!==Dn?Dn:null))}),re))}recalculateAndSaveOverlays(e,r){const u=Dr();let d=new Zs((w,re)=>w-re),p=Bi();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,r).next(w=>{for(const re of w)re.keys().forEach(Te=>{const ct=r.get(Te);if(null===ct)return;let Jt=u.get(Te)||Oa.empty();Jt=re.applyToLocalView(ct,Jt),u.set(Te,Jt);const Dn=(d.get(re.batchId)||Bi()).add(Te);d=d.insert(re.batchId,Dn)})}).next(()=>{const w=[],re=d.getReverseIterator();for(;re.hasNext();){const Te=re.getNext(),ct=Te.key,Jt=Te.value,Dn=Ui();Jt.forEach(lr=>{if(!p.has(lr)){const Yr=ld(r.get(lr),u.get(lr));null!==Yr&&Dn.set(lr,Yr),p=p.add(lr)}}),w.push(this.documentOverlayCache.saveOverlays(e,ct,Dn))}return Lr.waitFor(w)}).next(()=>u)}recalculateAndSaveOverlaysForDocumentKeys(e,r){return this.remoteDocumentCache.getEntries(e,r).next(u=>this.recalculateAndSaveOverlays(e,u))}getDocumentsMatchingQuery(e,r,u,d){return Vi.isDocumentKey((w=r).path)&&null===w.collectionGroup&&0===w.filters.length?this.getDocumentsMatchingDocumentQuery(e,r.path):un(r)?this.getDocumentsMatchingCollectionGroupQuery(e,r,u,d):this.getDocumentsMatchingCollectionQuery(e,r,u,d);var w}getNextDocuments(e,r,u,d){return this.remoteDocumentCache.getAllFromCollectionGroup(e,r,u,d).next(p=>{const w=d-p.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,r,u.largestBatchId,d-p.size):Lr.resolve(ci());let re=-1,Te=p;return w.next(ct=>Lr.forEach(ct,(Jt,Dn)=>(re<Dn.largestBatchId&&(re=Dn.largestBatchId),p.get(Jt)?Lr.resolve():this.remoteDocumentCache.getEntry(e,Jt).next(lr=>{Te=Te.insert(Jt,lr)}))).next(()=>this.populateOverlays(e,ct,p)).next(()=>this.computeViews(e,Te,ct,Bi())).next(Jt=>({batchId:re,changes:gi(Jt)})))})}getDocumentsMatchingDocumentQuery(e,r){return this.getDocument(e,new Vi(r)).next(u=>{let d=yr();
1return u.isFoundDocument()&&(d=d.insert(u.key,u)),d})}getDocumentsMatchingCollectionGroupQuery(e,r,u,d){const p=r.collectionGroup;let w=yr();return this.indexManager.getCollectionParents(e,p).next(re=>Lr.forEach(re,Te=>{const ct=(Dn=r,lr=Te.child(p),new mt(lr,null,Dn.explicitOrderBy.slice(),Dn.filters.slice(),Dn.limit,Dn.limitType,Dn.startAt,Dn.endAt));var Dn,lr;return this.getDocumentsMatchingCollectionQuery(e,ct,u,d).next(Jt=>{Jt.forEach((Dn,lr)=>{w=w.insert(Dn,lr)})})}).next(()=>w))}getDocumentsMatchingCollectionQuery(e,r,u,d){let p;return this.documentOverlayCache.getOverlaysForCollection(e,r.path,u.largestBatchId).next(w=>(p=w,this.remoteDocumentCache.getDocumentsMatchingQuery(e,r,u,p,d))).next(w=>{p.forEach((Te,ct)=>{const Jt=ct.getKey();null===w.get(Jt)&&(w=w.insert(Jt,qs.newInvalidDocument(Jt)))});let re=yr();return w.forEach((Te,ct)=>{const Jt=p.get(Te);void 0!==Jt&&cd(Jt.mutation,ct,Oa.empty(),io.now()),ui(r,ct)&&(re=re.insert(Te,ct))}),re})}}class hv{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,r){return Lr.resolve(this.cr.get(r))}saveBundleMetadata(e,r){return this.cr.set(r.id,{id:(d=r).id,version:d.version,createTime:ua(d.createTime)}),Lr.resolve();var d}getNamedQuery(e,r){return Lr.resolve(this.lr.get(r))}saveNamedQuery(e,r){return this.lr.set(r.name,{name:(d=r).name,query:hg(d.bundledQuery),readTime:ua(d.readTime)}),Lr.resolve();var d}}class S0{constructor(){this.overlays=new Zs(Vi.comparator),this.hr=new Map}getOverlay(e,r){return Lr.resolve(this.overlays.get(r))}getOverlays(e,r){const u=ci();return Lr.forEach(r,d=>this.getOverlay(e,d).next(p=>{null!==p&&u.set(d,p)})).next(()=>u)}saveOverlays(e,r,u){return u.forEach((d,p)=>{this.ht(e,r,p)}),Lr.resolve()}removeOverlaysForBatchId(e,r,u){const d=this.hr.get(u);return void 0!==d&&(d.forEach(p=>this.overlays=this.overlays.remove(p)),this.hr.delete(u)),Lr.resolve()}getOverlaysForCollection(e,r,u){const d=ci(),p=r.length+1,w=new Vi(r.child("")),re=this.overlays.getIteratorFrom(w);for(;re.hasNext();){const Te=re.getNext().value,ct=Te.getKey();if(!r.isPrefixOf(ct.path))break;ct.path.length===p&&Te.largestBatchId>u&&d.set(Te.getKey(),Te)}return Lr.resolve(d)}getOverlaysForCollectionGroup(e,r,u,d){let p=new Zs((ct,Jt)=>ct-Jt);const w=this.overlays.getIterator();for(;w.hasNext();){const ct=w.getNext().value;if(ct.getKey().getCollectionGroup()===r&&ct.largestBatchId>u){let Jt=p.get(ct.largestBatchId);null===Jt&&(Jt=ci(),p=p.insert(ct.largestBatchId,Jt)),Jt.set(ct.getKey(),ct)}}const re=ci(),Te=p.getIterator();for(;Te.hasNext()&&(Te.getNext().value.forEach((ct,Jt)=>re.set(ct,Jt)),!(re.size()>=d)););return Lr.resolve(re)}ht(e,r,u){const d=this.overlays.get(u.key);if(null!==d){const w=this.hr.get(d.largestBatchId).delete(u.key);this.hr.set(d.largestBatchId,w)}this.overlays=this.overlays.insert(u.key,new Rf(r,u));let p=this.hr.get(r);void 0===p&&(p=Bi(),this.hr.set(r,p)),this.hr.set(r,p.add(u.key))}}class Vf{constructor(){this.Pr=new so(Na.Ir),this.Tr=new so(Na.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,r){const u=new Na(e,r);this.Pr=this.Pr.add(u),this.Tr=this.Tr.add(u)}dr(e,r){e.forEach(u=>this.addReference(u,r))}removeReference(e,r){this.Ar(new Na(e,r))}Rr(e,r){e.forEach(u=>this.removeReference(u,r))}Vr(e){const r=new Vi(new Es([])),u=new Na(r,e),d=new Na(r,e+1),p=[];return this.Tr.forEachInRange([u,d],w=>{this.Ar(w),p.push(w.key)}),p}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){const r=new Vi(new Es([])),u=new Na(r,e),d=new Na(r,e+1);let p=Bi();return this.Tr.forEachInRange([u,d],w=>{p=p.add(w.key)}),p}containsKey(e){const r=new Na(e,0),u=this.Pr.firstAfterOrEqual(r);return null!==u&&e.isEqual(u.key)}}class Na{constructor(e,r){this.key=e,this.pr=r}static Ir(e,r){return Vi.comparator(e.key,r.key)||vs(e.pr,r.pr)}static Er(e,r){return vs(e.pr,r.pr)||Vi.comparator(e.key,r.key)}}class T0{constructor(e,r){this.indexManager=e,this.referenceDelegate=r,this.mutationQueue=[],this.yr=1,this.wr=new so(Na.Ir)}checkEmpty(e){return Lr.resolve(0===this.mutationQueue.length)}addMutationBatch(e,r,u,d){const p=this.yr;this.yr++;const w=new fd(p,r,u,d);
1this.mutationQueue.push(w);for(const re of d)this.wr=this.wr.add(new Na(re.key,p)),this.indexManager.addToCollectionParentIndex(e,re.key.path.popLast());return Lr.resolve(w)}lookupMutationBatch(e,r){return Lr.resolve(this.Sr(r))}getNextMutationBatchAfterBatchId(e,r){const d=this.br(r+1),p=d<0?0:d;return Lr.resolve(this.mutationQueue.length>p?this.mutationQueue[p]:null)}getHighestUnacknowledgedBatchId(){return Lr.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(e){return Lr.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,r){const u=new Na(r,0),d=new Na(r,Number.POSITIVE_INFINITY),p=[];return this.wr.forEachInRange([u,d],w=>{const re=this.Sr(w.pr);p.push(re)}),Lr.resolve(p)}getAllMutationBatchesAffectingDocumentKeys(e,r){let u=new so(vs);return r.forEach(d=>{const p=new Na(d,0),w=new Na(d,Number.POSITIVE_INFINITY);this.wr.forEachInRange([p,w],re=>{u=u.add(re.pr)})}),Lr.resolve(this.Dr(u))}getAllMutationBatchesAffectingQuery(e,r){const u=r.path,d=u.length+1;let p=u;Vi.isDocumentKey(p)||(p=p.child(""));const w=new Na(new Vi(p),0);let re=new so(vs);return this.wr.forEachWhile(Te=>{const ct=Te.key.path;return!!u.isPrefixOf(ct)&&(ct.length===d&&(re=re.add(Te.pr)),!0)},w),Lr.resolve(this.Dr(re))}Dr(e){const r=[];return e.forEach(u=>{const d=this.Sr(u);null!==d&&r.push(d)}),r}removeMutationBatch(e,r){Pr(0===this.Cr(r.batchId,"removed")),this.mutationQueue.shift();let u=this.wr;return Lr.forEach(r.mutations,d=>{const p=new Na(d.key,r.batchId);return u=u.delete(p),this.referenceDelegate.markPotentiallyOrphaned(e,d.key)}).next(()=>{this.wr=u})}Mn(e){}containsKey(e,r){const u=new Na(r,0),d=this.wr.firstAfterOrEqual(u);return Lr.resolve(r.isEqual(d&&d.key))}performConsistencyCheck(e){return Lr.resolve()}Cr(e,r){return this.br(e)}br(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Sr(e){const r=this.br(e);return r<0||r>=this.mutationQueue.length?null:this.mutationQueue[r]}}class C0{constructor(e){this.vr=e,this.docs=new Zs(Vi.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,r){const u=r.key,d=this.docs.get(u),p=d?d.size:0,w=this.vr(r);return this.docs=this.docs.insert(u,{document:r.mutableCopy(),size:w}),this.size+=w-p,this.indexManager.addToCollectionParentIndex(e,u.path.popLast())}removeEntry(e){const r=this.docs.get(e);r&&(this.docs=this.docs.remove(e),this.size-=r.size)}getEntry(e,r){const u=this.docs.get(r);return Lr.resolve(u?u.document.mutableCopy():qs.newInvalidDocument(r))}getEntries(e,r){let u=$r();return r.forEach(d=>{const p=this.docs.get(d);u=u.insert(d,p?p.document.mutableCopy():qs.newInvalidDocument(d))}),Lr.resolve(u)}getDocumentsMatchingQuery(e,r,u,d){let p=$r();const w=r.path,re=new Vi(w.child("")),Te=this.docs.getIteratorFrom(re);for(;Te.hasNext();){const{key:ct,value:{document:Jt}}=Te.getNext();if(!w.isPrefixOf(ct.path))break;ct.path.length>w.length+1||lc(Jl(Jt),u)<=0||(d.has(Jt.key)||ui(r,Jt))&&(p=p.insert(Jt.key,Jt.mutableCopy()))}return Lr.resolve(p)}getAllFromCollectionGroup(e,r,u,d){qn()}Fr(e,r){return Lr.forEach(this.docs,u=>r(u))}newChangeBuffer(e){return new _0(this)}getSize(e){return Lr.resolve(this.size)}}class _0 extends Sg{constructor(e){super(),this.ar=e}applyChanges(e){const r=[];
vendor: 4,444 bytes, line 1
1return this.changes.forEach((u,d)=>{d.isValidDocument()?r.push(this.ar.addEntry(e,d)):this.ar.removeEntry(u)}),Lr.waitFor(r)}getFromCache(e,r){return this.ar.getEntry(e,r)}getAllFromCache(e,r){return this.ar.getEntries(e,r)}}class A0{constructor(e){this.persistence=e,this.Mr=new Zr(r=>y(r),O),this.lastRemoteSnapshotVersion=ts.min(),this.highestTargetId=0,this.Or=0,this.Nr=new Vf,this.targetCount=0,this.Lr=Il.Nn()}forEachTarget(e,r){return this.Mr.forEach((u,d)=>r(d)),Lr.resolve()}getLastRemoteSnapshotVersion(e){return Lr.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Lr.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Lr.next(),Lr.resolve(this.highestTargetId)}setTargetsMetadata(e,r,u){return u&&(this.lastRemoteSnapshotVersion=u),r>this.Or&&(this.Or=r),Lr.resolve()}qn(e){this.Mr.set(e.target,e);const r=e.targetId;r>this.highestTargetId&&(this.Lr=new Il(r),this.highestTargetId=r),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,r){return this.qn(r),this.targetCount+=1,Lr.resolve()}updateTargetData(e,r){return this.qn(r),Lr.resolve()}removeTargetData(e,r){return this.Mr.delete(r.target),this.Nr.Vr(r.targetId),this.targetCount-=1,Lr.resolve()}removeTargets(e,r,u){let d=0;const p=[];return this.Mr.forEach((w,re)=>{re.sequenceNumber<=r&&null===u.get(re.targetId)&&(this.Mr.delete(w),p.push(this.removeMatchingKeysForTargetId(e,re.targetId)),d++)}),Lr.waitFor(p).next(()=>d)}getTargetCount(e){return Lr.resolve(this.targetCount)}getTargetData(e,r){const u=this.Mr.get(r)||null;return Lr.resolve(u)}addMatchingKeys(e,r,u){return this.Nr.dr(r,u),Lr.resolve()}removeMatchingKeys(e,r,u){this.Nr.Rr(r,u);const d=this.persistence.referenceDelegate,p=[];return d&&r.forEach(w=>{p.push(d.markPotentiallyOrphaned(e,w))}),Lr.waitFor(p)}removeMatchingKeysForTargetId(e,r){return this.Nr.Vr(r),Lr.resolve()}getMatchingKeysForTargetId(e,r){const u=this.Nr.gr(r);return Lr.resolve(u)}containsKey(e,r){return Lr.resolve(this.Nr.containsKey(r))}}class Gh{constructor(e,r){this.Br={},this.overlays={},this.kr=new Ds(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new A0(this),this.indexManager=new h0,this.remoteDocumentCache=new C0(u=>this.referenceDelegate.Kr(u)),this.serializer=new xh(r),this.$r=new hv(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let r=this.overlays[e.toKey()];return r||(r=new S0,this.overlays[e.toKey()]=r),r}getMutationQueue(e,r){let u=this.Br[e.toKey()];return u||(u=new T0(r,this.referenceDelegate),this.Br[e.toKey()]=u),u}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,r,u){ot("MemoryPersistence","Starting transaction:",e);const d=new eb(this.kr.next());return this.referenceDelegate.Ur(),u(d).next(p=>this.referenceDelegate.Wr(d).next(()=>p)).toPromise().then(p=>(d.raiseOnCommittedEvent(),p))}Gr(e,r){return Lr.or(Object.values(this.Br).map(u=>()=>u.containsKey(e,r)))}}class eb extends fu{constructor(e){super(),this.currentSequenceNumber=e}}class Tg{constructor(e){this.persistence=e,this.zr=new Vf,this.jr=null}static Hr(e){return new Tg(e)}get Jr(){if(this.jr)return this.jr;throw qn()}addReference(e,r,u){return this.zr.addReference(u,r),this.Jr.delete(u.toString()),Lr.resolve()}removeReference(e,r,u){return this.zr.removeReference(u,r),this.Jr.add(u.toString()),Lr.resolve()}markPotentiallyOrphaned(e,r){return this.Jr.add(r.toString()),Lr.resolve()}removeTarget(e,r){this.zr.Vr(r.targetId).forEach(d=>this.Jr.add(d.toString()));const u=this.persistence.getTargetCache();return u.getMatchingKeysForTargetId(e,r.targetId).next(d=>{d.forEach(p=>this.Jr.add(p.toString()))}).next(()=>u.removeTargetData(e,r))}Ur(){this.jr=new Set}Wr(e){const r=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Lr.forEach(this.Jr,u=>{const d=Vi.fromPath(u);return this.Yr(e,d).next(p=>{p||r.removeEntry(d,ts.min())})}).next(()=>(this.jr=null,r.apply(e)))}updateLimboDocument(e,r){return this.Yr(e,r).next(u=>{u?this.Jr.delete(r.toString()):this.Jr.add(r.toString())})}Kr(e){return 0}Yr(e,r){return Lr.or([()=>Lr.resolve(this.zr.containsKey(r)),()=>this.persistence.getTargetCache().containsKey(e,r),()=>this.persistence.Gr(e,r)])}}
1class D0{constructor(e){this.serializer=e}N(e,r,u,d){const p=new jl("createOrUpgrade",r);var Te;u<1&&d>=1&&(e.createObjectStore("owner"),(Te=e).createObjectStore("mutationQueues",{keyPath:"userId"}),Te.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",ve,{unique:!0}),Te.createObjectStore("documentMutations"),pv(e),function(Te){Te.createObjectStore("remoteDocuments")}(e));let w=Lr.resolve();return u<3&&d>=3&&(0!==u&&(function(Te){Te.deleteObjectStore("targetDocuments"),Te.deleteObjectStore("targets"),Te.deleteObjectStore("targetGlobal")}(e),pv(e)),w=w.next(()=>function(Te){const ct=Te.store("targetGlobal"),Jt={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:ts.min().toTimestamp(),targetCount:0};return ct.put("targetGlobalKey",Jt)}(p))),u<4&&d>=4&&(0!==u&&(w=w.next(()=>function(Te,ct){return ct.store("mutations").W().next(Jt=>{Te.deleteObjectStore("mutations"),Te.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",ve,{unique:!0});const Dn=ct.store("mutations"),lr=Jt.map(Yr=>Dn.put(Yr));return Lr.waitFor(lr)})}(e,p))),w=w.next(()=>{!function(Te){Te.createObjectStore("clientMetadata",{keyPath:"clientId"})}(e)})),u<5&&d>=5&&(w=w.next(()=>this.Xr(p))),u<6&&d>=6&&(w=w.next(()=>(function(Te){Te.createObjectStore("remoteDocumentGlobal")}(e),this.ei(p)))),u<7&&d>=7&&(w=w.next(()=>this.ti(p))),u<8&&d>=8&&(w=w.next(()=>this.ni(e,p))),u<9&&d>=9&&(w=w.next(()=>{!function(Te){Te.objectStoreNames.contains("remoteDocumentChanges")&&Te.deleteObjectStore("remoteDocumentChanges")}(e)})),u<10&&d>=10&&(w=w.next(()=>this.ri(p))),u<11&&d>=11&&(w=w.next(()=>{(function(Te){Te.createObjectStore("bundles",{keyPath:"bundleId"})})(e),function(Te){Te.createObjectStore("namedQueries",{keyPath:"name"})}(e)})),u<12&&d>=12&&(w=w.next(()=>{!function(Te){const ct=Te.createObjectStore("documentOverlays",{keyPath:vu});ct.createIndex("collectionPathOverlayIndex",ys,{unique:!1}),ct.createIndex("collectionGroupOverlayIndex",Bu,{unique:!1})}(e)})),u<13&&d>=13&&(w=w.next(()=>function(Te){const ct=Te.createObjectStore("remoteDocumentsV14",{keyPath:Cr});ct.createIndex("documentKeyIndex",Ur),ct.createIndex("collectionGroupIndex",Hi)}(e)).next(()=>this.ii(e,p)).next(()=>e.deleteObjectStore("remoteDocuments"))),u<14&&d>=14&&(w=w.next(()=>this.si(e,p))),u<15&&d>=15&&(w=w.next(()=>function(Te){Te.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),Te.createObjectStore("indexState",{keyPath:zl}).createIndex("sequenceNumberIndex",Hl,{unique:!1}),Te.createObjectStore("indexEntries",{keyPath:mu}).createIndex("documentKeyIndex",Ya,{unique:!1})}(e))),w}ei(e){let r=0;return e.store("remoteDocuments").Y((u,d)=>{r+=Ff(d)}).next(()=>{const u={byteSize:r};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",u)})}Xr(e){const r=e.store("mutationQueues"),u=e.store("mutations");return r.W().next(d=>Lr.forEach(d,p=>{const w=IDBKeyRange.bound([p.userId,-1],[p.userId,p.lastAcknowledgedBatchId]);return u.W("userMutationsIndex",w).next(re=>Lr.forEach(re,Te=>{Pr(Te.userId===p.userId);const ct=Td(this.serializer,Te);return v0(e,p.userId,ct).next(()=>{})}))}))}ti(e){const r=e.store("targetDocuments"),u=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next(d=>{const p=[];return u.Y((w,re)=>{const Te=new Es(w),ct=[0,aa(Te)];p.push(r.get(ct).next(Jt=>Jt?Lr.resolve():r.put({targetId:0,path:aa(Te),sequenceNumber:d.highestListenSequenceNumber})))}).next(()=>Lr.waitFor(p))})}ni(e,r){e.createObjectStore("collectionParents",{keyPath:Wl});const u=r.store("collectionParents"),d=new Eg,p=w=>{if(d.add(w)){const re=w.lastSegment(),Te=w.popLast();return u.put({collectionId:re,parent:aa(Te)})}};return r.store("remoteDocuments").Y({J:!0},(w,re)=>{const Te=new Es(w);return p(Te.popLast())}).next(()=>r.store("documentMutations").Y({J:!0},([w,re,Te],ct)=>{const Jt=$(re);return p(Jt.popLast())}))}ri(e){const r=e.store("targets");return r.Y((u,d)=>{const p=Of(d),w=fg(this.serializer,p);return r.put(w)})}ii(e,r){const u=r.store("remoteDocuments"),d=[];return u.Y((p,w)=>{const re=r.store("remoteDocumentsV14"),Te=(Dn=w,Dn.document?new Vi(Es.fromString(Dn.document.name).popFirst(5)):Dn.noDocument?Vi.fromSegments(Dn.noDocument.path):Dn.unknownDocument?Vi.fromSegments(Dn.unknownDocument.path):qn()).path.toArray(),ct={prefixPath:Te.slice(0,Te.length-2),collectionGroup:Te[Te.length-2],documentId:Te[Te.length-1],readTime:w.readTime||[0,0],unknownDocument:w.unknownDocument,noDocument:w.noDocument,document:w.document,hasCommittedMutations:!!w.hasCommittedMutations};var Dn;d.push(re.put(ct))}).next(()=>Lr.waitFor(d))}si(e,r){const u=r.store("mutations"),d=cv(this.serializer),p=new Gh(Tg.Hr,this.serializer.ct);return u.W().next(w=>{const re=new Map;
1return w.forEach(Te=>{var ct;let Jt=null!==(ct=re.get(Te.userId))&&void 0!==ct?ct:Bi();Td(this.serializer,Te).keys().forEach(Dn=>Jt=Jt.add(Dn)),re.set(Te.userId,Jt)}),Lr.forEach(re,(Te,ct)=>{const Jt=new ho(ct),Dn=gl.lt(this.serializer,Jt),lr=p.getIndexManager(Jt),Yr=Vh.lt(Jt,this.serializer,lr,p.referenceDelegate);return new Ad(d,Yr,Dn,lr).recalculateAndSaveOverlaysForDocumentKeys(new yu(r,Ds._e),Te).next()})})}}function pv(o){o.createObjectStore("targetDocuments",{keyPath:Ps}).createIndex("documentTargetsIndex",So,{unique:!0}),o.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",Ss,{unique:!0}),o.createObjectStore("targetGlobal")}const Cg="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class Wh{constructor(e,r,u,d,p,w,re,Te,ct,Jt,Dn=15){if(this.allowTabSynchronization=e,this.persistenceKey=r,this.clientId=u,this.oi=p,this.window=w,this.document=re,this._i=ct,this.ai=Jt,this.ui=Dn,this.kr=null,this.qr=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ci=null,this.inForeground=!1,this.li=null,this.hi=null,this.Pi=Number.NEGATIVE_INFINITY,this.Ii=lr=>Promise.resolve(),!Wh.D())throw new Xr(Ar.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new qw(this,d),this.Ti=r+"main",this.serializer=new xh(Te),this.Ei=new ha(this.Ti,this.ui,new D0(this.serializer)),this.Qr=new Uf(this.referenceDelegate,this.serializer),this.remoteDocumentCache=cv(this.serializer),this.$r=new f0,this.window&&this.window.localStorage?this.di=this.window.localStorage:(this.di=null,!1===Jt&&Ae("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.Ai().then(()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new Xr(Ar.FAILED_PRECONDITION,Cg);return this.Ri(),this.Vi(),this.mi(),this.runTransaction("getHighestListenSequenceNumber","readonly",e=>this.Qr.getHighestSequenceNumber(e))}).then(e=>{this.kr=new Ds(e,this._i)}).then(()=>{this.qr=!0}).catch(e=>(this.Ei&&this.Ei.close(),Promise.reject(e)))}fi(e){var r=this;return this.Ii=function(){var u=(0,i.c)(function*(d){if(r.started)return e(d)});return function(d){return u.apply(this,arguments)}}(),e(this.isPrimary)}setDatabaseDeletedListener(e){this.Ei.B(function(){var r=(0,i.c)(function*(u){null===u.newVersion&&(yield e())});return function(u){return r.apply(this,arguments)}}())}setNetworkEnabled(e){var r=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.oi.enqueueAndForget((0,i.c)(function*(){r.started&&(yield r.Ai())})))}Ai(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",e=>zh(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next(()=>{if(this.isPrimary)return this.gi(e).next(r=>{r||(this.isPrimary=!1,this.oi.enqueueRetryable(()=>this.Ii(!1)))})}).next(()=>this.pi(e)).next(r=>this.isPrimary&&!r?this.yi(e).next(()=>!1):!!r&&this.wi(e).next(()=>!0))).catch(e=>{if(Ea(e))return ot("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return ot("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1}).then(e=>{this.isPrimary!==e&&this.oi.enqueueRetryable(()=>this.Ii(e)),this.isPrimary=e})}gi(e){return Bf(e).get("owner").next(r=>Lr.resolve(this.Si(r)))}bi(e){return zh(e).delete(this.clientId)}Di(){var e=this;return(0,i.c)(function*(){if(e.isPrimary&&!e.Ci(e.Pi,18e5)){e.Pi=Date.now();const r=yield e.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",u=>{const d=zo(u,"clientMetadata");return d.W().next(p=>{const w=e.vi(p,18e5),re=p.filter(Te=>-1===w.indexOf(Te));return Lr.forEach(re,Te=>d.delete(Te.clientId)).next(()=>re)})}).catch(()=>[]);if(e.di)for(const u of r)e.di.removeItem(e.Fi(u.clientId))}})()}mi(){this.hi=this.oi.enqueueAfterDelay("client_metadata_refresh",4e3,()=>this.Ai().then(()=>this.Di()).then(()=>
1this.mi()))}Si(e){return!!e&&e.ownerId===this.clientId}pi(e){return this.ai?Lr.resolve(!0):Bf(e).get("owner").next(r=>{if(null!==r&&this.Ci(r.leaseTimestampMs,5e3)&&!this.Mi(r.ownerId)){if(this.Si(r)&&this.networkEnabled)return!0;if(!this.Si(r)){if(!r.allowTabSynchronization)throw new Xr(Ar.FAILED_PRECONDITION,Cg);return!1}}return!(!this.networkEnabled||!this.inForeground)||zh(e).W().next(u=>void 0===this.vi(u,5e3).find(d=>!(this.clientId===d.clientId||!(!this.networkEnabled&&d.networkEnabled||!this.inForeground&&d.inForeground&&this.networkEnabled===d.networkEnabled))))}).next(r=>(this.isPrimary!==r&&ot("IndexedDbPersistence",`Client ${r?"is":"is not"} eligible for a primary lease.`),r))}shutdown(){var e=this;return(0,i.c)(function*(){e.qr=!1,e.xi(),e.hi&&(e.hi.cancel(),e.hi=null),e.Oi(),e.Ni(),yield e.Ei.runTransaction("shutdown","readwrite",["owner","clientMetadata"],r=>{const u=new yu(r,Ds._e);return e.yi(u).next(()=>e.bi(u))}),e.Ei.close(),e.Li()})()}vi(e,r){return e.filter(u=>this.Ci(u.updateTimeMs,r)&&!this.Mi(u.clientId))}Bi(){return this.runTransaction("getActiveClients","readonly",e=>zh(e).W().next(r=>this.vi(r,18e5).map(u=>u.clientId)))}get started(){return this.qr}getMutationQueue(e,r){return Vh.lt(e,this.serializer,r,this.referenceDelegate)}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new p0(e,this.serializer.ct.databaseId)}getDocumentOverlayCache(e){return gl.lt(this.serializer,e)}getBundleCache(){return this.$r}runTransaction(e,r,u){ot("IndexedDbPersistence","Starting transaction:",e);const d="readonly"===r?"readonly":"readwrite",p=15===(Te=this.ui)?cc:14===Te?$u:13===Te?Zl:12===Te?uc:11===Te?Kl:void qn();var Te;let w;return this.Ei.runTransaction(e,d,p,re=>(w=new yu(re,this.kr?this.kr.next():Ds._e),"readwrite-primary"===r?this.gi(w).next(Te=>!!Te||this.pi(w)).next(Te=>{if(!Te)throw Ae(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.oi.enqueueRetryable(()=>this.Ii(!1)),new Xr(Ar.FAILED_PRECONDITION,Ks);return u(w)}).next(Te=>this.wi(w).next(()=>Te)):this.ki(w).next(()=>u(w)))).then(re=>(w.raiseOnCommittedEvent(),re))}ki(e){return Bf(e).get("owner").next(r=>{if(null!==r&&this.Ci(r.leaseTimestampMs,5e3)&&!this.Mi(r.ownerId)&&!this.Si(r)&&!(this.ai||this.allowTabSynchronization&&r.allowTabSynchronization))throw new Xr(Ar.FAILED_PRECONDITION,Cg)})}wi(e){const r={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return Bf(e).put("owner",r)}static D(){return ha.D()}yi(e){const r=Bf(e);return r.get("owner").next(u=>this.Si(u)?(ot("IndexedDbPersistence","Releasing primary lease."),r.delete("owner")):Lr.resolve())}Ci(e,r){const u=Date.now();return!(e<u-r||e>u&&(Ae(`Detected an update time that is in the future: ${e} > ${u}`),1))}Ri(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.li=()=>{this.oi.enqueueAndForget(()=>(this.inForeground="visible"===this.document.visibilityState,this.Ai()))},this.document.addEventListener("visibilitychange",this.li),this.inForeground="visible"===this.document.visibilityState)}Oi(){this.li&&(this.document.removeEventListener("visibilitychange",this.li),this.li=null)}Vi(){var e;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.ci=()=>{this.xi();const r=/(?:Version|Mobile)\/1[456]/;(0,C.qk)()&&(navigator.appVersion.match(r)||navigator.userAgent.match(r))&&this.oi.enterRestrictedMode(!0),this.oi.enqueueAndForget(()=>this.shutdown())},this.window.addEventListener("pagehide",this.ci))}Ni(){this.ci&&(this.window.removeEventListener("pagehide",this.ci),this.ci=null)}Mi(e){var r;try{const u=null!==(null===(r=this.di)||void 0===r?void 0:r.getItem(this.Fi(e)));return ot("IndexedDbPersistence",`Client '${e}' ${u?"is":"is not"} zombied in LocalStorage`),u}catch(u){return Ae("IndexedDbPersistence","Failed to get zombied client id.",u),!1}}xi(){if(this.di)try{this.di.setItem(this.Fi(this.clientId),String(Date.now()))}catch(e){Ae("Failed to set zombie client id.",e)}}Li(){if(this.di)try{this.di.removeItem(this.Fi(this.clientId))}catch{}}Fi(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function Bf(o){return zo(o,"owner")}function zh(o){return zo(o,"clientMetadata")}function _g(o,e){let r=o.projectId;return o.isDefaultDatabase||(r+="."+o.database),"firestore/"+e+"/"+r+"/"}class Ag{constructor(e,r,u,d){this.targetId=e,this.fromCache=r,this.qi=u,this.Qi=d}static Ki(e,r){let u=Bi(),d=Bi();for(const p of r.docChanges)switch(p.type){case 0:u=u.add(p.doc.key);break;case 1:d=d.add(p.doc.key)}return new Ag(e,r.fromCache,u,d)}}class Dg{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class gv{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=(0,C.qk)()?8:ha.v((0,C.Su)())>0?6:4}initialize(e,r){this.zi=e,this.indexManager=r,this.$i=!0}getDocumentsMatchingQuery(e,r,u,d){const p={result:null};return this.ji(e,r).next(w=>{p.result=w}).next(()=>{if(!p.result)return this.Hi(e,r,d,u).next(w=>{p.result=w})}).next(()=>{if(p.result)return;const w=new Dg;return this.Ji(e,r,w).next(re=>{if(p.result=re,this.Ui)return this.Yi(e,r,w,re.size)})}).next(()=>p.result)}Yi(e,r,u,d){return u.documentReadCount<this.Wi?(Vo()<=_.Ge.DEBUG&&ot("QueryEngine","SDK will not create cache indexes for query:",hi(r),"since it only creates cache indexes for collection contains","more than or equal to",this.Wi,"documents"),Lr.resolve()):(Vo()<=_.Ge.DEBUG&&ot("QueryEngine","Query:",hi(r),"scans",u.documentReadCount,"local documents and returns",d,"documents as results."),u.documentReadCount>this.Gi*d?(Vo()<=_.Ge.DEBUG&&ot("QueryEngine","The SDK decides to create cache indexes for query:",hi(r),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Sn(r))):Lr.resolve())}ji(e,r){if(Gt(r))return Lr.resolve(null);let u=Sn(r);return this.indexManager.getIndexType(e,u).next(d=>0===d?null:(null!==r.limit&&1===d&&(r=kn(r,null,"F"),u=Sn(r)),this.indexManager.getDocumentsMatchingTarget(e,u).next(p=>{const w=Bi(...p);return this.zi.getDocuments(e,w).next(re=>this.indexManager.getMinOffset(e,u).next(Te=>{const ct=this.Zi(r,re);return this.Xi(r,ct,w,Te.readTime)?this.ji(e,kn(r,null,"F")):this.es(e,ct,r,Te)}))})))}Hi(e,r,u,d){return Gt(r)||d.isEqual(ts.min())?Lr.resolve(null):this.zi.getDocuments(e,u).next(p=>{const w=this.Zi(r,p);return this.Xi(r,w,u,d)?Lr.resolve(null):(Vo()<=_.Ge.DEBUG&&ot("QueryEngine","Re-using previous result from %s to execute query: %s",d.toString(),hi(r)),this.es(e,w,r,$l(d,-1)).next(re=>re))})}Zi(e,r){let u=new so(ni(e));return r.forEach((d,p)=>{ui(e,p)&&(u=u.add(p))}),u}Xi(e,r,u,d){if(null===e.limit)return!1;if(u.size!==r.size)return!0;const p="F"===e.limitType?r.last():r.first();return!!p&&(p.hasPendingWrites||p.version.compareTo(d)>0)}Ji(e,r,u){return Vo()<=_.Ge.DEBUG&&ot("QueryEngine","Using full collection scan to execute query:",hi(r)),this.zi.getDocumentsMatchingQuery(e,r,Wo.min(),u)}es(e,r,u,d){return this.zi.getDocumentsMatchingQuery(e,u,d).next(p=>(r.forEach(w=>{p=p.insert(w.key,w)}),p))}}class P0{constructor(e,r,u,d){this.persistence=e,this.ts=r,this.serializer
1=d,this.ns=new Zs(vs),this.rs=new Zr(p=>y(p),O),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(u)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new Ad(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",r=>e.collect(r,this.ns))}}function mv(o,e,r,u){return new P0(o,e,r,u)}function Pg(o,e){return Rg.apply(this,arguments)}function Rg(){return Rg=(0,i.c)(function*(o,e){const r=pi(o);return yield r.persistence.runTransaction("Handle user change","readonly",u=>{let d;return r.mutationQueue.getAllMutationBatches(u).next(p=>(d=p,r._s(e),r.mutationQueue.getAllMutationBatches(u))).next(p=>{const w=[],re=[];let Te=Bi();for(const ct of d){w.push(ct.batchId);for(const Jt of ct.mutations)Te=Te.add(Jt.key)}for(const ct of p){re.push(ct.batchId);for(const Jt of ct.mutations)Te=Te.add(Jt.key)}return r.localDocuments.getDocuments(u,Te).next(ct=>({us:ct,removedBatchIds:w,addedBatchIds:re}))})})}),Rg.apply(this,arguments)}function Sl(o){const e=pi(o);return e.persistence.runTransaction("Get last remote snapshot version","readonly",r=>e.Qr.getLastRemoteSnapshotVersion(r))}function xg(o,e,r){let u=Bi(),d=Bi();return r.forEach(p=>u=u.add(p)),e.getEntries(o,u).next(p=>{let w=$r();return r.forEach((re,Te)=>{const ct=p.get(re);Te.isFoundDocument()!==ct.isFoundDocument()&&(d=d.add(re)),Te.isNoDocument()&&Te.version.isEqual(ts.min())?(e.removeEntry(re,Te.readTime),w=w.insert(re,Te)):!ct.isValidDocument()||Te.version.compareTo(ct.version)>0||0===Te.version.compareTo(ct.version)&&ct.hasPendingWrites?(e.addEntry(Te),w=w.insert(re,Te)):ot("LocalStore","Ignoring outdated watch update for ",re,". Current version:",ct.version," Watch version:",Te.version)}),{cs:w,ls:d}})}function Og(o,e){const r=pi(o);return r.persistence.runTransaction("Get next mutation batch","readonly",u=>(void 0===e&&(e=-1),r.mutationQueue.getNextMutationBatchAfterBatchId(u,e)))}function ba(o,e){const r=pi(o);return r.persistence.runTransaction("Allocate target","readwrite",u=>{let d;return r.Qr.getTargetData(u,e).next(p=>p?(d=p,Lr.resolve(d)):r.Qr.allocateTargetId(u).next(w=>(d=new Ol(e,w,"TargetPurposeListen",u.currentSequenceNumber),r.Qr.addTargetData(u,d).next(()=>d))))}).then(u=>{const d=r.ns.get(u.targetId);return(null===d||u.snapshotVersion.compareTo(d.snapshotVersion)>0)&&(r.ns=r.ns.insert(u.targetId,u),r.rs.set(e,u.targetId)),u})}function tc(o,e,r){return Hh.apply(this,arguments)}function Hh(){return Hh=(0,i.c)(function*(o,e,r){const u=pi(o),d=u.ns.get(e),p=r?"readwrite":"readwrite-primary";try{r||(yield u.persistence.runTransaction("Release target",p,w=>u.persistence.referenceDelegate.removeTarget(w,d)))}catch(w){if(!Ea(w))throw w;ot("LocalStore",`Failed to update sequence numbers for target ${e}: ${w}`)}u.ns=u.ns.remove(e),u.rs.delete(d.target)}),Hh.apply(this,arguments)}function $f(o,e,r){const u=pi(o);let d=ts.min(),p=Bi();return u.persistence.runTransaction("Execute query","readwrite",w=>function(Te,ct,Jt){const Dn=pi(Te),lr=Dn.rs.get(Jt);return void 0!==lr?Lr.resolve(Dn.ns.get(lr)):Dn.Qr.getTargetData(ct,Jt)}(u,w,Sn(e)).next(re=>{if(re)return d=re.lastLimboFreeSnapshotVersion,u.Qr.getMatchingKeysForTargetId(w,re.targetId).next(Te=>{p=Te})}).next(()=>u.ts.getDocumentsMatchingQuery(w,e,r?d:ts.min(),r?p:Bi())).next(re=>(yv(u,Ri(e),re),{documents:re,hs:p})))}function vv(o,e){const r=pi(o),u=pi(r.Qr),d=r.ns.get(e);return d?Promise.resolve(d.target):r.persistence.runTransaction("Get target data","readonly",p=>u._t(p,e).next(w=>w?w.target:null))}function Ng(o,e){const r=pi(o),u=r.ss.get(e)||ts.min();return r.persistence.runTransaction("Get new document changes","readonly",d=>r.os.getAllFromCollectionGroup(d,e,$l(u,-1),Number.MAX_SAFE_INTEGER)).then(d=>(yv(r,e,d),d))}function yv(o,e,r){let u=o.ss.get(e)||ts.min();r.forEach((d,p)=>{p.readTime.compareTo(u)>0&&(u=p.readTime)}),o.ss.set(e,u)}function kg(){return kg=(0,i.c)(function*(o,e,r,u){const d=pi(o);let p=Bi(),w=$r();for(const ct of r){const Jt=e.Ps(ct.metadata.name);ct.document&&(p=p.add(Jt));const Dn=e.Is(ct);Dn.setReadTime(e.Ts(ct.metadata.readTime)),w=w.insert(Jt,Dn)}const re=d.os.newChangeBuffer({trackRemovals:!0}),Te=yield ba(d,(Jt=u,Sn(vt(Es.fromString(`__bundle__/docs/${Jt}`)))));var Jt;return d.persistence.runTransaction("Apply bundle documents","readwrite",ct=>xg(ct,re,w).next(Jt=>(re.apply(ct),Jt)).next(Jt=>d.Qr.removeMatchingKeysForTargetId(ct,Te.targetId).next(()=>d.Qr.addMatchingKeys(ct,p,Te.targetId)).next(()=>d.localDocuments.getLocalViewOfDocuments(ct,Jt.cs,Jt.ls)).next(()=>Jt.cs)))}),kg.apply(this,arguments)}function wv(o,e){return Lg.apply(this,arguments)}function Lg(){return Lg=(0,i.c)(function*(o,e,r=Bi()){const u=yield ba(o,Sn(hg(e.bundledQuery))),d=pi(o);return d.persistence.runTransaction("Save named query","readwrite",p=>{const w=ua(e.readTime);if(u.snapshotVersion.compareTo(w)>=0)return d.$r.saveNamedQuery(p,e);const re=u.withResumeToken($o.EMPTY_BYTE_STRING,w);return d.ns=d.ns.insert(re.targetId,re),d.Qr.updateTargetData(p,re).next(()=>d.Qr.removeMatchingKeysForTargetId(p,u.targetId)).next(()=>d.Qr.addMatchingKeys(p,r,u.targetId)).next(()=>
1d.$r.saveNamedQuery(p,e))})}),Lg.apply(this,arguments)}function bv(o,e){return`firestore_clients_${o}_${e}`}function Iv(o,e,r){let u=`firestore_mutations_${o}_${r}`;return e.isAuthenticated()&&(u+=`_${e.uid}`),u}function Fg(o,e){return`firestore_targets_${o}_${e}`}class qd{constructor(e,r,u,d){this.user=e,this.batchId=r,this.state=u,this.error=d}static Es(e,r,u){const d=JSON.parse(u);let p,w="object"==typeof d&&-1!==["pending","acknowledged","rejected"].indexOf(d.state)&&(void 0===d.error||"object"==typeof d.error);return w&&d.error&&(w="string"==typeof d.error.message&&"string"==typeof d.error.code,w&&(p=new Xr(d.error.code,d.error.message))),w?new qd(e,r,d.state,p):(Ae("SharedClientState",`Failed to parse mutation state for ID '${r}': ${u}`),null)}ds(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class Kh{constructor(e,r,u){this.targetId=e,this.state=r,this.error=u}static Es(e,r){const u=JSON.parse(r);let d,p="object"==typeof u&&-1!==["not-current","current","rejected"].indexOf(u.state)&&(void 0===u.error||"object"==typeof u.error);return p&&u.error&&(p="string"==typeof u.error.message&&"string"==typeof u.error.code,p&&(d=new Xr(u.error.code,u.error.message))),p?new Kh(e,u.state,d):(Ae("SharedClientState",`Failed to parse target state for ID '${e}': ${r}`),null)}ds(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class Ug{constructor(e,r){this.clientId=e,this.activeTargetIds=r}static Es(e,r){const u=JSON.parse(r);let d="object"==typeof u&&u.activeTargetIds instanceof Array,p=rs();for(let w=0;d&&w<u.activeTargetIds.length;++w)d=Dl(u.activeTargetIds[w]),p=p.add(u.activeTargetIds[w]);return d?new Ug(e,p):(Ae("SharedClientState",`Failed to parse client data for instance '${e}': ${r}`),null)}}class jf{constructor(e,r){this.clientId=e,this.onlineState=r}static Es(e){const r=JSON.parse(e);return"object"==typeof r&&-1!==["Unknown","Online","Offline"].indexOf(r.onlineState)&&"string"==typeof r.clientId?new jf(r.clientId,r.onlineState):(Ae("SharedClientState",`Failed to parse online state: ${e}`),null)}}class Sv{constructor(){this.activeTargetIds=rs()}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Tv{constructor(e,r,u,d,p){this.window=e,this.oi=r,this.persistenceKey=u,this.Vs=d,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.fs=this.gs.bind(this),this.ps=new Zs(vs),this.started=!1,this.ys=[];const w=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=p,this.ws=bv(this.persistenceKey,this.Vs),this.Ss=`firestore_sequence_number_${this.persistenceKey}`,this.ps=this.ps.insert(this.Vs,new Sv),this.bs=new RegExp(`^firestore_clients_${w}_([^_]*)$`),this.Ds=new RegExp(`^firestore_mutations_${w}_(\\d+)(?:_(.*))?$`),this.Cs=new RegExp(`^firestore_targets_${w}_(\\d+)$`),this.vs=`firestore_online_state_${this.persistenceKey}`,this.Fs=function(Te){return`firestore_bundle_loaded_v2_${Te}`}(this.persistenceKey),this.window.addEventListener("storage",this.fs)}static D(e){return!(!e||!e.localStorage)}start(){var e=this;return(0,i.c)(function*(){const r=yield e.syncEngine.Bi();for(const d of r){if(d===e.Vs)continue;const p=e.getItem(bv(e.persistenceKey,d));if(p){const w=Ug.Es(d,p);w&&(e.ps=e.ps.insert(w.clientId,w))}}e.Ms();const u=e.storage.getItem(e.vs);if(u){const d=e.xs(u);d&&e.Os(d)}for(const d of e.ys)e.gs(d);e.ys=[],e.window.addEventListener("pagehide",()=>e.shutdown()),e.started=!0})()}writeSequenceNumber(e){this.setItem(this.Ss,JSON.stringify(e))}getAllActiveQueryTargets(){return this.Ns(this.ps)}isActiveQueryTarget(e){let r=!1;return this.ps.forEach((u,d)=>{d.activeTargetIds.has(e)&&(r=!0)}),r}addPendingMutation(e){this.Ls(e,"pending")}updateMutationState(e,r,u){this.Ls(e,r,u),this.Bs(e)}addLocalQueryTarget(e){let r="not-current";if(this.isActiveQueryTarget(e)){const u=this.storage.getItem(Fg(this.persistenceKey,e));if(u){const d=Kh.Es(e,u);d&&(r=d.state)}}return this.ks.As(e),this.Ms(),r}removeLocalQueryTarget(e){this.ks.Rs(e),this.Ms()}isLocalQueryTarget(e){return this.ks.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(Fg(this.persistenceKey,e))}updateQueryState(e,r,u){this.qs(e,r,u)}handleUserChange(e,r,u){r.forEach(d=>{this.Bs(d)}),this.currentUser=e,u.forEach(d=>{this.addPendingMutation(d)})}setOnlineState(e){this.Qs(e)}notifyBundleLoaded(e){this.Ks(e)}shutdown(){this.started&&(this.window.removeEventListener("storage",this.fs),this.removeItem(this.ws),this.started=!1)}getItem(e){const r=this.storage.getItem(e);
1return ot("SharedClientState","READ",e,r),r}setItem(e,r){ot("SharedClientState","SET",e,r),this.storage.setItem(e,r)}removeItem(e){ot("SharedClientState","REMOVE",e),this.storage.removeItem(e)}gs(e){var r=this;const u=e;if(u.storageArea===this.storage){if(ot("SharedClientState","EVENT",u.key,u.newValue),u.key===this.ws)return void Ae("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.oi.enqueueRetryable((0,i.c)(function*(){if(r.started){if(null!==u.key)if(r.bs.test(u.key)){if(null==u.newValue){const d=r.$s(u.key);return r.Us(d,null)}{const d=r.Ws(u.key,u.newValue);if(d)return r.Us(d.clientId,d)}}else if(r.Ds.test(u.key)){if(null!==u.newValue){const d=r.Gs(u.key,u.newValue);if(d)return r.zs(d)}}else if(r.Cs.test(u.key)){if(null!==u.newValue){const d=r.js(u.key,u.newValue);if(d)return r.Hs(d)}}else if(u.key===r.vs){if(null!==u.newValue){const d=r.xs(u.newValue);if(d)return r.Os(d)}}else if(u.key===r.Ss){const d=function(w){let re=Ds._e;if(null!=w)try{const Te=JSON.parse(w);Pr("number"==typeof Te),re=Te}catch(Te){Ae("SharedClientState","Failed to read sequence number from WebStorage",Te)}return re}(u.newValue);d!==Ds._e&&r.sequenceNumberHandler(d)}else if(u.key===r.Fs){const d=r.Js(u.newValue);yield Promise.all(d.map(p=>r.syncEngine.Ys(p)))}}else r.ys.push(u)}))}}get ks(){return this.ps.get(this.Vs)}Ms(){this.setItem(this.ws,this.ks.ds())}Ls(e,r,u){const d=new qd(this.currentUser,e,r,u),p=Iv(this.persistenceKey,this.currentUser,e);this.setItem(p,d.ds())}Bs(e){const r=Iv(this.persistenceKey,this.currentUser,e);this.removeItem(r)}Qs(e){this.storage.setItem(this.vs,JSON.stringify({clientId:this.Vs,onlineState:e}))}qs(e,r,u){const d=Fg(this.persistenceKey,e),p=new Kh(e,r,u);this.setItem(d,p.ds())}Ks(e){const r=JSON.stringify(Array.from(e));this.setItem(this.Fs,r)}$s(e){const r=this.bs.exec(e);return r?r[1]:null}Ws(e,r){const u=this.$s(e);return Ug.Es(u,r)}Gs(e,r){const u=this.Ds.exec(e),d=Number(u[1]);return qd.Es(new ho(void 0!==u[2]?u[2]:null),d,r)}js(e,r){const u=this.Cs.exec(e),d=Number(u[1]);return Kh.Es(d,r)}xs(e){return jf.Es(e)}Js(e){return JSON.parse(e)}zs(e){var r=this;return(0,i.c)(function*(){if(e.user.uid===r.currentUser.uid)return r.syncEngine.Zs(e.batchId,e.state,e.error);ot("SharedClientState",`Ignoring mutation for non-active user ${e.user.uid}`)})()}Hs(e){return this.syncEngine.Xs(e.targetId,e.state,e.error)}Us(e,r){const u=r?this.ps.insert(e,r):this.ps.remove(e),d=this.Ns(this.ps),p=this.Ns(u),w=[],re=[];return p.forEach(Te=>{d.has(Te)||w.push(Te)}),d.forEach(Te=>{p.has(Te)||re.push(Te)}),this.syncEngine.eo(w,re).then(()=>{this.ps=u})}Os(e){this.ps.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}Ns(e){let r=rs();return e.forEach((u,d)=>{r=r.unionWith(d.activeTargetIds)}),r}}class M0{constructor(){this.no=new Sv,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,r,u){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,r,u){this.ro[e]=r}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new Sv,Promise.resolve()}handleUserChange(e,r,u){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class tb{io(e){}shutdown(){}}class x0{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){ot("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.uo)e(0)}ao(){ot("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.uo)e(1)}static D(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let Yh=null;function ef(){return null===Yh?Yh=268435456+Math.round(2147483648*Math.random()):Yh++,"0x"+Yh.toString(16)}const Xh={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregation
1Query:"runAggregationQuery"};class Vg{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}onMessage(e){this.Ao=e}close(){this.ho()}send(e){this.lo(e)}Ro(){this.Io()}Vo(e){this.Eo(e)}mo(e){this.Ao(e)}}const Za="WebChannelConnection";class Cv extends class{constructor(r){this.databaseInfo=r,this.databaseId=r.databaseId;const u=r.ssl?"https":"http",d=encodeURIComponent(this.databaseId.projectId),p=encodeURIComponent(this.databaseId.database);this.fo=u+"://"+r.host,this.po=`projects/${d}/databases/${p}`,this.yo="(default)"===this.databaseId.database?`project_id=${d}`:`project_id=${d}&database_id=${p}`}get wo(){return!1}So(r,u,d,p,w){const re=ef(),Te=this.bo(r,u.toUriEncodedString());ot("RestConnection",`Sending RPC '${r}' ${re}:`,Te,d);const ct={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(ct,p,w),this.Co(r,Te,ct,d).then(Jt=>(ot("RestConnection",`Received RPC '${r}' ${re}: `,Jt),Jt),Jt=>{throw yt("RestConnection",`RPC '${r}' ${re} failed with error: `,Jt,"url: ",Te,"request:",d),Jt})}vo(r,u,d,p,w,re){return this.So(r,u,d,p,w)}Do(r,u,d){r["X-Goog-Api-Client"]="gl-js/ fire/"+lo,r["Content-Type"]="text/plain",this.databaseInfo.appId&&(r["X-Firebase-GMPID"]=this.databaseInfo.appId),u&&u.headers.forEach((p,w)=>r[w]=p),d&&d.headers.forEach((p,w)=>r[w]=p)}bo(r,u){return`${this.fo}/v1/${u}:${Xh[r]}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Co(e,r,u,d){const p=ef();return new Promise((w,re)=>{const Te=new Ca;Te.setWithCredentials(!0),Te.listenOnce(cu.COMPLETE,()=>{try{switch(Te.getLastErrorCode()){case ol.NO_ERROR:const Jt=Te.getResponseJson();ot(Za,`XHR for RPC '${e}' ${p} received:`,JSON.stringify(Jt)),w(Jt);break;case ol.TIMEOUT:ot(Za,`RPC '${e}' ${p} timed out`),re(new Xr(Ar.DEADLINE_EXCEEDED,"Request time out"));break;case ol.HTTP_ERROR:const Dn=Te.getStatus();if(ot(Za,`RPC '${e}' ${p} failed with status:`,Dn,"response text:",Te.getResponseText()),Dn>0){let lr=Te.getResponseJson();Array.isArray(lr)&&(lr=lr[0]);const Yr=lr?.error;if(Yr&&Yr.status&&Yr.message){const Ni=function(Wi){const ds=Wi.toLowerCase().replace(/_/g,"-");return Object.values(Ar).indexOf(ds)>=0?ds:Ar.UNKNOWN}(Yr.status);re(new Xr(Ni,Yr.message))}else re(new Xr(Ar.UNKNOWN,"Server responded with status "+Te.getStatus()))}else re(new Xr(Ar.UNAVAILABLE,"Connection failed."));break;default:qn()}}finally{ot(Za,`RPC '${e}' ${p} completed.`)}});const ct=JSON.stringify(d);ot(Za,`RPC '${e}' ${p} sending request:`,d),Te.send(r,"POST",ct,u,15)})}Fo(e,r,u){const d=ef(),p=[this.fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],w=li(),re=Cs(),Te={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},ct=this.longPollingOptions.timeoutSeconds;void 0!==ct&&(Te.longPollingTimeout=Math.round(1e3*ct)),this.useFetchStreams&&(Te.useFetchStreams=!0),this.Do(Te.initMessageHeaders,r,u),Te.encodeInitMessageHeaders=!0;const Jt=p.join("");ot(Za,`Creating RPC '${e}' stream ${d}: ${Jt}`,Te);const Dn=w.createWebChannel(Jt,Te);let lr=!1,Yr=!1;const Ni=new Vg({lo:Wi=>{Yr?ot(Za,`Not sending because RPC '${e}' stream ${d} is closed:`,Wi):(lr||(ot(Za,`Opening RPC '${e}' stream ${d} transport.`),Dn.open(),lr=!0),ot(Za,`RPC '${e}' stream ${d} sending:`,Wi),Dn.send(Wi))},ho:()=>Dn.close()}),Ki=(Wi,ds,js)=>{Wi.listen(ds,ms=>{try{js(ms)}catch(Xs){setTimeout(()=>{throw Xs},0)}})};return Ki(Dn,ea.EventType.OPEN,()=>{Yr||ot(Za,`RPC '${e}' stream ${d} transport opened.`)}),Ki(Dn,ea.EventType.CLOSE,()=>{Yr||(Yr=!0,ot(Za,`RPC '${e}' stream ${d} transport closed`),Ni.Vo())}),Ki(Dn,ea.EventType.ERROR,Wi=>{Yr||(Yr=!0,yt(Za,`RPC '${e}' stream ${d} transport errored:`,Wi),Ni.Vo(new Xr(Ar.UNAVAILABLE,"The operation could not be completed")))}),Ki(Dn,ea.EventType.MESSAGE,Wi=>{var ds;if(!Yr){const js=Wi.data[0];Pr(!!js);const Xs=js.error||(null===(ds=js[0])||void 0===ds?void 0:ds.error);if(Xs){ot(Za,`RPC '${e}' stream ${d} received error:`,Xs);const jo=Xs.status;let _o=function(UE){const vh=Zo[UE];if(void 0!==vh)return _h(vh)}(jo),Ia=Xs.message;void 0===_o&&(_o=Ar.INTERNAL,Ia="Unknown error status: "+jo+" with message "+Xs.message),Yr=!0,Ni.Vo(new Xr(_o,Ia)),Dn.close()}else ot(Za,`RPC '${e}' stream ${d} received:`,js),Ni.mo(js)}}),Ki(re,Ws.STAT_EVENT,Wi=>{Wi.stat===Tl.PROXY?ot(Za,`RPC '${e}' stream ${d} detected buffering proxy`):Wi.stat===Tl.NOPROXY&&ot(Za,`RPC '${e}' stream ${d} detected no buffering proxy`)}),setTimeout(()=>{Ni.Ro()},0),Ni}}function _v(){return typeof window<"u"?window:null}function Qh(){return typeof document<"u"?document:null}function tf(o){return new hc(o,!0)}class Uc{constructor(e,r,u=1e3,d=1.5,p=6e4){this.oi=e,this.timerId=r,this.Mo=u,this.xo=d,this.Oo=p,this.No=0,this.Lo=null,this.Bo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(e){this.cancel();const r=Math.floor(this.No+this.Qo()),u=Math.max(0,Date.now()-this.Bo),d=Math.max(0,r-u);d>0&&ot("ExponentialBackoff",`Backing off for ${d} ms (base delay: ${this.No}
1 ms, delay with jitter: ${r} ms, last attempt: ${u} ms ago)`),this.Lo=this.oi.enqueueAfterDelay(this.timerId,d,()=>(this.Bo=Date.now(),e())),this.No*=this.xo,this.No<this.Mo&&(this.No=this.Mo),this.No>this.Oo&&(this.No=this.Oo)}Ko(){null!==this.Lo&&(this.Lo.skipDelay(),this.Lo=null)}cancel(){null!==this.Lo&&(this.Lo.cancel(),this.Lo=null)}Qo(){return(Math.random()-.5)*this.No}}class Nl{constructor(e,r,u,d,p,w,re,Te){this.oi=e,this.$o=u,this.Uo=d,this.connection=p,this.authCredentialsProvider=w,this.appCheckCredentialsProvider=re,this.listener=Te,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new Uc(e,r)}Ho(){return 1===this.state||5===this.state||this.Jo()}Jo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Yo()}stop(){var e=this;return(0,i.c)(function*(){e.Ho()&&(yield e.close(0))})()}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&null===this.Go&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(e){this.n_(),this.stream.send(e)}e_(){var e=this;return(0,i.c)(function*(){if(e.Jo())return e.close(0)})()}
1n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}close(e,r){var u=this;return(0,i.c)(function*(){u.n_(),u.r_(),u.jo.cancel(),u.Wo++,4!==e?u.jo.reset():r&&r.code===Ar.RESOURCE_EXHAUSTED?(Ae(r.toString()),Ae("Using maximum backoff delay to prevent overloading the backend."),u.jo.ko()):r&&r.code===Ar.UNAUTHENTICATED&&3!==u.state&&(u.authCredentialsProvider.invalidateToken(),u.appCheckCredentialsProvider.invalidateToken()),null!==u.stream&&(u.i_(),u.stream.close(),u.stream=null),u.state=e,yield u.listener.To(r)})()}i_(){}auth(){this.state=1;const e=this.s_(this.Wo),r=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([u,d])=>{this.Wo===r&&this.o_(u,d)},u=>{e(()=>{const d=new Xr(Ar.UNKNOWN,"Fetching auth token failed: "+u.message);return this.__(d)})})}o_(e,r){const u=this.s_(this.Wo);this.stream=this.a_(e,r),this.stream.Po(()=>{u(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(d=>{u(()=>this.__(d))}),this.stream.onMessage(d=>{u(()=>this.onMessage(d))})}Yo(){var e=this;this.state=5,this.jo.qo((0,i.c)(function*(){e.state=0,e.start()}))}__(e){return ot("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}s_(e){return r=>{this.oi.enqueueAndForget(()=>this.Wo===e?r():(ot("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class Vc extends Nl{constructor(e,r,u,d,p,w){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,u,d,w),this.serializer=p}a_(e,r){return this.connection.Fo("Listen",e,r)}onMessage(e){this.jo.reset();const r=function Zn(o,e){let r;if("targetChange"in e){const u="NO_CHANGE"===(ct=e.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===ct?1:"REMOVE"===ct?2:"CURRENT"===ct?3:"RESET"===ct?4:qn(),d=e.targetChange.targetIds||[],p=function(ct,Jt){return ct.useProto3Json?(Pr(void 0===Jt||"string"==typeof Jt),$o.fromBase64String(Jt||"")):(Pr(void 0===Jt||Jt instanceof Uint8Array),$o.fromUint8Array(Jt||new Uint8Array))}(o,e.targetChange.resumeToken),w=e.targetChange.cause,re=w&&function(ct){const Jt=void 0===ct.code?Ar.UNKNOWN:_h(ct.code);return new Xr(Jt,ct.message||"")}(w);r=new Pu(u,d,p,re||null)}else if("documentChange"in e){const u=e.documentChange,d=su(o,u.document.name),p=ua(u.document.updateTime),w=u.document.createTime?ua(u.document.createTime):ts.min(),re=new Bs({mapValue:{fields:u.document.fields}}),Te=qs.newFoundDocument(d,p,w,re);r=new iu(u.targetIds||[],u.removedTargetIds||[],Te.key,Te)}else if("documentDelete"in e){const u=e.documentDelete,d=su(o,u.document),p=u.readTime?ua(u.readTime):ts.min(),w=qs.newNoDocument(d,p);r=new iu([],u.removedTargetIds||[],w.key,w)}else if("documentRemove"in e){const u=e.documentRemove,d=su(o,u.document);r=new iu([],u.removedTargetIds||[],d,null)}else{if(!("filter"in e))return qn();{const u=e.filter,{count:d=0,unchangedNames:p}=u,w=new Mf(d,p);r=new Rc(u.targetId,w)}}var ct;return r}(this.serializer,e),u=function(p){if(!("targetChange"in p))return ts.min();const w=p.targetChange;return w.targetIds&&w.targetIds.length?ts.min():w.readTime?ua(w.readTime):ts.min()}(e);return this.listener.u_(r,u)}c_(e){const r={};r.database=m(this.serializer),r.addTarget=function(p,w){let re;const Te=w.target;if(re=z(Te)?{documents:Ji(p,Te)}:{query:Xi(p,Te).ut},re.targetId=w.targetId,w.resumeToken.approximateByteSize()>0){re.resumeToken=Qu(p,w.resumeToken);const ct=xf(p,w.expectedCount);null!==ct&&(re.expectedCount=ct)}else if(w.snapshotVersion.compareTo(ts.min())>0){re.readTime=Pa(p,w.snapshotVersion.toTimestamp());const ct=xf(p,w.expectedCount);null!==ct&&(re.expectedCount=ct)}return re}(this.serializer,e);const u=function xl(o,e){const r=function(d){switch(d){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return qn()}}(e.purpose);return null==r?null:{"goog-listen-tags":r}}(0,e);u&&(r.labels=u),this.t_(r)}l_(e){const r={};r.database=m(this.serializer),r.removeTarget=e,this.t_(r)}}
1class Av extends Nl{constructor(e,r,u,d,p,w){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,u,d,w),this.serializer=p,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(e,r){return this.connection.Fo("Write",e,r)}onMessage(e){if(Pr(!!e.streamToken),this.lastStreamToken=e.streamToken,this.h_){this.jo.reset();const r=function Yi(o,e){return o&&o.length>0?(Pr(void 0!==e),o.map(r=>function(d,p){let w=ua(d.updateTime?d.updateTime:p);return w.isEqual(ts.min())&&(w=ua(p)),new Cu(w,d.transformResults||[])}(r,e))):[]}(e.writeResults,e.commitTime),u=ua(e.commitTime);return this.listener.T_(u,r)}return Pr(!e.writeResults||0===e.writeResults.length),this.h_=!0,this.listener.E_()}d_(){const e={};e.database=m(this.serializer),this.t_(e)}I_(e){const r={streamToken:this.lastStreamToken,writes:e.map(u=>xr(this.serializer,u))};this.t_(r)}}class nb extends class{}{constructor(e,r,u,d){super(),this.authCredentials=e,this.appCheckCredentials=r,this.connection=u,this.serializer=d,this.A_=!1}R_(){if(this.A_)throw new Xr(Ar.FAILED_PRECONDITION,"The client has already been terminated.")}So(e,r,u,d){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([p,w])=>this.connection.So(e,Mc(r,u),d,p,w)).catch(p=>{throw"FirebaseError"===p.name?(p.code===Ar.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),p):new Xr(Ar.UNKNOWN,p.toString())})}vo(e,r,u,d,p){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([w,re])=>this.connection.vo(e,Mc(r,u),d,w,re,p)).catch(w=>{throw"FirebaseError"===w.name?(w.code===Ar.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),w):new Xr(Ar.UNKNOWN,w.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class rb{constructor(e,r){this.asyncQueue=e,this.onlineStateHandler=r,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){0===this.m_&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(e){"Online"===this.state?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.y_("Offline")))}set(e){this.b_(),this.m_=0,"Online"===e&&(this.g_=!1),this.y_(e)}y_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}w_(e){const r=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.g_?(Ae(r),this.g_=!1):ot("OnlineStateTracker",r)}b_(){null!==this.f_&&(this.f_.cancel(),this.f_=null)}}class Pv{constructor(e,r,u,d,p){var w=this;this.localStore=e,this.datastore=r,this.asyncQueue=u,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=p,this.M_.io(re=>{u.enqueueAndForget((0,i.c)(function*(){var Te;xu(w)&&(ot("RemoteStore","Restarting streams for network reachability change."),yield(Te=(0,i.c)(function*(Jt){const Dn=pi(Jt);Dn.v_.add(4),yield yc(Dn),Dn.x_.set("Unknown"),Dn.v_.delete(4),yield nf(Dn)}),function ct(Jt){return Te.apply(this,arguments)})(w))}))}),this.x_=new rb(u,d)}}function nf(o){return Rv.apply(this,arguments)}function Rv(){return Rv=(0,i.c)(function*(o){if(xu(o))for(const e of o.F_)yield e(!0)}),Rv.apply(this,arguments)}function yc(o){return Gf.apply(this,arguments)}function Gf(){return Gf=(0,i.c)(function*(o){for(const e of o.F_)yield e(!1)}),Gf.apply(this,arguments)}function rf(o,e){const r=pi(o);r.C_.has(e.targetId)||(r.C_.set(e.targetId,e),zf(r)?Jh(r):Pd(r).Jo()&&Bc(r,e))}function sf(o,e){const r=pi(o),u=Pd(r);r.C_.delete(e),u.Jo()&&Wf(r,e),0===r.C_.size&&(u.Jo()?u.Xo():xu(r)&&r.x_.set("Unknown"))}function Bc(o,e){if(o.O_.Oe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(ts.min())>0){const r=o.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(r)}Pd(o).c_(e)}function Wf(o,e){o.O_.Oe(e),Pd(o).l_(e)}
1function Jh(o){o.O_=new cg({getRemoteKeysForTarget:e=>o.remoteSyncer.getRemoteKeysForTarget(e),_t:e=>o.C_.get(e)||null,nt:()=>o.datastore.serializer.databaseId}),Pd(o).start(),o.x_.p_()}function zf(o){return xu(o)&&!Pd(o).Ho()&&o.C_.size>0}function xu(o){return 0===pi(o).v_.size}function Mv(o){o.O_=void 0}function N0(o){return Zh.apply(this,arguments)}function Zh(){return Zh=(0,i.c)(function*(o){o.C_.forEach((e,r)=>{Bc(o,e)})}),Zh.apply(this,arguments)}function k0(o,e){return Bg.apply(this,arguments)}function Bg(){return Bg=(0,i.c)(function*(o,e){Mv(o),zf(o)?(o.x_.S_(e),Jh(o)):o.x_.set("Unknown")}),Bg.apply(this,arguments)}function L0(o,e,r){return qh.apply(this,arguments)}function qh(){return qh=(0,i.c)(function*(o,e,r){if(o.x_.set("Online"),e instanceof Pu&&2===e.state&&e.cause)try{yield(u=(0,i.c)(function*(p,w){const re=w.cause;for(const Te of w.targetIds)p.C_.has(Te)&&(yield p.remoteSyncer.rejectListen(Te,re),p.C_.delete(Te),p.O_.removeTarget(Te))}),function d(p,w){return u.apply(this,arguments)})(o,e)}catch(u){ot("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),u),yield $c(o,u)}else if(e instanceof iu?o.O_.$e(e):e instanceof Rc?o.O_.Je(e):o.O_.Ge(e),!r.isEqual(ts.min()))try{const u=yield Sl(o.localStore);r.compareTo(u)>=0&&(yield function(p,w){const re=p.O_.it(w);
1return re.targetChanges.forEach((Te,ct)=>{if(Te.resumeToken.approximateByteSize()>0){const Jt=p.C_.get(ct);Jt&&p.C_.set(ct,Jt.withResumeToken(Te.resumeToken,w))}}),re.targetMismatches.forEach((Te,ct)=>{const Jt=p.C_.get(Te);if(!Jt)return;p.C_.set(Te,Jt.withResumeToken($o.EMPTY_BYTE_STRING,Jt.snapshotVersion)),Wf(p,Te);const Dn=new Ol(Jt.target,Te,ct,Jt.sequenceNumber);Bc(p,Dn)}),p.remoteSyncer.applyRemoteEvent(re)}(o,r))}catch(u){ot("RemoteStore","Failed to raise snapshot:",u),yield $c(o,u)}var u}),qh.apply(this,arguments)}function $c(o,e,r){return af.apply(this,arguments)}function af(){return af=(0,i.c)(function*(o,e,r){if(!Ea(e))throw e;o.v_.add(1),yield yc(o),o.x_.set("Offline"),r||(r=()=>Sl(o.localStore)),o.asyncQueue.enqueueRetryable((0,i.c)(function*(){ot("RemoteStore","Retrying IndexedDB access"),yield r(),o.v_.delete(1),yield nf(o)}))}),af.apply(this,arguments)}function ep(o,e){return e().catch(r=>$c(o,r,e))}function lf(o){return $g.apply(this,arguments)}function $g(){return $g=(0,i.c)(function*(o){const e=pi(o),r=nc(e);let u=e.D_.length>0?e.D_[e.D_.length-1].batchId:-1;for(;jg(e);)try{const d=yield Og(e.localStore,u);if(null===d){0===e.D_.length&&r.Xo();break}u=d.batchId,xv(e,d)}catch(d){yield $c(e,d)}jc(e)&&Gg(e)}),$g.apply(this,arguments)}function jg(o){return xu(o)&&o.D_.length<10}function xv(o,e){o.D_.push(e);const r=nc(o);r.Jo()&&r.P_&&r.I_(e.mutations)}function jc(o){return xu(o)&&!nc(o).Ho()&&o.D_.length>0}function Gg(o){nc(o).start()}function Ov(o){return Wg.apply(this,arguments)}function Wg(){return Wg=(0,i.c)(function*(o){nc(o).d_()}),Wg.apply(this,arguments)}function ib(o){return uf.apply(this,arguments)}function uf(){return uf=(0,i.c)(function*(o){const e=nc(o);for(const r of o.D_)e.I_(r.mutations)}),uf.apply(this,arguments)}function F0(o,e,r){return tp.apply(this,arguments)}function tp(){return tp=(0,i.c)(function*(o,e,r){const u=o.D_.shift(),d=Wd.from(u,e,r);yield ep(o,()=>o.remoteSyncer.applySuccessfulWrite(d)),yield lf(o)}),tp.apply(this,arguments)}function Nv(o,e){return np.apply(this,arguments)}function np(){return np=(0,i.c)(function*(o,e){var r;e&&nc(o).P_&&(yield(r=(0,i.c)(function*(d,p){if(hd(re=p.code)&&re!==Ar.ABORTED){const w=d.D_.shift();nc(d).Zo(),yield ep(d,()=>d.remoteSyncer.rejectFailedWrite(w.batchId,p)),yield lf(d)}var re}),function u(d,p){return r.apply(this,arguments)})(o,e)),jc(o)&&Gg(o)}),np.apply(this,arguments)}function rp(o,e){return ip.apply(this,arguments)}function ip(){return ip=(0,i.c)(function*(o,e){const r=pi(o);r.asyncQueue.verifyOperationInProgress(),ot("RemoteStore","RemoteStore received new credentials");const u=xu(r);r.v_.add(3),yield yc(r),u&&r.x_.set("Unknown"),yield r.remoteSyncer.handleCredentialChange(e),r.v_.delete(3),yield nf(r)}),ip.apply(this,arguments)}function cf(o,e){return Dd.apply(this,arguments)}function Dd(){return Dd=(0,i.c)(function*(o,e){const r=pi(o);e?(r.v_.delete(2),yield nf(r)):e||(r.v_.add(2),yield yc(r),r.x_.set("Unknown"))}),Dd.apply(this,arguments)}function Pd(o){return o.N_||(o.N_=function(r,u,d){const p=pi(r);return p.R_(),new Vc(u,p.connection,p.authCredentials,p.appCheckCredentials,p.serializer,d)}(o.datastore,o.asyncQueue,{Po:N0.bind(null,o),To:k0.bind(null,o),u_:L0.bind(null,o)}),o.F_.push(function(){var e=(0,i.c)(function*(r){r?(o.N_.Zo(),zf(o)?Jh(o):o.x_.set("Unknown")):(yield o.N_.stop(),Mv(o))});return function(r){return e.apply(this,arguments)}}())),o.N_}function nc(o){return o.L_||(o.L_=function(r,u,d){const p=pi(r);return p.R_(),new Av(u,p.connection,p.authCredentials,p.appCheckCredentials,p.serializer,d)}(o.datastore,o.asyncQueue,{Po:Ov.bind(null,o),To:Nv.bind(null,o),E_:ib.bind(null,o),T_:F0.bind(null,o)}),o.F_.push(function(){var e=(0,i.c)(function*(r){r?(o.L_.Zo(),yield lf(o)):(yield o.L_.stop(),o.D_.length>0&&(ot("RemoteStore",`Stopping write stream with ${o.D_.length} pending writes`),o.D_=[]))});return function(r){return e.apply(this,arguments)}}())),o.L_}class df{constructor(e,r,u,d,p){this.asyncQueue=e,this.timerId=r,this.targetTimeMs=u,this.op=d,this.removalCallback=p,this.deferred=new Qi,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(w=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,r,u,d,p){const w=Date.now()+u,re=new df(e,r,w,d,p);return re.start(u),re}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Xr(Ar.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 Rd(o,e){if(Ae("AsyncQueue",`${e}: ${o}`),Ea(o))return new Xr(Ar.UNAVAILABLE,`${e}: ${o}`);throw o}class Gc{constructor(e){this.comparator=e?(r,u)=>e(r,u)||Vi.comparator(r.key,u.key):(r,u)=>Vi.comparator(r.key,u.key),this.keyedMap=yr(),this.sortedSet=new Zs(this.comparator)}static emptySet(e){return new Gc(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const r=this.keyedMap.get(e);return r?this.sortedSet.indexOf(r):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((r,u)=>(e(r),!1))}add(e){const r=this.delete(e.key);return r.copy(r.keyedMap.insert(e.key,e),r.sortedSet.insert(e,null))}delete(e){const r=this.get(e);return r?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(r)):this}isEqual(e){if(!(e instanceof Gc)||this.size!==e.size)return!1;const r=this.sortedSet.getIterator(),u=e.sortedSet.getIterator();for(;r.hasNext();){const d=r.getNext().key,p=u.getNext().key;if(!d.isEqual(p))return!1}return!0}toString(){const e=[];return this.forEach(r=>{e.push(r.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,r){const u=new Gc;return u.comparator=this.comparator,u.keyedMap=e,u.sortedSet=r,u}}class Hf{constructor(){this.B_=new Zs(Vi.comparator)}track(e){const r=e.doc.key,u=this.B_.get(r);u?0!==e.type&&3===u.type?this.B_=this.B_.insert(r,e):3===e.type&&1!==u.type?this.B_=this.B_.insert(r,{type:u.type,doc:e.doc}):2===e.type&&2===u.type?this.B_=this.B_.insert(r,{type:2,doc:e.doc}):2===e.type&&0===u.type?this.B_=this.B_.insert(r,{type:0,doc:e.doc}):1===e.type&&0===u.type?this.B_=this.B_.remove(r):1===e.type&&2===u.type?this.B_=this.B_.insert(r,{type:1,doc:u.doc}):0===e.type&&1===u.type?this.B_=this.B_.insert(r,{type:2,doc:e.doc}):qn():this.B_=this.B_.insert(r,e)}k_(){const e=[];return this.B_.inorderTraversal((r,u)=>{e.push(u)}),e}}class ff{constructor(e,r,u,d,p,w,re,Te,ct){this.query=e,this.docs=r,this.oldDocs=u,this.docChanges=d,this.mutatedKeys=p,this.fromCache=w,this.syncStateChanged=re,this.excludesMetadataChanges=Te,this.hasCachedResults=ct}static fromInitialDocuments(e,r,u,d,p){const w=[];return r.forEach(re=>
1{w.push({type:0,doc:re})}),new ff(e,r,Gc.emptySet(r),w,u,d,!0,!1,p)}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)&&Rn(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const r=this.docChanges,u=e.docChanges;if(r.length!==u.length)return!1;for(let d=0;d<r.length;d++)if(r[d].type!==u[d].type||!r[d].doc.isEqual(u[d].doc))return!1;return!0}}class kv{constructor(){this.q_=void 0,this.Q_=[]}K_(){return this.Q_.some(e=>e.U_())}}class U0{constructor(){this.queries=new Zr(e=>vr(e),Rn),this.onlineState="Unknown",this.W_=new Set}}function zg(o,e){return Hg.apply(this,arguments)}function Hg(){return Hg=(0,i.c)(function*(o,e){const r=pi(o);let u=3;const d=e.query;let p=r.queries.get(d);p?!p.K_()&&e.U_()&&(u=2):(p=new kv,u=e.U_()?0:1);try{switch(u){case 0:p.q_=yield r.onListen(d,!0);break;case 1:p.q_=yield r.onListen(d,!1);break;case 2:yield r.onFirstRemoteStoreListen(d)}}catch(w){const re=Rd(w,`Initialization of query '${hi(e.query)}' failed`);return void e.onError(re)}r.queries.set(d,p),p.Q_.push(e),e.G_(r.onlineState),p.q_&&e.z_(p.q_)&&ap(r)}),Hg.apply(this,arguments)}function sp(o,e){return op.apply(this,arguments)}function op(){return op=(0,i.c)(function*(o,e){const r=pi(o),u=e.query;let d=3;const p=r.queries.get(u);if(p){const w=p.Q_.indexOf(e);w>=0&&(p.Q_.splice(w,1),0===p.Q_.length?d=e.U_()?0:1:!p.K_()&&e.U_()&&(d=2))}switch(d){case 0:return r.queries.delete(u),r.onUnlisten(u,!0);case 1:return r.queries.delete(u),r.onUnlisten(u,!1);case 2:return r.onLastRemoteStoreUnlisten(u);default:return}}),op.apply(this,arguments)}function Fs(o,e){const r=pi(o);let u=!1;for(const d of e){const w=r.queries.get(d.query);if(w){for(const re of w.Q_)re.z_(d)&&(u=!0);w.q_=d}}u&&ap(r)}function Lv(o,e,r){const u=pi(o),d=u.queries.get(e);if(d)for(const p of d.Q_)p.onError(r);u.queries.delete(e)}function ap(o){o.W_.forEach(e=>{e.next()})}var Wc,Kg;(Kg=Wc||(Wc={})).j_="default",Kg.Cache="cache";class lp{constructor(e,r,u){this.query=e,this.H_=r,this.J_=!1,this.Y_=null,this.onlineState="Unknown",this.options=u||{}}z_(e){if(!this.options.includeMetadataChanges){const u=[];for(const d of e.docChanges)3!==d.type&&u.push(d);e=new ff(e.query,e.docs,e.oldDocs,u,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let r=!1;return this.J_?this.Z_(e)&&(this.H_.next(e),r=!0):this.X_(e,this.onlineState)&&(this.ea(e),r=!0),this.Y_=e,r}onError(e){this.H_.error(e)}G_(e){this.onlineState=e;let r=!1;return this.Y_&&!this.J_&&this.X_(this.Y_,e)&&(this.ea(this.Y_),r=!0),r}X_(e,r){return!e.fromCache||!this.U_()||(!this.options.ta||!("Offline"!==r))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===r)}Z_(e){return e.docChanges.length>0||!!(e.syncStateChanged||this.Y_&&this.Y_.hasPendingWrites!==e.hasPendingWrites)&&!0===this.options.includeMetadataChanges}ea(e){e=ff.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.J_=!0,this.H_.next(e)}U_(){return this.options.source!==Wc.Cache}}class V0{constructor(e,r){this.na=e,this.byteLength=r}ra(){return"metadata"in this.na}}class Kf{constructor(e){this.serializer=e}Ps(e){return su(this.serializer,e)}Is(e){return e.metadata.exists?at(this.serializer,e.document,!1):qs.newNoDocument(this.Ps(e.metadata.name),this.Ts(e.metadata.readTime))}Ts(e){return ua(e)}}class hf{constructor(e,r,u){this.ia=e,this.localStore=r,this.serializer=u,this.queries=[],this.documents=[],this.collectionGroups=new Set,this.progress=up(e)}sa(e){this.progress.bytesLoaded+=e.byteLength;let r=this.progress.documentsLoaded;if(e.na.namedQuery)this.queries.push(e.na.namedQuery);else if(e.na.documentMetadata){this.documents.push({metadata:e.na.documentMetadata}),e.na.documentMetadata.exists||++r;const u=Es.fromString(e.na.documentMetadata.name);this.collectionGroups.add(u.get(u.length-2))}else e.na.document&&(this.documents[this.documents.length-1].document=e.na.document,++r);return r!==this.progress.documentsLoaded?(this.progress.documentsLoaded=r,Object.assign({},this.progress)):null}oa(e){const r=new Map,u=new Kf(this.serializer);for(const d of e)if(d.metadata.queries){const p=u.Ps(d.metadata.name);for(const w of d.metadata.queries){const re=(r.get(w)||Bi()).add(p);r.set(w,re)}}return r}complete(){var e=this;return(0,i.c)(function*(){const r=yield function Ev(o,e,r,u){return kg.apply(this,arguments)}(e.localStore,new Kf(e.serializer),e.documents,e.ia.id),u=e.oa(e.documents);for(const d of e.queries)yield wv(e.localStore,d,u.get(d.name));return e.progress.taskState="Success",{progress:e.progress,_a:e.collectionGroups,aa:r}})()}}function up(o){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:o.totalDocuments,totalBytes:o.totalBytes}}class pf{constructor(e){this.key=e}}class Yg{constructor(e){this.key=e}}class cp{constructor(e,r){this.query=e,this.ua=r,this.ca=null,this.hasCachedResults=!1,this.current=!1,this.la=Bi(),this.mutatedKeys=Bi(),this.ha=ni(e),this.Pa=new Gc(this.ha)}get Ia(){return this.ua}Ta(e,r){const u=r?r.Ea:new Hf,d=r?r.Pa:this.Pa;let p=r?r.mutatedKeys:this.mutatedKeys,w=d,re=!1;const Te="F"===this.query.limitType&&d.size===this.query.limit?d.last():null,ct="L"===this.query.limitType&&d.size===this.query.limit?d.first():null;if(e.inorderTraversal((Jt,Dn)=>{const lr=d.get(Jt),Yr=ui(this.query,Dn)?Dn:null,Ni=!!lr&&this.mutatedKeys.has(lr.key),Ki=!!Yr&&(Yr.hasLocalMutations||this.mutatedKeys.has(Yr.key)&&Yr.hasCommittedMutations);let Wi=!1;lr&&Yr?lr.data.isEqual(Yr.data)?Ni!==Ki&&(u.track({type:3,doc:Yr}),Wi=!0):this.da(lr,Yr)||(u.track({type:2,doc:Yr}),Wi=!0,(Te&&this.ha(Yr,Te)>0||ct&&this.ha(Yr,ct)<0)&&(re=!0)):!lr&&Yr?(u.track({type:0,doc:Yr}),Wi=!0):lr&&!Yr&&(u.track({type:1,doc:lr}),Wi=!0,(Te||ct)&&(re=!0)),Wi&&(Yr?(w=w.add(Yr),p=Ki?p.add(Jt):p.delete(Jt)):(w=w.delete(Jt),p=p.delete(Jt)))}),null!==this.query.limit)for(;w.size>this.query.limit;
1){const Jt="F"===this.query.limitType?w.last():w.first();w=w.delete(Jt.key),p=p.delete(Jt.key),u.track({type:1,doc:Jt})}return{Pa:w,Ea:u,Xi:re,mutatedKeys:p}}da(e,r){return e.hasLocalMutations&&r.hasCommittedMutations&&!r.hasLocalMutations}applyChanges(e,r,u,d){const p=this.Pa;this.Pa=e.Pa,this.mutatedKeys=e.mutatedKeys;const w=e.Ea.k_();w.sort((Jt,Dn)=>function(Yr,Ni){const Ki=Wi=>{switch(Wi){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return qn()}};return Ki(Yr)-Ki(Ni)}(Jt.type,Dn.type)||this.ha(Jt.doc,Dn.doc)),this.Aa(u),d=null!=d&&d;const re=r&&!d?this.Ra():[],Te=0===this.la.size&&this.current&&!d?1:0,ct=Te!==this.ca;return this.ca=Te,0!==w.length||ct?{snapshot:new ff(this.query,e.Pa,p,w,e.mutatedKeys,0===Te,ct,!1,!!u&&u.resumeToken.approximateByteSize()>0),Va:re}:{Va:re}}G_(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Pa:this.Pa,Ea:new Hf,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{Va:[]}}ma(e){return!this.ua.has(e)&&!!this.Pa.has(e)&&!this.Pa.get(e).hasLocalMutations}Aa(e){e&&(e.addedDocuments.forEach(r=>this.ua=this.ua.add(r)),e.modifiedDocuments.forEach(r=>{}),e.removedDocuments.forEach(r=>this.ua=this.ua.delete(r)),this.current=e.current)}Ra(){if(!this.current)return[];const e=this.la;this.la=Bi(),this.Pa.forEach(u=>{this.ma(u.key)&&(this.la=this.la.add(u.key))});const r=[];return e.forEach(u=>{this.la.has(u)||r.push(new Yg(u))}),this.la.forEach(u=>{e.has(u)||r.push(new pf(u))}),r}fa(e){this.ua=e.hs,this.la=Bi();const r=this.Ta(e.documents);return this.applyChanges(r,!0)}ga(){return ff.fromInitialDocuments(this.query,this.Pa,this.mutatedKeys,0===this.ca,this.hasCachedResults)}}class Xg{constructor(e,r,u){this.query=e,this.targetId=r,this.view=u}}class Qg{constructor(e){this.key=e,this.pa=!1}}class Fv{constructor(e,r,u,d,p,w){this.localStore=e,this.remoteStore=r,this.eventManager=u,this.sharedClientState=d,this.currentUser=p,this.maxConcurrentLimboResolutions=w,this.ya={},this.wa=new Zr(re=>vr(re),Rn),this.Sa=new Map,this.ba=new Set,this.Da=new Zs(Vi.comparator),this.Ca=new Map,this.va=new Vf,this.Fa={},this.Ma=new Map,this.xa=Il.Ln(),this.onlineState="Unknown",this.Oa=void 0}get isPrimaryClient(){return!0===this.Oa}}function Jg(o,e){return Zg.apply(this,arguments)}function Zg(){return Zg=(0,i.c)(function*(o,e,r=!0){const u=Hc(o);let d;const p=u.wa.get(e);return p?(u.sharedClientState.addLocalQueryTarget(p.targetId),d=p.view.ga()):d=yield em(u,e,r,!0),d}),Zg.apply(this,arguments)}function B0(o,e){return qg.apply(this,arguments)}function qg(){return qg=(0,i.c)(function*(o,e){const r=Hc(o);yield em(r,e,!0,!1)}),qg.apply(this,arguments)}function em(o,e,r,u){return tm.apply(this,arguments)}function tm(){return tm=(0,i.c)(function*(o,e,r,u){const d=yield ba(o.localStore,Sn(e)),p=d.targetId,w=r?o.sharedClientState.addLocalQueryTarget(p):"not-current";let re;return u&&(re=yield nm(o,e,p,"current"===w,d.resumeToken)),o.isPrimaryClient&&r&&rf(o.remoteStore,d),re}),tm.apply(this,arguments)}function nm(o,e,r,u,d){return rm.apply(this,arguments)}function rm(){return rm=(0,i.c)(function*(o,e,r,u,d){o.Na=(Dn,lr,Yr)=>{return(Ni=(0,i.c)(function*(Wi,ds,js,ms){let Xs=ds.view.Ta(js);Xs.Xi&&(Xs=yield $f(Wi.localStore,ds.query,!1).then(({documents:au})=>ds.view.Ta(au,Xs)));const jo=ms&&ms.targetChanges.get(ds.targetId),_o=ms&&null!=ms.targetMismatches.get(ds.targetId),Ia=ds.view.applyChanges(Xs,Wi.isPrimaryClient,jo,_o);return cm(Wi,ds.targetId,Ia.Va),Ia.snapshot}),function Ki(Wi,ds,js,ms){return Ni.apply(this,arguments)})(o,Dn,lr,Yr);var Ni};const p=yield $f(o.localStore,e,!0),w=new cp(e,p.hs),re=w.Ta(p.documents),Te=gd.createSynthesizedTargetChangeForCurrentChange(r,u&&"Offline"!==o.onlineState,d),ct=w.applyChanges(re,o.isPrimaryClient,Te);cm(o,r,ct.Va);const Jt=new Xg(e,r,w);return o.wa.set(e,Jt),o.Sa.has(r)?o.Sa.get(r).push(e):o.Sa.set(r,[e]),ct.snapshot}),rm.apply(this,arguments)}function $0(o,e,r){return dp.apply(this,arguments)}function dp(){return dp=(0,i.c)(function*(o,e,r){const u=pi(o),d=u.wa.get(e),p=u.Sa.get(d.targetId);if(p.length>1)return u.Sa.set(d.targetId,p.filter(w=>!Rn(w,e))),void u.wa.delete(e);
1u.isPrimaryClient?(u.sharedClientState.removeLocalQueryTarget(d.targetId),u.sharedClientState.isActiveQueryTarget(d.targetId)||(yield tc(u.localStore,d.targetId,!1).then(()=>{u.sharedClientState.clearQueryState(d.targetId),r&&sf(u.remoteStore,d.targetId),gf(u,d.targetId)}).catch(oa))):(gf(u,d.targetId),yield tc(u.localStore,d.targetId,!0))}),dp.apply(this,arguments)}function Uv(o,e){return im.apply(this,arguments)}function im(){return im=(0,i.c)(function*(o,e){const r=pi(o),u=r.wa.get(e),d=r.Sa.get(u.targetId);r.isPrimaryClient&&1===d.length&&(r.sharedClientState.removeLocalQueryTarget(u.targetId),sf(r.remoteStore,u.targetId))}),im.apply(this,arguments)}function ml(){return ml=(0,i.c)(function*(o,e,r){const u=Jf(o);try{const d=yield function(w,re){const Te=pi(w),ct=io.now(),Jt=re.reduce((Yr,Ni)=>Yr.add(Ni.key),Bi());let Dn,lr;return Te.persistence.runTransaction("Locally write mutations","readwrite",Yr=>{let Ni=$r(),Ki=Bi();return Te.os.getEntries(Yr,Jt).next(Wi=>{Ni=Wi,Ni.forEach((ds,js)=>{js.isValidDocument()||(Ki=Ki.add(ds))})}).next(()=>Te.localDocuments.getOverlayedDocuments(Yr,Ni)).next(Wi=>{Dn=Wi;const ds=[];for(const js of re){const ms=lg(js,Dn.get(js.key).overlayedDocument);null!=ms&&ds.push(new _u(js.key,ms,To(ms.value.mapValue),Fo.exists(!0)))}return Te.mutationQueue.addMutationBatch(Yr,ct,ds,re)}).next(Wi=>{lr=Wi;const ds=Wi.applyToLocalDocumentSet(Dn,Ki);return Te.documentOverlayCache.saveOverlays(Yr,Wi.batchId,ds)})}).then(()=>({batchId:lr.batchId,changes:gi(Dn)}))}(u.localStore,e);u.sharedClientState.addPendingMutation(d.batchId),function(w,re,Te){let ct=w.Fa[w.currentUser.toKey()];ct||(ct=new Zs(vs)),ct=ct.insert(re,Te),w.Fa[w.currentUser.toKey()]=ct}(u,d.batchId,r),yield Ou(u,d.changes),yield lf(u.remoteStore)}catch(d){const p=Rd(d,"Failed to persist write");r.reject(p)}}),ml.apply(this,arguments)}function Vv(o,e){return sm.apply(this,arguments)}function sm(){return sm=(0,i.c)(function*(o,e){const r=pi(o);try{const u=yield function Mg(o,e){const r=pi(o),u=e.snapshotVersion;let d=r.ns;return r.persistence.runTransaction("Apply remote event","readwrite-primary",p=>{const w=r.os.newChangeBuffer({trackRemovals:!0});d=r.ns;const re=[];
1e.targetChanges.forEach((Jt,Dn)=>{const lr=d.get(Dn);if(!lr)return;re.push(r.Qr.removeMatchingKeys(p,Jt.removedDocuments,Dn).next(()=>r.Qr.addMatchingKeys(p,Jt.addedDocuments,Dn)));let Yr=lr.withSequenceNumber(p.currentSequenceNumber);var Ki,Wi,ds;null!==e.targetMismatches.get(Dn)?Yr=Yr.withResumeToken($o.EMPTY_BYTE_STRING,ts.min()).withLastLimboFreeSnapshotVersion(ts.min()):Jt.resumeToken.approximateByteSize()>0&&(Yr=Yr.withResumeToken(Jt.resumeToken,u)),d=d.insert(Dn,Yr),Wi=Yr,ds=Jt,(0===(Ki=lr).resumeToken.approximateByteSize()||Wi.snapshotVersion.toMicroseconds()-Ki.snapshotVersion.toMicroseconds()>=3e8||ds.addedDocuments.size+ds.modifiedDocuments.size+ds.removedDocuments.size>0)&&re.push(r.Qr.updateTargetData(p,Yr))});let Te=$r(),ct=Bi();if(e.documentUpdates.forEach(Jt=>{e.resolvedLimboDocuments.has(Jt)&&re.push(r.persistence.referenceDelegate.updateLimboDocument(p,Jt))}),re.push(xg(p,w,e.documentUpdates).next(Jt=>{Te=Jt.cs,ct=Jt.ls})),!u.isEqual(ts.min())){const Jt=r.Qr.getLastRemoteSnapshotVersion(p).next(Dn=>r.Qr.setTargetsMetadata(p,p.currentSequenceNumber,u));re.push(Jt)}return Lr.waitFor(re).next(()=>w.apply(p)).next(()=>r.localDocuments.getLocalViewOfDocuments(p,Te,ct)).next(()=>Te)}
1).then(p=>(r.ns=d,p))}(r.localStore,e);e.targetChanges.forEach((d,p)=>{const w=r.Ca.get(p);w&&(Pr(d.addedDocuments.size+d.modifiedDocuments.size+d.removedDocuments.size<=1),d.addedDocuments.size>0?w.pa=!0:d.modifiedDocuments.size>0?Pr(w.pa):d.removedDocuments.size>0&&(Pr(w.pa),w.pa=!1))}),yield Ou(r,u,e)}catch(u){yield oa(u)}}),sm.apply(this,arguments)}function G0(o,e,r){const u=pi(o);if(u.isPrimaryClient&&0===r||!u.isPrimaryClient&&1===r){const d=[];u.wa.forEach((p,w)=>{const re=w.view.G_(e);re.snapshot&&d.push(re.snapshot)}),function(w,re){const Te=pi(w);Te.onlineState=re;let ct=!1;Te.queries.forEach((Jt,Dn)=>{for(const lr of Dn.Q_)lr.G_(re)&&(ct=!0)}),ct&&ap(Te)}(u.eventManager,e),d.length&&u.ya.u_(d),u.onlineState=e,u.isPrimaryClient&&u.sharedClientState.setOnlineState(e)}}function om(o,e,r){return fp.apply(this,arguments)}function fp(){return fp=(0,i.c)(function*(o,e,r){const u=pi(o);u.sharedClientState.updateQueryState(e,"rejected",r);const d=u.Ca.get(e),p=d&&d.key;if(p){let w=new Zs(Vi.comparator);w=w.insert(p,qs.newNoDocument(p,ts.min()));const re=Bi().add(p),Te=new Xu(ts.min(),new Map,new Zs(vs),w,re);yield Vv(u,Te),u.Da=u.Da.remove(p),u.Ca.delete(e),ou(u)}else yield tc(u.localStore,e,!1).then(()=>gf(u,e,r)).catch(oa)}),fp.apply(this,arguments)}function W0(o,e){return am.apply(this,arguments)}function am(){return am=(0,i.c)(function*(o,e){const r=pi(o),u=e.batch.batchId;try{const d=yield function R0(o,e){const r=pi(o);return r.persistence.runTransaction("Acknowledge batch","readwrite-primary",u=>{const d=e.batch.keys(),p=r.os.newChangeBuffer({trackRemovals:!0});return function(re,Te,ct,Jt){const Dn=ct.batch,lr=Dn.keys();let Yr=Lr.resolve();return lr.forEach(Ni=>{Yr=Yr.next(()=>Jt.getEntry(Te,Ni)).next(Ki=>{const Wi=ct.docVersions.get(Ni);Pr(null!==Wi),Ki.version.compareTo(Wi)<0&&(Dn.applyToRemoteDocument(Ki,ct),Ki.isValidDocument()&&(Ki.setReadTime(ct.commitVersion),Jt.addEntry(Ki)))})}),Yr.next(()=>re.mutationQueue.removeMutationBatch(Te,Dn))}(r,u,e,p).next(()=>p.apply(u)).next(()=>r.mutationQueue.performConsistencyCheck(u)).next(()=>r.documentOverlayCache.removeOverlaysForBatchId(u,d,e.batch.batchId)).next(()=>r.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(u,function(re){let Te=Bi();for(let ct=0;ct<re.mutationResults.length;++ct)re.mutationResults[ct].transformResults.length>0&&(Te=Te.add(re.batch.mutations[ct].key));return Te}(e))).next(()=>r.localDocuments.getDocuments(u,d))})}(r.localStore,e);um(r,u,null),Yf(r,u),r.sharedClientState.updateMutationState(u,"acknowledged"),yield Ou(r,d)}catch(d){yield oa(d)}}),am.apply(this,arguments)}function z0(o,e,r){return hp.apply(this,arguments)}function hp(){return hp=(0,i.c)(function*(o,e,r){const u=pi(o);try{const d=yield function(w,re){const Te=pi(w);return Te.persistence.runTransaction("Reject batch","readwrite-primary",ct=>{let Jt;return Te.mutationQueue.lookupMutationBatch(ct,re).next(Dn=>(Pr(null!==Dn),Jt=Dn.keys(),Te.mutationQueue.removeMutationBatch(ct,Dn))).next(()=>Te.mutationQueue.performConsistencyCheck(ct)).next(()=>Te.documentOverlayCache.removeOverlaysForBatchId(ct,Jt,re)).next(()=>Te.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(ct,Jt)).next(()=>Te.localDocuments.getDocuments(ct,Jt))})}(u.localStore,e);um(u,e,r),Yf(u,e),u.sharedClientState.updateMutationState(e,"rejected",r),yield Ou(u,d)}catch(d){yield oa(d)}}),hp.apply(this,arguments)}function lm(){return lm=(0,i.c)(function*(o,e){const r=pi(o);xu(r.remoteStore)||ot("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const u=yield function(w){const re=pi(w);return re.persistence.runTransaction("Get highest unacknowledged batch id","readonly",Te=>re.mutationQueue.getHighestUnacknowledgedBatchId(Te))}(r.localStore);if(-1===u)return void e.resolve();const d=r.Ma.get(u)||[];d.push(e),r.Ma.set(u,d)}catch(u){const d=Rd(u,"Initialization of waitForPendingWrites() operation failed");e.reject(d)}}),lm.apply(this,arguments)}function Yf(o,e){(o.Ma.get(e)||[]).forEach(r=>{r.resolve()}),o.Ma.delete(e)}function um(o,e,r){const u=pi(o);let d=u.Fa[u.currentUser.toKey()];if(d){const p=d.get(e);p&&(r?p.reject(r):p.resolve(),d=d.remove(e)),u.Fa[u.currentUser.toKey()]=d}}
1function gf(o,e,r=null){o.sharedClientState.removeLocalQueryTarget(e);for(const u of o.Sa.get(e))o.wa.delete(u),r&&o.ya.La(u,r);o.Sa.delete(e),o.isPrimaryClient&&o.va.Vr(e).forEach(u=>{o.va.containsKey(u)||Bv(o,u)})}function Bv(o,e){o.ba.delete(e.path.canonicalString());const r=o.Da.get(e);null!==r&&(sf(o.remoteStore,r),o.Da=o.Da.remove(e),o.Ca.delete(r),ou(o))}function cm(o,e,r){for(const u of r)u instanceof pf?(o.va.addReference(u.key,e),K0(o,u)):u instanceof Yg?(ot("SyncEngine","Document no longer in limbo: "+u.key),o.va.removeReference(u.key,e),o.va.containsKey(u.key)||Bv(o,u.key)):qn()}function K0(o,e){const r=e.key,u=r.path.canonicalString();o.Da.get(r)||o.ba.has(u)||(ot("SyncEngine","New document in limbo: "+r),o.ba.add(u),ou(o))}function ou(o){for(;o.ba.size>0&&o.Da.size<o.maxConcurrentLimboResolutions;){const e=o.ba.values().next().value;o.ba.delete(e);const r=new Vi(Es.fromString(e)),u=o.xa.next();o.Ca.set(u,new Qg(r)),o.Da=o.Da.insert(r,u),rf(o.remoteStore,new Ol(Sn(vt(r.path)),u,"TargetPurposeLimboResolution",Ds._e))}}function Ou(o,e,r){return dm.apply(this,arguments)}function dm(){return dm=(0,i.c)(function*(o,e,r){const u=pi(o),d=[],p=[],w=[];var re;u.wa.isEmpty()||(u.wa.forEach((re,Te)=>{w.push(u.Na(Te,e,r).then(ct=>{if((ct||r)&&u.isPrimaryClient&&u.sharedClientState.updateQueryState(Te.targetId,ct?.fromCache?"not-current":"current"),ct){d.push(ct);const Jt=Ag.Ki(Te.targetId,ct);p.push(Jt)}}))}),yield Promise.all(w),u.ya.u_(d),yield(re=(0,i.c)(function*(ct,Jt){const Dn=pi(ct);try{yield Dn.persistence.runTransaction("notifyLocalViewChanges","readwrite",lr=>Lr.forEach(Jt,Yr=>Lr.forEach(Yr.qi,Ni=>Dn.persistence.referenceDelegate.addReference(lr,Yr.targetId,Ni)).next(()=>Lr.forEach(Yr.Qi,Ni=>Dn.persistence.referenceDelegate.removeReference(lr,Yr.targetId,Ni)))))}catch(lr){if(!Ea(lr))throw lr;ot("LocalStore","Failed to update sequence numbers: "+lr)}for(const lr of Jt){const Yr=lr.targetId;if(!lr.fromCache){const Ni=Dn.ns.get(Yr),Wi=Ni.withLastLimboFreeSnapshotVersion(Ni.snapshotVersion);Dn.ns=Dn.ns.insert(Yr,Wi)}}}),function Te(ct,Jt){return re.apply(this,arguments)})(u.localStore,p))}),dm.apply(this,arguments)}function Y0(o,e){return pp.apply(this,arguments)}function pp(){return pp=(0,i.c)(function*(o,e){const r=pi(o);if(!r.currentUser.isEqual(e)){ot("SyncEngine","User change. New user:",e.toKey());const u=yield Pg(r.localStore,e);r.currentUser=e,(p=r).Ma.forEach(re=>{re.forEach(Te=>{Te.reject(new Xr(Ar.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}
1),p.Ma.clear(),r.sharedClientState.handleUserChange(e,u.removedBatchIds,u.addedBatchIds),yield Ou(r,u.us)}var p}),pp.apply(this,arguments)}function $v(o,e){const r=pi(o),u=r.Ca.get(e);if(u&&u.pa)return Bi().add(u.key);{let d=Bi();const p=r.Sa.get(e);if(!p)return d;for(const w of p){const re=r.wa.get(w);d=d.unionWith(re.view.Ia)}return d}}function gp(o,e){return Xf.apply(this,arguments)}function Xf(){return Xf=(0,i.c)(function*(o,e){const r=pi(o),u=yield $f(r.localStore,e.query,!0),d=e.view.fa(u);return r.isPrimaryClient&&cm(r,e.targetId,d.Va),d}),Xf.apply(this,arguments)}function sb(o,e){return mp.apply(this,arguments)}function mp(){return mp=(0,i.c)(function*(o,e){const r=pi(o);return Ng(r.localStore,e).then(u=>Ou(r,u))}),mp.apply(this,arguments)}function jv(o,e,r,u){return vp.apply(this,arguments)}function vp(){return vp=(0,i.c)(function*(o,e,r,u){const d=pi(o),p=yield function(re,Te){const ct=pi(re),Jt=pi(ct.mutationQueue);return ct.persistence.runTransaction("Lookup mutation documents","readonly",Dn=>Jt.vn(Dn,Te).next(lr=>lr?ct.localDocuments.getDocuments(Dn,lr):Lr.resolve(null)))}(d.localStore,e);var Te;null!==p?("pending"===r?yield lf(d.remoteStore):"acknowledged"===r||"rejected"===r?(um(d,e,u||null),Yf(d,e),Te=e,pi(pi(d.localStore).mutationQueue).Mn(Te)):qn(),yield Ou(d,p)):ot("SyncEngine","Cannot apply mutation batch with id: "+e)}),vp.apply(this,arguments)}function Qf(){return Qf=(0,i.c)(function*(o,e){const r=pi(o);if(Hc(r),Jf(r),!0===e&&!0!==r.Oa){const u=r.sharedClientState.getAllActiveQueryTargets(),d=yield rc(r,u.toArray());r.Oa=!0,yield cf(r.remoteStore,!0);for(const p of d)rf(r.remoteStore,p)}else if(!1===e&&!1!==r.Oa){const u=[];let d=Promise.resolve();r.Sa.forEach((p,w)=>{r.sharedClientState.isLocalQueryTarget(w)?u.push(w):d=d.then(()=>(gf(r,w),tc(r.localStore,w,!0))),sf(r.remoteStore,w)}),yield d,yield rc(r,u),function(w){const re=pi(w);re.Ca.forEach((Te,ct)=>{sf(re.remoteStore,ct)}),re.va.mr(),re.Ca=new Map,re.Da=new Zs(Vi.comparator)}(r),r.Oa=!1,yield cf(r.remoteStore,!1)}}),Qf.apply(this,arguments)}function rc(o,e,r){return fm.apply(this,arguments)}function fm(){return fm=(0,i.c)(function*(o,e,r){const u=pi(o),d=[],p=[];for(const w of e){let re;
1const Te=u.Sa.get(w);if(Te&&0!==Te.length){re=yield ba(u.localStore,Sn(Te[0]));for(const ct of Te){const Jt=u.wa.get(ct),Dn=yield gp(u,Jt);Dn.snapshot&&p.push(Dn.snapshot)}}else{const ct=yield vv(u.localStore,w);re=yield ba(u.localStore,ct),yield nm(u,Gv(ct),w,!1,re.resumeToken)}d.push(re)}return u.ya.u_(p),d}),fm.apply(this,arguments)}function Gv(o){return gt(o.path,o.collectionGroup,o.orderBy,o.filters,o.limit,"F",o.startAt,o.endAt)}function hm(o){return r=pi(o).localStore,pi(pi(r).persistence).Bi();var r}function X0(o,e,r,u){return Md.apply(this,arguments)}function Md(){return Md=(0,i.c)(function*(o,e,r,u){const d=pi(o);if(d.Oa)return void ot("SyncEngine","Ignoring unexpected query state notification.");const p=d.Sa.get(e);if(p&&p.length>0)switch(r){case"current":case"not-current":{const w=yield Ng(d.localStore,Ri(p[0])),re=Xu.createSynthesizedRemoteEventForCurrentChange(e,"current"===r,$o.EMPTY_BYTE_STRING);yield Ou(d,w,re);break}case"rejected":yield tc(d.localStore,e,!0),gf(d,e,u);break;default:qn()}}),Md.apply(this,arguments)}function Wv(o,e,r){return zc.apply(this,arguments)}function zc(){return zc=(0,i.c)(function*(o,e,r){const u=Hc(o);if(u.Oa){for(const d of e){if(u.Sa.has(d)&&u.sharedClientState.isActiveQueryTarget(d)){ot("SyncEngine","Adding an already active target "+d);continue}const p=yield vv(u.localStore,d),w=yield ba(u.localStore,p);yield nm(u,Gv(p),w.targetId,!1,w.resumeToken),rf(u.remoteStore,w)}for(const d of r)u.Sa.has(d)&&(yield tc(u.localStore,d,!1).then(()=>{sf(u.remoteStore,d),gf(u,d)}).catch(oa))}}),zc.apply(this,arguments)}function Hc(o){const e=pi(o);return e.remoteStore.remoteSyncer.applyRemoteEvent=Vv.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=$v.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=om.bind(null,e),e.ya.u_=Fs.bind(null,e.eventManager),e.ya.La=Lv.bind(null,e.eventManager),e}function Jf(o){const e=pi(o);return e.remoteStore.remoteSyncer.applySuccessfulWrite=W0.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=z0.bind(null,e),e}class xd{constructor(){this.synchronizeTabs=!1}initialize(e){var r=this;return(0,i.c)(function*(){r.serializer=tf(e.databaseInfo.databaseId),r.sharedCl
1ientState=r.createSharedClientState(e),r.persistence=r.createPersistence(e),yield r.persistence.start(),r.localStore=r.createLocalStore(e),r.gcScheduler=r.createGarbageCollectionScheduler(e,r.localStore),r.indexBackfillerScheduler=r.createIndexBackfillerScheduler(e,r.localStore)})()}createGarbageCollectionScheduler(e,r){return null}createIndexBackfillerScheduler(e,r){return null}createLocalStore(e){return mv(this.persistence,new gv,e.initialUser,this.serializer)}createPersistence(e){return new Gh(Tg.Hr,this.serializer)}createSharedClientState(e){return new M0}terminate(){var e=this;return(0,i.c)(function*(){var r,u;null===(r=e.gcScheduler)||void 0===r||r.stop(),null===(u=e.indexBackfillerScheduler)||void 0===u||u.stop(),e.sharedClientState.shutdown(),yield e.persistence.shutdown()})()}}class pm extends xd{constructor(e,r,u){super(),this.ka=e,this.cacheSizeBytes=r,this.forceOwnership=u,this.synchronizeTabs=!1}initialize(e){var r=()=>super.initialize,u=this;return(0,i.c)(function*(){yield r().call(u,e),yield u.ka.initialize(u,e),yield Jf(u.ka.syncEngine),yield lf(u.ka.remoteStore),yield u.persistence.fi(()=>(u.gcScheduler&&!u.gcScheduler.started&&u.gcScheduler.start(),u.indexBackfillerScheduler&&!u.indexBackfillerScheduler.started&&u.indexBackfillerScheduler.start(),Promise.resolve()))})()}createLocalStore(e){return mv(this.persistence,new gv,e.initialUser,this.serializer)}createGarbageCollectionScheduler(e,r){return new E0(this.persistence.referenceDelegate.garbageCollector,e.asyncQueue,r)}createIndexBackfillerScheduler(e,r){const u=new ll(r,this.persistence);return new pu(e.asyncQueue,u)}createPersistence(e){const r=_g(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),u=void 0!==this.cacheSizeBytes?bl.withCacheSize(this.cacheSizeBytes):bl.DEFAULT;return new Wh(this.synchronizeTabs,r,e.clientId,u,e.asyncQueue,_v(),Qh(),this.serializer,this.sharedClientState,!!this.forceOwnership)}createSharedClientState(e){return new M0}}class Hv extends pm{constructor(e,r){super(e,r,!1),this.ka=e,this.cacheSizeBytes=r,this.synchronizeTabs=!0}initialize(e){var r=()=>super.initialize,u=this;return(0,i.c)(function*(){yield r().call(u,e);const d=u.ka.syncEngine;u.sharedClientState instanceof Tv&&(u.sharedClientState.syncEngine={Zs:jv.bind(null,d),Xs:X0.bind(null,d),eo:Wv.bind(null,d),Bi:hm.bind(null,d),Ys:sb.bind(null,d)},yield u.sharedClientState.start()),yield u.persistence.fi(function(){var p=(0,i.c)(function*(w){yield function yp(o,e){return Qf.apply(this,arguments)}(u.ka.syncEngine,w),u.gcScheduler&&(w&&!u.gcScheduler.started?u.gcScheduler.start():w||u.gcScheduler.stop()),u.indexBackfillerScheduler&&(w&&!u.indexBackfillerScheduler.started?u.indexBackfillerScheduler.start():w||u.indexBackfillerScheduler.stop())});return function(w){return p.apply(this,arguments)}}())})()}createSharedClientState(e){const r=_v();if(!Tv.D(r))throw new Xr(Ar.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const u=_g(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new Tv(r,e.asyncQueue,u,e.clientId,e.initialUser)}}class mf{initialize(e,r){var u=this;return(0,i.c)(function*(){u.localStore||(u.localStore=e.localStore,u.sharedClientState=e.sharedClientState,u.datastore=u.createDatastore(r),u.remoteStore=u.createRemoteStore(r),u.eventManager=u.createEventManager(r),u.syncEngine=u.createSyncEngine(r,!e.synchronizeTabs),u.sharedClientState.onlineStateHandler=d=>G0(u.syncEngine,d,1),u.remoteStore.remoteSyncer.handleCredentialChange=Y0.bind(null,u.syncEngine),yield cf(u.remoteStore,u.syncEngine.isPrimaryClient))})()}createEventManager(e){return new U0}createDatastore(e){const r=tf(e.databaseInfo.databaseId),u=new Cv(e.databaseInfo);return new nb(e.authCredentials,e.appCheckCredentials,u,r)}createRemoteStore(e){return u=this.localStore,d=this.datastore,p=e.asyncQueue,w=r=>G0(this.syncEngine,r,0),re=x0.D()?new x0:new tb,new Pv(u,d,p,w,re);var u,d,p,w,re}createSyncEngine(e,r){return function(d,p,w,re,Te,ct,Jt){const Dn=new Fv(d,p,w,re,Te,ct);return Jt&&(Dn.Oa=!0),Dn}(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
1ientState,e.initialUser,e.maxConcurrentLimboResolutions,r)}terminate(){var e=this;return(0,i.c)(function*(){var r,u;yield(u=(0,i.c)(function*(p){const w=pi(p);ot("RemoteStore","RemoteStore shutting down."),w.v_.add(5),yield yc(w),w.M_.shutdown(),w.x_.set("Unknown")}),function d(p){return u.apply(this,arguments)})(e.remoteStore),null===(r=e.datastore)||void 0===r||r.terminate()})()}}function Kv(o,e=10240){let r=0;return{read:()=>(0,i.c)(function*(){if(r<o.byteLength){const u={value:o.slice(r,r+e),done:!1};return r+=e,u}return{done:!0}})(),cancel:()=>(0,i.c)(function*(){})(),releaseLock(){},closed:Promise.resolve()}}class Ep{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.qa(this.observer.next,e)}error(e){this.observer.error?this.qa(this.observer.error,e):Ae("Uncaught Error in snapshot listener:",e.toString())}Qa(){this.muted=!0}qa(e,r){this.muted||setTimeout(()=>{this.muted||e(r)},0)}}class Q0{constructor(e,r){this.Ka=e,this.serializer=r,this.metadata=new Qi,this.buffer=new Uint8Array,this.$a=new TextDecoder("utf-8"),this.Ua().then(u=>{u&&u.ra()?this.metadata.resolve(u.na.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\n ${JSON.stringify(u?.na)}`))},u=>this.metadata.reject(u))}close(){return this.Ka.cancel()}getMetadata(){var e=this;return(0,i.c)(function*(){return e.metadata.promise})()}Ba(){var e=this;return(0,i.c)(function*(){return yield e.getMetadata(),e.Ua()})()}Ua(){var e=this;return(0,i.c)(function*(){const r=yield e.Wa();if(null===r)return null;const u=e.$a.decode(r),d=Number(u);isNaN(d)&&e.Ga(`length string (${u}) is not valid number`);const p=yield e.za(d);return new V0(JSON.parse(p),r.length+d)})()}ja(){return this.buffer.findIndex(e=>123===e)}Wa(){var e=this;return(0,i.c)(function*(){for(;e.ja()<0&&!(yield e.Ha()););if(0===e.buffer.length)return null;const r=e.ja();r<0&&e.Ga("Reached the end of bundle when a length string is expected.");const u=e.buffer.slice(0,r);return e.buffer=e.buffer.slice(r),u})()}za(e){var r=this;return(0,i.c)(function*(){for(;r.buffer.length<e;)(yield r.Ha())&&r.Ga("Reached the end of bundle when more is expected.");const u=r.$a.decode(r.buffer.slice(0,e));return r.buffer=r.buffer.slice(e),u})()}Ga(e){throw this.Ka.cancel(),new Error(`Invalid bundle format: ${e}`)}Ha(){var e=this;return(0,i.c)(function*(){const r=yield e.Ka.read();if(!r.done){const u=new Uint8Array(e.buffer.length+r.value.length);u.set(e.buffer),u.set(r.value,e.buffer.length),e.buffer=u}return r.done})()}}class Yv{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastTransactionError=null,this.writtenDocs=new Set}lookup(e){var r=this;return(0,i.c)(function*(){if(r.ensureCommitNotCalled(),r.mutations.length>0)throw r.lastTransactionError=new Xr(Ar.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes."),r.lastTransactionError;const u=yield(d=(0,i.c)(function*(w,re){const Te=pi(w),ct={documents:re.map(Yr=>pl(Te.serializer,Yr))},Jt=yield Te.vo("BatchGetDocuments",Te.serializer.databaseId,Es.emptyPath(),ct,re.length),Dn=new Map;Jt.forEach(Yr=>{const Ni=function Yt(o,e){return"found"in e?function(u,d){Pr(!!d.found);const p=su(u,d.found.name),w=ua(d.found.updateTime),re=d.found.createTime?ua(d.found.createTime):ts.min(),Te=new Bs({mapValue:{fields:d.found.fields}});return qs.newFoundDocument(p,w,re,Te)}(o,e):"missing"in e?function(u,d){Pr(!!d.missing),Pr(!!d.readTime);const p=su(u,d.missing),w=ua(d.readTime);return qs.newNoDocument(p,w)}(o,e):qn()}(Te.serializer,Yr);Dn.set(Ni.key.toString(),Ni)});const lr=[];return re.forEach(Yr=>{const Ni=Dn.get(Yr.toString());Pr(!!Ni),lr.push(Ni)}),lr}),function p(w,re){return d.apply(this,arguments)})(r.datastore,e);var d;return u.forEach(d=>r.recordVersion(d)),u})()}set(e,r){this.write(r.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,r){try{this.write(r.toMutation(e,this.preconditionForUpdate(e)))}catch(u){this.lastTransactionError=u}this.writtenDocs.add(e.toString())}
1delete(e){this.write(new Dc(e,this.precondition(e))),this.writtenDocs.add(e.toString())}commit(){var e=this;return(0,i.c)(function*(){if(e.ensureCommitNotCalled(),e.lastTransactionError)throw e.lastTransactionError;const r=e.readVersions;var u;e.mutations.forEach(u=>{r.delete(u.key.toString())}),r.forEach((u,d)=>{const p=Vi.fromPath(d);e.mutations.push(new dd(p,e.precondition(p)))}),yield(u=(0,i.c)(function*(p,w){const re=pi(p),Te={writes:w.map(ct=>xr(re.serializer,ct))};yield re.So("Commit",re.serializer.databaseId,Es.emptyPath(),Te)}),function d(p,w){return u.apply(this,arguments)})(e.datastore,e.mutations),e.committed=!0})()}recordVersion(e){let r;if(e.isFoundDocument())r=e.version;else{if(!e.isNoDocument())throw qn();r=ts.min()}const u=this.readVersions.get(e.key.toString());if(u){if(!r.isEqual(u))throw new Xr(Ar.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),r)}precondition(e){const r=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&r?r.isEqual(ts.min())?Fo.exists(!1):Fo.updateTime(r):Fo.none()}preconditionForUpdate(e){const r=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&r){if(r.isEqual(ts.min()))throw new Xr(Ar.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Fo.updateTime(r)}return Fo.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}}class Xv{constructor(e,r,u,d,p){this.asyncQueue=e,this.datastore=r,this.options=u,this.updateFunction=d,this.deferred=p,this.Ja=u.maxAttempts,this.jo=new Uc(this.asyncQueue,"transaction_retry")}Ya(){this.Ja-=1,this.Za()}Za(){var e=this;this.jo.qo((0,i.c)(function*(){const r=new Yv(e.datastore),u=e.Xa(r);u&&u.then(d=>{e.asyncQueue.enqueueAndForget(()=>r.commit().then(()=>{e.deferred.resolve(d)}).catch(p=>{e.eu(p)}))}).catch(d=>{e.eu(d)})}))}Xa(e){try{const r=this.updateFunction(e);return!gu(r)&&r.catch&&r.then?r:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(r){return this.deferred.reject(r),null}}eu(e){this.Ja>0&&this.tu(e)?(this.Ja-=1,this.asyncQueue.enqueueAndForget(()=>(this.Za(),Promise.resolve()))):this.deferred.reject(e)}tu(e){if("FirebaseError"===e.name){const r=e.code;return"aborted"===r||"failed-precondition"===r||"already-exists"===r||!hd(r)}return!1}}class Qv{constructor(e,r,u,d){var p=this;this.authCredentials=e,this.appCheckCredentials=r,this.asyncQueue=u,this.databaseInfo=d,this.user=ho.UNAUTHENTICATED,this.clientId=xa.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(u,function(){var w=(0,i.c)(function*(re){ot("FirestoreClient","Received user=",re.uid),yield p.authCredentialListener(re),p.user=re});return function(re){return w.apply(this,arguments)}}()),this.appCheckCredentials.start(u,w=>(ot("FirestoreClient","Received new app check token=",w),this.appCheckCredentialListener(w,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}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Xr(Ar.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var e=this;this.asyncQueue.enterRestrictedMode();const r=new Qi;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((0,i.c)(function*(){try{e._onlineComponents&&(yield e._onlineComponents.terminate()),e._offlineComponents&&(yield e._offlineComponents.terminate()),e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),r.resolve()}catch(u){const d=Rd(u,"Failed to shutdown persistence");r.reject(d)}})),r.promise}}function qf(o,e){return vf.apply(this,arguments)}function vf(){return vf=(0,i.c)(function*(o,e){o.asyncQueue.verifyOperationInProgress(),ot("FirestoreClient","Initializing OfflineComponentProvider");const r=o.configuration;yield e.initialize(r);let u=r.initialUser;o.setCredentialChangeListener(function(){var d=(0,i.c)(function*(p){u.isEqual(p)||(yield Pg(e.localStore,p),u=p)});return function(p){return d.apply(this,arguments)}}()),e.persistence.setDatabaseDeletedListener(()=>o.terminate()),o._offlineComponents=e}),vf.apply(this,arguments)}function gm(o,e){return Jv.apply(this,arguments)}function Jv(){return Jv=(0,i.c)(function*(o,e){o.asyncQueue.verifyOperationInProgress();const r=yield mm(o);ot("FirestoreClient","Initializing OnlineComponentProvider"),yield e.initialize(r,o.configuration),o.setCredentialChangeListener(u=>rp(e.remoteStore,u)),o.setAppCheckTokenChangeListener((u,d)=>rp(e.remoteStore,d)),o._onlineComponents=e}),Jv.apply(this,arguments)}function Zv(o){return"FirebaseError"===o.name?o.code===Ar.FAILED_PRECONDITION||o.code===Ar.UNIMPLEMENT
1ED:!(typeof DOMException<"u"&&o instanceof DOMException)||22===o.code||20===o.code||11===o.code}function mm(o){return wp.apply(this,arguments)}function wp(){return wp=(0,i.c)(function*(o){if(!o._offlineComponents)if(o._uninitializedComponentsProvider){ot("FirestoreClient","Using user provided OfflineComponentProvider");try{yield qf(o,o._uninitializedComponentsProvider._offline)}catch(e){const r=e;if(!Zv(r))throw r;yt("Error using user provided cache. Falling back to memory cache: "+r),yield qf(o,new xd)}}else ot("FirestoreClient","Using default OfflineComponentProvider"),yield qf(o,new xd);return o._offlineComponents}),wp.apply(this,arguments)}function bp(o){return vm.apply(this,arguments)}function vm(){return vm=(0,i.c)(function*(o){return o._onlineComponents||(o._uninitializedComponentsProvider?(ot("FirestoreClient","Using user provided OnlineComponentProvider"),yield gm(o,o._uninitializedComponentsProvider._online)):(ot("FirestoreClient","Using default OnlineComponentProvider"),yield gm(o,new mf))),o._onlineComponents}),vm.apply(this,arguments)}function ym(o){return mm(o).then(e=>e.persistence)}function Kc(o){return mm(o).then(e=>e.localStore)}function Em(o){return bp(o).then(e=>e.remoteStore)}function Od(o){return bp(o).then(e=>e.syncEngine)}function ic(o){return wm.apply(this,arguments)}function wm(){return wm=(0,i.c)(function*(o){const e=yield bp(o),r=e.eventManager;return r.onListen=Jg.bind(null,e.syncEngine),r.onUnlisten=$0.bind(null,e.syncEngine),r.onFirstRemoteStoreListen=B0.bind(null,e.syncEngine),r.onLastRemoteStoreUnlisten=Uv.bind(null,e.syncEngine),r}),wm.apply(this,arguments)}function Sp(o,e,r={}){const u=new Qi;return o.asyncQueue.enqueueAndForget((0,i.c)(function*(){return function(p,w,re,Te,ct){const Jt=new Ep({next:lr=>{w.enqueueAndForget(()=>sp(p,Dn));const Yr=lr.docs.has(re);!Yr&&lr.fromCache?ct.reject(new Xr(Ar.UNAVAILABLE,"Failed to get document because the client is offline.")):Yr&&lr.fromCache&&Te&&"server"===Te.source?ct.reject(new Xr(Ar.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):ct.resolve(lr)},error:lr=>ct.reject(lr)}),Dn=new lp(vt(re.path),Jt,{includeMetadataChanges:!0,ta:!0});return zg(p,Dn)}(yield ic(o),o.asyncQueue,e,r,u)})),u.promise}function eE(o,e,r={}){const u=new Qi;return o.asyncQueue.enqueueAndForget((0,i.c)(function*(){return function(p,w,re,Te,ct){const Jt=new Ep({next:lr=>{w.enqueueAndForget(()=>sp(p,Dn)),lr.fromCache&&"server"===Te.source?ct.reject(new Xr(Ar.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.)')):ct.resolve(lr)},error:lr=>ct.reject(lr)}),Dn=new lp(re,Jt,{includeMetadataChanges:!0,ta:!0});return zg(p,Dn)}(yield ic(o),o.asyncQueue,e,r,u)})),u.promise}function qv(o){const e={};return void 0!==o.timeoutSeconds&&(e.timeoutSeconds=o.timeoutSeconds),e}const ey=new Map;function bm(o,e,r){if(!r)throw new Xr(Ar.INVALID_ARGUMENT,`Function ${o}() cannot be called with an empty ${e}.`)}function Tp(o,e,r,u){if(!0===e&&!0===u)throw new Xr(Ar.INVALID_ARGUMENT,`${o} and ${r} cannot be used together.`)}function Ef(o){if(!Vi.isDocumentKey(o))throw new Xr(Ar.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${o} has ${o.length}.`)}function Cp(o){if(Vi.isDocumentKey(o))throw new Xr(Ar.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${o} has ${o.length}.`)}function Nd(o){if(void 0===o)return"undefined";if(null===o)return"null";if("string"==typeof o)return o.length>20&&(o=`${o.substring(0,20)}...`),JSON.stringify(o);if("number"==typeof o||"boolean"==typeof o)return""+o;if("object"==typeof o){if(o instanceof Array)return"an array";{const e=(u=o).constructor?u.constructor.name:null;return e?`a custom ${e} object`:"an object"}}var u;return"function"==typeof o?"a function":qn()}function to(o,e){if("_delegate"in o&&(o=o._delegate),!(o instanceof e)){if(e.name===o.constructor.name)throw new Xr(Ar.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const r=Nd(o);throw new Xr(Ar.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${r}`)}}return o}function wf(o,e){if(e<=0)throw new Xr(Ar.INVALID_ARGUMENT,`Function ${o}() requires a positive number, but it was: ${e}.`)}class Im{constructor(e){var r,u;if(void 0===e.host){if(void 0!==e.ssl)throw new Xr(Ar.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===(r=e.ssl)||void 0===r||r;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 Xr(Ar.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}Tp("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==e.experimentalAutoDetectLongPolling&&!e.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=qv(null!==(u=e.experimentalLongPollingOptions)&&void 0!==u?u:{}),function(p){if(void 0!==p.timeoutSeconds){if(isNaN(p.timeoutSeconds))throw new Xr(Ar.INVALID_ARGUMENT,`invalid long polling timeout: ${p.timeoutSeconds} (must not be NaN)`);if(p.timeoutSeconds<5)throw new Xr(Ar.INVALID_ARGUMENT,`invalid long polling timeout: ${p.timeoutSeconds} (minimum allowed value is 5)`);if(p.timeoutSeconds>30)throw new Xr(Ar.INVALID_ARGUMENT,`invalid long polling timeout: ${p.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===e.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class eh{constructor(e,r,u,d){this._authCredentials=e,this._appCheckCredentials=r,this._databaseId=u,this._app=d,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Im({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Xr(Ar.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new Xr(Ar.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 Im(e),void 0!==e.credentials&&(this._authCredentials=function(u){if(!u)return new Qs;switch(u.type){case"firstParty":return new ya(u.sessionIndex||"0",u.iamToken||null,u.authTokenFactory||null);case"provider":return u.client;default:throw new Xr(Ar.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
1d credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(r){const u=ey.get(r);u&&(ot("ComponentProvider","Removing Datastore"),ey.delete(r),u.terminate())}(this),Promise.resolve()}}function bf(o,e,r,u={}){var d;const p=(o=to(o,eh))._getSettings(),w=`${e}:${r}`;if("firestore.googleapis.com"!==p.host&&p.host!==w&&yt("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),o._setSettings(Object.assign(Object.assign({},p),{host:w,ssl:!1})),u.mockUserToken){let re,Te;if("string"==typeof u.mockUserToken)re=u.mockUserToken,Te=ho.MOCK_USER;else{re=(0,C.YD)(u.mockUserToken,null===(d=o._app)||void 0===d?void 0:d.options.projectId);const ct=u.mockUserToken.sub||u.mockUserToken.user_id;if(!ct)throw new Xr(Ar.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");Te=new ho(ct)}o._authCredentials=new uo(new no(re,Te))}}class za{constructor(e,r,u){this.converter=r,this._query=u,this.type="query",this.firestore=e}withConverter(e){return new za(this.firestore,e,this._query)}}class ma{constructor(e,r,u){this.converter=r,this._key=u,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 Nu(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new ma(this.firestore,e,this._key)}}class Nu extends za{constructor(e,r,u){super(e,r,vt(u)),this._path=u,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new ma(this.firestore,null,new Vi(e))}withConverter(e){return new Nu(this.firestore,e,this._path)}}function _p(o,e,...r){if(o=(0,C.Yj)(o),bm("collection","path",e),o instanceof eh){const u=Es.fromString(e,...r);return Cp(u),new Nu(o,null,u)}{if(!(o instanceof ma||o instanceof Nu))throw new Xr(Ar.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
1const u=o._path.child(Es.fromString(e,...r));return Cp(u),new Nu(o.firestore,null,u)}}function iE(o,e){if(o=to(o,eh),bm("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new Xr(Ar.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new za(o,null,(u=e,new mt(Es.emptyPath(),u)));var u}function ty(o,e,...r){if(o=(0,C.Yj)(o),1===arguments.length&&(e=xa.newId()),bm("doc","path",e),o instanceof eh){const u=Es.fromString(e,...r);return Ef(u),new ma(o,null,new Vi(u))}{if(!(o instanceof ma||o instanceof Nu))throw new Xr(Ar.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const u=o._path.child(Es.fromString(e,...r));return Ef(u),new ma(o.firestore,o instanceof Nu?o.converter:null,new Vi(u))}}function sE(o,e){return o=(0,C.Yj)(o),e=(0,C.Yj)(e),(o instanceof ma||o instanceof Nu)&&(e instanceof ma||e instanceof Nu)&&o.firestore===e.firestore&&o.path===e.path&&o.converter===e.converter}function Sm(o,e){return o=(0,C.Yj)(o),e=(0,C.Yj)(e),o instanceof za&&e instanceof za&&o.firestore===e.firestore&&Rn(o._query,e._query)&&o.converter===e.converter}class oE{constructor(){this.nu=Promise.resolve(),this.ru=[],this.iu=!1,this.su=[],this.ou=null,this._u=!1,this.au=!1,this.uu=[],this.jo=new Uc(this,"async_queue_retry"),this.cu=()=>{const r=Qh();r&&ot("AsyncQueue","Visibility state changed to "+r.visibilityState),this.jo.Ko()};const e=Qh();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.cu)}get isShuttingDown(){return this.iu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.lu(),this.hu(e)}enterRestrictedMode(e){if(!this.iu){this.iu=!0,this.au=e||!1;const r=Qh();r&&"function"==typeof r.removeEventListener&&r.removeEventListener("visibilitychange",this.cu)}}enqueue(e){if(this.lu(),this.iu)return new Promise(()=>{});const r=new Qi;return this.hu(()=>this.iu&&this.au?Promise.resolve():(e().then(r.resolve,r.reject),r.promise)).then(()=>r.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.ru.push(e),this.Pu()))}Pu(){var e=this;return(0,i.c)(function*(){if(0!==e.ru.length){try{yield e.ru[0](),e.ru.shift(),e.jo.reset()}catch(r){if(!Ea(r))throw r;ot("AsyncQueue","Operation failed with retryable error: "+r)}e.ru.length>0&&e.jo.qo(()=>e.Pu())}})()}hu(e){const r=this.nu.then(()=>(this._u=!0,e().catch(u=>{throw this.ou=u,this._u=!1,Ae("INTERNAL UNHANDLED ERROR: ",function(w){let re=w.message||"";return w.stack&&(re=w.stack.includes(w.message)?w.stack:w.message+"\n"+w.stack),re}(u)),u}).then(u=>(this._u=!1,u))));return this.nu=r,r}enqueueAfterDelay(e,r,u){this.lu(),this.uu.indexOf(e)>-1&&(r=0);const d=df.createAndSchedule(this,e,r,u,p=>this.Iu(p));return this.su.push(d),d}lu(){this.ou&&qn()}verifyOperationInProgress(){}Tu(){var e=this;return(0,i.c)(function*(){let r;do{r=e.nu,yield r}while(r!==e.nu)})()}Eu(e){for(const r of this.su)if(r.timerId===e)return!0;return!1}du(e){return this.Tu().then(()=>{this.su.sort((r,u)=>r.targetTimeMs-u.targetTimeMs);for(const r of this.su)if(r.skipDelay(),"all"!==e&&r.timerId===e)break;return this.Tu()})}Au(e){this.uu.push(e)}Iu(e){const r=this.su.indexOf(e);this.su.splice(r,1)}}function th(o){return function(r,u){if("object"!=typeof r||null===r)return!1;const d=r;for(const p of["next","error","complete"])if(p in d&&"function"==typeof d[p])return!0;return!1}(o)}class nh{constructor(){this._progressObserver={},this._taskCompletionResolver=new Qi,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,r,u){this._progressObserver={next:e,error:r,complete:u}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,r){return this._taskCompletionResolver.promise.then(e,r)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}const Ap=-1;class Oo extends eh{constructor(e,r,u,d){super(e,r,u,d),this.type="firestore",this._queue=new oE,this._persistenceKey=d?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||Dp(this),this._firestoreClient.terminate()}}function va(o){return o._firestoreClient||Dp(o),o._firestoreClient.verifyNotTerminated(),o._firestoreClient}function Dp(o){var e,r,u;const d=o._freezeSettings(),p=(Te=(null===(e=o._app)||void 0===e?void 0:e.options.appId)||"",new Wu(o._databaseId,Te,o._persistenceKey,(Jt=d).host,Jt.ssl,Jt.experimentalForceLongPolling,Jt.experimentalAutoDetectLongPolling,qv(Jt.experimentalLongPollingOptions),Jt.useFetchStreams));var Te,Jt;o._firestoreClient=new Qv(o._authCredentials,o._appCheckCredentials,o._queue,p),null!==(r=d.localCache)&&void 0!==r&&r._offlineComponentProvider&&null!==(u=d.localCache)&&void 0!==u&&u._onlineComponentProvider&&(o._firestoreClient._uninitializedComponentsProvider={_offlineKind:d.localCache.kind,_offline:d.localCache._offlineComponentProvider,_online:d.localCache._onlineComponentProvider})}function aE(o,e){Cm(o=to(o,Oo));const r=va(o);if(r._uninitializedComponentsProvider)throw new Xr(Ar.FAILED_PRECONDITION,"SDK cache is already specified.");
1yt("enableIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");const u=o._freezeSettings(),d=new mf;return ry(r,d,new pm(d,u.cacheSizeBytes,e?.forceOwnership))}function ny(o){Cm(o=to(o,Oo));const e=va(o);if(e._uninitializedComponentsProvider)throw new Xr(Ar.FAILED_PRECONDITION,"SDK cache is already specified.");yt("enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");const r=o._freezeSettings(),u=new mf;return ry(e,u,new Hv(u,r.cacheSizeBytes))}function ry(o,e,r){const u=new Qi;return o.asyncQueue.enqueue((0,i.c)(function*(){try{yield qf(o,r),yield gm(o,e),u.resolve()}catch(d){const p=d;if(!Zv(p))throw p;yt("Error enabling indexeddb cache. Falling back to memory cache: "+p),u.reject(p)}})).then(()=>u.promise)}function lE(o){if(o._initialized&&!o._terminated)throw new Xr(Ar.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const e=new Qi;return o._queue.enqueueAndForgetEvenWhileRestricted((0,i.c)(function*(){try{yield(r=(0,i.c)(function*(d){if(!ha.D())return Promise.resolve();const p=d+"main";yield ha.delete(p)}),function u(d){return r.apply(this,arguments)})(_g(o._databaseId,o._persistenceKey)),e.resolve()}catch(r){e.reject(r)}var r})),e.promise}function iy(o){return function(r){const u=new Qi;return r.asyncQueue.enqueueAndForget((0,i.c)(function*(){return function H0(o,e){return lm.apply(this,arguments)}(yield Od(r),u)})),u.promise}(va(o=to(o,Oo)))}function uE(o){return function J0(o){return o.asyncQueue.enqueue((0,i.c)(function*(){const e=yield ym(o),r=yield Em(o);return e.setNetworkEnabled(!0),function(d){const p=pi(d);return p.v_.delete(0),nf(p)}(r)}))}(va(o=to(o,Oo)))}function cE(o){return function Z0(o){return o.asyncQueue.enqueue((0,i.c)(function*(){const e=yield ym(o),r=yield Em(o);return e.setNetworkEnabled(!1),(u=(0,i.c)(function*(p){const w=pi(p);w.v_.add(0),yield yc(w),w.x_.set("Offline")}),function d(p){return u.apply(this,arguments)})(r);var u}))}(va(o=to(o,Oo)))}function Tm(o,e){const r=va(o=to(o,Oo)),u=new nh;return function tE(o,e,r,u){const d=function(w,re){let Te;return Te="string"==typeof w?Ah().encode(w):w,Jt=function(Jt,Dn){if(Jt instanceof Uint8Array)return Kv(Jt,void 0);if(Jt instanceof ArrayBuffer)return Kv(new Uint8Array(Jt),void 0);if(Jt instanceof ReadableStream)return Jt.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}(Te),new Q0(Jt,re);var Jt}(r,tf(e));o.asyncQueue.enqueueAndForget((0,i.c)(function*(){!function Zf(o,e,r){const u=pi(o);var d;(d=(0,i.c)(function*(w,re,Te){try{const ct=yield re.getMetadata();if(yield function(Ni,Ki){const Wi=pi(Ni),ds=ua(Ki.createTime);return Wi.persistence.runTransaction("hasNewerBundle","readonly",js=>Wi.$r.getBundleMetadata(js,Ki.id)).then(js=>!!js&&js.createTime.compareTo(ds)>=0)}(w.localStore,ct))return yield re.close(),Te._completeWith({taskState:"Success",documentsLoaded:(Ni=ct).totalDocuments,bytesLoaded:Ni.totalBytes,totalDocuments:Ni.totalDocuments,totalBytes:Ni.totalBytes}),Promise.resolve(new Set);Te._updateProgress(up(ct));const Jt=new hf(ct,w.localStore,re.serializer);let Dn=yield re.Ba();for(;Dn;){const Yr=yield Jt.sa(Dn);Yr&&Te._updateProgress(Yr),Dn=yield re.Ba()}const lr=yield Jt.complete();return yield Ou(w,lr.aa,void 0),yield function(Ni,Ki){const Wi=pi(Ni);return Wi.persistence.runTransaction("Save bundle","readwrite",ds=>Wi.$r.saveBundleMetadata(ds,Ki))}(w.localStore,ct),Te._completeWith(lr.progress),Promise.resolve(lr._a)}catch(ct){return yt("SyncEngine",`Loading bundle failed with ${ct}`),Te._failWith(ct),Promise.resolve(new Set)}var Ni}),function p(w,re,Te){return d.apply(this,arguments)})(u,e,r).then(d=>{u.sharedClientState.notifyBundleLoaded(d)})}(yield Od(o),d,u)}))}(r,o._databaseId,e,u),u}function dE(o,e){return function nE(o,e){return o.asyncQueue.enqueue((0,i.c)(function*(){return function(u,d){const p=pi(u);return p.persistence.runTransaction("Get named query","readonly",w=>
1p.$r.getNamedQuery(w,d))}(yield Kc(o),e)}))}(va(o=to(o,Oo)),e).then(r=>r?new za(o,null,r.query):null)}function Cm(o){if(o._initialized||o._terminated)throw new Xr(Ar.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}class kd{constructor(e){this._byteString=e}static fromBase64String(e){try{return new kd($o.fromBase64String(e))}catch(r){throw new Xr(Ar.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+r)}}static fromUint8Array(e){return new kd($o.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 Yc{constructor(...e){for(let r=0;r<e.length;++r)if(0===e[r].length)throw new Xr(Ar.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new zs(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class Xc{constructor(e){this._methodName=e}}class Rp{constructor(e,r){if(!isFinite(e)||e<-90||e>90)throw new Xr(Ar.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(r)||r<-180||r>180)throw new Xr(Ar.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+r);this._lat=e,this._long=r}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 vs(this._lat,e._lat)||vs(this._long,e._long)}}const fE=/^__.*__$/;class hE{constructor(e,r,u){this.data=e,this.fieldMask=r,this.fieldTransforms=u}toMutation(e,r){return null!==this.fieldMask?new _u(e,this.data,this.fieldMask,r,this.fieldTransforms):new Ac(e,this.data,r,this.fieldTransforms)}}class Mp{constructor(e,r,u){this.data=e,this.fieldMask=r,this.fieldTransforms=u}toMutation(e,r){return new _u(e,this.data,this.fieldMask,r,this.fieldTransforms)}}function sh(o){switch(o){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw qn()}}class xp{constructor(e,r,u,d,p,w){this.settings=e,this.databaseId=r,this.serializer=u,this.ignoreUndefinedProperties=d,void 0===p&&this.Ru(),this.fieldTransforms=p||[],this.fieldMask=w||[]}get path(){return this.settings.path}get Vu(){return this.settings.Vu}mu(e){return new xp(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}fu(e){var r;const u=null===(r=this.path)||void 0===r?void 0:r.child(e),d=this.mu({path:u,gu:!1});return d.pu(e),d}yu(e){var r;const u=null===(r=this.path)||void 0===r?void 0:r.child(e),d=this.mu({path:u,gu:!1});return d.Ru(),d}wu(e){return this.mu({path:void 0,gu:!0})}Su(e){return uh(e,this.settings.methodName,this.settings.bu||!1,this.path,this.settings.Du)}contains(e){return void 0!==this.fieldMask.find(r=>e.isPrefixOf(r))||void 0!==this.fieldTransforms.find(r=>e.isPrefixOf(r.field))}Ru(){if(this.path)for(let e=0;e<this.path.length;e++)this.pu(this.path.get(e))}pu(e){if(0===e.length)throw this.Su("Document fields must not be empty");if(sh(this.Vu)&&fE.test(e))throw this.Su('Document fields cannot begin and end with "__"')}}class pE{constructor(e,r,u){this.databaseId=e,this.ignoreUndefinedProperties=r,this.serializer=u||tf(e)}Cu(e,r,u,d=!1){return new xp({Vu:e,methodName:r,Du:u,path:zs.emptyPath(),gu:!1,bu:d},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function If(o){const e=o._freezeSettings(),r=tf(o._databaseId);return new pE(o._databaseId,!!e.ignoreUndefinedProperties,r)}function oh(o,e,r,u,d,p={}){const w=o.Cu(p.merge||p.mergeFields?2:0,e,r,d);Op("Data must be an object, but it was:",w,u);const re=Rm(u,w);let Te,ct;if(p.merge)Te=new Oa(w.fieldMask),ct=w.fieldTransforms;else if(p.mergeFields){const Jt=[];for(const Dn of p.mergeFields){const lr=lh(e,Dn,r);if(!w.contains(lr))throw new Xr(Ar.INVALID_ARGUMENT,`Field '${lr}' is specified in your field mask but missing from your input data.`);Np(Jt,lr)||Jt.push(lr)}Te=new Oa(Jt),ct=w.fieldTransforms.filter(Dn=>Te.covers(Dn.field))}else Te=null,ct=w.fieldTransforms;return new hE(new Bs(re),Te,ct)}class kl extends Xc{_toFieldTransform(e){if(2!==e.Vu)throw e.Su(1===e.Vu?`${this._methodName}() can only appear at the top level of your update data`:`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof kl}}function _m(o,e,r){return new xp({Vu:3,Du:e.settings.Du,methodName:o._methodName,gu:r},e.databaseId,e.serializer,e.ignoreUndefinedProperties)}class Am extends Xc{_toFieldTransform(e){return new hl(e.path,new Qa)}isEqual(e){return e instanceof Am}}class oy extends Xc{constructor(e,r){super(e),this.vu=r}_toFieldTransform(e){const r=_m(this,e,!0),u=this.vu.map(p=>Ec(p,r)),d=new Xl(u);return new hl(e.path,d)}isEqual(e){return e instanceof oy&&(0,C.IN)(this.vu,e.vu)}}class ca extends Xc{constructor(e,r){super(e),this.vu=r}_toFieldTransform(e){const r=_m(this,e,!0),u=this.vu.map(p=>Ec(p,r)),d=new Ml(u);return new hl(e.path,d)}isEqual(e){return e instanceof ca&&(0,C.IN)(this.vu,e.vu)}}class Dm extends Xc{constructor(e,r){super(e),this.Fu=r}_toFieldTransform(e){const r=new ru(e.serializer,Pl(e.serializer,this.Fu));return new hl(e.path,r)}isEqual(e){return e instanceof Dm&&this.Fu===e.Fu}}
1function ah(o,e,r,u){const d=o.Cu(1,e,r);Op("Data must be an object, but it was:",d,u);const p=[],w=Bs.empty();yl(u,(Te,ct)=>{const Jt=sc(e,Te,r);ct=(0,C.Yj)(ct);const Dn=d.yu(Jt);if(ct instanceof kl)p.push(Jt);else{const lr=Ec(ct,Dn);null!=lr&&(p.push(Jt),w.set(Jt,lr))}});const re=new Oa(p);return new Mp(w,re,d.fieldTransforms)}function Pm(o,e,r,u,d,p){const w=o.Cu(1,e,r),re=[lh(e,u,r)],Te=[d];if(p.length%2!=0)throw new Xr(Ar.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let lr=0;lr<p.length;lr+=2)re.push(lh(e,p[lr])),Te.push(p[lr+1]);const ct=[],Jt=Bs.empty();for(let lr=re.length-1;lr>=0;--lr)if(!Np(ct,re[lr])){const Yr=re[lr];let Ni=Te[lr];Ni=(0,C.Yj)(Ni);const Ki=w.yu(Yr);if(Ni instanceof kl)ct.push(Yr);else{const Wi=Ec(Ni,Ki);null!=Wi&&(ct.push(Yr),Jt.set(Yr,Wi))}}const Dn=new Oa(ct);return new Mp(Jt,Dn,w.fieldTransforms)}function ay(o,e,r,u=!1){return Ec(r,o.Cu(u?4:3,e))}function Ec(o,e){if(Mm(o=(0,C.Yj)(o)))return Op("Unsupported field value:",e,o),Rm(o,e);if(o instanceof Xc)return function(u,d){if(!sh(d.Vu))throw d.Su(`${u._methodName}() can only be used with update() and set()`);if(!d.path)throw d.Su(`${u._methodName}() is not currently supported inside arrays`);const p=u._toFieldTransform(d);p&&d.fieldTransforms.push(p)}(o,e),null;if(void 0===o&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),o instanceof Array){if(e.settings.gu&&4!==e.Vu)throw e.Su("Nested arrays are not supported");return function(u,d){const p=[];let w=0;for(const re of u){let Te=Ec(re,d.wu(w));null==Te&&(Te={nullValue:"NULL_VALUE"}),p.push(Te),w++}return{arrayValue:{values:p}}}(o,e)}return function(u,d){if(null===(u=(0,C.Yj)(u)))return{nullValue:"NULL_VALUE"};if("number"==typeof u)return Pl(d.serializer,u);if("boolean"==typeof u)return{booleanValue:u};if("string"==typeof u)return{stringValue:u};if(u instanceof Date){const p=io.fromDate(u);return{timestampValue:Pa(d.serializer,p)}}if(u instanceof io){const p=new io(u.seconds,1e3*Math.floor(u.nanoseconds/1e3));return{timestampValue:Pa(d.serializer,p)}}if(u instanceof Rp)return{geoPointValue:{latitude:u.latitude,longitude:u.longitude}};if(u instanceof kd)return{bytesValue:Qu(d.serializer,u._byteString)};if(u instanceof ma){const p=d.databaseId,w=u.firestore._databaseId;if(!w.isEqual(p))throw d.Su(`Document reference is for database ${w.projectId}/${w.database} but should be for database ${p.projectId}/${p.database}`);return{referenceValue:zd(u.firestore._databaseId||d.databaseId,u._key.path)}}throw d.Su(`Unsupported field value: ${Nd(u)}`)}(o,e)}function Rm(o,e){const r={};return id(o)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):yl(o,(u,d)=>{const p=Ec(d,e.fu(u));null!=p&&(r[u]=p)}),{mapValue:{fields:r}}}function Mm(o){return!("object"!=typeof o||null===o||o instanceof Array||o instanceof Date||o instanceof io||o instanceof Rp||o instanceof kd||o instanceof ma||o instanceof Xc)}function Op(o,e,r){if(!Mm(r)||"object"!=typeof(d=r)||null===d||Object.getPrototypeOf(d)!==Object.prototype&&null!==Object.getPrototypeOf(d)){const u=Nd(r);throw e.Su("an object"===u?o+" a custom object":o+" "+u)}var d}function lh(o,e,r){if((e=(0,C.Yj)(e))instanceof Yc)return e._internalPath;if("string"==typeof e)return sc(o,e);throw uh("Field path arguments must be of type string or ",o,!1,void 0,r)}const gE=new RegExp("[~\\*/\\[\\]]");function sc(o,e,r){if(e.search(gE)>=0)throw uh(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,o,!1,void 0,r);try{return new Yc(...e.split("."))._internalPath}catch{throw uh(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,o,!1,void 0,r)}}function uh(o,e,r,u,d){const p=u&&!u.isEmpty(),w=void 0!==d;let re=`Function ${e}() called with invalid data`;r&&(re+=" (via `toFirestore()`)"),re+=". ";let Te="";return(p||w)&&(Te+=" (found",p&&(Te+=` in field ${u}`),w&&(Te+=` in document ${d}
1`),Te+=")"),new Xr(Ar.INVALID_ARGUMENT,re+o+Te)}function Np(o,e){return o.some(r=>r.isEqual(e))}class ch{constructor(e,r,u,d,p){this._firestore=e,this._userDataWriter=r,this._key=u,this._document=d,this._converter=p}get id(){return this._key.path.lastSegment()}get ref(){return new ma(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new ly(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const r=this._document.data.field(dh("DocumentSnapshot.get",e));if(null!==r)return this._userDataWriter.convertValue(r)}}}class ly extends ch{data(){return super.data()}}function dh(o,e){return"string"==typeof e?sc(o,e):e instanceof Yc?e._internalPath:e._delegate._internalPath}function xm(o){if("L"===o.limitType&&0===o.explicitOrderBy.length)throw new Xr(Ar.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Ld{}class Fd extends Ld{}function Qc(o,e,...r){let u=[];e instanceof Ld&&u.push(e),u=u.concat(r),function(p){const w=p.filter(Te=>Te instanceof oc).length,re=p.filter(Te=>Te instanceof Jc).length;if(w>1||w>0&&re>0)throw new Xr(Ar.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(...)))`.")}(u);for(const d of u)o=d._apply(o);return o}class Jc extends Fd{constructor(e,r,u){super(),this._field=e,this._op=r,this._value=u,this.type="where"}static _create(e,r,u){return new Jc(e,r,u)}_apply(e){const r=this._parse(e);return my(e._query,r),new za(e.firestore,e.converter,tn(e._query,r))}_parse(e){const r=If(e.firestore);return function(p,w,re,Te,ct,Jt,Dn){let lr;if(ct.isKeyField()){if("array-contains"===Jt||"array-contains-any"===Jt)throw new Xr(Ar.INVALID_ARGUMENT,`Invalid Query. You can't perform '${Jt}' queries on documentId().`);if("in"===Jt||"not-in"===Jt){gy(Dn,Jt);const Yr=[];for(const Ni of Dn)Yr.push(py(Te,p,Ni));lr={arrayValue:{values:Yr}}}else lr=py(Te,p,Dn)}else"in"!==Jt&&"not-in"!==Jt&&"array-contains-any"!==Jt||gy(Dn,Jt),lr=ay(re,"where",Dn,"in"===Jt||"not-in"===Jt);return qi.create(ct,Jt,lr)}(e._query,0,r,e.firestore._databaseId,this._field,this._op,this._value)}}function uy(o,e,r){const u=e,d=dh("where",o);return Jc._create(d,u,r)}class oc extends Ld{constructor(e,r){super(),this.type=e,this._queryConstraints=r}static _create(e,r){return new oc(e,r)}_parse(e){const r=this._queryConstraints.map(u=>u._parse(e)).filter(u=>u.getFilters().length>0);return 1===r.length?r[0]:ps.create(r,this._getOperator())}_apply(e){const r=this._parse(e);return 0===r.getFilters().length?e:(function(d,p){let w=d;const re=p.getFlattenedFilters();for(const Te of re)my(w,Te),w=tn(w,Te)}(e._query,r),new za(e.firestore,e.converter,tn(e._query,r)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class fh extends Fd{constructor(e,r){super(),this._field=e,this._direction=r,this.type="orderBy"}static _create(e,r){return new fh(e,r)}_apply(e){const r=function(d,p,w){if(null!==d.startAt)throw new Xr(Ar.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==d.endAt)throw new Xr(Ar.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new ws(p,w)}(e._query,this._field,this._direction);return new za(e.firestore,e.converter,function(d,p){const w=d.explicitOrderBy.concat([p]);return new mt(d.path,d.collectionGroup,w,d.filters.slice(),d.limit,d.limitType,d.startAt,d.endAt)}(e._query,r))}}function cy(o,e="asc"){const r=e,u=dh("orderBy",o);return fh._create(u,r)}class ku extends Fd{constructor(e,r,u){super(),this.type=e,this._limit=r,this._limitType=u}static _create(e,r,u){return new ku(e,r,u)}_apply(e){return new za(e.firestore,e.converter,kn(e._query,this._limit,this._limitType))}}
1function hh(o){return wf("limit",o),ku._create("limit",o,"F")}function fb(o){return wf("limitToLast",o),ku._create("limitToLast",o,"L")}class Ud extends Fd{constructor(e,r,u){super(),this.type=e,this._docOrFields=r,this._inclusive=u}static _create(e,r,u){return new Ud(e,r,u)}_apply(e){const r=hy(e,this.type,this._docOrFields,this._inclusive);return new za(e.firestore,e.converter,(p=r,new mt((d=e._query).path,d.collectionGroup,d.explicitOrderBy.slice(),d.filters.slice(),d.limit,d.limitType,p,d.endAt)));var d,p}}function dy(...o){return Ud._create("startAt",o,!0)}function fy(...o){return Ud._create("startAfter",o,!1)}class kp extends Fd{constructor(e,r,u){super(),this.type=e,this._docOrFields=r,this._inclusive=u}static _create(e,r,u){return new kp(e,r,u)}_apply(e){const r=hy(e,this.type,this._docOrFields,this._inclusive);return new za(e.firestore,e.converter,(p=r,new mt((d=e._query).path,d.collectionGroup,d.explicitOrderBy.slice(),d.filters.slice(),d.limit,d.limitType,d.startAt,p)));var d,p}}function mE(...o){return kp._create("endBefore",o,!1)}function ph(...o){return kp._create("endAt",o,!0)}function hy(o,e,r,u){if(r[0]=(0,C.Yj)(r[0]),r[0]instanceof ch)return function(p,w,re,Te,ct){if(!Te)throw new Xr(Ar.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${re}().`);const Jt=[];for(const Dn of fn(p))if(Dn.field.isKeyField())Jt.push(nn(w,Te.key));else{const lr=Te.data.field(Dn.field);if(tu(lr))throw new Xr(Ar.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+Dn.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===lr){const Yr=Dn.field.canonicalString();throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${Yr}' (used as the orderBy) does not exist.`)}Jt.push(lr)}return new Ho(Jt,ct)}(o._query,o.firestore._databaseId,e,r[0]._document,u);{const d=If(o.firestore);return function(w,re,Te,ct,Jt,Dn){const lr=w.explicitOrderBy;if(Jt.length>lr.length)throw new Xr(Ar.INVALID_ARGUMENT,`Too many arguments provided to ${ct}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const Yr=[];for(let Ni=0;Ni<Jt.length;Ni++){const Ki=Jt[Ni];if(lr[Ni].field.isKeyField()){if("string"!=typeof Ki)throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${ct}(), but got a ${typeof Ki}`);if(!un(w)&&-1!==Ki.indexOf("/"))throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${ct}() must be a plain document ID, but '${Ki}' contains a slash.`);const Wi=w.path.child(Es.fromString(Ki));if(!Vi.isDocumentKey(Wi))throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${ct}() must result in a valid document path, but '${Wi}' is not because it contains an odd number of segments.`);const ds=new Vi(Wi);Yr.push(nn(re,ds))}else{const Wi=ay(Te,ct,Ki);Yr.push(Wi)}}return new Ho(Yr,Dn)}(o._query,o.firestore._databaseId,d,e,r,u)}}function py(o,e,r){if("string"==typeof(r=(0,C.Yj)(r))){if(""===r)throw new Xr(Ar.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!un(e)&&-1!==r.indexOf("/"))throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${r}' contains a '/' character.`);const u=e.path.child(Es.fromString(r));if(!Vi.isDocumentKey(u))throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${u}' is not because it has an odd number of segments (${u.length}).`);return nn(o,new Vi(u))}if(r instanceof ma)return nn(o,r._key);throw new Xr(Ar.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Nd(r)}.`)}function gy(o,e){if(!Array.isArray(o)||0===o.length)throw new Xr(Ar.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function my(o,e){const r=function(d,p){for(const w of d)for(const re of w.getFlattenedFilters())if(p.indexOf(re.o
1p)>=0)return re.op;return null}(o.filters,function(d){switch(d){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[]}}(e.op));if(null!==r)throw new Xr(Ar.INVALID_ARGUMENT,r===e.op?`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`:`Invalid query. You cannot use '${e.op.toString()}' filters with '${r.toString()}' filters.`)}class Om{convertValue(e,r="none"){switch(dl(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Ro(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,r);case 5:return e.stringValue;case 6:return this.convertBytes(Hs(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,r);case 10:return this.convertObject(e.mapValue,r);default:throw qn()}}convertObject(e,r){return this.convertObjectMap(e.fields,r)}convertObjectMap(e,r="none"){const u={};return yl(e,(d,p)=>{u[d]=this.convertValue(p,r)}),u}convertGeoPoint(e){return new Rp(Ro(e.latitude),Ro(e.longitude))}convertArray(e,r){return(e.values||[]).map(u=>this.convertValue(u,r))}convertServerTimestamp(e,r){switch(r){case"previous":const u=cl(e);return null==u?null:this.convertValue(u,r);case"estimate":return this.convertTimestamp(El(e));default:return null}}convertTimestamp(e){const r=Po(e);return new io(r.seconds,r.nanos)}convertDocumentKey(e,r){const u=Es.fromString(e);Pr(bd(u));const d=new Ga(u.get(1),u.get(3)),p=new Vi(u.popFirst(5));return d.isEqual(r)||Ae(`Document ${p} contains a document reference within a different database (${d.projectId}/${d.database}) which is not supported. It will be treated as a reference in the current database (${r.projectId}/${r.database}) instead.`),p}}function Lp(o,e,r){let u;return u=o?r&&(r.merge||r.mergeFields)?o.toFirestore(e,r):o.toFirestore(e):e,u}class vE extends Om{constructor(e){super(),this.firestore=e}convertBytes(e){return new kd(e)}convertReference(e){const r=this.convertDocumentKey(e,this.firestore._databaseId);return new ma(this.firestore,null,r)}}class wc{constructor(e,r){this.hasPendingWrites=e,this.fromCache=r}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Zc extends ch{constructor(e,r,u,d,p,w){super(e,r,u,d,w),this._firestore=e,this._firestoreImpl=e,this.metadata=p}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const r=new gh(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(r,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,r={}){if(this._document){const u=this._document.data.field(dh("DocumentSnapshot.get",e));if(null!==u)return this._userDataWriter.convertValue(u,r.serverTimestamps)}}}class gh extends Zc{data(e={}){return super.data(e)}}class qc{constructor(e,r,u,d){this._firestore=e,this._userDataWriter=r,this._snapshot=d,this.metadata=new wc(d.hasPendingWrites,d.fromCache),this.query=u}get docs(){const e=[];return this.forEach(r=>e.push(r)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,r){this._snapshot.docs.forEach(u=>{e.call(r,new gh(this._firestore,this._userDataWriter,u.key,u,new wc(this._snapshot.mutatedKeys.has(u.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const r=!!e.includeMetadataChanges;if(r&&this._snapshot.excludesMetadataChanges)throw new Xr(Ar.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===r||(this._cachedChanges=function(d,p){if(d._snapshot.oldDocs.isEmpty()){let w=0;return d._snapshot.docChanges.map(re=>({type:"added",doc:new gh(d._firestore,d._userDataWriter,re.doc.key,re.doc,new wc(d._snapshot.mutatedKeys.has(re.doc.key),d._snapshot.fromCache),d.query.converter),oldIndex:-1,newIndex:w++}))}{let w=d._snapshot.oldDocs;return d._snapshot.docChanges.filter(re=>p||3!==re.type).map(re=>{const Te=new gh(d._firestore,d._userDataWriter,re.doc.key,re.doc,new wc(d._snapshot.mutatedKeys.has(re.doc.key),d._snapshot.fromCache),d.query.converter);let ct=-1,Jt=-1;return 0!==re.type&&(ct=w.indexOf(re.doc.key),w=w.delete(re.doc.key)),1!==re.type&&(w=w.add(re.doc),Jt=w.indexOf(re.doc.key)),{type:km(re.type),doc:Te,oldIndex:ct,newIndex:Jt}})}}(this,r),this._cachedChangesIncludeMetadataChanges=r),this._cachedChanges}}function km(o){switch(o){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return qn()}}function yy(o,e){return o instanceof Zc&&e instanceof Zc?o._firestore===e._firestore&&o._key.isEqual(e._key)&&(null===o._document?null===e._document:o._document.isEqual(e._document))&&o._converter===e._converter:o instanceof qc&&e instanceof qc&&o._firestore===e._firestore&&Sm(o.query,e.query)&&o.metadata.isEqual(e.metadata)&&o._snapshot.isEqual(e._snapshot)}function Ey(o){o=to(o,ma);const e=to(o.firestore,Oo);return Sp(va(e),o._key).then(r=>mh(e,o,r))}class ed extends Om{constructor(e){super(),this.firestore=e}convertBytes(e){return new kd(e)}convertReference(e){const r=this.convertDocumentKey(e,this.firestore._databaseId);
1return new ma(this.firestore,null,r)}}function bE(o){o=to(o,ma);const e=to(o.firestore,Oo),r=va(e),u=new ed(e);return function Ip(o,e){const r=new Qi;return o.asyncQueue.enqueueAndForget((0,i.c)(function*(){return(u=(0,i.c)(function*(p,w,re){try{const Te=yield function(Jt,Dn){const lr=pi(Jt);return lr.persistence.runTransaction("read document","readonly",Yr=>lr.localDocuments.getDocument(Yr,Dn))}(p,w);Te.isFoundDocument()?re.resolve(Te):Te.isNoDocument()?re.resolve(null):re.reject(new Xr(Ar.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(Te){const ct=Rd(Te,`Failed to get document '${w} from cache`);re.reject(ct)}}),function d(p,w,re){return u.apply(this,arguments)})(yield Kc(o),e,r);var u})),r.promise}(r,o._key).then(d=>new Zc(e,u,o._key,d,new wc(null!==d&&d.hasLocalMutations,!0),o.converter))}function IE(o){o=to(o,ma);const e=to(o.firestore,Oo);return Sp(va(e),o._key,{source:"server"}).then(r=>mh(e,o,r))}function Lm(o){o=to(o,za);const e=to(o.firestore,Oo),r=va(e),u=new ed(e);return xm(o._query),eE(r,o._query).then(d=>new qc(e,u,o,d))}function Fm(o){o=to(o,za);const e=to(o.firestore,Oo),r=va(e),u=new ed(e);return function q0(o,e){const r=new Qi;return o.asyncQueue.enqueueAndForget((0,i.c)(function*(){return(u=(0,i.c)(function*(p,w,re){try{const Te=yield $f(p,w,!0),ct=new cp(w,Te.hs),Jt=ct.Ta(Te.documents),Dn=ct.applyChanges(Jt,!1);re.resolve(Dn.snapshot)}catch(Te){const ct=Rd(Te,`Failed to execute query '${w} against cache`);re.reject(ct)}}),function d(p,w,re){return u.apply(this,arguments)})(yield Kc(o),e,r);var u})),r.promise}(r,o._query).then(d=>new qc(e,u,o,d))}function wy(o){o=to(o,za);const e=to(o.firestore,Oo),r=va(e),u=new ed(e);return eE(r,o._query,{source:"server"}).then(d=>new qc(e,u,o,d))}function Um(o,e,r){o=to(o,ma);const u=to(o.firestore,Oo),d=Lp(o.converter,e,r);return Vd(u,[oh(If(u),"setDoc",o._key,d,null!==o.converter,r).toMutation(o._key,Fo.none())])}function Vm(o,e,r,...u){o=to(o,ma);const d=to(o.firestore,Oo),p=If(d);let w;return w="string"==typeof(e=(0,C.Yj)(e))||e instanceof Yc?Pm(p,"updateDoc",o._key,e,r,u):ah(p,"updateDoc",o._key,e),Vd(d,[w.toMutation(o._key,Fo.exists(!0))])}function SE(o){return Vd(to(o.firestore,Oo),[new Dc(o._key,Fo.none())])}function TE(o,e){const r=to(o.firestore,Oo),u=ty(o),d=Lp(o.converter,e);return Vd(r,[oh(If(o.firestore),"addDoc",u._key,d,null!==o.converter,{}).toMutation(u._key,Fo.exists(!1))]).then(()=>u)}function CE(o,...e){var r,u,d;o=(0,C.Yj)(o);let p={includeMetadataChanges:!1,source:"default"},w=0;"object"!=typeof e[w]||th(e[w])||(p=e[w],w++);const re={includeMetadataChanges:p.includeMetadataChanges,source:p.source};if(th(e[w])){const Dn=e[w];e[w]=null===(r=Dn.next)||void 0===r?void 0:r.bind(Dn),e[w+1]=null===(u=Dn.error)||void 0===u?void 0:u.bind(Dn),e[w+2]=null===(d=Dn.complete)||void 0===d?void 0:d.bind(Dn)}let Te,ct,Jt;if(o instanceof ma)ct=to(o.firestore,Oo),Jt=vt(o._key.path),Te={next:Dn=>{e[w]&&e[w](mh(ct,o,Dn))},error:e[w+1],complete:e[w+2]};else{const Dn=to(o,za);ct=to(Dn.firestore,Oo),Jt=Dn._query;const lr=new ed(ct);Te={next:Yr=>{e[w]&&e[w](new qc(ct,lr,Dn,Yr))},error:e[w+1],complete:e[w+2]},xm(o._query)}return function(lr,Yr,Ni,Ki){const Wi=new Ep(Ki),ds=new lp(Yr,Wi,Ni);return lr.asyncQueue.enqueueAndForget((0,i.c)(function*(){return zg(yield ic(lr),ds)}
1)),()=>{Wi.Qa(),lr.asyncQueue.enqueueAndForget((0,i.c)(function*(){return sp(yield ic(lr),ds)}))}}(va(ct),Jt,re,Te)}function _E(o,e){return function ob(o,e){const r=new Ep(e);return o.asyncQueue.enqueueAndForget((0,i.c)(function*(){return d=yield ic(o),p=r,pi(d).W_.add(p),void p.next();var d,p})),()=>{r.Qa(),o.asyncQueue.enqueueAndForget((0,i.c)(function*(){return d=yield ic(o),p=r,void pi(d).W_.delete(p);var d,p}))}}(va(o=to(o,Oo)),th(e)?e:{next:e})}function Vd(o,e){return function(u,d){const p=new Qi;return u.asyncQueue.enqueueAndForget((0,i.c)(function*(){return function j0(o,e,r){return ml.apply(this,arguments)}(yield Od(u),d,p)})),p.promise}(va(o),e)}function mh(o,e,r){const u=r.docs.get(e._key),d=new ed(o);return new Zc(o,d,e._key,u,new wc(r.hasPendingWrites,r.fromCache),e.converter)}const Ay={maxAttempts:5};class Fp{constructor(e,r){this._firestore=e,this._commitHandler=r,this._mutations=[],this._committed=!1,this._dataReader=If(e)}set(e,r,u){this._verifyNotCommitted();const d=bc(e,this._firestore),p=Lp(d.converter,r,u),w=oh(this._dataReader,"WriteBatch.set",d._key,p,null!==d.converter,u);return this._mutations.push(w.toMutation(d._key,Fo.none())),this}update(e,r,u,...d){this._verifyNotCommitted();const p=bc(e,this._firestore);let w;return w="string"==typeof(r=(0,C.Yj)(r))||r instanceof Yc?Pm(this._dataReader,"WriteBatch.update",p._key,r,u,d):ah(this._dataReader,"WriteBatch.update",p._key,r),this._mutations.push(w.toMutation(p._key,Fo.exists(!0))),this}delete(e){this._verifyNotCommitted();const r=bc(e,this._firestore);return this._mutations=this._mutations.concat(new Dc(r._key,Fo.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new Xr(Ar.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function bc(o,e){if((o=(0,C.Yj)(o)).firestore!==e)throw new Xr(Ar.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return o}class Dy extends class{constructor(r,u){this._firestore=r,this._transaction=u,this._dataReader=If(r)}get(r){const u=bc(r,this._firestore),d=new vE(this._firestore);return this._transaction.lookup([u._key]).then(p=>{if(!p||1!==p.length)return qn();const w=p[0];if(w.isFoundDocument())return new ch(this._firestore,d,w.key,w,u.converter);if(w.isNoDocument())return new ch(this._firestore,d,u._key,null,u.converter);throw qn()})}set(r,u,d){const p=bc(r,this._firestore),w=Lp(p.converter,u,d),re=oh(this._dataReader,"Transaction.set",p._key,w,null!==p.converter,d);return this._transaction.set(p._key,re),this}update(r,u,d,...p){const w=bc(r,this._firestore);let re;return re="string"==typeof(u=(0,C.Yj)(u))||u instanceof Yc?Pm(this._dataReader,"Transaction.update",w._key,u,d,p):ah(this._dataReader,"Transaction.update",w._key,u),this._transaction.update(w._key,re),this}delete(r){const u=bc(r,this._firestore);return this._transaction.delete(u._key),this}}{constructor(e,r){super(e,r),this._firestore=e}get(e){const r=bc(e,this._firestore),u=new ed(this._firestore);return super.get(e).then(d=>new Zc(this._firestore,u,r._key,d._document,new wc(!1,!1),r.converter))}}function Py(o,e,r){o=to(o,Oo);const u=Object.assign(Object.assign({},Ay),r);return function(p){if(p.maxAttempts<1)throw new Xr(Ar.INVALID_ARGUMENT,"Max attempts must be at least 1")}(u),function(p,w,re){const Te=new Qi;return p.asyncQueue.enqueueAndForget((0,i.c)(function*(){const ct=yield function yf(o){return bp(o).then(e=>e.datastore)}(p);new Xv(p.asyncQueue,ct,re,w,Te).Ya()})),Te.promise}(va(o),d=>e(new Dy(o,d)),u)}function Ry(){return new kl("deleteField")}function xE(){return new Am("serverTimestamp")}function vb(...o){return new oy("arrayUnion",o)}function yb(...o){return new ca("arrayRemove",o)}function Eb(o){return new Dm("increment",o)}!function(e,r=!0){lo=v.SDK_VERSION,(0,v._registerComponent)(new b.Yl("firestore",(u,{instanceIdentifier:d,options:p})=>{const w=u.getProvider("app").getImmediate(),re=new Oo(new sa(u.getProvider("auth-internal")),new Zi(u.getProvider("app-check-internal")),function(ct,Jt){if(!Object.prototype.hasOwnProperty.apply(ct.options,["projectId"]))throw new Xr(Ar.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ga(ct.options.projectId,Jt)}(w,d),w);return p=Object.assign({useFetchStreams:r},p),re._setSettings(p),re},"PUBLIC").setMultipleInstances(!0)),(0,v.registerVersion)(Io,"4.5.0",e),(0,v.registerVersion)(Io,"4.5.0","esm2017")}()},27144:(B,G,a)=>{"use strict";a.d(G,{A3:()=>ce,AL:()=>W,AV:()=>H,Cc:()=>Le,IN:()=>kt,Su:()=>Ie,UR:()=>De,Uv:()=>At,WW:()=>x,Wg:()=>k,Ww:()=>ee,Y7:()=>mn,YD:()=>Ne,Yd:()=>pe,Yj:()=>Mt,aw:()=>Hn,ik:()=>bn,kF:()=>Fn,kx:()=>Pe,my:()=>gr,o9:()=>Ve,qk:()=>ue,sX:()=>ae,t7:()=>lt,uH:()=>ye,yW:()=>j,yy:()=>se});const _=function(Ze){const et=[];let Zt=0;for(let Fe=0;Fe<Ze.length;Fe++){let ft=Ze.charCodeAt(Fe);ft<128?et[Zt++]=ft:ft<2048?(et[Zt++]=ft>>6|192,et[Zt++]=63&ft|128):55296==(64512&ft)&&Fe+1<Ze.length&&56320==(64512&Ze.charCodeAt(Fe+1))?(ft=65536+((1023&ft)<<10)+(1023&Ze.charCodeAt(++Fe)),et[Zt++]=ft>>18|240,et[Zt++]=ft>>12&63|128,et[Zt++]=ft>>6&63|128,et[Zt++]=63&ft|128):(et[Zt++]=ft>>12|224,et[Zt++]=ft>>6&63|128,et[Zt++]=63&ft|128)}return et},P={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(Ze,et){if(!Array.isArray(Ze))throw Error("encodeByteArray takes an array as a parameter");this.init_();const Zt=et?this.byteToCharMapWebSafe_:this.byteToCharMap_,Fe=[];for(let ft=0;ft<Ze.length;ft+=3){const dn=Ze[ft],Tn=ft+1<Ze.length,Bn=Tn?Ze[ft+1]:0,mr=ft+2<Ze.length,tr=mr?Ze[ft+2]:0;let Er=(15&Bn)<<2|tr>>6,Ai=63&tr;mr||(Ai=64,Tn||(Er=64)),Fe.push(Zt[dn>>2],Zt[(3&dn)<<4|Bn>>4],Zt[Er],Zt[Ai])}return Fe.join("")},encodeString(Ze,et){return this.HAS_NATIVE_SUPPORT&&!et?btoa(Ze):this.encodeByteArray(_(Ze),et)},decodeString(Ze,et){return this.HAS_NATIVE_SUPPORT&&!et?atob(Ze):function(Ze){const et=[];let Zt=0,Fe=0;for(;Zt<Ze.length;
1){const ft=Ze[Zt++];if(ft<128)et[Fe++]=String.fromCharCode(ft);else if(ft>191&&ft<224){const dn=Ze[Zt++];et[Fe++]=String.fromCharCode((31&ft)<<6|63&dn)}else if(ft>239&&ft<365){const mr=((7&ft)<<18|(63&Ze[Zt++])<<12|(63&Ze[Zt++])<<6|63&Ze[Zt++])-65536;et[Fe++]=String.fromCharCode(55296+(mr>>10)),et[Fe++]=String.fromCharCode(56320+(1023&mr))}else{const dn=Ze[Zt++],Tn=Ze[Zt++];et[Fe++]=String.fromCharCode((15&ft)<<12|(63&dn)<<6|63&Tn)}}return et.join("")}(this.decodeStringToByteArray(Ze,et))},decodeStringToByteArray(Ze,et){this.init_();const Zt=et?this.charToByteMapWebSafe_:this.charToByteMap_,Fe=[];for(let ft=0;ft<Ze.length;){const dn=Zt[Ze.charAt(ft++)],Bn=ft<Ze.length?Zt[Ze.charAt(ft)]:0;++ft;const tr=ft<Ze.length?Zt[Ze.charAt(ft)]:64;++ft;const ur=ft<Ze.length?Zt[Ze.charAt(ft)]:64;if(++ft,null==dn||null==Bn||null==tr||null==ur)throw new S;Fe.push(dn<<2|Bn>>4),64!==tr&&(Fe.push(Bn<<4&240|tr>>2),64!==ur&&Fe.push(tr<<6&192|ur))}return Fe},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let Ze=0;Ze<this.ENCODED_VALS.length;Ze++)this.byteToCharMap_[Ze]=this.ENCODED_VALS.charAt(Ze),this.charToByteMap_[this.byteToCharMap_[Ze]]=Ze,this.byteToCharMapWebSafe_[Ze]=this.ENCODED_VALS_WEBSAFE.charAt(Ze),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[Ze]]=Ze,Ze>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(Ze)]=Ze,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(Ze)]=Ze)}}};class S extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const k=function(Ze){return function(Ze){const et=_(Ze);return P.encodeByteArray(et,!0)}(Ze).replace(/\./g,"")},x=function(Ze){try{return P.decodeString(Ze,!0)}catch(et){console.error("base64Decode failed: ",et)}return null};function ee(Ze,et){if(!(et instanceof Object))return et;switch(et.constructor){case Date:return new Date(et.getTime());case Object:void 0===Ze&&(Ze={});break;case Array:Ze=[];break;default:return et}for(const Zt in et)!et.hasOwnProperty(Zt)||!te(Zt)||(Ze[Zt]=ee(Ze[Zt],et[Zt]));return Ze}function te(Ze){return"__proto__"!==Ze}const Y=()=>{try{return function J(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const Ze=process.env.__FIREBASE_DEFAULTS__;return Ze?JSON.parse(Ze):void 0})()||(()=>{if(typeof document>"u")return;let Ze;try{Ze=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const et=Ze&&x(Ze[1]);return et&&JSON.parse(et)})()}catch(Ze){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${Ze}`)}},pe=()=>{var Ze;return null===(Ze=Y())||void 0===Ze?void 0:Ze.config},ae=Ze=>{var et;return null===(et=Y())||void 0===et?void 0:et[`_${Ze}`]};class Ve{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((et,Zt)=>{this.resolve=et,this.reject=Zt})}wrapCallback(et){return(Zt,Fe)=>{Zt?this.reject(Zt):this.resolve(Fe),"function"==typeof et&&(this.promise.catch(()=>{}),1===et.length?et(Zt):et(Zt,Fe))}}}function Ne(Ze,et){if(Ze.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const Fe=et||"demo-project",ft=Ze.iat||0,dn=Ze.sub||Ze.user_id;if(!dn)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const Tn=Object.assign({iss:`https://securetoken.google.com/${Fe}`,aud:Fe,iat:ft,exp:ft+3600,auth_time:ft,sub:dn,user_id:dn,firebase:{sign_in_provider:"custom",identities:{}}},Ze);return[k(JSON.stringify({alg:"none",type:"JWT"})),k(JSON.stringify(Tn)),""].join(".")}function Ie(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function H(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ie())}function j(){var Ze;const et=null===(Ze=Y())||void 0===Ze?void 0:Ze.forceEnvironment;if("node"===et)return!0;
1if("browser"===et)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}function ye(){return"object"==typeof self&&self.self===self}function Le(){const Ze="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof Ze&&void 0!==Ze.id}function W(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function At(){const Ze=Ie();return Ze.indexOf("MSIE ")>=0||Ze.indexOf("Trident/")>=0}function ue(){return!j()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function se(){try{return"object"==typeof indexedDB}catch{return!1}}function ce(){return new Promise((Ze,et)=>{try{let Zt=!0;const Fe="validate-browser-context-for-indexeddb-analytics-module",ft=self.indexedDB.open(Fe);ft.onsuccess=()=>{ft.result.close(),Zt||self.indexedDB.deleteDatabase(Fe),Ze(!0)},ft.onupgradeneeded=()=>{Zt=!1},ft.onerror=()=>{var dn;et((null===(dn=ft.error)||void 0===dn?void 0:dn.message)||"")}}catch(Zt){et(Zt)}})}class Pe extends Error{constructor(et,Zt,Fe){super(Zt),this.code=et,this.customData=Fe,this.name="FirebaseError",Object.setPrototypeOf(this,Pe.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,De.prototype.create)}}class De{constructor(et,Zt,Fe){this.service=et,this.serviceName=Zt,this.errors=Fe}create(et,...Zt){const Fe=Zt[0]||{},ft=`${this.service}/${et}`,dn=this.errors[et],Tn=dn?function ke(Ze,et){return Ze.replace(Lt,(Zt,Fe)=>{const ft=et[Fe];return null!=ft?String(ft):`<${Fe}?>`})}(dn,Fe):"Error";return new Pe(ft,`${this.serviceName}: ${Tn} (${ft}).`,Fe)}}const Lt=/\{\$([^}]+)}/g;function mn(Ze,et){return Object.prototype.hasOwnProperty.call(Ze,et)}function lt(Ze){for(const et in Ze)if(Object.prototype.hasOwnProperty.call(Ze,et))return!1;return!0}function kt(Ze,et){if(Ze===et)return!0;const Zt=Object.keys(Ze),Fe=Object.keys(et);for(const ft of Zt){if(!Fe.includes(ft))return!1;const dn=Ze[ft],Tn=et[ft];if(an(dn)&&an(Tn)){if(!kt(dn,Tn))return!1}else if(dn!==Tn)return!1}for(const ft of Fe)if(!Zt.includes(ft))return!1;return!0}function an(Ze){return null!==Ze&&"object"==typeof Ze}function bn(Ze){const et=[];for(const[Zt,Fe]of Object.entries(Ze))Array.isArray(Fe)?Fe.forEach(ft=>{et.push(encodeURIComponent(Zt)+"="+encodeURIComponent(ft))}):et.push(encodeURIComponent(Zt)+"="+encodeURIComponent(Fe));return et.length?"&"+et.join("&"):""}function Hn(Ze){const et={};return Ze.replace(/^\?/,"").split("&").forEach(Fe=>{if(Fe){const[ft,dn]=Fe.split("=");et[decodeURIComponent(ft)]=decodeURIComponent(dn)}}),et}function Fn(Ze){const et=Ze.indexOf("?");if(!et)return"";const Zt=Ze.indexOf("#",et);return Ze.substring(et,Zt>0?Zt:void 0)}function gr(Ze,et){const Zt=new Mr(Ze,et);return Zt.subscribe.bind(Zt)}class Mr{constructor(et,Zt){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=Zt,this.task.then(()=>{et(this)}).catch(Fe=>{this.error(Fe)})}next(et){this.forEachObserver(Zt=>{Zt.next(et)})}error(et){this.forEachObserver(Zt=>{Zt.error(et)}),this.close(et)}complete(){this.forEachObserver(et=>{et.complete()}),this.close()}subscribe(et,Zt,Fe){let ft;if(void 0===et&&void 0===Zt&&void 0===Fe)throw new Error("Missing Observer.");ft=function Fr(Ze,et){if("object"!=typeof Ze||null===Ze)return!1;for(const Zt of et)if(Zt in Ze&&"function"==typeof Ze[Zt])return!0;return!1}(et,["next","error","complete"])?et:{next:et,error:Zt,complete:Fe},void 0===ft.next&&(ft.next=ti),void 0===ft.error&&(ft.error=ti),void 0===ft.complete&&(ft.complete=ti);const dn=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?ft.error(this.finalError):ft.complete()}catch{}}),this.observers.push(ft),dn}unsubscribeOne(et){void 0===this.observers||void 0===this.observers[et]||(delete this.observers[et],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(et){if(!this.finalized)for(let Zt=0;Zt<this.observers.length;Zt++)this.sendOne(Zt,et)}sendOne(et,Zt){this.task.then(()=>
1{if(void 0!==this.observers&&void 0!==this.observers[et])try{Zt(this.observers[et])}catch(Fe){typeof console<"u"&&console.error&&console.error(Fe)}})}close(et){this.finalized||(this.finalized=!0,void 0!==et&&(this.finalError=et),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function ti(){}function Mt(Ze){return Ze&&Ze._delegate?Ze._delegate:Ze}},72216:(B,G,a)=>{"use strict";a.d(G,{Y:()=>Ut});var i=a(81316),v=a(32116),_=a(53252),C=a(70800),P={error:"cordova_not_available"},S={error:"plugin_not_installed"};function R(it){if(typeof window<"u"&&window.angular){var se=window.document,ce=window.angular.element(se.querySelector("[ng-app]")||se.body).injector();if(ce)return ce.get("$q")(function(_e,Pe){it(_e,Pe)});console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise(function(_e,Pe){it(_e,Pe)});console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function te(it,ue,se){var ce,K,_e;return"string"==typeof it?ce=it:(ce=it.constructor.getPluginRef(),se=it.constructor.getPluginName(),_e=it.constructor.getPluginInstallName()),!(!(K=Y(ce))||ue&&typeof K[ue]>"u")||(typeof window>"u"||!window.cordova?(function pe(it,ue){typeof process>"u"&&console.warn(ue?"Native: tried calling "+it+"."+ue+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator":"Native: tried accessing the "+it+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}(se,ue),P):(function Ye(it,ue,se){console.warn(se?"Native: tried calling "+it+"."+se+", but the "+it+" plugin is not installed.":"Native: tried accessing the "+it+" plugin but it's not installed."),ue&&console.warn("Install the "+it+" plugin: 'ionic cordova plugin add "+ue+"'")}(se,_e,ue),S))}function we(it,ue,se,ce,K,_e){void 0===ce&&(ce={}),se=function Q(it,ue,se,ce){if(void 0===ue&&(ue={}),ue.sync)return it;if("reverse"===ue.callbackOrder)it.unshift(ce),it.unshift(se);else if("node"===ue.callbackStyle)it.push(function(De,ke){De?ce(De):se(ke)});else if("object"===ue.callbackStyle&&ue.successName&&ue.errorName){var K={};K[ue.successName]=se,K[ue.errorName]=ce,it.push(K)}else if(typeof ue.successIndex<"u"||typeof ue.errorIndex<"u"){var _e=function(){ue.successIndex>it.length?it[ue.successIndex]=se:it.splice(ue.successIndex,0,se)},Pe=function(){ue.errorIndex>it.length?it[ue.errorIndex]=ce:it.splice(ue.errorIndex,0,ce)};ue.successIndex>ue.errorIndex?(Pe(),_e()):(_e(),Pe())}else it.push(se),it.push(ce);return it}(se,ce,K,_e);var Pe=te(it,ue);if(!0===Pe){var De=Y(it.constructor.getPluginRef());return De[ue].apply(De,se)}return Pe}function Y(it){return typeof window<"u"?Se(window,it):null}function Se(it,ue){for(var se=ue.split("."),ce=it,K=0;K<se.length;K++){if(!ce)return null;ce=ce[se[K]]}return ce}var H=function(){function it(){}return it.installed=function(){return!0===te(this.pluginRef)},it.getPlugin=function(){return typeof window<"u"?function Ne(it,ue){for(var se=ue.split("."),ce=it,K=0;K<se.length;K++){if(!ce)return null;ce=ce[se[K]]}return ce}(window,this.pluginRef):null},it.getPluginName=function(){return this.pluginName},it.getPluginRef=function(){return this.pluginRef},it.getPluginInstallName=function(){return this.plugin},it.getSupportedPlatforms=function(){return this.platforms},it.pluginName="",it.pluginRef="",it.plugin="",it.repo="",it.platforms=[],it.install="",it}();function j(it,ue,se,ce){return function(it,ue,se){return void 0===se&&(se={}),function(){for(var ce=[],K=0;K<arguments.length;K++)ce[K]=arguments[K];return se.sync?we(it,ue,ce,se):se.observable?function D(it,ue,se,ce){return void 0===ce&&(ce={}),new _._(function(K){var _e;return _e=ce.destruct?we(it,ue,se,ce,function(){for(var Pe=[],De=0;De<arguments.length;De++)Pe[De]=arguments[De];return K.next(Pe)},function(){for(var Pe=[],De=0;De<arguments.length;De++)Pe[De]=arguments[De];return K.error(Pe)}):we(it,ue,se,ce,K.next.bind(K),K.error.bind(K)),_e&&_e.error&&(K.error(_e.error),K.complete()),function(){try{if(ce.clearFunction)return ce.clearWithArgs?we(it,ce.clearFunction,se,ce,K.next.bind(K),K.error.bind(K)):we(it,ce.clearFunction,[])}catch(Pe){console.warn("Unable to clear the previous observable watch for",it.constructor.getPluginName(),ue),console.warn(Pe)}}})}(it,ue,ce,se):se.eventObservable&&se.event?function ee(it,ue){return ue=typeof window<"u"&&ue?Se(window,ue):ue||(typeof window<"u"?window:{}),(0,C.w)(ue,it)}(se.event,se.element):se.otherPromise?function x(it,ue,se,ce){return void 0===ce&&(ce={}),R(function(K,_e){var Pe=we(it,ue,se,ce);Pe?Pe.error?_e(Pe.error):Pe.then&&Pe.then(K).catch(_e):_e({error:"unexpected_error"})})}(it,ue,ce,se):function k(it,ue,se,ce){void 0===ce&&(ce={});var K,_e,Pe=R(function(De,ke){K=ce.destruct?we(it,ue,se,ce,function(){for(var Lt=[],Dt=0;Dt<arguments.length;Dt++)Lt[Dt]=arguments[Dt];return De(Lt)},function(){for(var Lt=[],Dt=0;Dt<arguments.length;Dt++)Lt[Dt]=arguments[Dt];return ke(Lt)}):we(it,ue,se,ce,De,ke),_e=ke});return K&&K.error&&(Pe.catch(function(){}),"function"==typeof _e&&_e(K.error)),Pe}(it,ue,ce,se)}}(it,ue,se).apply(this,ce)}!function b(){if(typeof process>"u"){var it=typeof window<"u"?window:{},se=Date.now(),ce=!1;it.document.addEventListener("deviceready",function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-se)+" ms"),ce=!0}),setTimeout(function(){!ce&&it.cordova&&console.warn("Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")},5e3)}}();var Ut=function(it){function ue(){return null!==it&&it.apply(this,arguments)||this}return(0,i.ct)(ue,it),ue.prototype.login=function(se){return j(this,"login",{successIndex:1,errorIndex:2},arguments)},ue.prototype.trySilentLogin=function(se){return j(this,"trySilentLogin",{},arguments)},ue.prototype.logout=function(){return j(this,"logout",{},arguments)},ue.prototype.disconnect=function(){return j(this,"disconnect",{},arguments)},ue.prototype.getSigningCertificateFingerprint=function(){return j(this,"getSigningCertificateFingerprint",{},arguments)},ue.pluginName="GooglePlus",ue.plugin="cordova-plugin-googleplus",ue.pluginRef="window.plugins.googleplus",ue.repo="https://github.com/EddyVerbruggen/cordova-plugin-googleplus",ue.install="ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid",ue.installVariables=["REVERSED_CLIENT_ID"],ue.platforms=["Android","iOS"],ue.decorators=[{type:v._qm}],ue}(H)},19248:(B,G,a)=>{"use strict";a.d(G,{c:()=>b,r:()=>D});const b=(Ie,H)=>{Ie.componentOnReady?Ie.componentOnReady().then(j=>H(j)):D(()=>H(Ie))},D=Ie=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(Ie):"function"==typeof requestAnimationFrame?requestAnimationFrame(Ie):setTimeout(Ie)},51896:(B,G,a)=>{"use strict";a.d(G,{L:()=>i,a:()=>v,b:()=>b,c:()=>_,d:()=>C,g:()=>Ie});const i="ionViewWillEnter",v="ionViewDidEnter",b="ionViewWillLeave",_="ionViewDidLeave",C="ionViewWillUnload",Ie=H=>H.classList.contains("ion-page")?H:H.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||H},30388:(B,G,a)=>{"use strict";a.d(G,{c:()=>we});var i=a(14829),v=a(46384);let b;const C=de=>de.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),P=de=>(void 0===b&&(b=void 0===de.style.animationName&&void 0!==de.style.webkitAnimationName?"-webkit-":""),b),S=(de,Y,Se)=>{const Ye=Y.startsWith("animation")?P(de):"";de.style.setProperty(Ye+Y,Se)},R=(de,Y)=>{const Se=Y.startsWith("animation")?P(de):"";de.style.removeProperty(Se+Y)},D=[],Q=(de=[],Y)=>{if(void 0!==Y){const Se=Array.isArray(Y)?Y:[Y];return[...de,...Se]}return de},we=de=>{let Y,Se,Ye,pe,ae,Ve,ye,se,ce,K,_e,Lt,Dt,Ne=[],Ie=[],H=[],j=!1,Le={},W=[],We=[],At={},Ut=0,it=!1,ue=!1,Pe=!0,De=!1,ke=!0,He=!1;const ge=de,xt=[],pt=[],rn=[],cn=[],mn=[],dt=[],lt=[],rt=[],kt=[],an=[],Yn=[],bn="function"==typeof AnimationEffect||void 0!==i.w&&"function"==typeof i.w.AnimationEffect,Hn="function"==typeof Element&&"function"==typeof Element.prototype.animate&&bn,On=()=>Yn,ti=(gn,Xe)=>{const Tt=Xe.findIndex(An=>An.c===gn);Tt>-1&&Xe.splice(Tt,1)},Kr=(gn,Xe)=>((Xe?.oneTimeCallback?pt:xt).push({c:gn,o:Xe}),Dt),sr=()=>
1{if(Hn)Yn.forEach(gn=>{gn.cancel()}),Yn.length=0;else{const gn=cn.slice();(0,v.r)(()=>{gn.forEach(Xe=>{R(Xe,"animation-name"),R(Xe,"animation-duration"),R(Xe,"animation-timing-function"),R(Xe,"animation-iteration-count"),R(Xe,"animation-delay"),R(Xe,"animation-play-state"),R(Xe,"animation-fill-mode"),R(Xe,"animation-direction")})})}},or=()=>{dt.forEach(gn=>{gn?.parentNode&&gn.parentNode.removeChild(gn)}),dt.length=0},et=()=>void 0!==ae?ae:ye?ye.getFill():"both",Zt=()=>void 0!==ce?ce:void 0!==Ve?Ve:ye?ye.getDirection():"normal",Fe=()=>it?"linear":void 0!==Ye?Ye:ye?ye.getEasing():"linear",ft=()=>ue?0:void 0!==K?K:void 0!==Se?Se:ye?ye.getDuration():0,dn=()=>void 0!==pe?pe:ye?ye.getIterations():1,Tn=()=>void 0!==_e?_e:void 0!==Y?Y:ye?ye.getDelay():0,wr=()=>{0!==Ut&&(Ut--,0===Ut&&((()=>{le(),kt.forEach(Nn=>Nn()),an.forEach(Nn=>Nn());const gn=Pe?1:0,Xe=W,Tt=We,An=At;cn.forEach(Nn=>{const ir=Nn.classList;Xe.forEach(pr=>ir.add(pr)),Tt.forEach(pr=>ir.remove(pr));for(const pr in An)An.hasOwnProperty(pr)&&S(Nn,pr,An[pr])}),K=void 0,ce=void 0,_e=void 0,xt.forEach(Nn=>Nn.c(gn,Dt)),pt.forEach(Nn=>Nn.c(gn,Dt)),pt.length=0,ke=!0,Pe&&(De=!0),Pe=!0})(),ye&&ye.animationFinish()))},mi=(gn=!0)=>{or();const Xe=(de=>(de.forEach(Y=>{for(const Se in Y)if(Y.hasOwnProperty(Se)){const Ye=Y[Se];if("easing"===Se)Y["animation-timing-function"]=Ye,delete Y[Se];else{const pe=C(Se);pe!==Se&&(Y[pe]=Ye,delete Y[Se])}}}),de))(Ne);cn.forEach(Tt=>{if(Xe.length>0){const An=((de=[])=>de.map(Y=>{const Se=Y.offset,Ye=[];for(const pe in Y)Y.hasOwnProperty(pe)&&"offset"!==pe&&Ye.push(`${pe}: ${Y[pe]};`);return`${100*Se}% { ${Ye.join(" ")} }`}).join(" "))(Xe);Lt=void 0!==de?de:(de=>{let Y=D.indexOf(de);return Y<0&&(Y=D.push(de)-1),`ion-animation-${Y}`})(An);const Nn=((de,Y,Se)=>{var Ye;const pe=(de=>{const Y=void 0!==de.getRootNode?de.getRootNode():de;return Y.head||Y})(Se),ae=P(Se),Ve=pe.querySelector("#"+de);if(Ve)return Ve;const Ne=(null!==(Ye=Se.ownerDocument)&&void 0!==Ye?Ye:document).createElement("style");return Ne.id=de,Ne.textContent=`@${ae}keyframes ${de} { ${Y} } @${ae}keyframes ${de}-alt { ${Y} }`,pe.appendChild(Ne),Ne})(Lt,An,Tt);dt.push(Nn),S(Tt,"animation-duration",`${ft()}ms`),S(Tt,"animation-timing-function",Fe()),S(Tt,"animation-delay",`${Tn()}ms`),S(Tt,"animation-fill-mode",et()),S(Tt,"animation-direction",Zt());const ir=dn()===1/0?"infinite":dn().toString();S(Tt,"animation-iteration-count",ir),S(Tt,"animation-play-state","paused"),gn&&S(Tt,"animation-name",`${Nn.id}-alt`),(0,v.r)(()=>{S(Tt,"animation-name",Nn.id||null)})}})},Mi=(gn=!0)=>{(()=>{lt.forEach(An=>An()),rt.forEach(An=>An());const gn=Ie,Xe=H,Tt=Le;cn.forEach(An=>{const Nn=An.classList;gn.forEach(ir=>Nn.add(ir)),Xe.forEach(ir=>Nn.remove(ir));for(const ir in Tt)Tt.hasOwnProperty(ir)&&S(An,ir,Tt[ir])})})(),Ne.length>0&&(Hn?(cn.forEach(gn=>{const Xe=gn.animate(Ne,{id:ge,delay:Tn(),duration:ft(),easing:Fe(),iterations:dn(),fill:et(),direction:Zt()});Xe.pause(),Yn.push(Xe)}),Yn.length>0&&(Yn[0].onfinish=()=>{wr()})):mi(gn)),j=!0},Qt=gn=>{if(gn=Math.min(Math.max(gn,0),.9999),Hn)Yn.forEach(Xe=>{Xe.currentTime=Xe.effect.getComputedTiming().delay+ft()*gn,Xe.pause()});else{const Xe=`-${ft()*gn}ms`;cn.forEach(Tt=>{Ne.length>0&&(S(Tt,"animation-delay",Xe),S(Tt,"animation-play-state","paused"))})}},_n=gn=>{Yn.forEach(Xe=>{Xe.effect.updateTiming({delay:Tn(),duration:ft(),easing:Fe(),iterations:dn(),fill:et(),direction:Zt()})}),void 0!==gn&&Qt(gn)},Ln=(gn=!0,Xe)=>{(0,v.r)(()=>{cn.forEach(Tt=>{S(Tt,"animation-name",Lt||null),S(Tt,"animation-duration",`${ft()}ms`),S(Tt,"animation-timing-function",Fe()),S(Tt,"animation-delay",void 0!==Xe?`-${Xe*ft()}ms`:`${Tn()}ms`),S(Tt,"animation-fill-mode",et()||null),S(Tt,"animation-direction",Zt()||null);const An=dn()===1/0?"infinite":dn().toString();S(Tt,"animation-iteration-count",An),gn&&S(Tt,"animation-name",`${Lt}-alt`),(0,v.r)(()=>{S(Tt,"animation-name",Lt||null)})})})},Cn=(gn=!1,Xe=!0,Tt)=>(gn&&mn.forEach(An=>{An.update(gn,Xe,Tt)}),Hn?_n(Tt):Ln(Xe,Tt),Dt),Ii=()=>{j&&(Hn?Yn.forEach(gn=>{gn.pause()}):cn.forEach(gn=>{S(gn,"animation-play-state","paused")}),He=!0)},on=()=>{se=void 0,wr()},le=()=>{se&&clearTimeout(se)},En=gn=>new Promise(Xe=>{gn?.sync&&(ue=!0,Kr(()=>ue=!1,{oneTimeCallback:!0})),j||Mi(),De&&(Hn?(Qt(0),_n()):Ln(),De=!1),ke&&(Ut=mn.length+1,ke=!1);const Tt=()=>{ti(An,pt),Xe()},An=()=>{ti(Tt,rn),Xe()};Kr(An,{oneTimeCallback:!0}),((gn,Xe)=>{rn.push({c:gn,o:{oneTimeCallback:!0}})}
1)(Tt),mn.forEach(Nn=>{Nn.play()}),Hn?(Yn.forEach(gn=>{gn.play()}),(0===Ne.length||0===cn.length)&&wr()):(()=>{if(le(),(0,v.r)(()=>{cn.forEach(gn=>{Ne.length>0&&S(gn,"animation-play-state","running")})}),0===Ne.length||0===cn.length)wr();else{const gn=Tn()||0,Xe=ft()||0,Tt=dn()||1;isFinite(Tt)&&(se=setTimeout(on,gn+Xe*Tt+100)),((de,Y)=>{let Se;const Ye={passive:!0},ae=Ve=>{de===Ve.target&&(Se&&Se(),le(),(0,v.r)(()=>{cn.forEach(gn=>{R(gn,"animation-duration"),R(gn,"animation-delay"),R(gn,"animation-play-state")}),(0,v.r)(wr)}))};de&&(de.addEventListener("webkitAnimationEnd",ae,Ye),de.addEventListener("animationend",ae,Ye),Se=()=>{de.removeEventListener("webkitAnimationEnd",ae,Ye),de.removeEventListener("animationend",ae,Ye)})})(cn[0])}})(),He=!1}),br=(gn,Xe)=>{const Tt=Ne[0];return void 0===Tt||void 0!==Tt.offset&&0!==Tt.offset?Ne=[{offset:0,[gn]:Xe},...Ne]:Tt[gn]=Xe,Dt};return Dt={parentAnimation:ye,elements:cn,childAnimations:mn,id:ge,animationFinish:wr,from:br,to:(gn,Xe)=>{const Tt=Ne[Ne.length-1];return void 0===Tt||void 0!==Tt.offset&&1!==Tt.offset?Ne=[...Ne,{offset:1,[gn]:Xe}]:Tt[gn]=Xe,Dt},fromTo:(gn,Xe,Tt)=>br(gn,Xe).to(gn,Tt),parent:gn=>(ye=gn,Dt),play:En,pause:()=>(mn.forEach(gn=>{gn.pause()}),Ii(),Dt),stop:()=>{mn.forEach(gn=>{gn.stop()}),j&&(sr(),j=!1),it=!1,ue=!1,ke=!0,ce=void 0,K=void 0,_e=void 0,Ut=0,De=!1,Pe=!0,He=!1,rn.forEach(gn=>gn.c(0,Dt)),rn.length=0},destroy:gn=>(mn.forEach(Xe=>{Xe.destroy(gn)}),(gn=>{sr(),gn&&or()})(gn),cn.length=0,mn.length=0,Ne.length=0,xt.length=0,pt.length=0,j=!1,ke=!0,Dt),keyframes:gn=>{const Xe=Ne!==gn;return Ne=gn,Xe&&(gn=>{Hn?On().forEach(Xe=>{const Tt=Xe.effect;if(Tt.setKeyframes)Tt.setKeyframes(gn);else{const An=new KeyframeEffect(Tt.target,gn,Tt.getTiming());Xe.effect=An}}):mi()})(Ne),Dt},addAnimation:gn=>{if(null!=gn)if(Array.isArray(gn))for(const Xe of gn)Xe.parent(Dt),mn.push(Xe);else gn.parent(Dt),mn.push(gn);return Dt},addElement:gn=>{if(null!=gn)if(1===gn.nodeType)cn.push(gn);else if(gn.length>=0)for(let Xe=0;Xe<gn.length;Xe++)cn.push(gn[Xe]);else console.error("Invalid addElement value");return Dt},update:Cn,fill:gn=>(ae=gn,Cn(!0),Dt),direction:gn=>(Ve=gn,Cn(!0),Dt),iterations:gn=>(pe=gn,Cn(!0),Dt),duration:gn=>(!Hn&&0===gn&&(gn=1),Se=gn,Cn(!0),Dt),easing:gn=>(Ye=gn,Cn(!0),Dt),delay:gn=>(Y=gn,Cn(!0),Dt),getWebAnimations:On,getKeyframes:()=>Ne,getFill:et,getDirection:Zt,getDelay:Tn,getIterations:dn,getEasing:Fe,getDuration:ft,afterAddRead:gn=>(kt.push(gn),Dt),afterAddWrite:gn=>(an.push(gn),Dt),afterClearStyles:(gn=[])=>{for(const Xe of gn)At[Xe]="";return Dt},afterStyles:(gn={})=>(At=gn,Dt),afterRemoveClass:gn=>(We=Q(We,gn),Dt),afterAddClass:gn=>(W=Q(W,gn),Dt),beforeAddRead:gn=>(lt.push(gn),Dt),beforeAddWrite:gn=>(rt.push(gn),Dt),beforeClearStyles:(gn=[])=>{for(const Xe of gn)Le[Xe]="";return Dt},beforeStyles:(gn={})=>(Le=gn,Dt),beforeRemoveClass:gn=>(H=Q(H,gn),Dt),beforeAddClass:gn=>(Ie=Q(Ie,gn),Dt),onFinish:Kr,isRunning:()=>0!==Ut&&!He,progressStart:(gn=!1,Xe)=>(mn.forEach(Tt=>{Tt.progressStart(gn,Xe)}),Ii(),it=gn,j||Mi(),Cn(!1,!0,Xe),Dt),progressStep:gn=>(mn.forEach(Xe=>{Xe.progressStep(gn)}),Qt(gn),Dt),progressEnd:(gn,Xe,Tt)=>
1(it=!1,mn.forEach(An=>{An.progressEnd(gn,Xe,Tt)}),void 0!==Tt&&(K=Tt),De=!1,Pe=!0,0===gn?(ce="reverse"===Zt()?"normal":"reverse","reverse"===ce&&(Pe=!1),Hn?(Cn(),Qt(1-Xe)):(_e=(1-Xe)*ft()*-1,Cn(!1,!1))):1===gn&&(Hn?(Cn(),Qt(Xe)):(_e=Xe*ft()*-1,Cn(!1,!1))),void 0!==gn&&!ye&&En(),Dt)}}},59637:(B,G,a)=>{"use strict";a.d(G,{E:()=>x,a:()=>i,s:()=>R});const i=D=>{try{if(D instanceof S)return D.value;if(!_()||"string"!=typeof D||""===D)return D;if(D.includes("onload="))return"";const ee=document.createDocumentFragment(),te=document.createElement("div");ee.appendChild(te),te.innerHTML=D,P.forEach(de=>{const Y=ee.querySelectorAll(de);for(let Se=Y.length-1;Se>=0;Se--){const Ye=Y[Se];Ye.parentNode?Ye.parentNode.removeChild(Ye):ee.removeChild(Ye);const pe=b(Ye);for(let ae=0;ae<pe.length;ae++)v(pe[ae])}});const J=b(ee);for(let de=0;de<J.length;de++)v(J[de]);const Q=document.createElement("div");Q.appendChild(ee);const we=Q.querySelector("div");return null!==we?we.innerHTML:Q.innerHTML}catch(ee){return console.error(ee),""}},v=D=>{if(D.nodeType&&1!==D.nodeType)return;if(typeof NamedNodeMap<"u"&&!(D.attributes instanceof NamedNodeMap))return void D.remove();for(let te=D.attributes.length-1;te>=0;te--){const J=D.attributes.item(te),Q=J.name;if(!C.includes(Q.toLowerCase())){D.removeAttribute(Q);continue}const we=J.value,de=D[Q];(null!=we&&we.toLowerCase().includes("javascript:")||null!=de&&de.toLowerCase().includes("javascript:"))&&D.removeAttribute(Q)}const ee=b(D);for(let te=0;te<ee.length;te++)v(ee[te])},b=D=>null!=D.children?D.children:D.childNodes,_=()=>{var D;const ee=window,te=null===(D=ee?.Ionic)||void 0===D?void 0:D.config;return!te||(te.get?te.get("sanitizerEnabled",!0):!0===te.sanitizerEnabled||void 0===te.sanitizerEnabled)},C=["class","id","href","src","name","slot"],P=["script","style","iframe","meta","link","object","embed"];class S{constructor(ee){this.value=ee}}const R=D=>{const ee=window,te=ee.Ionic;if(!te||!te.config||"Object"===te.config.constructor.name)return ee.Ionic=ee.Ionic||{},ee.Ionic.config=Object.assign(Object.assign({},ee.Ionic.config),D),ee.Ionic.config},x=!1},86944:(B,G,a)=>{"use strict";a.d(G,{g:()=>i});const i=(P,S,R,k,x)=>b(P[1],S[1],R[1],k[1],x).map(D=>v(P[0],S[0],R[0],k[0],D)),v=(P,S,R,k,x)=>x*(3*S*Math.pow(x-1,2)+x*(-3*R*x+3*R+k*x))-P*Math.pow(x-1,3),b=(P,S,R,k,x)=>C((k-=x)-3*(R-=x)+3*(S-=x)-(P-=x),3*R-6*S+3*P,3*S-3*P,P).filter(ee=>ee>=0&&ee<=1),C=(P,S,R,k)=>{if(0===P)return((P,S,R)=>{const k=S*S-4*P*R;return k<0?[]:[(-S+Math.sqrt(k))/(2*P),(-S-Math.sqrt(k))/(2*P)]})(S,R,k);const x=(3*(R/=P)-(S/=P)*S)/3,D=(2*S*S*S-9*S*R+27*(k/=P))/27;if(0===x)return[Math.pow(-D,1/3)];if(0===D)return[Math.sqrt(-x),-Math.sqrt(-x)];const ee=Math.pow(D/2,2)+Math.pow(x/3,3);if(0===ee)return[Math.pow(D/2,.5)-S/3];if(ee>0)return[Math.pow(-D/2+Math.sqrt(ee),1/3)-Math.pow(D/2+Math.sqrt(ee),1/3)-S/3];const te=Math.sqrt(Math.pow(-x/3,3)),J=Math.acos(-D/(2*Math.sqrt(Math.pow(-x/3,3)))),Q=2*Math.pow(te,1/3);return[Q*Math.cos(J/3)-S/3,Q*Math.cos((J+2*Math.PI)/3)-S/3,Q*Math.cos((J+4*Math.PI)/3)-S/3]}},10495:(B,G,a)=>{"use strict";a.d(G,{C:()=>C,a:()=>b,d:()=>_});var i=a(73448),v=a(46384);const b=function(){var P=(0,i.c)(function*(S,R,k,x,D,ee){var te;if(S)return S.attachViewToDom(R,k,D,x);if(!(ee||"string"==typeof k||k instanceof HTMLElement))throw new Error("framework delegate is missing");const J="string"==typeof k?null===(te=R.ownerDocument)||void 0===te?void 0:te.createElement(k):k;return x&&x.forEach(Q=>J.classList.add(Q)),D&&Object.assign(J,D),R.appendChild(J),yield new Promise(Q=>(0,v.c)(J,Q)),J});return function(R,k,x,D,ee,te){return P.apply(this,arguments)}}(),_=(P,S)=>{if(S){if(P)return P.removeViewFromDom(S.parentElement,S);S.remove()}return Promise.resolve()},C=()=>{let P,S;return{attachViewToDom:function(){var x=(0,i.c)(function*(D,ee,te={},J=[]){var Q,we;let de;if(P=D,ee){const Se="string"==typeof ee?null===(Q=P.ownerDocument)||void 0===Q?void 0:Q.createElement(ee):ee;J.forEach(Ye=>Se.classList.add(Ye)),Object.assign(Se,te),P.appendChild(Se),de=Se,yield new Promise(Ye=>(0,v.c)(Se,Ye))}else if(P.children.length>0&&("ION-MODAL"===P.tagName||"ION-POPOVER"===P.tagName)&&!(de=P.children[0]).classList.contains("ion-delegate-host")){const Ye=null===(we=P.ownerDocument)||void 0===we?void 0:we.createElement("div");Ye.classList.add("ion-delegate-host"),J.forEach(pe=>Ye.classList.add(pe)),Ye.append(...P.children),P.appendChild(Ye),de=Ye}const Y=document.querySelector("ion-app")||document.body;return S=document.createComment("ionic teleport"),P.parentNode.insertBefore(S,P),Y.appendChild(P),de??P});return function(ee,te){return x.apply(this,arguments)}}(),removeViewFromDom:()=>(P&&S&&(S.parentNode.insertBefore(P,S),S.remove()),Promise.resolve())}}},66560:(B,G,a)=>{"use strict";a.d(G,{G:()=>C});class v{constructor(S,R,k,x,D){this.id=R,this.name=k,this.disableScroll=D,this.priority=1e6*x+R,this.ctrl=S}canStart(){return!!this.ctrl&&this.ctrl.canStart(this.name)}
1start(){return!!this.ctrl&&this.ctrl.start(this.name,this.id,this.priority)}capture(){if(!this.ctrl)return!1;const S=this.ctrl.capture(this.name,this.id,this.priority);return S&&this.disableScroll&&this.ctrl.disableScroll(this.id),S}release(){this.ctrl&&(this.ctrl.release(this.id),this.disableScroll&&this.ctrl.enableScroll(this.id))}destroy(){this.release(),this.ctrl=void 0}}class b{constructor(S,R,k,x){this.id=R,this.disable=k,this.disableScroll=x,this.ctrl=S}block(){if(this.ctrl){if(this.disable)for(const S of this.disable)this.ctrl.disableGesture(S,this.id);this.disableScroll&&this.ctrl.disableScroll(this.id)}}unblock(){if(this.ctrl){if(this.disable)for(const S of this.disable)this.ctrl.enableGesture(S,this.id);this.disableScroll&&this.ctrl.enableScroll(this.id)}}destroy(){this.unblock(),this.ctrl=void 0}}const _="backdrop-no-scroll",C=new class i{constructor(){this.gestureId=0,this.requestedStart=new Map,this.disabledGestures=new Map,this.disabledScroll=new Set}createGesture(S){var R;return new v(this,this.newID(),S.name,null!==(R=S.priority)&&void 0!==R?R:0,!!S.disableScroll)}createBlocker(S={}){return new b(this,this.newID(),S.disable,!!S.disableScroll)}start(S,R,k){return this.canStart(S)?(this.requestedStart.set(R,k),!0):(this.requestedStart.delete(R),!1)}capture(S,R,k){if(!this.start(S,R,k))return!1;const x=this.requestedStart;let D=-1e4;if(x.forEach(ee=>{D=Math.max(D,ee)}),D===k){this.capturedId=R,x.clear();const ee=new CustomEvent("ionGestureCaptured",{detail:{gestureName:S}});return document.dispatchEvent(ee),!0}return x.delete(R),!1}release(S){this.requestedStart.delete(S),this.capturedId===S&&(this.capturedId=void 0)}disableGesture(S,R){let k=this.disabledGestures.get(S);void 0===k&&(k=new Set,this.disabledGestures.set(S,k)),k.add(R)}enableGesture(S,R){const k=this.disabledGestures.get(S);void 0!==k&&k.delete(R)}disableScroll(S){this.disabledScroll.add(S),1===this.disabledScroll.size&&document.body.classList.add(_)}enableScroll(S){this.disabledScroll.delete(S),0===this.disabledScroll.size&&document.body.classList.remove(_)}canStart(S){return!(void 0!==this.capturedId||this.isDisabled(S))}isCaptured(){return void 0!==this.capturedId}isScrollDisabled(){return this.disabledScroll.size>0}isDisabled(S){const R=this.disabledGestures.get(S);return!!(R&&R.size>0)}newID(){return this.gestureId++,this.gestureId}}},95440:(B,G,a)=>{"use strict";a.r(G),a.d(G,{MENU_BACK_BUTTON_PRIORITY:()=>k,OVERLAY_BACK_BUTTON_PRIORITY:()=>R,blockHardwareBackButton:()=>P,shouldUseCloseWatcher:()=>C,startHardwareBackButton:()=>S});var i=a(73448),v=a(14829),b=a(12072);a(96040);const C=()=>b.c.get("experimentalCloseWatcher",!1)&&void 0!==v.w&&"CloseWatcher"in v.w,P=()=>{document.addEventListener("backbutton",()=>{})},S=()=>{const x=document;let D=!1;const ee=()=>{if(D)return;let te=0,J=[];const Q=new CustomEvent("ionBackButton",{bubbles:!1,detail:{register(Y,Se){J.push({priority:Y,handler:Se,id:te++})}}});x.dispatchEvent(Q);const we=function(){var Y=(0,i.c)(function*(Se){try{if(Se?.handler){const Ye=Se.handler(de);null!=Ye&&(yield Ye)}}catch(Ye){console.error(Ye)}});return function(Ye){return Y.apply(this,arguments)}}(),de=()=>{if(J.length>0){let Y={priority:Number.MIN_SAFE_INTEGER,handler:()=>{},id:-1};J.forEach(Se=>{Se.priority>=Y.priority&&(Y=Se)}),D=!0,J=J.filter(Se=>Se.id!==Y.id),we(Y).then(()=>D=!1)}};de()};if(C()){let te;const J=()=>{te?.destroy(),te=new v.w.CloseWatcher,te.onclose=()=>{ee(),J()}};J()}else x.addEventListener("backbutton",ee)},R=100,k=99},46384:(B,G,a)=>{"use strict";a.d(G,{a:()=>R,b:()=>k,c:()=>b,d:()=>we,e:()=>Q,f:()=>J,g:()=>x,h:()=>te,i:()=>S,j:()=>ae,k:()=>C,l:()=>de,m:()=>_,n:()=>ee,o:()=>Y,p:()=>pe,q:()=>Ve,r:()=>D,s:()=>Ne,t:()=>i,u:()=>Se,v:()=>Ye});const i=(Ie,H=0)=>new Promise(j=>{v(Ie,H,j)}),v=(Ie,H=0,j)=>{let ye,Le;const W={passive:!0},At=()=>{ye&&ye()},Ut=it=>{(void 0===it||Ie===it.target)&&(At(),j(it))};return Ie&&(Ie.addEventListener("webkitTransitionEnd",Ut,W),Ie.addEventListener("transitionend",Ut,W),Le=setTimeout(Ut,H+500),ye=()=>{void 0!==Le&&(clearTimeout(Le),Le=void 0),Ie.removeEventListener("webkitTransitionEnd",Ut,W),Ie.removeEventListener("transitionend",Ut,W)}),At},b=(Ie,H)=>{Ie.componentOnReady?Ie.componentOnReady().then(j=>H(j)):D(()=>H(Ie))},_=Ie=>void 0!==Ie.componentOnReady,C=(Ie,H=[])=>{const j={};return H.forEach(ye=>{Ie.hasAttribute(ye)&&(null!==Ie.getAttribute(ye)&&(j[ye]=Ie.getAttribute(ye)),Ie.removeAttribute(ye))}),j},P=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],S=(Ie,H)=>{let j=P;return H&&H.length>0&&(j=j.filter(ye=>!H.includes(ye))),C(Ie,j)},R=(Ie,H,j,ye)=>{var Le;if(typeof window<"u"){const W=window,We=null===(Le=W?.Ionic)||void 0===Le?void 0:Le.config;if(We){const At=We.get("_ael");
1if(At)return At(Ie,H,j,ye);if(We._ael)return We._ael(Ie,H,j,ye)}}return Ie.addEventListener(H,j,ye)},k=(Ie,H,j,ye)=>{var Le;if(typeof window<"u"){const W=window,We=null===(Le=W?.Ionic)||void 0===Le?void 0:Le.config;if(We){const At=We.get("_rel");if(At)return At(Ie,H,j,ye);if(We._rel)return We._rel(Ie,H,j,ye)}}return Ie.removeEventListener(H,j,ye)},x=(Ie,H=Ie)=>Ie.shadowRoot||H,D=Ie=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(Ie):"function"==typeof requestAnimationFrame?requestAnimationFrame(Ie):setTimeout(Ie),ee=Ie=>!!Ie.shadowRoot&&!!Ie.attachShadow,te=Ie=>{const H=Ie.closest("ion-item");return H?H.querySelector("ion-label"):null},J=Ie=>{if(Ie.focus(),Ie.classList.contains("ion-focusable")){const H=Ie.closest("ion-app");H&&H.setFocus([Ie])}},Q=(Ie,H)=>{let j;const ye=Ie.getAttribute("aria-labelledby"),Le=Ie.id;let W=null!==ye&&""!==ye.trim()?ye:H+"-lbl",We=null!==ye&&""!==ye.trim()?document.getElementById(ye):te(Ie);return We?(null===ye&&(We.id=W),j=We.textContent,We.setAttribute("aria-hidden","true")):""!==Le.trim()&&(We=document.querySelector(`label[for="${Le}"]`),We&&(""!==We.id?W=We.id:We.id=W=`${Le}-lbl`,j=We.textContent)),{label:We,labelId:W,labelText:j}},we=(Ie,H,j,ye,Le)=>{if(Ie||ee(H)){let W=H.querySelector("input.aux-input");W||(W=H.ownerDocument.createElement("input"),W.type="hidden",W.classList.add("aux-input"),H.appendChild(W)),W.disabled=Le,W.name=j,W.value=ye||""}},de=(Ie,H,j)=>Math.max(Ie,Math.min(H,j)),Y=(Ie,H)=>{if(!Ie){const j="ASSERT: "+H;throw console.error(j),new Error(j)}},Se=Ie=>Ie.timeStamp||Date.now(),Ye=Ie=>{if(Ie){const H=Ie.changedTouches;if(H&&H.length>0){const j=H[0];return{x:j.clientX,y:j.clientY}}if(void 0!==Ie.pageX)return{x:Ie.pageX,y:Ie.pageY}}return{x:0,y:0}},pe=Ie=>{const H="rtl"===document.dir;switch(Ie){case"start":return H;case"end":return!H;default:throw new Error(`"${Ie}" is not a valid value for [side]. Use "start" or "end" instead.`)}},ae=(Ie,H)=>{const j=Ie._original||Ie;return{_original:Ie,emit:Ve(j.emit.bind(j),H)}},Ve=(Ie,H=0)=>{let j;return(...ye)=>{clearTimeout(j),j=setTimeout(Ie,H,...ye)}},Ne=(Ie,H)=>{if(Ie??(Ie={}),H??(H={}),Ie===H)return!0;const j=Object.keys(Ie);if(j.length!==Object.keys(H).length)return!1;for(const ye of j)if(!(ye in H)||Ie[ye]!==H[ye])return!1;return!0}},62528:(B,G,a)=>{"use strict";a.r(G),a.d(G,{GESTURE_CONTROLLER:()=>i.G,createGesture:()=>k});var i=a(66560);const v=(te,J,Q,we)=>{const de=b(te)?{capture:!!we.capture,passive:!!we.passive}:!!we.capture;let Y,Se;return te.__zone_symbol__addEventListener?(Y="__zone_symbol__addEventListener",Se="__zone_symbol__removeEventListener"):(Y="addEventListener",Se="removeEventListener"),te[Y](J,Q,de),()=>{te[Se](J,Q,de)}},b=te=>{if(void 0===_)try{const J=Object.defineProperty({},"passive",{get:()=>{_=!0}});te.addEventListener("optsTest",()=>{},J)}catch{_=!1}return!!_};let _;const S=te=>te instanceof Document?te:te.ownerDocument,k=te=>{let J=!1,Q=!1,we=!0,de=!1;const Y=Object.assign({disableScroll:!1,direction:"x",gesturePriority:0,passive:!0,maxAngle:40,threshold:10},te),Se=Y.canStart,Ye=Y.onWillStart,pe=Y.onStart,ae=Y.onEnd,Ve=Y.notCaptured,Ne=Y.onMove,Ie=Y.threshold,H=Y.passive,j=Y.blurOnStart,ye={type:"pan",startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,event:void 0,data:void 0},Le=((te,J,Q)=>{const we=Q*(Math.PI/180),de="x"===te,Y=Math.cos(we),Se=J*J;let Ye=0,pe=0,ae=!1,Ve=0;return{start(Ne,Ie){Ye=Ne,pe=Ie,Ve=0,ae=!0},detect(Ne,Ie){if(!ae)return!1;const H=Ne-Ye,j=Ie-pe,ye=H*H+j*j;if(ye<Se)return!1;const Le=Math.sqrt(ye),W=(de?H:j)/Le;return Ve=W>Y?1:W<-Y?-1:0,ae=!1,!0},isGesture:()=>0!==Ve,getDirection:()=>Ve}})(Y.direction,Y.threshold,Y.maxAngle),W=i.G.createGesture({name:te.gestureName,priority:te.gesturePriority,disableScroll:te.disableScroll}),Ut=()=>{J&&(de=!1,Ne&&Ne(ye))},it=()=>!!W.capture()&&(J=!0,we=!1,ye.startX=ye.currentX,ye.startY=ye.currentY,ye.startTime=ye.currentTime,Ye?Ye(ye).then(se):se(),!0),se=()=>{j&&(()=>{if(typeof document<"u"){const De=document.activeElement;De?.blur&&De.blur()}})(),pe&&pe(ye),we=!0},ce=()=>{J=!1,Q=!1,de=!1,we=!0,W.release()},K=De=>{const ke=J,Lt=we;if(ce(),Lt){if(x(ye,De),ke)return void(ae&&ae(ye));Ve&&Ve(ye)}},_e=((te,J,Q,we,de)=>{let Y,Se,Ye,pe,ae,Ve,Ne,Ie=0;const H=ue=>{Ie=Date.now()+2e3,J(ue)&&(!Se&&Q&&(Se=v(te,"touchmove",Q,de)),Ye||(Ye=v(ue.target,"touchend",ye,de)),pe||(pe=v(ue.target,"touchcancel",ye,de)))},j=ue=>{Ie>Date.now()||J(ue)&&(!Ve&&Q&&(Ve=v(S(te),"mousemove",Q,de)),Ne||(Ne=v(S(te),"mouseup",Le,de)))},ye=ue=>{W(),we&&we(ue)},Le=ue=>{We(),we&&we(ue)},W=()=>{Se&&Se(),Ye&&Ye(),pe&&pe(),Se=Ye=pe=void 0},We=()=>{Ve&&Ve(),Ne&&Ne(),Ve=Ne=void 0},At=()=>{W(),We()},Ut=(ue=!0)=>{ue?(Y||(Y=v(te,"touchstart",H,de)),ae||(ae=v(te,"mousedown",j,de))):(Y&&Y(),ae&&ae(),Y=ae=void 0,At())};return{enable:Ut,stop:At,destroy:()=>{Ut(!1),we=Q=J=void 0}}})(Y.el,De=>{const ke=ee(De);return!(Q||!we||(D(De,ye),ye.startX=ye.currentX,ye.startY=ye.currentY,ye.startTime=ye.currentTime=ke,ye.velocityX=ye.velocityY=ye.deltaX=ye.deltaY=0,ye.event=De,Se&&!1===Se(ye))||(W.release(),!W.start()))&&(Q=!0,0===Ie?it():(Le.start(ye.startX,ye.startY),!0))},De=>{J?!de&&we&&(de=!0,x(ye,De),requestAnimationFrame(Ut)):(x(ye,De),Le.detect(ye.currentX,ye.currentY)&&(!Le.isGesture()||!it())&&Pe())},K,{capture:!1,passive:H}),Pe=()=>{ce(),_e.stop(),Ve&&Ve(ye)};return{enable(De=!0){De||(J&&K(void 0),ce()),_e.enable(De)},destroy(){W.destroy(),_e.destroy()}}},x=(te,J)=>{if(!J)return;const Q=te.currentX,we=te.currentY,de=te.currentTime;D(J,te);const Y=te.currentX,Se=te.currentY,pe=(te.currentTime=ee(J))-de;if(pe>0&&pe<100){const Ve=(Se-we)/pe;te.velocityX=(Y-Q)/pe*.7+.3*te.velocityX,te.velocityY=.7*Ve+.3*te.velocityY}te.deltaX=Y-te.startX,te.deltaY=Se-te.startY,te.event=J},D=(te,J)=>{let Q=0,we=0;if(te){const de=te.changedTouches;if(de&&de.length>0){const Y=de[0];Q=Y.clientX,we=Y.clientY}else void 0!==te.pageX&&(Q=te.pageX,we=te.pageY)}J.currentX=Q,J.currentY=we},ee=te=>te.timeStamp||Date.now()},68091:(B,G,a)=>{"use strict";a.d(G,{m:()=>te});var i=a(73448),v=a(14829),b=a(95440),_=a(52032),C=a(46384),P=a(12072),S=a(30388);const R=J=>(0,S.c)().duration(J?400:300),k=J=>{let Q,we;const de=J.width+8,Y=(0,S.c)(),Se=(0,S.c)();J.isEndSide?(Q=de+"px",we="0px"):(Q=-de+"px",we="0px"),Y.addElement(J.menuInnerEl).fromTo("transform",`translateX(${Q})`,`translateX(${we})`);const pe="ios"===(0,P.b)(J),ae=pe?.2:.25;return Se.addElement(J.backdropEl).fromTo("opacity",.01,ae),R(pe).addAnimation([Y,Se])},x=J=>{let Q,we;const de=(0,P.b)(J),Y=J.width;J.isEndSide?(Q=-Y+"px",we=Y+"px"):(Q=Y+"px",we=-Y+"px");const Se=(0,S.c)().addElement(J.menuInnerEl).fromTo("transform",`translateX(${we})`,"translateX(0px)"),Ye=(0,S.c)().addElement(J.contentEl).fromTo("transform","translateX(0px)",`translateX(${Q})`),pe=(0,S.c)().addElement(J.backdropEl).fromTo("opacity",.01,.32);return R("ios"===de).addAnimation([Se,Ye,pe])},D=J=>{const Q=(0,P.b)(J),we=J.width*(J.isEndSide?-1:1)+"px",de=(0,S.c)().addElement(J.contentEl).fromTo("transform","translateX(0px)",`translateX(${we})`);return R("ios"===Q).addAnimation(de)},te=(()=>{const J=new Map,Q=[],we=function(){var ce=(0,i.c)(function*(K){const _e=yield Ve(K,!0);return!!_e&&_e.open()});return function(_e){return ce.apply(this,arguments)}}(),de=function(){var ce=(0,i.c)(function*(K){const _e=yield void 0!==K?Ve(K,!0):Ne();return void 0!==_e&&_e.close()});return function(_e){return ce.apply(this,arguments)}}(),Y=function(){var ce=(0,i.c)(function*(K){const _e=yield Ve(K,!0);
1return!!_e&&_e.toggle()});return function(_e){return ce.apply(this,arguments)}}(),Se=function(){var ce=(0,i.c)(function*(K,_e){const Pe=yield Ve(_e);return Pe&&(Pe.disabled=!K),Pe});return function(_e,Pe){return ce.apply(this,arguments)}}(),Ye=function(){var ce=(0,i.c)(function*(K,_e){const Pe=yield Ve(_e);return Pe&&(Pe.swipeGesture=K),Pe});return function(_e,Pe){return ce.apply(this,arguments)}}(),pe=function(){var ce=(0,i.c)(function*(K){if(null!=K){const _e=yield Ve(K);return void 0!==_e&&_e.isOpen()}return void 0!==(yield Ne())});return function(_e){return ce.apply(this,arguments)}}(),ae=function(){var ce=(0,i.c)(function*(K){const _e=yield Ve(K);return!!_e&&!_e.disabled});return function(_e){return ce.apply(this,arguments)}}(),Ve=function(){var ce=(0,i.c)(function*(K,_e=!1){if(yield se(),"start"===K||"end"===K){const De=Q.filter(Lt=>Lt.side===K&&!Lt.disabled);if(De.length>=1)return De.length>1&&_e&&(0,_.p)(`menuController queried for a menu on the "${K}" side, but ${De.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`,De.map(Lt=>Lt.el)),De[0].el;const ke=Q.filter(Lt=>Lt.side===K);if(ke.length>=1)return ke.length>1&&_e&&(0,_.p)(`menuController queried for a menu on the "${K}" side, but ${ke.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`,ke.map(Lt=>Lt.el)),ke[0].el}else if(null!=K)return ue(De=>De.menuId===K);return ue(De=>!De.disabled)||(Q.length>0?Q[0].el:void 0)});return function(_e){return ce.apply(this,arguments)}}(),Ne=function(){var ce=(0,i.c)(function*(){return yield se(),At()});return function(){return ce.apply(this,arguments)}}(),Ie=function(){var ce=(0,i.c)(function*(){return yield se(),Ut()});return function(){return ce.apply(this,arguments)}}(),H=function(){var ce=(0,i.c)(function*(){return yield se(),it()});return function(){return ce.apply(this,arguments)}}(),j=(ce,K)=>{J.set(ce,K)},W=function(){var ce=(0,i.c)(function*(K,_e,Pe){if(it())return!1;if(_e){const De=yield Ne();De&&K.el!==De&&(yield De.setOpen(!1,!1))}return K._setOpen(_e,Pe)});return function(_e,Pe,De){return ce.apply(this,arguments)}}(),At=()=>ue(ce=>ce._isOpen),Ut=()=>Q.map(ce=>ce.el),it=()=>Q.some(ce=>ce.isAnimating),ue=ce=>{const K=Q.find(ce);if(void 0!==K)return K.el},se=()=>Promise.all(Array.from(document.querySelectorAll("ion-menu")).map(ce=>new Promise(K=>(0,C.c)(ce,K))));return j("reveal",D),j("push",x),j("overlay",k),null==v.d||v.d.addEventListener("ionBackButton",ce=>{const K=At();K&&ce.detail.register(b.MENU_BACK_BUTTON_PRIORITY,()=>K.close())}),{registerAnimation:j,get:Ve,getMenus:Ie,getOpen:Ne,isEnabled:ae,swipeGesture:Ye,isAnimating:H,isOpen:pe,enable:Se,toggle:Y,close:de,open:we,_getOpenSync:At,_createAnimation:(ce,K)=>{const _e=J.get(ce);if(!_e)throw new Error("animation not registered");return _e(K)},_register:ce=>{Q.indexOf(ce)<0&&Q.push(ce)},_unregister:ce=>{const K=Q.indexOf(ce);K>-1&&Q.splice(K,1)},_setOpen:W}})()},34536:(B,G,a)=>{"use strict";a.d(G,{b:()=>P,c:()=>S,d:()=>R,e:()=>Ie,g:()=>ye,l:()=>Ve,s:()=>H,t:()=>D,w:()=>Ne});var i=a(73448),v=a(96040),b=a(46384);const P="ionViewWillLeave",S="ionViewDidLeave",R="ionViewWillUnload",D=Le=>new Promise((W,We)=>{(0,v.w)(()=>{ee(Le),te(Le).then(At=>{At.animation&&At.animation.destroy(),J(Le),W(At)},At=>{J(Le),We(At)})})}),ee=Le=>{const W=Le.enteringEl,We=Le.leavingEl;j(W,We,Le.direction),Le.showGoBack?W.classList.add("can-go-back"):W.classList.remove("can-go-back"),H(W,!1),W.style.setProperty("pointer-events","none"),We&&(H(We,!1),We.style.setProperty("pointer-events","none"))},te=function(){var Le=(0,i.c)(function*(W){const We=yield Q(W);return We&&v.B.isBrowser?we(We,W):de(W)});return function(We){return Le.apply(this,arguments)}}(),J=Le=>{const W=Le.enteringEl,We=Le.leavingEl;W.classList.remove("ion-page-invisible"),W.style.removeProperty("pointer-events"),void 0!==We&&(We.classList.remove("ion-page-invisible"),We.style.removeProperty("pointer-events"))},Q=function(){var Le=(0,i.c)(function*(W){return W.leavingEl&&W.animated&&0!==W.duration?W.animationBuilder?W.animationBuilder:"ios"===W.mode?(yield Promise.resolve().then(a.bind(a,42408))).iosTransitionAnimation:(yield Promise.resolve().then(a.bind(a,6200))).mdTransitionAnimation:void 0});return function(We){return Le.apply(this,arguments)}}(),we=function(){var Le=(0,i.c)(function*(W,We){yield Y(We,!0);const At=W(We.baseEl,We);pe(We.enteringEl,We.leavingEl);const Ut=yield Ye(At,We);return We.progressCallback&&We.progressCallback(void 0),Ut&&ae(We.enteringEl,We.leavingEl),{hasCompleted:Ut,animation:At}});return function(We,At){return Le.apply(this,arguments)}}(),de=function(){var Le=(0,i.c)(function*(W){const We=W.enteringEl,At=W.leavingEl;return yield Y(W,!1),pe(We,At),ae(We,At),{hasCompleted:!0}});return function(We){return Le.apply(this,arguments)}}(),Y=function(){var Le=(0,i.c)(function*(W,We){(void 0!==W.deepWait?W.deepWait:We)&&(yield Promise.all([Ie(W.enteringEl),Ie(W.leavingEl)])),yield Se(W.viewIsReady,W.enteringEl)});return function(We,At){return Le.apply(this,arguments)}}(),Se=function(){var Le=(0,i.c)(function*(W,We){W&&(yield W(We))});return function(We,At){return Le.apply(this,arguments)}}(),Ye=(Le,W)=>{const We=W.progressCallback,At=new Promise(Ut=>{Le.onFinish(it=>Ut(1===it))});return We?(Le.progressStart(!0),We(Le)):Le.play(),At},pe=(Le,W)=>{Ve(W,P),Ve(Le,"ionViewWillEnter")},ae=(Le,W)=>{Ve(Le,"ionViewDidEnter"),Ve(W,S)},Ve=(Le,W)=>{if(Le){const We=new CustomEvent(W,{bubbles:!1,cancelable:!1});
1Le.dispatchEvent(We)}},Ne=()=>new Promise(Le=>(0,b.r)(()=>(0,b.r)(()=>Le()))),Ie=function(){var Le=(0,i.c)(function*(W){const We=W;if(We){if(null!=We.componentOnReady){if(null!=(yield We.componentOnReady()))return}else if(null!=We.__registerHost)return void(yield new Promise(Ut=>(0,b.r)(Ut)));yield Promise.all(Array.from(We.children).map(Ie))}});return function(We){return Le.apply(this,arguments)}}(),H=(Le,W)=>{W?(Le.setAttribute("aria-hidden","true"),Le.classList.add("ion-page-hidden")):(Le.hidden=!1,Le.removeAttribute("aria-hidden"),Le.classList.remove("ion-page-hidden"))},j=(Le,W,We)=>{void 0!==Le&&(Le.style.zIndex="back"===We?"99":"101"),void 0!==W&&(W.style.zIndex="100")},ye=Le=>Le.classList.contains("ion-page")?Le:Le.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||Le},52032:(B,G,a)=>{"use strict";a.d(G,{a:()=>v,b:()=>b,p:()=>i});const i=(_,...C)=>console.warn(`[Ionic Warning]: ${_}`,...C),v=(_,...C)=>console.error(`[Ionic Error]: ${_}`,...C),b=(_,...C)=>console.error(`<${_.tagName.toLowerCase()}> must be used inside ${C.join(" or ")}.`)},14829:(B,G,a)=>{"use strict";a.d(G,{d:()=>v,w:()=>i});const i=typeof window<"u"?window:void 0,v=typeof document<"u"?document:void 0},96040:(B,G,a)=>{"use strict";a.d(G,{B:()=>ee,H:()=>it,a:()=>yi,b:()=>Di,c:()=>Lt,d:()=>xt,e:()=>jr,f:()=>ge,g:()=>Dt,h:()=>At,i:()=>et,j:()=>te,r:()=>mi,w:()=>gn});var i=a(73448);let _,C,P,S=!1,R=!1,k=!1,x=!1,D=!1;const ee={isDev:!1,isBrowser:!0,isServer:!1,isTesting:!1},te=Xe=>{const Tt=new URL(Xe,Ii.$resourcesUrl$);return Tt.origin!==si.location.origin?Tt.href:Tt.pathname},Ye="s-id",pe="sty-id",Ne="slot-fb{display:contents}slot-fb[hidden]{display:none}",Ie="http://www.w3.org/1999/xlink",H={},W=Xe=>"object"==(Xe=typeof Xe)||"function"===Xe;function We(Xe){var Tt,An,Nn;return null!==(Nn=null===(An=null===(Tt=Xe.head)||void 0===Tt?void 0:Tt.querySelector('meta[name="csp-nonce"]'))||void 0===An?void 0:An.getAttribute("content"))&&void 0!==Nn?Nn:void 0}const At=(Xe,Tt,...An)=>{let Nn=null,ir=null,pr=null,Tr=!1,Gr=!1;const qr=[],ri=zt=>{for(let en=0;en<zt.length;en++)Nn=zt[en],Array.isArray(Nn)?ri(Nn):null!=Nn&&"boolean"!=typeof Nn&&((Tr="function"!=typeof Xe&&!W(Nn))&&(Nn=String(Nn)),Tr&&Gr?qr[qr.length-1].$text$+=Nn:qr.push(Tr?Ut(null,Nn):Nn),Gr=Tr)};if(ri(An),Tt){Tt.key&&(ir=Tt.key),Tt.name&&(pr=Tt.name);{const zt=Tt.className||Tt.class;zt&&(Tt.class="object"!=typeof zt?zt:Object.keys(zt).filter(en=>zt[en]).join(" "))}}if("function"==typeof Xe)return Xe(null===Tt?{}:Tt,qr,se);const Hr=Ut(Xe,null);return Hr.$attrs$=Tt,qr.length>0&&(Hr.$children$=qr),Hr.$key$=ir,Hr.$name$=pr,Hr},Ut=(Xe,Tt)=>({$flags$:0,$tag$:Xe,$text$:Tt,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}),it={},se={forEach:(Xe,Tt)=>Xe.map(ce).forEach(Tt),map:(Xe,Tt)=>Xe.map(ce).map(Tt).map(K)},ce=Xe=>({vattrs:Xe.$attrs$,vchildren:Xe.$children$,vkey:Xe.$key$,vname:Xe.$name$,vtag:Xe.$tag$,vtext:Xe.$text$}),K=Xe=>{if("function"==typeof Xe.vtag){const An=Object.assign({},Xe.vattrs);return Xe.vkey&&(An.key=Xe.vkey),Xe.vname&&(An.name=Xe.vname),At(Xe.vtag,An,...Xe.vchildren||[])}const Tt=Ut(Xe.vtag,Xe.vtext);return Tt.$attrs$=Xe.vattrs,Tt.$children$=Xe.vchildren,Tt.$key$=Xe.vkey,Tt.$name$=Xe.vname,Tt},Pe=(Xe,Tt,An,Nn,ir,pr,Tr)=>{let Gr,qr,ri,Hr;if(1===pr.nodeType){for(Gr=pr.getAttribute("c-id"),Gr&&(qr=Gr.split("."),(qr[0]===Tr||"0"===qr[0])&&(ri={$flags$:0,$hostId$:qr[0],$nodeId$:qr[1],$depth$:qr[2],$index$:qr[3],$tag$:pr.tagName.toLowerCase(),$elm$:pr,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},Tt.push(ri),pr.removeAttribute("c-id"),Xe.$children$||(Xe.$children$=[]),Xe.$children$[ri.$index$]=ri,Xe=ri,Nn&&"0"===ri.$depth$&&(Nn[ri.$index$]=ri.$elm$))),Hr=pr.childNodes.length-1;Hr>=0;Hr--)Pe(Xe,Tt,An,Nn,ir,pr.childNodes[Hr],Tr);if(pr.shadowRoot)for(Hr=pr.shadowRoot.childNodes.length-1;Hr>=0;Hr--)Pe(Xe,Tt,An,Nn,ir,pr.shadowRoot.childNodes[Hr],Tr)}else if(8===pr.nodeType)qr=pr.nodeValue.split("."),(qr[1]===Tr||"0"===qr[1])&&(Gr=qr[0],ri={$flags$:0,$hostId$:qr[1],$nodeId$:qr[2],$depth$:qr[3],$index$:qr[4],$elm$:pr,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===Gr?(ri.$elm$=pr.nextSibling,ri.$elm$&&3===ri.$elm$.nodeType&&(ri.$text$=ri.$elm$.textContent,Tt.push(ri),pr.remove(),Xe.$children$||(Xe.$children$=[]),Xe.$children$[ri.$index$]=ri,Nn&&"0"===ri.$depth$&&(Nn[ri.$index$]=ri.$elm$))):ri.$hostId$===Tr&&("s"===Gr?(ri.$tag$="slot",pr["s-sn"]=qr[5]?ri.$name$=qr[5]:"",pr["s-sr"]=!0,Nn&&(ri.$elm$=oi.createElement(ri.$tag$),ri.$name$&&ri.$elm$.setAttribute("name",ri.$name$),pr.parentNode.insertBefore(ri.$elm$,pr),pr.remove(),"0"===ri.$depth$&&(Nn[ri.$index$]=ri.$elm$)),An.push(ri),Xe.$children$||(Xe.$children$=[]),Xe.$children$[ri.$index$]=ri):"r"
1===Gr&&(Nn?pr.remove():(ir["s-cr"]=pr,pr["s-cn"]=!0))));else if(Xe&&"style"===Xe.$tag$){const zt=Ut(null,pr.textContent);zt.$elm$=pr,zt.$index$="0",Xe.$children$=[zt]}},De=(Xe,Tt)=>{if(1===Xe.nodeType){let An=0;for(;An<Xe.childNodes.length;An++)De(Xe.childNodes[An],Tt);if(Xe.shadowRoot)for(An=0;An<Xe.shadowRoot.childNodes.length;An++)De(Xe.shadowRoot.childNodes[An],Tt)}else if(8===Xe.nodeType){const An=Xe.nodeValue.split(".");"o"===An[0]&&(Tt.set(An[1]+"."+An[2],Xe),Xe.nodeValue="",Xe["s-en"]=An[3])}},Lt=Xe=>kr.push(Xe),Dt=Xe=>wr(Xe).$modeName$,ge=Xe=>wr(Xe).$hostElement$,xt=(Xe,Tt,An)=>{const Nn=ge(Xe);return{emit:ir=>pt(Nn,Tt,{bubbles:!!(4&An),composed:!!(2&An),cancelable:!!(1&An),detail:ir})}},pt=(Xe,Tt,An)=>{const Nn=Ii.ce(Tt,An);return Xe.dispatchEvent(Nn),Nn},rn=new WeakMap,cn=(Xe,Tt,An)=>{let Nn=Cn.get(Xe);Re&&An?(Nn=Nn||new CSSStyleSheet,"string"==typeof Nn?Nn=Tt:Nn.replaceSync(Tt)):Nn=Tt,Cn.set(Xe,Nn)},mn=(Xe,Tt,An)=>{var Nn;const ir=lt(Tt,An),pr=Cn.get(ir);if(Xe=11===Xe.nodeType?Xe:oi,pr)if("string"==typeof pr){let Gr,Tr=rn.get(Xe=Xe.head||Xe);if(Tr||rn.set(Xe,Tr=new Set),!Tr.has(ir)){if(Xe.host&&(Gr=Xe.querySelector(`[${pe}="${ir}"]`)))Gr.innerHTML=pr;else{Gr=oi.createElement("style"),Gr.innerHTML=pr;const qr=null!==(Nn=Ii.$nonce$)&&void 0!==Nn?Nn:We(oi);null!=qr&&Gr.setAttribute("nonce",qr),Xe.insertBefore(Gr,Xe.querySelector("link"))}4&Tt.$flags$&&(Gr.innerHTML+=Ne),Tr&&Tr.add(ir)}}else Xe.adoptedStyleSheets.includes(pr)||(Xe.adoptedStyleSheets=[...Xe.adoptedStyleSheets,pr]);return ir},lt=(Xe,Tt)=>"sc-"+(Tt&&32&Xe.$flags$?Xe.$tagName$+"-"+Tt:Xe.$tagName$),rt=Xe=>Xe.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),kt=(Xe,Tt,An,Nn,ir,pr)=>{if(An!==Nn){let Tr=Mi(Xe,Tt),Gr=Tt.toLowerCase();if("class"===Tt){const qr=Xe.classList,ri=Yn(An),Hr=Yn(Nn);qr.remove(...ri.filter(zt=>zt&&!Hr.includes(zt))),qr.add(...Hr.filter(zt=>zt&&!ri.includes(zt)))}else if("style"===Tt){for(const qr in An)(!Nn||null==Nn[qr])&&(qr.includes("-")?Xe.style.removeProperty(qr):Xe.style[qr]="");for(const qr in Nn)(!An||Nn[qr]!==An[qr])&&(qr.includes("-")?Xe.style.setProperty(qr,Nn[qr]):Xe.style[qr]=Nn[qr])}else if("key"!==Tt)if("ref"===Tt)Nn&&Nn(Xe);else if(Tr||"o"!==Tt[0]||"n"!==Tt[1]){const qr=W(Nn);if((Tr||qr&&null!==Nn)&&!ir)try{if(Xe.tagName.includes("-"))Xe[Tt]=Nn;else{const Hr=Nn??"";"list"===Tt?Tr=!1:(null==An||Xe[Tt]!=Hr)&&(Xe[Tt]=Hr)}}catch{}let ri=!1;Gr!==(Gr=Gr.replace(/^xlink\:?/,""))&&(Tt=Gr,ri=!0),null==Nn||!1===Nn?(!1!==Nn||""===Xe.getAttribute(Tt))&&(ri?Xe.removeAttributeNS(Ie,Tt):Xe.removeAttribute(Tt)):(!Tr||4&pr||ir)&&!qr&&(Nn=!0===Nn?"":Nn,ri?Xe.setAttributeNS(Ie,Tt,Nn):Xe.setAttribute(Tt,Nn))}else if(Tt="-"===Tt[2]?Tt.slice(3):Mi(si,Gr)?Gr.slice(2):Gr[2]+Tt.slice(3),An||Nn){const qr=Tt.endsWith(bn);Tt=Tt.replace(Hn,""),An&&Ii.rel(Xe,Tt,An,qr),Nn&&Ii.ael(Xe,Tt,Nn,qr)}}},an=/\s/,Yn=Xe=>Xe?Xe.split(an):[],bn="Capture",Hn=new RegExp(bn+"$"),Fn=(Xe,Tt,An,Nn)=>{const ir=11===Tt.$elm$.nodeType&&Tt.$elm$.host?Tt.$elm$.host:Tt.$elm$,pr=Xe&&Xe.$attrs$||H,Tr=Tt.$attrs$||H;for(Nn in pr)Nn in Tr||kt(ir,Nn,pr[Nn],void 0,An,Tt.$flags$);for(Nn in Tr)kt(ir,Nn,pr[Nn],Tr[Nn],An,Tt.$flags$)},On=(Xe,Tt,An,Nn)=>{const ir=Tt.$children$[An];let Tr,Gr,qr,pr=0;if(S||(k=!0,"slot"===ir.$tag$&&(_&&Nn.classList.add(_+"-s"),ir.$flags$|=ir.$children$?2:1)),null!==ir.$text$)Tr=ir.$elm$=oi.createTextNode(ir.$text$);else if(1&ir.$flags$)Tr=ir.$elm$=oi.createTextNode("");else{if(x||(x="svg"===ir.$tag$),Tr=ir.$elm$=oi.createElementNS(x?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&ir.$flags$?"slot-fb":ir.$tag$),x&&"foreignObject"===ir.$tag$&&(x=!1),Fn(null,ir,x),(Xe=>null!=Xe)(_)&&Tr["s-si"]!==_&&Tr.classList.add(Tr["s-si"]=_),ir.$children$)for(pr=0;pr<ir.$children$.length;++pr)Gr=On(Xe,ir,pr,Tr),Gr&&Tr.appendChild(Gr);"svg"===ir.$tag$?x=!1:"foreignObject"===Tr.tagName&&(x=!0)}return Tr["s-hn"]=P,3&ir.$flags$&&(Tr["s-sr"]=!0,Tr["s-cr"]=C,Tr["s-sn"]=ir.$name$||"",qr=Xe&&Xe.$children$&&Xe.$children$[An],qr&&qr.$tag$===ir.$tag$&&Xe.$elm$&&gr(Xe.$elm$,!1)),Tr},gr=(Xe,Tt)=>{Ii.$flags$|=1;const An=Xe.childNodes;for(let Nn=An.length-1;Nn>=0;Nn--){const ir=An[Nn];ir["s-hn"]!==P&&ir["s-ol"]&&(Kr(ir).insertBefore(ir,Nr(ir)),ir["s-ol"].remove(),ir["s-ol"]=void 0,ir["s-sh"]=void 0,k=!0),Tt&&gr(ir,Tt)}Ii.$flags$&=-2},Mr=(Xe,Tt,An,Nn,ir,pr)=>{let Gr,Tr=Xe["s-cr"]&&Xe["s-cr"].parentNode||Xe;for(Tr.shadowRoot&&Tr.tagName===P&&(Tr=Tr.shadowRoot);ir<=pr;++ir)Nn[ir]&&(Gr=On(null,An,ir,Xe),Gr&&(Nn[ir].$elm$=Gr,Tr.insertBefore(Gr,Nr(Tt))))},Vr=(Xe,Tt,An)=>{for(let Nn=Tt;Nn<=An;++Nn){const ir=Xe[Nn];if(ir){const pr=ir.$elm$;Qe(ir),pr&&(R=!0,pr["s-ol"]?pr["s-ol"].remove():gr(pr,!0),pr.remove())}}},ti=(Xe,Tt,An=!1)=>Xe.$tag$===Tt.$tag$&&("slot"===Xe.$tag$?Xe.$name$===Tt.$name$:!!An||Xe.$key$===Tt.$key$),Nr=Xe=>Xe&&Xe["s-ol"]||Xe,Kr=Xe=>(Xe["s-ol"]?Xe["s-ol"]:Xe).parentNode,Jr=(Xe,Tt,An=!1)=>{const Nn=Tt.$elm$=Xe.$elm$,ir=Xe.$children$,pr=Tt.$children$,Tr=Tt.$tag$,Gr=Tt.$text$;let qr;null===Gr?(x="svg"===Tr||"foreignObject"!==Tr&&x,"slot"===Tr&&!S||Fn(Xe,Tt,x),null!==ir&&null!==pr?((Xe,Tt,An,Nn,ir=!1)=>{let _t,hn,pr=0,Tr=0,Gr=0,qr=0,ri=Tt.length-1,Hr=Tt[0],zt=Tt[ri],en=Nn.length-1,bt=Nn[0],It=Nn[en];for(;pr<=ri&&Tr<=en;)if(null==Hr)Hr=Tt[++pr];else if(null==zt)zt=Tt[--ri];else if(null==bt)bt=Nn[++Tr];else if(null==It)It=Nn[--en];else if(ti(Hr,bt,ir))Jr(Hr,bt,ir),Hr=Tt[++pr],bt=Nn[++Tr];else if(ti(zt,It,ir))Jr(zt,It,ir),zt=Tt[--ri],It=Nn[--en];
1else if(ti(Hr,It,ir))("slot"===Hr.$tag$||"slot"===It.$tag$)&&gr(Hr.$elm$.parentNode,!1),Jr(Hr,It,ir),Xe.insertBefore(Hr.$elm$,zt.$elm$.nextSibling),Hr=Tt[++pr],It=Nn[--en];else if(ti(zt,bt,ir))("slot"===Hr.$tag$||"slot"===It.$tag$)&&gr(zt.$elm$.parentNode,!1),Jr(zt,bt,ir),Xe.insertBefore(zt.$elm$,Hr.$elm$),zt=Tt[--ri],bt=Nn[++Tr];else{for(Gr=-1,qr=pr;qr<=ri;++qr)if(Tt[qr]&&null!==Tt[qr].$key$&&Tt[qr].$key$===bt.$key$){Gr=qr;break}Gr>=0?(hn=Tt[Gr],hn.$tag$!==bt.$tag$?_t=On(Tt&&Tt[Tr],An,Gr,Xe):(Jr(hn,bt,ir),Tt[Gr]=void 0,_t=hn.$elm$),bt=Nn[++Tr]):(_t=On(Tt&&Tt[Tr],An,Tr,Xe),bt=Nn[++Tr]),_t&&Kr(Hr.$elm$).insertBefore(_t,Nr(Hr.$elm$))}pr>ri?Mr(Xe,null==Nn[en+1]?null:Nn[en+1].$elm$,An,Nn,Tr,en):Tr>en&&Vr(Tt,pr,ri)})(Nn,ir,Tt,pr,An):null!==pr?(null!==Xe.$text$&&(Nn.textContent=""),Mr(Nn,null,Tt,pr,0,pr.length-1)):null!==ir&&Vr(ir,0,ir.length-1),x&&"svg"===Tr&&(x=!1)):(qr=Nn["s-cr"])?qr.parentNode.textContent=Gr:Xe.$text$!==Gr&&(Nn.data=Gr)},sr=Xe=>{const Tt=Xe.childNodes;for(const An of Tt)if(1===An.nodeType){if(An["s-sr"]){const Nn=An["s-sn"];An.hidden=!1;for(const ir of Tt)if(ir!==An)if(ir["s-hn"]!==An["s-hn"]||""!==Nn){if(1===ir.nodeType&&(Nn===ir.getAttribute("slot")||Nn===ir["s-sn"])){An.hidden=!0;break}}else if(1===ir.nodeType||3===ir.nodeType&&""!==ir.textContent.trim()){An.hidden=!0;break}}sr(An)}},or=[],zr=Xe=>{let Tt,An,Nn;for(const ir of Xe.childNodes){if(ir["s-sr"]&&(Tt=ir["s-cr"])&&Tt.parentNode){An=Tt.parentNode.childNodes;const pr=ir["s-sn"];for(Nn=An.length-1;Nn>=0;Nn--)if(Tt=An[Nn],!Tt["s-cn"]&&!Tt["s-nr"]&&Tt["s-hn"]!==ir["s-hn"])if(sn(Tt,pr)){let Tr=or.find(Gr=>Gr.$nodeToRelocate$===Tt);R=!0,Tt["s-sn"]=Tt["s-sn"]||pr,Tr?(Tr.$nodeToRelocate$["s-sh"]=ir["s-hn"],Tr.$slotRefNode$=ir):(Tt["s-sh"]=ir["s-hn"],or.push({$slotRefNode$:ir,$nodeToRelocate$:Tt})),Tt["s-sr"]&&or.map(Gr=>{sn(Gr.$nodeToRelocate$,Tt["s-sn"])&&(Tr=or.find(qr=>qr.$nodeToRelocate$===Tt),Tr&&!Gr.$slotRefNode$&&(Gr.$slotRefNode$=Tr.$slotRefNode$))})}else or.some(Tr=>Tr.$nodeToRelocate$===Tt)||or.push({$nodeToRelocate$:Tt})}1===ir.nodeType&&zr(ir)}},sn=(Xe,Tt)=>1===Xe.nodeType?null===Xe.getAttribute("slot")&&""===Tt||Xe.getAttribute("slot")===Tt:Xe["s-sn"]===Tt||""===Tt,Qe=Xe=>{Xe.$attrs$&&Xe.$attrs$.ref&&Xe.$attrs$.ref(null),Xe.$children$&&Xe.$children$.map(Qe)},Xt=(Xe,Tt)=>{Tt&&!Xe.$onRenderResolve$&&Tt["s-p"]&&Tt["s-p"].push(new Promise(An=>Xe.$onRenderResolve$=An))},wn=(Xe,Tt)=>{if(Xe.$flags$|=16,!(4&Xe.$flags$))return Xt(Xe,Xe.$ancestorComponent$),gn(()=>dr(Xe,Tt));Xe.$flags$|=512},dr=(Xe,Tt)=>{const Nn=Xe.$lazyInstance$;let ir;return Tt&&(Xe.$flags$|=256,Xe.$queuedListeners$&&(Xe.$queuedListeners$.map(([pr,Tr])=>Fe(Nn,pr,Tr)),Xe.$queuedListeners$=void 0),ir=Fe(Nn,"componentWillLoad")),ir=vn(ir,()=>Fe(Nn,"componentWillRender")),vn(ir,()=>Ct(Xe,Nn,Tt))},vn=(Xe,Tt)=>jt(Xe)?Xe.then(Tt):Tt(),jt=Xe=>Xe instanceof Promise||Xe&&Xe.then&&"function"==typeof Xe.then,Ct=function(){var Xe=(0,i.c)(function*(Tt,An,Nn){var ir;const pr=Tt.$hostElement$,Gr=pr["s-rc"];Nn&&(Xe=>{const Tt=Xe.$cmpMeta$,An=Xe.$hostElement$,Nn=Tt.$flags$,pr=mn(An.shadowRoot?An.shadowRoot:An.getRootNode(),Tt,Xe.$modeName$);10&Nn&&(An["s-sc"]=pr,An.classList.add(pr+"-h"),2&Nn&&An.classList.add(pr+"-s"))})(Tt);Mt(Tt,An,pr,Nn),Gr&&(Gr.map(ri=>ri()),pr["s-rc"]=void 0);{const ri=null!==(ir=pr["s-p"])&&void 0!==ir?ir:[],Hr=()=>Ze(Tt);0===ri.length?Hr():(Promise.all(ri).then(Hr),Tt.$flags$|=4,ri.length=0)}});return function(An,Nn,ir){return Xe.apply(this,arguments)}}(),Mt=(Xe,Tt,An,Nn)=>{try{Tt=Tt.render&&Tt.render(),Xe.$flags$&=-17,Xe.$flags$|=2,((Xe,Tt,An=!1)=>{var Nn,ir,pr,Tr;const Gr=Xe.$hostElement$,qr=Xe.$cmpMeta$,ri=Xe.$vnode$||Ut(null,null),Hr=(Xe=>Xe&&Xe.$tag$===it)(Tt)?Tt:At(null,null,Tt);if(P=Gr.tagName,qr.$attrsToReflect$&&(Hr.$attrs$=Hr.$attrs$||{},qr.$attrsToReflect$.map(([zt,en])=>Hr.$attrs$[en]=Gr[zt])),An&&Hr.$attrs$)for(const zt of Object.keys(Hr.$attrs$))Gr.hasAttribute(zt)&&!["key","ref","style","class"].includes(zt)&&(Hr.$attrs$[zt]=Gr[zt]);if(Hr.$tag$=null,Hr.$flags$|=4,Xe.$vnode$=Hr,Hr.$elm$=ri.$elm$=Gr.shadowRoot||Gr,_=Gr["s-sc"],S=0!=(1&qr.$flags$),C=Gr["s-cr"],R=!1,Jr(ri,Hr,An),Ii.$flags$|=1,k
1){zr(Hr.$elm$);for(const zt of or){const en=zt.$nodeToRelocate$;if(!en["s-ol"]){const bt=oi.createTextNode("");bt["s-nr"]=en,en.parentNode.insertBefore(en["s-ol"]=bt,en)}}for(const zt of or){const en=zt.$nodeToRelocate$,bt=zt.$slotRefNode$;if(bt){const It=bt.parentNode;let _t=bt.nextSibling;{let hn=null===(Nn=en["s-ol"])||void 0===Nn?void 0:Nn.previousSibling;for(;hn;){let T=null!==(ir=hn["s-nr"])&&void 0!==ir?ir:null;if(T&&T["s-sn"]===en["s-sn"]&&It===T.parentNode&&(T=T.nextSibling,!T||!T["s-nr"])){_t=T;break}hn=hn.previousSibling}}(!_t&&It!==en.parentNode||en.nextSibling!==_t)&&en!==_t&&(!en["s-hn"]&&en["s-ol"]&&(en["s-hn"]=en["s-ol"].parentNode.nodeName),It.insertBefore(en,_t),1===en.nodeType&&(en.hidden=null!==(pr=en["s-ih"])&&void 0!==pr&&pr))}else 1===en.nodeType&&(An&&(en["s-ih"]=null!==(Tr=en.hidden)&&void 0!==Tr&&Tr),en.hidden=!0)}}R&&sr(Hr.$elm$),Ii.$flags$&=-2,or.length=0,C=void 0})(Xe,Tt,Nn)}catch(ir){Qt(ir,Xe.$hostElement$)}return null},Ze=Xe=>{const An=Xe.$hostElement$,ir=Xe.$lazyInstance$,pr=Xe.$ancestorComponent$;Fe(ir,"componentDidRender"),64&Xe.$flags$?Fe(ir,"componentDidUpdate"):(Xe.$flags$|=64,ft(An),Fe(ir,"componentDidLoad"),Xe.$onReadyResolve$(An),pr||Zt()),Xe.$onInstanceResolve$(An),Xe.$onRenderResolve$&&(Xe.$onRenderResolve$(),Xe.$onRenderResolve$=void 0),512&Xe.$flags$&&Br(()=>wn(Xe,!1)),Xe.$flags$&=-517},et=Xe=>{{const Tt=wr(Xe),An=Tt.$hostElement$.isConnected;return An&&2==(18&Tt.$flags$)&&wn(Tt,!1),An}},Zt=Xe=>{ft(oi.documentElement),Br(()=>pt(si,"appload",{detail:{namespace:"ionic"}}))},Fe=(Xe,Tt,An)=>{if(Xe&&Xe[Tt])try{return Xe[Tt](An)}catch(Nn){Qt(Nn)}},ft=Xe=>Xe.classList.add("hydrated"),Bn=(Xe,Tt,An)=>{var Nn;const ir=Xe.prototype;if(Tt.$members$){Xe.watchers&&(Tt.$watchers$=Xe.watchers);const pr=Object.entries(Tt.$members$);if(pr.map(([Tr,[Gr]])=>{31&Gr||2&An&&32&Gr?Object.defineProperty(ir,Tr,{get(){return((Xe,Tt)=>wr(this).$instanceValues$.get(Tt))(0,Tr)},set(qr){((Xe,Tt,An,Nn)=>{const ir=wr(Xe),pr=ir.$hostElement$,Tr=ir.$instanceValues$.get(Tt),Gr=ir.$flags$,qr=ir.$lazyInstance$;An=((Xe,Tt)=>null==Xe||W(Xe)?Xe:4&Tt?"false"!==Xe&&(""===Xe||!!Xe):2&Tt?parseFloat(Xe):1&Tt?String(Xe):Xe)(An,Nn.$members$[Tt][0]);const ri=Number.isNaN(Tr)&&Number.isNaN(An);if((!(8&Gr)||void 0===Tr)&&An!==Tr&&!ri&&(ir.$instanceValues$.set(Tt,An),qr)){if(Nn.$watchers$&&128&Gr){const zt=Nn.$watchers$[Tt];zt&&zt.map(en=>{try{qr[en](An,Tr,Tt)}catch(bt){Qt(bt,pr)}})}2==(18&Gr)&&wn(ir,!1)}})(this,Tr,qr,Tt)},configurable:!0,enumerable:!0}):1&An&&64&Gr&&Object.defineProperty(ir,Tr,{value(...qr){var ri;const Hr=wr(this);return null===(ri=Hr?.$onInstancePromise$)||void 0===ri?void 0:ri.then(()=>{var zt;return null===(zt=Hr.$lazyInstance$)||void 0===zt?void 0:zt[Tr](...qr)})}})}),1&An){const Tr=new Map;ir.attributeChangedCallback=function(Gr,qr,ri){Ii.jmp(()=>{var Hr;const zt=Tr.get(Gr);if(this.hasOwnProperty(zt))ri=this[zt],delete this[zt];else{if(ir.hasOwnProperty(zt)&&"number"==typeof this[zt]&&this[zt]==ri)return;if(null==zt){const en=wr(this),bt=en?.$flags$;if(bt&&!(8&bt)&&128&bt&&ri!==qr){const It=en.$lazyInstance$,_t=null===(Hr=Tt.$watchers$)||void 0===Hr?void 0:Hr[Gr];_t?.forEach(hn=>{null!=It[hn]&&It[hn].call(It,ri,qr,Gr)})}return}}this[zt]=(null!==ri||"boolean"!=typeof this[zt])&&ri})},Xe.observedAttributes=Array.from(new Set([...Object.keys(null!==(Nn=Tt.$watchers$)&&void 0!==Nn?Nn:{}),...pr.filter(([Gr,qr])=>15&qr[0]).map(([Gr,qr])=>{var ri;const Hr=qr[1]||Gr;return Tr.set(Hr,Gr),512&qr[0]&&(null===(ri=Tt.$attrsToReflect$)||void 0===ri||ri.push([Gr,Hr])),Hr})]))}}return Xe},mr=function(){var Xe=(0,i.c)(function*(Tt,An,Nn,ir){let pr;if(!(32&An.$flags$)){if(An.$flags$|=32,Nn.$lazyBundleId$){if(pr=Ln(Nn),pr.then){const Hr=()=>{};pr=yield pr,Hr()}pr.isProxied||(Nn.$watchers$=pr.watchers,Bn(pr,Nn,2),pr.isProxied=!0);const ri=()=>{};An.$flags$|=8;try{new pr(An)}catch(Hr){Qt(Hr)}An.$flags$&=-9,An.$flags$|=128,ri(),tr(An.$lazyInstance$)}else pr=Tt.constructor,customElements.whenDefined(Nn.$tagName$).then(()=>An.$flags$|=128);if(pr.style){let ri=pr.style;"string"!=typeof ri&&(ri=ri[An.$modeName$=(Xe=>kr.map(Tt=>Tt(Xe)).find(Tt=>!!Tt))(Tt)]);const Hr=lt(Nn,An.$modeName$);
1if(!Cn.has(Hr)){const zt=()=>{};cn(Hr,ri,!!(1&Nn.$flags$)),zt()}}}const Tr=An.$ancestorComponent$,Gr=()=>wn(An,!0);Tr&&Tr["s-rc"]?Tr["s-rc"].push(Gr):Gr()});return function(An,Nn,ir,pr){return Xe.apply(this,arguments)}}(),tr=Xe=>{Fe(Xe,"connectedCallback")},ur=Xe=>{const Tt=Xe["s-cr"]=oi.createComment("");Tt["s-cn"]=!0,Xe.insertBefore(Tt,Xe.firstChild)},Er=Xe=>{Fe(Xe,"disconnectedCallback")},Ai=function(){var Xe=(0,i.c)(function*(Tt){if(!(1&Ii.$flags$)){const An=wr(Tt);An.$rmListeners$&&(An.$rmListeners$.map(Nn=>Nn()),An.$rmListeners$=void 0),An?.$lazyInstance$?Er(An.$lazyInstance$):An?.$onReadyPromise$&&An.$onReadyPromise$.then(()=>Er(An.$lazyInstance$))}});return function(An){return Xe.apply(this,arguments)}}(),Di=(Xe,Tt={})=>{var An;const ir=[],pr=Tt.exclude||[],Tr=si.customElements,Gr=oi.head,qr=Gr.querySelector("meta[charset]"),ri=oi.createElement("style"),Hr=[],zt=oi.querySelectorAll(`[${pe}]`);let en,bt=!0,It=0;for(Object.assign(Ii,Tt),Ii.$resourcesUrl$=new URL(Tt.resourcesUrl||"./",oi.baseURI).href,Ii.$flags$|=2;It<zt.length;It++)cn(zt[It].getAttribute(pe),rt(zt[It].innerHTML),!0);let _t=!1;if(Xe.map(hn=>{hn[1].map(T=>{var st;const Z={$flags$:T[0],$tagName$:T[1],$members$:T[2],$listeners$:T[3]};4&Z.$flags$&&(_t=!0),Z.$members$=T[2],Z.$listeners$=T[3],Z.$attrsToReflect$=[],Z.$watchers$=null!==(st=T[4])&&void 0!==st?st:{};const wt=Z.$tagName$,Vt=class extends HTMLElement{constructor(Sr){super(Sr),di(Sr=this,Z),1&Z.$flags$&&Sr.attachShadow({mode:"open",delegatesFocus:!!(16&Z.$flags$)})}connectedCallback(){en&&(clearTimeout(en),en=null),bt?Hr.push(this):Ii.jmp(()=>(Xe=>{if(!(1&Ii.$flags$)){const Tt=wr(Xe),An=Tt.$cmpMeta$,Nn=()=>{};if(1&Tt.$flags$)Pi(Xe,Tt,An.$listeners$),Tt?.$lazyInstance$?tr(Tt.$lazyInstance$):Tt?.$onReadyPromise$&&Tt.$onReadyPromise$.then(()=>tr(Tt.$lazyInstance$));else{let ir;if(Tt.$flags$|=1,ir=Xe.getAttribute(Ye),ir){if(1&An.$flags$){const pr=mn(Xe.shadowRoot,An,Xe.getAttribute("s-mode"));Xe.classList.remove(pr+"-h",pr+"-s")}((Xe,Tt,An,Nn)=>{const pr=Xe.shadowRoot,Tr=[],qr=pr?[]:null,ri=Nn.$vnode$=Ut(Tt,null);Ii.$orgLocNodes$||De(oi.body,Ii.$orgLocNodes$=new Map),Xe[Ye]=An,Xe.removeAttribute(Ye),Pe(ri,Tr,[],qr,Xe,Xe,An),Tr.map(Hr=>
1{const zt=Hr.$hostId$+"."+Hr.$nodeId$,en=Ii.$orgLocNodes$.get(zt),bt=Hr.$elm$;en&&on&&""===en["s-en"]&&en.parentNode.insertBefore(bt,en.nextSibling),pr||(bt["s-hn"]=Tt,en&&(bt["s-ol"]=en,bt["s-ol"]["s-nr"]=bt)),Ii.$orgLocNodes$.delete(zt)}),pr&&qr.map(Hr=>{Hr&&pr.appendChild(Hr)})})(Xe,An.$tagName$,ir,Tt)}ir||12&An.$flags$&&ur(Xe);{let pr=Xe;for(;pr=pr.parentNode||pr.host;)if(1===pr.nodeType&&pr.hasAttribute("s-id")&&pr["s-p"]||pr["s-p"]){Xt(Tt,Tt.$ancestorComponent$=pr);break}}An.$members$&&Object.entries(An.$members$).map(([pr,[Tr]])=>{if(31&Tr&&Xe.hasOwnProperty(pr)){const Gr=Xe[pr];delete Xe[pr],Xe[pr]=Gr}}),mr(Xe,Tt,An)}Nn()}})(this))}disconnectedCallback(){Ii.jmp(()=>Ai(this))}componentOnReady(){return wr(this).$onReadyPromise$}};Z.$lazyBundleId$=hn[0],!pr.includes(wt)&&!Tr.get(wt)&&(ir.push(wt),Tr.define(wt,Bn(Vt,Z,1)))})}),ir.length>0&&(_t&&(ri.textContent+=Ne),ri.textContent+=ir+"{visibility:hidden}.hydrated{visibility:inherit}",ri.innerHTML.length)){ri.setAttribute("data-styles","");const hn=null!==(An=Ii.$nonce$)&&void 0!==An?An:We(oi);null!=hn&&ri.setAttribute("nonce",hn),Gr.insertBefore(ri,qr?qr.nextSibling:Gr.firstChild)}bt=!1,Hr.length?Hr.map(hn=>hn.connectedCallback()):Ii.jmp(()=>en=setTimeout(Zt,30))},Pi=(Xe,Tt,An,Nn)=>{An&&An.map(([ir,pr,Tr])=>{const Gr=Ht(Xe,ir),qr=nr(Tt,Tr),ri=Wn(ir);Ii.ael(Gr,pr,qr,ri),(Tt.$rmListeners$=Tt.$rmListeners$||[]).push(()=>Ii.rel(Gr,pr,qr,ri))})},nr=(Xe,Tt)=>An=>{try{256&Xe.$flags$?Xe.$lazyInstance$[Tt](An):(Xe.$queuedListeners$=Xe.$queuedListeners$||[]).push([Tt,An])}catch(Nn){Qt(Nn)}},Ht=(Xe,Tt)=>4&Tt?oi:8&Tt?si:16&Tt?oi.body:Xe,Wn=Xe=>le?{passive:0!=(1&Xe),capture:0!=(2&Xe)}:0!=(2&Xe),jn=new WeakMap,wr=Xe=>jn.get(Xe),mi=(Xe,Tt)=>jn.set(Tt.$lazyInstance$=Xe,Tt),di=(Xe,Tt)=>{const An={$flags$:0,$hostElement$:Xe,$cmpMeta$:Tt,$instanceValues$:new Map};return An.$onInstancePromise$=new Promise(Nn=>An.$onInstanceResolve$=Nn),An.$onReadyPromise$=new Promise(Nn=>An.$onReadyResolve$=Nn),Xe["s-p"]=[],Xe["s-rc"]=[],Pi(Xe,An,Tt.$listeners$),jn.set(Xe,An)},Mi=(Xe,Tt)=>Tt in Xe,Qt=(Xe,Tt)=>(0,console.error)(Xe,Tt),_n=new Map,Ln=(Xe,Tt,An)=>{const Nn=Xe.$tagName$.replace(/-/g,"_"),ir=Xe.$lazyBundleId$,pr=_n.get(ir);return pr?pr[Nn]:a(21480)(`./${ir}.entry.js`).then(Tr=>(_n.set(ir,Tr),Tr[Nn]),Qt)},Cn=new Map,kr=[],si=typeof window<"u"?window:{},oi=si.document||{head:{}},Ii={$flags$:0,$resourcesUrl$:"",jmp:Xe=>Xe(),raf:Xe=>requestAnimationFrame(Xe),ael:(Xe,Tt,An,Nn)=>Xe.addEventListener(Tt,An,Nn),rel:(Xe,Tt,An,Nn)=>Xe.removeEventListener(Tt,An,Nn),ce:(Xe,Tt)=>new CustomEvent(Xe,Tt)},yi=Xe=>{Object.assign(Ii,Xe)},on=!0,le=(()=>{let Xe=!1;try{oi.addEventListener("e",null,Object.defineProperty({},"passive",{get(){Xe=!0}}))}catch{}return Xe})(),Re=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),Pt=[],ln=[],En=(Xe,Tt)=>An=>{Xe.push(An),D||(D=!0,Tt&&4&Ii.$flags$?Br(br):Ii.raf(br))},Mn=Xe=>{for(let Tt=0;Tt<Xe.length;Tt++)try{Xe[Tt](performance.now())}catch(An){Qt(An)}Xe.length=0},br=()=>{Mn(Pt),Mn(ln),(D=Pt.length>0)&&Ii.raf(br)},Br=Xe=>Promise.resolve(void 0).then(Xe),jr=En(Pt,!1),gn=En(ln,!0)},12072:(B,G,a)=>{"use strict";a.d(G,{a:()=>D,b:()=>Ut,c:()=>b,i:()=>it});var i=a(96040);class v{constructor(){this.m=new Map}reset(se){this.m=new Map(Object.entries(se))}get(se,ce){const K=this.m.get(se);return void 0!==K?K:ce}getBoolean(se,ce=!1){const K=this.m.get(se);return void 0===K?ce:"string"==typeof K?"true"===K:!!K}getNumber(se,ce){const K=parseFloat(this.m.get(se));return isNaN(K)?void 0!==ce?ce:NaN:K}set(se,ce){this.m.set(se,ce)}}const b=new v,R="ionic:",k="ionic-persist-config",D=(ue,se)=>("string"==typeof ue&&(se=ue,ue=void 0),(ue=>ee(ue))(ue).includes(se)),ee=(ue=window)=>{if(typeof ue>"u")return[];ue.Ionic=ue.Ionic||{};let se=ue.Ionic.platforms;return null==se&&(se=ue.Ionic.platforms=te(ue),se.forEach(ce=>ue.document.documentElement.classList.add(`plt-${ce}`))),se},te=ue=>{const se=b.get("platform");return Object.keys(We).filter(ce=>{const K=se?.[ce];return"function"==typeof K?K(ue):We[ce](ue)})},Q=ue=>!!(Le(ue,/iPad/i)||Le(ue,/Macintosh/i)&&ae(ue)),Y=ue=>Le(ue,/android|sink/i),ae=ue=>W(ue,"(any-pointer:coarse)"),Ne=ue=>Ie(ue)||H(ue),Ie=ue=>!!(ue.cordova||ue.phonegap||ue.PhoneGap),H=ue=>{const se=ue.Capacitor;return!!se?.isNative},Le=(ue,se)=>se.test(ue.navigator.userAgent),W=(ue,se)=>{var ce;return null===(ce=ue.matchMedia)||void 0===ce?void 0:ce.call(ue,se).matches},We={ipad:Q,iphone:ue=>Le(ue,/iPhone/i),ios:ue=>Le(ue,/iPhone|iPod/i)||Q(ue),android:Y,phablet:ue=>
1{const se=ue.innerWidth,ce=ue.innerHeight,K=Math.min(se,ce),_e=Math.max(se,ce);return K>390&&K<520&&_e>620&&_e<800},tablet:ue=>{const se=ue.innerWidth,ce=ue.innerHeight,K=Math.min(se,ce),_e=Math.max(se,ce);return Q(ue)||(ue=>Y(ue)&&!Le(ue,/mobile/i))(ue)||K>460&&K<820&&_e>780&&_e<1400},cordova:Ie,capacitor:H,electron:ue=>Le(ue,/electron/i),pwa:ue=>{var se;return!!(null!==(se=ue.matchMedia)&&void 0!==se&&se.call(ue,"(display-mode: standalone)").matches||ue.navigator.standalone)},mobile:ae,mobileweb:ue=>ae(ue)&&!Ne(ue),desktop:ue=>!ae(ue),hybrid:Ne};let At;const Ut=ue=>ue&&(0,i.g)(ue)||At,it=(ue={})=>{if(typeof window>"u")return;const se=window.document,ce=window,K=ce.Ionic=ce.Ionic||{},_e={};ue._ael&&(_e.ael=ue._ael),ue._rel&&(_e.rel=ue._rel),ue._ce&&(_e.ce=ue._ce),(0,i.a)(_e);const Pe=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(ue=>{try{const se=ue.sessionStorage.getItem(k);return null!==se?JSON.parse(se):{}}catch{return{}}})(ce)),{persistConfig:!1}),K.config),(ue=>{const se={};return ue.location.search.slice(1).split("&").map(ce=>ce.split("=")).map(([ce,K])=>[decodeURIComponent(ce),decodeURIComponent(K)]).filter(([ce])=>((ue,se)=>ue.substr(0,se.length)===se)(ce,R)).map(([ce,K])=>[ce.slice(6),K]).forEach(([ce,K])=>{se[ce]=K}),se})(ce)),ue);b.reset(Pe),b.getBoolean("persistConfig")&&((ue,se)=>{try{ue.sessionStorage.setItem(k,JSON.stringify(se))}catch{return}})(ce,Pe),ee(ce),K.config=b,K.mode=At=b.get("mode",se.documentElement.getAttribute("mode")||(D(ce,"ios")?"ios":"md")),b.set("mode",At),se.documentElement.setAttribute("mode",At),se.documentElement.classList.add(At),b.getBoolean("_testing")&&b.set("animated",!1);const De=Lt=>{var Dt;return null===(Dt=Lt.tagName)||void 0===Dt?void 0:Dt.startsWith("ION-")},ke=Lt=>["ios","md"].includes(Lt);(0,i.c)(Lt=>{for(;Lt;){const Dt=Lt.mode||Lt.getAttribute("mode");if(Dt){if(ke(Dt))return Dt;De(Lt)&&console.warn('Invalid ionic mode: "'+Dt+'", expected: "ios" or "md"')}Lt=Lt.parentElement}return At})}},42408:(B,G,a)=>{"use strict";a.r(G),a.d(G,{iosTransitionAnimation:()=>te,shadow:()=>S});var i=a(30388),v=a(34536);a(14829),a(96040);const P=Q=>document.querySelector(`${Q}.ion-cloned-element`),S=Q=>Q.shadowRoot||Q,R=Q=>{const we="ION-TABS"===Q.tagName?Q:Q.querySelector("ion-tabs"),de="ion-content ion-header:not(.header-collapse-condense-inactive) ion-title.title-large";if(null!=we){const Y=we.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");return null!=Y?Y.querySelector(de):null}return Q.querySelector(de)},k=(Q,we)=>{const de="ION-TABS"===Q.tagName?Q:Q.querySelector("ion-tabs");let Y=[];if(null!=de){const Se=de.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");null!=Se&&(Y=Se.querySelectorAll("ion-buttons"))}else Y=Q.querySelectorAll("ion-buttons");for(const Se of Y){const Ye=Se.closest("ion-header"),pe=Ye&&!Ye.classList.contains("header-collapse-condense-inactive"),ae=Se.querySelector("ion-back-button"),Ve=Se.classList.contains("buttons-collapse");if(null!==ae&&("start"===Se.slot||""===Se.slot)&&(Ve&&pe&&we||!Ve))return ae}return null},D=(Q,we,de,Y,Se,Ye,pe,ae,Ve)=>{var Ne,Ie;const H=we?`calc(100% - ${Se.right+4}px)`:Se.left-4+"px",j=we?"right":"left",ye=we?"left":"right",Le=we?"right":"left",W=(null===(Ne=Ye.textContent)||void 0===Ne?void 0:Ne.trim())===(null===(Ie=ae.textContent)||void 0===Ie?void 0:Ie.trim()),At=(Ve.height-J)/pe.height,Ut=W?`scale(${Ve.width/pe.width}, ${At})`:`scale(${At})`,it="scale(1)",se=S(Y).querySelector("ion-icon").getBoundingClientRect(),ce=we?se.width/2-(se.right-Se.right)+"px":Se.left-se.width/2+"px",K=we?`-${window.innerWidth-Se.right}px`:`${Se.left}px`,_e=`${Ve.top}px`,Pe=`${Se.top}px`,Lt=de?[{offset:0,transform:`translate3d(${K}, ${Pe}, 0)`},{offset:1,transform:`translate3d(${ce}, ${_e}, 0)`}]:[{offset:0,transform:`translate3d(${ce}, ${_e}, 0)`},{offset:1,transform:`translate3d(${K}, ${Pe}, 0)`}],ge=de?[{offset:0,opacity:1,transform:it},{offset:1,opacity:0,transform:Ut}]:[{offset:0,opacity:0,transform:Ut},{offset:1,opacity:1,transform:it}],rn=de?[{offset:0,opacity:1,transform:"scale(1)"},{offset:.2,opacity:0,transform:"scale(0.6)"},{offset:1,opacity:0,transform:"scale(0.6)"}]:[{offset:0,opacity:0,transform:"scale(0.6)"},{offset:.6,opacity:0,transform:"scale(0.6)"},{offset:1,opacity:1,transform:"scale(1)"}],cn=(0,i.c)(),mn=(0,i.c)(),dt=(0,i.c)(),lt=P("ion-back-button"),rt=S(lt).querySelector(".button-text"),kt=S(lt).querySelector("ion-icon");lt.text=Y.text,lt.mode=Y.mode,lt.icon=Y.icon,lt.color=Y.color,lt.disabled=Y.disabled,lt.style.setProperty("display","block"),lt.style.setProperty("position","fixed"),mn.addElement(kt),cn.addElement(rt),dt.addElement(lt),dt.beforeStyles({position:"absolute",top:"0px",[Le]:"0px"}).keyframes(Lt),cn.beforeStyles({"transform-origin":`${j} top`}).beforeAddWrite(()=>{Y.style.setProperty("display","none"),lt.style.setProperty(j,H)}).afterAddWrite(()=>{Y.style.setProperty("display",""),lt.style.setProperty("display","none"),lt.style.removeProperty(j)}).keyframes(ge),mn.beforeStyles({"transform-origin":`${ye} center`}).keyframes(rn),Q.addAnimation([cn,mn,dt])},ee=(Q,we,de,Y,Se,Ye,pe,ae)=>{var Ve,Ne;const Ie=we?"right":"left",H=we?`calc(100% - ${Se.right}px)`:`${Se.left}
1px`,ye=`${Se.top}px`,W=we?`-${window.innerWidth-ae.right-8}px`:ae.x-8+"px",At=ae.y-2+"px",Ut=(null===(Ve=pe.textContent)||void 0===Ve?void 0:Ve.trim())===(null===(Ne=Y.textContent)||void 0===Ne?void 0:Ne.trim()),ue=ae.height/(Ye.height-J),se="scale(1)",ce=Ut?`scale(${ae.width/Ye.width}, ${ue})`:`scale(${ue})`,Pe=de?[{offset:0,opacity:0,transform:`translate3d(${W}, ${At}, 0) ${ce}`},{offset:.1,opacity:0},{offset:1,opacity:1,transform:`translate3d(0px, ${ye}, 0) ${se}`}]:[{offset:0,opacity:.99,transform:`translate3d(0px, ${ye}, 0) ${se}`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${W}, ${At}, 0) ${ce}`}],De=P("ion-title"),ke=(0,i.c)();De.innerText=Y.innerText,De.size=Y.size,De.color=Y.color,ke.addElement(De),ke.beforeStyles({"transform-origin":`${Ie} top`,height:`${Se.height}px`,display:"",position:"relative",[Ie]:H}).beforeAddWrite(()=>{Y.style.setProperty("opacity","0")}).afterAddWrite(()=>{Y.style.setProperty("opacity",""),De.style.setProperty("display","none")}).keyframes(Pe),Q.addAnimation(ke)},te=(Q,we)=>{var de;try{const Y="cubic-bezier(0.32,0.72,0,1)",Se="opacity",Ye="transform",pe="0%",Ve="rtl"===Q.ownerDocument.dir,Ne=Ve?"-99.5%":"99.5%",Ie=Ve?"33%":"-33%",H=we.enteringEl,j=we.leavingEl,ye="back"===we.direction,Le=H.querySelector(":scope > ion-content"),W=H.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *"),We=H.querySelectorAll(":scope > ion-header > ion-toolbar"),At=(0,i.c)(),Ut=(0,i.c)();if(At.addElement(H).duration((null!==(de=we.duration)&&void 0!==de?de:0)||540).easing(we.easing||Y).fill("both").beforeRemoveClass("ion-page-invisible"),j&&null!=Q){const ce=(0,i.c)();ce.addElement(Q),At.addAnimation(ce)}if(Le||0!==We.length||0!==W.length?(Ut.addElement(Le),Ut.addElement(W)):Ut.addElement(H.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),At.addAnimation(Ut),ye?Ut.beforeClearStyles([Se]).fromTo("transform",`translateX(${Ie})`,`translateX(${pe})`).fromTo(Se,.8,1):Ut.beforeClearStyles([Se]).fromTo("transform",`translateX(${Ne})`,`translateX(${pe})`),Le){const ce=S(Le).querySelector(".transition-effect");if(ce){const K=ce.querySelector(".transition-cover"),_e=ce.querySelector(".transition-shadow"),Pe=(0,i.c)(),De=(0,i.c)(),ke=(0,i.c)();Pe.addElement(ce).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),De.addElement(K).beforeClearStyles([Se]).fromTo(Se,0,.1),ke.addElement(_e).beforeClearStyles([Se]).fromTo(Se,.03,.7),Pe.addAnimation([De,ke]),Ut.addAnimation([Pe])}}const it=H.querySelector("ion-header.header-collapse-condense"),{forward:ue,backward:se}=((Q,we,de,Y,Se)=>
1{const Ye=k(Y,de),pe=R(Se),ae=R(Y),Ve=k(Se,de),Ne=null!==Ye&&null!==pe&&!de,Ie=null!==ae&&null!==Ve&&de;if(Ne){const H=pe.getBoundingClientRect(),j=Ye.getBoundingClientRect(),ye=S(Ye).querySelector(".button-text"),Le=ye.getBoundingClientRect(),We=S(pe).querySelector(".toolbar-title").getBoundingClientRect();ee(Q,we,de,pe,H,We,ye,Le),D(Q,we,de,Ye,j,ye,Le,pe,We)}else if(Ie){const H=ae.getBoundingClientRect(),j=Ve.getBoundingClientRect(),ye=S(Ve).querySelector(".button-text"),Le=ye.getBoundingClientRect(),We=S(ae).querySelector(".toolbar-title").getBoundingClientRect();ee(Q,we,de,ae,H,We,ye,Le),D(Q,we,de,Ve,j,ye,Le,ae,We)}return{forward:Ne,backward:Ie}})(At,Ve,ye,H,j);if(We.forEach(ce=>{const K=(0,i.c)();K.addElement(ce),At.addAnimation(K);const _e=(0,i.c)();_e.addElement(ce.querySelector("ion-title"));const Pe=(0,i.c)(),De=Array.from(ce.querySelectorAll("ion-buttons,[menuToggle]")),ke=ce.closest("ion-header"),Lt=ke?.classList.contains("header-collapse-condense-inactive");let Dt;Dt=De.filter(ye?rn=>{const cn=rn.classList.contains("buttons-collapse");return cn&&!Lt||!cn}:rn=>!rn.classList.contains("buttons-collapse")),Pe.addElement(Dt);const He=(0,i.c)();He.addElement(ce.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])"));const ge=(0,i.c)();ge.addElement(S(ce).querySelector(".toolbar-background"));const xt=(0,i.c)(),pt=ce.querySelector("ion-back-button");if(pt&&xt.addElement(pt),K.addAnimation([_e,Pe,He,ge,xt]),Pe.fromTo(Se,.01,1),He.fromTo(Se,.01,1),ye)Lt||_e.fromTo("transform",`translateX(${Ie})`,`translateX(${pe})`).fromTo(Se,.01,1),He.fromTo("transform",`translateX(${Ie})`,`translateX(${pe})`),xt.fromTo(Se,.01,1);else if(it||_e.fromTo("transform",`translateX(${Ne})`,`translateX(${pe})`).fromTo(Se,.01,1),He.fromTo("transform",`translateX(${Ne})`,`translateX(${pe})`),ge.beforeClearStyles([Se,"transform"]),ke?.translucent?ge.fromTo("transform",Ve?"translateX(-100%)":"translateX(100%)","translateX(0px)"):ge.fromTo(Se,.01,"var(--opacity)"),ue||xt.fromTo(Se,.01,1),pt&&!ue){const cn=(0,i.c)();cn.addElement(S(pt).querySelector(".button-text")).fromTo("transform",Ve?"translateX(-100px)":"translateX(100px)","translateX(0px)"),K.addAnimation(cn)}}),j){const ce=(0,i.c)(),K=j.querySelector(":scope > ion-content"),_e=j.querySelectorAll(":scope > ion-header > ion-toolbar"),Pe=j.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *");if(K||0!==_e.length||0!==Pe.length?(ce.addElement(K),ce.addElement(Pe)):ce.addElement(j.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),At.addAnimation(ce),ye){ce.beforeClearStyles([Se]).fromTo("transform",`translateX(${pe})`,Ve?"translateX(-100%)":"translateX(100%)");const De=(0,v.g)(j);At.afterAddWrite(()=>{"normal"===At.getDirection()&&De.style.setProperty("display","none")})}else ce.fromTo("transform",`translateX(${pe})`,`translateX(${Ie})`).fromTo(Se,1,.8);if(K){const De=S(K).querySelector(".transition-effect");if(De){const ke=De.querySelector(".transition-cover"),Lt=De.querySelector(".transition-shadow"),Dt=(0,i.c)(),He=(0,i.c)(),ge=(0,i.c)();Dt.addElement(De).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),He.addElement(ke).beforeClearStyles([Se]).fromTo(Se,.1,0),ge.addElement(Lt).beforeClearStyles([Se]).fromTo(Se,.7,.03),Dt.addAnimation([He,ge]),ce.addAnimation([Dt])}}_e.forEach(De=>{const ke=(0,i.c)();ke.addElement(De);const Lt=(0,i.c)();Lt.addElement(De.querySelector("ion-title"));const Dt=(0,i.c)(),He=De.querySelectorAll("ion-buttons,[menuToggle]"),ge=De.closest("ion-header"),xt=ge?.classList.contains("header-collapse-condense-inactive"),pt=Array.from(He).filter(rt=>{const kt=rt.classList.contains("buttons-collapse");return kt&&!xt||!kt});Dt.addElement(pt);const rn=(0,i.c)(),cn=De.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])");cn.length>0&&rn.addElement(cn);const mn=(0,i.c)();mn.addElement(S(De).querySelector(".toolbar-background"));const dt=(0,i.c)(),lt=De.querySelector("ion-back-button");if(lt&&dt.addElement(lt),ke.addAnimation([Lt,Dt,rn,dt,mn]),At.addAnimation(ke),dt.fromTo(Se,.99,0),Dt.fromTo(Se,.99,0),rn.fromTo(Se,.99,0),ye){if(xt||Lt.fromTo("transform",`translateX(${pe})`,Ve?"translateX(-100%)":"translateX(100%)").fromTo(Se,.99,0),rn.fromTo("transform",`translateX(${pe})`,Ve?"translateX(-100%)":"translateX(100%)"),mn.beforeClearStyles([Se,"transform"]),ge?.translucent?mn.fromTo("transform","translateX(0px)",Ve?"translateX(-100%)":"translateX(100%)"):mn.fromTo(Se,"var(--opacity)",0),lt&&!se){const kt=(0,i.c)();kt.addElement(S(lt).querySelector(".button-text")).fromTo("transform",`translateX(${pe})`,`translateX(${(Ve?-124:124)+"px"})`),ke.addAnimation(kt)}}else xt||Lt.fromTo("transform",`translateX(${pe})`,`translateX(${Ie})`).fromTo(Se,.99,0).afterClearStyles([Ye,Se]),rn.fromTo("transform",`translateX(${pe})`,`translateX(${Ie})`).afterClearStyles([Ye,Se]),dt.afterClearStyles([Se]),Lt.afterClearStyles([Se]),Dt.afterClearStyles([Se])})}return At}catch(Y){throw Y}},J=10},6200:(B,G,a)=>{"use strict";a.r(G),a.d(G,{mdTransitionAnimation:()=>C});var i=a(30388),v=a(34536);a(14829),a(96040);const C=(P,S)=>{var R,k,x;
1const D="40px",te="back"===S.direction,Q=S.leavingEl,we=(0,v.g)(S.enteringEl),de=we.querySelector("ion-toolbar"),Y=(0,i.c)();if(Y.addElement(we).fill("both").beforeRemoveClass("ion-page-invisible"),te?Y.duration((null!==(R=S.duration)&&void 0!==R?R:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):Y.duration((null!==(k=S.duration)&&void 0!==k?k:0)||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform",`translateY(${D})`,"translateY(0px)").fromTo("opacity",.01,1),de){const Se=(0,i.c)();Se.addElement(de),Y.addAnimation(Se)}if(Q&&te){Y.duration((null!==(x=S.duration)&&void 0!==x?x:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const Se=(0,i.c)();Se.addElement((0,v.g)(Q)).onFinish(Ye=>{1===Ye&&Se.elements.length>0&&Se.elements[0].style.setProperty("display","none")}).fromTo("transform","translateY(0px)",`translateY(${D})`).fromTo("opacity",1,0),Y.addAnimation(Se)}return Y}},82808:(B,G,a)=>{"use strict";a.d(G,{B:()=>Dt,G:()=>He,O:()=>ge,a:()=>ee,b:()=>te,c:()=>de,d:()=>xt,e:()=>pt,f:()=>it,g:()=>se,h:()=>_e,i:()=>De,j:()=>Se,k:()=>Ye,m:()=>Q,n:()=>Ne,o:()=>At,s:()=>Lt,t:()=>Y});var i=a(73448),v=a(14829),b=a(95440),_=a(12072),C=a(10495),P=a(46384),S=a(52032);let R=0,k=0;const x=new WeakMap,D=mn=>({create:dt=>pe(mn,dt),dismiss:(dt,lt,rt)=>Le(document,dt,lt,mn,rt),getTop:()=>(0,i.c)(function*(){return At(document,mn)})()}),ee=D("ion-alert"),te=D("ion-action-sheet"),Q=D("ion-modal"),de=D("ion-popover"),Y=D("ion-toast"),Se=mn=>{typeof document<"u"&&ye(document);const dt=R++;mn.overlayIndex=dt},Ye=mn=>(mn.hasAttribute("id")||(mn.id="ion-overlay-"+ ++k),mn.id),pe=(mn,dt)=>typeof window<"u"&&typeof window.customElements<"u"?window.customElements.whenDefined(mn).then(()=>{const lt=document.createElement(mn);return lt.classList.add("overlay-hidden"),Object.assign(lt,Object.assign(Object.assign({},dt),{hasController:!0})),ce(document).appendChild(lt),new Promise(rt=>(0,P.c)(lt,rt))}):Promise.resolve(),ae='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',Ne=(mn,dt)=>{const lt=mn.querySelector(ae);H(lt,dt)},Ie=(mn,dt)=>{const lt=Array.from(mn.querySelectorAll(ae));H(lt.length>0?lt[lt.length-1]:null,dt)},H=(mn,dt)=>{let lt=mn;const rt=mn?.shadowRoot;rt&&(lt=rt.querySelector(ae)||mn),lt?(0,P.f)(lt):dt.focus()},ye=mn=>{0===R&&(R=1,mn.addEventListener("focus",dt=>{((mn,dt)=>{const lt=At(dt,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover"),rt=mn.target;lt&&rt&&!lt.classList.contains("ion-disable-focus-trap")&&(lt.shadowRoot?(()=>{if(lt.contains(rt))lt.lastFocus=rt;else if("ION-TOAST"===rt.tagName)H(lt.lastFocus,lt);else{const Yn=lt.lastFocus;Ne(lt,lt),Yn===dt.activeElement&&Ie(lt,lt),lt.lastFocus=dt.activeElement}})():(()=>{if(lt===rt)lt.lastFocus=void 0;else if("ION-TOAST"===rt.tagName)H(lt.lastFocus,lt);else{const Yn=(0,P.g)(lt);if(!Yn.contains(rt))return;const bn=Yn.querySelector(".ion-overlay-wrapper");if(!bn)return;if(bn.contains(rt)||rt===Yn.querySelector("ion-backdrop"))lt.lastFocus=rt;else{const Hn=lt.lastFocus;Ne(bn,lt),Hn===dt.activeElement&&Ie(bn,lt),lt.lastFocus=dt.activeElement}}})())})(dt,mn)},!0),mn.addEventListener("ionBackButton",dt=>{const lt=At(mn);lt?.backdropDismiss&&dt.detail.register(b.OVERLAY_BACK_BUTTON_PRIORITY,()=>{lt.dismiss(void 0,Dt)})}),(0,b.shouldUseCloseWatcher)()||mn.addEventListener("keydown",dt=>{if("Escape"===dt.key){const lt=At(mn);lt?.backdropDismiss&<.dismiss(void 0,Dt)}}))},Le=(mn,dt,lt,rt,kt)=>{const an=At(mn,rt,kt);return an?an.dismiss(dt,lt):Promise.reject("overlay does not exist")},We=(mn,dt)=>((mn,dt)=>(void 0===dt&&(dt="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast"),Array.from(mn.querySelectorAll(dt)).filter(lt=>lt.overlayIndex>0)))(mn,dt).filter(lt=>!(mn=>mn.classList.contains("overlay-hidden"))(lt)),At=(mn,dt,lt)=>{const rt=We(mn,dt);return void 0===lt?rt[rt.length-1]:rt.find(kt=>kt.id===lt)},Ut=(mn=!1)=>{const lt=ce(document).querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");lt&&(mn?lt.setAttribute("aria-hidden","true"):lt.removeAttribute("aria-hidden"))},it=function(){var mn=(0,i.c)(function*(dt,lt,rt,kt,an){var Yn,bn;if(dt.presented)return;Ut(!0),rn(dt.el),dt.presented=!0,dt.willPresent.emit(),null===(Yn=dt.willPresentShorthand)||void 0===Yn||Yn.emit();const Hn=(0,_.b)(dt),Fn=dt.enterAnimation?dt.enterAnimation:_.c.get(lt,"ios"===Hn?rt:kt);(yield K(dt,Fn,dt.el,an))&&(dt.didPresent.emit(),null===(bn=dt.didPresentShorthand)||void 0===bn||bn.emit()),"ION-TOAST"!==dt.el.tagName&&ue(dt.el),dt.keyboardClose&&(null===document.activeElement||!dt.el.contains(document.activeElement))&&dt.el.focus(),dt.el.removeAttribute("aria-hidden")});return function(lt,rt,kt,an,Yn){return mn.apply(this,arguments)}}(),ue=function(){var mn=(0,i.c)(function*(dt){let lt=document.activeElement;if(!lt)return;const rt=lt?.shadowRoot;rt&&(lt=rt.querySelector(ae)||lt),yield dt.onDidDismiss(),(null===document.activeElement||document.activeElement===document.body)&<.focus()});return function(lt){return mn.apply(this,arguments)}}(),se=function(){var mn=(0,i.c)(function*(dt,lt,rt,kt,an,Yn,bn){var Hn,Fn;if(!dt.presented)return!1;void 0!==v.d&&1===We(v.d).length&&Ut(!1),dt.presented=!1;try{dt.el.style.setProperty("pointer-events","none"),dt.willDismiss.emit({data:lt,role:rt}
1),null===(Hn=dt.willDismissShorthand)||void 0===Hn||Hn.emit({data:lt,role:rt});const On=(0,_.b)(dt),gr=dt.leaveAnimation?dt.leaveAnimation:_.c.get(kt,"ios"===On?an:Yn);rt!==He&&(yield K(dt,gr,dt.el,bn)),dt.didDismiss.emit({data:lt,role:rt}),null===(Fn=dt.didDismissShorthand)||void 0===Fn||Fn.emit({data:lt,role:rt}),(x.get(dt)||[]).forEach(Vr=>Vr.destroy()),x.delete(dt),dt.el.classList.add("overlay-hidden"),dt.el.style.removeProperty("pointer-events"),void 0!==dt.el.lastFocus&&(dt.el.lastFocus=void 0)}catch(On){console.error(On)}return dt.el.remove(),cn(),!0});return function(lt,rt,kt,an,Yn,bn,Hn){return mn.apply(this,arguments)}}(),ce=mn=>mn.querySelector("ion-app")||mn.body,K=function(){var mn=(0,i.c)(function*(dt,lt,rt,kt){rt.classList.remove("overlay-hidden");const Yn=lt(dt.el,kt);(!dt.animated||!_.c.getBoolean("animated",!0))&&Yn.duration(0),dt.keyboardClose&&Yn.beforeAddWrite(()=>{const Hn=rt.ownerDocument.activeElement;Hn?.matches("input,ion-input, ion-textarea")&&Hn.blur()});const bn=x.get(dt)||[];return x.set(dt,[...bn,Yn]),yield Yn.play(),!0});return function(lt,rt,kt,an){return mn.apply(this,arguments)}}(),_e=(mn,dt)=>{let lt;const rt=new Promise(kt=>lt=kt);return Pe(mn,dt,kt=>{lt(kt.detail)}),rt},Pe=(mn,dt,lt)=>{const rt=kt=>{(0,P.b)(mn,dt,rt),lt(kt)};(0,P.a)(mn,dt,rt)},De=mn=>"cancel"===mn||mn===Dt,ke=mn=>mn(),Lt=(mn,dt)=>{if("function"==typeof mn)return _.c.get("_zoneGate",ke)(()=>{try{return mn(dt)}catch(rt){throw rt}})},Dt="backdrop",He="gesture",ge=39,xt=mn=>{let lt,dt=!1;const rt=(0,C.C)(),kt=(bn=!1)=>{if(lt&&!bn)return{delegate:lt,inline:dt};const{el:Hn,hasController:Fn,delegate:On}=mn;return dt=null!==Hn.parentNode&&!Fn,lt=dt?On||rt:On,{inline:dt,delegate:lt}};return{attachViewToDom:function(){var bn=(0,i.c)(function*(Hn){const{delegate:Fn}=kt(!0);if(Fn)return yield Fn.attachViewToDom(mn.el,Hn);const{hasController:On}=mn;if(On&&void 0!==Hn)throw new Error("framework delegate is missing");return null});return function(Fn){return bn.apply(this,arguments)}}(),removeViewFromDom:()=>{const{delegate:bn}=kt();bn&&void 0!==mn.el&&bn.removeViewFromDom(mn.el.parentElement,mn.el)}}},pt=()=>{let mn;const dt=()=>{mn&&(mn(),mn=void 0)};return{addClickListener:(rt,kt)=>{dt();const an=void 0!==kt?document.getElementById(kt):null;an?mn=((bn,Hn)=>{const Fn=()=>{Hn.present()};return bn.addEventListener("click",Fn),()=>{bn.removeEventListener("click",Fn)}})(an,rt):(0,S.p)(`A trigger element with the ID "${kt}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,rt)},removeClickListener:dt}},rn=mn=>{var dt;if(void 0===v.d)return;const lt=We(v.d);for(let rt=lt.length-1;rt>=0;rt--){const kt=lt[rt],an=null!==(dt=lt[rt+1])&&void 0!==dt?dt:mn;(an.hasAttribute("aria-hidden")||"ION-TOAST"!==an.tagName)&&kt.setAttribute("aria-hidden","true")}},cn=()=>{if(void 0===v.d)return;const mn=We(v.d);for(let dt=mn.length-1;dt>=0;dt--){const lt=mn[dt];if(lt.removeAttribute("aria-hidden"),"ION-TOAST"!==lt.tagName)break}}},58637:(B,G,a)=>{"use strict";a.d(G,{H:()=>Y,b:()=>Hn,c:()=>ae,f:()=>rn,g:()=>pe,h:()=>we,p:()=>wn,r:()=>Nr});var i=a(73448);let b,_,C=!1,P=!1;const x={},J=Fe=>"object"==(Fe=typeof Fe)||"function"===Fe;function Q(Fe){var ft,dn,Tn;return null!==(Tn=null===(dn=null===(ft=Fe.head)||void 0===ft?void 0:ft.querySelector('meta[name="csp-nonce"]'))||void 0===dn?void 0:dn.getAttribute("content"))&&void 0!==Tn?Tn:void 0}const we=(Fe,ft,...dn)=>{let Tn=null,Bn=!1,mr=!1;const tr=[],Ir=Er=>{for(let Ai=0;Ai<Er.length;Ai++)Tn=Er[Ai],Array.isArray(Tn)?Ir(Tn):null!=Tn&&"boolean"!=typeof Tn&&((Bn="function"!=typeof Fe&&!J(Tn))&&(Tn=String(Tn)),Bn&&mr?tr[tr.length-1].$text$+=Tn:tr.push(Bn?de(null,Tn):Tn),mr=Bn)};if(Ir(dn),ft){const Er=ft.className||ft.class;Er&&(ft.class="object"!=typeof Er?Er:Object.keys(Er).filter(Ai=>Er[Ai]).join(" "))}const ur=de(Fe,null);return ur.$attrs$=ft,tr.length>0&&(ur.$children$=tr),ur},de=(Fe,ft)=>({$flags$:0,$tag$:Fe,$text$:ft,$elm$:null,$children$:null,$attrs$:null}),Y={},pe=Fe=>ti(Fe).$hostElement$,ae=(Fe,ft,dn)=>{const Tn=pe(Fe);return{emit:Bn=>Ve(Tn,ft,{bubbles:!!(4&dn),composed:!!(2&dn),cancelable:!!(1&dn),detail:Bn})}},Ve=(Fe,ft,dn)=>{const Tn=Xt.ce(ft,dn);return Fe.dispatchEvent(Tn),Tn},Ne=new WeakMap,ye=(Fe,ft)=>"sc-"+Fe.$tagName$,Le=(Fe,ft,dn,Tn,Bn,mr)=>{if(dn!==Tn){let tr=Jr(Fe,ft),Ir=ft.toLowerCase();if("class"===ft){const ur=Fe.classList,Er=We(dn),Ai=We(Tn);ur.remove(...Er.filter(Di=>Di&&!Ai.includes(Di))),ur.add(...Ai.filter(Di=>Di&&!Er.includes(Di)))}else if("style"===ft){for(const ur in dn)(!Tn||null==Tn[ur])&&(ur.includes("-")?Fe.style.removeProperty(ur):Fe.style[ur]="");for(const ur in Tn)(!dn||Tn[ur]!==dn[ur])&&(ur.includes("-")?Fe.style.setProperty(ur,Tn[ur]):Fe.style[ur]=Tn[ur])}else if("ref"===ft)Tn&&Tn(Fe);else if(tr||"o"!==ft[0]||"n"!==ft[1]){const ur=J(Tn);if((tr||ur&&null!==Tn)&&!Bn)try{if(Fe.tagName.includes("-"))Fe[ft]=Tn;else{const Er=Tn??"";"list"===ft?tr=!1:(null==dn||Fe[ft]!=Er)&&(Fe[ft]=Er)}}catch{}null==Tn||!1===Tn?(!1!==Tn||""===Fe.getAttribute(ft))&&Fe.removeAttribute(ft):(!tr||4&mr||Bn)&&!ur&&Fe.setAttribute(ft,Tn=!0===Tn?"":Tn)}else ft="-"===ft[2]?ft.slice(3):Jr(Qe,Ir)?Ir.slice(2):Ir[2]+ft.slice(3),dn&&Xt.rel(Fe,ft,dn,!1),Tn&&Xt.ael(Fe,ft,Tn,!1)}},W=/\s/,We=Fe=>Fe?Fe.split(W):[],At=(Fe,ft,dn,Tn)=>{const Bn=11===ft.$elm$.nodeType&&ft.$elm$.host?ft.$elm$.host:ft.$elm$,mr=Fe&&Fe.$attrs$||x,tr=ft.$attrs$||x;for(Tn in mr)Tn in tr||Le(Bn,Tn,mr[Tn],void 0,dn,ft.$flags$);for(Tn in tr)Le(Bn,Tn,mr[Tn],tr[Tn],dn,ft.$flags$)},Ut=(Fe,ft,dn,Tn)=>{const Bn=ft.$children$[dn];let tr,Ir,mr=0;if(null!==Bn.$text$)tr=Bn.$elm$=ut.createTextNode(Bn.$text$);else{if(C||(C="svg"===Bn.$tag$),tr=Bn.$elm$=ut.createElementNS(C?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",Bn.$tag$),C&&"foreignObject"===Bn.$tag$&&(C=!1),At(null,Bn,C),(Fe=>null!=Fe)(b)&&tr["s-si"]!==b&&tr.classList.add(tr["s-si"]=b),Bn.$children$)for(mr=0;mr<Bn.$children$.length;++mr)Ir=Ut(Fe,Bn,mr),Ir&&tr.appendChild(Ir);"svg"===Bn.$tag$?C=!1:"foreignObject"===tr.tagName&&(C=!0)}return tr},it=(Fe,ft,dn,Tn,Bn,mr)=>{let Ir,tr=Fe;for(tr.shadowRoot&&tr.tagName===_&&(tr=tr.shadowRoot);Bn<=mr;++Bn)Tn[Bn]&&(Ir=Ut(null,dn,Bn),Ir&&(Tn[Bn].$elm$=Ir,tr.insertBefore(Ir,ft)))},ue=(Fe,ft,dn)=>{for(let Tn=ft;Tn<=dn;++Tn){const Bn=Fe[Tn];if(Bn){const mr=Bn.$elm$;_e(Bn),mr&&mr.remove()}}},ce=(Fe,ft)=>Fe.$tag$===ft.$tag$,K=(Fe,ft)=>{const dn=ft.$elm$=Fe.$elm$,Tn=Fe.$children$,Bn=ft.$children$,mr=ft.$tag$,tr=ft.$text$;null===tr?(C="svg"===mr||"foreignObject"!==mr&&C,At(Fe,ft,C),null!==Tn&&null!==Bn?((Fe,ft,dn,Tn)=>{let Pi,Bn=0,mr=0,tr=ft.length-1,Ir=ft[0],ur=ft[tr],Er=Tn.length-1,Ai=Tn[0],Di=Tn[Er];for(;Bn<=tr&&mr<=Er;)null==Ir?Ir=ft[++Bn]:null==ur?ur=ft[--tr]:null==Ai?Ai=Tn[++mr]:null==Di?Di=Tn[--Er]:ce(Ir,Ai)?(K(Ir,Ai),Ir=ft[++Bn],Ai=Tn[++mr]):ce(ur,Di)?(K(ur,Di),ur=ft[--tr],Di=Tn[--Er]):ce(Ir,Di)?(K(Ir,Di),Fe.insertBefore(Ir.$elm$,ur.$elm$.nextSibling),Ir=ft[++Bn],Di=Tn[--Er]):ce(ur,Ai)?(K(ur,Ai),Fe.insertBefore(ur.$elm$,Ir.$elm$),ur=ft[--tr],Ai=T
1n[++mr]):(Pi=Ut(ft&&ft[mr],dn,mr),Ai=Tn[++mr],Pi&&Ir.$elm$.parentNode.insertBefore(Pi,Ir.$elm$));Bn>tr?it(Fe,null==Tn[Er+1]?null:Tn[Er+1].$elm$,dn,Tn,mr,Er):mr>Er&&ue(ft,Bn,tr)})(dn,Tn,ft,Bn):null!==Bn?(null!==Fe.$text$&&(dn.textContent=""),it(dn,null,ft,Bn,0,Bn.length-1)):null!==Tn&&ue(Tn,0,Tn.length-1),C&&"svg"===mr&&(C=!1)):Fe.$text$!==tr&&(dn.data=tr)},_e=Fe=>{Fe.$attrs$&&Fe.$attrs$.ref&&Fe.$attrs$.ref(null),Fe.$children$&&Fe.$children$.map(_e)},De=(Fe,ft)=>{ft&&!Fe.$onRenderResolve$&&ft["s-p"]&&ft["s-p"].push(new Promise(dn=>Fe.$onRenderResolve$=dn))},ke=(Fe,ft)=>{if(Fe.$flags$|=16,!(4&Fe.$flags$))return De(Fe,Fe.$ancestorComponent$),Zt(()=>Lt(Fe,ft));Fe.$flags$|=512},Lt=(Fe,ft)=>{const Tn=Fe.$lazyInstance$;return ft&&(Fe.$flags$|=256,Fe.$queuedListeners$&&(Fe.$queuedListeners$.map(([mr,tr])=>mn(Tn,mr,tr)),Fe.$queuedListeners$=void 0)),Dt(void 0,()=>ge(Fe,Tn,ft))},Dt=(Fe,ft)=>He(Fe)?Fe.then(ft):ft(),He=Fe=>Fe instanceof Promise||Fe&&Fe.then&&"function"==typeof Fe.then,ge=function(){var Fe=(0,i.c)(function*(ft,dn,Tn){var Bn;const mr=ft.$hostElement$,Ir=mr["s-rc"];Tn&&(Fe=>{const ft=Fe.$cmpMeta$,dn=Fe.$hostElement$,Tn=ft.$flags$,mr=((Fe,ft,dn,Tn)=>{var Bn;let mr=ye(ft);const tr=sn.get(mr);if(Fe=11===Fe.nodeType?Fe:ut,tr)if("string"==typeof tr){let ur,Ir=Ne.get(Fe=Fe.head||Fe);if(Ir||Ne.set(Fe,Ir=new Set),!Ir.has(mr)){{ur=ut.createElement("style"),ur.innerHTML=tr;const Er=null!==(Bn=Xt.$nonce$)&&void 0!==Bn?Bn:Q(ut);null!=Er&&ur.setAttribute("nonce",Er),Fe.insertBefore(ur,Fe.querySelector("link"))}Ir&&Ir.add(mr)}}else Fe.adoptedStyleSheets.includes(tr)||(Fe.adoptedStyleSheets=[...Fe.adoptedStyleSheets,tr]);return mr})(dn.shadowRoot?dn.shadowRoot:dn.getRootNode(),ft);10&Tn&&(dn["s-sc"]=mr,dn.classList.add(mr+"-h"))})(ft);xt(ft,dn),Ir&&(Ir.map(Er=>Er()),mr["s-rc"]=void 0);{const Er=null!==(Bn=mr["s-p"])&&void 0!==Bn?Bn:[],Ai=()=>pt(ft);0===Er.length?Ai():(Promise.all(Er).then(Ai),ft.$flags$|=4,Er.length=0)}});return function(dn,Tn,Bn){return Fe.apply(this,arguments)}}(),xt=(Fe,ft,dn)=>{try{ft=ft.render(),Fe.$flags$&=-17,Fe.$flags$|=2,((Fe,ft)=>{const dn=Fe.$hostElement$,Tn=Fe.$vnode$||de(null,null),Bn=(Fe=>Fe&&Fe.$tag$===Y)(ft)?ft:we(null,null,ft);_=dn.tagName,Bn.$tag$=null,Bn.$flags$|=4,Fe.$vnode$=Bn,Bn.$elm$=Tn.$elm$=dn.shadowRoot||dn,b=dn["s-sc"],K(Tn,Bn)})(Fe,ft)}catch(Tn){sr(Tn,Fe.$hostElement$)}return null},pt=Fe=>{const dn=Fe.$hostElement$,Bn=Fe.$lazyInstance$,mr=Fe.$ancestorComponent$;64&Fe.$flags$||(Fe.$flags$|=64,dt(dn),mn(Bn,"componentDidLoad"),Fe.$onReadyResolve$(dn),mr||cn()),Fe.$onInstanceResolve$(dn),Fe.$onRenderResolve$&&(Fe.$onRenderResolve$(),Fe.$onRenderResolve$=void 0),512&Fe.$flags$&&et(()=>ke(Fe,!1)),Fe.$flags$&=-517},rn=Fe=>{{const ft=ti(Fe),dn=ft.$hostElement$.isConnected;return dn&&2==(18&ft.$flags$)&&ke(ft,!1),dn}},cn=Fe=>{dt(ut.documentElement),et(()=>Ve(Qe,"appload",{detail:{namespace:"ionicpwaelements"}}))},mn=(Fe,ft,dn)=>{if(Fe&&Fe[ft])try{return Fe[ft](dn)}catch(Tn){sr(Tn)}},dt=Fe=>Fe.classList.add("hydrated"),kt=(Fe,ft,dn)=>{if(ft.$members$){const Tn=Object.entries(ft.$members$),Bn=Fe.prototype;if(Tn.map(([mr,[tr]])=>{31&tr||2&dn&&32&tr?Object.defineProperty(Bn,mr,{get(){return((Fe,ft)=>ti(this).$instanceValues$.get(ft))(0,mr)},set(Ir){((Fe,ft,dn,Tn)=>{const Bn=ti(Fe),mr=Bn.$instanceValues$.get(ft),tr=Bn.$flags$,Ir=Bn.$lazyInstance$;dn=((Fe,ft)=>null==Fe||J(Fe)?Fe:4&ft?"false"!==Fe&&(""===Fe||!!Fe):2&ft?parseFloat(Fe):1&ft?String(Fe):Fe)(dn,Tn.$members$[ft][0]);const ur=Number.isNaN(mr)&&Number.isNaN(dn);(!(8&tr)||void 0===mr)&&dn!==mr&&!ur&&(Bn.$instanceValues$.set(ft,dn),Ir&&2==(18&tr)&&ke(Bn,!1))})(this,mr,Ir,ft)},configurable:!0,enumerable:!0}):1&dn&&64&tr&&Object.defineProperty(Bn,mr,{value(...Ir){const ur=ti(this);return ur.$onInstancePromise$.then(()=>ur.$lazyInstance$[mr](...Ir))}})}),1&dn){const mr=new Map;Bn.attributeChangedCallback=function(tr,Ir,ur){Xt.jmp(()=>{const Er=mr.get(tr);if(this.hasOwnProperty(Er))ur=this[Er],delete this[Er];else if(Bn.hasOwnProperty(Er)&&"number"==typeof this[Er]&&this[Er]==ur)return;this[Er]=(null!==ur||"boolean"!=typeof this[Er])&&ur})},Fe.observedAttributes=Tn.filter(([tr,Ir])=>15&Ir[0]).map(([tr,Ir])=>{const ur=Ir[1]||tr;return mr.set(ur,tr),ur})}}return Fe},an=function(){var Fe=(0,i.c)(function*(ft,dn,Tn,Bn,mr){if(!(32&dn.$flags$)){dn.$flags$|=32;{if((mr=zr(Tn)).then){const Er=()=>{};mr=yield mr,Er()}mr.isProxied||(kt(mr,Tn,2),mr.isProxied=!0);const ur=()=>{};dn.$flags$|=8;try{new mr(dn)}catch(Er){sr(Er)}dn.$flags$&=-9,ur()}if(mr.style){let ur=mr.style;const Er=ye(Tn);if(!sn.has(Er)){const Ai=()=>{};((Fe,ft,dn)=>{let Tn=sn.get(Fe);dr&&dn?(Tn=Tn||new CSSStyleSheet,"string"==typeof Tn?Tn=ft:Tn.replaceSync(ft)):Tn=ft,sn.set(Fe,Tn)})(Er,ur,!!(1&Tn.$flags$)),Ai()}}}const tr=dn.$ancestorComponent$,Ir=()=>ke(dn,!0);tr&&tr["s-rc"]?tr["s-rc"].push(Ir):Ir()});return function(dn,Tn,Bn,mr,tr){return Fe.apply(this,arguments)}}(),Hn=(Fe,ft={})=>{var dn;const Bn=[],mr=ft.exclude||[],tr=Qe.customElements,Ir=ut.head,ur=Ir.querySelector("meta[charset]"),Er=ut.createElement("style"),Ai=[];let Di,Pi=!0;Object.assign(Xt,ft),Xt.$resourcesUrl$=new URL(ft.resourcesUrl||"./",ut.baseURI).href,Fe.map(nr=>{nr[1].map(Ht=>{const Wn={$flags$:Ht[0],$tagName$:Ht[1],$members$:Ht[2],$listeners$:Ht[3]};Wn.$members$=Ht[2],Wn.$listeners$=Ht[3];const $n=Wn.$tagName$,jn=class extends HTMLElement{constructor(wr){super(wr),Kr(wr=this,Wn),1&Wn.$flags$&&wr.attachShadow({mode:"open"})}connectedCallback(){Di&&(clearTimeout(Di),Di=null),Pi?Ai.push(this):Xt.jmp(()=>(Fe=>
1{if(!(1&Xt.$flags$)){const ft=ti(Fe),dn=ft.$cmpMeta$,Tn=()=>{};if(1&ft.$flags$)Fn(Fe,ft,dn.$listeners$);else{ft.$flags$|=1;{let Bn=Fe;for(;Bn=Bn.parentNode||Bn.host;)if(Bn["s-p"]){De(ft,ft.$ancestorComponent$=Bn);break}}dn.$members$&&Object.entries(dn.$members$).map(([Bn,[mr]])=>{if(31&mr&&Fe.hasOwnProperty(Bn)){const tr=Fe[Bn];delete Fe[Bn],Fe[Bn]=tr}}),an(Fe,ft,dn)}Tn()}})(this))}disconnectedCallback(){Xt.jmp(()=>(Fe=>{if(!(1&Xt.$flags$)){const ft=ti(this),dn=ft.$lazyInstance$;ft.$rmListeners$&&(ft.$rmListeners$.map(Tn=>Tn()),ft.$rmListeners$=void 0),mn(dn,"disconnectedCallback")}})())}componentOnReady(){return ti(this).$onReadyPromise$}};Wn.$lazyBundleId$=nr[0],!mr.includes($n)&&!tr.get($n)&&(Bn.push($n),tr.define($n,kt(jn,Wn,1)))})});{Er.innerHTML=Bn+"{visibility:hidden}.hydrated{visibility:inherit}",Er.setAttribute("data-styles","");const nr=null!==(dn=Xt.$nonce$)&&void 0!==dn?dn:Q(ut);null!=nr&&Er.setAttribute("nonce",nr),Ir.insertBefore(Er,ur?ur.nextSibling:Ir.firstChild)}Pi=!1,Ai.length?Ai.map(nr=>nr.connectedCallback()):Xt.jmp(()=>Di=setTimeout(cn,30))},Fn=(Fe,ft,dn,Tn)=>{dn&&dn.map(([Bn,mr,tr])=>{const Ir=gr(Fe,Bn),ur=On(ft,tr),Er=Mr(Bn);Xt.ael(Ir,mr,ur,Er),(ft.$rmListeners$=ft.$rmListeners$||[]).push(()=>Xt.rel(Ir,mr,ur,Er))})},On=(Fe,ft)=>dn=>{try{256&Fe.$flags$?Fe.$lazyInstance$[ft](dn):(Fe.$queuedListeners$=Fe.$queuedListeners$||[]).push([ft,dn])}catch(Tn){sr(Tn)}},gr=(Fe,ft)=>16&ft?ut.body:Fe,Mr=Fe=>
10!=(2&Fe),Fr=new WeakMap,ti=Fe=>Fr.get(Fe),Nr=(Fe,ft)=>Fr.set(ft.$lazyInstance$=Fe,ft),Kr=(Fe,ft)=>{const dn={$flags$:0,$hostElement$:Fe,$cmpMeta$:ft,$instanceValues$:new Map};return dn.$onInstancePromise$=new Promise(Tn=>dn.$onInstanceResolve$=Tn),dn.$onReadyPromise$=new Promise(Tn=>dn.$onReadyResolve$=Tn),Fe["s-p"]=[],Fe["s-rc"]=[],Fn(Fe,dn,ft.$listeners$),Fr.set(Fe,dn)},Jr=(Fe,ft)=>ft in Fe,sr=(Fe,ft)=>(0,console.error)(Fe,ft),or=new Map,zr=(Fe,ft,dn)=>{const Tn=Fe.$tagName$.replace(/-/g,"_"),Bn=Fe.$lazyBundleId$,mr=or.get(Bn);if(mr)return mr[Tn];if(!dn||!BUILD.hotModuleReplacement){const tr=Ir=>(or.set(Bn,Ir),Ir[Tn]);switch(Bn){case"pwa-action-sheet":return a.e(2152).then(a.bind(a,52152)).then(tr,sr);case"pwa-camera-modal":return a.e(6056).then(a.bind(a,56056)).then(tr,sr);case"pwa-toast":return a.e(3276).then(a.bind(a,53276)).then(tr,sr);case"pwa-camera-modal-instance":return a.e(1148).then(a.bind(a,51148)).then(tr,sr);case"pwa-camera":return a.e(580).then(a.bind(a,10580)).then(tr,sr)}}return a(70996)(`./${Bn}.entry.js`).then(tr=>(or.set(Bn,tr),tr[Tn]),sr)},sn=new Map,Qe=typeof window<"u"?window:{},ut=Qe.document||{head:{}},Xt={$flags$:0,$resourcesUrl$:"",jmp:Fe=>Fe(),raf:Fe=>requestAnimationFrame(Fe),ael:(Fe,ft,dn,Tn)=>Fe.addEventListener(ft,dn,Tn),rel:(Fe,ft,dn,Tn)=>Fe.removeEventListener(ft,dn,Tn),ce:(Fe,ft)=>new CustomEvent(Fe,ft)},wn=Fe=>Promise.resolve(Fe),dr=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),vn=[],jt=[],Ct=(Fe,ft)=>dn=>{Fe.push(dn),P||(P=!0,ft&&4&Xt.$flags$?et(Ze):Xt.raf(Ze))},Mt=Fe=>{for(let ft=0;ft<Fe.length;ft++)try{Fe[ft](performance.now())}catch(dn){sr(dn)}Fe.length=0},Ze=()=>{Mt(vn),Mt(jt),(P=vn.length>0)&&Xt.raf(Ze)},et=Fe=>wn().then(Fe),Zt=Ct(jt,!0)},46252:(B,G,a)=>{"use strict";a.d(G,{u:()=>P});var i=a(73448),v=a(91704),b=a.n(v);const _={SecureStorage:"ionicSecureStorage",IndexedDB:b().INDEXEDDB,LocalStorage:b().LOCALSTORAGE},C={name:"_ionicstorage",storeName:"_ionickv",dbKey:"_ionickey",driverOrder:[_.SecureStorage,_.IndexedDB,_.LocalStorage]};class P{constructor(R=C){this._db=null,this._secureStorageDriver=null;const k=Object.assign({},C,R||{});this._config=k}create(){var R=this;return(0,i.c)(function*(){const k=b().createInstance(R._config);return R._db=k,yield k.setDriver(R._config.driverOrder||[]),R})()}defineDriver(R){var k=this;return(0,i.c)(function*(){return R._driver===_.SecureStorage&&(k._secureStorageDriver=R),b().defineDriver(R)})()}get driver(){var R;return(null===(R=this._db)||void 0===R?void 0:R.driver())||null}assertDb(){if(!this._db)throw new Error("Database not created. Must call create() first");return this._db}get(R){return this.assertDb().getItem(R)}set(R,k){return this.assertDb().setItem(R,k)}remove(R){return this.assertDb().removeItem(R)}clear(){return this.assertDb().clear()}length(){return this.assertDb().length()}keys(){return this.assertDb().keys()}forEach(R){return this.assertDb().iterate(R)}setEncryptionKey(R){var k;if(!this._secureStorageDriver)throw new Error("@ionic-enterprise/secure-storage not installed. Encryption support not available");null===(k=this._secureStorageDriver)||void 0===k||k.setEncryptionKey(R)}}},77816:(B,G,a)=>{"use strict";a.d(G,{e:()=>hs});var i=a(73448),v=a(81316),b="4.2.1";function _(Ue,yn){return new Promise(function(Kt){return setTimeout(Kt,Ue,yn)})}function C(){return _(0)}function S(Ue){return!!Ue&&"function"==typeof Ue.then}function R(Ue,yn){try{var Kt=Ue();S(Kt)?Kt.then(function(Bt){return yn(!0,Bt)},function(Bt){return yn(!1,Bt)}):yn(!0,Kt)}catch(Bt){yn(!1,Bt)}}function k(Ue,yn,Kt){return void 0===Kt&&(Kt=16),(0,v.kH)(this,void 0,void 0,function(){var Bt,Qn,cr,Or;return(0,v.KE)(this,function(ii){switch(ii.label){case 0:Bt=Array(Ue.length),Qn=Date.now(),cr=0,ii.label=1;case 1:return cr<Ue.length?(Bt[cr]=yn(Ue[cr],cr),(Or=Date.now())>=Qn+Kt?(Qn=Or,[4,_(0)]):[3,3]):[3,4];case 2:ii.sent(),ii.label=3;case 3:return++cr,[3,1];case 4:return[2,Bt]}})})}function x(Ue){Ue.then(void 0,function(){})}function te(Ue){return parseInt(Ue)}function J(Ue){return parseFloat(Ue)}function Q(Ue,yn){return"number"==typeof Ue&&isNaN(Ue)?yn:Ue}function we(Ue){return Ue.reduce(function(yn,Kt){return yn+(Kt?1:0)},0)}function de(Ue,yn){if(void 0===yn&&(yn=1),Math.abs(yn)>=1)return Math.round(Ue/yn)*yn;var Kt=1/yn;return Math.round(Ue*Kt)/Kt}function Ye(Ue,yn){var Ge=0,ze=0,he=0,Ft=0;he+=(Ft+=(65535&Ue[1])+(65535&yn[1]))>>>16,Ft&=65535,ze+=(he+=(Ue[1]>>>16)+(yn[1]>>>16))>>>16,he&=65535,Ge+=(ze+=(65535&Ue[0])+(65535&yn[0]))>>>16,Ge+=(Ue[0]>>>16)+(yn[0]>>>16),Ue[0]=(Ge&=65535)<<16|(ze&=65535),Ue[1]=he<<16|Ft}function pe(Ue,yn){var Bt=65535&Ue[0],Qn=Ue[1]>>>16,cr=65535&Ue[1],ii=65535&yn[0],fi=yn[1]>>>16,Fi=65535&yn[1],Ge=0,ze=0,he=0,Ft=0;he+=(Ft+=cr*Fi)>>>16,Ft&=65535,ze+=(he+=Qn*Fi)>>>16,he&=65535,ze+=(he+=cr*fi)>>>16,he&=65535,Ge+=(ze+=Bt*Fi)>>>16,ze&=65535,Ge+=(ze+=Qn*fi)>>>16,ze&=65535,Ge+=(ze+=cr*ii)>>>16,Ge+=(Ue[0]>>>16)*Fi+Bt*fi+Qn*ii+cr*(yn[0]>>>16),Ue[0]=(Ge&=65535)<<16|(ze&=65535),Ue[1]=he<<16|Ft}function ae(Ue,yn){var Kt=Ue[0];32==(yn%=64)?(Ue[0]=Ue[1],Ue[1]=Kt):yn<32?(Ue[0]=Kt<<yn|Ue[1]>>>32-yn,Ue[1]=Ue[1]<<yn|Kt>>>32-yn):(Ue[0]=Ue[1]<<(yn-=32)|Kt>>>32-yn,Ue[1]=Kt<<yn|Ue[1]>>>32-yn)}function Ve(Ue,yn){0!=(yn%=64)&&(yn<32?(Ue[0]=Ue[1]>>>32-yn,Ue[1]=Ue[1]<<yn):(Ue[0]=Ue[1]<<yn-32,Ue[1]=0))}function Ne(Ue,yn){Ue[0]^=yn[0],Ue[1]^=yn[1]}var Ie=[4283543511,3981806797],H=[3301882366,444984403];function j(Ue){var yn=[0,Ue[0]>>>1];Ne(Ue,yn),pe(Ue,Ie),yn[1]=Ue[0]>>>1,Ne(Ue,yn),pe(Ue,H),yn[1]=Ue[0]>>>1,Ne(Ue,yn)}var ye=[2277735313,289559509],Le=[1291169091,658871167],W=[0,5],We=[0,1390208809],At=[0,944331445];function Pe(){var Ue=window,yn=navigator;return we(["MSCSSMatrix"in Ue,"msSetImmediate"in Ue,"msIndexedDB"in Ue,"msMaxTouchPoints"in yn,"msPointerEnabled"in yn])>=4}function ke(){var Ue=window,yn=navigator;return we(["webkitPersistentStorage"in yn,"webkitTemporaryStorage"in yn,0===yn.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in Ue,"BatteryManager"in Ue,"webkitMediaStream"in Ue,"webkitSpeechGrammar"in Ue])>=5}function Lt(){var Ue=window,yn=navigator;return we(["ApplePayError"in Ue,"CSSPrimitiveValue"in Ue,"Counter"in Ue,0===yn.vendor.indexOf("Apple"),"getStorageUpdates"in yn,"WebKitMediaKeys"in Ue])>=4}function Dt(){var Ue=window,yn=Ue.HTMLElement,Kt=Ue.Document;return we(["safari"in Ue,!("ongestureend"in Ue),!("TouchEvent"in Ue),!("orientation"in Ue),yn&&!("autocapitalize"in yn.prototype),Kt&&"pointerLockElement"in Kt.prototype])>=4}function He(){var Ue=window;return!!function ue(Ue){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String(Ue))}(Ue.print)&&we(["[object WebPageNamespace]"===String(Ue.browser),"MicrodataExtractor"in Ue])>=1}function ge(){var Ue,yn,Kt=window;return we(["buildID"in navigator,"MozAppearance"in(null!==(yn=null===(Ue=document.documentElement)||void 0===Ue?void 0:Ue.style)&&void 0!==yn?yn:{}),"onmozfullscreenchange"in Kt,"mozInnerScreenX"in Kt,"CSSMozDocumentRule"in Kt,"CanvasCaptureMediaStream"in Kt])>=4}function rn(){var Ue=window,yn=navigator,Kt=Ue.CSS,Bt=Ue.HTMLButtonElement;return we([!("getStorageUpdates"in yn),Bt&&"popover"in Bt.prototype,"CSSCounterStyleRule"in Ue,Kt.supp
1orts("font-size-adjust: ex-height 0.5"),Kt.supports("text-transform: full-width")])>=4}function dt(){var Ue=document;return(Ue.exitFullscreen||Ue.msExitFullscreen||Ue.mozCancelFullScreen||Ue.webkitExitFullscreen).call(Ue)}function lt(){var Ue=ke(),yn=ge(),Kt=window,Bt=navigator,Qn="connection";return Ue?we([!("SharedWorker"in Kt),Bt[Qn]&&"ontypechange"in Bt[Qn],!("sinkId"in new window.Audio)])>=2:!!yn&&we(["onorientationchange"in Kt,"orientation"in Kt,/android/i.test(navigator.appVersion)])>=2}function rt(Ue,yn,Kt){var Bt,Qn,cr;return void 0===Kt&&(Kt=50),(0,v.kH)(this,void 0,void 0,function(){var Or,ii;return(0,v.KE)(this,function(fi){switch(fi.label){case 0:Or=document,fi.label=1;case 1:return Or.body?[3,3]:[4,_(Kt)];case 2:return fi.sent(),[3,1];case 3:ii=Or.createElement("iframe"),fi.label=4;case 4:return fi.trys.push([4,,10,11]),[4,new Promise(function(Fi,Ge){var ze=!1,he=function(){ze=!0,Fi()};ii.onload=he,ii.onerror=function(Ti){ze=!0,Ge(Ti)};var Un=ii.style;Un.setProperty("display","block","important"),Un.position="absolute",Un.top="0",Un.left="0",Un.visibility="hidden",yn&&"srcdoc"in ii?ii.srcdoc=yn:ii.src="about:blank",Or.body.appendChild(ii);var bi=function(){var Ti,us;ze||("complete"===(null===(us=null===(Ti=ii.contentWindow)||void 0===Ti?void 0:Ti.document)||void 0===us?void 0:us.readyState)?he():setTimeout(bi,10))};bi()})];case 5:fi.sent(),fi.label=6;case 6:return null!==(Qn=null===(Bt=ii.contentWindow)||void 0===Bt?void 0:Bt.document)&&void 0!==Qn&&Qn.body?[3,8]:[4,_(Kt)];case 7:return fi.sent(),[3,6];case 8:return[4,Ue(ii,ii.contentWindow)];case 9:return[2,fi.sent()];case 10:return null===(cr=ii.parentNode)||void 0===cr||cr.removeChild(ii),[7];case 11:return[2]}})})}function kt(Ue){for(var yn=function Y(Ue){for(var yn,Kt,Bt="Unexpected syntax '".concat(Ue,"'"),Qn=/^\s*([a-z-]*)(.*)$/i.exec(Ue),cr=Qn[1]||void 0,Or={},ii=/([.:#][\w-]+|\[.+?\])/gi,fi=function(he,Ft){Or[he]=Or[he]||[],Or[he].push(Ft)};;){var Fi=ii.exec(Qn[2]);if(!Fi)break;var Ge=Fi[0];switch(Ge[0]){case".":fi("class",Ge.slice(1));break;case"#":fi("id",Ge.slice(1));break;case"[":var ze=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(Ge);if(!ze)throw new Error(Bt);fi(ze[1],null!==(Kt=null!==(yn=ze[4])&&void 0!==yn?yn:ze[5])&&void 0!==Kt?Kt:"");break;default:throw new Error(Bt)}}return[cr,Or]}(Ue),Bt=yn[1],Qn=document.createElement(yn[0]??"div"),cr=0,Or=Object.keys(Bt);cr<Or.length;cr++){var ii=Or[cr],fi=Bt[ii].join(" ");"style"===ii?an(Qn.style,fi):Qn.setAttribute(ii,fi)}return Qn}function an(Ue,yn){for(var Kt=0,Bt=yn.split(";");Kt<Bt.length;Kt++){var cr=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(Bt[Kt]);cr&&Ue.setProperty(cr[1],cr[2],cr[4]||"")}}var bn=44100;function gr(){return(0,v.kH)(this,void 0,void 0,function(){var Ue,yn,Kt;return(0,v.KE)(this,function(Bt){switch(Bt.label){case 0:return yn=function Yn(){return new Promise(function(Ue){var yn=document,Kt="visibilitychange",Bt=function(){yn.hidden||(yn.removeEventListener(Kt,Bt),Ue())};yn.addEventListener(Kt,Bt),Bt()})}().then(function(){return _(500)}),Kt=function Mr(){return(0,v.kH)(this,void 0,void 0,function(){var Ue,yn,Kt,Bt,Qn,cr,Or;return(0,v.KE)(this,function(ii){switch(ii.label){case 0:return Ue=window,(yn=Ue.OfflineAudioContext||Ue.webkitOfflineAudioContext)?function Vr(){return Lt()&&!Dt()&&!function pt(){var Ue=window;return we(["DOMRectList"in Ue,"RTCPeerConnectionIceEvent"in Ue,"SVGGeometryElement"in Ue,"ontransitioncancel"in Ue])>=3}()}()?[2,-1]:[4,Fr(yn)]:[2,-2];case 1:return(Kt=ii.sent())?(Bt=new yn(1,Kt.length-1+4e4,bn),(Qn=Bt.createBufferSource()).buffer=Kt,Qn.loop=!0,Qn.loopStart=(Kt.length-1)/bn,Qn.loopEnd=Kt.length/bn,Qn.connect(Bt.destination),Qn.start(),[4,ti(Bt)]):[2,-3];case 2:return(cr=ii.sent())?(Or=function Nr(Ue,yn){for(var Kt=void 0,Bt=!1,Qn=0;Qn<yn.length;Qn+=Math.floor(yn.length/10))if(0!==yn[Qn])if(void 0===Kt)Kt=yn[Qn];else if(Kt!==yn[Qn]){Bt=!0;break}return void 0===Kt?Kt=Ue.getChannelData(0)[Ue.length-1]:Bt&&(Kt=function Kr(Ue){for(var yn=1/0,Kt=-1/0,Bt=0;Bt<Ue.length;Bt++){var Qn=Ue[Bt];0!==Qn&&(Qn<yn&&(yn=Qn),Qn>Kt&&(Kt=Qn))}return(yn+Kt)/2}(yn)),Kt}(Kt,cr.getChannelData(0).subarray(Kt.length-1)),[2,Math.abs(Or)]):[2,-3]}})})}().then(function(Qn){return Ue=[!0,Qn]},function(Qn){return Ue=[!1,Qn]}),[4,Promise.race([yn,Kt])];case 1:return Bt.sent(),[2,function(){if(!Ue)return-3;if(!Ue[0])throw Ue[1];return Ue[1]}]}})})}function Fr(Ue){return(0,v.kH)(this,void 0,void 0,function(){var Kt,Bt,Qn,cr;return(0,v.KE)(this,function(Or){switch(Or.label){case 0:return Kt=new Ue(1,3396,bn),(Bt=Kt.createOscillator()).type="square",Bt.frequency.value=1e3,(Qn=Kt.createDynamicsCompressor()).threshold.value=-70,Qn.knee.value=40,Qn.ratio.value=12,Qn.attack.value=0,Qn.release.value=.25,(cr=Kt.createBiquadFilter()).type="allpass",cr.frequency.value=5.239622852977861,cr.Q.value=.1,Bt.connect(Qn),Qn.connect(cr),cr.connect(Kt.destination),Bt.start(0),[4,ti(Kt)];case 1:return[2,Or.sent()]}})})}function ti(Ue){return new Promise(function(yn,Kt){var Qn=25;Ue.oncomplete=function(Or){return yn(Or.renderedBuffer)};var cr=function(){try{var Or=Ue.startRendering();S(Or)&&x(Or),"suspended"===Ue.state&&(document.hidden||Qn--,Qn>0?setTimeout(cr,200):yn(null))}catch(ii){Kt(ii)}};cr()})}var zr=["monospace","sans-serif","serif"],sn=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera S
1ans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Ct(Ue,yn){return(0,v.kH)(this,void 0,void 0,function(){var Kt,Bt,Qn;return(0,v.KE)(this,function(cr){switch(cr.label){case 0:return function Mt(Ue,yn){Ue.width=240,Ue.height=60,yn.textBaseline="alphabetic",yn.fillStyle="#f60",yn.fillRect(100,1,62,20),yn.fillStyle="#069",yn.font='11pt "Times New Roman"';var Kt="Cwm fjordbank gly ".concat("\u{1f603}");yn.fillText(Kt,2,15),yn.fillStyle="rgba(102, 204, 0, 0.2)",yn.font="18pt Arial",yn.fillText(Kt,4,45)}(Ue,yn),[4,C()];case 1:return cr.sent(),Kt=et(Ue),Bt=et(Ue),Kt!==Bt?[2,["unstable","unstable"]]:(function Ze(Ue,yn){Ue.width=122,Ue.height=110,yn.globalCompositeOperation="multiply";for(var Kt=0,Bt=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];Kt<Bt.length;Kt++){var Qn=Bt[Kt],Or=Qn[1],ii=Qn[2];yn.fillStyle=Qn[0],yn.beginPath(),yn.arc(Or,ii,40,0,2*Math.PI,!0),yn.closePath(),yn.fill()}yn.fillStyle="#f9c",yn.arc(60,60,60,0,2*Math.PI,!0),yn.arc(60,60,20,0,2*Math.PI,!0),yn.fill("evenodd")}(Ue,yn),[4,C()]);case 2:return cr.sent(),Qn=et(Ue),[2,[Kt,Qn]]}})})}function et(Ue){return Ue.toDataURL()}var Er,Ai;function Ht(){var Ue=screen;return[Q(J(Ue.availTop),null),Q(J(Ue.width)-J(Ue.availWidth)-Q(J(Ue.availLeft),0),null),Q(J(Ue.height)-J(Ue.availHeight)-Q(J(Ue.availTop),0),null),Q(J(Ue.availLeft),null)]}function Wn(Ue){for(var yn=0;yn<4;++yn)if(Ue[yn])return!1;return!0}function on(Ue){var yn;return(0,v.kH)(this,void 0,void 0,function(){var Kt,Bt,Qn,cr,Or,ii,fi;return(0,v.KE)(this,function(Fi){switch(Fi.label){case 0:for(Kt=document,Bt=Kt.createElement("div"),Qn=new Array(Ue.length),cr={},le(Bt),fi=0;fi<Ue.length;++fi)"DIALOG"===(Or=kt(Ue[fi])).tagName&&Or.show(),le(ii=Kt.createElement("div")),ii.appendChild(Or),Bt.appendChild(ii),Qn[fi]=Or;Fi.label=1;case 1:return Kt.body?[3,3]:[4,_(50)];case 2:return Fi.sent(),[3,1];case 3:return Kt.body.appendChild(Bt),[4,C()];case 4:Fi.sent();try{for(fi=0;fi<Ue.length;++fi)Qn[fi].offsetParent||(cr[Ue[fi]]=!0)}finally{null===(yn=Bt.parentNode)||void 0===yn||yn.removeChild(Bt)}return[2,cr]}})})}function le(Ue){Ue.style.setProperty("visibility","hidden","important"),Ue.style.setProperty("display","block","important")}function ln(Ue){return matchMedia("(inverted-colors: ".concat(Ue,")")).matches}function Mn(Ue){return matchMedia("(forced-colors: ".concat(Ue,")")).matches}function gn(Ue){return matchMedia("(prefers-contrast: ".concat(Ue,")")).matches}function Tt(Ue){return matchMedia("(prefers-reduced-motion: ".concat(Ue,")")).matches}function Nn(Ue){return matchMedia("(prefers-reduced-transparency: ".concat(Ue,")")).matches}function pr(Ue){return matchMedia("(dynamic-range: ".concat(Ue,")")).matches}var Tr=Math,Gr=function(){return 0},Hr={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]},wt=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),Vt=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),Sr=["FRAGMENT_SHADER","VERTEX_SHADER"],St=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],Rt="WEBGL_debug_renderer_info";function V(Ue){if(Ue.webgl)return Ue.webgl.context;var Kt,yn=document.createElement("canvas");yn.addEventListener("webglCreateContextError",function(){return Kt=void 0});for(var Bt=0,Qn=["webgl","experimental-webgl"];Bt<Qn.length;Bt++){var cr=Qn[Bt];try{Kt=yn.getContext(cr)}catch{}if(Kt)break}return Ue.webgl={context:Kt},Kt}function ne(Ue,yn,Kt){var Bt=Ue.getShaderPrecisionFormat(Ue[yn],Ue[Kt]);return Bt?[Bt.rangeMin,Bt.rangeMax,Bt.precision]:[]}function je(Ue){return Object.keys(Ue.__proto__).filter($e)}function $e(Ue){return"string"==typeof Ue&&!Ue.match(/[^A-Z0-9_x]/)}function Wt(){return ge()}function In(Ue){return"function"==typeof Ue.getParameter}var rr={fonts:function Qe(){var Ue=this;return rt(function(yn,Kt){var Bt=Kt.document;return(0,v.kH)(Ue,void 0,void 0,function(){var Qn,cr,Or,ii,fi,Fi,ze,he,Ft,Un,bi;return(0,v.KE)(this,function(Ti){switch(Ti.label){case 0:return(Qn=Bt.body).style.fontSize="48px",(cr=Bt.createElement("div")).style.setProperty("visibility","hidden","important"),Or={},ii={},Fi=function(us,Ms){return fi("'".concat(us,"',").concat(Ms))},ze=function(){for(var us={},Ms=function(vo){us[vo]=zr.map(function(No){return Fi(vo,No)})},ks=0,Us=sn;ks<Us.length;ks++)Ms(Us[ks]);return us},he=function(us){return zr.some(function(Ms,ks){return us[ks].offsetWidth!==Or[Ms]||us[ks].offsetHeight!==ii[Ms]})},Ft=zr.map(fi=function(us){var Ms=Bt.createElement("span"),ks=Ms.style;return ks.position="absolute",ks.top="0",ks.left="0",ks.fontFamily=us,Ms.textContent="mmMwWLliI0O&1",cr.appendChild(Ms),Ms}),Un=ze(),Qn.appendChild(cr),[4,C()];case 1:for(Ti.sent(),bi=0;bi<zr.length;bi++)Or[zr[bi]]=Ft[bi].offsetWidth,ii[zr[bi]]=Ft[bi].offsetHeight;return[2,sn.filter(function(us){return he(Un[us])})]}})})})},domBlockers:function Ii(Ue){var Kt=(void 0===Ue?{}:Ue).debug;return(0,v.kH)(this,void 0,void 0,function(){var Bt,Qn,Or,ii,fi;return(0,v.KE)(this,function(Fi){switch(Fi.label){case 0:return function yi(){return Lt()||lt()}()?(Bt=function oi(){var Ue=atob;return{abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',Ue("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",Ue("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",Ue("LnNwb25zb3JpdA=="),".ylamainos",Ue("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),Ue("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZH
1BlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",Ue("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",Ue("LmhlYWRlci1ibG9ja2VkLWFk"),Ue("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",Ue("I2FkXzMwMFgyNTA="),Ue("I2Jhbm5lcmZsb2F0MjI="),Ue("I2NhbXBhaWduLWJhbm5lcg=="),Ue("I0FkLUNvbnRlbnQ=")],adGuardChinese:[Ue("LlppX2FkX2FfSA=="),Ue("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",Ue("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),Ue("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",Ue("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",Ue("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",Ue("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),Ue("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),Ue("LmFkZ29vZ2xl"),Ue("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[Ue("YW1wLWF1dG8tYWRz"),Ue("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",Ue("I2FkX2ludmlld19hcmVh")],adGuardRussian:[Ue("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),Ue("LnJlY2xhbWE="),'div[id^="smi2adblock"]',Ue("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[Ue("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),Ue("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",Ue("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),Ue("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),Ue("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",Ue("I3Jla2xhbWk="),Ue("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),Ue("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),Ue("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[Ue("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",Ue("LndpZGdldF9wb19hZHNfd2lkZ2V0"),Ue("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",Ue("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[Ue("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),Ue("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",Ue("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",Ue("I3Jla2xhbW5pLWJveA=="),Ue("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",Ue("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[Ue("I2FkdmVydGVudGll"),Ue("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",Ue("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",Ue("LnNwb25zb3JsaW5rZ3J1ZW4="),Ue("I3dlcmJ1bmdza3k="),Ue("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),Ue("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[Ue("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",Ue("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),Ue("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),Ue("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[Ue("LnJla2xhbW9zX3RhcnBhcw=="),Ue("LnJla2xhbW9zX251b3JvZG9z"),Ue("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),Ue("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),Ue("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[Ue("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[Ue("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),Ue("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiX
1Q=="),"article.category-samarbete",Ue("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[Ue("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),Ue("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),Ue("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",Ue("LmFkX19tYWlu"),Ue("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[Ue("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[Ue("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),Ue("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[Ue("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),Ue("I2xpdmVyZUFkV3JhcHBlcg=="),Ue("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),Ue("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[Ue("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",Ue("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),Ue("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),Ue("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[Ue("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),Ue("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),Ue("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",Ue("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),Ue("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),Ue("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiX
1Q=="),Ue("ZGl2I3NrYXBpZWNfYWQ=")],ro:[Ue("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),Ue("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),Ue("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),Ue("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[Ue("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),Ue("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),Ue("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",Ue("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),Ue("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",Ue("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]}}(),Qn=Object.keys(Bt),[4,on((fi=[]).concat.apply(fi,Qn.map(function(Ge){return Bt[Ge]})))]):[2,void 0];case 1:return Or=Fi.sent(),Kt&&function me(Ue,yn){for(var Kt="DOM blockers debug:\n```",Bt=0,Qn=Object.keys(Ue);Bt<Qn.length;Bt++){var cr=Qn[Bt];Kt+="\n".concat(cr,":");for(var Or=0,ii=Ue[cr];Or<ii.length;Or++){var fi=ii[Or];Kt+="\n ".concat(yn[fi]?"\u{1f6ab}":"\u27a1\ufe0f"," ").concat(fi)}}console.log("".concat(Kt,"\n```"))}(Bt,Or),(ii=Qn.filter(function(Ge){var ze=Bt[Ge];return we(ze.map(function(Ft){return Or[Ft]}))>.6*ze.length})).sort(),[2,ii]}})})},fontPreferences:function zt(){return function en(Ue,yn){return void 0===yn&&(yn=4e3),rt(function(Kt,Bt){var Qn=Bt.document,cr=Qn.body,Or=cr.style;Or.width="".concat(yn,"px"),Or.webkitTextSizeAdjust=Or.textSizeAdjust="none",ke()?cr.style.zoom="".concat(1/Bt.devicePixelRatio):Lt()&&(cr.style.zoom="reset");var ii=Qn.createElement("div");return ii.textContent=(0,v.Mt)([],Array(yn/20<<0),!0).map(function(){return"word"}).join(" "),cr.appendChild(ii),Ue(Qn,cr)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}(function(Ue,yn){for(var Kt={},Bt={},Qn=0,cr=Object.keys(Hr);Qn<cr.length;Qn++){var ii=Hr[Or=cr[Qn]],fi=ii[0],Fi=void 0===fi?{}:fi,Ge=ii[1],ze=void 0===Ge?"mmMwWLliI0fiflO&1":Ge,he=Ue.createElement("span");he.textContent=ze,he.style.whiteSpace="nowrap";for(var Ft=0,Un=Object.keys(Fi);Ft<Un.length;Ft++){var bi=Un[Ft],Ti=Fi[bi];void 0!==Ti&&(he.style[bi]=Ti)}Kt[Or]=he,yn.append(Ue.createElement("br"),he)}for(var us=0,Ms=Object.keys(Hr);us<Ms.length;us++){var Or;Bt[Or=Ms[us]]=Kt[Or].getBoundingClientRect().width}return Bt})},audio:function On(){return(0,v.kH)(this,void 0,void 0,function(){var Ue;return(0,v.KE)(this,function(yn){switch(yn.label){case 0:return[4,gr()];case 1:return Ue=yn.sent(),[2,function(){return function Jr(Ue,yn){if(0===Ue)return Ue;var Bt=Math.floor(Math.log10(Math.abs(Ue)))-Math.floor(yn)+1,Qn=Math.pow(10,-Bt)*(10*yn%10||1);return Math.round(Ue*Qn)/Qn}(Ue(),6.2)}]}})})},screenFrame:function nr(){var Ue=this;if(Lt()&&rn()&&He())return function(){return Promise.resolve(void 0)};var yn=function Pi(){var Ue=this;return function Di(){if(void 0===Ai){var Ue=function(){var yn=Ht();Wn(yn)?Ai=setTimeout(Ue,2500):(Er=yn,Ai=void 0)};Ue()}}(),function(){return(0,v.kH)(Ue,void 0,void 0,function(){var yn;return(0,v.KE)(this,function(Kt){switch(Kt.label){case 0:return Wn(yn=Ht())?Er?[2,(0,v.Mt)([],Er,!0)]:function mn(){var Ue=document;return Ue.fullscreenElement||Ue.msFullscreenElement||Ue.mozFullScreenElement||Ue.webkitFullscreenElement||null}()?[4,dt()]:[3,2]:[3,2];case 1:Kt.sent(),yn=Ht(),Kt.label=2;case 2:return Wn(yn)||(Er=yn),[2,yn]}})})}}();return function(){return(0,v.kH)(Ue,void 0,void 0,function(){var Kt,Bt;return(0,v.KE)(this,function(Qn){switch(Qn.label){case 0:return[4,yn()];case 1:return Kt=Qn.sent(),[2,[(Bt=function(cr){return null===cr?null:de(cr,10)})(Kt[0]),Bt(Kt[1]),Bt(Kt[2]),Bt(Kt[3])]]}})})}},canvas:function Xt(){return function wn(Ue){return(0,v.kH)(this,void 0,void 0,function(){var yn,Kt,Bt,Qn,cr,Or,ii;return(0,v.KE)(this,function(fi){switch(fi.label){case 0:return yn=!1,Qn=function dr(){var Ue=document.createElement("canvas");return Ue.width=1,Ue.height=1,[Ue,Ue.getContext("2d")]}(),function vn(Ue,yn){return!(!yn||!Ue.toDataURL)}(cr=Qn[0],Or=Qn[1])?[3,1]:(Kt=Bt="unsupported",[3,4]);case 1:return yn=function jt(Ue){return Ue.rect(0,0,10,10),Ue.rect(2,2,6,6),!Ue.isPointInPath(
15,5,"evenodd")}(Or),Ue?(Kt=Bt="skipped",[3,4]):[3,2];case 2:return[4,Ct(cr,Or)];case 3:ii=fi.sent(),Kt=ii[0],Bt=ii[1],fi.label=4;case 4:return[2,{winding:yn,geometry:Kt,text:Bt}]}})})}(function Zt(){return Lt()&&rn()&&He()}())},osCpu:function ft(){return navigator.oscpu},languages:function dn(){var Ue=navigator,yn=[],Kt=Ue.language||Ue.userLanguage||Ue.browserLanguage||Ue.systemLanguage;if(void 0!==Kt&&yn.push([Kt]),Array.isArray(Ue.languages))ke()&&function xt(){var Ue=window;return we([!("MediaSettingsRange"in Ue),"RTCEncodedAudioFrame"in Ue,""+Ue.Intl=="[object Intl]",""+Ue.Reflect=="[object Reflect]"])>=3}()||yn.push(Ue.languages);else if("string"==typeof Ue.languages){var Bt=Ue.languages;Bt&&yn.push(Bt.split(","))}return yn},colorDepth:function Tn(){return window.screen.colorDepth},deviceMemory:function Bn(){return Q(J(navigator.deviceMemory),void 0)},screenResolution:function mr(){if(!(Lt()&&rn()&&He()))return function tr(){var Ue=screen,yn=function(Bt){return Q(te(Bt),null)},Kt=[yn(Ue.width),yn(Ue.height)];return Kt.sort().reverse(),Kt}()},hardwareConcurrency:function $n(){return Q(te(navigator.hardwareConcurrency),void 0)},timezone:function jn(){var Ue,yn=null===(Ue=window.Intl)||void 0===Ue?void 0:Ue.DateTimeFormat;if(yn){var Kt=(new yn).resolvedOptions().timeZone;if(Kt)return Kt}var Bt=-function wr(){var Ue=(new Date).getFullYear();return Math.max(J(new Date(Ue,0,1).getTimezoneOffset()),J(new Date(Ue,6,1).getTimezoneOffset()))}();return"UTC".concat(Bt>=0?"+":"").concat(Math.abs(Bt))},sessionStorage:function mi(){try{return!!window.sessionStorage}catch{return!0}},localStorage:function di(){try{return!!window.localStorage}catch{return!0}},indexedDB:function Mi(){if(!Pe()&&!function De(){var Ue=window,yn=navigator;return we(["msWriteProfilerMark"in Ue,"MSStream"in Ue,"msLaunchUri"in yn,"msSaveBlob"in yn])>=3&&!Pe()}())try{return!!window.indexedDB}catch{return!0}},openDatabase:function Qt(){return!!window.openDatabase},cpuClass:function _n(){return navigator.cpuClass},platform:function Ln(){var Ue=navigator.platform;return"MacIntel"===Ue&&Lt()&&!Dt()?function cn(){if("iPad"===navigator.platform)return!0;var Ue=screen,yn=Ue.width/Ue.height;return we(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,yn>.65&&yn<1.53])>=2}()?"iPad":"iPhone":Ue},plugins:function ut(){var Ue=navigator.plugins;if(Ue){for(var yn=[],Kt=0;Kt<Ue.length;++Kt){var Bt=Ue[Kt];if(Bt){for(var Qn=[],cr=0;cr<Bt.length;++cr){var Or=Bt[cr];Qn.push({type:Or.type,suffixes:Or.suffixes})}yn.push({name:Bt.name,description:Bt.description,mimeTypes:Qn})}}return yn}},touchSupport:function Fe(){var Kt,Ue=navigator,yn=0;void 0!==Ue.maxTouchPoints?yn=te(Ue.maxTouchPoints):void 0!==Ue.msMaxTouchPoints&&(yn=Ue.msMaxTouchPoints);try{document.createEvent("TouchEvent"),Kt=!0}catch{Kt=!1}return{maxTouchPoints:yn,touchEvent:Kt,touchStart:"ontouchstart"in window}},vendor:function Cn(){return navigator.vendor||""},vendorFlavors:function kr(){for(var Ue=[],yn=0,Kt=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];yn<Kt.length;yn++){var Bt=Kt[yn],Qn=window[Bt];Qn&&"object"==typeof Qn&&Ue.push(Bt)}return Ue.sort()},cookiesEnabled:function si(){var Ue=document;try{Ue.cookie="cookietest=1; SameSite=Strict;";var yn=-1!==Ue.cookie.indexOf("cookietest=");return Ue.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",yn}catch{return!1}},colorGamut:function Re(){for(var Ue=0,yn=["rec2020","p3","srgb"];Ue<yn.length;Ue++){var Kt=yn[Ue];if(matchMedia("(color-gamut: ".concat(Kt,")")).matches)return Kt}},invertedColors:function Pt(){return!!ln("inverted")||!ln("none")&&void 0},forcedColors:function En(){return!!Mn("active")||!Mn("none")&&void 0},monochrome:function Br(){if(matchMedia("(min-monochrome: 0)").matches){for(var Ue=0;Ue<=100;++Ue)if(matchMedia("(max-monochrome: ".concat(Ue,")")).matches)return Ue;throw new Error("Too high value")}},contrast:function jr(){return gn("no-preference")?0:gn("high")||gn("more")?1:gn("low")||gn("less")?-1:gn("forced")?10:void 0},reducedMotion:function Xe(){return!!Tt("reduce")||!Tt("no-preference")&&void 0},reducedTransparency:function An(){return!!Nn("reduce")||!Nn("no-preference")&&void 0},hdr:function ir(){return!!pr("high")||!pr("standard")&&void 0},math:function qr(){var ss,yn=Tr.acosh||Gr,Kt=Tr.asin||Gr,Bt=Tr.asinh||Gr,Qn=Tr.atanh||Gr,cr=Tr.atan||Gr,Or=Tr.sin||Gr,ii=Tr.sinh||Gr,fi=Tr.cos||Gr,Fi=Tr.cosh||Gr,Ge=Tr.tan||Gr,ze=Tr.tanh||Gr,he=Tr.exp||Gr,Ft=Tr.expm1||Gr,Un=Tr.log1p||Gr;return{acos:(Tr.acos||Gr)(.12312423423423424),acosh:yn(1e308),acoshPf:(ss=1e154,Tr.log(ss+Tr.sqrt(ss*ss-1))),asin:Kt(.12312423423423424),asinh:Bt(1),asinhPf:Tr.log(1+Tr.sqrt(2)),atanh:Qn(.5),atanhPf:Tr.log(3)/2,atan:cr(.5),sin:Or(-1e300),sinh:ii(1),sinhPf:Tr.exp(1)-1/Tr.exp(1)/2,cos:fi(10.000000000123),cosh:Fi(1),coshPf:(Tr.exp(1)+1/Tr.exp(1))/2,tan:Ge(-1e300),tanh:ze(1),tanhPf:(Tr.exp(2)-1)/(Tr.exp(2)+1),exp:he(1),expm1:Ft(1),expm1Pf:Tr.exp(1)-1,log1p:Un(10),log1pPf:Tr.log(11),powPI:Tr.pow(Tr.PI,-100)}},pdfViewerEnabled:function bt(){return navigator.pdfViewerEnabled},architecture:function It(){var Ue=new Float32Array(1),yn=new Uint8Array(Ue.buffer);return Ue[0]=1/0,Ue[0]=Ue[0]-Ue[0],yn[3]},applePay:function _t(){var Ue=window.ApplePaySession;if("function"!=typeof Ue?.canMakePayments)return-1;try{return Ue.canMakePayments()?1:0}catch(yn){return function hn(Ue){if(Ue instanceof Error){if("InvalidAccessError"===Ue.name){if(/\bfrom\b.*\binsecure\b/i.test(Ue.message))return-2;if(/\bdifferent\b.*\borigin\b.*top.level\b.*\bframe\b/i.test(Ue.message))return-3}if("SecurityError"===Ue.name&&/\bthird.party iframes?.*\bnot.allowed\b/i.test(Ue.message))return-3}throw Ue}(yn)}},privateClickMeasurement:function T(){var Ue,yn=document.createElement("a"),Kt=null!==(Ue=yn.attributionSourceId)&&void 0!==Ue?Ue:yn.attributionsourceid;return void 0===Kt?void 0:String(Kt)}
1,webGlBasics:function U(Ue){var yn,Kt,Bt,Qn,cr,Or,fi=V(Ue.cache);if(!fi)return-1;if(!In(fi))return-2;var Fi=Wt()?null:fi.getExtension(Rt);return{version:(null===(yn=fi.getParameter(fi.VERSION))||void 0===yn?void 0:yn.toString())||"",vendor:(null===(Kt=fi.getParameter(fi.VENDOR))||void 0===Kt?void 0:Kt.toString())||"",vendorUnmasked:Fi?null===(Bt=fi.getParameter(Fi.UNMASKED_VENDOR_WEBGL))||void 0===Bt?void 0:Bt.toString():"",renderer:(null===(Qn=fi.getParameter(fi.RENDERER))||void 0===Qn?void 0:Qn.toString())||"",rendererUnmasked:Fi?null===(cr=fi.getParameter(Fi.UNMASKED_RENDERER_WEBGL))||void 0===cr?void 0:cr.toString():"",shadingLanguageVersion:(null===(Or=fi.getParameter(fi.SHADING_LANGUAGE_VERSION))||void 0===Or?void 0:Or.toString())||""}},webGlExtensions:function ie(Ue){var Kt=V(Ue.cache);if(!Kt)return-1;if(!In(Kt))return-2;var Bt=Kt.getSupportedExtensions(),Qn=Kt.getContextAttributes(),cr=[],Or=[],ii=[],fi=[];if(Qn)for(var Fi=0,Ge=Object.keys(Qn);Fi<Ge.length;Fi++){var ze=Ge[Fi];cr.push("".concat(ze,"=").concat(Qn[ze]))}for(var Ft=0,Un=je(Kt);Ft<Un.length;Ft++){var Ti=Kt[bi=Un[Ft]];Or.push("".concat(bi,"=").concat(Ti).concat(wt.has(Ti)?"=".concat(Kt.getParameter(Ti)):""))}if(Bt)for(var us=0,Ms=Bt;us<Ms.length;us++){var ks=Ms[us];if(!("WEBGL_polygon_mode"===ks||ks===Rt&&Wt())){var Us=Kt.getExtension(ks);if(Us){"WEBGL_polygon_mode"===ks&&console.log(je(Us));for(var as=0,vo=je(Us);as<vo.length;as++){var bi;Ti=Us[bi=vo[as]],ii.push("".concat(bi,"=").concat(Ti).concat(Vt.has(Ti)?"=".concat(Kt.getParameter(Ti)):""))}}}}for(var No=0,ss=Sr;No<ss.length;No++)for(var ra=ss[No],qo=0,fo=St;qo<fo.length;qo++){var Uo=fo[qo],da=ne(Kt,ra,Uo);fi.push("".concat(ra,".").concat(Uo,"=").concat(da.join(",")))}return ii.sort(),Or.sort(),{contextAttributes:cr,parameters:Or,shaderPrecisions:fi,extensions:Bt,extensionParameters:ii}}},Xn="$ if upgrade to Pro: https://fpjs.dev/pro";function Rr(Ue){var yn=function xi(Ue){if(lt())return.4;if(Lt())return!Dt()||rn()&&He()?.3:.5;var yn="value"in Ue.platform?Ue.platform.value:"";return/^Win/.test(yn)?.6:/^Mac/.test(yn)?.5:.7}(Ue),Kt=function Oi(Ue){return de(.99+.01*Ue,1e-4)}(yn);return{score:yn,comment:Xn.replace(/\$/g,"".concat(Kt))}}function fs(Ue){return JSON.stringify(Ue,function(yn,Kt){return Kt instanceof Error?function it(Ue){var yn;return(0,v.C3)({name:Ue.name,message:Ue.message,stack:null===(yn=Ue.stack)||void 0===yn?void 0:yn.split("\n")},Ue)}(Kt):Kt},2)}function Gs(Ue){return function Ut(Ue,yn){var Ge,Kt=function Se(Ue){for(var yn=new Uint8Array(Ue.length),Kt=0;Kt<Ue.length;Kt++){var Bt=Ue.charCodeAt(Kt);if(Bt>127)return(new TextEncoder).encode(Ue);yn[Kt]=Bt}return yn}(Ue),Bt=[0,Kt.length],Qn=Bt[1]%16,cr=Bt[1]-Qn,Or=[0,yn=yn||0],ii=[0,yn],fi=[0,0],Fi=[0,0];for(Ge=0;Ge<cr;Ge+=16)fi[0]=Kt[Ge+4]|Kt[Ge+5]<<8|Kt[Ge+6]<<16|Kt[Ge+7]<<24,fi[1]=Kt[Ge]|Kt[Ge+1]<<8|Kt[Ge+2]<<16|Kt[Ge+3]<<24,Fi[0]=Kt[Ge+12]|Kt[Ge+13]<<8|Kt[Ge+14]<<16|Kt[Ge+15]<<24,Fi[1]=Kt[Ge+8]|Kt[Ge+9]<<8|Kt[Ge+10]<<16|Kt[Ge+11]<<24,pe(fi,ye),ae(fi,31),pe(fi,Le),Ne(Or,fi),ae(Or,27),Ye(Or,ii),pe(Or,W),Ye(Or,We),pe(Fi,Le),ae(Fi,33),pe(Fi,ye),Ne(ii,Fi),ae(ii,31),Ye(ii,Or),pe(ii,W),Ye(ii,At);fi[0]=0,fi[1]=0,Fi[0]=0,Fi[1]=0;var ze=[0,0];switch(Qn){case 15:ze[1]=Kt[Ge+14],Ve(ze,48),Ne(Fi,ze);case 14:ze[1]=Kt[Ge+13],Ve(ze,40),Ne(Fi,ze);case 13:ze[1]=Kt[Ge+12],Ve(ze,32),Ne(Fi,ze);case 12:ze[1]=Kt[Ge+11],Ve(ze,24),Ne(Fi,ze);case 11:ze[1]=Kt[Ge+10],Ve(ze,16),Ne(Fi,ze);case 10:ze[1]=Kt[Ge+9],Ve(ze,8),Ne(Fi,ze);case 9:ze[1]=Kt[Ge+8],Ne(Fi,ze),pe(Fi,Le),ae(Fi,33),pe(Fi,ye),Ne(ii,Fi);case 8:ze[1]=Kt[Ge+7],Ve(ze,56),Ne(fi,ze);case 7:ze[1]=Kt[Ge+6],Ve(ze,48),Ne(fi,ze);case 6:ze[1]=Kt[Ge+5],Ve(ze,40),Ne(fi,ze);case 5:ze[1]=Kt[Ge+4],Ve(ze,32),Ne(fi,ze);case 4:ze[1]=Kt[Ge+3],Ve(ze,24),Ne(fi,ze);case 3:ze[1]=Kt[Ge+2],Ve(ze,16),Ne(fi,ze);case 2:ze[1]=Kt[Ge+1],Ve(ze,8),Ne(fi,ze);case 1:ze[1]=Kt[Ge],Ne(fi,ze),pe(fi,ye),ae(fi,31),pe(fi,Le),Ne(Or,fi)}return Ne(Or,Bt),Ne(ii,Bt),Ye(Or,ii),Ye(ii,Or),j(Or),j(ii),Ye(Or,ii),Ye(ii,Or),("00000000"+(Or[0]>>>0).toString(16)).slice(-8)+("00000000"+(Or[1]>>>0).toString(16)).slice(-8)+("00000000"+(ii[0]>>>0).toString(16)).slice(-8)+("00000000"+(ii[1]>>>0).toString(16)).slice(-8)}(function bs(Ue){for(var yn="",Kt=0,Bt=Object.keys(Ue).sort();Kt<Bt.length;Kt++){var Qn=Bt[Kt],cr=Ue[Qn],Or="error"in cr?"error":JSON.stringify(cr.value);yn+="".concat(yn?"|":"").concat(Qn.replace(/([:|\\])/g,"\\$1"),":").concat(Or)}return yn}(Ue))}function Ci(Ue){return void 0===Ue&&(Ue=50),function P(Ue,yn){void 0===yn&&(yn=1/0);var Kt=window.requestIdleCallback;return Kt?new Promise(function(Bt){return Kt.call(window,function(){return Bt()},{timeout:yn}
1)}):_(Math.min(Ue,yn))}(Ue,2*Ue)}function Js(Ue,yn){var Kt=Date.now();return{get:function(Bt){return(0,v.kH)(this,void 0,void 0,function(){var Qn,cr,Or;return(0,v.KE)(this,function(ii){switch(ii.label){case 0:return Qn=Date.now(),[4,Ue()];case 1:return cr=ii.sent(),Or=function Ns(Ue){var yn;return{get visitorId(){return void 0===yn&&(yn=Gs(this.components)),yn},set visitorId(Bt){yn=Bt},confidence:Rr(Ue),components:Ue,version:b}}(cr),(yn||Bt?.debug)&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(Or.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(Qn-Kt,"\nvisitorId: ").concat(Or.visitorId,"\ncomponents: ").concat(fs(cr),"\n```")),[2,Or]}})})}}}var Je={load:function $t(Ue){var yn;return void 0===Ue&&(Ue={}),(0,v.kH)(this,void 0,void 0,function(){var Bt,Qn;return(0,v.KE)(this,function(cr){switch(cr.label){case 0:return(!(null!==(yn=Ue.monitoring)&&void 0!==yn)||yn)&&function Nt(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var Ue=new XMLHttpRequest;Ue.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(b,"/npm-monitoring"),!0),Ue.send()}catch(yn){console.error(yn)}}(),Bt=Ue.debug,[4,Ci(Ue.delayFallback)];case 1:return cr.sent(),Qn=function fr(Ue){return function K(Ue,yn,Kt){var Bt=Object.keys(Ue).filter(function(cr){return function ee(Ue,yn){return!function D(Ue,yn){for(var Kt=0,Bt=Ue.length;Kt<Bt;++Kt)if(Ue[Kt]===yn)return!0;return!1}(Ue,yn)}(Kt,cr)}),Qn=k(Bt,function(cr){return function ce(Ue,yn){var Kt=new Promise(function(Bt){var Qn=Date.now();R(Ue.bind(null,yn),function(){for(var cr=[],Or=0;Or<arguments.length;Or++)cr[Or]=arguments[Or];var ii=Date.now()-Qn;if(!cr[0])return Bt(function(){return{error:cr[1],duration:ii}});var fi=cr[1];if(function se(Ue){return"function"!=typeof Ue}
1(fi))return Bt(function(){return{value:fi,duration:ii}});Bt(function(){return new Promise(function(Fi){var Ge=Date.now();R(fi,function(){for(var ze=[],he=0;he<arguments.length;he++)ze[he]=arguments[he];var Ft=ii+Date.now()-Ge;if(!ze[0])return Fi({error:ze[1],duration:Ft});Fi({value:ze[1],duration:Ft})})})})})});return x(Kt),function(){return Kt.then(function(Qn){return Qn()})}}(Ue[cr],yn)});return x(Qn),function(){return(0,v.kH)(this,void 0,void 0,function(){var ii,fi,Fi,Ge;return(0,v.KE)(this,function(ze){switch(ze.label){case 0:return[4,Qn];case 1:return[4,k(ze.sent(),function(he){var Ft=he();return x(Ft),Ft})];case 2:return ii=ze.sent(),[4,Promise.all(ii)];case 3:for(fi=ze.sent(),Fi={},Ge=0;Ge<Bt.length;++Ge)Fi[Bt[Ge]]=fi[Ge];return[2,Fi]}})})}}(rr,Ue,[])}({cache:{},debug:Bt}),[2,Js(Qn,Bt)]}})})},hashComponents:Gs,componentsToDebugString:fs},oe=a(95657),qe=a(21576),Me=a(34680),Ce=a(32116),Ke=a(87264),tt=a(22716),Et=a(72852),Vn=a(60331),Gn=a(16996),Jn=a(51676),ar=a(97048),Gi=a(91368),zi=a(92512),is=a(2132),es=a(83068),go=a(64420);let hs=(()=>{class Ue{firebaseApi;storage;leadWatcher;afAuth;auth;store;http;datePipe;conversationApiService;util;modalCtrl;format;isLoginMode=!0;loggedInUser={};myTemplates=[];tasksListener;userUpdated$=new oe.E;conversationClient;conversation;chatList=[];messages=[];messageSending=!1;message;error;currentConversation;currentTime;isTyping=!1;_alreadyListening=!1;_convLoader=!1;_loadChat=!1;_messagedAdded$=new oe.E;_showChatRoom=!1;_showChatList=!1;notifySubject=new oe.E;notifyObservable$=this.notifySubject.asObservable();constructor(Kt,Bt,Qn,cr,Or,ii,fi,Fi,Ge,ze,he,Ft){this.firebaseApi=Kt,this.storage=Bt,this.leadWatcher=Qn,this.afAuth=cr,this.auth=Or,this.store=ii,this.http=fi,this.datePipe=Fi,this.conversationApiService=Ge,this.util=ze,this.modalCtrl=he,this.format=Ft,this.listenAccountChanges(),this.listenQuestionnaireChanges()}notify(Kt){this.notifySubject.next(Kt)}getVendorReviews(){var Kt=this;return(0,i.c)(function*(){return new Promise(function(){var Bt=(0,i.c)(function*(Qn,cr){try{const Or=yield Kt.firebaseApi.findAll("reviews",ii=>ii.where("vendorId","==",Kt.loggedInUser.id));Kt.loggedInUser.publicReviews=Or&&Or.length?Or:[],console.log(">>>> reviews -=>",Kt.loggedInUser.publicReviews),Qn(!0)}catch{Qn(!1)}});return function(Qn,cr){return Bt.apply(this,arguments)}}())})()}listenAccountChanges(){var Kt=this;return(0,i.c)(function*(){try{const Bt=Kt.store.collection("users");Kt.tasksListener=Bt.snapshotChanges(["modified"]).subscribe((0,i.c)(function*(){if(Kt.loggedInUser?.id){const Qn=yield Kt.firebaseApi.findOneById("users",Kt.loggedInUser.id);Qn&&Qn.credits>=0&&(Kt.loggedInUser.credits=Qn.credits,Kt.loggedInUser.emailVerified=Qn.emailVerified,Kt.loggedInUser.approvedToWork=Qn.approvedToWork,Kt.leadWatcher._showDash=!1),Kt.userUpdated$.next("")}}))}catch{throw new Error("Could not listen to task changes")}})()}listenQuestionnaireChanges(){var Kt=this;return(0,i.c)(function*(){try{const Bt=Kt.store.collection("questionnaire");Kt.tasksListener=Bt.snapshotChanges(["modified"]).subscribe((0,i.c)(function*(){Kt.userUpdated$.next("")}))}catch{throw new Error("Could not listen to task changes")}})()}checkAuthState(){var Kt=this;return new Promise(function(){var Bt=(0,i.c)(function*(Qn,cr){const Or=yield Kt.afAuth.onAuthStateChanged(ii=>{Or(),Kt.load(ii?.uid).then(()=>Qn(ii))},cr)});return function(Qn,cr){return Bt.apply(this,arguments)}}())}setLoggedInUser(Kt){var Bt=this;return(0,i.c)(function*(){if(console.log("User: ",Kt),Kt.teamId){const cr=yield Bt.firebaseApi.findOneById("teams",Kt.teamId);Kt.myTeam=cr}Kt.recipientEmail||(Kt.recipientEmail=Kt.email),Object.assign(Bt.loggedInUser,Kt),(yield Bt.getFingerprint())!==Bt.loggedInUser.trustBrowserVisitorId&&(yield Bt.firebaseApi.updateOne("users",Bt.loggedInUser.id,{verifiedAuth:!1}),Bt.loggedInUser.verifiedAuth=!1)})()}getFingerprint(){return new Promise((Kt,Bt)=>{Je.load().then(Qn=>Qn.get()).then(Qn=>{Kt(Qn.visitorId)})})}load(Kt){var Bt=this;return new Promise(function(){var Qn=(0,i.c)(function*(cr,Or){try{if(Kt){const fi=yield Bt.auth.getSingleUser(Kt);
1if(fi&&"vendor"!==fi.role)throw new Error("not a vendor");yield Bt.setLoggedInUser(fi);let Fi=!1;if(fi.lastSeen&&(Fi=(fi=>{const Fi=fi.lastSeen.seconds/60+15;return(new Date).getTime()/6e4>=Fi})(fi)),Fi)return void Bt.logout();if(yield Bt.lastSeen(new Date),Bt.loggedInUser.id){Bt.getVendorReviews();const Ge=Bt.loggedInUser.myTeam?Bt.loggedInUser.myTeam.members:[];Ge.push(Bt.loggedInUser.myTeam?Bt.loggedInUser.myTeam.ownerId:Bt.loggedInUser.id),Bt.loggedInUser.teamArray=Ge,yield Bt.leadWatcher.getAppointments(!0,Bt.loggedInUser.id),Bt.leadWatcher.listenTaskChanges(Bt.loggedInUser.id,Ge),Bt.leadWatcher.listenWorkRequestChanges(Bt.loggedInUser.id,Ge),Bt.leadWatcher.listenAppointmentsChange(Bt.loggedInUser.id),Bt.listenConversations(Bt.loggedInUser.id),yield Bt.storage.init(),cr(!0)}}else cr(!1),yield Bt.storage.init()}catch(fi){yield Bt.storage.init(),console.log("e-=>",fi.message),"not a vendor"===fi.message&&cr("not a vendor")}});return function(cr,Or){return Qn.apply(this,arguments)}}())}logout(){var Kt=this;return(0,i.c)(function*(){yield Kt.firebaseApi.updateOne("users",Kt.loggedInUser.id,{verifiedAuth:!1}),Kt.unsubscribeListeners(),yield Kt.auth.logout(),Kt.loggedInUser={},location.reload()})()}unsubscribeListeners(){this.leadWatcher.tasksListener&&this.leadWatcher.tasksListener.unsubscribe(),this.leadWatcher.workRequestsListener&&this.leadWatcher.workRequestsListener.unsubscribe(),this.leadWatcher.apppointmentsListener&&this.leadWatcher.apppointmentsListener.unsubscribe()}lastSeen(Kt,Bt){var Qn=this;return(0,i.c)(function*(){yield Qn.firebaseApi.updateOne("users",Bt||Qn.loggedInUser.id,{lastSeen:Kt})})()}get totalUnreadMsg(){let Kt=0;return this.chatList.forEach(Bt=>{Kt+=Bt.unreadCount}),Kt}listenConversations(Kt){var Bt=this;return(0,i.c)(function*(){try{const Qn=Bt.store.collection("conversations",cr=>cr.where("vendorId","==",Kt));Bt.tasksListener=Qn.valueChanges(["added"]).pipe((0,Me.o)(800)).subscribe(cr=>{cr&&cr.length>0&&(console.log("Action +++++++++++++++++++++++-> ",cr),setTimeout(()=>Bt.connectTwilio(Kt),1e3))})}catch(Qn){console.log("Abort Listener",Qn)}})()}connectTwilio(Kt){var Bt=this;return(0,i.c)(function*(){if(Bt.conversationClient||Bt._alreadyListening)console.log("### conv client already connected---------------\x3e>"),yield Bt.fetchUserChats(Kt);else{Bt._convLoader=!0;try{const Qn=yield Bt.conversationApiService.getToken(Kt,Bt.loggedInUser.email);Bt.conversationClient=new qe.QP(Qn),Bt._convLoader=!1,Bt._alreadyListening=!0,Bt.listenToEvents(Kt)}catch(Qn){Bt._convLoader=!1,console.log(" get token error",Qn)}}})()}listenToEvents(Kt){var Bt=this;return(0,i.c)(function*(){Bt.conversationClient.on("initialized",(0,i.c)(function*(){console.log("Client initialized---------------\x3e> listening"),yield Bt.fetchUserChats(Kt)})),Bt.conversationClient.on("initFailed",Qn=>{console.log("Client initialization failed: ",Qn)}),Bt.conversationClient.on("connectionStateChanged",Qn=>{console.log("Connection state change: ",Qn)}),Bt.conversationClient.on("connectionError",Qn=>{console.log("Connection error: ",Qn)}),Bt.conversationClient.on("tokenAboutToExpire",(0,i.c)(function*(){console.log("About to expire");const Qn=yield Bt.conversationApiService.getToken(Kt,Bt.loggedInUser.email);Bt.conversationClient=yield Bt.conversationClient.updateToken(Qn)})),Bt.conversationClient.on("tokenExpired",()=>{console.log("Token expired"),Bt.conversationClient.removeAllListeners()}),Bt.conversationClient.on("conversationAdded",Qn=>{Bt.currentTime=new Date,setTimeout((0,i.c)(function*(){Qn.dateCreated&&Qn.dateCreated>Bt.currentTime&&(console.log("Conversation added",Qn),yield Qn.setAllMessagesUnread())}),500)}),Bt.conversationClient.on("messageAdded",function(){var Qn=(0,i.c)(function*(cr){console.log("Message added",cr),Bt.currentConversation&&Bt.currentConversation.sid===cr.conversation.sid?(Bt.messages.push(cr),yield Bt.currentConversation.updateLastReadMessageIndex(cr.index),Bt.chatList=Bt.chatList.map(Or=>{if(Or.chat.sid===Bt.currentConversation.sid){Or.lastMessage=cr.body;let ii="...";const fi=Or.chat?.lastMessage?.dateCreated;if(fi){const ze=Math.round((new Date).getTime()/6e4),he=new Date(fi),Un=ze-Math.round(he.getTime()/6e4);ii=Un<5?"Just now":Un>5&&Un<30?"Since "+Un+" mins":Bt.datePipe.transform(he,"MM/dd/yy, hh:mm a")}Or.time=ii}return Or}),Bt.sortChatList(),Bt._messagedAdded$.next("")):Bt.chatList=Bt.chatList.map(Or=>{if(Or.chat.sid===cr.conversation.sid){Or.lastMessage=cr.body,Or.unreadCount++;let ii="...";const fi=Or.chat?.lastMessage?.dateCreated;if(fi){const ze=Math.round((new Date).getTime()/6e4),he=new Date(fi),Un=ze-Math.round(he.getTime()/6e4);ii=Un<5?"Just now":Un>5&&Un<30?"Since "+Un+" mins":Bt.datePipe.transform(he,"MM/dd/yy, hh:mm a")}Or.time=ii}return Or}),Bt.sortChatList()});return function(cr){return Qn.apply(this,arguments)}}()),Bt.conversationClient.on("typingStarted",Qn=>{Qn?.conversation?.sid===Bt.currentConversation?.sid&&(Bt.isTyping=!0)}),Bt.conversationClient.on("typingEnded",Qn=>{console.log("typing end..",Qn),Qn?.conversation?.sid===Bt.currentConversation?.sid&&(Bt.isTyping=!1)})})()}fetchUserChats(Kt){var Bt=this;return(0,i.c)(function*(){return new Promise(function(){var Qn=(0,i.c)(function*(cr,Or){if(Bt.conversationClient){console.log("#### 1- chat fetch started");const ii=yield Bt.fetchUserChatsTemp(Kt);ii&&ii.length>0&&(Bt.chatList=ii,Bt.sortChatList()),console.log("#### 4- chat fetch done"),cr(!0)}else console.log("#### chat fetch skipped"),cr(!0)});return function(cr,Or){return Qn.apply(this,arguments)}}())})()}fetchUserChatsTemp(Kt){var Bt=this;return(0,i.c)(function*(){return new Promise(function(){var Qn=(0,i.c)(function*(cr,Or){try{let ii=[];Bt._loadChat=!0,console.log("#### 2- start temp fetch");const Fi=(yield Bt.firebaseApi.findConversationsByParticipant(Kt)).filter(Ge=>
1!Ge?.ticketId);if(Fi&&Fi.length>0){let Ge=0;for(let ze of Fi){const he=yield Bt.conversationClient.getConversationBySid(ze.conversationSid),Ft=yield he.getUnreadMessagesCount(),Un=yield he.getMessages();let bi;if(Un&&Un.items.length>0){const vo=he.lastReadMessageIndex||0;bi=Un.items[vo]&&Un.items[vo].body?Un.items[vo].body:"Hi! How may I help you?"}let Ti="";const us=he?.lastMessage?.dateCreated;if(us){const ss=Math.round((new Date).getTime()/6e4),ra=new Date(us),fo=ss-Math.round(ra.getTime()/6e4);Ti=fo<5?"Just now":fo>5&&fo<30?"Since "+fo+" mins":Bt.datePipe.transform(ra,"MM/dd/yy, hh:mm a")}let Ms=!1;const ks=ze.workRequestId;let Us;if(ks){const vo=yield Bt.firebaseApi.findOneById("workRequests",ks);"canceled"===vo.progress&&(Ms=!0),Us=Bt.format.getFullPackage(vo)}ii.push({chat:he,unreadCount:Ft||0,sid:he.sid,lastMessage:bi||"",time:Ti,requestType:ze.requestType,wrId:ze.workRequestId,wrTitle:Us||"",vendorBusinessName:ze.vendorBusinessName,vendorFirstName:ze.vendorFirstName,vendorLastName:ze.vendorLastName,vendorPhoto:ze.vendorPhoto,vendorId:ze.vendorId?ze.vendorId:"",userFirstName:ze.userFirstName,userLastName:ze.userLastName,userPhoto:ze.userPhoto,createdAt:ze.createdAt?ze.createdAt:"",_isCanceled:Ms}),++Ge}Bt._loadChat=!1,cr(ii)}else Bt._loadChat=!1,cr([])}catch(ii){console.log("### 3- end chatList err ->",ii),Bt._loadChat=!1,cr([])}});return function(cr,Or){return Qn.apply(this,arguments)}}())})()}getOnboardingProgress(){let Kt=0;return this.loggedInUser?.business?.address?.zipcode&&(Kt+=1),this.loggedInUser.twoFA&&(Kt+=1),this.loggedInUser.publicFiles&&this.loggedInUser.publicFiles.length>=2&&(Kt+=1),this.loggedInUser.publicFaqs&&this.loggedInUser.publicFaqs.length>=6&&(Kt+=1),this.loggedInUser.publicReviews&&this.loggedInUser.publicReviews.length>=3&&(Kt+=1),this.loggedInUser?.questionnaireId&&(Kt+=1),this.loggedInUser?.proTargeting?.completed&&(Kt+=1),this.loggedInUser?.business?.name&&(Kt+=1),100*Kt/8}checkVendorStatus(){let Kt=!1;return this.loggedInUser?.address?.zipcode&&this.loggedInUser?.twoFA&&this.loggedInUser?.publicFiles&&this.loggedInUser?.publicReviews.length>=3&&this.loggedInUser?.publicFaqs&&this.loggedInUser?.publicFaqs.length>=6&&this.loggedInUser?.questionnaireId&&this.loggedInUser?.proTargeting&&this.loggedInUser?.proTargeting?.completed&&this.loggedInUser?.business?.name&&(Kt=!0),Kt}resetChat(){this.currentConversation=null,this._showChatRoom=!1,this._showChatList=!1}sortChatList(){if(this.chatList&&this.chatList.length>0){this.chatList.sort((Bt,Qn)=>Bt.userFirstName.localeCompare(Qn.userFirstName));let Kt="";this.chatList.forEach(Bt=>{Kt!==Bt.userFirstName?Kt=Bt.userFirstName:Bt.hide=!0}),console.log("Chat list >>>>>>>>>>>++++++++>",this.chatList)}}checkMsgDate(Kt){let Bt="",Qn="";const cr=this.datePipe.transform(this.messages[Kt].dateUpdated,"MM.dd.yy");Kt>0&&(Qn=this.datePipe.transform(this.messages[Kt-1].dateUpdated,"MM.dd.yy")),Bt=Qn===cr?"":cr;const Or=this.datePipe.transform(new Date,"MM.dd.yy");return Bt&&Bt===Or&&(Bt="Today"),Bt}closeModal(){this.modalCtrl.dismiss()}closeTargeteModal(Kt){"dash"===Kt?this.goTo("profile"):this.modalCtrl.dismiss()}getVendorChargeAmount(Kt,Bt,Qn){let cr=0;return cr="Tax Return"===Bt?1===Kt?.length&&Kt?.includes("business")?50:Kt?.length>1&&Kt?.includes("business")?70:30:30,cr+.15*Qn}goTo(Kt){this.leadWatcher._edit=!0,"profile"===Kt&&(this.util.navigateRoot(Kt),this.leadWatcher._edit=!1)}getQuestions(Kt){let Bt=Kt?.questionnaire.filter(cr=>!cr.skip&&""===cr.group&&cr.question.toLowerCase()!="What is the name of your business?".toLowerCase()&&cr.question.toLowerCase()!="What is your EIN number?".toLowerCase()&&cr.answers.find(Or=>!1!==Or.value));Kt.bizList.length>0&&Kt.bizList.forEach(cr=>{Bt=Bt.concat(cr.data)});let Qn=Kt?.questionnaire.filter(cr=>!cr.skip&&("issues"===cr.group||"notice"===cr.group||"details"===cr.group||"accounting"===cr.group||"payroll"===cr.group||"entity"===cr.group||"itin"===cr.group||"dep"===cr.group)&&cr.answers.find(Or=>Or.value&&!1!==Or.value||0===Or.value));return[...Bt,...Qn]}static \u0275fac=function(Bt){return new(Bt||Ue)(Ce.CoB(Ke.H),Ce.CoB(tt.y),Ce.CoB(Et.c),Ce.CoB(Vn._o),Ce.CoB(Gn.o),Ce.CoB(Jn.i4),Ce.CoB(ar.KK),Ce.CoB(Gi.y),Ce.CoB(zi.w),Ce.CoB(is.e),Ce.CoB(es.qS),Ce.CoB(go.M))};static \u0275prov=Ce.wxM({token:Ue,factory:Ue.\u0275fac,providedIn:"root"})}return Ue})()},2132:(B,G,a)=>{"use strict";a.d(G,{e:()=>P});var i=a(73448),v=a(32116),b=a(83068),_=a(90304),C=a(89192);let P=(()=>{class S{toastController;alertController;navCtrl;modalCtrl;animationCtrl;router;constructor(k,x,D,ee,te,J){this.toastController=k,this.alertController=x,this.navCtrl=D,this.modalCtrl=ee,this.animationCtrl=te,this.router=J}slideInPage(k,x){var D=this;return(0,i.c)(function*(){const ee={component:k,componentProps:{componentProps:x},cssClass:"slide-out-modal",animated:!1},te=yield D.modalCtrl.create(ee);
1yield te.present(),te.onDidDismiss().then(J=>{D.router.navigate(["work-requests",x.slug])})})()}presentCenterModal(k,x){var D=this;return(0,i.c)(function*(){const ee={component:k,componentProps:{componentProps:x},cssClass:"center-modal-2",animated:!0,showBackdrop:!0},te=yield D.modalCtrl.create(ee);yield te.present(),te.onDidDismiss().then(J=>{})})()}presentToastWithOptions(k){var x=this;return(0,i.c)(function*(){(yield x.toastController.create({header:k,position:"bottom",duration:3e3})).present()})()}navigateRoot(k,x){var D=this;return(0,i.c)(function*(){yield D.navCtrl.navigateRoot(k,x)})()}navigateForward(k,x){this.navCtrl.navigateForward(k,x)}navigateBack(k,x){this.navCtrl.navigateBack(k,x)}navigate(k){this.router.navigate([k])}formatPhone(k){let x=k.target.value.replace(/[^\d]/g,"");const D=x.length;return x=D>10?x.substr(0,10):x,x=D>3?x.substr(0,3)+"-"+x.substr(3,D):x,x=D>6?x.substr(0,7)+"-"+x.substr(7,D+1):x,x}reverseAddressSearch(k){const x=new google.maps.Geocoder;return new Promise((D,ee)=>{x.geocode({address:k},(te,J)=>{if(J===google.maps.GeocoderStatus.OK){if(te&&(te=te[0])&&!te.err){const Q=te.address_components;let we,de,Y,Se,Ye;for(let pe=0;pe<Q.length;pe++)Q[pe].types&&Q[pe].types.includes("street_number")&&(we=Q[pe].short_name),Q[pe].types&&Q[pe].types.includes("route")&&(de=Q[pe].short_name),Q[pe].types&&Q[pe].types.includes("locality")&&(Y=Q[pe].short_name),Q[pe].types&&Q[pe].types.includes("postal_code")&&(Ye=Q[pe].short_name),Q[pe].types&&Q[pe].types.includes("administrative_area_level_1")&&(Se=Q[pe].short_name);D({number:we,street:de,city:Y,state:Se,zipcode:Ye})}}else D("Error reversing location results")})})}createToast(k,x=12e3){var D=this;return(0,i.c)(function*(){return yield D.toastController.create({message:k,position:"middle",duration:x,buttons:[{text:"Ok",role:"cancel",handler:()=>{}}]})})()}presentAlert(k,x,D){var ee=this;return(0,i.c)(function*(){yield(yield ee.alertController.create({header:k,subHeader:x,message:D,buttons:["OK"]})).present()})()}presentToast(k){var x=this;return(0,i.c)(function*(){(yield x.toastController.create({header:k,position:"bottom",duration:3e3})).present()})()}createAlert(k,x,D,ee,te){var J=this;return(0,i.c)(function*(){return yield J.alertController.create({header:k,backdropDismiss:x,message:D,buttons:te?[ee,te]:[ee]})})()}getGooglePlaceAutoCompleteList(k,x,D){return(0,i.c)(function*(){const ee=new google.maps.places.AutocompleteService;let te;return yield new Promise((J,Q)=>{ee.getPlacePredictions({input:k,componentRestrictions:{country:D||"US"}},we=>{te=we,J(!0)})}),te})()}createErrorAlert(k,x,D){var ee=this;return(0,i.c)(function*(){var J;yield(yield ee.createAlert(k,!1,x,{text:"Ok",handler:(J=(0,i.c)(function*(){D&&D()}),function(){return J.apply(this,arguments)})})).present()})()}showToast(k,x){var D=this;return(0,i.c)(function*(){yield(yield D.createToast(k,x)).present()})()}static \u0275fac=function(x){return new(x||S)(v.CoB(b.Gq),v.CoB(b.iW),v.CoB(_.wX),v.CoB(b.qS),v.CoB(b.WV),v.CoB(C.E5))};static \u0275prov=v.wxM({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})()},16996:(B,G,a)=>{"use strict";a.d(G,{o:()=>te});var i=a(73448),v=a(36716),b=a(53252),_=a(49252),C=a(73940),P=a(32116),S=a(26324),R=a(72136),k=a(87264),x=a(72216);const D=[{header:"New Document",disclaimer:"Sent when a vendor uploads a new document",key:"new-document",sms:!0,email:!0},{header:"Unfinished Work Request",disclaimer:"Sent when you have not finished your work request",key:"unfinished-work-request",sms:!0,email:!0},{header:"Unfinished Profile",disclaimer:"Sent once in a while when your profile is not completed",key:"unfinished-profile",sms:!0,email:!0},{header:"Support Ticket",disclaimer:"When support replies to your open ticket.",key:"new-support-ticket",sms:!0,email:!0}],ee=[{header:"New Document",disclaimer:"Send when a user uploads a new document",key:"new-document",sms:!0,email:!0},{header:"New Lead Auto Purchased",disclaimer:"Sent when the system purchases a new lead for you",key:"new-lead-auto",sms:!0,email:!0},{header:"New Lead Arrives",disclaimer:"Sent when a new lead is distributed to you and is available for purchase",key:"new-lead-arrives",sms:!0,email:!0},{header:"Unfinished Profile",disclaimer:"Sent once in a while when your profile is not completed",key:"unfinished-profile",sms:!0,email:!0},{header:"Support Ticket",disclaimer:"When support replies to your open ticket.",key:"new-support-ticket",sms:!0,email:!0}];let te=(()=>{class J{auth;firestore;firebaseApi;googlePlus;signInWithApple;state={googleSpinner:!1,appleSpinner:!1};constructor(we,de,Y,Se,Ye){this.auth=we,this.firestore=de,this.firebaseApi=Y,this.googlePlus=Se,this.signInWithApple=Ye}vendorToInsert(we){return{id:we.id,phoneNumber:we.phoneNumber,email:we.email,createdAt:(new Date).toISOString(),firstName:we.firstName?we.firstName:"",lastName:we.lastName?we.lastName:"",type:we.type,referringUserId:we.referringUserId?we.referringUserId:"",stripeAccountId:"",role:"vendor",teamId:we.teamId?we.teamId:"",approvedToWork:!1,emailVerified:!1,resendEmail:0,credits:0,autoTopOff:!1,autoTopOffAmount:0,notifVendor:ee,fromApp:v.O.appIsFor}}adminToInsert(we){return{id:we.id,phoneNumber:we.phoneNumber,email:we.email,createdAt:(new Date).toISOString(),firstName:we.firstName?we.firstName:"",lastName:we.lastName?we.lastName:"",role:"admin"}}userToInsert(we){return{id:we.id,firstName:we.firstName?we.firstName:"",lastName:we.lastName?we.lastName:"",email:we.email,onboardingSteps:0,dateOfBirth:"",createdAt:(new Date).toISOString(),type:"user",profilePhoto:"",haveBusiness:"No",emailVerified:!1,resendEmail:0,language:[{l:"English",sel:!0},{l:"Spanish",sel:!1},{l:"",sel:!1}],travel:[{t:"Pros travel to you",sel:!1},{t:"I will travel with the pros",sel:!1},{t:"I want to work remotely",sel:!1}],completedStep:0,address:{line1:"",line2:"",city:"",state:"",zipcode:""},business:{name:"",phoneNumber:"",address:{line1:"",line2:"",city:"",state:"",zipcode:""}},notifUser:we.notifUser,documents:[],social:{},verified:!1,phoneNumber:we.phoneNumber?we.phoneNumber:null,role:"user",fromApp:v.O.appIsFor}}getSingleUser(we){return new Promise((de,Y)=>{this.addIdToObject(we,this.firestore.getOne("users",we)).subscribe(de,Y)})}addIdToObject(we,de){return new b._(Y=>{we?de.subscribe(Se=>{const Ye=Se;Ye&&(Ye.id=we),Y.next(Ye)},Se=>{Y.error(Se)}):Y.error({message:"No ID"})})}signUp(we){var de=this;return(0,i.c)(function*(){return new Promise(function(){var Y=(0,i.c)(function*(Se,Ye){try{const pe=yield de.auth.createAccount(we.email,we.password);let Ve;switch(yield de.auth.login(we.email,we.password),v.O.userRole){case"user":Ve=de.insertUser(de.userToInsert({id:pe.uid,phoneNumber:we.phoneNumber,email:we.email,firstName:"",lastName:"",notifUser:we.notifUser}));break;case"admin":Ve=de.insertUser(de.adminToInsert({id:pe.uid,phoneNumber:we.phoneNumber,email:we.email,firstName:"",lastName:""}));break;case"vendor":Ve=de.insertUser(de.vendorToInsert({id:pe.uid,phoneNumber:we.phoneNumber,email:we.email,firstName:we.firstName?we.firstName:"",lastName:we.lastName?we.lastName:"",referringUserId:we.referringUserId?we.referringUserId:"",type:we.role,teamId:we.teamId?we.teamId:""}))}Se(yield Ve)}catch(pe){Ye(pe)}});return function(Se,Ye){return Y.apply(this,arguments)}}())})()}login(we){var de=this;return(0,i.c)(function*(){return new Promise((Y,Se)=>{de.auth.login(we.email,we.password).then(Ye=>{Y(Ye.uid)}).catch(Ye=>{Ye.message.includes("auth/wrong-password")?Se({message:"Wrong or incorrect password"}):Ye.message.includes("auth/user-not-found")?Se({message:"This user account associated to this email address does not exist"}):Se(Ye)})})})()}insertUser(we){var de=this;return(0,i.c)(function*(){try{return yield de.firestore.createWithId("users",we),we.id}catch{throw new Error("Could not insert user")}})()}googleSignInMobile(){var we=this;return(0,i.c)(function*(){try{we.state.googleSpinner=!0;const de=yield we.googlePlus.login({webClientId:"1051749352549-stddbsb224ikit9u7dtvho5poc4bmjhg.apps.googleusercontent.com"});let Y;const Se=yield we.firestore.firebaseGoogleSignIn(de.idToken,de.accessToken);return Se.additionalUserInfo.isNewUser?(Y=we.insertUser(we.userToInsert({id:Se.user.uid,email:de.email,phoneNumber:"",firstName:de.givenName?de.givenName:"",lastName:de.familyName?de.familyName:"",notifUser:D})),{userId:yield Y,isNewUser:Se.additionalUserInfo.isNewUser}):{userId:Se.user.uid,isNewUser:Se.additionalUserInfo.isNewUser}}catch(de){throw new Error(de.message)}})()}googleSignIn(){var we=this;return(0,i.c)(function*(){try{const de=new _.c.auth.GoogleAuthProvider,Y=yield _.c.auth().signInWithPopup(de),Se=yield we.firebaseApi.findOneById("users",Y.user.uid);if(Se){if(Se.role===v.O.userRole)return{userId:Se.id,isNewUser:Y.additionalUserInfo.isNewUser};throw new Error("This user account is not registered for this website")}{let Ye;switch(v.O.userRole){case"user":Ye=we.insertUser(we.userToInsert({id:Y.user.uid,email:Y.additionalUserInfo.profile.email,phoneNumber:"",firstName:Y.additionalUserInfo.profile.given_name?Y.additionalUserInfo.profile.given_name:"",lastName:Y.additionalUserInfo.profile.family_name?Y.additionalUserInfo.profile.family_name:"",notifUser:D}));break;case"vendor":Ye=we.insertUser(we.vendorToInsert({id:Y.user.uid,email:Y.additionalUserInfo.profile.email,phoneNumber:"",firstName:Y.additionalUserInfo.profile.given_name?Y.additionalUserInfo.profile.given_name:"",lastName:Y.additionalUserInfo.profile.family_name?Y.additionalUserInfo.profile.family_name:"",type:"vendor"}))}return{userId:yield Ye,isNewUser:Y.additionalUserInfo.isNewUser}}}catch(de){throw new Error(de.message)}finally{we.state.googleSpinner=!1}})()}appleSignInMobile(){var we=this;return(0,i.c)(function*(){try{we.state.appleSpinner=!0;const de=yield we.signInWithApple.signin({requestedScopes:[C.E.ASAuthorizationScopeFullName,C.E.ASAuthorizationScopeEmail]}
1),Y=yield we.firestore.firebaseAppleSignIn(de);if(Y.additionalUserInfo.isNewUser){const Se={id:Y.user.uid,phoneNumber:"",email:de.email,firstName:de.fullName.givenName?de.fullName.givenName:"",lastName:de.fullName.familyName?de.fullName.familyName:"",notifUser:D},pe=yield we.insertUser(we.userToInsert(Se));return yield we.firebaseApi.updateOne("users",pe,{verifiedAuth:!0}),{userId:pe,isNewUser:Y.additionalUserInfo.isNewUser}}return yield we.firebaseApi.updateOne("users",Y.user.uid,{verifiedAuth:!0}),{userId:Y.user.uid,isNewUser:Y.additionalUserInfo.isNewUser}}catch(de){throw new Error(de.message)}})()}appleSignIn(){var we=this;return(0,i.c)(function*(){try{const de=new _.c.auth.OAuthProvider("apple.com");de.addScope("email"),de.addScope("name");const Y=yield _.c.auth().signInWithPopup(de),Se=yield we.firebaseApi.findOneById("users",Y.user.uid);if(Se){if(Se.role===v.O.userRole)return{userId:Se.id,isNewUser:Y.additionalUserInfo.isNewUser};throw new Error("This user account is not registered for this website")}{let Ye;switch(v.O.userRole){case"user":Ye=we.insertUser(we.userToInsert({id:Y.user.uid,phoneNumber:"",email:Y.additionalUserInfo.profile.email,firstName:Y.additionalUserInfo.profile.firstName?Y.additionalUserInfo.profile.firstName:"",lastName:Y.additionalUserInfo.profile.lastName?Y.additionalUserInfo.profile.lastName:"",notifUser:D}));break;case"vendor":Ye=we.insertUser(we.vendorToInsert({id:Y.user.uid,phoneNumber:"",email:Y.additionalUserInfo.profile.email,firstName:Y.additionalUserInfo.profile.firstName?Y.additionalUserInfo.profile.firstName:"",lastName:Y.additionalUserInfo.profile.lastName?Y.additionalUserInfo.profile.lastName:"",type:"vendor"}))}return{userId:yield Ye,isNewUser:Y.additionalUserInfo.isNewUser}}}catch{throw new Error("Error with apple signin")}finally{we.state.appleSpinner=!1}})()}logout(){return this.auth.logout()}static \u0275fac=function(de){return new(de||J)(P.CoB(S.A),P.CoB(R.Y),P.CoB(k.H),P.CoB(x.Y),P.CoB(C.Y))};static \u0275prov=P.wxM({token:J,factory:J.\u0275fac,providedIn:"root"})}return J})()},92512:(B,G,a)=>{"use strict";a.d(G,{w:()=>C});var i=a(73448),v=a(36716),b=a(32116),_=a(97048);let C=(()=>{class P{http;constructor(R){this.http=R}createConversation(R){return this.http.post(v.O.conversationApi+"api/chat/createConversation",R).toPromise()}sendTicketToSupportEmail(R){return this.http.post(v.O.conversationApi+"api/chat/sendTicketToSupportEmail",R).toPromise()}getToken(R,k){var x=this;return(0,i.c)(function*(){const D=v.O.conversationApi+"api/chat/token",{token:ee}=yield x.http.post(D,{userId:R,userEmail:k}).toPromise();return ee})()}static \u0275fac=function(k){return new(k||P)(b.CoB(_.KK))};static \u0275prov=b.wxM({token:P,factory:P.\u0275fac,providedIn:"root"})}return P})()},26324:(B,G,a)=>{"use strict";a.d(G,{A:()=>S});var i=a(73448),v=a(46700),b=a(3992),_=a(32116),C=a(60331);class P{$uid;constructor(k){this.$uid=k}isLoggedIn(){return!!this.$uid}}class S{fireAuth;static unknownUser=new P(null);authInfo$=new v.g(S.unknownUser);constructor(k){this.fireAuth=k,this.fireAuth.authState.pipe((0,b.U)(1)).subscribe(x=>{x&&this.authInfo$.next(new P(x.uid))})}signInWithCredential(k){return new Promise((x,D)=>{this.fireAuth.signInWithCredential(k).then(ee=>{x(ee.user)},ee=>D(ee))})}createAccount(k,x){var D=this;return new Promise(function(){var ee=(0,i.c)(function*(te,J){try{te((yield D.fireAuth.createUserWithEmailAndPassword(k,x)).user)}catch(Q){J(Q)}});return function(te,J){return ee.apply(this,arguments)}}())}resetPassword(k){var x=this;return new Promise(function(){var D=(0,i.c)(function*(ee,te){try{ee(yield x.fireAuth.sendPasswordResetEmail(k))}catch(J){te(J)}});return function(ee,te){return D.apply(this,arguments)}}())}login(k,x){return new Promise((D,ee)=>{this.fireAuth.signInWithEmailAndPassword(k,x).then(te=>{te.user&&D(te.user)}).catch(te=>{ee(te)})})}logout(){return this.authInfo$.next(S.unknownUser),this.fireAuth.signOut()}static \u0275fac=function(x){return new(x||S)(_.CoB(C._o))};static \u0275prov=_.wxM({token:S,factory:S.\u0275fac})}},87264:(B,G,a)=>{"use strict";a.d(G,{H:()=>S});var i=a(73448),v=a(19900),b=a(53252),C=(a(20872),a(32116)),P=a(72136);let S=(()=>{class R{firestore;
1constructor(x){this.firestore=x}findAll(x,D){var ee=this;return(0,i.c)(function*(){return new Promise((te,J)=>{ee.firestore.find(x,D||null).subscribe(te,J)})})()}delete(x,D){var ee=this;return(0,i.c)(function*(){return new Promise(function(){var te=(0,i.c)(function*(J,Q){try{yield ee.firestore.delete(x,D),J(!0)}catch(we){Q(we)}});return function(J,Q){return te.apply(this,arguments)}}())})()}findOneById(x,D){var ee=this;return(0,i.c)(function*(){return new Promise((te,J)=>{ee.addIdToObject(D,ee.firestore.getOne(x,D)).subscribe(te,J)})})()}insertOne(x,D){var ee=this;return(0,i.c)(function*(){return new Promise((te,J)=>{ee.snapshotToDataConverter(ee.firestore.create(x,D)).subscribe(Q=>te(Q.id),J)})})()}updateOne(x,D,ee){var te=this;return new Promise(function(){var J=(0,i.c)(function*(Q,we){(0,v.Q)(te.firestore.update(x,D,ee)).subscribe(Q,we)});return function(Q,we){return J.apply(this,arguments)}}())}addIdToObject(x,D){return new b._(ee=>{x?D.subscribe(te=>{const J=te;J&&(J.id=x),ee.next(J)},te=>{ee.error(te)}):ee.error({message:"No ID"})})}snapshotToDataConverter(x){return new b._(D=>{x.then(ee=>{const te=ee.data();te.id=ee.id,D.next(te)}).catch(ee=>{D.error(ee)})})}getUserByEmail(x){var D=this;return new Promise(function(){var ee=(0,i.c)(function*(te,J){(0,v.Q)(D.firestore.find("users",Q=>Q.where("email","==",x))).subscribe(te,J)});return function(te,J){return ee.apply(this,arguments)}}())}findTranscriptByRoomSid(x){var D=this;return new Promise(function(){var ee=(0,i.c)(function*(te,J){(0,v.Q)(D.firestore.find("transcripts",Q=>Q.where("roomSid","==",x))).subscribe(te,J)});return function(te,J){return ee.apply(this,arguments)}}())}findConversationsByParticipant(x){var D=this;return new Promise(function(){var ee=(0,i.c)(function*(te,J){(0,v.Q)(D.firestore.find("conversations",Q=>Q.where("participants","array-contains",x))).subscribe(te,J)});return function(te,J){return ee.apply(this,arguments)}}())}findConversationsByParticipantAndWrId(x,D){var ee=this;return new Promise(function(){var te=(0,i.c)(function*(J,Q){(0,v.Q)(ee.firestore.find("conversations",we=>we.where("participants","array-contains",x).where("workRequestId","==",D))).subscribe(J,Q)});return function(J,Q){return te.apply(this,arguments)}}())}findConversationsByConvoSid(x){var D=this;return new Promise(function(){var ee=(0,i.c)(function*(te,J){(0,v.Q)(D.firestore.find("conversations",Q=>Q.where("conversationSid","==",x))).subscribe(te,J)});return function(te,J){return ee.apply(this,arguments)}}())}findConversationQueueByConvoSid(x){var D=this;return new Promise(function(){var ee=(0,i.c)(function*(te,J){(0,v.Q)(D.firestore.find("conversationsQueue",Q=>Q.where("conversationSid","==",x))).subscribe(te,J)});return function(te,J){return ee.apply(this,arguments)}}())}static \u0275fac=function(D){return new(D||R)(C.CoB(P.Y))};static \u0275prov=C.wxM({token:R,factory:R.\u0275fac,providedIn:"root"})}return R})()},72136:(B,G,a)=>{"use strict";a.d(G,{Y:()=>k});var i=a(73448),v=a(49252),_=(a(20872),a(53252)),C=a(3992),P=a(32116),S=a(51676),R=a(60331);let k=(()=>{class x{store;afAuth;userid;constructor(ee,te){this.store=ee,this.afAuth=te,this.userid=1}firebaseAppleSignIn(ee){var te=this;return(0,i.c)(function*(){return new Promise(function(){var J=(0,i.c)(function*(Q,we){try{const Y=new v.c.auth.OAuthProvider("apple.com").credential({idToken:ee.identityToken});Q(yield te.afAuth.signInWithCredential(Y))}catch(de){we(de)}});return function(Q,we){return J.apply(this,arguments)}}())})()}firebaseGoogleSignIn(ee,te){var J=this;return(0,i.c)(function*(){return new Promise(function(){var Q=(0,i.c)(function*(we,de){try{const Y=te?v.c.auth.GoogleAuthProvider.credential(ee,te):v.c.auth.GoogleAuthProvider.credential(ee);we(yield J.afAuth.signInWithCredential(Y))}catch(Y){de(Y)}});return function(we,de){return Q.apply(this,arguments)}}())})()}find(ee,te){return new _._(J=>{let Q;Q=te?this.store.collection(ee,te):this.store.collection(ee),Q.valueChanges({idField:"id"}).pipe((0,C.U)(1)).subscribe(we=>{J.next(we)},we=>{J.error(we)})})}update(ee,te,J){return this.store.doc(`${ee}/${te}`).update(this.addUpdatedAt(J))}delete(ee,te){return this.store.doc(`${ee}/${te}`).delete()}createWithId(ee,te){return this.store.doc(`${ee}/${te.id}`).set(this.addCreatedAt(te))}create(ee,te){var J=this;return(0,i.c)(function*(){return(yield J.store.collection(ee).add(J.addCreatedAt(te))).get()})()}getOne(ee,te){return this.store.doc(`${ee}/${te}`).valueChanges().pipe((0,C.U)(1))}addCreatedAt(ee){return{...ee,createdAt:v.c.firestore.FieldValue.serverTimestamp(),updatedAt:v.c.firestore.FieldValue.serverTimestamp()}}addUpdatedAt(ee){return{...ee,updatedAt:v.c.firestore.FieldValue.serverTimestamp()}}static \u0275fac=function(te){return new(te||x)(P.CoB(S.i4),P.CoB(R._o))};static \u0275prov=P.wxM({token:x,factory:x.\u0275fac})}return x})()},64420:(B,G,a)=>{"use strict";a.d(G,{M:()=>v});var i=a(32116);let v=(()=>{class b{selectedWrId="";selectedWr={selected:!1,wrId:""};constructor(){}getStatesList(C){let P=[];
1if(C?.questionnaire[5]?.answers){const S=C.questionnaire[5].answers.filter(R=>!0===R.value);S&&S.length>0&&(P=S)}return C?.bizList&&C?.bizList.length>0&&C?.bizList.forEach(S=>{if(S&&S.data&&S.data.length>0){const R=S.data.find(k=>["q5","q16.1","q23.39","q25.39","q27.3","q47.2"].includes(k.key));if(R&&R.answers){const k=R.answers.filter(x=>x.value);P=[...P,...k]}}}),P}getAnswers(C){return C.filter(P=>!0===P.value||P.value.length>0||0===P.value)}getRushDelivery(C){const P=C.questionnaire.find(S=>"q17"===S.key).answers?.find(S=>!0===S.value)?.name;return P||""}getAddons(C){if(C?.requestType.indexOf("Tax Return")>=0){const P=[],S=C?.questionnaire?.find(x=>"q18"===x?.key)?.answers?.find(x=>!0===x?.value),R=C?.questionnaire?.find(x=>"q19"===x?.key)?.answers?.find(x=>!0===x?.value),k=C?.questionnaire?.find(x=>"q21"===x?.key)?.answers?.find(x=>!0===x?.value);return"yes"===S?.key&&P?.push("Audit Protection"),("yes"===R?.key||"loan-more"===R?.key)&&P?.push("Return Advance Loans"),!0===k?.value&&P.push("Tax Shield"),P}return[]}getPackageType(C){const P=[];return C?.requestType.indexOf("Tax Return")>=0&&C.packageType&&C.packageType.length>0?C.packageType.includes("basic")||C.packageType.includes("standard")||C.packageType.includes("premium")||C.packageType.includes("self-employed")?(P.push("1040 | "),C.packageType.forEach(R=>{"business"!==R&&(P.push(R.charAt(0).toUpperCase()+R.slice(1)),C.packageType.includes("business")&&P.push(" "))})):C?.requestType.indexOf("Non-Profit")>=0?P.push(C.requestType):C?.requestType.indexOf("Business")>=0&&P.push("Business"):C?.requestType&&P.push(C.requestType),P.join("")}getRequestYear(C){let P="";const S=C?.requestType,R="Non-Profit Tax Return"===S?"q25.2":"Business Tax Return"===S?"q23.2":"Tax Audit / Lien / Levy"===S?"q50":"I Received a Notice"===S?"q60":"Tax Consultation/Other Issues"===S?"q70":"Company Formation"===S||"Accounting or Bookkeeping"===S||"Payroll"===S?"":"q2";if(R){const k=C&&C.questionnaire?C.questionnaire.find(x=>x.key===R).answers?.find(x=>x.value):"";k&&k.value&&["q50","q60","q70"].includes(R)?P=k.value:k&&k.name&&(P=k.name)}return P||""}getPackageNames(C){const P=[];let S=0;return C?.bizList&&C?.bizList.forEach(R=>{R.data.forEach(k=>{"What type of business do you have?"===k.question&&k.answers.forEach((x,D)=>{x.value&&(P.push(S>0?", "+x.name:x.name),++S)})})}),P.length>0?P.join(""):""}getFullPackage(C){let P="";const S=C&&C.id?this.getRequestYear(C):"",R=C&&C.id?this.getPackageType(C):"",k=this.getPackageNames(C);return P=S?S+(S&&R?" - ":"")+R:R,P+=k?" | "+k:"",P}static \u0275fac=function(P){return new(P||b)};static \u0275prov=i.wxM({token:b,factory:b.\u0275fac,providedIn:"root"})}return b})()},20192:(B,G,a)=>{"use strict";a.d(G,{S:()=>P});var i=a(91368),v=a(83068),b=a(89192),_=a(5082),C=a(32116);let P=(()=>{class S{static \u0275fac=function(x){return new(x||S)};static \u0275mod=C.a4G({type:S});static \u0275inj=C.s3X({imports:[i.MD,v.wZ,b.qQ,_.qo.forRoot({})]})}return S})()},87560:(B,G,a)=>{"use strict";a.d(G,{l:()=>P});var i=a(91368),v=a(83068),b=a(89192),_=a(20192),C=a(32116);let P=(()=>{class S{static \u0275fac=function(x){return new(x||S)};static \u0275mod=C.a4G({type:S});static \u0275inj=C.s3X({imports:[i.MD,v.wZ,b.qQ,_.S]})}return S})()},36820:(B,G,a)=>{"use strict";a.d(G,{Q:()=>_});var i=a(32116),v=a(77816),b=a(89192);let _=(()=>{class C{userProvider;router;constructor(S,R){this.userProvider=S,this.router=R}canActivate(S,R){let k="";return!!this.userProvider.loggedInUser.id||(k="/login",this.router.navigate([k],{queryParams:{returnUrl:R.url}}),!1)}static \u0275fac=function(R){return new(R||C)(i.CoB(v.e),i.CoB(b.E5))};static \u0275prov=i.wxM({token:C,factory:C.\u0275fac,providedIn:"root"})}return C})()},72852:(B,G,a)=>{"use strict";a.d(G,{c:()=>xs});var i=a(73448);const C=function _(nn,_r){return nn===_r||nn!=nn&&_r!=_r},S=function P(nn,_r){for(var Wr=nn.length;Wr--;)if(C(nn[Wr][0],_r))return Wr;return-1};var k=Array.prototype.splice;function Y(nn){var _r=-1,Wr=null==nn?0:nn.length;for(this.clear();++_r<Wr;){var Li=nn[_r];this.set(Li[0],Li[1])}}Y.prototype.clear=function v(){this.__data__=[],this.size=0},Y.prototype.delete=function x(nn){var _r=this.__data__,Wr=S(_r,nn);return!(Wr<0||(Wr==_r.length-1?_r.pop():k.call(_r,Wr,1),--this.size,0))},Y.prototype.get=function ee(nn){var _r=this.__data__,Wr=S(_r,nn);return Wr<0?void 0:_r[Wr][1]},Y.prototype.has=function J(nn){return S(this.__data__,nn)>-1},Y.prototype.set=function we(nn,_r){var Wr=this.__data__,Li=S(Wr,nn);return Li<0?(++this.size,Wr.push([nn,_r])):Wr[Li][1]=_r,this};const Se=Y,Le="object"==typeof global&&global&&global.Object===Object&&global;var W="object"==typeof self&&self&&self.Object===Object&&self;const At=Le||W||Function("return this")(),it=At.Symbol;var ue=Object.prototype,se=ue.hasOwnProperty,ce=ue.toString,K=it?it.toStringTag:void 0;var ke=Object.prototype.toString;var xt=it?it.toStringTag:void 0;const rn=function pt(nn){return null==nn?void 0===nn?"[object Undef
1ined]":"[object Null]":xt&&xt in Object(nn)?function _e(nn){var _r=se.call(nn,K),Wr=nn[K];try{nn[K]=void 0;var Li=!0}catch{}var $i=ce.call(nn);return Li&&(_r?nn[K]=Wr:delete nn[K]),$i}(nn):function Lt(nn){return ke.call(nn)}(nn)},mn=function cn(nn){var _r=typeof nn;return null!=nn&&("object"==_r||"function"==_r)},Yn=function an(nn){if(!mn(nn))return!1;var _r=rn(nn);return"[object Function]"==_r||"[object GeneratorFunction]"==_r||"[object AsyncFunction]"==_r||"[object Proxy]"==_r};var nn,bn=At["__core-js_shared__"],Fn=(nn=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+nn:"";var Vr=Function.prototype.toString;const ti=function Fr(nn){if(null!=nn){try{return Vr.call(nn)}catch{}try{return nn+""}catch{}}return""};var Kr=/^\[object .+?Constructor\]$/,sn=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ut=function Qe(nn){return!(!mn(nn)||function On(nn){return!!Fn&&Fn in nn}(nn))&&(Yn(nn)?sn:Kr).test(ti(nn))},vn=function dr(nn,_r){var Wr=function Xt(nn,_r){return nn?.[_r]}(nn,_r);return ut(Wr)?Wr:void 0},Ct=vn(At,"Map"),Ze=vn(Object,"create");var Bn=Object.prototype.hasOwnProperty;var ur=Object.prototype.hasOwnProperty;function Ht(nn){var _r=-1,Wr=null==nn?0:nn.length;for(this.clear();++_r<Wr;){var Li=nn[_r];this.set(Li[0],Li[1])}}Ht.prototype.clear=function et(){this.__data__=Ze?Ze(null):{},this.size=0},Ht.prototype.delete=function Fe(nn){var _r=this.has(nn)&&delete this.__data__[nn];return this.size-=_r?1:0,_r},Ht.prototype.get=function mr(nn){var _r=this.__data__;if(Ze){var Wr=_r[nn];return"__lodash_hash_undefined__"===Wr?void 0:Wr}return Bn.call(_r,nn)?_r[nn]:void 0},Ht.prototype.has=function Er(nn){var _r=this.__data__;return Ze?void 0!==_r[nn]:ur.call(_r,nn)},Ht.prototype.set=function Pi(nn,_r){var Wr=this.__data__;return this.size+=this.has(nn)?0:1,Wr[nn]=Ze&&void 0===_r?"__lodash_hash_undefined__":_r,this};const Wn=Ht,Mi=function di(nn,_r){var Wr=nn.__data__;return function wr(nn){var _r=typeof nn;return"string"==_r||"number"==_r||"symbol"==_r||"boolean"==_r?"__proto__"!==nn:null===nn}(_r)?Wr["string"==typeof _r?"string":"hash"]:Wr.map};function yi(nn){var _r=-1,Wr=null==nn?0:nn.length;for(this.clear();++_r<Wr;){var Li=nn[_r];this.set(Li[0],Li[1])}}yi.prototype.clear=function $n(){this.size=0,this.__data__={hash:new Wn,map:new(Ct||Se),string:new Wn}},yi.prototype.delete=function Qt(nn){var _r=Mi(this,nn).delete(nn);return this.size-=_r?1:0,_r},yi.prototype.get=function Ln(nn){return Mi(this,nn).get(nn)},yi.prototype.has=function kr(nn){return Mi(this,nn).has(nn)},yi.prototype.set=function oi(nn,_r){var Wr=Mi(this,nn),Li=Wr.size;return Wr.set(nn,_r),this.size+=Wr.size==Li?0:1,this};const on=yi;function Pt(nn){var _r=this.__data__=new Se(nn);this.size=_r.size}Pt.prototype.clear=function Ye(){this.__data__=new Se,this.size=0},Pt.prototype.delete=function ae(nn){var _r=this.__data__,Wr=_r.delete(nn);return this.size=_r.size,Wr},Pt.prototype.get=function Ne(nn){return this.__data__.get(nn)},Pt.prototype.has=function H(nn){return this.__data__.has(nn)},Pt.prototype.set=function me(nn,_r){var Wr=this.__data__;if(Wr instanceof Se){var Li=Wr.__data__;if(!Ct||Li.length<199)return Li.push([nn,_r]),this.size=++Wr.size,this;Wr=this.__data__=new on(Li)}return Wr.set(nn,_r),this.size=Wr.size,this};const ln=Pt;var br=function(){try{var nn=vn(Object,"defineProperty");return nn({},"",{}),nn}catch{}}();const Br=br,gn=function jr(nn,_r,Wr){"__proto__"==_r&&Br?Br(nn,_r,{configurable:!0,enumerable:!0,value:Wr,writable:!0}):nn[_r]=Wr};var Tt=Object.prototype.hasOwnProperty;const Nn=function An(nn,_r,Wr){var Li=nn[_r];(!Tt.call(nn,_r)||!C(Li,Wr)||void 0===Wr&&!(_r in nn))&&gn(nn,_r,Wr)},pr=function ir(nn,_r,Wr,Li){var $i=!Wr;Wr||(Wr={});for(var _s=-1,Ls=_r.length;++_s<Ls;){var Os=_r[_s],oo=Li?Li(Wr[Os],nn[Os],Os,Wr,nn):void 0;void 0===oo&&(oo=nn[Os]),$i?gn(Wr,Os,oo):Nn(Wr,Os,oo)}return Wr},ri=function qr(nn){return null!=nn&&"object"==typeof nn},en=function zt(nn){return ri(nn)&&"[object Arguments]"==rn(nn)};var bt=Object.prototype,It=bt.hasOwnProperty,_t=bt.propertyIsEnumerable,hn=en(function(){return arguments}())?en:function(nn){return ri(nn)&&It.call(nn,"callee")&&!_t.call(nn,"callee")};const T=hn,Z=Array.isArray;var Sr="object"==typeof exports&&exports&&!exports.nodeType&&exports,St=Sr&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=St&&St.exports===Sr?At.Buffer:void 0;const V=(Ee?Ee.isBuffer:void 0)||function wt(){return!1};var je=/^(?:0|[1-9]\d*)$/;const Wt=function $e(nn,_r){var Wr=typeof nn;return!!(_r=_r??9007199254740991)&&("number"==Wr||"symbol"!=Wr&&je.test(nn))&&nn>-1&&nn%1==0&&nn<_r},fr=function rr(nn){return"number"==typeof nn&&nn>-1&&nn%1==0&&nn<=9007199254740991};var ar={};
1ar["[object Float32Array]"]=ar["[object Float64Array]"]=ar["[object Int8Array]"]=ar["[object Int16Array]"]=ar["[object Int32Array]"]=ar["[object Uint8Array]"]=ar["[object Uint8ClampedArray]"]=ar["[object Uint16Array]"]=ar["[object Uint32Array]"]=!0,ar["[object Arguments]"]=ar["[object Array]"]=ar["[object ArrayBuffer]"]=ar["[object Boolean]"]=ar["[object DataView]"]=ar["[object Date]"]=ar["[object Error]"]=ar["[object Function]"]=ar["[object Map]"]=ar["[object Number]"]=ar["[object Object]"]=ar["[object RegExp]"]=ar["[object Set]"]=ar["[object String]"]=ar["[object WeakMap]"]=!1;const es=function is(nn){return function(_r){return nn(_r)}};var go="object"==typeof exports&&exports&&!exports.nodeType&&exports,hs=go&&"object"==typeof module&&module&&!module.nodeType&&module,yn=hs&&hs.exports===go&&Le.process;const Bt=function(){try{return hs&&hs.require&&hs.require("util").types||yn&&yn.binding&&yn.binding("util")}catch{}}();var Qn=Bt&&Bt.isTypedArray;const Or=Qn?es(Qn):function Gi(nn){return ri(nn)&&fr(nn.length)&&!!ar[rn(nn)]};var fi=Object.prototype.hasOwnProperty;const Ge=function Fi(nn,_r){var Wr=Z(nn),Li=!Wr&&T(nn),$i=!Wr&&!Li&&V(nn),_s=!Wr&&!Li&&!$i&&Or(nn),Ls=Wr||Li||$i||_s,Os=Ls?function Tr(nn,_r){for(var Wr=-1,Li=Array(nn);++Wr<nn;)Li[Wr]=_r(Wr);return Li}(nn.length,String):[],oo=Os.length;for(var wo in nn)(_r||fi.call(nn,wo))&&(!Ls||!("length"==wo||$i&&("offset"==wo||"parent"==wo)||_s&&("buffer"==wo||"byteLength"==wo||"byteOffset"==wo)||Wt(wo,oo)))&&Os.push(wo);return Os};var ze=Object.prototype;const Ft=function he(nn){var _r=nn&&nn.constructor;return nn===("function"==typeof _r&&_r.prototype||ze)},bi=function Un(nn,_r){return function(Wr){return nn(_r(Wr))}},us=bi(Object.keys,Object);var ks=Object.prototype.hasOwnProperty;const No=function vo(nn){return null!=nn&&fr(nn.length)&&!Yn(nn)},ra=function ss(nn){return No(nn)?Ge(nn):function Us(nn){if(!Ft(nn))return us(nn);var _r=[];for(var Wr in Object(nn))ks.call(nn,Wr)&&"constructor"!=Wr&&_r.push(Wr);return _r}(nn)};var nl=Object.prototype.hasOwnProperty;const Sa=function Co(nn){if(!mn(nn))return function Uo(nn){var _r=[];if(null!=nn)for(var Wr in Object(nn))_r.push(Wr);return _r}(nn);var _r=Ft(nn),Wr=[];for(var Li in nn)"constructor"==Li&&(_r||!nl.call(nn,Li))||Wr.push(Li);return Wr},Go=function Ll(nn){return No(nn)?Ge(nn,!0):Sa(nn)};var rl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ua=rl&&"object"==typeof module&&module&&!module.nodeType&&module,Qo=Ua&&Ua.exports===rl?At.Buffer:void 0,os=Qo?Qo.allocUnsafe:void 0;const Ha=function Ba(){return[]};var Vl=Object.prototype.propertyIsEnumerable,il=Object.getOwnPropertySymbols,sl=il?function(nn){return null==nn?[]:(nn=Object(nn),function Jo(nn,_r){for(var Wr=-1,Li=null==nn?0:nn.length,$i=0,_s=[];++Wr<Li;){var Ls=nn[Wr];_r(Ls,Wr,nn)&&(_s[$i++]=Ls)}return _s}(il(nn),function(_r){return Vl.call(nn,_r)}))}:Ha;const li=sl,Ws=function cu(nn,_r){for(var Wr=-1,Li=_r.length,$i=nn.length;++Wr<Li;)nn[$i+Wr]=_r[Wr];return nn},$a=bi(Object.getPrototypeOf,Object);var Ca=Object.getOwnPropertySymbols?function(nn){for(var _r=[];nn;)Ws(_r,li(nn)),nn=$a(nn);return _r}:Ha;const yo=Ca,lo=function ho(nn,_r,Wr){var Li=_r(nn);return Z(nn)?Li:Ws(Li,Wr(nn))},Vo=function po(nn){return lo(nn,ra,li)},ot=function X(nn){return lo(nn,Go,yo)},yt=vn(At,"DataView"),qn=vn(At,"Promise"),ji=vn(At,"Set"),Ar=vn(At,"WeakMap");var Xr="[object Map]",no="[object Promise]",Qs="[object Set]",uo="[object WeakMap]",sa="[object DataView]",ro=ti(yt),ya=ti(Ct),_a=ti(qn),Zi=ti(ji),Eo=ti(Ar),Is=rn;(yt&&Is(new yt(new ArrayBuffer(1)))!=sa||Ct&&Is(new Ct)!=Xr||qn&&Is(qn.resolve())!=no||ji&&Is(new ji)!=Qs||Ar&&Is(new Ar)!=uo)&&(Is=function(nn){var _r=rn(nn),Wr="[object Object]"==_r?nn.constructor:void 0,Li=Wr?ti(Wr):"";if(Li)switch(Li){case ro:return sa;case ya:return Xr;case _a:return no;case Zi:return Qs;case Eo:return uo}return _r});const xa=Is;var Bl=Object.prototype.hasOwnProperty;const ja=At.Uint8Array,Aa=function Es(nn){var _r=new nn.constructor(nn.byteLength);return new ja(_r).set(new ja(nn)),_r};var Cl=/\w*$/;var vl=it?it.prototype:void 0,fa=vl?vl.valueOf:void 0;const Ka=function gu(nn,_r,Wr){var Li=nn.constructor;switch(_r){case"[object ArrayBuffer]":return Aa(nn);case"[object Boolean]":case"[object Date]":return new Li(+nn);case"[object DataView]":return function zs(nn,_r){var Wr=_r?Aa(nn.buffer):nn.buffer;return new nn.constructor(Wr,nn.byteOffset,nn.byteLength)}(nn,Wr);
1case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function $l(nn,_r){var Wr=_r?Aa(nn.buffer):nn.buffer;return new nn.constructor(Wr,nn.byteOffset,nn.length)}(nn,Wr);case"[object Map]":case"[object Set]":return new Li;case"[object Number]":case"[object String]":return new Li(nn);case"[object RegExp]":return function Uu(nn){var _r=new nn.constructor(nn.source,Cl.exec(nn));return _r.lastIndex=nn.lastIndex,_r}(nn);case"[object Symbol]":return function du(nn){return fa?Object(fa.call(nn)):{}}(nn)}};var Dl=Object.create,aa=function(){function nn(){}return function(_r){if(!mn(_r))return{};if(Dl)return Dl(_r);nn.prototype=_r;var Wr=new nn;return nn.prototype=void 0,Wr}}();const F=aa;var zn=Bt&&Bt.isMap;const Ur=zn?es(zn):function ht(nn){return ri(nn)&&"[object Map]"==xa(nn)};var So=Bt&&Bt.isSet;const zl=So?es(So):function Ss(nn){return ri(nn)&&"[object Set]"==xa(nn)};var vu="[object Arguments]",Zl="[object Function]",zo="[object Object]",Hs={};Hs[vu]=Hs["[object Array]"]=Hs["[object ArrayBuffer]"]=Hs["[object DataView]"]=Hs["[object Boolean]"]=Hs["[object Date]"]=Hs["[object Float32Array]"]=Hs["[object Float64Array]"]=Hs["[object Int8Array]"]=Hs["[object Int16Array]"]=Hs["[object Int32Array]"]=Hs["[object Map]"]=Hs["[object Number]"]=Hs[zo]=Hs["[object RegExp]"]=Hs["[object Set]"]=Hs["[object String]"]=Hs["[object Symbol]"]=Hs["[object Uint8Array]"]=Hs["[object Uint8ClampedArray]"]=Hs["[object Uint16Array]"]=Hs["[object Uint32Array]"]=!0,Hs["[object Error]"]=Hs[Zl]=Hs["[object WeakMap]"]=!1;const cl=function tu(nn,_r,Wr,Li,$i,_s){var Ls,Os=1&_r,oo=2&_r,wo=4&_r;if(Wr&&(Ls=$i?Wr(nn,Li,$i,_s):Wr(nn)),void 0!==Ls)return Ls;if(!mn(nn))return nn;var Mo=Z(nn);if(Mo){if(Ls=function Fu(nn){var _r=nn.length,Wr=new nn.constructor(_r);return _r&&"string"==typeof nn[0]&&Bl.call(nn,"index")&&(Wr.index=nn.index,Wr.input=nn.input),Wr}(nn),!Os)return function Fl(nn,_r){var Wr=-1,Li=nn.length;for(_r||(_r=Array(Li));++Wr<Li;)_r[Wr]=nn[Wr];return _r}(nn,Ls)}else{var xo=xa(nn),Bs=xo==Zl||"[object GeneratorFunction]"==xo;if(V(nn))return function Va(nn,_r){if(_r)return nn.slice();var Wr=nn.length,Li=os?os(Wr):new nn.constructor(Wr);return nn.copy(Li),Li}(nn,Os);if(xo==zo||xo==vu||Bs&&!$i){if(Ls=oo||Bs?{}:function fe(nn){return"function"!=typeof nn.constructor||Ft(nn)?{}:F($a(nn))}(nn),!Os)return oo?function Ma(nn,_r){return pr(nn,yo(nn),_r)}(nn,function Ta(nn,_r){return nn&&pr(_r,Go(_r),nn)}(Ls,nn)):function Cs(nn,_r){return pr(nn,li(nn),_r)}(nn,function qo(nn,_r){return nn&&pr(_r,ra(_r),nn)}(Ls,nn))}else{if(!Hs[xo])return $i?nn:{};Ls=Ka(nn,xo,Os)}}_s||(_s=new ln);var To=_s.get(nn);if(To)return To;_s.set(nn,Ls),zl(nn)?nn.forEach(function(As){Ls.add(tu(As,_r,Wr,As,nn,_s))}):Ur(nn)&&nn.forEach(function(As,ao){Ls.set(ao,tu(As,_r,Wr,ao,nn,_s))});var Ho=Mo?void 0:(wo?oo?ot:Vo:oo?Go:ra)(nn);return function En(nn,_r){for(var Wr=-1,Li=null==nn?0:nn.length;++Wr<Li&&!1!==_r(nn[Wr],Wr,nn););}(Ho||nn,function(As,ao){Ho&&(As=nn[ao=As]),Nn(Ls,ao,tu(As,_r,Wr,ao,nn,_s))}),Ls},Xa=function Ga(nn){return cl(nn,5)};var Eu=a(95657),la=(a(20872),a(66684)),Yl=a(54704),ta=a(32116),zu=a(87264),Lo=a(51676),wu=a(91368);let xs=(()=>{class nn{firebaseApi;store;datepipe;newApptSubject$=new Eu.E;newApptObs$;leadWatcherFirstTime=0;workRequests={all:{data:[],notification:!1},pending:{data:[],notification:!1},hired:{data:[],notification:!1},notHired:{data:[],notification:!1},complete:{data:[],notification:!1},leads:{data:[],notification:!1},changed:!1,selectedSlug:""};appointments={data:[],notification:!1};tasksListener;workRequestsListener;apppointmentsListener;job$=new Eu.E;_proTarg=!1;_edit=!1;cart=[];_showCart=!1;alertsList=[];publicReviews=[];_viewPropDetails="";_tab="Details";_loading=!1;_showDash=!1;constructor(Wr,Li,$i){this.firebaseApi=Wr,this.store=Li,this.datepipe=$i}listenTaskChanges(Wr,Li){var $i=this;return(0,i.c)(function*(){try{const _s=$i.store.collection("tasks");$i.tasksListener=_s.snapshotChanges(["added","modified"]).subscribe(()=>$i.getAndSortWorkRequests(Wr,Li))}catch{throw new Error("Could not listen to task changes")}
1})()}listenWorkRequestChanges(Wr,Li){var $i=this;return(0,i.c)(function*(){try{const _s=$i.store.collection("workRequests",Ls=>Ls.where("potentialVendors","array-contains-any",Li).where("status","==","finished").orderBy("createdAt","desc"));$i.workRequestsListener=_s.snapshotChanges(["added","modified"]).pipe((0,la.I)((Ls,Os)=>Os>0||!Ls.every(({payload:{doc:{metadata:oo}}})=>oo.fromCache))).pipe((0,Yl.k)(Ls=>Ls.map(Os=>{const oo=Os.payload.doc.data();return{id:Os.payload.doc.id,...oo}}))).subscribe(function(){var Ls=(0,i.c)(function*(Os){yield $i.getAndSortWorkRequests(Wr,Li),Os.forEach(function(){var oo=(0,i.c)(function*(wo){});return function(wo){return oo.apply(this,arguments)}}())});return function(Os){return Ls.apply(this,arguments)}}())}catch{throw new Error("Could not listen to work request changes")}})()}listenAppointmentsChange(Wr){var Li=this;return(0,i.c)(function*(){try{const $i=Li.store.collection("appointments");Li.apppointmentsListener=$i.snapshotChanges().subscribe(()=>Li.getAppointments(!1,Wr))}catch{throw new Error("Could not listen to appointments changes")}
1})()}getAppointments(Wr,Li){var $i=this;return(0,i.c)(function*(){const _s=Xa($i.appointments),Ls=yield $i.firebaseApi.findAll("appointments",wo=>wo.where("vendorId","==",Li).orderBy("createdAt","desc")),Os=[];if(Ls.length>0){yield new Promise((Mo,xo)=>{Ls.forEach(function(){var Bs=(0,i.c)(function*(To,qs){try{To.userInfo=yield $i.firebaseApi.findOneById("users",To.userId),To.vendorInfo=yield $i.firebaseApi.findOneById("users",To.vendorId),To.workRequest=$i.workRequests.all.data.find(Ho=>Ho.id===To.workRequestId),To.userInfo&&To.vendorInfo&&To.workRequest&&Os.push(To),qs+1===Ls.length&&Mo(!0)}catch(Ho){xo(Ho)}});return function(To,qs){return Bs.apply(this,arguments)}}())});const wo=[{label:'<span style="color:red;">Delete</span>',a11yLabel:"Delete",onClick:(Mo=(0,i.c)(function*({event:xo}){yield $i.firebaseApi.delete("appointments",xo.meta.id);const Bs=$i.appointments.data.findIndex(To=>To.meta.id===xo.meta.id);Bs>=0&&$i.appointments.data.splice(Bs,1)}),function(Bs){return Mo.apply(this,arguments)})}];$i.appointments.data=Os.map(Mo=>({start:new Date(Mo.appointmentDate),end:new Date(Mo.appointmentDateEnd),title:`A meeting between tax preparer ${Mo.vendorInfo?.firstName} ${Mo.vendorInfo?.lastName} and tax filer ${Mo.userInfo?.firstName} ${Mo.userInfo?.lastName} at ${$i.datepipe.transform(Mo.appointmentDate,"dd MMMM y, h:mm a")}`,color:{primary:"#e3bc08",secondary:"#FDF1BA"},meta:Mo,actions:wo})),$i.newApptSubject$.next("")}else $i.appointments.data=[];var Mo;const oo=Xa($i.appointments);Wr||_s.data.length<oo.data.length&&($i.appointments.notification=!0)})()}getAndSortWorkRequests(Wr,Li){var $i=this;return(0,i.c)(function*(){$i._loading=!0;try{let Mo=function(As){const ao=As.questionnaire.find(co=>"q17"===co.key).answers.find(co=>!0===co.value);let ws,Rs=0;if(ao&&ao.key){switch(ao.key){case"rush-service":ws=new Date(new Date(As.postedDate).getTime()+432e5);break;case"next-day":ws=new Date(new Date(As.postedDate).getTime()+864e5);break;case"two-days":ws=new Date(new Date(As.postedDate).getTime()+1728e5);break;case"three-days":ws=new Date(new Date(As.postedDate).getTime()+2592e5);break;case"within-week":ws=new Date(new Date(As.postedDate).getTime()+6048e5);break;case"couple-week":ws=new Date(new Date(As.postedDate).getTime()+12096e5)}const co=Math.abs(new Date(As.postedDate).getTime()-ws.getTime());Rs=Math.ceil(co/864e5)}return{dueDate:ws,diffDays:Rs}},xo=function(As,ao,ws){return As.filter(Rs=>oo.find(co=>co.workRequestId===Rs.id&&!0===co.hired&&("in-progress"===Rs.progress||"canceled"===Rs.progress)&&Li.includes(co.vendorId)))},Bs=function(As){const ao=[];return As.forEach(ws=>{let Rs=!1;const co=oo.find(qi=>qi.workRequestId===ws.id&&!1===qi.hired);ws.tasks=oo.filter(qi=>qi.workRequestId===ws.id),ws.potentialVendors.forEach(qi=>{Rs||(Rs=oo.find(ps=>ps.workRequestId===ws.id&&!0===ps.hired))}),co&&!Rs&&ws.tasks?.find(qi=>Li.includes(qi.vendorId))&&(ws.currentStatus="Responded",ao.push(ws))}),ao},To=function(As){const ao=[];return Os.forEach(ws=>{let Rs=!1;ws.tasks.findIndex(qi=>qi.hired)<0&&(ws.tasks=oo.filter(qi=>qi.workRequestId===ws.id),ws.potentialVendors.forEach(qi=>{Rs||(Rs=oo.find(ps=>ps.vendorId===qi&&ps.workRequestId===ws.id&&Li.includes(ps.vendorId)))}),!Rs&&("open"===ws.progress||"in-progress"===ws.progress)&&ws.responded.length<20&&(ws.currentStatus="Lead",ao.push(ws)))}),ao},qs=function(As,ao){const ws=[];return As.forEach(Rs=>{let co=!1;Rs.potentialVendors.forEach(qi=>{co||(co=oo.find(ps=>!0===ps.hired&&ps.vendorId===qi&&ps.vendorId!==ao&&ps.workRequestId===Rs.id))}),co&&(Rs.hiredByTeamMate=Rs.responded.find(qi=>Li.includes(qi.vendorId)&&qi.hired),Rs.notHired=!0,Rs.currentStatus="Not hired",ws.push(Rs))}),ws},Ho=function(As,ao,ws){if(!As||0===As.length)return[];const Rs=[];return As.forEach(co=>{"complete"===co.progress&&(co.currentStatus="Complete",ws.findIndex(ps=>ps.id===co.id)<0&&Rs.push(co))}),Rs};const _s=Xa($i.workRequests),Os=(yield $i.firebaseApi.findAll("workRequests",As=>As.where("potentialVendors","array-contains-any",Li).where("status","==","finished").orderBy("createdAt","desc"))).sort((As,ao)=>ao.payment?.created-As.payment?.created),oo=yield $i.firebaseApi.findAll("tasks");yield new Promise((As,ao)=>{Os.length>
10?Os.forEach(function(){var ws=(0,i.c)(function*(Rs,co){try{if(Rs.responded=oo.filter(qi=>qi.workRequestId===Rs.id),Rs.userInfo=yield $i.firebaseApi.findOneById("users",Rs.userId),"Personal Tax Return"===Rs.requestType){const{dueDate:qi,diffDays:ps}=Mo(Rs);Rs.dueDate=qi,Rs.daysBeforeDue=ps}if($i.workRequests?.all?.data?.length>0){const qi=$i.workRequests.all.data.find(ps=>ps.id===Rs.id);qi&&qi.userDocs&&qi.userDocs.length<Rs.userDocs.length&&(Rs.newDocument=!0,Rs.userDocs.forEach(ps=>{qi.userDocs.findIndex(bu=>bu.url===ps.url)<0&&(ps.new=!0)}))}co+1===Os.length&&As(!0)}catch(qi){ao(qi)}});return function(Rs,co){return ws.apply(this,arguments)}}()):As(!0)}),$i.workRequests.hired.data=[...xo(Os,Wr,Li)],$i.workRequests.hired.data.forEach(As=>{}),$i.workRequests.pending.data=Bs(Os),$i.workRequests.pending.data.forEach(As=>{}),$i.workRequests.leads.data=To(Os),$i.workRequests.notHired.data=qs(Os,Wr),$i.workRequests.complete.data=Ho(Os,Wr,$i.workRequests.notHired.data),$i.workRequests.all.data=[...Os],console.log("final leads -=>",$i.workRequests);const wo=Xa($i.workRequests);$i.leadWatcherFirstTime>=2&&(_s.all.data.length<wo.all.data.length&&($i.workRequests.all.notification=!0,$i.workRequests.changed=!0),_s.hired.data.length<wo.hired.data.length&&($i.workRequests.hired.notification=!0,$i.workRequests.changed=!0),_s.pending.data.length<wo.pending.data.length&&($i.workRequests.pending.notification=!0,$i.workRequests.changed=!0),_s.notHired.data.length<wo.notHired.data.length&&($i.workRequests.notHired.notification=!0,$i.workRequests.changed=!0),_s.leads.data.length<wo.leads.data.length&&($i.workRequests.leads.notification=!0,$i.workRequests.changed=!0)),$i.leadWatcherFirstTime+=1,$i.job$.next(""),$i._loading=!1}catch(_s){$i._loading=!1,console.error("getAndSortWorkRequests error -=>",_s)}})()}thisWr(Wr){let Li={};return this.workRequests?.all?.data&&this.workRequests?.all?.data.length>0&&(Li=this.workRequests.all.data.find($i=>$i.id===Wr)),Li&&Li.id?Li:{}}number2(Wr){return Math.floor(100*Wr)/100}static \u0275fac=function(Li){return new(Li||nn)(ta.CoB(zu.H),ta.CoB(Lo.i4),ta.CoB(wu.y))};static \u0275prov=ta.wxM({token:nn,factory:nn.\u0275fac,providedIn:"root"})}return nn})()},22716:(B,G,a)=>{"use strict";a.d(G,{y:()=>_});var i=a(73448),v=a(32116),b=a(46252);let _=(()=>{class C{storage;_storage=null;constructor(S){this.storage=S,this.init()}init(){var S=this;return(0,i.c)(function*(){const R=yield S.storage.create();S._storage=R})()}set(S,R){this._storage?.set(S,R)}get(S){return this._storage?.get(S)}remove(S){return this._storage?.remove(S)}clear(){this._storage.clear()}static \u0275fac=function(R){return new(R||C)(v.CoB(b.u))};static \u0275prov=v.wxM({token:C,factory:C.\u0275fac,providedIn:"root"})}return C})()},36716:(B,G,a)=>{"use strict";a.d(G,{O:()=>i});const i={production:!0,userRole:"vendor",apiBase:"https://production.api.nexgentaxes.com/",conversationApi:"https://communications-service-prod.herokuapp.com/",googleApiKey:"AIzaSyAIZJ12WI3UI3mbP2FC6u9JO9nkuzQmI7I",apiBaseKey:"f488c628a5fdf8b17861bb8d4947a5b3eb00d2f8",stripe:{publishable:"pk_live_51KME7XBD9tkiJntNF0RPtGLsxnsu4rnVPhk8yps27aMz2MAmzbDWajBBXkAJGnobCYPz3aMcV16TEAueqbUJfRfU00OvV5MoFd",secret:"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"},firebaseConfig:{apiKey:"AIzaSyCEXjfhkIsZnWnii_uFQzCk8TkwYTdu7IY",authDomain:"nexgen-taxes-production.firebaseapp.com",projectId:"nexgen-taxes-production",storageBucket:"nexgen-taxes-production.appspot.com",messagingSenderId:"1051749352549",appId:"1:1051749352549:web:113080553c8347f342328c"},appIsFor:"nexGenTaxes",supportId:"BbBbVqVZFpYHBX1JZJLakkuFd7n2",zoomUrl:"https://nexgen-pro-api-5ec8d152d367.herokuapp.com/api/zoom/link",appLink:"https://vendor.nexgentaxes.com/"}},8440:(B,G,a)=>{"use strict";var i=a(14476),v=a(32116),b=a(73448),_=a(97048),C=a(83068),P=a(89192),S=a(36820);const k=[{path:"login",loadChildren:()=>Promise.all([a.e(6032),a.e(9312),a.e(36)]).then(a.bind(a,90036)).then(I=>I.LoginModule)},{path:"register",loadChildren:()=>Promise.all([a.e(6032),a.e(9312),a.e(36)]).then(a.bind(a,90036)).then(I=>I.LoginModule)},{path:"dashboard",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(9312),a.e(6898)]).then(a.bind(a,46898)).then(I=>I.DashboardModule)},{path:"docs",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(4048),a.e(2778)]).then(a.bind(a,52778)).then(I=>I.DocsModule)},{path:"lead-purchase-options",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(5448),a.e(9312),a.e(8088)]).then(a.bind(a,8088)).then(I=>I.OptionsModule)},{path:"onboarding",loadChildren:()=>a.e(1776).then(a.bind(a,41776)).then(I=>I.OnboardingPageModule)},{path:"profile",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(7784),a.e(9312),a.e(48)]).then(a.bind(a,48)).then(I=>I.ProfilePageModule)},{path:"my-profile",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(7784),a.e(9312),a.e(864)]).then(a.bind(a,864)).then(I=>I.Profile2PageModule)},{path:"messages",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(5448),a.e(4356)]).then(a.bind(a,37156)).then(I=>I.MessagesPageModule)},{path:"invite-users",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(7784),a.e(6868)]).then(a.bind(a,6868)).then(I=>I.InviteUsersPageModule)},{path:"signup",loadChildren:()=>Promise.all([a.e(6032),a.e(9312),a.e(4652)]).then(a.bind(a,54652)).then(I=>I.SignupModule)},{path:"signup/:id",loadChildren:()=>Promise.all([a.e(6032),a.e(9312),a.e(4652)]).then(a.bind(a,54652)).then(I=>I.SignupModule)},{path:"work-requests",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(9930),a.e(5448),a.e(4516),a.e(2560),a.e(9312),a.e(8264)]).then(a.bind(a,68264)).then(I=>I.WorkRequestsPageModule)},{path:"work-request",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(5448),a.e(1948),a.e(4048),a.e(9312),a.e(1496)]).then(a.bind(a,41496)).then(I=>I.WorkRequestPageModule)},{path:"work-request/:id",runGuardsAndResolvers:"pathParamsOrQueryParamsChange",canActivate:[S.Q],canDeactivate:[(()=>{class I{router;constructor(h){this.router=h}canDeactivate(h){return!0}static \u0275fac=function(y){return new(y||I)(v.CoB(P.E5))};static \u0275prov=v.wxM({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})()],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(5448),a.e(1948),a.e(4048),a.e(9312),a.e(1496)]).then(a.bind(a,41496)).then(I=>I.WorkRequestPageModule)},{path:"appointments",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(6123),a.e(9930),a.e(1948),a.e(9312),a.e(3596)]).then(a.bind(a,65368)).then(I=>I.AppointmentsPageModule)},{path:"invoices",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(9930),a.e(5448),a.e(9312),a.e(9500)]).then(a.bind(a,49416)).then(I=>I.InvoicesPageModule)},{path:"support",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(5448),a.e(444)]).then(a.bind(a,60444)).then(I=>I.SupportPageModule)},{path:"password-reset",loadChildren:()=>Promise.all([a.e(9216),a.e(9312),a.e(2604)]).then(a.bind(a,22604)).then(I=>I.PasswordResetPageModule)},{path:"join-team",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9312),a.e(3216)]).then(a.bind(a,33216)).then(I=>I.JoinTeamPageModule)},{path:"help",loadChildren:()=>a.e(8720).then(a.bind(a,98720)).then(I=>I.HelpModule)},{path:"credits",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(9216),a.e(9930),a.e(4516),a.e(9312),a.e(5996)]).then(a.bind(a,28)).then(I=>I.CreditsPageModule)},{path:"verify-email/:id",loadChildren:()=>a.e(4940).then(a.bind(a,44940)).then(I=>I.VerifyEmailPageModule)},{path:"message-template",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6156)]).then(a.bind(a,26156)).then(I=>I.MsgTemplateModule)},{path:"invoice-template",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(6123),a.e(5312)]).then(a.bind(a,92932)).then(I=>I.InvoiceTemplatePageModule)},{path:"all-invoices",canActivate:[S.Q],loadChildren:()=>Promise.all([a.e(6032),a.e(9216),a.e(5552),a.e(9312),a.e(2068)]).then(a.bind(a,14448)).then(I=>I.AllInvoicesPageModule)},{path:"",pathMatch:"full",redirectTo:"/dashboard"},{path:"**",redirectTo:"/dashboard"}];let x=(()=>{class I{static \u0275fac=function(y){return new(y||I)};static \u0275mod=v.a4G({type:I});static \u0275inj=v.s3X({imports:[P.qQ.forRoot(k),P.qQ]})}return I})();var D=a(91368),ee=a(46928),te=a(70800),J=a(33412),Q=a(66684),we=a(65800);class de{constructor(l,h){this.source=l,l.initialize&&l.initialize(h)}subscribe(l){this.sub=this.source.onInterrupt.subscribe(l)}unsubscribe(){this.sub.unsubscribe(),this.sub=null}resume(){this.source.attach()}pause(){this.source.detach()}}class Y{constructor(){this.idValue=new Date,this.idlingValue=!1}id(l){if(void 0!==l){if(!l)throw new Error("A value must be specified for the ID.");this.idValue=l}return this.idValue}idling(l){return void 0!==l&&(this.idlingValue=l),this.idlingValue}now(){return new Date}isExpired(){const l=this.last();return null!=l&&l<=this.now()}}class Se{constructor(){this.storageMap={}}get length(){return Object.keys(this.storageMap).length}clear(){this.storageMap={}}getItem(l){return typeof this.storageMap[l]<"u"?this.storageMap[l]:null}key(l){return Object.keys(this.storageMap)[l]||null}removeItem(l){this.storageMap[l]=void 0}setItem(l,h){this.storageMap[l]=h}}let Ye=(()=>{class I{constructor(){this.storage=this.getStorage()}getStorage(){try{const h=localStorage;return h.setItem("ng2IdleStorage",""),h.removeItem("ng2IdleStorage"),h}catch{return new Se}}getItem(h){return this.storage.getItem("ng2Idle."+h)}removeItem(h){this.storage.removeItem("ng2Idle."+h)}setItem(h,y){this.storage.setItem("ng2Idle."+h,y)}_wrapped(){return this.storage}static#e=this.\u0275fac=function(y){return new(y||I)};static#t=this.\u0275prov=v.wxM({token:I,factory:I.\u0275fac})}return I})(),pe=(()=>{class I extends Y{constructor(h){super(),this.localStorage=h,this.idleName="main"}last(h){return void 0!==h&&this.setExpiry(h),this.getExpiry()}idling(h){return void 0!==h&&this.setIdling(h),this.getIdling()}getIdleName(){return this.idleName}setIdleName(h){h&&(this.idleName=h)}getExpiry(){const h=this.localStorage.getItem(this.idleName+".expiry");return h?new Date(parseInt(h,10)):null}setExpiry(h){h?this.localStorage.setItem(this.idleName+".expiry",h.getTime().toString()):this.localStorage.removeItem(this.idleName+".expiry")}getIdling(){const h=this.localStorage.getItem(this.idleName+".idling");return!!h&&"true"===h}setIdling(h){this.localStorage.setItem(this.idleName+".idling",h?h.toString():"false")}static#e=this.\u0275fac=function(y){return new(y||I)(v.CoB(Ye))};static#t=this.\u0275prov=v.wxM({token:I,factory:I.\u0275fac})}return I})();class ae{}var Ve=function(I){return I[I.disabled=0]="disabled",I[I.idle=1]="idle",I[I.notIdle=2]="notIdle",I}(Ve||{});let Ne=(()=>{class I{constructor(h,y,O,z){this.expiry=h,this.zone=y,this.platformId=z,this.idle=1200,this.timeoutVal=30,this.autoResume=Ve.idle,this.interrupts=new Array,this.running=!1,this.keepaliveEnabled=!1,this.onIdleStart=new v._w7,this.onIdleEnd=new v._w7,this.onTimeoutWarning=new v._w7,this.onTimeout=new v._w7,this.onInterrupt=new v._w7,O&&(this.keepaliveSvc=O,this.keepaliveEnabled=!0),this.setIdling(!1)}setIdleName(h){if(!(this.expiry instanceof pe))throw new Error("Cannot set expiry ke
1y name because no LocalStorageExpiry has been provided.");this.expiry.setIdleName(h)}getKeepaliveEnabled(){return this.keepaliveEnabled}setKeepaliveEnabled(h){if(!this.keepaliveSvc)throw new Error("Cannot enable keepalive integration because no KeepaliveSvc has been provided.");return this.keepaliveEnabled=h}getTimeout(){return this.timeoutVal}setTimeout(h){if(!1===h)this.timeoutVal=0;else{if(!("number"==typeof h&&h>=0))throw new Error("'seconds' can only be 'false' or a positive number.");this.timeoutVal=h}return this.timeoutVal}getIdle(){return this.idle}setIdle(h){if(h<=0)throw new Error("'seconds' must be greater zero");return this.idle=h}getAutoResume(){return this.autoResume}setAutoResume(h){return this.autoResume=h}setInterrupts(h){this.clearInterrupts();const y=this;for(const O of h){const Oe=new de(O,{platformId:this.platformId});Oe.subscribe(Be=>{y.interrupt(Be.force,Be.innerArgs)}),this.interrupts.push(Oe)}return this.interrupts}getInterrupts(){return this.interrupts}clearInterrupts(){for(const h of this.interrupts)h.pause(),h.unsubscribe();this.interrupts.length=0}isRunning(){return this.running}isIdling(){return this.idling}watch(h){this.safeClearInterval("idleHandle"),this.safeClearInterval("timeoutHandle");const y=this.timeoutVal?this.timeoutVal:0;if(!h){const z=new Date(this.expiry.now().getTime()+1e3*(this.idle+y));this.expiry.last(z)}this.idling&&this.toggleState(),this.running||(this.startKeepalive(),this.toggleInterrupts(!0)),this.running=!0;const O=()=>{this.zone.run(()=>{this.getExpiryDiff(y)>0?(this.safeClearInterval("idleHandle"),this.setIdleIntervalOutsideOfZone(O,1e3)):this.toggleState()})};this.setIdleIntervalOutsideOfZone(O,1e3)}setIdleIntervalOutsideOfZone(h,y){this.zone.runOutsideAngular(()=>{this.idleHandle=setInterval(h,y)})}stop(){this.stopKeepalive(),this.toggleInterrupts(!1),this.safeClearInterval("idleHandle"),this.safeClearInterval("timeoutHandle"),this.setIdling(!1),this.running=!1,this.expiry.last(null)}timeout(){this.stopKeepalive(),this.toggleInterrupts(!1),this.safeClearInterval("idleHandle"),this.safeClearInterval("timeoutHandle"),this.setIdling(!0),this.running=!1,this.countdown=0,this.onTimeout.emit(null)}interrupt(h,y){if(this.running){if(this.timeoutVal&&this.expiry.isExpired())return void this.timeout();this.onInterrupt.emit(y),(!0===h||this.autoResume===Ve.idle||this.autoResume===Ve.notIdle&&!this.expiry.idling())&&this.watch(h)}}setIdling(h){this.idling=h,this.expiry.idling(h)}toggleState(){this.setIdling(!this.idling),this.idling?(this.onIdleStart.emit(null),this.stopKeepalive(),this.timeoutVal>0&&(this.countdown=this.timeoutVal,this.doCountdown(),this.setTimeoutIntervalOutsideZone(()=>{this.doCountdownInZone()},1e3))):(this.toggleInterrupts(!0),this.onIdleEnd.emit(null),this.startKeepalive()),this.safeClearInterval("idleHandle")}setTimeoutIntervalOutsideZone(h,y){this.zone.runOutsideAngular(()=>{this.timeoutHandle=setInterval(()=>{h()},y)})}toggleInterrupts(h){for(const y of this.interrupts)h?y.resume():y.pause()}getExpiryDiff(h){const y=this.expiry.now();return(this.expiry.last()||y).getTime()-y.getTime()-1e3*h}doCountdownInZone(){this.zone.run(()=>{this.doCountdown()})}doCountdown(){const h=this.getExpiryDiff(this.timeoutVal);if(h>0)return this.safeClearInterval("timeoutHandle"),void this.interrupt(!0);this.idling&&(this.countdown<=0?this.timeout():(this.onTimeoutWarning.emit(this.countdown),this.countdown=Math.round((1e3*(this.timeoutVal-1)+h)/1e3)))}safeClearInterval(h){const y=this[h];null!==y&&typeof y<"u"&&(clearInterval(this[h]),this[h]=null)}startKeepalive(){!this.keepaliveSvc||!this.keepaliveEnabled||(this.running&&this.keepaliveSvc.ping(),this.keepaliveSvc.start())}stopKeepalive(){!this.keepaliveSvc||!this.keepaliveEnabled||this.keepaliveSvc.stop()}ngOnDestroy(){this.stop(),this.clearInterrupts()}static#e=this.\u0275fac=function(y){return new(y||I)(v.CoB(Y),v.CoB(v.WW2),v.CoB(ae,8),v.CoB(v.AHE,8))};static#t=this.\u0275prov=v.wxM({token:I,factory:I.\u0275fac})}return I})();class Ie{constructor(l,h,y=!1){this.source=l,this.innerArgs=h,this.force=y}}class H{constructor(l,h){this.attachFn=l,this.detachFn=h,this.isAttached=!1,this.onInterrupt=new v._w7}attach(){!0!==Zone.current.get("isAngularZone")?(!this.isAttached&&this.attachFn&&this.attachFn(this),this.isAttached=!0):Zone.current.parent.run(()=>this.attach())}detach(){this.isAttached&&this.detachFn&&this.detachFn(this),this.isAttached=!1}}class ye extends H{constructor(l,h,y){super(null,null),this.target=l,this.events=h,this.opts=y,this.eventSubscription=new ee.wH,"number"==typeof this.opts&&(this.opts={throttleDelay:this.opts,passive:!1}),this.opts=this.opts||{passive:!1,throttleDelay:500},null==this.opts.throttleDelay&&(this.opts.throttleDelay=500),this.throttleDelay=this.opts.throttleDelay,this.passive=!!this.opts.passive}initialize(l){if(l?.platformId&&(0,D.uf)(l.platformId))return;const h="function"==typeof this.target?this.target():this.target,y=this.passive?{passive:!0}:null,O=this.events.split(" ").map(Oe=>(0,te.w)(h,Oe,y));this.eventSrc=(0,J.U)(...O),this.eventSrc=this.eventSrc.pipe((0,Q.I)(Oe=>!this.filterEvent(Oe))),this.throttleDelay>0&&(this.eventSrc=this.eventSrc.pipe((0,we.U)(this.throttleDelay)));const z=Oe=>this.onInterrupt.emit(new Ie(this,Oe));this.attachFn=()=>this.eventSubscription=this.eventSrc.subscribe(z),this.detachFn=()=>this.eventSubscription.unsubscribe()}filterEvent(l){return!1}get options(){return{passive:this.passive,throttleDelay:this.throttleDelay}}}class Le extends ye{constructor(l,h){super(()=>document.documentElement,l,h)}filterEvent(l){return!("mousemove"!==l.type||!(l.originalEvent&&0===l.originalEvent.movementX&&0===l.originalEvent.movementY||void 0!==l.movementX&&!l.movementX)&&l.movementY)}}class W extends ye{constructor(l,h){super(()=>window,l,h)}}class We extends W{constructor(l=500){super("storage",l)}filterEvent(l){return!(l.key&&l.key.indexOf("ng2Idle.")>=0&&l.key.indexOf(".expiry")>=0)}}let Ut=(()=>{class I{static forRoot(){return{ngModule:I,providers:[pe,{provide:Y,useExisting:pe},Ne]}}static#e=this.\u0275fac=function(y){return new(y||I)};static#t=this.\u0275mod=v.a4G({type:I});static#n=this.\u0275inj=v.s3X({providers:[Ye]})}return I})();
1const ue=function it(I){return[new Le("mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove scroll",I),new We(I)]}();var se=a(90304);let ce=(()=>{class I extends ae{constructor(h,y){super(),this.http=h,this.zone=y,this.pingInterval=600,this.onPing=new v._w7,this.onPingResponse=new v._w7}request(h){return"string"==typeof h?this.pingRequest=new _.i("GET",h):h instanceof _.i?this.pingRequest=h:null===h&&(this.pingRequest=null),this.pingRequest}interval(h){if(!isNaN(h)&&h>0)this.pingInterval=h;else if(!isNaN(h)&&h<=0)throw new Error("Interval value must be greater than zero.");return this.pingInterval}ping(){this.onPing.emit(null),this.pingRequest&&this.http.request(this.pingRequest).subscribe(h=>{this.onPingResponse.emit(h)},h=>{this.onPingResponse.emit(h)})}start(){this.stop(),this.zone.runOutsideAngular(()=>{this.pingHandle=setInterval(()=>{this.zone.run(()=>{this.ping()})},1e3*this.pingInterval)})}stop(){this.hasPingHandle()&&(clearInterval(this.pingHandle),this.pingHandle=null)}ngOnDestroy(){this.stop()}isRunning(){return this.hasPingHandle()}hasPingHandle(){return null!==this.pingHandle&&typeof this.pingHandle<"u"}static#e=this.\u0275fac=function(y){return new(y||I)(v.CoB(_.KK),v.CoB(v.WW2))};static#t=this.\u0275prov=v.wxM({token:I,factory:I.\u0275fac})}return I})(),K=(()=>{class I{static forRoot(){return{ngModule:I,providers:[ce,{provide:ae,useExisting:ce}]}}static#e=this.\u0275fac=function(y){return new(y||I)};static#t=this.\u0275mod=v.a4G({type:I});static#n=this.\u0275inj=v.s3X({imports:[Ut.forRoot()]})}return I})();var _e=a(77816);function Pe(I,l){1&I&&(v.I0R(0,"div",2)(1,"div",3),v.wR5(2,"img",4),v.C$Y(),v.I0R(3,"div",5),v.wR5(4,"div")(5,"div")(6,"div"),v.C$Y()())}let De=(()=>{class I{platform;idle;keepalive;cd;userProvider;title="nexgen-website";appLoaded=!1;idleState="NOT_STARTED";countdown=null;lastPing=null;appPages=[{title:"Inbox",url:"/folder/Inbox",icon:"mail"},{title:"Outbox",url:"/folder/Outbox",icon:"paper-plane"},{title:"Favorites",url:"/folder/Favorites",icon:"heart"},{title:"Archived",url:"/folder/Archived",icon:"archive"},{title:"Trash",url:"/folder/Trash",icon:"trash"},{title:"Spam",url:"/folder/Spam",icon:"warning"}];labels=["Family","Friends","Notes","Work","Travel","Reminders"];constructor(h,y,O,z,Oe){this.platform=h,this.idle=y,this.keepalive=O,this.cd=z,this.userProvider=Oe,this.initializeApp()}initializeApp(){var h=this;this.platform.ready().then((0,b.c)(function*(){h.appLoaded=!0,h.initIdle(),h.reset()}))}initIdle(){var h=this;this.idle.setIdle(5),this.idle.setTimeout(9e3),this.idle.setInterrupts(ue),this.idle.onIdleStart.subscribe((0,b.c)(function*(){h.idleState="IDLE",h.userProvider.loggedInUser.id&&(yield h.userProvider.lastSeen(new Date)),h.logIdle()})),this.idle.onIdleEnd.subscribe((0,b.c)(function*(){h.idleState="NOT_IDLE",h.userProvider.loggedInUser.id&&(yield h.userProvider.lastSeen(new Date)),h.countdown=null,h.cd.detectChanges(),h.logIdle()})),this.idle.onTimeout.subscribe(()=>{this.idleState="TIMED_OUT",this.userProvider.logout()}),this.idle.onTimeoutWarning.subscribe(y=>{this.countdown=y,this.logIdle(y)}),this.keepalive.interval(15),this.keepalive.onPing.subscribe(()=>this.lastPing=new Date)}logIdle(h){}reset(){this.idle.watch(),this.idleState="NOT_IDLE",this.countdown=null,this.lastPing=null}ngOnDestroy(){}static \u0275fac=function(y){return new(y||I)(v.GI1(se.WU),v.GI1(Ne),v.GI1(ce),v.GI1(v.kD9),v.GI1(_e.e))};static \u0275cmp=v.In1({type:I,selectors:[["app-root"]],decls:3,vars:2,consts:[["class","center-logo",4,"ngIf"],[3,"animated"],[1,"center-logo"],[1,"logo-container",2,"padding","10px","border-radius","16px","background-color","white"],["width","100","_ngcontent-ivy-c149","","src","assets/icon/nexgenlogo.png"],[1,"lds-facebook","app"]],template:function(y,O){1&y&&(v.yuY(0,Pe,7,0,"div",0),v.I0R(1,"ion-app"),v.wR5(2,"ion-router-outlet",1),v.C$Y()),2&y&&(v.E7m("ngIf",!O.appLoaded),v.yG2(2),v.E7m("animated",!1))},dependencies:[D.u_,C.qk,C.Cg],styles:[".lds-facebook[_ngcontent-%COMP%] {\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t\twidth: 80px;\n\t\theight: 80px;\n\t}\n\t.lds-facebook[_ngcontent-%COMP%] div[_ngcontent-%COMP%] {\n\t\tdisplay: inline-block;\n\t\tposition: absolute;\n\t\tleft: 8px;\n\t\twidth: 16px;\n\t\tbackground: #fff;\n\t\tanimation: _ngcontent-%COMP%_lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;\n\t}\n\t.lds-facebook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1) {\
1n\t\tleft: 8px;\n\t\tanimation-delay: -0.24s;\n\t}\n\t.lds-facebook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2) {\n\t\tleft: 32px;\n\t\tanimation-delay: -0.12s;\n\t}\n\t.lds-facebook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3) {\n\t\tleft: 56px;\n\t\tanimation-delay: 0;\n\t}\n\t@keyframes _ngcontent-%COMP%_lds-facebook {\n\t\t0% {\n\t\t\ttop: 8px;\n\t\t\theight: 64px;\n\t\t}\n\t\t50%,\n\t\t100% {\n\t\t\ttop: 24px;\n\t\t\theight: 32px;\n\t\t}\n\t}\n\n\t.center-logo[_ngcontent-%COMP%] {\n\t\twidth: 100%;\n\t\theight: 100vh;\n\t\tbackground-color: #6c63ff;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}"]})}return I})();var ke=a(46252);const Lt=new v.UbH("STORAGE_CONFIG_TOKEN");class Dt extends ke.u{constructor(){super()}create(){var l=this;return(0,b.c)(function*(){return l})()}defineDriver(){return(0,b.c)(function*(){})()}get driver(){return"noop"}get(l){return(0,b.c)(function*(){return null})()}set(l,h){return(0,b.c)(function*(){})()}remove(l){return(0,b.c)(function*(){})()}clear(){return(0,b.c)(function*(){})()}length(){return(0,b.c)(function*(){return 0})()}keys(){return(0,b.c)(function*(){return[]})()}forEach(l){return(0,b.c)(function*(){})()}setEncryptionKey(l){}}function He(I,l){return(0,D.uf)(I)?new Dt:new ke.u(l)}let ge=(()=>{class I{static forRoot(h=null){return{ngModule:I,providers:[{provide:Lt,useValue:h},{provide:ke.u,useFactory:He,deps:[v.AHE,Lt]}]}}}return I.\u0275fac=function(h){return new(h||I)},I.\u0275mod=v.a4G({type:I}),I.\u0275inj=v.s3X({}),I})();var xt=a(87560),pt=a(29684);function cn(I){return new v.OBp(3e3,!1)}function ft(I){switch(I.length){case 0:return new pt.kP;case 1:return I[0];default:return new pt.Wq(I)}}function dn(I,l,h=new Map,y=new Map){const O=[],z=[];let Oe=-1,Be=null;if(l.forEach(xe=>{const mt=xe.get("offset"),gt=mt==Oe,vt=gt&&Be||new Map;xe.forEach((Gt,un)=>{let fn=un,Sn=Gt;if("offset"!==un)switch(fn=I.normalizePropertyName(fn,O),Sn){case pt.aM:Sn=h.get(un);break;case pt.AN:Sn=y.get(un);break;default:Sn=I.normalizeStyleValue(un,fn,Sn,O)}vt.set(fn,Sn)}),gt||z.push(vt),Be=vt,Oe=mt}),O.length)throw function Qe(I){return new v.OBp(3502,!1)}();return z}function Tn(I,l,h,y){switch(l){case"start":I.onStart(()=>y(h&&Bn(h,"start",I)));break;case"done":I.onDone(()=>y(h&&Bn(h,"done",I)));break;case"destroy":I.onDestroy(()=>y(h&&Bn(h,"destroy",I)))}}function Bn(I,l,h){const z=mr(I.element,I.triggerName,I.fromState,I.toState,l||I.phaseName,h.totalTime??I.totalTime,!!h.disabled),Oe=I._data;return null!=Oe&&(z._data=Oe),z}function mr(I,l,h,y,O="",z=0,Oe){return{element:I,triggerName:l,fromState:h,toState:y,phaseName:O,totalTime:z,disabled:!!Oe}}function tr(I,l,h){let y=I.get(l);return y||I.set(l,y=h),y}function Ir(I){const l=I.indexOf(":");return[I.substring(1,l),I.slice(l+1)]}const ur=typeof document>"u"?null:document.documentElement;function Er(I){const l=I.parentNode||I.host||null;return l===ur?null:l}let Di=null,Pi=!1;function $n(I,l){for(;l;){if(l===I)return!0;l=Er(l)}return!1}function jn(I,l,h){if(h)return Array.from(I.querySelectorAll(l));const y=I.querySelector(l);return y?[y]:[]}let mi=(()=>{class I{validateStyleProperty(h){return function nr(I){Di||(Di=function Wn(){return typeof document<"u"?document.body:null}()||{},Pi=!!Di.style&&"WebkitAppearance"in Di.style);let l=!0;return Di.style&&!function Ai(I){return"ebkit"==I.substring(1,6)}(I)&&(l=I in Di.style,!l&&Pi&&(l="Webkit"+I.charAt(0).toUpperCase()+I.slice(1)in Di.style)),l}(h)}matchesElement(h,y){return!1}containsElement(h,y){return $n(h,y)}getParentElement(h){return Er(h)}query(h,y,O){return jn(h,y,O)}computeStyle(h,y,O){return O||""}animate(h,y,O,z,Oe,Be=[],xe){return new pt.kP(O,z)}static#e=this.\u0275fac=function(y){return new(y||I)};static#t=this.\u0275prov=v.wxM({token:I,factory:I.\u0275fac})}return I})();class di{static#e=this.NOOP=new mi}class Mi{}const _n=1e3,kr="ng-enter",si="ng-leave",oi="ng-trigger",Ii=".ng-trigger",yi="ng-animating",on=".ng-animating";function le(I){if("number"==typeof I)return I;const l=I.match(/^(-?[\.\d]+)(m?s)/);return!l||l.length<2?0:me(parseFloat(l[1]),l[2])}function me(I,l){return"s"===l?I*_n:I}function Re(I,l,h){return I.hasOwnProperty("duration")?I:function Pt(I,l,h){let O,z=0,Oe="";if("string"==typeof I){const Be=I.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===Be)return l.push(cn()),{duration:0,delay:0,easing:""};O=me(parseFloat(Be[1]),Be[2]);const xe=Be[3];null!=xe&&(z=me(parseFloat(xe),Be[4]));const mt=Be[5];mt&&(Oe=mt)}else O=I;if(!h){let Be=!1,xe=l.length;O<0&&(l.push(function mn(){return new v.OBp(3100,!1)}()),Be=!0),z<0&&(l.push(function dt(){return new v.OBp(3101,!1)}()),Be=!0),Be&&l.splice(xe,0,cn())}return{duration:O,delay:z,easing:Oe}}(I,l,h)}function Mn(I,l,h){l.forEach((y,O)=>{const z=Nn(O);h&&!h.has(O)&&h.set(O,I.style[z]),I.style[z]=y}
1)}function br(I,l){l.forEach((h,y)=>{const O=Nn(y);I.style[O]=""})}function Br(I){return Array.isArray(I)?1==I.length?I[0]:(0,pt.iC)(I):I}const gn=new RegExp("{{\\s*(.+?)\\s*}}","g");function Xe(I){let l=[];if("string"==typeof I){let h;for(;h=gn.exec(I);)l.push(h[1]);gn.lastIndex=0}return l}function Tt(I,l,h){const y=`${I}`,O=y.replace(gn,(z,Oe)=>{let Be=l[Oe];return null==Be&&(h.push(function rt(I){return new v.OBp(3003,!1)}()),Be=""),Be.toString()});return O==y?I:O}const An=/-+([a-z0-9])/g;function Nn(I){return I.replace(An,(...l)=>l[1].toUpperCase())}function Gr(I,l,h){switch(l.type){case pt.m0.Trigger:return I.visitTrigger(l,h);case pt.m0.State:return I.visitState(l,h);case pt.m0.Transition:return I.visitTransition(l,h);case pt.m0.Sequence:return I.visitSequence(l,h);case pt.m0.Group:return I.visitGroup(l,h);case pt.m0.Animate:return I.visitAnimate(l,h);case pt.m0.Keyframes:return I.visitKeyframes(l,h);case pt.m0.Style:return I.visitStyle(l,h);case pt.m0.Reference:return I.visitReference(l,h);case pt.m0.AnimateChild:return I.visitAnimateChild(l,h);case pt.m0.AnimateRef:return I.visitAnimateRef(l,h);case pt.m0.Query:return I.visitQuery(l,h);case pt.m0.Stagger:return I.visitStagger(l,h);default:throw function kt(I){return new v.OBp(3004,!1)}()}}function qr(I,l){return window.getComputedStyle(I)[l]}const ri=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Hr extends Mi{normalizePropertyName(l,h){return Nn(l)}normalizeStyleValue(l,h,y,O){let z="";const Oe=y.toString().trim();if(ri.has(h)&&0!==y&&"0"!==y)if("number"==typeof y)z="px";else{const Be=y.match(/^[+-]?[\d\.]+([a-z]*)$/);Be&&0==Be[1].length&&O.push(function an(I,l){return new v.OBp(3005,!1)}())}return Oe+z}}const T="*";const Vt=new Set(["true","1"]),Sr=new Set(["false","0"]);function St(I,l){const h=Vt.has(I)||Sr.has(I),y=Vt.has(l)||Sr.has(l);return(O,z)=>{let Oe=I==T||I==O,Be=l==T||l==z;return!Oe&&h&&"boolean"==typeof O&&(Oe=O?Vt.has(I):Sr.has(I)),!Be&&y&&"boolean"==typeof z&&(Be=z?Vt.has(l):Sr.has(l)),Oe&&Be}}const Ee=new RegExp("s*:selfs*,?","g");function U(I,l,h,y){return new V(I).build(l,h,y)}class V{constructor(l){this._driver=l}build(l,h,y){const O=new $e(h);return this._resetContextStyleTimingState(O),Gr(this,Br(l),O)}_resetContextStyleTimingState(l){l.currentQuerySelector="",l.collectedStyles=new Map,l.collectedStyles.set("",new Map),l.currentTime=0}visitTrigger(l,h){let y=h.queryCount=0,O=h.depCount=0;const z=[],Oe=[];return"@"==l.name.charAt(0)&&h.errors.push(function Yn(){return new v.OBp(3006,!1)}()),l.definitions.forEach(Be=>{if(this._resetContextStyleTimingState(h),Be.type==pt.m0.State){const xe=Be,mt=xe.name;mt.toString().split(/\s*,\s*/).forEach(gt=>{xe.name=gt,z.push(this.visitState(xe,h))}),xe.name=mt}else if(Be.type==pt.m0.Transition){const xe=this.visitTransition(Be,h);y+=xe.queryCount,O+=xe.depCount,Oe.push(xe)}else h.errors.push(function bn(){return new v.OBp(3007,!1)}())}),{type:pt.m0.Trigger,name:l.name,states:z,transitions:Oe,queryCount:y,depCount:O,options:null}}visitState(l,h){const y=this.visitStyle(l.styles,h),O=l.options&&l.options.params||null;if(y.containsDynamicStyles){const z=new Set,Oe=O||{};y.styles.forEach(Be=>{Be instanceof Map&&Be.forEach(xe=>{Xe(xe).forEach(mt=>{Oe.hasOwnProperty(mt)||z.add(mt)})})}),z.size&&h.errors.push(function Hn(I,l){return new v.OBp(3008,!1)}(0,z.values()))}return{type:pt.m0.State,name:l.name,style:y,options:O?{params:O}:null}}visitTransition(l,h){h.queryCount=0,h.depCount=0;const y=Gr(this,Br(l.animation),h),O=function st(I,l){const h=[];return"string"==typeof I?I.split(/\s*,\s*/).forEach(y=>function Z(I,l,h){if(":"==I[0]){const xe=function wt(I,l){switch(I){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(h,y)=>parseFloat(y)>parseFloat(h);case":decrement":return(h,y)=>parseFloat(y)<parseFloat(h);default:return l.push(function sr(I){return new v.OBp(3016,!1)}
1()),"* => *"}}(I,h);if("function"==typeof xe)return void l.push(xe);I=xe}const y=I.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==y||y.length<4)return h.push(function Jr(I){return new v.OBp(3015,!1)}()),l;const O=y[1],z=y[2],Oe=y[3];l.push(St(O,Oe)),"<"==z[0]&&(O!=T||Oe!=T)&&l.push(St(Oe,O))}(y,h,l)):h.push(I),h}(l.expr,h.errors);return{type:pt.m0.Transition,matchers:O,animation:y,queryCount:h.queryCount,depCount:h.depCount,options:rr(l.options)}}visitSequence(l,h){return{type:pt.m0.Sequence,steps:l.steps.map(y=>Gr(this,y,h)),options:rr(l.options)}}visitGroup(l,h){const y=h.currentTime;let O=0;const z=l.steps.map(Oe=>{h.currentTime=y;const Be=Gr(this,Oe,h);return O=Math.max(O,h.currentTime),Be});return h.currentTime=O,{type:pt.m0.Group,steps:z,options:rr(l.options)}}visitAnimate(l,h){const y=function In(I,l){if(I.hasOwnProperty("duration"))return I;if("number"==typeof I)return fr(Re(I,l).duration,0,"");const h=I;if(h.split(/\s+/).some(z=>"{"==z.charAt(0)&&"{"==z.charAt(1))){const z=fr(0,0,"");return z.dynamic=!0,z.strValue=h,z}const O=Re(h,l);return fr(O.duration,O.delay,O.easing)}(l.timings,h.errors);h.currentAnimateTimings=y;let O,z=l.styles?l.styles:(0,pt.wb)({});if(z.type==pt.m0.Keyframes)O=this.visitKeyframes(z,h);else{let Oe=l.styles,Be=!1;if(!Oe){Be=!0;const mt={};y.easing&&(mt.easing=y.easing),Oe=(0,pt.wb)(mt)}h.currentTime+=y.duration+y.delay;const xe=this.visitStyle(Oe,h);xe.isEmptyStep=Be,O=xe}return h.currentAnimateTimings=null,{type:pt.m0.Animate,timings:y,style:O,options:null}}visitStyle(l,h){const y=this._makeStyleAst(l,h);return this._validateStyleAst(y,h),y}_makeStyleAst(l,h){const y=[],O=Array.isArray(l.styles)?l.styles:[l.styles];for(let Be of O)"string"==typeof Be?Be===pt.AN?y.push(Be):h.errors.push(new v.OBp(3002,!1)):y.push(new Map(Object.entries(Be)));let z=!1,Oe=null;return y.forEach(Be=>{if(Be instanceof Map&&(Be.has("easing")&&(Oe=Be.get("easing"),Be.delete("easing")),!z))for(let xe of Be.values())if(xe.toString().indexOf("{{")>=0){z=!0;break}}),{type:pt.m0.Style,styles:y,easing:Oe,offset:l.offset,containsDynamicStyles:z,options:null}}_validateStyleAst(l,h){const y=h.currentAnimateTimings;let O=h.currentTime,z=h.currentTime;y&&z>0&&(z-=y.duration+y.delay),l.styles.forEach(Oe=>{"string"!=typeof Oe&&Oe.forEach((Be,xe)=>{const mt=h.collectedStyles.get(h.currentQuerySelector),gt=mt.get(xe);let vt=!0;gt&&(z!=O&&z>=gt.startTime&&O<=gt.endTime&&(h.errors.push(function gr(I,l,h,y,O){return new v.OBp(3010,!1)}()),vt=!1),z=gt.startTime),vt&&mt.set(xe,{startTime:z,endTime:O}),h.options&&function jr(I,l,h){const y=l.params||{},O=Xe(I);O.length&&O.forEach(z=>{y.hasOwnProperty(z)||h.push(function lt(I){return new v.OBp(3001,!1)}())})}(Be,h.options,h.errors)})})}visitKeyframes(l,h){const y={type:pt.m0.Keyframes,styles:[],options:null};if(!h.currentAnimateTimings)return h.errors.push(function Mr(){return new v.OBp(3011,!1)}()),y;let z=0;const Oe=[];let Be=!1,xe=!1,mt=0;const gt=l.steps.map(tn=>{const kn=this._makeStyleAst(tn,h);let Rn=null!=kn.offset?kn.offset:function Wt(I){if("string"==typeof I)return null;let l=null;if(Array.isArray(I))I.forEach(h=>{if(h instanceof Map&&h.has("offset")){const y=h;l=parseFloat(y.get("offset")),y.delete("offset")}});else if(I instanceof Map&&I.has("offset")){const h=I;l=parseFloat(h.get("offset")),h.delete("offset")}return l}(kn.styles),vr=0;return null!=Rn&&(z++,vr=kn.offset=Rn),xe=xe||vr<0||vr>1,Be=Be||vr<mt,mt=vr,Oe.push(vr),kn});xe&&h.errors.push(function Vr(){return new v.OBp(3012,!1)}()),Be&&h.errors.push(function Fr(){return new v.OBp(3200,!1)}());const vt=l.steps.length;let Gt=0;z>0&&z<vt?h.errors.push(function ti(){return new v.OBp(3202,!1)}()):0==z&&(Gt=1/(vt-1));const un=vt-1,fn=h.currentTime,Sn=h.currentAnimateTimings,Pn=Sn.duration;return gt.forEach((tn,kn)=>{const Rn=Gt>0?kn==un?1:Gt*kn:Oe[kn],vr=Rn*Pn;h.currentTime=fn+Sn.delay+vr,Sn.duration=vr,this._validateStyleAst(tn,h),tn.offset=Rn,y.styles.push(tn)}),y}visitReference(l,h){return{type:pt.m0.Reference,animation:Gr(this,Br(l.animation),h),options:rr(l.options)}}visitAnimateChild(l,h){return h.depCount++,{type:pt.m0.AnimateChild,options:rr(l.options)}}visitAnimateRef(l,h){return{type:pt.m0.AnimateRef,animation:this.visitReference(l.animation,h),options:rr(l.options)}}visitQuery(l,h){const y=h.currentQuerySelector,O=l.options||{};
vendor: 9,384 bytes, line 1
1h.queryCount++,h.currentQuery=l;const[z,Oe]=function ne(I){const l=!!I.split(/\s*,\s*/).find(h=>":self"==h);return l&&(I=I.replace(Ee,"")),I=I.replace(/@\*/g,Ii).replace(/@\w+/g,h=>Ii+"-"+h.slice(1)).replace(/:animating/g,on),[I,l]}(l.selector);h.currentQuerySelector=y.length?y+" "+z:z,tr(h.collectedStyles,h.currentQuerySelector,new Map);const Be=Gr(this,Br(l.animation),h);return h.currentQuery=null,h.currentQuerySelector=y,{type:pt.m0.Query,selector:z,limit:O.limit||0,optional:!!O.optional,includeSelf:Oe,animation:Be,originalSelector:l.selector,options:rr(l.options)}}visitStagger(l,h){h.currentQuery||h.errors.push(function Nr(){return new v.OBp(3013,!1)}());const y="full"===l.timings?{duration:0,delay:0,easing:"full"}:Re(l.timings,h.errors,!0);return{type:pt.m0.Stagger,animation:Gr(this,Br(l.animation),h),timings:y,options:null}}}class $e{constructor(l){this.errors=l,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function rr(I){return I?(I={...I}).params&&(I.params=function je(I){return I?{...I}:null}(I.params)):I={},I}function fr(I,l,h){return{duration:I,delay:l,easing:h}}function Xn(I,l,h,y,O,z,Oe=null,Be=!1){return{type:1,element:I,keyframes:l,preStyleProps:h,postStyleProps:y,duration:O,delay:z,totalTime:O+z,easing:Oe,subTimeline:Be}}class Rr{constructor(){this._map=new Map}get(l){return this._map.get(l)||[]}append(l,h){let y=this._map.get(l);y||this._map.set(l,y=[]),y.push(...h)}has(l){return this._map.has(l)}clear(){this._map.clear()}}const bs=new RegExp(":enter","g"),Gs=new RegExp(":leave","g");function Ns(I,l,h,y,O,z=new Map,Oe=new Map,Be,xe,mt=[]){return(new Ci).buildKeyframes(I,l,h,y,O,z,Oe,Be,xe,mt)}class Ci{buildKeyframes(l,h,y,O,z,Oe,Be,xe,mt,gt=[]){mt=mt||new Rr;const vt=new Nt(l,h,mt,O,z,gt,[]);vt.options=xe;const Gt=xe.delay?le(xe.delay):0;vt.currentTimeline.delayNextStep(Gt),vt.currentTimeline.setStyles([Oe],null,vt.errors,xe),Gr(this,y,vt);const un=vt.timelines.filter(fn=>fn.containsAnimation());if(un.length&&Be.size){let fn;for(let Sn=un.length-1;Sn>=0;Sn--){const Pn=un[Sn];if(Pn.element===h){fn=Pn;break}}fn&&!fn.allowOnlyTimelineStyles()&&fn.setStyles([Be],null,vt.errors,xe)}return un.length?un.map(fn=>fn.buildKeyframes()):[Xn(h,[],[],[],0,Gt,"",!1)]}visitTrigger(l,h){}visitState(l,h){}visitTransition(l,h){}visitAnimateChild(l,h){const y=h.subInstructions.get(h.element);if(y){const O=h.createSubContext(l.options),z=h.currentTimeline.currentTime,Oe=this._visitSubInstructions(y,O,O.options);z!=Oe&&h.transformIntoNewTimeline(Oe)}h.previousNode=l}visitAnimateRef(l,h){const y=h.createSubContext(l.options);y.transformIntoNewTimeline(),this._applyAnimationRefDelays([l.options,l.animation.options],h,y),this.visitReference(l.animation,y),h.transformIntoNewTimeline(y.currentTimeline.currentTime),h.previousNode=l}_applyAnimationRefDelays(l,h,y){for(const O of l){const z=O?.delay;if(z){const Oe="number"==typeof z?z:le(Tt(z,O?.params??{},h.errors));y.delayNextStep(Oe)}}}_visitSubInstructions(l,h,y){let z=h.currentTimeline.currentTime;const Oe=null!=y.duration?le(y.duration):null,Be=null!=y.delay?le(y.delay):null;return 0!==Oe&&l.forEach(xe=>{const mt=h.appendInstructionToTimeline(xe,Oe,Be);z=Math.max(z,mt.duration+mt.delay)}),z}visitReference(l,h){h.updateOptions(l.options,!0),Gr(this,l.animation,h),h.previousNode=l}visitSequence(l,h){const y=h.subContextCount;let O=h;const z=l.options;if(z&&(z.params||z.delay)&&(O=h.createSubContext(z),O.transformIntoNewTimeline(),null!=z.delay)){O.previousNode.type==pt.m0.Style&&(O.currentTimeline.snapshotCurrentStyles(),O.previousNode=Js);const Oe=le(z.delay);O.delayNextStep(Oe)}l.steps.length&&(l.steps.forEach(Oe=>Gr(this,Oe,O)),O.currentTimeline.applyStylesToKeyframe(),O.subContextCount>y&&O.transformIntoNewTimeline()),h.previousNode=l}visitGroup(l,h){const y=[];let O=h.currentTimeline.currentTime;const z=l.options&&l.options.delay?le(l.options.delay):0;l.steps.forEach(Oe=>{const Be=h.createSubContext(l.options);z&&Be.delayNextStep(z),Gr(this,Oe,Be),O=Math.max(O,Be.currentTimeline.currentTime),y.push(Be.currentTimeline)}),y.forEach(Oe=>h.currentTimeline.mergeTimelineCollectedStyles(Oe)),h.transformIntoNewTimeline(O),h.previousNode=l}_visitTiming(l,h){if(l.dynamic){const y=l.strValue;return Re(h.params?Tt(y,h.params,h.errors):y,h.errors)}return{duration:l.duration,delay:l.delay,easing:l.easing}}visitAnimate(l,h){const y=h.currentAnimateTimings=this._visitTiming(l.timings,h),O=h.currentTimeline;y.delay&&(h.incrementTime(y.delay),O.snapshotCurrentStyles());const z=l.style;z.type==pt.m0.Keyframes?this.visitKeyframes(z,h):(h.incrementTime(y.duration),this.visitStyle(z,h),O.applyStylesToKeyframe()),h.currentAnimateTimings=null,h.previousNode=l}visitStyle(l,h){const y=h.currentTimeline,O=h.currentAnimateTimings;!O&&y.hasCurrentStyleProperties()&&y.forwardFrame();const z=O&&O.easing||l.easing;l.isEmptyStep?y.applyEmptyStep(z):y.setStyles(l.styles,z,h.errors,h.options),h.previousNode=l}visitKeyframes(l,h){const y=h.currentAnimateTimings,O=h.currentTimeline.duration,z=y.duration,Be=h.createSubContext().currentTimeline;Be.easing=y.easing,l.styles.forEach(xe=>{Be.forwardTime((xe.offset||0)*z),Be.setStyles(xe.styles,xe.easing,h.errors,h.options),Be.applyStylesToKeyframe()}),h.currentTimeline.mergeTimelineCollectedStyles(Be),h.transformIntoNewTimeline(O+z),h.previousNode=l}visitQuery(l,h){const y=h.currentTimeline.currentTime,O=l.options||{},z=O.delay?le(O.delay):0;z&&(h.previousNode.type===pt.m0.Style||0==y&&h.currentTimeline.hasCurrentStyleProperties())&&(h.currentTimeline.snapshotCurrentStyles(),h.previousNode=Js);let Oe=y;const Be=h.invokeQuery(l.selector,l.originalSelector,l.limit,l.includeSelf,!!O.optional,h.errors);h.currentQueryTotal=Be.length;let xe=null;Be.forEach((mt,gt)=>{h.currentQueryIndex=gt;const vt=h.createSubContext(l.options,mt);z&&vt.delayNextStep(z),mt===h.element&&(xe=vt.currentTimeline),Gr(this,l.animation,vt),vt.currentTimeline.applyStylesToKeyframe(),Oe=Math.max(Oe,vt.currentTimeline.currentTime)}),h.currentQueryIndex=0,h.currentQueryTotal=0,h.transformIntoNewTimeline(Oe),xe&&(h.currentTimeline.mergeTimelineCollectedStyles(xe),h.currentTimeline.snapshotCurrentStyles()),h.previousNode=l}visitStagger(l,h){const y=h.parentContext,O=h.currentTimeline,z=l.timings,Oe=Math.abs(z.duration),Be=Oe*(h.currentQueryTotal-1);let xe=Oe*h.currentQueryIndex;switch(z.duration<0?"reverse":z.easing){case"reverse":xe=Be-xe;break;case"full":xe=y.currentStaggerTime}const gt=h.currentTimeline;xe&>.delayNextStep(xe);const vt=gt.currentTime;Gr(this,l.animation,h),h.previousNode=l,y.currentStaggerTime=O.currentTime-vt+(O.startTime-y.currentTimeline.startTime)}}const Js={};class Nt{constructor(l,h,y,O,z,Oe,Be,xe){this._driver=l,this.element=h,this.subInstructions=y,this._enterClassName=O,this._leaveClassName=z,this.errors=Oe,this.timelines=Be,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Js,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=xe||new $t(this._driver,h,0),Be.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(l,h){if(!l)return;const y=l;let O=this.options;null!=y.duration&&(O.duration=le(y.duration)),null!=y.delay&&(O.delay=le(y.delay));const z=y.params;if(z){let Oe=O.params;Oe||(Oe=this.options.params={}),Object.keys(z).forEach(Be=>{(!h||!Oe.hasOwnProperty(Be))&&(Oe[Be]=Tt(z[Be],Oe,this.errors))})}}_copyOptions(){const l={};if(this.options){const h=this.options.params;if(h){const y=l.params={};Object.keys(h).forEach(O=>{y[O]=h[O]})}}return l}createSubContext(l=null,h,y){const O=h||this.element,z=new Nt(this._driver,O,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(O,y||0));return z.previousNode=this.previousNode,z.currentAnimateTimings=this.currentAnimateTimings,z.options=this._copyOptions(),z.updateOptions(l),z.currentQueryIndex=this.currentQueryIndex,z.currentQueryTotal=this.currentQueryTotal,z.parentContext=this,this.subContextCount++,z}transformIntoNewTimeline(l){return this.previousNode=Js,this.currentTimeline=this.currentTimeline.fork(this.element,l),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(l,h,y){const O={duration:h??l.duration,delay:this.currentTimeline.currentTime+(y??0)+l.delay,easing:""},z=new Je(this._driver,l.element,l.keyframes,l.preStyleProps,l.postStyleProps,O,l.stretchStartingKeyframe);return this.timelines.push(z),O}incrementTime(l){this.currentTimeline.forwardTime(this.currentTimeline.duration+l)}delayNextStep(l){l>0&&this.currentTimeline.delayNextStep(l)}invokeQuery(l,h,y,O,z,Oe){let Be=[];if(O&&Be.push(this.element),l.length>0){l=(l=l.replace(bs,"."+this._enterClassName)).replace(Gs,"."+this._leaveClassName);let mt=this._driver.query(this.element,l,1!=y);0!==y&&(mt=y<0?mt.slice(mt.length+y,mt.length):mt.slice(0,y)),Be.push(...mt)}return!z&&0==Be.length&&Oe.push(function Kr(I){return new v.OBp(3014,!1)}()),Be}}class $t{constructor(l,h,y,O){this._driver=l,this.element=h,this.startTime=y,this._elementTimelineStylesLookup=O,this.duration=0,this.easing=null,this._previousKeyframe=ne
1w Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(h),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(h,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(l){const h=1===this._keyframes.size&&this._pendingStyles.size;this.duration||h?(this.forwardTime(this.currentTime+l),h&&this.snapshotCurrentStyles()):this.startTime+=l}fork(l,h){return this.applyStylesToKeyframe(),new $t(this._driver,l,h||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(l){this.applyStylesToKeyframe(),this.duration=l,this._loadKeyframe()}_updateStyle(l,h){this._localTimelineStyles.set(l,h),this._globalTimelineStyles.set(l,h),this._styleSummary.set(l,{time:this.currentTime,value:h})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(l){l&&this._previousKeyframe.set("easing",l);for(let[h,y]of this._globalTimelineStyles)this._backFill.set(h,y||pt.AN),this._currentKeyframe.set(h,pt.AN);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(l,h,y,O){h&&this._previousKeyframe.set("easing",h);const z=O&&O.params||{},Oe=function oe(I,l){const h=new Map;let y;return I.forEach(O=>{if("*"===O){y??=l.keys();for(let z of y)h.set(z,pt.AN)}else for(let[z,Oe]of O)h.set(z,Oe)}),h}(l,this._globalTimelineStyles);for(let[Be,xe]of Oe){const mt=Tt(xe,z,y);this._pendingStyles.set(Be,mt),this._localTimelineStyles.has(Be)||this._backFill.set(Be,this._globalTimelineStyles.get(Be)??pt.AN),this._updateStyle(Be,mt)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((l,h)=>{this._currentKeyframe.set(h,l)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((l,h)=>{this._currentKeyframe.has(h)||this._currentKeyframe.set(h,l)}))}snapshotCurrentStyles(){for(let[l,h]of this._localTimelineStyles)this._pendingStyles.set(l,h),this._updateStyle(l,h)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const l=[];for(let h in this._currentKeyframe)l.push(h);return l}
1mergeTimelineCollectedStyles(l){l._styleSummary.forEach((h,y)=>{const O=this._styleSummary.get(y);(!O||h.time>O.time)&&this._updateStyle(y,h.value)})}buildKeyframes(){this.applyStylesToKeyframe();const l=new Set,h=new Set,y=1===this._keyframes.size&&0===this.duration;let O=[];this._keyframes.forEach((Be,xe)=>{const mt=new Map([...this._backFill,...Be]);mt.forEach((gt,vt)=>{gt===pt.aM?l.add(vt):gt===pt.AN&&h.add(vt)}),y||mt.set("offset",xe/this.duration),O.push(mt)});const z=[...l.values()],Oe=[...h.values()];if(y){const Be=O[0],xe=new Map(Be);Be.set("offset",0),xe.set("offset",1),O=[Be,xe]}return Xn(this.element,O,z,Oe,this.duration,this.startTime,this.easing,!1)}}class Je extends $t{constructor(l,h,y,O,z,Oe,Be=!1){super(l,h,Oe.delay),this.keyframes=y,this.preStyleProps=O,this.postStyleProps=z,this._stretchStartingKeyframe=Be,this.timings={duration:Oe.duration,delay:Oe.delay,easing:Oe.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let l=this.keyframes,{delay:h,duration:y,easing:O}=this.timings;if(this._stretchStartingKeyframe&&h){const z=[],Oe=y+h,Be=h/Oe,xe=new Map(l[0]);xe.set("offset",0),z.push(xe);const mt=new Map(l[0]);mt.set("offset",be(Be)),z.push(mt);const gt=l.length-1;for(let vt=1;vt<=gt;vt++){let Gt=new Map(l[vt]);const un=Gt.get("offset");Gt.set("offset",be((h+un*y)/Oe)),z.push(Gt)}y=Oe,h=0,O="",l=z}return Xn(this.element,l,this.preStyleProps,this.postStyleProps,y,h,O,!0)}}function be(I,l=3){const h=Math.pow(10,l-1);return Math.round(I*h)/h}function qe(I,l,h,y,O,z,Oe,Be,xe,mt,gt,vt,Gt){return{type:0,element:I,triggerName:l,isRemovalTransition:O,fromState:h,fromStyles:z,toState:y,toStyles:Oe,timelines:Be,queriedElements:xe,preStyleProps:mt,postStyleProps:gt,totalTime:vt,errors:Gt}}const Me={};class Ce{constructor(l,h,y){this._triggerName=l,this.ast=h,this._stateStyles=y}match(l,h,y,O){return function tt(I,l,h,y,O){return I.some(z=>z(l,h,y,O))}(this.ast.matchers,l,h,y,O)}buildStyles(l,h,y){let O=this._stateStyles.get("*");return void 0!==l&&(O=this._stateStyles.get(l?.toString())||O),O?O.buildStyles(h,y):new Map}build(l,h,y,O,z,Oe,Be,xe,mt,gt){const vt=[],Gt=this.ast.options&&this.ast.options.params||Me,fn=this.buildStyles(y,Be&&Be.params||Me,vt),Sn=xe&&xe.params||Me,Pn=this.buildStyles(O,Sn,vt),tn=new Set,kn=new Map,Rn=new Map,vr="void"===O,hi={params:Et(Sn,Gt),delay:this.ast.options?.delay},ui=gt?[]:Ns(l,h,this.ast.animation,z,Oe,fn,Pn,hi,mt,vt);let Ri=0;return ui.forEach(ni=>{Ri=Math.max(ni.duration+ni.delay,Ri)}),vt.length?qe(h,this._triggerName,y,O,vr,fn,Pn,[],[],kn,Rn,Ri,vt):(ui.forEach(ni=>{const Qr=ni.element,Zr=tr(kn,Qr,new Set);ni.preStyleProps.forEach($r=>Zr.add($r));const Si=tr(Rn,Qr,new Set);ni.postStyleProps.forEach($r=>Si.add($r)),Qr!==h&&tn.add(Qr)}),qe(h,this._triggerName,y,O,vr,fn,Pn,ui,[...tn.values()],kn,Rn,Ri))}}function Et(I,l){const h={...l};return Object.entries(I).forEach(([y,O])=>{null!=O&&(h[y]=O)}),h}class Vn{constructor(l,h,y){this.styles=l,this.defaultParams=h,this.normalizer=y}buildStyles(l,h){const y=new Map,O=Et(l,this.defaultParams);return this.styles.styles.forEach(z=>{"string"!=typeof z&&z.forEach((Oe,Be)=>{Oe&&(Oe=Tt(Oe,O,h));const xe=this.normalizer.normalizePropertyName(Be,h);Oe=this.normalizer.normalizeStyleValue(Be,xe,Oe,h),y.set(Be,Oe)})}),y}}class Jn{constructor(l,h,y){this.name=l,this.ast=h,this._normalizer=y,this.transitionFactories=[],this.states=new Map,h.states.forEach(O=>{this.states.set(O.name,new Vn(O.style,O.options&&O.options.params||{},y))}),Gi(this.states,"true","1"),Gi(this.states,"false","0"),h.transitions.forEach(O=>{this.transitionFactories.push(new Ce(l,O,this.states))}),this.fallbackTransition=function ar(I,l,h){return new Ce(I,{type:pt.m0.Transition,animation:{type:pt.m0.Sequence,steps:[],options:null},matchers:[(Oe,Be)=>!0],options:null,queryCount:0,depCount:0},l)}(l,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(l,h,y,O){return this.transitionFactories.find(Oe=>Oe.match(l,h,y,O))||null}matchStyles(l,h,y){return this.fallbackTransition.buildStyles(l,h,y)}}function Gi(I,l,h){I.has(l)?I.has(h)||I.set(h,I.get(l)):I.has(h)&&I.set(l,I.get(h))}const zi=new Rr;class is{constructor(l,h,y){this.bodyNode=l,this._driver=h,this._normalizer=y,this._animations=new Map,this._playersById=new Map,this.players=[]}register(l,h){const y=[],z=U(this._driver,h,y,[]);if(y.length)throw function ut(I){return new v.OBp(3503,!1)}();this._animations.set(l,z)}_buildPlayer(l,h,y){const O=l.element,z=dn(this._normalizer,l.keyframes,h,y);return this._driver.animate(O,z,l.duration,l.delay,l.easing,[],!0)}create(l,h,y={}){const O=[],z=this._animations.get(l);let Oe;const Be=new Map;if(z?(Oe=Ns(this._driver,h,z,kr,si,new Map,new Map,y,zi,O),Oe.forEach(gt=>{const vt=tr(Be,gt.element,new Map);gt.postStyleProps.forEach(Gt=>vt.set(Gt,null))})):(O.push(function Xt(){return new v.OBp(3300,!1)}()),Oe=[]),O.length)throw function wn(I){return new v.OBp(3504,!1)}();Be.forEach((gt,vt)=>{gt.forEach((Gt,un)=>{gt.set(un,this._driver.computeStyle(vt,un,pt.AN))})});const mt=ft(Oe.map(gt=>{const vt=Be.get(gt.element);return this._buildPlayer(gt,new Map,vt)}));return this._playersById.set(l,mt),mt.onDestroy(()=>this.destroy(l)),this.players.push(mt),mt}destroy(l){const h=this._getPlayer(l);h.destroy(),this._playersById.delete(l);const y=this.players.indexOf(h);y>=0&&this.players.splice(y,1)}_getPlayer(l){const h=this._playersById.get(l);if(!h)throw function dr(I){return new v.OBp(3301,!1)}();return h}listen(l,h,y,O){const z=mr(h,"","","");return Tn(this._getPlayer(l),y,z,O),()=>{}}command(l,h,y,O){if("register"==y)return void this.register(l,O[0]);if("create"==y)return void this.create(l,h,O[0]||{});const z=this._getPlayer(l);switch(y){case"play":z.play();break;case"pause":z.pause();break;case"reset":z.reset();break;case"restart":z.restart();break;case"finish":z.finish();break;case"init":z.init();break;case"setPosition":z.setPosition(parseFloat(O[0]));break;
vendor: 26,190 bytes, line 1
1case"destroy":this.destroy(l)}}}const es="ng-animate-queued",hs="ng-animate-disabled",Bt=[],Qn={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},cr={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Or="__ng_removed";class ii{get params(){return this.options.params}constructor(l,h=""){this.namespaceId=h;const y=l&&l.hasOwnProperty("value");if(this.value=function Un(I){return I??null}(y?l.value:l),y){const{value:z,...Oe}=l;this.options=Oe}else this.options={};this.options.params||(this.options.params={})}absorbOptions(l){const h=l.params;if(h){const y=this.options.params;Object.keys(h).forEach(O=>{null==y[O]&&(y[O]=h[O])})}}}const fi="void",Fi=new ii(fi);class Ge{constructor(l,h,y){this.id=l,this.hostElement=h,this._engine=y,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+l,Us(h,this._hostClassName)}listen(l,h,y,O){if(!this._triggers.has(h))throw function vn(I,l){return new v.OBp(3302,!1)}();if(null==y||0==y.length)throw function jt(I){return new v.OBp(3303,!1)}();if(!function Ti(I){return"start"==I||"done"==I}(y))throw function Ct(I,l){return new v.OBp(3400,!1)}();const z=tr(this._elementListeners,l,[]),Oe={name:h,phase:y,callback:O};z.push(Oe);const Be=tr(this._engine.statesByElement,l,new Map);return Be.has(h)||(Us(l,oi),Us(l,oi+"-"+h),Be.set(h,Fi)),()=>{this._engine.afterFlush(()=>{const xe=z.indexOf(Oe);xe>=0&&z.splice(xe,1),this._triggers.has(h)||Be.delete(h)})}}register(l,h){return!this._triggers.has(l)&&(this._triggers.set(l,h),!0)}_getTrigger(l){const h=this._triggers.get(l);if(!h)throw function Mt(I){return new v.OBp(3401,!1)}();return h}trigger(l,h,y,O=!0){const z=this._getTrigger(h),Oe=new he(this.id,h,l);let Be=this._engine.statesByElement.get(l);Be||(Us(l,oi),Us(l,oi+"-"+h),this._engine.statesByElement.set(l,Be=new Map));let xe=Be.get(h);const mt=new ii(y,this.id);if(!(y&&y.hasOwnProperty("value"))&&xe&&mt.absorbOptions(xe.options),Be.set(h,mt),xe||(xe=Fi),mt.value!==fi&&xe.value===mt.value){if(!function ra(I,l){const h=Object.keys(I),y=Object.keys(l);if(h.length!=y.length)return!1;for(let O=0;O<h.length;O++){const z=h[O];if(!l.hasOwnProperty(z)||I[z]!==l[z])return!1}return!0}(xe.params,mt.params)){const Sn=[],Pn=z.matchStyles(xe.value,xe.params,Sn),tn=z.matchStyles(mt.value,mt.params,Sn);Sn.length?this._engine.reportError(Sn):this._engine.afterFlush(()=>{br(l,Pn),Mn(l,tn)})}return}const Gt=tr(this._engine.playersByElement,l,[]);Gt.forEach(Sn=>{Sn.namespaceId==this.id&&Sn.triggerName==h&&Sn.queued&&Sn.destroy()});let un=z.matchTransition(xe.value,mt.value,l,mt.params),fn=!1;if(!un){if(!O)return;un=z.fallbackTransition,fn=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:l,triggerName:h,transition:un,fromState:xe,toState:mt,player:Oe,isFallbackTransition:fn}),fn||(Us(l,es),Oe.onStart(()=>{as(l,es)})),Oe.onDone(()=>{let Sn=this.players.indexOf(Oe);Sn>=0&&this.players.splice(Sn,1);const Pn=this._engine.playersByElement.get(l);if(Pn){let tn=Pn.indexOf(Oe);tn>=0&&Pn.splice(tn,1)}}),this.players.push(Oe),Gt.push(Oe),Oe}deregister(l){this._triggers.delete(l),this._engine.statesByElement.forEach(h=>h.delete(l)),this._elementListeners.forEach((h,y)=>{this._elementListeners.set(y,h.filter(O=>O.name!=l))})}clearElementCache(l){this._engine.statesByElement.delete(l),this._elementListeners.delete(l);const h=this._engine.playersByElement.get(l);h&&(h.forEach(y=>y.destroy()),this._engine.playersByElement.delete(l))}_signalRemovalForInnerTriggers(l,h){const y=this._engine.driver.query(l,Ii,!0);y.forEach(O=>{if(O[Or])return;const z=this._engine.fetchNamespacesByElement(O);z.size?z.forEach(Oe=>Oe.triggerLeaveAnimation(O,h,!1,!0)):this.clearElementCache(O)}),this._engine.afterFlushAnimationsDone(()=>y.forEach(O=>this.clearElementCache(O)))}triggerLeaveAnimation(l,h,y,O){const z=this._engine.statesByElement.get(l),Oe=new Map;if(z){const Be=[];if(z.forEach((xe,mt)=>{if(Oe.set(mt,xe.value),this._triggers.has(mt)){const gt=this.trigger(l,mt,fi,O);gt&&Be.push(gt)}}),Be.length)return this._engine.markElementAsRemoved(this.id,l,!0,h,Oe),y&&ft(Be).onDone(()=>this._engine.processLeaveNode(l)),!0}return!1}prepareLeaveAnimationListeners(l){const h=this._elementListeners.get(l),y=this._engine.statesByElement.get(l);if(h&&y){const O=new Set;h.forEach(z=>{const Oe=z.name;if(O.has(Oe))return;O.add(Oe);const xe=this._triggers.get(Oe).fallbackTransition,mt=y.get(Oe)||Fi,gt=new ii(fi),vt=new he(this.id,Oe,l);this._engine.totalQueuedPlayers++,this._queue.push({element:l,triggerName:Oe,transition:xe,fromState:mt,toState:gt,player:vt,isFallbackTransition:!0})})}}removeNode(l,h){const y=this._engine;if(l.childElementCount&&this._signalRemovalForInnerTriggers(l,h),this.triggerLeaveAnimation(l,h,!0))return;let O=!1;if(y.totalAnimations){const z=y.players.length?y.playersByQueriedElement.get(l):[];if(z&&z.length)O=!0;else{let Oe=l;for(;Oe=Oe.parentNode;)if(y.statesByElement.get(Oe)){O=!0;break}}}if(this.prepareLeaveAnimationListeners(l),O)y.markElementAsRemoved(this.id,l,!1,h);else{const z=l[Or];(!z||z===Qn)&&(y.afterFlush(()=>this.clearElementCache(l)),y.destroyInnerAnimations(l),y._onRemovalComplete(l,h))}}insertNode(l,h){Us(l,this._hostClassName)}drainQueuedTransitions(l){const h=[];return this._queue.forEach(y=>{const O=y.player;if(O.destroyed)return;const z=y.element,Oe=this._elementListeners.get(z);Oe&&Oe.forEach(Be=>{if(Be.name==y.triggerName){const xe=mr(z,y.triggerName,y.fromState.value,y.toState.value);xe._data=l,Tn(y.player,Be.phase,xe,Be.callback)}}),O.markedForDestroy?this._engine.afterFlush(()=>{O.destroy()}):h.push(y)}),this._queue=[],h.sort((y,O)=>{const z=y.transition.ast.depCount,Oe=O.transition.ast.depCount;return 0==z||0==Oe?z-Oe:this._engine.driver.containsElement(y.element,O.element)?1:-1})}destroy(l){this.players.forEach(h=>h.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,l)}}class ze{_onRemovalComplete(l,h){this.onRemovalComplete(l,h)}constructor(l,h,y,O){this.bodyNode=l,this.driver=h,this._normalizer=y,this.scheduler=O,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(z,Oe)=>{}}get queuedPlayers(){const l=[];return this._namespaceList.forEach(h=>{h.players.forEach(y=>{y.queued&&l.push(y)})}),l}createNamespace(l,h){const y=new Ge(l,h,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,h)?this._balanceNamespaceList(y,h):(this.newHostElements.set(h,y),this.collectEnterElement(h)),this._namespaceLookup[l]=y}_balanceNamespaceList(l,h){const y=this._namespaceList,O=this.namespacesByHostElement;if(y.length-1>=0){let Oe=!1,Be=this.driver.getParentElement(h);for(;Be;){const xe=O.get(Be);if(xe){const mt=y.indexOf(xe);y.splice(mt+1,0,l),Oe=!0;break}Be=this.driver.getParentElement(Be)}Oe||y.unshift(l)}else y.push(l);return O.set(h,l),l}register(l,h){let y=this._namespaceLookup[l];return y||(y=this.createNamespace(l,h)),y}registerTrigger(l,h,y){let O=this._namespaceLookup[l];O&&O.register(h,y)&&this.totalAnimations++}destroy(l,h){l&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const y=this._fetchNamespace(l);this.namespacesByHostElement.delete(y.hostElement);const O=this._namespaceList.indexOf(y);O>=0&&this._namespaceList.splice(O,1),y.destroy(h),delete this._namespaceLookup[l]}))}_fetchNamespace(l){return this._namespaceLookup[l]}fetchNamespacesByElement(l){const h=new Set,y=this.statesByElement.get(l);if(y)for(let O of y.values())if(O.namespaceId){const z=this._fetchNamespace(O.namespaceId);z&&h.add(z)}return h}trigger(l,h,y,O){if(bi(h)){const z=this._fetchNamespace(l);if(z)return z.trigger(h,y,O),!0}return!1}insertNode(l,h,y,O){if(!bi(h))return;const z=h[Or];if(z&&z.setForRemoval){z.setForRemoval=!1,z.setForMove=!0;const Oe=this.collectedLeaveElements.indexOf(h);Oe>=0&&this.collectedLeaveElements.splice(Oe,1)}if(l){const Oe=this._fetchNamespace(l);Oe&&Oe.insertNode(h,y)}O&&this.collectEnterElement(h)}collectEnterElement(l){this.collectedEnterElements.push(l)}markElementAsDisabled(l,h){h?this.disabledNodes.has(l)||(this.disabledNodes.add(l),Us(l,hs)):this.disabledNodes.has(l)&&(this.disabledNodes.delete(l),as(l,hs))}removeNode(l,h,y){if(bi(h)){this.scheduler?.notify();const O=l?this._fetchNamespace(l):null;O?O.removeNode(h,y):this.markElementAsRemoved(l,h,!1,y);const z=this.namespacesByHostElement.get(h);z&&z.id!==l&&z.removeNode(h,y)}else this._onRemovalComplete(h,y)}markElementAsRemoved(l,h,y,O,z){this.collectedLeaveElements.push(h),h[Or]={namespaceId:l,setForRemoval:O,hasAnimation:y,removedBeforeQueried:!1,previousTriggersValues:z}}listen(l,h,y,O,z){return bi(h)?this._fetchNamespace(l).listen(h,y,O,z):()=>{}}_buildInstruction(l,h,y,O,z){return l.transition.build(this.driver,l.element,l.fromState.value,l.toState.value,y,O,l.fromState.options,l.toState.options,h,z)}destroyInnerAnimations(l){let h=this.driver.query(l,Ii,!0);h.forEach(y=>this.destroyActiveAnimationsForElement(y)),0!=this.playersByQueriedElement.size&&(h=this.driver.query(l,on,!0),h.forEach(y=>this.finishActiveQueriedAnimationOnElement(y)))}destroyActiveAnimationsForElement(l){const h=this.playersByElement.get(l);h&&h.forEach(y=>{y.queued?y.markedForDestroy=!0:y.destroy()})}finishActiveQueriedAnimationOnElement(l){const h=this.playersByQueriedElement.get(l);h&&h.forEach(y=>y.finish())}whenRenderingDone(){return new Promise(l=>{if(this.players.length)return ft(this.players).onDone(()=>l());l()})}processLeaveNode(l){const h=l[Or];if(h&&h.setForRemoval){if(l[Or]=Qn,h.namespaceId){this.destroyInnerAnimations(l);const y=this._fetchNamespace(h.namespaceId);y&&y.clearElementCache(l)}this._onRemovalComplete(l,h.setForRemoval)}l.classList?.contains(hs)&&this.markElementAsDisabled(l,!1),this.driver.query(l,".ng-animate-disabled",!0).forEach(y=>{this.markElementAsDisabled(y,!1)})}flush(l=-1){let h=[];if(this.newHostElements.size&&(this.newHostElements.forEach((y,O)=>this._balanceNamespaceList(y,O)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let y=0;y<this.collectedEnterElements.length;y++)Us(this.collectedEnterElements[y],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const y=[];try{h=this._flushAnimations(y,l)}finally{for(let O=0;O<y.length;O++)y[O]()}}else for(let y=0;y<this.collectedLeaveElements.length;y++)this.processLeaveNode(this.collectedLeaveElements[y]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(y=>y()),this._flushFns=[],this._whenQuietFns.length){const y=this._whenQuietFns;this._whenQuietFns=[],h.length?ft(h).onDone(()=>{y.forEach(O=>O())}):y.forEach(O=>O())}}reportError(l){throw function Ze(I){return new v.OBp(3402,!1)}()}_flushAnimations(l,h){const y=new Rr,O=[],z=new Map,Oe=[],Be=new Map,xe=new Map,mt=new Map,gt=new Set;this.disabledNodes.forEach(ci=>{gt.add(ci);const Ui=this.driver.query(ci,".ng-animate-queued",!0);for(let Dr=0;Dr<Ui.length;Dr++)gt.add(Ui[Dr])});const vt=this.bodyNode,Gt=Array.from(this.statesByElement.keys()),un=ks(Gt,this.collectedEnterElements),fn=new Map;let Sn=0;un.forEach((ci,Ui)=>{const Dr=kr+Sn++;fn.set(Ui,Dr),ci.forEach(ai=>Us(ai,Dr))});const Pn=[],tn=new Set,kn=new Set;for(let ci=0;ci<this.collectedLeaveElements.length;ci++){const Ui=this.collectedLeaveElements[ci],Dr=Ui[Or];Dr&&Dr.setForRemoval&&(Pn.push(Ui),tn.add(Ui),Dr.hasAnimation?this.driver.query(Ui,".ng-star-inserted",!0).forEach(ai=>tn.add(ai)):kn.add(Ui))}const Rn=new Map,vr=ks(Gt,Array.from(tn));vr.forEach((ci,Ui)=>{const Dr=si+Sn++;Rn.set(Ui,Dr),ci.forEach(ai=>Us(ai,Dr))}),l.push(()=>{un.forEach((ci,Ui)=>{const Dr=fn.get(Ui);ci.forEach(ai=>as(ai,Dr))}),vr.forEach((ci,Ui)=>{const Dr=Rn.get(Ui);ci.forEach(ai=>as(ai,Dr))}),Pn.forEach(ci=>{this.processLeaveNode(ci)})});const hi=[],ui=[];for(let ci=this._namespaceList.length-1;ci>=0;ci--)this._namespaceList[ci].drainQueuedTransitions(h).forEach(Dr=>{const ai=Dr.player,Ei=Dr.element;if(hi.push(ai),this.collectedEnterElements.length){const $s=Ei[Or];if($s&&$s.setForMove){if($s.previousTriggersValues&&$s.previousTriggersValues.has(Dr.triggerName)){const Yo=$s.previousTriggersValues.get(Dr.triggerName),wa=this.statesByElement.get(Dr.element);if(wa&&wa.has(Dr.triggerName)){const nu=wa.get(Dr.triggerName);nu.value=Yo,wa.set(Dr.triggerName,nu)}}return void ai.destroy()}}const Bi=!vt||!this.driver.containsElement(vt,Ei),Ys=Rn.get(Ei),rs=fn.get(Ei),gs=this._buildInstruction(Dr,y,rs,Ys,Bi);if(gs.errors&&gs.errors.length)return void ui.push(gs);if(Bi)return ai.onStart(()=>br(Ei,gs.fromStyles)),ai.onDestroy(()=>Mn(Ei,gs.toStyles)),void O.push(ai);if(Dr.isFallbackTransition)return ai.onStart(()=>br(Ei,gs.fromStyles)),ai.onDestroy(()=>Mn(Ei,gs.toStyles)),void O.push(ai);const Ko=[];gs.timelines.forEach($s=>{$s.stretchStartingKeyframe=!0,this.disabledNodes.has($s.element)||Ko.push($s)}),gs.timelines=Ko,y.append(Ei,gs.timelines),Oe.push({instruction:gs,player:ai,element:Ei}),gs.queriedElements.forEach($s=>tr(Be,$s,[]).push(ai)),gs.preStyleProps.forEach(($s,Yo)=>{if($s.size){let wa=xe.get(Yo);wa||xe.set(Yo,wa=new Set),$s.forEach((nu,Qa)=>wa.add(Qa))}}),gs.postStyleProps.forEach(($s,Yo)=>{let wa=mt.get(Yo);wa||mt.set(Yo,wa=new Set),$s.forEach((nu,Qa)=>wa.add(Qa))})});if(ui.length){const ci=[];ui.forEach(Ui=>{ci.push(function Zt(I,l){return new v.OBp(3505,!1)}())}),hi.forEach(Ui=>Ui.destroy()),this.reportError(ci)}const Ri=new Map,ni=new Map;Oe.forEach(ci=>{const Ui=ci.element;y.has(Ui)&&(ni.set(Ui,Ui),this._beforeAnimationBuild(ci.player.namespaceId,ci.instruction,Ri))}),O.forEach(ci=>{const Ui=ci.element;this._getPreviousPlayers(Ui,!1,ci.namespaceId,ci.triggerName,null).forEach(ai=>{tr(Ri,Ui,[]).push(ai),ai.destroy()})});const Qr=Pn.filter(ci=>qo(ci,xe,mt)),Zr=new Map;Ms(Zr,this.driver,kn,mt,pt.AN).forEach(ci=>{qo(ci,xe,mt)&&Qr.push(ci)});const $r=new Map;un.forEach((ci,Ui)=>{Ms($r,this.driver,new Set(ci),xe,pt.aM)}),Qr.forEach(ci=>{const Ui=Zr.get(ci),Dr=$r.get(ci);Zr.set(ci,new Map([...Ui?.entries()??[],...Dr?.entries()??[]]))});const Kn=[],yr=[],gi={};Oe.forEach(ci=>{const{element:Ui,player:Dr,instruction:ai}=ci;if(y.has(Ui)){if(gt.has(Ui))return Dr.onDestroy(()=>Mn(Ui,ai.toStyles)),Dr.disabled=!0,Dr.overrideTotalTime(ai.totalTime),void O.push(Dr);let Ei=gi;if(ni.size>1){let Ys=Ui;const rs=[];for(;Ys=Ys.parentNode;){const gs=ni.get(Ys);if(gs){Ei=gs;break}rs.push(Ys)}rs.forEach(gs=>ni.set(gs,Ei))}const Bi=this._buildAnimation(Dr.namespaceId,ai,Ri,z,$r,Zr);if(Dr.setRealPlayer(Bi),Ei===gi)Kn.push(Dr);else{const Ys=this.playersByElement.get(Ei);Ys&&Ys.length&&(Dr.parentPlayer=ft(Ys)),O.push(Dr)}}else br(Ui,ai.fromStyles),Dr.onDestroy(()=>Mn(Ui,ai.toStyles)),yr.push(Dr),gt.has(Ui)&&O.push(Dr)}),yr.forEach(ci=>{const Ui=z.get(ci.element);if(Ui&&Ui.length){const Dr=ft(Ui);ci.setRealPlayer(Dr)}}),O.forEach(ci=>{ci.parentPlayer?ci.syncPlayerEvents(ci.parentPlayer):ci.destroy()});for(let ci=0;ci<Pn.length;ci++){const Ui=Pn[ci],Dr=Ui[Or];if(as(Ui,si),Dr&&Dr.hasAnimation)continue;let ai=[];if(Be.size){let Bi=Be.get(Ui);Bi&&Bi.length&&ai.push(...Bi);let Ys=this.driver.query(Ui,on,!0);for(let rs=0;rs<Ys.length;rs++){let gs=Be.get(Ys[rs]);gs&&gs.length&&ai.push(...gs)}}const Ei=ai.filter(Bi=>!Bi.destroyed);Ei.length?vo(this,Ui,Ei):this.processLeaveNode(Ui)}return Pn.length=0,Kn.forEach(ci=>{this.players.push(ci),ci.onDone(()=>{ci.destroy();const Ui=this.players.indexOf(ci);this.players.splice(Ui,1)}),ci.play()}),Kn}afterFlush(l){this._flushFns.push(l)}afterFlushAnimationsDone(l){this._whenQuietFns.push(l)}_getPreviousPlayers(l,h,y,O,z){let Oe=[];if(h){const Be=this.playersByQueriedElement.get(l);Be&&(Oe=Be)}else{const Be=this.playersByElement.get(l);if(Be){const xe=!z||z==fi;Be.forEach(mt=>{mt.queued||!xe&&mt.triggerName!=O||Oe.push(mt)})}}return(y||O)&&(Oe=Oe.filter(Be=>!(y&&y!=Be.namespaceId||O&&O!=Be.triggerName))),Oe}_beforeAnimationBuild(l,h,y){const z=h.element,Oe=h.isRemovalTransition?void 0:l,Be=h.isRemovalTransition?void 0:h.triggerName;for(const xe of h.timelines){const mt=xe.element,gt=mt!==z,vt=tr(y,mt,[]);this._getPreviousPlayers(mt,gt,Oe,Be,h.toState).forEach(un=>{const fn=un.getRealPlayer();fn.beforeDestroy&&fn.beforeDestroy(),un.destroy(),vt.push(un)})}br(z,h.fromStyles)}_buildAnimation(l,h,y,O,z,Oe){const Be=h.triggerName,xe=h.element,mt=[],gt=new Set,vt=new Set,Gt=h.timelines.map(fn=>{const Sn=fn.element;gt.add(Sn);const Pn=Sn[Or];if(Pn&&Pn.removedBeforeQueried)return new pt.kP(fn.duration,fn.delay);const tn=Sn!==xe,kn=function No(I){const l=[];return ss(I,l),l}((y.get(Sn)||Bt).map(Ri=>Ri.getRealPlayer())).filter(Ri=>!!Ri.element&&Ri.element===Sn),Rn=z.get(Sn),vr=Oe.get(Sn),hi=dn(this._normalizer,fn.keyframes,Rn,vr),ui=this._buildPlayer(fn,hi,kn);if(fn.subTimeline&&O&&vt.add(Sn),tn){const Ri=new he(l,Be,Sn);Ri.setRealPlayer(ui),mt.push(Ri)}return ui});mt.forEach(fn=>{tr(this.playersByQueriedElement,fn.element,[]).push(fn),fn.onDone(()=>function Ft(I,l,h){let y=I.get(l);if(y){if(y.length){const O=y.indexOf(h);y.splice(O,1)}0==y.length&&I.delete(l)}return y}(this.playersByQueriedElement,fn.element,fn))}),gt.forEach(fn=>Us(fn,yi));const un=ft(Gt);return un.onDestroy(()=>{gt.forEach(fn=>as(fn,yi)),Mn(xe,h.toStyles)}),vt.forEach(fn=>{tr(O,fn,[]).push(un)}),un}_buildPlayer(l,h,y){return h.length>0?this.driver.animate(l.element,h,l.duration,l.delay,l.easing,y):new pt.kP(l.duration,l.delay)}}class he{constructor(l,h,y){this.namespaceId=l,this.triggerName=h,this.element=y,this._player=new pt.kP,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(l){this._containsRealPlayer||(this._player=l,this._queuedCallbacks.forEach((h,y)=>{h.forEach(O=>Tn(l,y,void 0,O))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(l.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(l){this.totalTime=l}syncPlayerEvents(l){const h=this._player;h.triggerCallback&&l.onStart(()=>h.triggerCallback("start")),l.onDone(()=>this.finish()),l.onDestroy(()=>this.destroy())}_queueEvent(l,h){tr(this._queuedCallbacks,l,[]).push(h)}onDone(l){this.queued&&this._queueEvent("done",l),this._player.onDone(l)}onStart(l){this.queued&&this._queueEvent("start",l),this._player.onStart(l)}onDestroy(l){this.queued&&this._queueEvent("destroy",l),this._player.onDestroy(l)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(l){this.queued||this._player.setPosition(l)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(l){const h=this._player;h.triggerCallback&&h.triggerCallback(l)}}function bi(I){return I&&1===I.nodeType}function us(I,l){const h=I.style.display;return I.style.display=l??"none",h}function Ms(I,l,h,y,O){const z=[];h.forEach(xe=>z.push(us(xe)));const Oe=[];y.forEach((xe,mt)=>{const gt=new Map;xe.forEach(vt=>{const Gt=l.computeStyle(mt,vt,O);gt.set(vt,Gt),(!Gt||0==Gt.length)&&(mt[Or]=cr,Oe.push(mt))}),I.set(mt,gt)});let Be=0;return h.forEach(xe=>us(xe,z[Be++])),Oe}function ks(I,l){const h=new Map;if(I.forEach(Be=>h.set(Be,[])),0==l.length)return h;const O=new Set(l),z=new Map;function Oe(Be){if(!Be)return 1;let xe=z.get(Be);if(xe)return xe;const mt=Be.parentNode;return xe=h.has(mt)?mt:O.has(mt)?1:Oe(mt),z.set(Be,xe),xe}return l.forEach(Be=>{const xe=Oe(Be);1!==xe&&h.get(xe).push(Be)}),h}function Us(I,l){I.classList?.add(l)}function as(I,l){I.classList?.remove(l)}function vo(I,l,h){ft(h).onDone(()=>I.processLeaveNode(l))}function ss(I,l){for(let h=0;h<I.length;h++){const y=I[h];y instanceof pt.Wq?ss(y.players,l):l.push(y)}}function qo(I,l,h){const y=h.get(I);if(!y)return!1;let O=l.get(I);return O?y.forEach(z=>O.add(z)):l.set(I,y),h.delete(I),!0}class fo{constructor(l,h,y,O){this._driver=h,this._normalizer=y,this._triggerCache={},this.onRemovalComplete=(z,Oe)=>{},this._transitionEngine=new ze(l.body,h,y,O),this._timelineEngine=new is(l.body,h,y),this._transitionEngine.onRemovalComplete=(z,Oe)=>this.onRemovalComplete(z,Oe)}registerTrigger(l,h,y,O,z){const Oe=l+"-"+O;let Be=this._triggerCache[Oe];if(!Be){const xe=[],gt=U(this._driver,z,xe,[]);if(xe.length)throw function sn(I,l){return new v.OBp(3404,!1)}();Be=function Gn(I,l,h){return new Jn(I,l,h)}(O,gt,this._normalizer),this._triggerCache[Oe]=Be}this._transitionEngine.registerTrigger(h,O,Be)}register(l,h){this._transitionEngine.register(l,h)}destroy(l,h){this._transitionEngine.destroy(l,h)}onInsert(l,h,y,O){this._transitionEngine.insertNode(l,h,y,O)}onRemove(l,h,y){this._transitionEngine.removeNode(l,h,y)}disableAnimations(l,h){this._transitionEngine.markElementAsDisabled(l,h)}process(l,h,y,O){if("@"==y.charAt(0)){const[z,Oe]=Ir(y);this._timelineEngine.command(z,h,Oe,O)}else this._transitionEngine.trigger(l,h,y,O)}listen(l,h,y,O,z){if("@"==y.charAt(0)){const[Oe,Be]=Ir(y);return this._timelineEngine.listen(Oe,h,Be,z)}return this._transitionEngine.listen(l,h,y,O,z)}flush(l=-1){this._transitionEngine.flush(l)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(l){this._transitionEngine.afterFlushAnimationsDone(l)}}class da{static#e=this.initialStylesByElement=new WeakMap;constructor(l,h,y){this._element=l,this._startStyles=h,this._endStyles=y,this._state=0;let O=da.initialStylesByElement.get(l);O||da.initialStylesByElement.set(l,O=new Map),this._initialStyles=O}start(){this._state<1&&(this._startStyles&&Mn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Mn(this._element,this._initialStyles),this._endStyles&&(Mn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(da.initialStylesByElement.delete(this._element),this._startStyles&&(br(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(br(this._element,this._endStyles),this._endStyles=null),Mn(this._element,this._initialStyles),this._state=3)}}function bo(I){let l=null;return I.forEach((h,y)=>{(function nl(I){return"display"===I||"position"===I})(y)&&(l=l||new Map,l.set(y,h))}),l}class Co{constructor(l,h,y,O){this.element=l,this.keyframes=h,this.options=y,this._specialStyles=O,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=y.duration,this._delay=y.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(l=>l()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const l=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,l,this.options),this._finalKeyframe=l.length?l[l.length-1]:new Map;const h=()=>this._onFinish();this.domPlayer.addEventListener("finish",h),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",h)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(l){const h=[];return l.forEach(y=>{h.push(Object.fromEntries(y))}),h}_triggerWebAnimation(l,h,y){return l.animate(this._convertKeyframesToObject(h),y)}onStart(l){this._originalOnStartFns.push(l),this._onStartFns.push(l)}onDone(l){this._originalOnDoneFns.push(l),this._onDoneFns.push(l)}onDestroy(l){this._onDestroyFns.push(l)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(l=>l()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(l=>l()),this._onDestroyFns=[])}setPosition(l){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=l*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const l=new Map;this.hasStarted()&&this._finalKeyframe.forEach((y,O)=>{"offset"!==O&&l.set(O,this._finished?y:qr(this.element,O))}),this.currentSnapshot=l}triggerCallback(l){const h="start"===l?this._onStartFns:this._onDoneFns;h.forEach(y=>y()),h.length=0}}class Sa{validateStyleProperty(l){return!0}validateAnimatableStyleProperty(l){return!0}matchesElement(l,h){return!1}containsElement(l,h){return $n(l,h)}getParentElement(l){return Er(l)}query(l,h,y){return jn(l,h,y)}computeStyle(l,h,y){return qr(l,h)}animate(l,h,y,O,z,Oe=[]){const xe={duration:y,delay:O,fill:0==O?"both":"forwards"};z&&(xe.easing=z);const mt=new Map,gt=Oe.filter(un=>un instanceof Co);(function pr(I,l){return 0===I||0===l})(y,O)&>.forEach(un=>{un.currentSnapshot.forEach((fn,Sn)=>mt.set(Sn,fn))});let vt=function ln(I){return I.length?I[0]instanceof Map?I:I.map(l
1=>new Map(Object.entries(l))):[]}(h).map(un=>new Map(un));vt=function Tr(I,l,h){if(h.size&&l.length){let y=l[0],O=[];if(h.forEach((z,Oe)=>{y.has(Oe)||O.push(Oe),y.set(Oe,z)}),O.length)for(let z=1;z<l.length;z++){let Oe=l[z];O.forEach(Be=>Oe.set(Be,qr(I,Be)))}}return l}(l,vt,mt);const Gt=function Uo(I,l){let h=null,y=null;return Array.isArray(l)&&l.length?(h=bo(l[0]),l.length>1&&(y=bo(l[l.length-1]))):l instanceof Map&&(h=bo(l)),h||y?new da(I,h,y):null}(l,vt);return new Co(l,vt,xe,Gt)}}const Vs="@.disabled";class rl{constructor(l,h,y,O){this.namespaceId=l,this.delegate=h,this.engine=y,this._onDestroy=O,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(l){this.delegate.destroyNode?.(l)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(l,h){return this.delegate.createElement(l,h)}createComment(l){return this.delegate.createComment(l)}createText(l){return this.delegate.createText(l)}appendChild(l,h){this.delegate.appendChild(l,h),this.engine.onInsert(this.namespaceId,h,l,!1)}insertBefore(l,h,y,O=!0){this.delegate.insertBefore(l,h,y),this.engine.onInsert(this.namespaceId,h,l,O)}removeChild(l,h,y){this.engine.onRemove(this.namespaceId,h,this.delegate)}selectRootElement(l,h){return this.delegate.selectRootElement(l,h)}parentNode(l){return this.delegate.parentNode(l)}nextSibling(l){return this.delegate.nextSibling(l)}setAttribute(l,h,y,O){this.delegate.setAttribute(l,h,y,O)}removeAttribute(l,h,y){this.delegate.removeAttribute(l,h,y)}addClass(l,h){this.delegate.addClass(l,h)}removeClass(l,h){this.delegate.removeClass(l,h)}setStyle(l,h,y,O){this.delegate.setStyle(l,h,y,O)}removeStyle(l,h,y){this.delegate.removeStyle(l,h,y)}setProperty(l,h,y){"@"==h.charAt(0)&&h==Vs?this.disableAnimations(l,!!y):this.delegate.setProperty(l,h,y)}setValue(l,h){this.delegate.setValue(l,h)}listen(l,h,y){return this.delegate.listen(l,h,y)}disableAnimations(l,h){this.engine.disableAnimations(l,h)}}class Ua extends rl{constructor(l,h,y,O,z){super(h,y,O,z),this.factory=l,this.namespaceId=h}setProperty(l,h,y){"@"==h.charAt(0)?"."==h.charAt(1)&&h==Vs?this.disableAnimations(l,y=void 0===y||!!y):this.engine.process(this.namespaceId,l,h.slice(1),y):this.delegate.setProperty(l,h,y)}listen(l,h,y){if("@"==h.charAt(0)){const O=function ia(I){switch(I){case"body":return document.body;case"document":return document;case"window":return window;default:return I}}(l);let z=h.slice(1),Oe="";return"@"!=z.charAt(0)&&([z,Oe]=function Qo(I){const l=I.indexOf(".");return[I.substring(0,l),I.slice(l+1)]}(z)),this.engine.listen(this.namespaceId,O,z,Oe,Be=>{this.factory.scheduleListenerCallback(Be._data||-1,y,Be)})}return this.delegate.listen(l,h,y)}}class os{constructor(l,h,y){this.delegate=l,this.engine=h,this._zone=y,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,h.onRemovalComplete=(O,z)=>{const Oe=z?.parentNode(O);Oe&&z.removeChild(Oe,O)}}createRenderer(l,h){const O=this.delegate.createRenderer(l,h);if(!l||!h?.data?.animation){const mt=this._rendererCache;let gt=mt.get(O);return gt||(gt=new rl("",O,this.engine,()=>mt.delete(O)),mt.set(O,gt)),gt}const z=h.id,Oe=h.id+"-"+this._currentId;this._currentId++,this.engine.register(Oe,l);const Be=mt=>{Array.isArray(mt)?mt.forEach(Be):this.engine.registerTrigger(z,Oe,l,mt.name,mt)};return h.data.animation.forEach(Be),new Ua(this,Oe,O,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(l,h,y){if(l>=0&&l<this._microtaskId)return void this._zone.run(()=>h(y));const O=this._animationCallbacksBuffer;0==O.length&&queueMicrotask(()=>{this._zone.run(()=>{O.forEach(z=>{const[Oe,Be]=z;Oe(Be)}),this._animationCallbacksBuffer=[]})}),O.push([h,y])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const Ra=[{provide:Mi,useFactory:function uu(){return new Hr}},{provide:fo,useClass:(()=>{class I extends fo{constructor(h,y,O){super(h,y,O,(0,v.uUt)(v.yai,{optional:!0}))}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(y){return new(y||I)(v.CoB(D.Ud),v.CoB(di),v.CoB(Mi))};static#t=this.\u0275prov=v.wxM({token:I,factory:I.\u0275fac})}return I})()}
1,{provide:v.O8F,useFactory:function Fl(I,l,h){return new os(I,l,h)},deps:[i.q,fo,v.WW2]}],Jo=[{provide:di,useFactory:()=>new Sa},{provide:v.qwP,useValue:"BrowserAnimations"},...Ra],ko=[{provide:di,useClass:mi},{provide:v.qwP,useValue:"NoopAnimations"},...Ra];let Ba=(()=>{class I{static withConfig(h){return{ngModule:I,providers:h.disableAnimations?ko:Jo}}static#e=this.\u0275fac=function(y){return new(y||I)};static#t=this.\u0275mod=v.a4G({type:I});static#n=this.\u0275inj=v.s3X({providers:Jo,imports:[i.iE]})}return I})();var il=a(36716),sl=a(56e3),li=a(51676),Cs=a(60331),ol=a(26324),cu=a(72136),Ws=a(72216),Tl=a(73940);function $a(I){return null!==I&&"object"==typeof I&&"constructor"in I&&I.constructor===Object}function ea(I,l){void 0===I&&(I={}),void 0===l&&(l={}),Object.keys(l).forEach(h=>{typeof I[h]>"u"?I[h]=l[h]:$a(l[h])&&$a(I[h])&&Object.keys(l[h]).length>0&&ea(I[h],l[h])})}const Ca={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function yo(){const I=typeof document<"u"?document:{};return ea(I,Ca),I}const Ma={document:Ca,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:I=>typeof setTimeout>"u"?(I(),null):setTimeout(I,0),cancelAnimationFrame(I){typeof setTimeout>"u"||clearTimeout(I)}};function Io(){const I=typeof window<"u"?window:{};return ea(I,Ma),I}function ho(I){return void 0===I&&(I=""),I.trim().split(" ").filter(l=>!!l.trim())}function po(I,l){return void 0===l&&(l=0),setTimeout(I,l)}function Vo(){return Date.now()}function ot(I,l){void 0===l&&(l="x");const h=Io();let y,O,z;const Oe=function X(I){const l=Io();let h;return l.getComputedStyle&&(h=l.getComputedStyle(I,null)),!h&&I.currentStyle&&(h=I.currentStyle),h||(h=I.style),h}(I);return h.WebKitCSSMatrix?(O=Oe.transform||Oe.webkitTransform,O.split(",").length>6&&(O=O.split(", ").map(Be=>Be.replace(",",".")).join(", ")),z=new h.WebKitCSSMatrix("none"===O?"":O)):(z=Oe.MozTransform||Oe.OTransform||Oe.MsTransform||Oe.msTransform||Oe.transform||Oe.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),y=z.toString().split(",")),"x"===l&&(O=h.WebKitCSSMatrix?z.m41:16===y.length?parseFloat(y[12]):parseFloat(y[4])),"y"===l&&(O=h.WebKitCSSMatrix?z.m42:16===y.length?parseFloat(y[13]):parseFloat(y[5])),O||0}function Ae(I){return"object"==typeof I&&null!==I&&I.constructor&&"Object"===Object.prototype.toString.call(I).slice(8,-1)}function yt(I){return typeof window<"u"&&typeof window.HTMLElement<"u"?I instanceof HTMLElement:I&&(1===I.nodeType||11===I.nodeType)}function xn(){const I=Object(arguments.length<=0?void 0:arguments[0]),l=["__proto__","constructor","prototype"];for(let h=1;h<arguments.length;h+=1){const y=h<0||arguments.length<=h?void 0:arguments[h];if(null!=y&&!yt(y)){const O=Object.keys(Object(y)).filter(z=>l.indexOf(z)<0);for(let z=0,Oe=O.length;z<Oe;z+=1){const Be=O[z],xe=Object.getOwnPropertyDescriptor(y,Be);void 0!==xe&&xe.enumerable&&(Ae(I[Be])&&Ae(y[Be])?y[Be].__swiper__?I[Be]=y[Be]:xn(I[Be],y[Be]):!Ae(I[Be])&&Ae(y[Be])?(I[Be]={},y[Be].__swiper__?I[Be]=y[Be]:xn(I[Be],y[Be])):I[Be]=y[Be])}}}return I}function qn(I,l,h){I.style.setProperty(l,h)}function Pr(I){let{swiper:l,targetPosition:h,side:y}=I;const O=Io(),z=-l.translate;let Be,Oe=null;const xe=l.params.speed;l.wrapperEl.style.scrollSnapType="none",O.cancelAnimationFrame(l.cssModeFrameID);const mt=h>z?"next":"prev",gt=(Gt,un)=>"next"===mt&&Gt>=un||"prev"===mt&&Gt<=un,vt=()=>{Be=(new Date).getTime(),null===Oe&&(Oe=Be);const Gt=Math.max(Math.min((Be-Oe)/xe,1),0),un=.5-Math.cos(Gt*Math.PI)/2;let fn=z+un*(h-z);if(gt(fn,h)&&(fn=h),l.wrapperEl.scrollTo({[y]:fn}),gt(fn,h))return l.wrapperEl.style.overflow="hidden",l.wrapperEl.style.scrollSnapType="",setTimeout(()=>{l.wrapperEl.style.overflow="",l.wrapperEl.scrollTo({[y]:fn})}),void O.cancelAnimationFrame(l.cssModeFrameID);l.cssModeFrameID=O.requestAnimationFrame(vt)};vt()}function ji(I){return I.querySelector(".swiper-slide-transform")||I.shadowRoot&&I.shadowRoot.querySelector(".swiper-slide-transform")||I}function pi(I,l){return void 0===l&&(l=""),[...I.children].filter(h=>h.matches(l))}function Ar(I){try{return void console.warn(I)}catch{}}function Xr(I,l){void 0===l&&(l=[]);const h=document.createElement(I);return h.classList.add(...Array.isArray(l)?l:ho(l)),h}function Qi(I){const l=Io(),h=yo(),y=I.getBoundingClientRect(),O=h.body;return{top:y.top+(I===l?l.scrollY:I.scrollTop)-(I.clientTop||O.clientTop||0),left
1:y.left+(I===l?l.scrollX:I.scrollLeft)-(I.clientLeft||O.clientLeft||0)}}function uo(I,l){return Io().getComputedStyle(I,null).getPropertyValue(l)}function sa(I){let h,l=I;if(l){for(h=0;null!==(l=l.previousSibling);)1===l.nodeType&&(h+=1);return h}}function ro(I,l){const h=[];let y=I.parentElement;for(;y;)l?y.matches(l)&&h.push(y):h.push(y),y=y.parentElement;return h}function ya(I,l){l&&I.addEventListener("transitionend",function h(y){y.target===I&&(l.call(I,y),I.removeEventListener("transitionend",h))})}function _a(I,l,h){const y=Io();return h?I["width"===l?"offsetWidth":"offsetHeight"]+parseFloat(y.getComputedStyle(I,null).getPropertyValue("width"===l?"margin-right":"margin-top"))+parseFloat(y.getComputedStyle(I,null).getPropertyValue("width"===l?"margin-left":"margin-bottom")):I.offsetWidth}function Zi(I){return(Array.isArray(I)?I:[I]).filter(l=>!!l)}let Eo,vs,io;function xa(){return Eo||(Eo=function Is(){const I=Io(),l=yo();return{smoothScroll:l.documentElement&&l.documentElement.style&&"scrollBehavior"in l.documentElement.style,touch:!!("ontouchstart"in I||I.DocumentTouch&&l instanceof I.DocumentTouch)}}()),Eo}function Fu(I){return void 0===I&&(I={}),vs||(vs=function Bl(I){let{userAgent:l}=void 0===I?{}:I;const h=xa(),y=Io(),O=y.navigator.platform,z=l||y.navigator.userAgent,Oe={ios:!1,android:!1},Be=y.screen.width,xe=y.screen.height,mt=z.match(/(Android);?[\s\/]+([\d.]+)?/);let gt=z.match(/(iPad).*OS\s([\d_]+)/);const vt=z.match(/(iPod)(.*OS\s([\d_]+))?/),Gt=!gt&&z.match(/(iPhone\sOS|iOS)\s([\d_]+)/),un="Win32"===O;let fn="MacIntel"===O;return!gt&&fn&&h.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${Be}x${xe}`)>=0&&(gt=z.match(/(Version)\/([\d.]+)/),gt||(gt=[0,1,"13_0_0"]),fn=!1),mt&&!un&&(Oe.os="android",Oe.android=!0),(gt||Gt||vt)&&(Oe.os="ios",Oe.ios=!0),Oe}(I)),vs}var zs={on(I,l,h){const y=this;if(!y.eventsListeners||y.destroyed||"function"!=typeof l)return y;const O=h?"unshift":"push";return I.split(" ").forEach(z=>{y.eventsListeners[z]||(y.eventsListeners[z]=[]),y.eventsListeners[z][O](l)}),y},once(I,l,h){const y=this;if(!y.eventsListeners||y.destroyed||"function"!=typeof l)return y;function O(){y.off(I,O),O.__emitterProxy&&delete O.__emitterProxy;for(var z=arguments.length,Oe=new Array(z),Be=0;Be<z;Be++)Oe[Be]=arguments[Be];l.apply(y,Oe)}return O.__emitterProxy=l,y.on(I,O,h)},onAny(I,l){const h=this;if(!h.eventsListeners||h.destroyed||"function"!=typeof I)return h;const y=l?"unshift":"push";return h.eventsAnyListeners.indexOf(I)<0&&h.eventsAnyListeners[y](I),h},offAny(I){const l=this;if(!l.eventsListeners||l.destroyed||!l.eventsAnyListeners)return l;const h=l.eventsAnyListeners.indexOf(I);return h>=0&&l.eventsAnyListeners.splice(h,1),l},off(I,l){const h=this;return!h.eventsListeners||h.destroyed||!h.eventsListeners||I.split(" ").forEach(y=>{typeof l>"u"?h.eventsListeners[y]=[]:h.eventsListeners[y]&&h.eventsListeners[y].forEach((O,z)=>{(O===l||O.__emitterProxy&&O.__emitterProxy===l)&&h.eventsListeners[y].splice(z,1)})}),h},emit(){const I=this;if(!I.eventsListeners||I.destroyed||!I.eventsListeners)return I;let l,h,y;for(var O=arguments.length,z=new Array(O),Oe=0;Oe<O;Oe++)z[Oe]=arguments[Oe];return"string"==typeof z[0]||Array.isArray(z[0])?(l=z[0],h=z.slice(1,z.length),y=I):(l=z[0].events,h=z[0].data,y=z[0].context||I),h.unshift(y),(Array.isArray(l)?l:l.split(" ")).forEach(xe=>{I.eventsAnyListeners&&I.eventsAnyListeners.length&&I.eventsAnyListeners.forEach(mt=>{mt.apply(y,[xe,...h])}),I.eventsListeners&&I.eventsListeners[xe]&&I.eventsListeners[xe].forEach(mt=>{mt.apply(y,h)})}),I}};const Bo=(I,l)=>{if(!I||I.destroyed||!I.params)return;const y=l.closest(I.isElement?"swiper-slide":`.${I.params.slideClass}`);if(y){let O=y.querySelector(`.${I.params.lazyPreloaderClass}`);!O&&I.isElement&&(y.shadowRoot?O=y.shadowRoot.querySelector(`.${I.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{y.shadowRoot&&(O=y.shadowRoot.querySelector(`.${I.params.lazyPreloaderClass}`),O&&O.remove())})),O&&O.remove()}},$l=(I,l)=>{if(!I.slides[l])return;const h=I.slides[l].querySelector('[loading="lazy"]');h&&h.removeAttribute("loading")},Jl=I=>{if(!I||I.destroyed||!I.params)return;let l=I.params.lazyPreloadPrevNext;const h=I.slides.length;
1if(!h||!l||l<0)return;l=Math.min(l,h);const y="auto"===I.params.slidesPerView?I.slidesPerViewDynamic():Math.ceil(I.params.slidesPerView),O=I.activeIndex;if(I.params.grid&&I.params.grid.rows>1){const Oe=O,Be=[Oe-l];return Be.push(...Array.from({length:l}).map((xe,mt)=>Oe+y+mt)),void I.slides.forEach((xe,mt)=>{Be.includes(xe.column)&&$l(I,mt)})}const z=O+y-1;if(I.params.rewind||I.params.loop)for(let Oe=O-l;Oe<=z+l;Oe+=1){const Be=(Oe%h+h)%h;(Be<O||Be>z)&&$l(I,Be)}else for(let Oe=Math.max(O-l,0);Oe<=Math.min(z+l,h-1);Oe+=1)Oe!==O&&(Oe>z||Oe<O)&&$l(I,Oe)};var fu={updateSize:function Vi(){const I=this;let l,h;const y=I.el;l=typeof I.params.width<"u"&&null!==I.params.width?I.params.width:y.clientWidth,h=typeof I.params.height<"u"&&null!==I.params.height?I.params.height:y.clientHeight,!(0===l&&I.isHorizontal()||0===h&&I.isVertical())&&(l=l-parseInt(uo(y,"padding-left")||0,10)-parseInt(uo(y,"padding-right")||0,10),h=h-parseInt(uo(y,"padding-top")||0,10)-parseInt(uo(y,"padding-bottom")||0,10),Number.isNaN(l)&&(l=0),Number.isNaN(h)&&(h=0),Object.assign(I,{width:l,height:h,size:I.isHorizontal()?l:h}))},updateSlides:function Cl(){const I=this;function l(Zr,Si){return parseFloat(Zr.getPropertyValue(I.getDirectionLabel(Si))||0)}const h=I.params,{wrapperEl:y,slidesEl:O,size:z,rtlTranslate:Oe,wrongRTL:Be}=I,xe=I.virtual&&h.virtual.enabled,mt=xe?I.virtual.slides.length:I.slides.length,gt=pi(O,`.${I.params.slideClass}, swiper-slide`),vt=xe?I.virtual.slides.length:gt.length;let Gt=[];const un=[],fn=[];let Sn=h.slidesOffsetBefore;"function"==typeof Sn&&(Sn=h.slidesOffsetBefore.call(I));let Pn=h.slidesOffsetAfter;"function"==typeof Pn&&(Pn=h.slidesOffsetAfter.call(I));const tn=I.snapGrid.length,kn=I.slidesGrid.length;let Rn=h.spaceBetween,vr=-Sn,hi=0,ui=0;if(typeof z>"u")return;"string"==typeof Rn&&Rn.indexOf("%")>=0?Rn=parseFloat(Rn.replace("%",""))/100*z:"string"==typeof Rn&&(Rn=parseFloat(Rn)),I.virtualSize=-Rn,gt.forEach(Zr=>{Oe?Zr.style.marginLeft="":Zr.style.marginRight="",Zr.style.marginBottom="",Zr.style.marginTop=""}),h.centeredSlides&&h.cssMode&&(qn(y,"--swiper-centered-offset-before",""),qn(y,"--swiper-centered-offset-after",""));const Ri=h.grid&&h.grid.rows>1&&I.grid;let ni;Ri?I.grid.initSlides(gt):I.grid&&I.grid.unsetSlides();const Qr="auto"===h.slidesPerView&&h.breakpoints&&Object.keys(h.breakpoints).filter(Zr=>typeof h.breakpoints[Zr].slidesPerView<"u").length>0;for(let Zr=0;Zr<vt;Zr+=1){let Si;if(ni=0,gt[Zr]&&(Si=gt[Zr]),Ri&&I.grid.updateSlide(Zr,Si,gt),!gt[Zr]||"none"!==uo(Si,"display")){if("auto"===h.slidesPerView){Qr&&(gt[Zr].style[I.getDirectionLabel("width")]="");const $r=getComputedStyle(Si),Kn=Si.style.transform,yr=Si.style.webkitTransform;if(Kn&&(Si.style.transform="none"),yr&&(Si.style.webkitTransform="none"),h.roundLengths)ni=I.isHorizontal()?_a(Si,"width",!0):_a(Si,"height",!0);else{const gi=l($r,"width"),ci=l($r,"padding-left"),Ui=l($r,"padding-right"),Dr=l($r,"margin-left"),ai=l($r,"margin-right"),Ei=$r.getPropertyValue("box-sizing");if(Ei&&"border-box"===Ei)ni=gi+Dr+ai;else{const{clientWidth:Bi,offsetWidth:Ys}=Si;ni=gi+ci+Ui+Dr+ai+(Ys-Bi)}}Kn&&(Si.style.transform=Kn),yr&&(Si.style.webkitTransform=yr),h.roundLengths&&(ni=Math.floor(ni))}else ni=(z-(h.slidesPerView-1)*Rn)/h.slidesPerView,h.roundLengths&&(ni=Math.floor(ni)),gt[Zr]&&(gt[Zr].style[I.getDirectionLabel("width")]=`${ni}px`);gt[Zr]&&(gt[Zr].swiperSlideSize=ni),fn.push(ni),h.centeredSlides?(vr=vr+ni/2+hi/2+Rn,0===hi&&0!==Zr&&(vr=vr-z/2-Rn),0===Zr&&(vr=vr-z/2-Rn),Math.abs(vr)<.001&&(vr=0),h.roundLengths&&(vr=Math.floor(vr)),ui%h.slidesPerGroup==0&&Gt.push(vr),un.push(vr)):(h.roundLengths&&(vr=Math.floor(vr)),(ui-Math.min(I.params.slidesPerGroupSkip,ui))%I.params.slidesPerGroup==0&&Gt.push(vr),un.push(vr),vr=vr+ni+Rn),I.virtualSize+=ni+Rn,hi=ni,ui+=1}}if(I.virtualSize=Math.max(I.virtualSize,z)+Pn,Oe&&Be&&("slide"===h.effect||"coverflow"===h.effect)&&(y.style.width=`${I.virtualSize+Rn}px`),h.setWrapperSize&&(y.style[I.getDirectionLabel("width")]=`${I.virtualSize+Rn}px`),Ri&&I.grid.updateWrapperSize(ni,Gt),!h.centeredSlides){const Zr=[];for(let Si=0;Si<Gt.length;Si+=1){let $r=Gt[Si];h.roundLengths&&($r=Math.floor($r)),Gt[Si]<=I.virtualSize-z&&Zr.push($r)}Gt=Zr,Math.floor(I.virtualSize-z)-Math.floor(Gt[Gt.length-1])>1&&Gt.push(I.virtualSize-z)}if(xe&&h.loop){const Zr=fn[0]+Rn;if(h.slidesPerGroup>1){const Si=Math.ceil((I.virtual.slidesBefore+I.virtual.slidesAfter)/h.slidesPerGroup),$r=Zr*h.slidesPerGroup;for(let Kn=0;Kn<Si;Kn+=1)Gt.push(Gt[Gt.length-1]+$r)}for(let Si=0;Si<I.virtual.slidesBefore+I.virtual.slidesAfter;Si+=1)1===h.slidesPerGroup&&Gt.push(Gt[Gt.length-1]+Zr),un.push(un[un.length-1]+Zr),I.virtualSize+=Zr}if(0===Gt.length&&(Gt=[0]),0!==Rn){const Zr=I.isHorizontal()&&Oe?"marginLeft":I.getDirectionLabel("marginRight");gt.filter((Si,$r)=>
1!(h.cssMode&&!h.loop)||$r!==gt.length-1).forEach(Si=>{Si.style[Zr]=`${Rn}px`})}if(h.centeredSlides&&h.centeredSlidesBounds){let Zr=0;fn.forEach($r=>{Zr+=$r+(Rn||0)}),Zr-=Rn;const Si=Zr-z;Gt=Gt.map($r=>$r<=0?-Sn:$r>Si?Si+Pn:$r)}if(h.centerInsufficientSlides){let Zr=0;if(fn.forEach(Si=>{Zr+=Si+(Rn||0)}),Zr-=Rn,Zr<z){const Si=(z-Zr)/2;Gt.forEach(($r,Kn)=>{Gt[Kn]=$r-Si}),un.forEach(($r,Kn)=>{un[Kn]=$r+Si})}}if(Object.assign(I,{slides:gt,snapGrid:Gt,slidesGrid:un,slidesSizesGrid:fn}),h.centeredSlides&&h.cssMode&&!h.centeredSlidesBounds){qn(y,"--swiper-centered-offset-before",-Gt[0]+"px"),qn(y,"--swiper-centered-offset-after",I.size/2-fn[fn.length-1]/2+"px");const Zr=-I.snapGrid[0],Si=-I.slidesGrid[0];I.snapGrid=I.snapGrid.map($r=>$r+Zr),I.slidesGrid=I.slidesGrid.map($r=>$r+Si)}if(vt!==mt&&I.emit("slidesLengthChange"),Gt.length!==tn&&(I.params.watchOverflow&&I.checkOverflow(),I.emit("snapGridLengthChange")),un.length!==kn&&I.emit("slidesGridLengthChange"),h.watchSlidesProgress&&I.updateSlidesOffset(),I.emit("slidesUpdated"),!(xe||h.cssMode||"slide"!==h.effect&&"fade"!==h.effect)){const Zr=`${h.containerModifierClass}backface-hidden`,Si=I.el.classList.contains(Zr);vt<=h.maxBackfaceHiddenSlides?Si||I.el.classList.add(Zr):Si&&I.el.classList.remove(Zr)}},updateAutoHeight:function Uu(I){const l=this,h=[],y=l.virtual&&l.params.virtual.enabled;let z,O=0;"number"==typeof I?l.setTransition(I):!0===I&&l.setTransition(l.params.speed);const Oe=Be=>y?l.slides[l.getSlideIndexByData(Be)]:l.slides[Be];if("auto"!==l.params.slidesPerView&&l.params.slidesPerView>1)if(l.params.centeredSlides)(l.visibleSlides||[]).forEach(Be=>{h.push(Be)});else for(z=0;z<Math.ceil(l.params.slidesPerView);z+=1){const Be=l.activeIndex+z;if(Be>l.slides.length&&!y)break;h.push(Oe(Be))}else h.push(Oe(l.activeIndex));for(z=0;z<h.length;z+=1)if(typeof h[z]<"u"){const Be=h[z].offsetHeight;O=Be>O?Be:O}(O||0===O)&&(l.wrapperEl.style.height=`${O}px`)},updateSlidesOffset:function Do(){const I=this,l=I.slides,h=I.isElement?I.isHorizontal()?I.wrapperEl.offsetLeft:I.wrapperEl.offsetTop:0;for(let y=0;y<l.length;y+=1)l[y].swiperSlideOffset=(I.isHorizontal()?l[y].offsetLeft:l[y].offsetTop)-h-I.cssOverflowAdjustment()},updateSlidesProgress:function vl(I){void 0===I&&(I=this&&this.translate||0);const l=this,h=l.params,{slides:y,rtlTranslate:O,snapGrid:z}=l;if(0===y.length)return;typeof y[0].swiperSlideOffset>"u"&&l.updateSlidesOffset();let Oe=-I;O&&(Oe=I),y.forEach(xe=>{xe.classList.remove(h.slideVisibleClass,h.slideFullyVisibleClass)}),l.visibleSlidesIndexes=[],l.visibleSlides=[];let Be=h.spaceBetween;"string"==typeof Be&&Be.indexOf("%")>=0?Be=parseFloat(Be.replace("%",""))/100*l.size:"string"==typeof Be&&(Be=parseFloat(Be));for(let xe=0;xe<y.length;xe+=1){const mt=y[xe];let gt=mt.swiperSlideOffset;h.cssMode&&h.centeredSlides&&(gt-=y[0].swiperSlideOffset);const vt=(Oe+(h.centeredSlides?l.minTranslate():0)-gt)/(mt.swiperSlideSize+Be),Gt=(Oe-z[0]+(h.centeredSlides?l.minTranslate():0)-gt)/(mt.swiperSlideSize+Be),un=-(Oe-gt),fn=un+l.slidesSizesGrid[xe],Sn=un>=0&&un<=l.size-l.slidesSizesGrid[xe];(un>=0&&un<l.size-1||fn>1&&fn<=l.size||un<=0&&fn>=l.size)&&(l.visibleSlides.push(mt),l.visibleSlidesIndexes.push(xe),y[xe].classList.add(h.slideVisibleClass)),Sn&&y[xe].classList.add(h.slideFullyVisibleClass),mt.progress=O?-vt:vt,mt.originalProgress=O?-Gt:Gt}},updateProgress:function fa(I){const l=this;typeof I>"u"&&(I=l&&l.translate&&l.translate*(l.rtlTranslate?-1:1)||0);const h=l.params,y=l.maxTranslate()-l.minTranslate();let{progress:O,isBeginning:z,isEnd:Oe,progressLoop:Be}=l;const xe=z,mt=Oe;if(0===y)O=0,z=!0,Oe=!0;else{O=(I-l.minTranslate())/y;const gt=Math.abs(I-l.minTranslate())<1,vt=Math.abs(I-l.maxTranslate())<1;z=gt||O<=0,Oe=vt||O>=1,gt&&(O=0),vt&&(O=1)}if(h.loop){const gt=l.getSlideIndexByData(0),vt=l.getSlideIndexByData(l.slides.length-1),Gt=l.slidesGrid[gt],un=l.slidesGrid[vt],fn=l.slidesGrid[l.slidesGrid.length-1],Sn=Math.abs(I);Be=Sn>=Gt?(Sn-Gt)/fn:(Sn+fn-un)/fn,Be>1&&(Be-=1)}Object.assign(l,{progress:O,progressLoop:Be,isBeginning:z,isEnd:Oe}),(h.watchSlidesProgress||h.centeredSlides&&h.autoHeight)&&l.updateSlidesProgress(I),z&&!xe&&l.emit("reachBeginning toEdge"),Oe&&!mt&&l.emit("reachEnd toEdge"),(xe&&!z||mt&&!Oe)&&l.emit("fromEdge"),l.emit("progress",O)},updateSlidesClasses:function du(){const I=this,{slides:l,params:h,slidesEl:y,activeIndex:O}=I,z=I.virtual&&h.virtual.enabled,Oe=I.grid&&h.grid&&h.grid.rows>1,Be=vt=>pi(y,`.${h.slideClass}${vt}, swiper-slide${vt}`)[0];let xe,mt,gt;if(l.forEach(vt=>{vt.classList.remove(h.slideActiveClass,h.slideNextClass,h.slidePrevClass)}),z)if(h.loop){let vt=O-I.virtual.slidesBefore;vt<0&&(vt=I.virtual.slides.length+vt),vt>=I.virtual.slides.length&&(vt-=I.virtual.slides.length),xe=Be(`[data-swiper-slide-index="${vt}"]`)}else xe=Be(`[data-swiper-slide-index="${O}"]`);
1else Oe?(xe=l.filter(vt=>vt.column===O)[0],gt=l.filter(vt=>vt.column===O+1)[0],mt=l.filter(vt=>vt.column===O-1)[0]):xe=l[O];xe&&(xe.classList.add(h.slideActiveClass),Oe?(gt&>.classList.add(h.slideNextClass),mt&&mt.classList.add(h.slidePrevClass)):(gt=function Qs(I,l){const h=[];for(;I.nextElementSibling;){const y=I.nextElementSibling;l?y.matches(l)&&h.push(y):h.push(y),I=y}return h}(xe,`.${h.slideClass}, swiper-slide`)[0],h.loop&&!gt&&(gt=l[0]),gt&>.classList.add(h.slideNextClass),mt=function no(I,l){const h=[];for(;I.previousElementSibling;){const y=I.previousElementSibling;l?y.matches(l)&&h.push(y):h.push(y),I=y}return h}(xe,`.${h.slideClass}, swiper-slide`)[0],h.loop&&0===!mt&&(mt=l[l.length-1]),mt&&mt.classList.add(h.slidePrevClass))),I.emitSlidesClasses()},updateActiveIndex:function lc(I){const l=this,h=l.rtlTranslate?l.translate:-l.translate,{snapGrid:y,params:O,activeIndex:z,realIndex:Oe,snapIndex:Be}=l;let mt,xe=I;const gt=un=>{let fn=un-l.virtual.slidesBefore;return fn<0&&(fn=l.virtual.slides.length+fn),fn>=l.virtual.slides.length&&(fn-=l.virtual.slides.length),fn};if(typeof xe>"u"&&(xe=function Wo(I){const{slidesGrid:l,params:h}=I,y=I.rtlTranslate?I.translate:-I.translate;let O;for(let z=0;z<l.length;z+=1)typeof l[z+1]<"u"?y>=l[z]&&y<l[z+1]-(l[z+1]-l[z])/2?O=z:y>=l[z]&&y<l[z+1]&&(O=z+1):y>=l[z]&&(O=z);return h.normalizeSlideIndex&&(O<0||typeof O>"u")&&(O=0),O}(l)),y.indexOf(h)>=0)mt=y.indexOf(h);else{const un=Math.min(O.slidesPerGroupSkip,xe);mt=un+Math.floor((xe-un)/O.slidesPerGroup)}if(mt>=y.length&&(mt=y.length-1),xe===z&&!l.params.loop)return void(mt!==Be&&(l.snapIndex=mt,l.emit("snapIndexChange")));if(xe===z&&l.params.loop&&l.virtual&&l.params.virtual.enabled)return void(l.realIndex=gt(xe));const vt=l.grid&&O.grid&&O.grid.rows>1;let Gt;if(l.virtual&&O.virtual.enabled&&O.loop)Gt=gt(xe);else if(vt){const un=l.slides.filter(Sn=>Sn.column===xe)[0];let fn=parseInt(un.getAttribute("data-swiper-slide-index"),10);Number.isNaN(fn)&&(fn=Math.max(l.slides.indexOf(un),0)),Gt=Math.floor(fn/O.grid.rows)}else if(l.slides[xe]){const un=l.slides[xe].getAttribute("data-swiper-slide-index");Gt=un?parseInt(un,10):xe}else Gt=xe;Object.assign(l,{previousSnapIndex:Be,snapIndex:mt,previousRealIndex:Oe,realIndex:Gt,previousIndex:z,activeIndex:xe}),l.initialized&&Jl(l),l.emit("activeIndexChange"),l.emit("snapIndexChange"),(l.initialized||l.params.runCallbacksOnInit)&&(Oe!==Gt&&l.emit("realIndexChange"),l.emit("slideChange"))},updateClickedSlide:function Ks(I,l){const h=this,y=h.params;let O=I.closest(`.${y.slideClass}, swiper-slide`);!O&&h.isElement&&l&&l.length>
11&&l.includes(I)&&[...l.slice(l.indexOf(I)+1,l.length)].forEach(Be=>{!O&&Be.matches&&Be.matches(`.${y.slideClass}, swiper-slide`)&&(O=Be)});let Oe,z=!1;if(O)for(let Be=0;Be<h.slides.length;Be+=1)if(h.slides[Be]===O){z=!0,Oe=Be;break}if(!O||!z)return h.clickedSlide=void 0,void(h.clickedIndex=void 0);h.clickedSlide=O,h.clickedIndex=h.virtual&&h.params.virtual.enabled?parseInt(O.getAttribute("data-swiper-slide-index"),10):Oe,y.slideToClickedSlide&&void 0!==h.clickedIndex&&h.clickedIndex!==h.activeIndex&&h.slideToClickedSlide()}},_l={getTranslate:function oa(I){void 0===I&&(I=this.isHorizontal()?"x":"y");const{params:h,rtlTranslate:y,translate:O,wrapperEl:z}=this;if(h.virtualTranslate)return y?-O:O;if(h.cssMode)return O;let Oe=ot(z,I);return Oe+=this.cssOverflowAdjustment(),y&&(Oe=-Oe),Oe||0},setTranslate:function Vu(I,l){const h=this,{rtlTranslate:y,params:O,wrapperEl:z,progress:Oe}=h;let gt,Be=0,xe=0;h.isHorizontal()?Be=y?-I:I:xe=I,O.roundLengths&&(Be=Math.floor(Be),xe=Math.floor(xe)),h.previousTranslate=h.translate,h.translate=h.isHorizontal()?Be:xe,O.cssMode?z[h.isHorizontal()?"scrollLeft":"scrollTop"]=h.isHorizontal()?-Be:-xe:O.virtualTranslate||(h.isHorizontal()?Be-=h.cssOverflowAdjustment():xe-=h.cssOverflowAdjustment(),z.style.transform=`translate3d(${Be}px, ${xe}px, 0px)`);const vt=h.maxTranslate()-h.minTranslate();gt=0===vt?0:(I-h.minTranslate())/vt,gt!==Oe&&h.updateProgress(I),h.emit("setTranslate",h.translate,l)},minTranslate:function Lr(){return-this.snapGrid[0]},maxTranslate:function jl(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function ha(I,l,h,y,O){void 0===I&&(I=0),void 0===l&&(l=this.params.speed),void 0===h&&(h=!0),void 0===y&&(y=!0);const z=this,{params:Oe,wrapperEl:Be}=z;if(z.animating&&Oe.preventInteractionOnTransition)return!1;const xe=z.minTranslate(),mt=z.maxTranslate();let gt;if(gt=y&&I>xe?xe:y&&I<mt?mt:I,z.updateProgress(gt),Oe.cssMode){const vt=z.isHorizontal();if(0===l)Be[vt?"scrollLeft":"scrollTop"]=-gt;else{if(!z.support.smoothScroll)return Pr({swiper:z,targetPosition:-gt,side:vt?"left":"top"}),!0;Be.scrollTo({[vt?"left":"top"]:-gt,behavior:"smooth"})}return!0}return 0===l?(z.setTransition(0),z.setTranslate(gt),h&&(z.emit("beforeTransitionStart",l,O),z.emit("transitionEnd"))):(z.setTransition(l),z.setTranslate(gt),h&&(z.emit("beforeTransitionStart",l,O),z.emit("transitionStart")),z.animating||(z.animating=!0,z.onTranslateToWrapperTransitionEnd||(z.onTranslateToWrapperTransitionEnd=function(Gt){!z||z.destroyed||Gt.target===this&&(z.wrapperEl.removeEventListener("transitionend",z.onTranslateToWrapperTransitionEnd),z.onTranslateToWrapperTransitionEnd=null,delete z.onTranslateToWrapperTransitionEnd,h&&z.emit("transitionEnd"))}),z.wrapperEl.addEventListener("transitionend",z.onTranslateToWrapperTransitionEnd))),!0}};function Ea(I){let{swiper:l,runCallbacks:h,direction:y,step:O}=I;const{activeIndex:z,previousIndex:Oe}=l;let Be=y;if(Be||(Be=z>Oe?"next":z<Oe?"prev":"reset"),l.emit(`transition${O}`),h&&z!==Oe){if("reset"===Be)return void l.emit(`slideResetTransition${O}`);l.emit(`slideChangeTransition${O}`),l.emit("next"===Be?`slideNextTransition${O}`:`slidePrevTransition${O}`)}}var al={setTransition:function Gl(I,l){const h=this;h.params.cssMode||(h.wrapperEl.style.transitionDuration=`${I}ms`,h.wrapperEl.style.transitionDelay=0===I?"0ms":""),h.emit("setTransition",I,l)},transitionStart:function hu(I,l){void 0===I&&(I=!0);const h=this,{params:y}=h;y.cssMode||(y.autoHeight&&h.updateAutoHeight(),Ea({swiper:h,runCallbacks:I,direction:l,step:"Start"}))},transitionEnd:function pa(I,l){void 0===I&&(I=!0);const h=this,{params:y}=h;h.animating=!1,!y.cssMode&&(h.setTransition(0),Ea({swiper:h,runCallbacks:I,direction:l,step:"End"}))}},aa={slideTo:function Al(I,l,h,y,O){void 0===I&&(I=0),void 0===l&&(l=this.params.speed),void 0===h&&(h=!0),"string"==typeof I&&(I=parseInt(I,10));const z=this;let Oe=I;Oe<0&&(Oe=0);const{params:Be,snapGrid:xe,slidesGrid:mt,previousIndex:gt,activeIndex:vt,rtlTranslate:Gt,wrapperEl:un,enabled:fn}=z;if(z.animating&&Be.preventInteractionOnTransition||!fn&&!y&&!O||z.destroyed)return!1;const Sn=Math.min(z.params.slidesPerGroupSkip,Oe);let Pn=Sn+Math.floor((Oe-Sn)/z.params.slidesPerGroup);Pn>=xe.length&&(Pn=xe.length-1);const tn=-xe[Pn];if(Be.normalizeSlideIndex)for(let Rn=0;Rn<mt.length;Rn+=1){const vr=-Math.floor(100*tn),hi=Math.floor(100*mt[Rn]),ui=Math.floor(100*mt[Rn+1]);typeof mt[Rn+1]<"u"?vr>=hi&&vr<ui-(ui-hi)/2?Oe=Rn:vr>=hi&&vr<ui&&(Oe=Rn+1):vr>=hi&&(Oe=Rn)}if(z.initialized&&Oe!==vt&&(!z.allowSlideNext&&(Gt?tn>z.translate&&tn>z.minTranslate():tn<z.translate&&tn<z.minTranslate())||!z.allowSlidePrev&&tn>z.translate&&tn>z.maxTranslate()&&(vt||0)!==Oe))return!1;let kn;if(Oe!==(gt||0)&&h&&z.emit("beforeSlideChangeStart"),z.updateProgress(tn),kn=Oe>vt?"next":Oe<vt?"prev":"reset",Gt&&-tn===z.translate||!Gt&&tn===z.translate)return z.updateActiveIndex(Oe),Be.autoHeight&&z.updateAutoHeight(),z.updateSlidesClasses(),"slide"!==Be.effect&&z.setTranslate(tn),"reset"!==kn&&(z.transitionStart(h,
1kn),z.transitionEnd(h,kn)),!1;if(Be.cssMode){const Rn=z.isHorizontal(),vr=Gt?tn:-tn;if(0===l){const hi=z.virtual&&z.params.virtual.enabled;hi&&(z.wrapperEl.style.scrollSnapType="none",z._immediateVirtual=!0),hi&&!z._cssModeVirtualInitialSet&&z.params.initialSlide>0?(z._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{un[Rn?"scrollLeft":"scrollTop"]=vr})):un[Rn?"scrollLeft":"scrollTop"]=vr,hi&&requestAnimationFrame(()=>{z.wrapperEl.style.scrollSnapType="",z._immediateVirtual=!1})}else{if(!z.support.smoothScroll)return Pr({swiper:z,targetPosition:vr,side:Rn?"left":"top"}),!0;un.scrollTo({[Rn?"left":"top"]:vr,behavior:"smooth"})}return!0}return z.setTransition(l),z.setTranslate(tn),z.updateActiveIndex(Oe),z.updateSlidesClasses(),z.emit("beforeTransitionStart",l,y),z.transitionStart(h,kn),0===l?z.transitionEnd(h,kn):z.animating||(z.animating=!0,z.onSlideToWrapperTransitionEnd||(z.onSlideToWrapperTransitionEnd=function(vr){!z||z.destroyed||vr.target===this&&(z.wrapperEl.removeEventListener("transitionend",z.onSlideToWrapperTransitionEnd),z.onSlideToWrapperTransitionEnd=null,delete z.onSlideToWrapperTransitionEnd,z.transitionEnd(h,kn))}),z.wrapperEl.addEventListener("transitionend",z.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function pu(I,l,h,y){void 0===I&&(I=0),void 0===l&&(l=this.params.speed),void 0===h&&(h=!0),"string"==typeof I&&(I=parseInt(I,10));const O=this;if(O.destroyed)return;const z=O.grid&&O.params.grid&&O.params.grid.rows>1;let Oe=I;if(O.params.loop)if(O.virtual&&O.params.virtual.enabled)Oe+=O.virtual.slidesBefore;else{let Be;if(z){const Gt=Oe*O.params.grid.rows;Be=O.slides.filter(un=>1*un.getAttribute("data-swiper-slide-index")===Gt)[0].column}else Be=O.getSlideIndexByData(Oe);const xe=z?Math.ceil(O.slides.length/O.params.grid.rows):O.slides.length,{centeredSlides:mt}=O.params;let gt=O.params.slidesPerView;"auto"===gt?gt=O.slidesPerViewDynamic():(gt=Math.ceil(parseFloat(O.params.slidesPerView,10)),mt&>%2==0&&(gt+=1));let vt=xe-Be<gt;if(mt&&(vt=vt||Be<Math.ceil(gt/2)),vt){const Gt=mt?Be<O.activeIndex?"prev":"next":Be-O.activeIndex-1<O.params.slidesPerView?"next":"prev";O.loopFix({direction:Gt,slideTo:!0,activeSlideIndex:"next"===Gt?Be+1:Be-xe+1,slideRealIndex:"next"===Gt?O.realIndex:void 0})}if(z){const Gt=Oe*O.params.grid.rows;Oe=O.slides.filter(un=>1*un.getAttribute("data-swiper-slide-index")===Gt)[0].column}else Oe=O.getSlideIndexByData(Oe)}return requestAnimationFrame(()=>{O.slideTo(Oe,l,h,y)}),O},slideNext:function ll(I,l,h){void 0===I&&(I=this.params.speed),void 0===l&&(l=!0);const y=this,{enabled:O,params:z,animating:Oe}=y;if(!O||y.destroyed)return y;let Be=z.slidesPerGroup;"auto"===z.slidesPerView&&1===z.slidesPerGroup&&z.slidesPerGroupAuto&&(Be=Math.max(y.slidesPerViewDynamic("current",!0),1));const xe=y.activeIndex<z.slidesPerGroupSkip?1:Be;if(z.loop){if(Oe&&(!y.virtual||!z.virtual.enabled)&&z.loopPreventsSliding)return!1;if(y.loopFix({direction:"next"}),y._clientLeft=y.wrapperEl.clientLeft,y.activeIndex===y.slides.length-1&&z.cssMode)return requestAnimationFrame(()=>{y.slideTo(y.activeIndex+xe,I,l,h)}),!0}return y.slideTo(z.rewind&&y.isEnd?0:y.activeIndex+xe,I,l,h)},slidePrev:function Ds(I,l,h){void 0===I&&(I=this.params.speed),void 0===l&&(l=!0);const y=this,{params:O,snapGrid:z,slidesGrid:Oe,rtlTranslate:Be,enabled:xe,animating:mt}=y;if(!xe||y.destroyed)return y;if(O.loop){if(mt&&(!y.virtual||!O.virtual.enabled)&&O.loopPreventsSliding)return!1;y.loopFix({direction:"prev"}),y._clientLeft=y.wrapperEl.clientLeft}function Gt(tn){return tn<0?-Math.floor(Math.abs(tn)):Math.floor(tn)}const un=Gt(Be?y.translate:-y.translate),fn=z.map(tn=>Gt(tn));let Sn=z[fn.indexOf(un)-1];if(typeof Sn>"u"&&O.cssMode){let tn;z.forEach((kn,Rn)=>{un>=kn&&(tn=Rn)}),typeof tn<"u"&&(Sn=z[tn>0?tn-1:tn])}let Pn=0;return typeof Sn<"u"&&(Pn=Oe.indexOf(Sn),Pn<0&&(Pn=y.activeIndex-1),"auto"===O.slidesPerView&&1===O.slidesPerGroup&&O.slidesPerGroupAuto&&(Pn=Pn-y.slidesPerViewDynamic("previous",!0)+1,Pn=Math.max(Pn,0))),O.rewind&&y.isBeginning?y.slideTo(y.params.virtual&&y.params.virtual.enabled&&y.virtual?y.virtual.slides.length-1:y.slides.length-1,I,l,h):O.loop&&0===y.activeIndex&&O.cssMode?(requestAnimationFrame(()=>{y.slideTo(Pn,I,l,h)}),!0):y.slideTo(Pn,I,l,h)},slideReset:function gu(I,l,h){void 0===I&&(I=this.params.speed),void 0===l&&(l=!0);const y=this;if(!y.destroyed)return y.slideTo(y.activeIndex,I,l,h)},slideToClosest:function Ka(I,l,h,y){void 0===I&&(I=this.params.speed),void 0===l&&(l=!0),void 0===y&&(y=.5);const O=this;if(O.destroyed)return;let z=O.activeIndex;const Oe=Math.min(O.params.slidesPerGroupSkip,z),Be=Oe+Math.floor((z-Oe)/O.params.slidesPerGroup),xe=O.rtlTranslate?O.translate:-O.translate;if(xe>=O.snapGrid[Be]){const mt=O.snapGrid[Be];xe-mt>(O.snapGrid[Be+1]-mt)*y&&(z+=O.params.slidesPerGroup)}else{const mt=O.snapGrid[Be-1];xe-mt<=(O.snapGrid[Be]-mt)*y&&(z-=O.params.slidesPerGroup)}return z=Math.max(z,0),z=Math.min(z,O.slidesGrid.length-1),O.slideTo(z,I,l,h)},slideToClickedSlide:function Dl(){const I=this;if(I.destroyed)return;const{params:l,slidesEl:h}=I,y="auto"===l.slidesPerView?I.slidesPerViewDynamic():l.slidesPerView;let z,O=I.clickedIndex;const Oe=I.isElement?"swiper-slide":`.${l.slideClass}`;if(l.loop){if(I.animating)return;z=parseInt(I.clickedSlide.getAttribute("data-swiper-slide-index"),10),l.centeredSlides?O<I.loopedSlides-y/2||O>I.slides.length-I.loopedSlides+y/2?(I.loopFix(),O=I.getSlideIndex(pi(h,`${Oe}[data-swiper-slide-index="${z}"]`)[0]),po(()=>{I.slideTo(O)})):I.slideTo(O):O>I.slides.length-y?(I.loopFix(),O=I.getSlideIndex(pi(h,`${Oe}[data-swiper-slide-index="${z}"]`)[0]),po(()=>{I.slideTo(O)})):I.slideTo(O)}else I.slideTo(O)}},ve={loopCreate:function F(I){const l=this,{params:h,slidesEl:y}=l;if(!h.loop||l.virtual&&l.params.virtual.enabled)return;const O=()=>{pi(y,`.${h.slideClass}, swiper-slide`).forEach((vt,Gt)=>{vt.setAttribute("data-swiper-slide-index",Gt)})},z=l.grid&&h.grid&&h.grid.rows>1,Oe=h.slidesPerGroup*(z?h.grid.rows:1),xe=z&&l.slides.length%h.grid.rows!=0,mt=gt=>{for(let vt=0;vt<gt;vt+=1){const Gt=l.isElement?Xr("swiper-slide",[h.slideBlankClass]):Xr("div",[h.slideClass,h.slideBlankClass]);l.slidesEl.append(Gt)}};l.slides.length%Oe!=0?(h.loopAddBlankSlides?(mt(Oe-l.slides.length%Oe),l.recalcSlides(),l.updateSlides()):Ar("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may
1not function properly. You need to add more slides (or make duplicates, or empty slides)"),O()):xe?(h.loopAddBlankSlides?(mt(h.grid.rows-l.slides.length%h.grid.rows),l.recalcSlides(),l.updateSlides()):Ar("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),O()):O(),l.loopFix({slideRealIndex:I,direction:h.centeredSlides?void 0:"next"})},loopFix:function fe(I){let{slideRealIndex:l,slideTo:h=!0,direction:y,setTranslate:O,activeSlideIndex:z,byController:Oe,byMousewheel:Be}=void 0===I?{}:I;const xe=this;if(!xe.params.loop)return;xe.emit("beforeLoopFix");const{slides:mt,allowSlidePrev:gt,allowSlideNext:vt,slidesEl:Gt,params:un}=xe,{centeredSlides:fn}=un;if(xe.allowSlidePrev=!0,xe.allowSlideNext=!0,xe.virtual&&un.virtual.enabled)return h&&(un.centeredSlides||0!==xe.snapIndex?un.centeredSlides&&xe.snapIndex<un.slidesPerView?xe.slideTo(xe.virtual.slides.length+xe.snapIndex,0,!1,!0):xe.snapIndex===xe.snapGrid.length-1&&xe.slideTo(xe.virtual.slidesBefore,0,!1,!0):xe.slideTo(xe.virtual.slides.length,0,!1,!0)),xe.allowSlidePrev=gt,xe.allowSlideNext=vt,void xe.emit("loopFix");let Sn=un.slidesPerView;"auto"===Sn?Sn=xe.slidesPerViewDynamic():(Sn=Math.ceil(parseFloat(un.slidesPerView,10)),fn&&Sn%2==0&&(Sn+=1));const Pn=un.slidesPerGroupAuto?Sn:un.slidesPerGroup;let tn=Pn;tn%Pn!=0&&(tn+=Pn-tn%Pn),tn+=un.loopAdditionalSlides,xe.loopedSlides=tn;const kn=xe.grid&&un.grid&&un.grid.rows>1;mt.length<Sn+tn?Ar("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):kn&&"row"===un.grid.fill&&Ar("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const Rn=[],vr=[];let hi=xe.activeIndex;typeof z>"u"?z=xe.getSlideIndex(mt.filter(Kn=>Kn.classList.contains(un.slideActiveClass))[0]):hi=z;const ui="next"===y||!y,Ri="prev"===y||!y;let ni=0,Qr=0;const Zr=kn?Math.ceil(mt.length/un.grid.rows):mt.length,$r=(kn?mt[z].column:z)+(fn&&typeof O>"u"?-Sn/2+.5:0);if($r<tn){ni=Math.max(tn-$r,Pn);for(let Kn=0;Kn<tn-$r;Kn+=1){const yr=Kn-Math.floor(Kn/Zr)*Zr;if(kn){const gi=Zr-yr-1;for(let ci=mt.length-1;ci>=0;ci-=1)mt[ci].column===gi&&Rn.push(ci)}else Rn.push(Zr-yr-1)}}else if($r+Sn>Zr-tn){Qr=Math.max($r-(Zr-2*tn),Pn);for(let Kn=0;Kn<Qr;Kn+=1){const yr=Kn-Math.floor(Kn/Zr)*Zr;kn?mt.forEach((gi,ci)=>{gi.column===yr&&vr.push(ci)}):vr.push(yr)}}if(xe.__preventObserver__=!0,requestAnimationFrame(()=>{xe.__preventObserver__=!1}),Ri&&Rn.forEach(Kn=>{mt[Kn].swiperLoopMoveDOM=!0,Gt.prepend(mt[Kn]),mt[Kn].swiperLoopMoveDOM=!1}),ui&&vr.forEach(Kn=>{mt[Kn].swiperLoopMoveDOM=!0,Gt.append(mt[Kn]),mt[Kn].swiperLoopMoveDOM=!1}),xe.recalcSlides(),"auto"===un.slidesPerView?xe.updateSlides():kn&&(Rn.length>0&&Ri||vr.length>0&&ui)&&xe.slides.forEach((Kn,yr)=>{xe.grid.updateSlide(yr,Kn,xe.slides)}),un.watchSlidesProgress&&xe.updateSlidesOffset(),h)if(Rn.length>0&&Ri)if(typeof l>"u"){const gi=xe.slidesGrid[hi+ni]-xe.slidesGrid[hi];Be?xe.setTranslate(xe.translate-gi):(xe.slideTo(hi+Math.ceil(ni),0,!1,!0),O&&(xe.touchEventsData.startTranslate=xe.touchEventsData.startTranslate-gi,xe.touchEventsData.currentTranslate=xe.touchEventsData.currentTranslate-gi))}else O&&(xe.slideTo(xe.activeIndex+(kn?Rn.length/un.grid.rows:Rn.length),0,!1,!0),xe.touchEventsData.currentTranslate=xe.translate);else if(vr.length>0&&ui)if(typeof l>"u"){const gi=xe.slidesGrid[hi-Qr]-xe.slidesGrid[hi];Be?xe.setTranslate(xe.translate-gi):(xe.slideTo(hi-Qr,0,!1,!0),O&&(xe.touchEventsData.startTranslate=xe.touchEventsData.startTranslate-gi,xe.touchEventsData.currentTranslate=xe.touchEventsData.currentTranslate-gi))}else xe.slideTo(xe.activeIndex-(kn?vr.length/un.grid.rows:vr.length),0,!1,!0);if(xe.allowSlidePrev=gt,xe.allowSlideNext=vt,xe.controller&&xe.controller.control&&!Oe){const Kn={slideRealIndex:l,direction:y,setTranslate:O,activeSlideIndex:z,byController:!0};Array.isArray(xe.controller.control)?xe.controller.control.forEach(yr=>{!yr.destroyed&&yr.params.loop&&yr.loopFix({...Kn,slideTo:yr.params.slidesPerView===un.slidesPerView&&h})}):xe.controller.control instanceof xe.constructor&&xe.controller.control.params.loop&&xe.controller.control.loopFix({...Kn,slideTo:xe.controller.control.params.slidesPerView===un.slidesPerView&&h})}xe.emit("loopFix")},loopDestroy:function $(){const I=this,{params:l,slidesEl:h}=I;if(!l.loop||I.virtual&&I.params.virtual.enabled)return;I.recalcSlides();const y=[];
1I.slides.forEach(O=>{const z=typeof O.swiperSlideIndex>"u"?1*O.getAttribute("data-swiper-slide-index"):O.swiperSlideIndex;y[z]=O}),I.slides.forEach(O=>{O.removeAttribute("data-swiper-slide-index")}),y.forEach(O=>{h.append(O)}),I.recalcSlides(),I.slideTo(I.realIndex,0)}},zn={setGrabCursor:function ht(I){const l=this;if(!l.params.simulateTouch||l.params.watchOverflow&&l.isLocked||l.params.cssMode)return;const h="container"===l.params.touchEventsTarget?l.el:l.wrapperEl;l.isElement&&(l.__preventObserver__=!0),h.style.cursor="move",h.style.cursor=I?"grabbing":"grab",l.isElement&&requestAnimationFrame(()=>{l.__preventObserver__=!1})},unsetGrabCursor:function qt(){const I=this;I.params.watchOverflow&&I.isLocked||I.params.cssMode||(I.isElement&&(I.__preventObserver__=!0),I["container"===I.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",I.isElement&&requestAnimationFrame(()=>{I.__preventObserver__=!1}))}};function Ur(I,l,h){const y=Io(),{params:O}=I,z=O.edgeSwipeDetection,Oe=O.edgeSwipeThreshold;return!z||!(h<=Oe||h>=y.innerWidth-Oe)||"prevent"===z&&(l.preventDefault(),!0)}function Hi(I){const l=this,h=yo();let y=I;y.originalEvent&&(y=y.originalEvent);const O=l.touchEventsData;if("pointerdown"===y.type){if(null!==O.pointerId&&O.pointerId!==y.pointerId)return;O.pointerId=y.pointerId}else"touchstart"===y.type&&1===y.targetTouches.length&&(O.touchId=y.targetTouches[0].identifier);if("touchstart"===y.type)return void Ur(l,y,y.targetTouches[0].pageX);const{params:z,touches:Oe,enabled:Be}=l;if(!Be||!z.simulateTouch&&"mouse"===y.pointerType||l.animating&&z.preventInteractionOnTransition)return;!l.animating&&z.cssMode&&z.loop&&l.loopFix();let xe=y.target;if("wrapper"===z.touchEventsTarget&&!l.wrapperEl.contains(xe)||"which"in y&&3===y.which||"button"in y&&y.button>0||O.isTouched&&O.isMoved)return;const mt=!!z.noSwipingClass&&""!==z.noSwipingClass,gt=y.composedPath?y.composedPath():y.path;mt&&y.target&&y.target.shadowRoot&>&&(xe=gt[0]);const vt=z.noSwipingSelector?z.noSwipingSelector:`.${z.noSwipingClass}`;if(z.noSwiping&&(y.target&&y.target.shadowRoot?function Cr(I,l){return void 0===l&&(l=this),function h(y){if(!y||y===yo()||y===Io())return null;y.assignedSlot&&(y=y.assignedSlot);const O=y.closest(I);return O||y.getRootNode?O||h(y.getRootNode().host):null}(l)}(vt,xe):xe.closest(vt)))return void(l.allowClick=!0);if(z.swipeHandler&&!xe.closest(z.swipeHandler))return;Oe.currentX=y.pageX,Oe.currentY=y.pageY;const un=Oe.currentX,fn=Oe.currentY;if(!Ur(l,y,un))return;Object.assign(O,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),Oe.startX=un,Oe.startY=fn,O.touchStartTime=Vo(),l.allowClick=!0,l.updateSize(),l.swipeDirection=void 0,z.threshold>0&&(O.allowThresholdMove=!1);let Sn=!0;xe.matches(O.focusableElements)&&(Sn=!1,"SELECT"===xe.nodeName&&(O.isTouched=!1)),h.activeElement&&h.activeElement.matches(O.focusableElements)&&h.activeElement!==xe&&h.activeElement.blur(),(z.touchStartForcePreventDefault||Sn&&l.allowTouchMove&&z.touchStartPreventDefault)&&!xe.isContentEditable&&y.preventDefault(),z.freeMode&&z.freeMode.enabled&&l.freeMode&&l.animating&&!z.cssMode&&l.freeMode.onTouchStart(),l.emit("touchStart",y)}function Ss(I){const l=yo(),h=this,y=h.touchEventsData,{params:O,touches:z,rtlTranslate:Oe,enabled:Be}=h;if(!Be||!O.simulateTouch&&"mouse"===I.pointerType)return;let mt,xe=I;if(xe.originalEvent&&(xe=xe.originalEvent),"pointermove"===xe.type&&(null!==y.touchId||xe.pointerId!==y.pointerId))return;if("touchmove"===xe.type){if(mt=[...xe.changedTouches].filter(ui=>ui.identifier===y.touchId)[0],!mt||mt.identifier!==y.touchId)return}else mt=xe;if(!y.isTouched)return void(y.startMoving&&y.isScrolling&&h.emit("touchMoveOpposite",xe));const gt=mt.pageX,vt=mt.pageY;if(xe.preventedByNestedSwiper)return z.startX=gt,void(z.startY=vt);if(!h.allowTouchMove)return xe.target.matches(y.focusableElements)||(h.allowClick=!1),void(y.isTouched&&(Object.assign(z,{startX:gt,startY:vt,currentX:gt,currentY:vt}),y.touchStartTime=Vo()));if(O.touchReleaseOnEdges&&!O.loop)if(h.isVertical()){if(vt<z.startY&&h.translate<=h.maxTranslate()||vt>z.startY&&h.translate>=h.minTranslate())return y.isTouched=!1,void(y.isMoved=!1)}else if(gt<z.startX&&h.translate<=h.maxTranslate()||gt>z.startX&&h.translate>=h.minTranslate())return;if(l.activeElement&&xe.target===l.activeElement&&xe.target.matches(y.focusableElements))return y.isMoved=!0,void(h.allowClick=!1);y.allowTouchCallbacks&&h.emit("touchMove",xe),z.previousX=z.currentX,z.previousY=z.currentY,z.currentX=gt,z.currentY=vt;const Gt=z.currentX-z.startX,un=z.currentY-z.startY;if(h.params.threshold&&Math.sqrt(Gt**2+un**2)<h.params.threshold)return;if(typeof y.isScrolling>"u"){let ui;h.isHorizontal()&&z.currentY===z.startY||h.isVertical()&&z.currentX===z.startX?y.isScrolling=!1:Gt*Gt+un*un>=25&&(ui=180*Math.atan2(Math.abs(un),Math.abs(Gt))/Math.PI,y.isScrolling=h.isHorizontal()?ui>O.touchAngle:90-ui>O.touchAngle)}
vendor: 2,861 bytes, line 1
1if(y.isScrolling&&h.emit("touchMoveOpposite",xe),typeof y.startMoving>"u"&&(z.currentX!==z.startX||z.currentY!==z.startY)&&(y.startMoving=!0),y.isScrolling)return void(y.isTouched=!1);if(!y.startMoving)return;h.allowClick=!1,!O.cssMode&&xe.cancelable&&xe.preventDefault(),O.touchMoveStopPropagation&&!O.nested&&xe.stopPropagation();let fn=h.isHorizontal()?Gt:un,Sn=h.isHorizontal()?z.currentX-z.previousX:z.currentY-z.previousY;O.oneWayMovement&&(fn=Math.abs(fn)*(Oe?1:-1),Sn=Math.abs(Sn)*(Oe?1:-1)),z.diff=fn,fn*=O.touchRatio,Oe&&(fn=-fn,Sn=-Sn);const Pn=h.touchesDirection;h.swipeDirection=fn>0?"prev":"next",h.touchesDirection=Sn>0?"prev":"next";const tn=h.params.loop&&!O.cssMode,kn="next"===h.touchesDirection&&h.allowSlideNext||"prev"===h.touchesDirection&&h.allowSlidePrev;if(!y.isMoved){if(tn&&kn&&h.loopFix({direction:h.swipeDirection}),y.startTranslate=h.getTranslate(),h.setTransition(0),h.animating){const ui=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});h.wrapperEl.dispatchEvent(ui)}y.allowMomentumBounce=!1,O.grabCursor&&(!0===h.allowSlideNext||!0===h.allowSlidePrev)&&h.setGrabCursor(!0),h.emit("sliderFirstMove",xe)}if((new Date).getTime(),y.isMoved&&y.allowThresholdMove&&Pn!==h.touchesDirection&&tn&&kn&&Math.abs(fn)>=1)return Object.assign(z,{startX:gt,startY:vt,currentX:gt,currentY:vt,startTranslate:y.currentTranslate}),y.loopSwapReset=!0,void(y.startTranslate=y.currentTranslate);h.emit("sliderMove",xe),y.isMoved=!0,y.currentTranslate=fn+y.startTranslate;let vr=!0,hi=O.resistanceRatio;if(O.touchReleaseOnEdges&&(hi=0),fn>0?(tn&&kn&&y.allowThresholdMove&&y.currentTranslate>(O.centeredSlides?h.minTranslate()-h.slidesSizesGrid[h.activeIndex+1]:h.minTranslate())&&h.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),y.currentTranslate>h.minTranslate()&&(vr=!1,O.resistance&&(y.currentTranslate=h.minTranslate()-1+(-h.minTranslate()+y.startTranslate+fn)**hi))):fn<0&&(tn&&kn&&y.allowThresholdMove&&y.currentTranslate<(O.centeredSlides?h.maxTranslate()+h.slidesSizesGrid[h.slidesSizesGrid.length-1]:h.maxTranslate())&&h.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:h.slides.length-("auto"===O.slidesPerView?h.slidesPerViewDynamic():Math.ceil(parseFloat(O.slidesPerView,10)))}),y.currentTranslate<h.maxTranslate()&&(vr=!1,O.resistance&&(y.currentTranslate=h.maxTranslate()+1-(h.maxTranslate()-y.startTranslate-fn)**hi))),vr&&(xe.preventedByNestedSwiper=!0),!h.allowSlideNext&&"next"===h.swipeDirection&&y.currentTranslate<y.startTranslate&&(y.currentTranslate=y.startTranslate),!h.allowSlidePrev&&"prev"===h.swipeDirection&&y.currentTranslate>y.startTranslate&&(y.currentTranslate=y.startTranslate),!h.allowSlidePrev&&!h.allowSlideNext&&(y.currentTranslate=y.startTranslate),O.threshold>0){if(!(Math.abs(fn)>O.threshold||y.allowThresholdMove))return void(y.currentTranslate=y.startTranslate);
1if(!y.allowThresholdMove)return y.allowThresholdMove=!0,z.startX=z.currentX,z.startY=z.currentY,y.currentTranslate=y.startTranslate,void(z.diff=h.isHorizontal()?z.currentX-z.startX:z.currentY-z.startY)}!O.followFinger||O.cssMode||((O.freeMode&&O.freeMode.enabled&&h.freeMode||O.watchSlidesProgress)&&(h.updateActiveIndex(),h.updateSlidesClasses()),O.freeMode&&O.freeMode.enabled&&h.freeMode&&h.freeMode.onTouchMove(),h.updateProgress(y.currentTranslate),h.setTranslate(y.currentTranslate))}function Ps(I){const l=this,h=l.touchEventsData;let O,y=I;if(y.originalEvent&&(y=y.originalEvent),"touchend"===y.type||"touchcancel"===y.type){if(O=[...y.changedTouches].filter(hi=>hi.identifier===h.touchId)[0],!O||O.identifier!==h.touchId)return}else{if(null!==h.touchId||y.pointerId!==h.pointerId)return;O=y}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(y.type)&&(!["pointercancel","contextmenu"].includes(y.type)||!l.browser.isSafari&&!l.browser.isWebView))return;h.pointerId=null,h.touchId=null;const{params:Oe,touches:Be,rtlTranslate:xe,slidesGrid:mt,enabled:gt}=l;if(!gt||!Oe.simulateTouch&&"mouse"===y.pointerType)return;if(h.allowTouchCallbacks&&l.emit("touchEnd",y),h.allowTouchCallbacks=!1,!h.isTouched)return h.isMoved&&Oe.grabCursor&&l.setGrabCursor(!1),h.isMoved=!1,void(h.startMoving=!1);Oe.grabCursor&&h.isMoved&&h.isTouched&&(!0===l.allowSlideNext||!0===l.allowSlidePrev)&&l.setGrabCursor(!1);const vt=Vo(),Gt=vt-h.touchStartTime;if(l.allowClick){const hi=y.path||y.composedPath&&y.composedPath();l.updateClickedSlide(hi&&hi[0]||y.target,hi),l.emit("tap click",y),Gt<300&&vt-h.lastClickTime<300&&l.emit("doubleTap doubleClick",y)}if(h.lastClickTime=Vo(),po(()=>{l.destroyed||(l.allowClick=!0)}),!h.isTouched||!h.isMoved||!l.swipeDirection||0===Be.diff&&!h.loopSwapReset||h.currentTranslate===h.startTranslate&&!h.loopSwapReset)return h.isTouched=!1,h.isMoved=!1,void(h.startMoving=!1);let un;if(h.isTouched=!1,h.isMoved=!1,h.startMoving=!1,un=Oe.followFinger?xe?l.translate:-l.translate:-h.currentTranslate,Oe.cssMode)return;if(Oe.freeMode&&Oe.freeMode.enabled)return void l.freeMode.onTouchEnd({currentPos:un});const fn=un>=-l.maxTranslate()&&!l.params.loop;let Sn=0,Pn=l.slidesSizesGrid[0];for(let hi=0;hi<mt.length;hi+=hi<Oe.slidesPerGroupSkip?1:Oe.slidesPerGroup){const ui=hi<Oe.slidesPerGroupSkip-1?1:Oe.slidesPerGroup;typeof mt[hi+ui]<"u"?(fn||un>=mt[hi]&&un<mt[hi+ui])&&(Sn=hi,Pn=mt[hi+ui]-mt[hi]):(fn||un>=mt[hi])&&(Sn=hi,Pn=mt[mt.length-1]-mt[mt.length-2])}let tn=null,kn=null;Oe.rewind&&(l.isBeginning?kn=Oe.virtual&&Oe.virtual.enabled&&l.virtual?l.virtual.slides.length-1:l.slides.length-1:l.isEnd&&(tn=0));const Rn=(un-mt[Sn])/Pn,vr=Sn<Oe.slidesPerGroupSkip-1?1:Oe.slidesPerGroup;if(Gt>Oe.longSwipesMs){if(!Oe.longSwipes)return void l.slideTo(l.activeIndex);"next"===l.swipeDirection&&l.slideTo(Rn>=Oe.longSwipesRatio?Oe.rewind&&l.isEnd?tn:Sn+vr:Sn),"prev"===l.swipeDirection&&(Rn>1-Oe.longSwipesRatio?l.slideTo(Sn+vr):null!==kn&&Rn<0&&Math.abs(Rn)>Oe.longSwipesRatio?l.slideTo(kn):l.slideTo(Sn))}else{if(!Oe.shortSwipes)return void l.slideTo(l.activeIndex);!l.navigation||y.target!==l.navigation.nextEl&&y.target!==l.navigation.prevEl?("next"===l.swipeDirection&&l.slideTo(null!==tn?tn:Sn+vr),"prev"===l.swipeDirection&&l.slideTo(null!==kn?kn:Sn)):l.slideTo(y.target===l.navigation.nextEl?Sn+vr:Sn)}}function So(){const I=this,{params:l,el:h}=I;if(h&&0===h.offsetWidth)return;l.breakpoints&&I.setBreakpoint();const{allowSlideNext:y,allowSlidePrev:O,snapGrid:z}=I,Oe=I.virtual&&I.params.virtual.enabled;I.allowSlideNext=!0,I.allowSlidePrev=!0,I.updateSize(),I.updateSlides(),I.updateSlidesClasses(),!("auto"===l.slidesPerView||l.slidesPerView>1)||!I.isEnd||I.isBeginning||I.params.centeredSlides||Oe&&l.loop?I.params.loop&&!Oe?I.slideToLoop(I.realIndex,0,!1,!0):I.slideTo(I.activeIndex,0,!1,!0):I.slideTo(I.slides.length-1,0,!1,!0),I.autoplay&&I.autoplay.running&&I.autoplay.paused&&(clearTimeout(I.autoplay.resizeTimeout),I.autoplay.resizeTimeout=setTimeout(()=>{I.autoplay&&I.autoplay.running&&I.autoplay.paused&&I.autoplay.resume()},500)),I.allowSlidePrev=O,I.allowSlideNext=y,I.params.watchOverflow&&z!==I.snapGrid&&I.checkOverflow()}function Wl(I){const l=this;l.enabled&&(l.allowClick||(l.params.preventClicks&&I.preventDefault(),l.params.preventClicksPropagation&&l.animating&&(I.stopPropagation(),I.stopImmediatePropagation())))}function zl(){const I=this,{wrapperEl:l,rtlTranslate:h,enabled:y}=I;if(!y)return;let O;I.previousTranslate=I.translate,I.translate=I.isHorizontal()?-l.scrollLeft:-l.scrollTop,0===I.translate&&(I.translate=0),I.updateActiveIndex(),I.updateSlidesClasses();const z=I.maxTranslate()-I.minTranslate();O=0===z?0:(I.translate-I.minTranslate())/z,O!==I.progress&&I.updateProgress(h?-I.translate:I.translate),I.emit("setTranslate",I.translate,!1)}function Hl(I){const l=this;Bo(l,I.target),!l.params.cssMode&&("auto"===l.params.slidesPerView||l.params.autoHeight)&&l.update(
1)}function mu(){const I=this;I.documentTouchHandlerProceeded||(I.documentTouchHandlerProceeded=!0,I.params.touchReleaseOnEdges&&(I.el.style.touchAction="auto"))}const Ya=(I,l)=>{const h=yo(),{params:y,el:O,wrapperEl:z,device:Oe}=I,Be=!!y.nested,xe="on"===l?"addEventListener":"removeEventListener",mt=l;h[xe]("touchstart",I.onDocumentTouchStart,{passive:!1,capture:Be}),O[xe]("touchstart",I.onTouchStart,{passive:!1}),O[xe]("pointerdown",I.onTouchStart,{passive:!1}),h[xe]("touchmove",I.onTouchMove,{passive:!1,capture:Be}),h[xe]("pointermove",I.onTouchMove,{passive:!1,capture:Be}),h[xe]("touchend",I.onTouchEnd,{passive:!0}),h[xe]("pointerup",I.onTouchEnd,{passive:!0}),h[xe]("pointercancel",I.onTouchEnd,{passive:!0}),h[xe]("touchcancel",I.onTouchEnd,{passive:!0}),h[xe]("pointerout",I.onTouchEnd,{passive:!0}),h[xe]("pointerleave",I.onTouchEnd,{passive:!0}),h[xe]("contextmenu",I.onTouchEnd,{passive:!0}),(y.preventClicks||y.preventClicksPropagation)&&O[xe]("click",I.onClick,!0),y.cssMode&&z[xe]("scroll",I.onScroll),I[mt](y.updateOnWindowResize?Oe.ios||Oe.android?"resize orientationchange observerUpdate":"resize observerUpdate":"observerUpdate",So,!0),O[xe]("load",I.onLoad,{capture:!0})};var Bu={attachEvents:function vu(){const I=this,{params:l}=I;I.onTouchStart=Hi.bind(I),I.onTouchMove=Ss.bind(I),I.onTouchEnd=Ps.bind(I),I.onDocumentTouchStart=mu.bind(I),l.cssMode&&(I.onScroll=zl.bind(I)),I.onClick=Wl.bind(I),I.onLoad=Hl.bind(I),Ya(I,"on")},detachEvents:function ys(){Ya(this,"off")}};const Kl=(I,l)=>I.grid&&l.grid&&l.grid.rows>1;var $u={setBreakpoint:function uc(){const I=this,{realIndex:l,initialized:h,params:y,el:O}=I,z=y.breakpoints;if(!z||z&&0===Object.keys(z).length)return;const Oe=I.getBreakpoint(z,I.params.breakpointsBase,I.el);if(!Oe||I.currentBreakpoint===Oe)return;const xe=(Oe in z?z[Oe]:void 0)||I.originalParams,mt=Kl(I,y),gt=Kl(I,xe),vt=y.enabled;mt&&!gt?(O.classList.remove(`${y.containerModifierClass}grid`,`${y.containerModifierClass}grid-column`),I.emitContainerClasses()):!mt&>&&(O.classList.add(`${y.containerModifierClass}grid`),(xe.grid.fill&&"column"===xe.grid.fill||!xe.grid.fill&&"column"===y.grid.fill)&&O.classList.add(`${y.containerModifierClass}grid-column`),I.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(tn=>{if(typeof xe[tn]>"u")return;const kn=y[tn]&&y[tn].enabled,Rn=xe[tn]&&xe[tn].enabled;kn&&!Rn&&I[tn].disable(),!kn&&Rn&&I[tn].enable()});const Gt=xe.direction&&xe.direction!==y.direction,un=y.loop&&(xe.slidesPerView!==y.slidesPerView||Gt),fn=y.loop;Gt&&h&&I.changeDirection(),xn(I.params,xe);const Sn=I.params.enabled,Pn=I.params.loop;Object.assign(I,{allowTouchMove:I.params.allowTouchMove,allowSlideNext:I.params.allowSlideNext,allowSlidePrev:I.params.allowSlidePrev}),vt&&!Sn?I.disable():!vt&&Sn&&I.enable(),I.currentBreakpoint=Oe,I.emit("_beforeBreakpoint",xe),h&&(un?(I.loopDestroy(),I.loopCreate(l),I.updateSlides()):!fn&&Pn?(I.loopCreate(l),I.updateSlides()):fn&&!Pn&&I.loopDestroy()),I.emit("breakpoint",xe)},getBreakpoint:function Zl(I,l,h){if(void 0===l&&(l="window"),!I||"container"===l&&!h)return;let y=!1;const O=Io(),z="window"===l?O.innerHeight:h.clientHeight,Oe=Object.keys(I).map(Be=>{if("string"==typeof Be&&0===Be.indexOf("@")){const xe=parseFloat(Be.substr(1));return{value:z*xe,point:Be}}return{value:Be,point:Be}});Oe.sort((Be,xe)=>parseInt(Be.value,10)-parseInt(xe.value,10));for(let Be=0;Be<Oe.length;Be+=1){const{point:xe,value:mt}=Oe[Be];"window"===l?O.matchMedia(`(min-width: ${mt}px)`).matches&&(y=xe):mt<=h.clientWidth&&(y=xe)}return y||"max"}},ju={addClasses:function yu(){const I=this,{classNames:l,params:h,rtl:y,el:O,device:z}=I,Oe=function cc(I,l){const h=[];return I.forEach(y=>{"object"==typeof y?Object.keys(y).forEach(O=>{y[O]&&h.push(l+O)}):"string"==typeof y&&h.push(l+y)}),h}(["initialized",h.direction,{"free-mode":I.params.freeMode&&h.freeMode.enabled},{autoheight:h.autoHeight},{rtl:y},{grid:h.grid&&h.grid.rows>1},{"grid-column":h.grid&&h.grid.rows>1&&"column"===h.grid.fill},{android:z.android},{ios:z.ios},{"css-mode":h.cssMode},{centered:h.cssMode&&h.centeredSlides},{"watch-progress":h.watchSlidesProgress}],h.containerModifierClass);l.push(...Oe),O.classList.add(...l),I.emitContainerClasses()},removeClasses:function zo(){const{el:l,classNames:h}=this;l.classList.remove(...h),this.emitContainerClasses()}},Zs={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",
1spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function cs(I,l){return function(y){void 0===y&&(y={});const O=Object.keys(y)[0],z=y[O];"object"==typeof z&&null!==z?(!0===I[O]&&(I[O]={enabled:!0}),"navigation"===O&&I[O]&&I[O].enabled&&!I[O].prevEl&&!I[O].nextEl&&(I[O].auto=!0),["pagination","scrollbar"].indexOf(O)>=0&&I[O]&&I[O].enabled&&!I[O].el&&(I[O].auto=!0),O in I&&"enabled"in z?("object"==typeof I[O]&&!("enabled"in I[O])&&(I[O].enabled=!0),I[O]||(I[O]={enabled:!1}),xn(l,y)):xn(l,y)):xn(l,y)}}const ls={eventsEmitter:zs,update:fu,translate:_l,transition:al,slide:aa,loop:ve,grabCursor:zn,events:Bu,breakpoints:$u,checkOverflow:{checkOverflow:function yl(){const I=this,{isLocked:l,params:h}=I,{slidesOffsetBefore:y}=h;if(y){const O=I.slides.length-1;I.isLocked=I.size>I.slidesGrid[O]+I.slidesSizesGrid[O]+2*y}else I.isLocked=1===I.snapGrid.length;!0===h.allowSlideNext&&(I.allowSlideNext=!I.isLocked),!0===h.allowSlidePrev&&(I.allowSlidePrev=!I.isLocked),l&&l!==I.isLocked&&(I.isEnd=!1),l!==I.isLocked&&I.emit(I.isLocked?"lock":"unlock")}},classes:ju},so={};class Da{constructor(){let l,h;for(var y=arguments.length,O=new Array(y),z=0;z<y;z++)O[z]=arguments[z];1===O.length&&O[0].constructor&&"Object"===Object.prototype.toString.call(O[0]).slice(8,-1)?h=O[0]:[l,h]=O,h||(h={}),h=xn({},h),l&&!h.el&&(h.el=l);const Oe=yo();if(h.el&&"string"==typeof h.el&&Oe.querySelectorAll(h.el).length>1){const gt=[];return Oe.querySelectorAll(h.el).forEach(vt=>{const Gt=xn({},h,{el:vt});gt.push(new Da(Gt))}),gt}const Be=this;Be.__swiper__=!0,Be.support=xa(),Be.device=Fu({userAgent:h.userAgent}),Be.browser=function ja(){return io||(io=function ts(){const I=Io(),l=Fu();let h=!1;function y(){const Be=I.navigator.userAgent.toLowerCase();return Be.indexOf("safari")>=0&&Be.indexOf("chrome")<0&&Be.indexOf("android")<0}if(y()){const Be=String(I.navigator.userAgent);if(Be.includes("Version/")){const[xe,mt]=Be.split("Version/")[1].split(" ")[0].split(".").map(gt=>Number(gt));h=xe<16||16===xe&&mt<2}}const O=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(I.navigator.userAgent),z=y();return{isSafari:h||z,needPerspectiveFix:h,need3dFix:z||O&&l.ios,isWebView:O}}()),io}(),Be.eventsListeners={},Be.eventsAnyListeners=[],Be.modules=[...Be.__modules__],h.modules&&Array.isArray(h.modules)&&Be.modules.push(...h.modules);const xe={};Be.modules.forEach(gt=>{gt({params:h,swiper:Be,extendParams:cs(h,xe),on:Be.on.bind(Be),once:Be.once.bind(Be),off:Be.off.bind(Be),emit:Be.emit.bind(Be)})});const mt=xn({},Zs,xe);return Be.params=xn({},mt,so,h),Be.originalParams=xn({},Be.params),Be.passedParams=xn({}
1,h),Be.params&&Be.params.on&&Object.keys(Be.params.on).forEach(gt=>{Be.on(gt,Be.params.on[gt])}),Be.params&&Be.params.onAny&&Be.onAny(Be.params.onAny),Object.assign(Be,{enabled:Be.params.enabled,el:l,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===Be.params.direction,isVertical:()=>"vertical"===Be.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:Be.params.allowSlideNext,allowSlidePrev:Be.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:Be.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:Be.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),Be.emit("_swiper"),Be.params.init&&Be.init(),Be}getDirectionLabel(l){return this.isHorizontal()?l:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[l]}getSlideIndex(l){const{slidesEl:h,params:y}=this,z=sa(pi(h,`.${y.slideClass}, swiper-slide`)[0]);return sa(l)-z}getSlideIndexByData(l){return this.getSlideIndex(this.slides.filter(h=>1*h.getAttribute("data-swiper-slide-index")===l)[0])}recalcSlides(){const{slidesEl:h,params:y}=this;this.slides=pi(h,`.${y.slideClass}, swiper-slide`)}enable(){const l=this;l.enabled||(l.enabled=!0,l.params.grabCursor&&l.setGrabCursor(),l.emit("enable"))}disable(){const l=this;l.enabled&&(l.enabled=!1,l.params.grabCursor&&l.unsetGrabCursor(),l.emit("disable"))}setProgress(l,h){const y=this;l=Math.min(Math.max(l,0),1);const O=y.minTranslate(),Oe=(y.maxTranslate()-O)*l+O;y.translateTo(Oe,typeof h>"u"?0:h),y.updateActiveIndex(),y.updateSlidesClasses()}emitContainerClasses(){const l=this;if(!l.params._emitClasses||!l.el)return;const h=l.el.className.split(" ").filter(y=>0===y.indexOf("swiper")||0===y.indexOf(l.params.containerModifierClass));l.emit("_containerClasses",h.join(" "))}getSlideClasses(l){const h=this;return h.destroyed?"":l.className.split(" ").filter(y=>0===y.indexOf("swiper-slide")||0===y.indexOf(h.params.slideClass)).join(" ")}emitSlidesClasses(){const l=this;if(!l.params._emitClasses||!l.el)return;const h=[];l.slides.forEach(y=>{const O=l.getSlideClasses(y);h.push({slideEl:y,classNames:O}),l.emit("_slideClass",y,O)}),l.emit("_slideClasses",h)}slidesPerViewDynamic(l,h){void 0===l&&(l="current"),void 0===h&&(h=!1);const{params:O,slides:z,slidesGrid:Oe,slidesSizesGrid:Be,size:xe,activeIndex:mt}=this;let gt=1;if("number"==typeof O.slidesPerView)return O.slidesPerView;if(O.centeredSlides){let Gt,vt=z[mt]?Math.ceil(z[mt].swiperSlideSize):0;for(let un=mt+1;un<z.length;un+=1)z[un]&&!Gt&&(vt+=Math.ceil(z[un].swiperSlideSize),gt+=1,vt>xe&&(Gt=!0));for(let un=mt-1;un>=0;un-=1)z[un]&&!Gt&&(vt+=z[un].swiperSlideSize,gt+=1,vt>xe&&(Gt=!0))}else if("current"===l)for(let vt=mt+1;vt<z.length;vt+=1)(h?Oe[vt]+Be[vt]-Oe[mt]<xe:Oe[vt]-Oe[mt]<xe)&&(gt+=1);else for(let vt=mt-1;vt>=0;vt-=1)Oe[mt]-Oe[vt]<xe&&(gt+=1);return gt}update(){const l=this;if(!l||l.destroyed)return;const{snapGrid:h,params:y}=l;function O(){const Be=Math.min(Math.max(l.rtlTranslate?-1*l.translate:l.translate,l.maxTranslate()),l.minTranslate());l.setTranslate(Be),l.updateActiveIndex(),l.updateSlidesClasses()}let z;y.breakpoints&&l.setBreakpoint(),[...l.el.querySelectorAll('[loading="lazy"]')].forEach(Oe=>{Oe.complete&&Bo(l,Oe)}),l.updateSize(),l.updateSlides(),l.updateProgress(),l.updateSlidesClasses(),y.freeMode&&y.freeMode.enabled&&!y.cssMode?(O(),y.autoHeight&&l.updateAutoHeight()):(z=l.slideTo(("auto"===y.slidesPerView||y.slidesPerView>1)&&l.isEnd&&!y.centeredSlides?(l.virtual&&y.virtual.enabled?l.virtual.slides:l.slides).length-1:l.activeIndex,0,!1,!0),z||O()),y.watchOverflow&&h!==l.snapGrid&&l.checkOverflow(),l.emit("update")}changeDirection(l,h){void 0===h&&(h=!0);const y=this,O=y.params.direction;return l||(l="horizontal"===O?"vertical":"horizontal"),l===O||"horizontal"!==l&&"vertical"!==l||(y.el.classList.remove(`${y.params.containerModifierClass}${O}`),y.el.classList.add(`${y.params.containerModifierClass}${l}`),y.emitContainerClasses(),y.params.direction=l,y.slides.forEac
1h(z=>{"vertical"===l?z.style.width="":z.style.height=""}),y.emit("changeDirection"),h&&y.update()),y}changeLanguageDirection(l){const h=this;h.rtl&&"rtl"===l||!h.rtl&&"ltr"===l||(h.rtl="rtl"===l,h.rtlTranslate="horizontal"===h.params.direction&&h.rtl,h.rtl?(h.el.classList.add(`${h.params.containerModifierClass}rtl`),h.el.dir="rtl"):(h.el.classList.remove(`${h.params.containerModifierClass}rtl`),h.el.dir="ltr"),h.update())}mount(l){const h=this;if(h.mounted)return!0;let y=l||h.params.el;if("string"==typeof y&&(y=document.querySelector(y)),!y)return!1;y.swiper=h,y.parentNode&&y.parentNode.host&&y.parentNode.host.nodeName===h.params.swiperElementNodeName.toUpperCase()&&(h.isElement=!0);const O=()=>`.${(h.params.wrapperClass||"").trim().split(" ").join(".")}`;let Oe=y&&y.shadowRoot&&y.shadowRoot.querySelector?y.shadowRoot.querySelector(O()):pi(y,O())[0];return!Oe&&h.params.createElements&&(Oe=Xr("div",h.params.wrapperClass),y.append(Oe),pi(y,`.${h.params.slideClass}`).forEach(Be=>{Oe.append(Be)})),Object.assign(h,{el:y,wrapperEl:Oe,slidesEl:h.isElement&&!y.parentNode.host.slideSlots?y.parentNode.host:Oe,hostEl:h.isElement?y.parentNode.host:y,mounted:!0,rtl:"rtl"===y.dir.toLowerCase()||"rtl"===uo(y,"direction"),rtlTranslate:"horizontal"===h.params.direction&&("rtl"===y.dir.toLowerCase()||"rtl"===uo(y,"direction")),wrongRTL:"-webkit-box"===uo(Oe,"display")}),!0}init(l){const h=this;if(h.initialized||!1===h.mount(l))return h;h.emit("beforeInit"),h.params.breakpoints&&h.setBreakpoint(),h.addClasses(),h.updateSize(),h.updateSlides(),h.params.watchOverflow&&h.checkOverflow(),h.params.grabCursor&&h.enabled&&h.setGrabCursor(),h.slideTo(h.params.loop&&h.virtual&&h.params.virtual.enabled?h.params.initialSlide+h.virtual.slidesBefore:h.params.initialSlide,0,h.params.runCallbacksOnInit,!1,!0),h.params.loop&&h.loopCreate(),h.attachEvents();const O=[...h.el.querySelectorAll('[loading="lazy"]')];return h.isElement&&O.push(...h.hostEl.querySelectorAll('[loading="lazy"]')),O.forEach(z=>{z.complete?Bo(h,z):z.addEventListener("load",Oe=>{Bo(h,Oe.target)})}),Jl(h),h.initialized=!0,Jl(h),h.emit("init"),h.emit("afterInit"),h}destroy(l,h){void 0===l&&(l=!0),void 0===h&&(h=!0);const y=this,{params:O,el:z,wrapperEl:Oe,slides:Be}=y;return typeof y.params>"u"||y.destroyed||(y.emit("beforeDestroy"),y.initialized=!1,y.detachEvents(),O.loop&&y.loopDestroy(),h&&(y.removeClasses(),z.removeAttribute("style"),Oe.removeAttribute("style"),Be&&Be.length&&Be.forEach(xe=>{xe.classList.remove(O.slideVisibleClass,O.slideFullyVisibleClass,O.slideActiveClass,O.slideNextClass,O.slidePrevClass),xe.removeAttribute("style"),xe.removeAttribute("data-swiper-slide-index")})),y.emit("destroy"),Object.keys(y.eventsListeners).forEach(xe=>{y.off(xe)}),!1!==l&&(y.el.swiper=null,function lo(I){const l=I;Object.keys(l).forEach(h=>{try{l[h]=null}catch{}try{delete l[h]}catch{}})}(y)),y.destroyed=!0),null}static extendDefaults(l){xn(so,l)}static get extendedDefaults(){return so}static get defaults(){return Zs}static installModule(l){Da.prototype.__modules__||(Da.prototype.__modules__=[]);const h=Da.prototype.__modules__;"function"==typeof l&&h.indexOf(l)<0&&h.push(l)}static use(l){return Array.isArray(l)?(l.forEach(h=>Da.installModule(h)),Da):(Da.installModule(l),Da)}}function eu(I,l,h,y){return I.params.createElements&&Object.keys(y).forEach(O=>{if(!h[O]&&!0===h.auto){let z=pi(I.el,`.${y[O]}`)[0];z||(z=Xr("div",y[O]),z.className=y[O],I.el.append(z)),h[O]=z,l[O]=z}}),h}function ul(I){return void 0===I&&(I=""),`.${I.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Yl(I){const l=this,{params:h,slidesEl:y}=l;h.loop&&l.loopDestroy();const O=z=>{if("string"==typeof z){const Oe=document.createElement("div");Oe.innerHTML=z,y.append(Oe.children[0]),Oe.innerHTML=""}else y.append(z)};if("object"==typeof I&&"length"in I)for(let z=0;z<I.length;z+=1)I[z]&&O(I[z]);else O(I);l.recalcSlides(),h.loop&&l.loopCreate(),(!h.observer||l.isElement)&&l.update()}function ta(I){const l=this,{params:h,activeIndex:y,slidesEl:O}=l;h.loop&&l.loopDestroy();let z=y+1;const Oe=Be=>{if("string"==typeof Be){const xe=document.createElement("div");xe.innerHTML=Be,O.prepend(xe.children[0]),xe.innerHTML=""}else O.prepend(Be)};if("object"==typeof I&&"length"in I){for(let Be=0;Be<I.length;Be+=1)I[Be]&&Oe(I[Be]);z=y+I.length}else Oe(I);l.recalcSlides(),h.loop&&l.loopCreate(),(!h.observer||l.isElement)&&l.update(
1),l.slideTo(z,0,!1)}function zu(I,l){const h=this,{params:y,activeIndex:O,slidesEl:z}=h;let Oe=O;y.loop&&(Oe-=h.loopedSlides,h.loopDestroy(),h.recalcSlides());const Be=h.slides.length;if(I<=0)return void h.prependSlide(l);if(I>=Be)return void h.appendSlide(l);let xe=Oe>I?Oe+1:Oe;const mt=[];for(let gt=Be-1;gt>=I;gt-=1){const vt=h.slides[gt];vt.remove(),mt.unshift(vt)}if("object"==typeof l&&"length"in l){for(let gt=0;gt<l.length;gt+=1)l[gt]&&z.append(l[gt]);xe=Oe>I?Oe+l.length:Oe}else z.append(l);for(let gt=0;gt<mt.length;gt+=1)z.append(mt[gt]);h.recalcSlides(),y.loop&&h.loopCreate(),(!y.observer||h.isElement)&&h.update(),h.slideTo(y.loop?xe+h.loopedSlides:xe,0,!1)}function Lo(I){const l=this,{params:h,activeIndex:y}=l;let O=y;h.loop&&(O-=l.loopedSlides,l.loopDestroy());let Oe,z=O;if("object"==typeof I&&"length"in I){for(let Be=0;Be<I.length;Be+=1)Oe=I[Be],l.slides[Oe]&&l.slides[Oe].remove(),Oe<z&&(z-=1);z=Math.max(z,0)}else Oe=I,l.slides[Oe]&&l.slides[Oe].remove(),Oe<z&&(z-=1),z=Math.max(z,0);l.recalcSlides(),h.loop&&l.loopCreate(),(!h.observer||l.isElement)&&l.update(),l.slideTo(h.loop?z+l.loopedSlides:z,0,!1)}function wu(){const I=this,l=[];for(let h=0;h<I.slides.length;h+=1)l.push(h);I.removeSlide(l)}function nn(I){const{effect:l,swiper:h,on:y,setTranslate:O,setTransition:z,overwriteParams:Oe,perspective:Be,recreateShadows:xe,getEffectParams:mt}=I;let gt;y("beforeInit",()=>{if(h.params.effect!==l)return;h.classNames.push(`${h.params.containerModifierClass}${l}`),Be&&Be()&&h.classNames.push(`${h.params.containerModifierClass}3d`);const vt=Oe?Oe():{};Object.assign(h.params,vt),Object.assign(h.originalParams,vt)}),y("setTranslate",()=>{h.params.effect===l&&O()}),y("setTransition",(vt,Gt)=>{h.params.effect===l&&z(Gt)}),y("transitionEnd",()=>{if(h.params.effect===l&&xe){if(!mt||!mt().slideShadows)return;h.slides.forEach(vt=>{vt.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(Gt=>Gt.remove())}),xe()}}),y("virtualUpdate",()=>{h.params.effect===l&&(h.slides.length||(gt=!0),requestAnimationFrame(()=>{gt&&h.slides&&h.slides.length&&(O(),gt=!1)}))})}function _r(I,l){const h=ji(l);return h!==l&&(h.style.backfaceVisibility="hidden",h.style["-webkit-backface-visibility"]="hidden"),h}function Wr(I){let{swiper:l,duration:h,transformElements:y,allSlides:O}=I;const{activeIndex:z}=l;if(l.params.virtualTranslate&&0!==h){let xe,Be=!1;xe=O?y:y.filter(mt=>{const gt=mt.classList.contains("swiper-slide-transform")?(Be=>Be.parentElement?Be.parentElement:l.slides.filter(mt=>mt.shadowRoot&&mt.shadowRoot===Be.parentNode)[0])(mt):mt;return l.getSlideIndex(gt)===z}),xe.forEach(mt=>{ya(mt,()=>{if(Be||!l||l.destroyed)return;Be=!0,l.animating=!1;const gt=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});l.wrapperEl.dispatchEvent(gt)})})}}function _s(I,l,h){const y=`swiper-slide-shadow${h?`-${h}`:""}${I?` swiper-slide-shadow-${I}`:""}`,O=ji(l);let z=O.querySelector(`.${y.split(" ").join(".")}`);return z||(z=Xr("div",y.split(" ")),O.append(z)),z}Object.keys(ls).forEach(I=>{Object.keys(ls[I]).forEach(l=>{Da.prototype[l]=ls[I][l]})}),Da.use([function Es(I){let{swiper:l,on:h,emit:y}=I;const O=Io();let z=null,Oe=null;const Be=()=>{!l||l.destroyed||!l.initialized||(y("beforeResize"),y("resize"))},gt=()=>{!l||l.destroyed||!l.initialized||y("orientationchange")};h("init",()=>{l.params.resizeObserver&&typeof O.ResizeObserver<"u"?!l||l.destroyed||!l.initialized||(z=new ResizeObserver(vt=>{Oe=O.requestAnimationFrame(()=>{const{width:Gt,height:un}=l;let fn=Gt,Sn=un;vt.forEach(Pn=>{let{contentBoxSize:tn,contentRect:kn,target:Rn}=Pn;Rn&&Rn!==l.el||(fn=kn?kn.width:(tn[0]||tn).inlineSize,Sn=kn?kn.height:(tn[0]||tn).blockSize)}),(fn!==Gt||Sn!==un)&&Be()})}),z.observe(l.el)):(O.addEventListener("resize",Be),O.addEventListener("orientationchange",gt))}),h("destroy",()=>{Oe&&O.cancelAnimationFrame(Oe),z&&z.unobserve&&l.el&&(z.unobserve(l.el),z=null),O.removeEventListener("resize",Be),O.removeEventListener("orientationchange",gt)})},function Aa(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;const z=[],Oe=Io(),Be=function(gt,vt){void 0===vt&&(vt={});const un=new(Oe.MutationObserver||Oe.WebkitMutationObserver)(fn=>{if(l.__preventObserver__)return;if(1===fn.length)return void O("observerUpdate",fn[0]);const Sn=function(){O("observerUpdate",fn[0])};Oe.requestAnimationFrame?Oe.requestAnimationFrame(Sn):Oe.setTimeout(Sn,0)});un.observe(gt,{attributes:typeof vt.attributes>"u"||vt.attributes,childList:typeof vt.childList>"u"||vt.childList,characterData:typeof vt.characterData>"u"||vt.characterData}
1),z.push(un)};h({observer:!1,observeParents:!1,observeSlideChildren:!1}),y("init",()=>{if(l.params.observer){if(l.params.observeParents){const gt=ro(l.hostEl);for(let vt=0;vt<gt.length;vt+=1)Be(gt[vt])}Be(l.hostEl,{childList:l.params.observeSlideChildren}),Be(l.wrapperEl,{attributes:!1})}}),y("destroy",()=>{z.forEach(gt=>{gt.disconnect()}),z.splice(0,z.length)})}]);const Mo=[function ql(I){let z,{swiper:l,extendParams:h,on:y,emit:O}=I;h({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const Oe=yo();l.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const Be=Oe.createElement("div");function xe(fn,Sn){const Pn=l.params.virtual;if(Pn.cache&&l.virtual.cache[Sn])return l.virtual.cache[Sn];let tn;return Pn.renderSlide?(tn=Pn.renderSlide.call(l,fn,Sn),"string"==typeof tn&&(Be.innerHTML=tn,tn=Be.children[0])):tn=l.isElement?Xr("swiper-slide"):Xr("div",l.params.slideClass),tn.setAttribute("data-swiper-slide-index",Sn),Pn.renderSlide||(tn.innerHTML=fn),Pn.cache&&(l.virtual.cache[Sn]=tn),tn}function mt(fn){const{slidesPerView:Sn,slidesPerGroup:Pn,centeredSlides:tn,loop:kn}=l.params,{addSlidesBefore:Rn,addSlidesAfter:vr}=l.params.virtual,{from:hi,to:ui,slides:Ri,slidesGrid:ni,offset:Qr}=l.virtual;l.params.cssMode||l.updateActiveIndex();const Zr=l.activeIndex||0;let Si,$r,Kn;Si=l.rtlTranslate?"right":l.isHorizontal()?"left":"top",tn?($r=Math.floor(Sn/2)+Pn+vr,Kn=Math.floor(Sn/2)+Pn+Rn):($r=Sn+(Pn-1)+vr,Kn=(kn?Sn:Pn)+Rn);let yr=Zr-Kn,gi=Zr+$r;kn||(yr=Math.max(yr,0),gi=Math.min(gi,Ri.length-1));let ci=(l.slidesGrid[yr]||0)-(l.slidesGrid[0]||0);function Ui(){l.updateSlides(),l.updateProgress(),l.updateSlidesClasses(),O("virtualUpdate")}if(kn&&Zr>=Kn?(yr-=Kn,tn||(ci+=l.slidesGrid[0])):kn&&Zr<Kn&&(yr=-Kn,tn&&(ci+=l.slidesGrid[0])),Object.assign(l.virtual,{from:yr,to:gi,offset:ci,slidesGrid:l.slidesGrid,slidesBefore:Kn,slidesAfter:$r}),hi===yr&&ui===gi&&!fn)return l.slidesGrid!==ni&&ci!==Qr&&l.slides.forEach(rs=>{rs.style[Si]=ci-Math.abs(l.cssOverflowAdjustment())+"px"}),l.updateProgress(),void O("virtualUpdate");if(l.params.virtual.renderExternal)return l.params.virtual.renderExternal.call(l,{offset:ci,from:yr,to:gi,slides:function(){const gs=[];for(let Ko=yr;Ko<=gi;Ko+=1)gs.push(Ri[Ko]);return gs}()}),void(l.params.virtual.renderExternalUpdate?Ui():O("virtualUpdate"));const Dr=[],ai=[],Ei=rs=>{let gs=rs;return rs<0?gs=Ri.length+rs:gs>=Ri.length&&(gs-=Ri.length),gs};if(fn)l.slides.filter(rs=>rs.matches(`.${l.params.slideClass}, swiper-slide`)).forEach(rs=>{rs.remove()});else for(let rs=hi;rs<=ui;rs+=1)if(rs<yr||rs>gi){const gs=Ei(rs);l.slides.filter(Ko=>Ko.matches(`.${l.params.slideClass}[data-swiper-slide-index="${gs}"], swiper-slide[data-swiper-slide-index="${gs}"]`)).forEach(Ko=>{Ko.remove()})}const Ys=kn?2*Ri.length:Ri.length;for(let rs=kn?-Ri.length:0;rs<Ys;rs+=1)if(rs>=yr&&rs<=gi){const gs=Ei(rs);typeof ui>"u"||fn?ai.push(gs):(rs>ui&&ai.push(gs),rs<hi&&Dr.push(gs))}if(ai.forEach(rs=>{l.slidesEl.append(xe(Ri[rs],rs))}),kn)for(let rs=Dr.length-1;rs>=0;rs-=1){const gs=Dr[rs];l.slidesEl.prepend(xe(Ri[gs],gs))}else Dr.sort((rs,gs)=>gs-rs),Dr.forEach(rs=>{l.slidesEl.prepend(xe(Ri[rs],rs))});pi(l.slidesEl,".swiper-slide, swiper-slide").forEach(rs=>{rs.style[Si]=ci-Math.abs(l.cssOverflowAdjustment())+"px"}),Ui()}y("beforeInit",()=>{if(!l.params.virtual.enabled)return;let fn;if(typeof l.passedParams.virtual.slides>"u"){const Sn=[...l.slidesEl.children].filter(Pn=>Pn.matches(`.${l.params.slideClass}, swiper-slide`));Sn&&Sn.length&&(l.virtual.slides=[...Sn],fn=!0,Sn.forEach((Pn,tn)=>{Pn.setAttribute("data-swiper-slide-index",tn),l.virtual.cache[tn]=Pn,Pn.remove()}))}fn||(l.virtual.slides=l.params.virtual.slides),l.classNames.push(`${l.params.containerModifierClass}virtual`),l.params.watchSlidesProgress=!0,l.originalParams.watchSlidesProgress=!0,mt()}),y("setTranslate",()=>{l.params.virtual.enabled&&(l.params.cssMode&&!l._immediateVirtual?(clearTimeout(z),z=setTimeout(()=>{mt()},100)):mt())}),y("init update resize",()=>{l.params.virtual.enabled&&l.params.cssMode&&qn(l.wrapperEl,"--swiper-virtual-size",`${l.virtualSize}px`)}
1),Object.assign(l.virtual,{appendSlide:function gt(fn){if("object"==typeof fn&&"length"in fn)for(let Sn=0;Sn<fn.length;Sn+=1)fn[Sn]&&l.virtual.slides.push(fn[Sn]);else l.virtual.slides.push(fn);mt(!0)},prependSlide:function vt(fn){const Sn=l.activeIndex;let Pn=Sn+1,tn=1;if(Array.isArray(fn)){for(let kn=0;kn<fn.length;kn+=1)fn[kn]&&l.virtual.slides.unshift(fn[kn]);Pn=Sn+fn.length,tn=fn.length}else l.virtual.slides.unshift(fn);if(l.params.virtual.cache){const kn=l.virtual.cache,Rn={};Object.keys(kn).forEach(vr=>{const hi=kn[vr],ui=hi.getAttribute("data-swiper-slide-index");ui&&hi.setAttribute("data-swiper-slide-index",parseInt(ui,10)+tn),Rn[parseInt(vr,10)+tn]=hi}),l.virtual.cache=Rn}mt(!0),l.slideTo(Pn,0)},removeSlide:function Gt(fn){if(typeof fn>"u"||null===fn)return;let Sn=l.activeIndex;if(Array.isArray(fn))for(let Pn=fn.length-1;Pn>=0;Pn-=1)l.params.virtual.cache&&(delete l.virtual.cache[fn[Pn]],Object.keys(l.virtual.cache).forEach(tn=>{tn>fn&&(l.virtual.cache[tn-1]=l.virtual.cache[tn],l.virtual.cache[tn-1].setAttribute("data-swiper-slide-index",tn-1),delete l.virtual.cache[tn])}
vendor: 7,855 bytes, line 1
1)),l.virtual.slides.splice(fn[Pn],1),fn[Pn]<Sn&&(Sn-=1),Sn=Math.max(Sn,0);else l.params.virtual.cache&&(delete l.virtual.cache[fn],Object.keys(l.virtual.cache).forEach(Pn=>{Pn>fn&&(l.virtual.cache[Pn-1]=l.virtual.cache[Pn],l.virtual.cache[Pn-1].setAttribute("data-swiper-slide-index",Pn-1),delete l.virtual.cache[Pn])})),l.virtual.slides.splice(fn,1),fn<Sn&&(Sn-=1),Sn=Math.max(Sn,0);mt(!0),l.slideTo(Sn,0)},removeAllSlides:function un(){l.virtual.slides=[],l.params.virtual.cache&&(l.virtual.cache={}),mt(!0),l.slideTo(0,0)},update:mt})},function Oa(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;const z=yo(),Oe=Io();function Be(gt){if(!l.enabled)return;const{rtlTranslate:vt}=l;let Gt=gt;Gt.originalEvent&&(Gt=Gt.originalEvent);const un=Gt.keyCode||Gt.charCode,fn=l.params.keyboard.pageUpDown,Sn=fn&&33===un,Pn=fn&&34===un,tn=37===un,kn=39===un,Rn=38===un,vr=40===un;if(!l.allowSlideNext&&(l.isHorizontal()&&kn||l.isVertical()&&vr||Pn)||!l.allowSlidePrev&&(l.isHorizontal()&&tn||l.isVertical()&&Rn||Sn))return!1;if(!(Gt.shiftKey||Gt.altKey||Gt.ctrlKey||Gt.metaKey||z.activeElement&&z.activeElement.nodeName&&("input"===z.activeElement.nodeName.toLowerCase()||"textarea"===z.activeElement.nodeName.toLowerCase()))){if(l.params.keyboard.onlyInViewport&&(Sn||Pn||tn||kn||Rn||vr)){let hi=!1;if(ro(l.el,`.${l.params.slideClass}, swiper-slide`).length>0&&0===ro(l.el,`.${l.params.slideActiveClass}`).length)return;const ui=l.el,Ri=ui.clientWidth,ni=ui.clientHeight,Qr=Oe.innerWidth,Zr=Oe.innerHeight,Si=Qi(ui);vt&&(Si.left-=ui.scrollLeft);const $r=[[Si.left,Si.top],[Si.left+Ri,Si.top],[Si.left,Si.top+ni],[Si.left+Ri,Si.top+ni]];for(let Kn=0;Kn<$r.length;Kn+=1){const yr=$r[Kn];if(yr[0]>=0&&yr[0]<=Qr&&yr[1]>=0&&yr[1]<=Zr){if(0===yr[0]&&0===yr[1])continue;hi=!0}}if(!hi)return}l.isHorizontal()?((Sn||Pn||tn||kn)&&(Gt.preventDefault?Gt.preventDefault():Gt.returnValue=!1),((Pn||kn)&&!vt||(Sn||tn)&&vt)&&l.slideNext(),((Sn||tn)&&!vt||(Pn||kn)&&vt)&&l.slidePrev()):((Sn||Pn||Rn||vr)&&(Gt.preventDefault?Gt.preventDefault():Gt.returnValue=!1),(Pn||vr)&&l.slideNext(),(Sn||Rn)&&l.slidePrev()),O("keyPress",un)}}function xe(){l.keyboard.enabled||(z.addEventListener("keydown",Be),l.keyboard.enabled=!0)}function mt(){l.keyboard.enabled&&(z.removeEventListener("keydown",Be),l.keyboard.enabled=!1)}l.keyboard={enabled:!1},h({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),y("init",()=>{l.params.keyboard.enabled&&xe()}),y("destroy",()=>{l.keyboard.enabled&&mt()}),Object.assign(l.keyboard,{enable:xe,disable:mt})},function Gu(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;const z=Io();h({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),l.mousewheel={enabled:!1};let Oe,xe,Be=Vo();const mt=[];function vt(){l.enabled&&(l.mouseEntered=!0)}function Gt(){l.enabled&&(l.mouseEntered=!1)}function un(Rn){return!(l.params.mousewheel.thresholdDelta&&Rn.delta<l.params.mousewheel.thresholdDelta||l.params.mousewheel.thresholdTime&&Vo()-Be<l.params.mousewheel.thresholdTime)&&(Rn.delta>=6&&Vo()-Be<60||(Rn.direction<0?(!l.isEnd||l.params.loop)&&!l.animating&&(l.slideNext(),O("scroll",Rn.raw)):(!l.isBeginning||l.params.loop)&&!l.animating&&(l.slidePrev(),O("scroll",Rn.raw)),Be=(new z.Date).getTime(),!1))}function Sn(Rn){let vr=Rn,hi=!0;if(!l.enabled||Rn.target.closest(`.${l.params.mousewheel.noMousewheelClass}`))return;const ui=l.params.mousewheel;l.params.cssMode&&vr.preventDefault();let Ri=l.el;"container"!==l.params.mousewheel.eventsTarget&&(Ri=document.querySelector(l.params.mousewheel.eventsTarget));const ni=Ri&&Ri.contains(vr.target);if(!l.mouseEntered&&!ni&&!ui.releaseOnEdges)return!0;vr.originalEvent&&(vr=vr.originalEvent);let Qr=0;const Zr=l.rtlTranslate?-1:1,Si=function gt(Rn){let Ri=0,ni=0,Qr=0,Zr=0;return"detail"in Rn&&(ni=Rn.detail),"wheelDelta"in Rn&&(ni=-Rn.wheelDelta/120),"wheelDeltaY"in Rn&&(ni=-Rn.wheelDeltaY/120),"wheelDeltaX"in Rn&&(Ri=-Rn.wheelDeltaX/120),"axis"in Rn&&Rn.axis===Rn.HORIZONTAL_AXIS&&(Ri=ni,ni=0),Qr=10*Ri,Zr=10*ni,"deltaY"in Rn&&(Zr=Rn.deltaY),"deltaX"in Rn&&(Qr=Rn.deltaX),Rn.shiftKey&&!Qr&&(Qr=Zr,Zr=0),(Qr||Zr)&&Rn.deltaMode&&(1===Rn.deltaMode?(Qr*=40,Zr*=40):(Qr*=800,Zr*=800)),Qr&&!Ri&&(Ri=Qr<1?-1:1),Zr&&!ni&&(ni=Zr<1?-1:1),{spinX:Ri,spinY:ni,pixelX:Qr,pixelY:Zr}}(vr);if(ui.forceToAxis)if(l.isHorizontal()){if(!(Math.abs(Si.pixelX)>Math.abs(Si.pixelY)))return!0;Qr=-Si.pixelX*Zr}else{if(!(Math.abs(Si.pixelY)>Math.abs(Si.pixelX)))return!0;Qr=-Si.pixelY}else Qr=Math.abs(Si.pixelX)>Math.abs(Si.pixelY)?-Si.pixelX*Zr:-Si.pixelY;if(0===Qr)return!0;ui.invert&&(Qr=-Qr);let $r=l.getTranslate()+Qr*ui.sensitivity;if($r>=l.minTranslate()&&($r=l.minTranslate()),$r<=l.maxTranslate()&&($r=l.maxTranslate()),hi=!!l.params.loop||!($r===l.minTranslate()||$r===l.maxTranslate()),hi&&l.params.nested&&vr.stopPropagation(),l.params.freeMode&&l.params.freeMode.enabled){const Kn={time:Vo(),delta:Math.abs(Qr),direction:Math.sign(Qr)},yr=xe&&Kn.time<xe.time+500&&Kn.delta<=xe.delta&&Kn.direction===xe.direction;if(!yr){xe=void 0;let gi=l.getTranslate()+Qr*ui.sensitivity;const ci=l.isBeginning,Ui=l.isEnd;if(gi>=l.minTranslate()&&(gi=l.minTranslate()),gi<=l.maxTranslate()&&(gi=l.maxTranslate()),l.setTransition(0),l.setTranslate(gi),l.updateProgress(),l.updateActiveIndex(),l.updateSlidesClasses(),(!ci&&l.isBeginning||!Ui&&l.isEnd)&&l.updateSlidesClasses(),l.params.loop&&l.loopFix({direction:Kn.direction<0?"next":"prev",byMousewheel:!0}),l.params.freeMode.sticky){clearTimeout(Oe),Oe=void 0,mt.length>=15&&mt.shift();const Dr=mt.length?mt[mt.length-1]:void 0,ai=mt[0];if(mt.push(Kn),Dr&&(Kn.delta>Dr.delta||Kn.direction!==Dr.direction))mt.splice(0);else if(mt.length>=15&&Kn.time-ai.time<500&&ai.delta-Kn.delta>=1&&Kn.delta<=6){const Ei=Qr>0?.8:.2;xe=Kn,mt.splice(0),Oe=po(()=>{l.slideToClosest(l.params.speed,!0,void 0,Ei)},0)}Oe||(Oe=po(()=>{xe=Kn,mt.splice(0),l.slideToClosest(l.params.speed,!0,void 0,.5)},500))}if(yr||O("scroll",vr),l.params.autoplay&&l.params.autoplayDisableOnInteraction&&l.autoplay.stop(),ui.releaseOnEdges&&(gi===l.minTranslate()||gi===l.maxTranslate()))return!0}}else{const Kn={time:Vo(),delta:Math.abs(Qr),direction:Math.sign(Qr),raw:Rn};mt.length>=2&&mt.shift();const yr=mt.length?mt[mt.length-1]:void 0;if(mt.push(Kn),yr?(Kn.direction!==yr.direction||Kn.delta>yr.delta||Kn.time>yr.time+150)&&un(Kn):un(Kn),function fn(Rn){const vr=l.params.mousewheel;if(Rn.direction<0){if(l.isEnd&&!l.params.loop&&vr.releaseOnEdges)return!0}else if(l.isBeginning&&!l.params.loop&&vr.releaseOnEdges)return!0;return!1}(Kn))return!0}return vr.preventDefault?vr.preventDefault():vr.returnValue=!1,!1}function Pn(Rn){let vr=l.el;"container"!==l.params.mousewheel.eventsTarget&&(vr=document.querySelector(l.params.mousewheel.eventsTarget)),vr[Rn]("mouseenter",vt),vr[Rn]("mouseleave",Gt),vr[Rn]("wheel",Sn)}function tn(){return l.params.cssMode?(l.wrapperEl.removeEventListener("wheel",Sn),!0):!l.mousewheel.enabled&&(Pn("addEventListener"),l.mousewheel.enabled=!0,!0)}function kn(){return l.params.cssMode?(l.wrapperEl.addEventListener(event,Sn),!0):!!l.mousewheel.enabled&&(Pn("removeEventListener"),l.mousewheel.enabled=!1,!0)}y("init",()=>{!l.params.mousewheel.enabled&&l.params.cssMode&&kn(),l.params.mousewheel.enabled&&tn()}),y("destroy",()=>{l.params.cssMode&&tn(),l.mousewheel.enabled&&kn()}),Object.assign(l.mousewheel,{enable:tn,disable:kn})},function $o(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;function z(fn){let Sn;return fn&&"string"==typeof fn&&l.isElement&&(Sn=l.el.querySelector(fn),Sn)?Sn:(fn&&("string"==typeof fn&&(Sn=[...document.querySelectorAll(fn)]),l.params.uniqueNavElements&&"string"==typeof fn&&Sn.length>1&&1===l.el.querySelectorAll(fn).length&&(Sn=l.el.querySelector(fn))),fn&&!Sn?fn:Sn)}function Oe(fn,Sn){const Pn=l.params.navigation;
1(fn=Zi(fn)).forEach(tn=>{tn&&(tn.classList[Sn?"add":"remove"](...Pn.disabledClass.split(" ")),"BUTTON"===tn.tagName&&(tn.disabled=Sn),l.params.watchOverflow&&l.enabled&&tn.classList[l.isLocked?"add":"remove"](Pn.lockClass))})}function Be(){const{nextEl:fn,prevEl:Sn}=l.navigation;if(l.params.loop)return Oe(Sn,!1),void Oe(fn,!1);Oe(Sn,l.isBeginning&&!l.params.rewind),Oe(fn,l.isEnd&&!l.params.rewind)}function xe(fn){fn.preventDefault(),(!l.isBeginning||l.params.loop||l.params.rewind)&&(l.slidePrev(),O("navigationPrev"))}function mt(fn){fn.preventDefault(),(!l.isEnd||l.params.loop||l.params.rewind)&&(l.slideNext(),O("navigationNext"))}function gt(){const fn=l.params.navigation;if(l.params.navigation=eu(l,l.originalParams.navigation,l.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!fn.nextEl&&!fn.prevEl)return;let Sn=z(fn.nextEl),Pn=z(fn.prevEl);Object.assign(l.navigation,{nextEl:Sn,prevEl:Pn}),Sn=Zi(Sn),Pn=Zi(Pn);const tn=(kn,Rn)=>{kn&&kn.addEventListener("click","next"===Rn?mt:xe),!l.enabled&&kn&&kn.classList.add(...fn.lockClass.split(" "))};Sn.forEach(kn=>tn(kn,"next")),Pn.forEach(kn=>tn(kn,"prev"))}function vt(){let{nextEl:fn,prevEl:Sn}=l.navigation;fn=Zi(fn),Sn=Zi(Sn);const Pn=(tn,kn)=>{tn.removeEventListener("click","next"===kn?mt:xe),tn.classList.remove(...l.params.navigation.disabledClass.split(" "))};fn.forEach(tn=>Pn(tn,"next")),Sn.forEach(tn=>Pn(tn,"prev"))}h({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),l.navigation={nextEl:null,prevEl:null},y("init",()=>{!1===l.params.navigation.enabled?un():(gt(),Be())}),y("toEdge fromEdge lock unlock",()=>{Be()}),y("destroy",()=>{vt()}),y("enable disable",()=>{let{nextEl:fn,prevEl:Sn}=l.navigation;fn=Zi(fn),Sn=Zi(Sn),l.enabled?Be():[...fn,...Sn].filter(Pn=>!!Pn).forEach(Pn=>Pn.classList.add(l.params.navigation.lockClass))}),y("click",(fn,Sn)=>{let{nextEl:Pn,prevEl:tn}=l.navigation;Pn=Zi(Pn),tn=Zi(tn);const kn=Sn.target;if(l.params.navigation.hideOnClick&&!tn.includes(kn)&&!Pn.includes(kn)){if(l.pagination&&l.params.pagination&&l.params.pagination.clickable&&(l.pagination.el===kn||l.pagination.el.contains(kn)))return;let Rn;Pn.length?Rn=Pn[0].classList.contains(l.params.navigation.hiddenClass):tn.length&&(Rn=tn[0].classList.contains(l.params.navigation.hiddenClass)),O(!0===Rn?"navigationShow":"navigationHide"),[...Pn,...tn].filter(vr=>!!vr).forEach(vr=>vr.classList.toggle(l.params.navigation.hiddenClass))}});const un=()=>{l.el.classList.add(...l.params.navigation.navigationDisabledClass.split(" ")),vt()};Object.assign(l.navigation,{enable:()=>{l.el.classList.remove(...l.params.navigation.navigationDisabledClass.split(" ")),gt(),Be()},disable:un,update:Be,init:gt,destroy:vt})},function Po(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;const z="swiper-pagination";h({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:tn=>tn,formatFractionTotal:tn=>tn,bulletClass:`${z}-bullet`,bulletActiveClass:`${z}-bullet-active`,modifierClass:`${z}-`,currentClass:`${z}-current`,totalClass:`${z}-total`,hiddenClass:`${z}-hidden`,progressbarFillClass:`${z}-progressbar-fill`,progressbarOppositeClass:`${z}-progressbar-opposite`,clickableClass:`${z}-clickable`,lockClass:`${z}-lock`,horizontalClass:`${z}-horizontal`,verticalClass:`${z}-vertical`,paginationDisabledClass:`${z}-disabled`}}),l.pagination={el:null,bullets:[]};let Oe,Be=0;function xe(){return!l.params.pagination.el||!l.pagination.el||Array.isArray(l.pagination.el)&&0===l.pagination.el.length}function mt(tn,kn){const{bulletActiveClass:Rn}=l.params.pagination;tn&&(tn=tn[("prev"===kn?"previous":"next")+"ElementSibling"])&&(tn.classList.add(`${Rn}-${kn}`),(tn=tn[("prev"===kn?"previous":"next")+"ElementSibling"])&&tn.classList.add(`${Rn}-${kn}-${kn}`))}function gt(tn){const kn=tn.target.closest(ul(l.params.pagination.bulletClass));if(!kn)return;tn.preventDefault();const Rn=sa(kn)*l.params.slidesPerGroup;if(l.params.loop){if(l.realIndex===Rn)return;l.slideToLoop(Rn)}else l.slideTo(Rn)}function vt(){const tn=l.rtl,kn=l.params.pagination;if(xe())return;let vr,hi,Rn=l.pagination.el;Rn=Zi(Rn);
1const Ri=l.params.loop?Math.ceil((l.virtual&&l.params.virtual.enabled?l.virtual.slides.length:l.slides.length)/l.params.slidesPerGroup):l.snapGrid.length;if(l.params.loop?(hi=l.previousRealIndex||0,vr=l.params.slidesPerGroup>1?Math.floor(l.realIndex/l.params.slidesPerGroup):l.realIndex):typeof l.snapIndex<"u"?(vr=l.snapIndex,hi=l.previousSnapIndex):(hi=l.previousIndex||0,vr=l.activeIndex||0),"bullets"===kn.type&&l.pagination.bullets&&l.pagination.bullets.length>0){const ni=l.pagination.bullets;let Qr,Zr,Si;if(kn.dynamicBullets&&(Oe=_a(ni[0],l.isHorizontal()?"width":"height",!0),Rn.forEach($r=>{$r.style[l.isHorizontal()?"width":"height"]=Oe*(kn.dynamicMainBullets+4)+"px"}),kn.dynamicMainBullets>1&&void 0!==hi&&(Be+=vr-(hi||0),Be>kn.dynamicMainBullets-1?Be=kn.dynamicMainBullets-1:Be<0&&(Be=0)),Qr=Math.max(vr-Be,0),Zr=Qr+(Math.min(ni.length,kn.dynamicMainBullets)-1),Si=(Zr+Qr)/2),ni.forEach($r=>{const Kn=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(yr=>`${kn.bulletActiveClass}${yr}`)].map(yr=>"string"==typeof yr&&yr.includes(" ")?yr.split(" "):yr).flat();$r.classList.remove(...Kn)}),Rn.length>1)ni.forEach($r=>{const Kn=sa($r);Kn===vr?$r.classList.add(...kn.bulletActiveClass.split(" ")):l.isElement&&$r.setAttribute("part","bullet"),kn.dynamicBullets&&(Kn>=Qr&&Kn<=Zr&&$r.classList.add(...`${kn.bulletActiveClass}-main`.split(" ")),Kn===Qr&&mt($r,"prev"),Kn===Zr&&mt($r,"next"))});else{const $r=ni[vr];if($r&&$r.classList.add(...kn.bulletActiveClass.split(" ")),l.isElement&&ni.forEach((Kn,yr)=>{Kn.setAttribute("part",yr===vr?"bullet-active":"bullet")}),kn.dynamicBullets){const Kn=ni[Qr],yr=ni[Zr];for(let gi=Qr;gi<=Zr;gi+=1)ni[gi]&&ni[gi].classList.add(...`${kn.bulletActiveClass}-main`.split(" "));mt(Kn,"prev"),mt(yr,"next")}}if(kn.dynamicBullets){const $r=Math.min(ni.length,kn.dynamicMainBullets+4),Kn=(Oe*$r-Oe)/2-Si*Oe,yr=tn?"right":"left";ni.forEach(gi=>{gi.style[l.isHorizontal()?yr:"top"]=`${Kn}px`})}}Rn.forEach((ni,Qr)=>{if("fraction"===kn.type&&(ni.querySelectorAll(ul(kn.currentClass)).forEach(Zr=>{Zr.textContent=kn.formatFractionCurrent(vr+1)}),ni.querySelectorAll(ul(kn.totalClass)).forEach(Zr=>{Zr.textContent=kn.formatFractionTotal(Ri)})),"progressbar"===kn.type){let Zr;Zr=kn.progressbarOpposite?l.isHorizontal()?"vertical":"horizontal":l.isHorizontal()?"horizontal":"vertical";const Si=(vr+1)/Ri;let $r=1,Kn=1;"horizontal"===Zr?$r=Si:Kn=Si,ni.querySelectorAll(ul(kn.progressbarFillClass)).forEach(yr=>{yr.style.transform=`translate3d(0,0,0) scaleX(${$r}) scaleY(${Kn})`,yr.style.transitionDuration=`${l.params.speed}ms`})}"custom"===kn.type&&kn.renderCustom?(ni.innerHTML=kn.renderCustom(l,vr+1,Ri),0===Qr&&O("paginationRender",ni)):(0===Qr&&O("paginationRender",ni),O("paginationUpdate",ni)),l.params.watchOverflow&&l.enabled&&ni.classList[l.isLocked?"add":"remove"](kn.lockClass)})}function Gt(){const tn=l.params.pagination;if(xe())return;const kn=l.virtual&&l.params.virtual.enabled?l.virtual.slides.length:l.grid&&l.params.grid.rows>1?l.slides.length/Math.ceil(l.params.grid.rows):l.slides.length;let Rn=l.pagination.el;Rn=Zi(Rn);let vr="";if("bullets"===tn.type){let hi=l.params.loop?Math.ceil(kn/l.params.slidesPerGroup):l.snapGrid.length;l.params.freeMode&&l.params.freeMode.enabled&&hi>kn&&(hi=kn);for(let ui=0;ui<hi;ui+=1)vr+=tn.renderBullet?tn.renderBullet.call(l,ui,tn.bulletClass):`<${tn.bulletElement} ${l.isElement?'part="bullet"':""} class="${tn.bulletClass}"></${tn.bulletElement}>`}"fraction"===tn.type&&(vr=tn.renderFraction?tn.renderFraction.call(l,tn.currentClass,tn.totalClass):`<span class="${tn.currentClass}"></span> / <span class="${tn.totalClass}"></span>`),"progressbar"===tn.type&&(vr=tn.renderProgressbar?tn.renderProgressbar.call(l,tn.progressbarFillClass):`<span class="${tn.progressbarFillClass}"></span>`),l.pagination.bullets=[],Rn.forEach(hi=>{"custom"!==tn.type&&(hi.innerHTML=vr||""),"bullets"===tn.type&&l.pagination.bullets.push(...hi.querySelectorAll(ul(tn.bulletClass)))}),"custom"!==tn.type&&O("paginationRender",Rn[0])}function un(){l.params.pagination=eu(l,l.originalParams.pagination,l.params.pagination,{el:"swiper-pagination"});const tn=l.params.pagination;if(!tn.el)return;let kn;"string"==typeof tn.el&&l.isElement&&(kn=l.el.querySelector(tn.el)),!kn&&"string"==typeof tn.el&&(kn=[...document.querySelectorAll(tn.el)]
1),kn||(kn=tn.el),kn&&0!==kn.length&&(l.params.uniqueNavElements&&"string"==typeof tn.el&&Array.isArray(kn)&&kn.length>1&&(kn=[...l.el.querySelectorAll(tn.el)],kn.length>1&&(kn=kn.filter(Rn=>ro(Rn,".swiper")[0]===l.el)[0])),Array.isArray(kn)&&1===kn.length&&(kn=kn[0]),Object.assign(l.pagination,{el:kn}),kn=Zi(kn),kn.forEach(Rn=>{"bullets"===tn.type&&tn.clickable&&Rn.classList.add(...(tn.clickableClass||"").split(" ")),Rn.classList.add(tn.modifierClass+tn.type),Rn.classList.add(l.isHorizontal()?tn.horizontalClass:tn.verticalClass),"bullets"===tn.type&&tn.dynamicBullets&&(Rn.classList.add(`${tn.modifierClass}${tn.type}-dynamic`),Be=0,tn.dynamicMainBullets<1&&(tn.dynamicMainBullets=1)),"progressbar"===tn.type&&tn.progressbarOpposite&&Rn.classList.add(tn.progressbarOppositeClass),tn.clickable&&Rn.addEventListener("click",gt),l.enabled||Rn.classList.add(tn.lockClass)}))}function fn(){const tn=l.params.pagination;if(xe())return;let kn=l.pagination.el;kn&&(kn=Zi(kn),kn.forEach(Rn=>{Rn.classList.remove(tn.hiddenClass),Rn.classList.remove(tn.modifierClass+tn.type),Rn.classList.remove(l.isHorizontal()?tn.horizontalClass:tn.verticalClass),tn.clickable&&(Rn.classList.remove(...(tn.clickableClass||"").split(" ")),Rn.removeEventListener("click",gt))})),l.pagination.bullets&&l.pagination.bullets.forEach(Rn=>Rn.classList.remove(...tn.bulletActiveClass.split(" ")))}y("changeDirection",()=>{if(!l.pagination||!l.pagination.el)return;const tn=l.params.pagination;let{el:kn}=l.pagination;kn=Zi(kn),kn.forEach(Rn=>{Rn.classList.remove(tn.horizontalClass,tn.verticalClass),Rn.classList.add(l.isHorizontal()?tn.horizontalClass:tn.verticalClass)})}),y("init",()=>{!1===l.params.pagination.enabled?Pn():(un(),Gt(),vt())}),y("activeIndexChange",()=>{typeof l.snapIndex>"u"&&vt()}),y("snapIndexChange",()=>{vt()}),y("snapGridLengthChange",()=>{Gt(),vt()}),y("destroy",()=>{fn()}),y("enable disable",()=>{let{el:tn}=l.pagination;tn&&(tn=Zi(tn),tn.forEach(kn=>kn.classList[l.enabled?"remove":"add"](l.params.pagination.lockClass)))}),y("lock unlock",()=>{vt()}),y("click",(tn,kn)=>{const Rn=kn.target,vr=Zi(l.pagination.el);if(l.params.pagination.el&&l.params.pagination.hideOnClick&&vr&&vr.length>0&&!Rn.classList.contains(l.params.pagination.bulletClass)){if(l.navigation&&(l.navigation.nextEl&&Rn===l.navigation.nextEl||l.navigation.prevEl&&Rn===l.navigation.prevEl))return;const hi=vr[0].classList.contains(l.params.pagination.hiddenClass);O(!0===hi?"paginationShow":"paginationHide"),vr.forEach(ui=>ui.classList.toggle(l.params.pagination.hiddenClass))}});const Pn=()=>{l.el.classList.add(l.params.pagination.paginationDisabledClass);let{el:tn}=l.pagination;tn&&(tn=Zi(tn),tn.forEach(kn=>kn.classList.add(l.params.pagination.paginationDisabledClass))),fn()};Object.assign(l.pagination,{enable:()=>{l.el.classList.remove(l.params.pagination.paginationDisabledClass);let{el:tn}=l.pagination;tn&&(tn=Zi(tn),tn.forEach(kn=>kn.classList.remove(l.params.pagination.paginationDisabledClass))),un(),Gt(),vt()},disable:Pn,render:Gt,update:vt,init:un,destroy:fn})},function Ro(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;const z=yo();let mt,gt,vt,Gt,Oe=!1,Be=null,xe=null;function un(){if(!l.params.scrollbar.el||!l.scrollbar.el)return;const{scrollbar:$r,rtlTranslate:Kn}=l,{dragEl:yr,el:gi}=$r,ci=l.params.scrollbar;let Dr=gt,ai=(vt-gt)*(l.params.loop?l.progressLoop:l.progress);Kn?(ai=-ai,ai>0?(Dr=gt-ai,ai=0):-ai+gt>vt&&(Dr=vt+ai)):ai<0?(Dr=gt+ai,ai=0):ai+gt>vt&&(Dr=vt-ai),l.isHorizontal()?(yr.style.transform=`translate3d(${ai}px, 0, 0)`,yr.style.width=`${Dr}px`):(yr.style.transform=`translate3d(0px, ${ai}px, 0)`,yr.style.height=`${Dr}px`),ci.hide&&(clearTimeout(Be),gi.style.opacity=1,Be=setTimeout(()=>{gi.style.opacity=0,gi.style.transitionDuration="400ms"},1e3))}function Sn(){if(!l.params.scrollbar.el||!l.scrollbar.el)return;const{scrollbar:$r}=l,{dragEl:Kn,el:yr}=$r;Kn.style.width="",Kn.style.height="",vt=l.isHorizontal()?yr.offsetWidth:yr.offsetHeight,Gt=l.size/(l.virtualSize+l.params.slidesOffsetBefore-(l.params.centeredSlides?l.snapGrid[0]:0)),gt="auto"===l.params.scrollbar.dragSize?vt*Gt:parseInt(l.params.scrollbar.dragSize,10),l.isHorizontal()?Kn.style.width=`${gt}px`:Kn.style.height=`${gt}
1px`,yr.style.display=Gt>=1?"none":"",l.params.scrollbar.hide&&(yr.style.opacity=0),l.params.watchOverflow&&l.enabled&&$r.el.classList[l.isLocked?"add":"remove"](l.params.scrollbar.lockClass)}function Pn($r){return l.isHorizontal()?$r.clientX:$r.clientY}function tn($r){const{scrollbar:Kn,rtlTranslate:yr}=l,{el:gi}=Kn;let ci;ci=(Pn($r)-Qi(gi)[l.isHorizontal()?"left":"top"]-(null!==mt?mt:gt/2))/(vt-gt),ci=Math.max(Math.min(ci,1),0),yr&&(ci=1-ci);const Ui=l.minTranslate()+(l.maxTranslate()-l.minTranslate())*ci;l.updateProgress(Ui),l.setTranslate(Ui),l.updateActiveIndex(),l.updateSlidesClasses()}function kn($r){const Kn=l.params.scrollbar,{scrollbar:yr,wrapperEl:gi}=l,{el:ci,dragEl:Ui}=yr;Oe=!0,mt=$r.target===Ui?Pn($r)-$r.target.getBoundingClientRect()[l.isHorizontal()?"left":"top"]:null,$r.preventDefault(),$r.stopPropagation(),gi.style.transitionDuration="100ms",Ui.style.transitionDuration="100ms",tn($r),clearTimeout(xe),ci.style.transitionDuration="0ms",Kn.hide&&(ci.style.opacity=1),l.params.cssMode&&(l.wrapperEl.style["scroll-snap-type"]="none"),O("scrollbarDragStart",$r)}function Rn($r){const{scrollbar:Kn,wrapperEl:yr}=l,{el:gi,dragEl:ci}=Kn;Oe&&($r.preventDefault?$r.preventDefault():$r.returnValue=!1,tn($r),yr.style.transitionDuration="0ms",gi.style.transitionDuration="0ms",ci.style.transitionDuration="0ms",O("scrollbarDragMove",$r))}function vr($r){const Kn=l.params.scrollbar,{scrollbar:yr,wrapperEl:gi}=l,{el:ci}=yr;Oe&&(Oe=!1,l.params.cssMode&&(l.wrapperEl.style["scroll-snap-type"]="",gi.style.transitionDuration=""),Kn.hide&&(clearTimeout(xe),xe=po(()=>{ci.style.opacity=0,ci.style.transitionDuration="400ms"},1e3)),O("scrollbarDragEnd",$r),Kn.snapOnRelease&&l.slideToClosest())}function hi($r){const{scrollbar:Kn,params:yr}=l,gi=Kn.el;if(!gi)return;const Ui=!!yr.passiveListeners&&{passive:!1,capture:!1},Dr=!!yr.passiveListeners&&{passive:!0,capture:!1};if(!gi)return;const ai="on"===$r?"addEventListener":"removeEventListener";gi[ai]("pointerdown",kn,Ui),z[ai]("pointermove",Rn,Ui),z[ai]("pointerup",vr,Dr)}function ni(){const{scrollbar:$r,el:Kn}=l;l.params.scrollbar=eu(l,l.originalParams.scrollbar,l.params.scrollbar,{el:"swiper-scrollbar"});const yr=l.params.scrollbar;if(!yr.el)return;let gi,ci;if("string"==typeof yr.el&&l.isElement&&(gi=l.el.querySelector(yr.el)),gi||"string"!=typeof yr.el)gi||(gi=yr.el);else if(gi=z.querySelectorAll(yr.el),!gi.length)return;l.params.uniqueNavElements&&"string"==typeof yr.el&&gi.length>1&&1===Kn.querySelectorAll(yr.el).length&&(gi=Kn.querySelector(yr.el)),gi.length>0&&(gi=gi[0]),gi.classList.add(l.isHorizontal()?yr.horizontalClass:yr.verticalClass),gi&&(ci=gi.querySelector(ul(l.params.scrollbar.dragClass)),ci||(ci=Xr("div",l.params.scrollbar.dragClass),gi.append(ci))),Object.assign($r,{el:gi,dragEl:ci}),yr.draggable&&function ui(){!l.params.scrollbar.el||!l.scrollbar.el||hi("on")}(),gi&&gi.classList[l.enabled?"remove":"add"](...ho(l.params.scrollbar.lockClass))}function Qr(){const $r=l.params.scrollbar,Kn=l.scrollbar.el;Kn&&Kn.classList.remove(...ho(l.isHorizontal()?$r.horizontalClass:$r.verticalClass)),function Ri(){!l.params.scrollbar.el||!l.scrollbar.el||hi("off")}()}h({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),l.scrollbar={el:null,dragEl:null},y("changeDirection",()=>{if(!l.scrollbar||!l.scrollbar.el)return;const $r=l.params.scrollbar;let{el:Kn}=l.scrollbar;Kn=Zi(Kn),Kn.forEach(yr=>{yr.classList.remove($r.horizontalClass,$r.verticalClass),yr.classList.add(l.isHorizontal()?$r.horizontalClass:$r.verticalClass)})}),y("init",()=>{!1===l.params.scrollbar.enabled?Si():(ni(),Sn(),un())}),y("update resize observerUpdate lock unlock changeDirection",()=>{Sn()}),y("setTranslate",()=>{un()}),y("setTransition",($r,Kn)=>{!function fn($r){!l.params.scrollbar.el||!l.scrollbar.el||(l.scrollbar.dragEl.style.transitionDuration=`${$r}ms`)}(Kn)}),y("enable disable",()=>{const{el:$r}=l.scrollbar;$r&&$r.classList[l.enabled?"remove":"add"](...ho(l.params.scrollbar.lockClass))}),y("destroy",()=>{Qr()});const Si=()=>{l.el.classList.add(...ho(l.params.scrollbar.scrollbarDisabledClass)),l.scrollbar.el&&l.scrollbar.el.classList.add(...ho(l.params.scrollbar.scrollbarDisabledClass)),Qr()};Object.assign(l.scrollbar,{enable:()=>{l.el.classList.remove(...ho(l.params.scrollbar.scrollbarDisabledClass)),l.scrollbar.el&&l.scrollbar.el.classList.remove(...ho(l.params.scrollbar.scrollbarDisabledClass)),ni(),Sn(),un()},disable:Si,updateSize:Sn,setTranslate:un,init:ni,destroy:Qr})},function Hs(I){let{swiper:l,extendParams:h,on:y}=I;h({parallax:{enabled:!1}});const O="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",z
1=(xe,mt)=>{const{rtl:gt}=l,vt=gt?-1:1,Gt=xe.getAttribute("data-swiper-parallax")||"0";let un=xe.getAttribute("data-swiper-parallax-x"),fn=xe.getAttribute("data-swiper-parallax-y");const Sn=xe.getAttribute("data-swiper-parallax-scale"),Pn=xe.getAttribute("data-swiper-parallax-opacity"),tn=xe.getAttribute("data-swiper-parallax-rotate");if(un||fn?(un=un||"0",fn=fn||"0"):l.isHorizontal()?(un=Gt,fn="0"):(fn=Gt,un="0"),un=un.indexOf("%")>=0?parseInt(un,10)*mt*vt+"%":un*mt*vt+"px",fn=fn.indexOf("%")>=0?parseInt(fn,10)*mt+"%":fn*mt+"px",typeof Pn<"u"&&null!==Pn){const Rn=Pn-(Pn-1)*(1-Math.abs(mt));xe.style.opacity=Rn}let kn=`translate3d(${un}, ${fn}, 0px)`;typeof Sn<"u"&&null!==Sn&&(kn+=` scale(${Sn-(Sn-1)*(1-Math.abs(mt))})`),tn&&typeof tn<"u"&&null!==tn&&(kn+=` rotate(${tn*mt*-1}deg)`),xe.style.transform=kn},Oe=()=>{const{el:xe,slides:mt,progress:gt,snapGrid:vt}=l,un=pi(xe,O);l.isElement&&un.push(...pi(l.hostEl,O)),un.forEach(fn=>{z(fn,gt)}),mt.forEach((fn,Sn)=>{let Pn=fn.progress;l.params.slidesPerGroup>1&&"auto"!==l.params.slidesPerView&&(Pn+=Math.ceil(Sn/2)-gt*(vt.length-1)),Pn=Math.min(Math.max(Pn,-1),1),fn.querySelectorAll(`${O}, [data-swiper-parallax-rotate]`).forEach(tn=>{z(tn,Pn)})})};y("beforeInit",()=>{l.params.parallax.enabled&&(l.params.watchSlidesProgress=!0,l.originalParams.watchSlidesProgress=!0)}),y("init",()=>{l.params.parallax.enabled&&Oe()}),y("setTranslate",()=>{l.params.parallax.enabled&&Oe()}),y("setTransition",(xe,mt)=>{l.params.parallax.enabled&&function(xe){void 0===xe&&(xe=l.params.speed);const{el:mt,hostEl:gt}=l,vt=[...mt.querySelectorAll(O)];l.isElement&&vt.push(...gt.querySelectorAll(O)),vt.forEach(Gt=>{let un=parseInt(Gt.getAttribute("data-swiper-parallax-duration"),10)||xe;0===xe&&(un=0),Gt.style.transitionDuration=`${un}ms`})}(mt)})},function tu(I){let{swiper:l,extendParams:h,on:y,emit:O}=I;const z=Io();h({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),l.zoom={enabled:!1};let xe,mt,Oe=1,Be=!1;const gt=[],vt={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},Gt={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},un={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let fn=1;function Sn(){return gt.length<2?1:Math.sqrt((gt[1].pageX-gt[0].pageX)**2+(gt[1].pageY-gt[0].pageY)**2)}function Pn(){const Dr=l.params.zoom,ai=vt.imageWrapEl.getAttribute("data-swiper-zoom")||Dr.maxRatio;return Dr.limitToOriginalSize&&vt.imageEl&&vt.imageEl.naturalWidth?Math.min(vt.imageEl.naturalWidth/vt.imageEl.offsetWidth,ai):ai}function Rn(Dr){const ai=function kn(){return l.isElement?"swiper-slide":`.${l.params.slideClass}`}();return!!(Dr.target.matches(ai)||l.slides.filter(Ei=>Ei.contains(Dr.target)).length>0)}function hi(Dr){if("mouse"===Dr.pointerType&>.splice(0,gt.length),!Rn(Dr))return;const ai=l.params.zoom;if(xe=!1,mt=!1,gt.push(Dr),!(gt.length<2)){if(xe=!0,vt.scaleStart=Sn(),!vt.slideEl){vt.slideEl=Dr.target.closest(`.${l.params.slideClass}, swiper-slide`),vt.slideEl||(vt.slideEl=l.slides[l.activeIndex]);let Ei=vt.slideEl.querySelector(`.${ai.containerClass}`);if(Ei&&(Ei=Ei.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),vt.imageEl=Ei,vt.imageWrapEl=Ei?ro(vt.imageEl,`.${ai.containerClass}`)[0]:void 0,!vt.imageWrapEl)return void(vt.imageEl=void 0);vt.maxRatio=Pn()}if(vt.imageEl){const[Ei,Bi]=function tn(){if(gt.length<2)return{x:null,y:null};const Dr=vt.imageEl.getBoundingClientRect();return[(gt[0].pageX+(gt[1].pageX-gt[0].pageX)/2-Dr.x-z.scrollX)/Oe,(gt[0].pageY+(gt[1].pageY-gt[0].pageY)/2-Dr.y-z.scrollY)/Oe]}();vt.originX=Ei,vt.originY=Bi,vt.imageEl.style.transitionDuration="0ms"}Be=!0}}function ui(Dr){if(!Rn(Dr))return;const ai=l.params.zoom,Ei=l.zoom,Bi=gt.findIndex(Ys=>Ys.pointerId===Dr.pointerId);Bi>=0&&(gt[Bi]=Dr),!(gt.length<2)&&(mt=!0,vt.scaleMove=Sn(),vt.imageEl&&(Ei.scale=vt.scaleMove/vt.scaleStart*Oe,Ei.scale>vt.maxRatio&&(Ei.scale=vt.maxRatio-1+(Ei.scale-vt.maxRatio+1)**.5),Ei.scale<ai.minRatio&&(Ei.scale=ai.minRatio+1-(ai.minRatio-Ei.scale+1)**.5),vt.imageEl.style.transform=`translate3d(0,
vendor: 4,288 bytes, line 1
10,0) scale(${Ei.scale})`))}function Ri(Dr){if(!Rn(Dr)||"mouse"===Dr.pointerType&&"pointerout"===Dr.type)return;const ai=l.params.zoom,Ei=l.zoom,Bi=gt.findIndex(Ys=>Ys.pointerId===Dr.pointerId);Bi>=0&>.splice(Bi,1),xe&&mt&&(xe=!1,mt=!1,vt.imageEl&&(Ei.scale=Math.max(Math.min(Ei.scale,vt.maxRatio),ai.minRatio),vt.imageEl.style.transitionDuration=`${l.params.speed}ms`,vt.imageEl.style.transform=`translate3d(0,0,0) scale(${Ei.scale})`,Oe=Ei.scale,Be=!1,Ei.scale>1&&vt.slideEl?vt.slideEl.classList.add(`${ai.zoomedSlideClass}`):Ei.scale<=1&&vt.slideEl&&vt.slideEl.classList.remove(`${ai.zoomedSlideClass}`),1===Ei.scale&&(vt.originX=0,vt.originY=0,vt.slideEl=void 0)))}function Qr(Dr){if(!Rn(Dr)||!function vr(Dr){const ai=`.${l.params.zoom.containerClass}`;return!!(Dr.target.matches(ai)||[...l.hostEl.querySelectorAll(ai)].filter(Ei=>Ei.contains(Dr.target)).length>0)}(Dr))return;const ai=l.zoom;if(!vt.imageEl||!Gt.isTouched||!vt.slideEl)return;Gt.isMoved||(Gt.width=vt.imageEl.offsetWidth,Gt.height=vt.imageEl.offsetHeight,Gt.startX=ot(vt.imageWrapEl,"x")||0,Gt.startY=ot(vt.imageWrapEl,"y")||0,vt.slideWidth=vt.slideEl.offsetWidth,vt.slideHeight=vt.slideEl.offsetHeight,vt.imageWrapEl.style.transitionDuration="0ms");const Ei=Gt.width*ai.scale,Bi=Gt.height*ai.scale;if(Ei<vt.slideWidth&&Bi<vt.slideHeight)return;if(Gt.minX=Math.min(vt.slideWidth/2-Ei/2,0),Gt.maxX=-Gt.minX,Gt.minY=Math.min(vt.slideHeight/2-Bi/2,0),Gt.maxY=-Gt.minY,Gt.touchesCurrent.x=gt.length>0?gt[0].pageX:Dr.pageX,Gt.touchesCurrent.y=gt.length>0?gt[0].pageY:Dr.pageY,Math.max(Math.abs(Gt.touchesCurrent.x-Gt.touchesStart.x),Math.abs(Gt.touchesCurrent.y-Gt.touchesStart.y))>5&&(l.allowClick=!1),!Gt.isMoved&&!Be){if(l.isHorizontal()&&(Math.floor(Gt.minX)===Math.floor(Gt.startX)&&Gt.touchesCurrent.x<Gt.touchesStart.x||Math.floor(Gt.maxX)===Math.floor(Gt.startX)&&Gt.touchesCurrent.x>Gt.touchesStart.x))return void(Gt.isTouched=!1);if(!l.isHorizontal()&&(Math.floor(Gt.minY)===Math.floor(Gt.startY)&&Gt.touchesCurrent.y<Gt.touchesStart.y||Math.floor(Gt.maxY)===Math.floor(Gt.startY)&&Gt.touchesCurrent.y>Gt.touchesStart.y))return void(Gt.isTouched=!1)}Dr.cancelable&&Dr.preventDefault(),Dr.stopPropagation(),Gt.isMoved=!0;const rs=(ai.scale-Oe)/(vt.maxRatio-l.params.zoom.minRatio),{originX:gs,originY:Ko}=vt;Gt.currentX=Gt.touchesCurrent.x-Gt.touchesStart.x+Gt.startX+rs*(Gt.width-2*gs),Gt.currentY=Gt.touchesCurrent.y-Gt.touchesStart.y+Gt.startY+rs*(Gt.height-2*Ko),Gt.currentX<Gt.minX&&(Gt.currentX=Gt.minX+1-(Gt.minX-Gt.currentX+1)**.8),Gt.currentX>Gt.maxX&&(Gt.currentX=Gt.maxX-1+(Gt.currentX-Gt.maxX+1)**.8),Gt.currentY<Gt.minY&&(Gt.currentY=Gt.minY+1-(Gt.minY-Gt.currentY+1)**.8),Gt.currentY>Gt.maxY&&(Gt.currentY=Gt.maxY-1+(Gt.currentY-Gt.maxY+1)**.8),un.prevPositionX||(un.prevPositionX=Gt.touchesCurrent.x),un.prevPositionY||(un.prevPositionY=Gt.touchesCurrent.y),un.prevTime||(un.prevTime=Date.now()),un.x=(Gt.touchesCurrent.x-un.prevPositionX)/(Date.now()-un.prevTime)/2,un.y=(Gt.touchesCurrent.y-un.prevPositionY)/(Date.now()-un.prevTime)/2,Math.abs(Gt.touchesCurrent.x-un.prevPositionX)<2&&(un.x=0),Math.abs(Gt.touchesCurrent.y-un.prevPositionY)<2&&(un.y=0),un.prevPositionX=Gt.touchesCurrent.x,un.prevPositionY=Gt.touchesCurrent.y,un.prevTime=Date.now(),vt.imageWrapEl.style.transform=`translate3d(${Gt.currentX}px, ${Gt.currentY}px,0)`}function Si(){const Dr=l.zoom;vt.slideEl&&l.activeIndex!==l.slides.indexOf(vt.slideEl)&&(vt.imageEl&&(vt.imageEl.style.transform="translate3d(0,0,0) scale(1)"),vt.imageWrapEl&&(vt.imageWrapEl.style.transform="translate3d(0,0,0)"),vt.slideEl.classList.remove(`${l.params.zoom.zoomedSlideClass}`),Dr.scale=1,Oe=1,vt.slideEl=void 0,vt.imageEl=void 0,vt.imageWrapEl=void 0,vt.originX=0,vt.originY=0)}function $r(Dr){const ai=l.zoom,Ei=l.params.zoom;if(!vt.slideEl){Dr&&Dr.target&&(vt.slideEl=Dr.target.closest(`.${l.params.slideClass}, swiper-slide`)),vt.slideEl||(vt.slideEl=l.params.virtual&&l.params.virtual.enabled&&l.virtual?pi(l.slidesEl,`.${l.params.slideActiveClass}`)[0]:l.slides[l.activeIndex]);let Cu=vt.slideEl.querySelector(`.${Ei.containerClass}`);Cu&&(Cu=Cu.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),vt.imageEl=Cu,vt.imageWrapEl=Cu?ro(vt.imageEl,`.${Ei.containerClass}`)[0]:void 0}if(!vt.imageEl||!vt.imageWrapEl)return;
1let Bi,Ys,rs,gs,Ko,Pl,$s,Yo,wa,nu,Qa,Xl,Rl,Ml,_c,ru,Su,Ku;l.params.cssMode&&(l.wrapperEl.style.overflow="hidden",l.wrapperEl.style.touchAction="none"),vt.slideEl.classList.add(`${Ei.zoomedSlideClass}`),typeof Gt.touchesStart.x>"u"&&Dr?(Bi=Dr.pageX,Ys=Dr.pageY):(Bi=Gt.touchesStart.x,Ys=Gt.touchesStart.y);const hl="number"==typeof Dr?Dr:null;1===Oe&&hl&&(Bi=void 0,Ys=void 0);const Tu=Pn();ai.scale=hl||Tu,Oe=hl||Tu,!Dr||1===Oe&&hl?($s=0,Yo=0):(Su=vt.slideEl.offsetWidth,Ku=vt.slideEl.offsetHeight,rs=Qi(vt.slideEl).left+z.scrollX,gs=Qi(vt.slideEl).top+z.scrollY,Ko=rs+Su/2-Bi,Pl=gs+Ku/2-Ys,wa=vt.imageEl.offsetWidth,nu=vt.imageEl.offsetHeight,Qa=wa*ai.scale,Xl=nu*ai.scale,Rl=Math.min(Su/2-Qa/2,0),Ml=Math.min(Ku/2-Xl/2,0),_c=-Rl,ru=-Ml,$s=Ko*ai.scale,Yo=Pl*ai.scale,$s<Rl&&($s=Rl),$s>_c&&($s=_c),Yo<Ml&&(Yo=Ml),Yo>ru&&(Yo=ru)),hl&&1===ai.scale&&(vt.originX=0,vt.originY=0),vt.imageWrapEl.style.transitionDuration="300ms",vt.imageWrapEl.style.transform=`translate3d(${$s}px, ${Yo}px,0)`,vt.imageEl.style.transitionDuration="300ms",vt.imageEl.style.transform=`translate3d(0,0,0) scale(${ai.scale})`}function Kn(){const Dr=l.zoom,ai=l.params.zoom;if(!vt.slideEl){vt.slideEl=l.params.virtual&&l.params.virtual.enabled&&l.virtual?pi(l.slidesEl,`.${l.params.slideActiveClass}`)[0]:l.slides[l.activeIndex];let Ei=vt.slideEl.querySelector(`.${ai.containerClass}`);Ei&&(Ei=Ei.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),vt.imageEl=Ei,vt.imageWrapEl=Ei?ro(vt.imageEl,`.${ai.containerClass}`)[0]:void 0}!vt.imageEl||!vt.imageWrapEl||(l.params.cssMode&&(l.wrapperEl.style.overflow="",l.wrapperEl.style.touchAction=""),Dr.scale=1,Oe=1,vt.imageWrapEl.style.transitionDuration="300ms",vt.imageWrapEl.style.transform="translate3d(0,0,0)",vt.imageEl.style.transitionDuration="300ms",vt.imageEl.style.transform="translate3d(0,0,0) scale(1)",vt.slideEl.classList.remove(`${ai.zoomedSlideClass}`),vt.slideEl=void 0,vt.originX=0,vt.originY=0)}function yr(Dr){const ai=l.zoom;ai.scale&&1!==ai.scale?Kn():$r(Dr)}function gi(){return{passiveListener:!!l.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!l.params.passiveListeners||{passive:!1,capture:!0}}}function ci(){const Dr=l.zoom;if(Dr.enabled)return;Dr.enabled=!0;const{passiveListener:ai,activeListenerWithCapture:Ei}=gi();l.wrapperEl.addEventListener("pointerdown",hi,ai),l.wrapperEl.addEventListener("pointermove",ui,Ei),["pointerup","pointercancel","pointerout"].forEach(Bi=>{l.wrapperEl.addEventListener(Bi,Ri,ai)}),l.wrapperEl.addEventListener("pointermove",Qr,Ei)}function Ui(){const Dr=l.zoom;if(!Dr.enabled)return;Dr.enabled=!1;const{passiveListener:ai,activeListenerWithCapture:Ei}=gi();l.wrapperEl.removeEventListener("pointerdown",hi,ai),l.wrapperEl.removeEventListener("pointermove",ui,Ei),["pointerup","pointercancel","pointerout"].forEach(Bi=>{l.wrapperEl.removeEventListener(Bi,Ri,ai)}),l.wrapperEl.removeEventListener("pointermove",Qr,Ei)}Object.defineProperty(l.zoom,"scale",{get:()=>fn,set(Dr){fn!==Dr&&O("zoomChange",Dr,vt.imageEl,vt.slideEl),fn=Dr}}),y("init",()=>{l.params.zoom.enabled&&ci()}),y("destroy",()=>{Ui()}),y("touchStart",(Dr,ai)=>{l.zoom.enabled&&function ni(Dr){if(!vt.imageEl||Gt.isTouched)return;l.device.android&&Dr.cancelable&&Dr.preventDefault(),Gt.isTouched=!0;const Ei=gt.length>0?gt[0]:Dr;Gt.touchesStart.x=Ei.pageX,Gt.touchesStart.y=Ei.pageY}(ai)}),y("touchEnd",(Dr,ai)=>{l.zoom.enabled&&function Zr(){const Dr=l.zoom;if(!vt.imageEl)return;if(!Gt.isTouched||!Gt.isMoved)return Gt.isTouched=!1,void(Gt.isMoved=!1);Gt.isTouched=!1,Gt.isMoved=!1;let ai=300,Ei=300;const Ys=Gt.currentX+un.x*ai,gs=Gt.currentY+un.y*Ei;0!==un.x&&(ai=Math.abs((Ys-Gt.currentX)/un.x)),0!==un.y&&(Ei=Math.abs((gs-Gt.currentY)/un.y));const Ko=Math.max(ai,Ei);Gt.currentX=Ys,Gt.currentY=gs;const $s=Gt.height*Dr.scale;Gt.minX=Math.min(vt.slideWidth/2-Gt.width*Dr.scale/2,0),Gt.maxX=-Gt.minX,Gt.minY=Math.min(vt.slideHeight/2-$s/2,0),Gt.maxY=-Gt.minY,Gt.currentX=Math.max(Math.min(Gt.currentX,Gt.maxX),Gt.minX),Gt.currentY=Math.max(Math.min(Gt.currentY,Gt.maxY),Gt.minY),vt.imageWrapEl.style.transitionDuration=`${Ko}ms`,vt.imageWrapEl.style.transform=`translate3d(${Gt.currentX}px, ${Gt.currentY}px,0)`}()}),y("doubleTap",(Dr,ai)=>{!l.animating&&l.params.zoom.enabled&&l.zoom.enabled&&l.params.zoom.toggle&&yr(ai)}),y("transitionEnd",()=>{l.zoom.enabled&&l.params.zoom.enabled&&Si()}),y("slideChange",()=>{l.zoom.enabled&&l.params.zoom.enabled&&l.params.cssMode&&Si()}),Object.assign(l.zoom,{enable:ci,disable:Ui,in:$r,out:Kn,toggle:yr})},function cl(I){let{swiper:l,extendParams:h,on:y}=I;function O(mt,gt){const vt=function(){let Sn,Pn,tn;return(kn,Rn)=>{for(Pn=-1,Sn=kn.length;Sn-Pn>1;)tn=Sn+Pn>>1,kn[tn]<=Rn?Pn=tn:Sn=tn;return Sn}}();let Gt,un;return this.x=mt,this.y=gt,this.lastIndex=mt.length-1,this.interpolate=function(Sn){return Sn?(un=vt(this.x,Sn),Gt=un-1,(Sn-this.x[Gt])*(this.y[un]-this.y[Gt])/(this.x[un]-this.x[Gt])+this.y[Gt]):0}
1,this}function xe(){l.controller.control&&l.controller.spline&&(l.controller.spline=void 0,delete l.controller.spline)}h({controller:{control:void 0,inverse:!1,by:"slide"}}),l.controller={control:void 0},y("beforeInit",()=>{if(typeof window<"u"&&("string"==typeof l.params.controller.control||l.params.controller.control instanceof HTMLElement)){const mt=document.querySelector(l.params.controller.control);if(mt&&mt.swiper)l.controller.control=mt.swiper;else if(mt){const gt=vt=>{l.controller.control=vt.detail[0],l.update(),mt.removeEventListener("init",gt)};mt.addEventListener("init",gt)}}else l.controller.control=l.params.controller.control}),y("update",()=>{xe()}),y("resize",()=>{xe()}),y("observerUpdate",()=>{xe()}),y("setTranslate",(mt,gt,vt)=>{!l.controller.control||l.controller.control.destroyed||l.controller.setTranslate(gt,vt)}),y("setTransition",(mt,gt,vt)=>{!l.controller.control||l.controller.control.destroyed||l.controller.setTransition(gt,vt)}),Object.assign(l.controller,{setTranslate:function Oe(mt,gt){const vt=l.controller.control;let Gt,un;const fn=l.constructor;function Sn(Pn){if(Pn.destroyed)return;const tn=l.rtlTranslate?-l.translate:l.translate;"slide"===l.params.controller.by&&(function z(mt){l.controller.spline=l.params.loop?new O(l.slidesGrid,mt.slidesGrid):new O(l.snapGrid,mt.snapGrid)}(Pn),un=-l.controller.spline.interpolate(-tn)),(!un||"container"===l.params.controller.by)&&(Gt=(Pn.maxTranslate()-Pn.minTranslate())/(l.maxTranslate()-l.minTranslate()),(Number.isNaN(Gt)||!Number.isFinite(Gt))&&(Gt=1),un=(tn-l.minTranslate())*Gt+Pn.minTranslate()),l.params.controller.inverse&&(un=Pn.maxTranslate()-un),Pn.updateProgress(un),Pn.setTranslate(un,l),Pn.updateActiveIndex(),Pn.updateSlidesClasses()}if(Array.isArray(vt))for(let Pn=0;Pn<vt.length;Pn+=1)vt[Pn]!==gt&&vt[Pn]instanceof fn&&Sn(vt[Pn]);else vt instanceof fn&>!==vt&&Sn(vt)},setTransition:function Be(mt,gt){const vt=l.constructor,Gt=l.controller.control;let un;function fn(Sn){Sn.destroyed||(Sn.setTransition(mt,l),0!==mt&&(Sn.transitionStart(),Sn.params.autoHeight&&po(()=>{Sn.updateAutoHeight()}),ya(Sn.wrapperEl,()=>{Gt&&Sn.transitionEnd()})))}if(Array.isArray(Gt))for(un=0;un<Gt.length;un+=1)Gt[un]!==gt&&Gt[un]instanceof vt&&fn(Gt[un]);else Gt instanceof vt&>!==Gt&&fn(Gt)}})},function El(I){let{swiper:l,extendParams:h,on:y}=I;h({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),l.a11y={clicked:!1};let O=null;function z(Kn){const yr=O;0!==yr.length&&(yr.innerHTML="",yr.innerHTML=Kn)}function Be(Kn){(Kn=Zi(Kn)).forEach(yr=>{yr.setAttribute("tabIndex","0")})}function xe(Kn){(Kn=Zi(Kn)).forEach(yr=>{yr.setAttribute("tabIndex","-1")})}function mt(Kn,yr){(Kn=Zi(Kn)).forEach(gi=>{gi.setAttribute("role",yr)})}function gt(Kn,yr){(Kn=Zi(Kn)).forEach(gi=>{gi.setAttribute("aria-roledescription",yr)})}function Gt(Kn,yr){(Kn=Zi(Kn)).forEach(gi=>{gi.setAttribute("aria-label",yr)})}function Sn(Kn){(Kn=Zi(Kn)).forEach(yr=>{yr.setAttribute("aria-disabled",!0)})}function Pn(Kn){(Kn=Zi(Kn)).forEach(yr=>{yr.setAttribute("aria-disabled",!1)})}function tn(Kn){if(13!==Kn.keyCode&&32!==Kn.keyCode)return;const yr=l.params.a11y,gi=Kn.target;l.pagination&&l.pagination.el&&(gi===l.pagination.el||l.pagination.el.contains(Kn.target))&&!Kn.target.matches(ul(l.params.pagination.bulletClass))||(l.navigation&&l.navigation.nextEl&&gi===l.navigation.nextEl&&(l.isEnd&&!l.params.loop||l.slideNext(),z(l.isEnd?yr.lastSlideMessage:yr.nextSlideMessage)),l.navigation&&l.navigation.prevEl&&gi===l.navigation.prevEl&&(l.isBeginning&&!l.params.loop||l.slidePrev(),z(l.isBeginning?yr.firstSlideMessage:yr.prevSlideMessage)),l.pagination&&gi.matches(ul(l.params.pagination.bulletClass))&&gi.click())}function Rn(){return l.pagination&&l.pagination.bullets&&l.pagination.bullets.length}function vr(){return Rn()&&l.params.pagination.clickable}const ui=(Kn,yr,gi)=>{Be(Kn),"BUTTON"!==Kn.tagName&&(mt(Kn,"button"),Kn.addEventListener("keydown",tn)),Gt(Kn,gi),function vt(Kn,yr){(Kn=Zi(Kn)).forEac
1h(gi=>{gi.setAttribute("aria-controls",yr)})}(Kn,yr)},Ri=()=>{l.a11y.clicked=!0},ni=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{l.destroyed||(l.a11y.clicked=!1)})})},Qr=Kn=>{if(l.a11y.clicked)return;const yr=Kn.target.closest(`.${l.params.slideClass}, swiper-slide`);if(!yr||!l.slides.includes(yr))return;const gi=l.slides.indexOf(yr)===l.activeIndex,ci=l.params.watchSlidesProgress&&l.visibleSlides&&l.visibleSlides.includes(yr);gi||ci||Kn.sourceCapabilities&&Kn.sourceCapabilities.firesTouchEvents||(l.isHorizontal()?l.el.scrollLeft=0:l.el.scrollTop=0,l.slideTo(l.slides.indexOf(yr),0))},Zr=()=>{const Kn=l.params.a11y;Kn.itemRoleDescriptionMessage&>(l.slides,Kn.itemRoleDescriptionMessage),Kn.slideRole&&mt(l.slides,Kn.slideRole);const yr=l.slides.length;Kn.slideLabelMessage&&l.slides.forEach((gi,ci)=>{const Ui=l.params.loop?parseInt(gi.getAttribute("data-swiper-slide-index"),10):ci;Gt(gi,Kn.slideLabelMessage.replace(/\{\{index\}\}/,Ui+1).replace(/\{\{slidesLength\}\}/,yr))})};y("beforeInit",()=>{O=Xr("span",l.params.a11y.notificationClass),O.setAttribute("aria-live","assertive"),O.setAttribute("aria-atomic","true")}),y("afterInit",()=>{l.params.a11y.enabled&&(()=>{const Kn=l.params.a11y;l.el.append(O);const yr=l.el;Kn.containerRoleDescriptionMessage&>(yr,Kn.containerRoleDescriptionMessage),Kn.containerMessage&&Gt(yr,Kn.containerMessage);const gi=l.wrapperEl,ci=Kn.id||gi.getAttribute("id")||`swiper-wrapper-${function Oe(Kn){return void 0===Kn&&(Kn=16),"x".repeat(Kn).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}(16)}`,Ui=l.params.autoplay&&l.params.autoplay.enabled?"off":"polite";(function un(Kn,yr){(Kn=Zi(Kn)).forEach(gi=>{gi.setAttribute("id",yr)})})(gi,ci),function fn(Kn,yr){(Kn=Zi(Kn)).forEach(gi=>{gi.setAttribute("aria-live",yr)})}(gi,Ui),Zr();let{nextEl:Dr,prevEl:ai}=l.navigation?l.navigation:{};Dr=Zi(Dr),ai=Zi(ai),Dr&&Dr.forEach(Ei=>ui(Ei,ci,Kn.nextSlideMessage)),ai&&ai.forEach(Ei=>ui(Ei,ci,Kn.prevSlideMessage)),vr()&&Zi(l.pagination.el).forEach(Bi=>{Bi.addEventListener("keydown",tn)}),l.el.addEventListener("focus",Qr,!0),l.el.addEventListener("pointerdown",Ri,!0),l.el.addEventListener("pointerup",ni,!0)})()}),y("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{l.params.a11y.enabled&&Zr()}),y("fromEdge toEdge afterInit lock unlock",()=>{l.params.a11y.enabled&&function kn(){if(l.params.loop||l.params.rewind||!l.navigation)return;const{nextEl:Kn,prevEl:yr}=l.navigation;yr&&(l.isBeginning?(Sn(yr),xe(yr)):(Pn(yr),Be(yr))),Kn&&(l.isEnd?(Sn(Kn),xe(Kn)):(Pn(Kn),Be(Kn)))}()}),y("paginationUpdate",()=>{l.params.a11y.enabled&&function hi(){const Kn=l.params.a11y;Rn()&&l.pagination.bullets.forEach(yr=>{l.params.pagination.clickable&&(Be(yr),l.params.pagination.renderBullet||(mt(yr,"button"),Gt(yr,Kn.paginationBulletMessage.replace(/\{\{index\}\}/,sa(yr)+1)))),yr.matches(ul(l.params.pagination.bulletActiveClass))?yr.setAttribute("aria-current","true"):yr.removeAttribute("aria-current")})}()}),y("destroy",()=>{l.params.a11y.enabled&&function $r(){O&&O.remove();let{nextEl:Kn,prevEl:yr}=l.navigation?l.navigation:{};Kn=Zi(Kn),yr=Zi(yr),Kn&&Kn.forEach(gi=>gi.removeEventListener("keydown",tn)),yr&&yr.forEach(gi=>gi.removeEventListener("keydown",tn)),vr()&&Zi(l.pagination.el).forEach(ci=>{ci.removeEventListener("keydown",tn)}),l.el.removeEventListener("focus",Qr,!0),l.el.removeEventListener("pointerdown",Ri,!0),l.el.removeEventListener("pointerup",ni,!0)}()})},function Wu(I){let{swiper:l,extendParams:h,on:y}=I;h({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let O=!1,z={};const Oe=un=>un.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),Be=un=>{const fn=Io();let Sn;Sn=un?new URL(un):fn.location;const Pn=Sn.pathname.slice(1).split("/").filter(vr=>""!==vr),tn=Pn.length;return{key:Pn[tn-2],value:Pn[tn-1]}},xe=(un,fn)=>{const Sn=Io();if(!O||!l.params.history.enabled)return;let Pn;Pn=l.params.url?new URL(l.params.url):Sn.location;const tn=l.virtual&&l.params.virtual.enabled?l.slidesEl.querySelector(`[data-swiper-slide-index="${fn}"]`):l.slides[fn];let kn=Oe(tn.getAttribute("data-history"));if(l.params.history.root.length>0){let vr=l.params.history.root;"/"===vr[vr.length-1]&&(vr=vr.slice(0,vr.length-1)),kn=`${vr}/${un?`${un}/`:""}${kn}`}else Pn.pathname.includes(un)||(kn=`${un?`${un}/`:""}${kn}`);l.params.history.keepQuery&&(kn+=Pn.search);const Rn=Sn.history.state;Rn&&Rn.value===kn||(l.params.history.replaceState?Sn.history.replaceState({value:kn},null,kn):Sn.history.pushState({value:kn},null,kn))},mt=(un,fn,Sn)=>
1{if(fn)for(let Pn=0,tn=l.slides.length;Pn<tn;Pn+=1){const kn=l.slides[Pn];if(Oe(kn.getAttribute("data-history"))===fn){const vr=l.getSlideIndex(kn);l.slideTo(vr,un,Sn)}}else l.slideTo(0,un,Sn)},gt=()=>{z=Be(l.params.url),mt(l.params.speed,z.value,!1)};y("init",()=>{l.params.history.enabled&&(()=>{const un=Io();if(l.params.history){if(!un.history||!un.history.pushState)return l.params.history.enabled=!1,void(l.params.hashNavigation.enabled=!0);if(O=!0,z=Be(l.params.url),!z.key&&!z.value)return void(l.params.history.replaceState||un.addEventListener("popstate",gt));mt(0,z.value,l.params.runCallbacksOnInit),l.params.history.replaceState||un.addEventListener("popstate",gt)}})()}),y("destroy",()=>{l.params.history.enabled&&(()=>{const un=Io();l.params.history.replaceState||un.removeEventListener("popstate",gt)})()}),y("transitionEnd _freeModeNoMomentumRelease",()=>{O&&xe(l.params.history.key,l.activeIndex)}),y("slideChange",()=>{O&&l.params.cssMode&&xe(l.params.history.key,l.activeIndex)})},function Ga(I){let{swiper:l,extendParams:h,emit:y,on:O}=I,z=!1;const Oe=yo(),Be=Io();h({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(Gt,un){if(l.virtual&&l.params.virtual.enabled){const fn=l.slides.filter(Pn=>Pn.getAttribute("data-hash")===un)[0];return fn?parseInt(fn.getAttribute("data-swiper-slide-index"),10):0}return l.getSlideIndex(pi(l.slidesEl,`.${l.params.slideClass}[data-hash="${un}"], swiper-slide[data-hash="${un}"]`)[0])}}});const xe=()=>{y("hashChange");const Gt=Oe.location.hash.replace("#",""),un=l.virtual&&l.params.virtual.enabled?l.slidesEl.querySelector(`[data-swiper-slide-index="${l.activeIndex}"]`):l.slides[l.activeIndex];if(Gt!==(un?un.getAttribute("data-hash"):"")){const Sn=l.params.hashNavigation.getSlideIndex(l,Gt);if(typeof Sn>"u"||Number.isNaN(Sn))return;l.slideTo(Sn)}},mt=()=>{if(!z||!l.params.hashNavigation.enabled)return;const Gt=l.virtual&&l.params.virtual.enabled?l.slidesEl.querySelector(`[data-swiper-slide-index="${l.activeIndex}"]`):l.slides[l.activeIndex],un=Gt?Gt.getAttribute("data-hash")||Gt.getAttribute("data-history"):"";l.params.hashNavigation.replaceState&&Be.history&&Be.history.replaceState?(Be.history.replaceState(null,null,`#${un}`||""),y("hashSet")):(Oe.location.hash=un||"",y("hashSet"))};O("init",()=>{l.params.hashNavigation.enabled&&(()=>{if(!l.params.hashNavigation.enabled||l.params.history&&l.params.history.enabled)return;z=!0;const Gt=Oe.location.hash.replace("#","");if(Gt){const fn=l.params.hashNavigation.getSlideIndex(l,Gt);l.slideTo(fn||0,0,l.params.runCallbacksOnInit,!0)}l.params.hashNavigation.watchState&&Be.addEventListener("hashchange",xe)})()}),O("destroy",()=>{l.params.hashNavigation.enabled&&l.params.hashNavigation.watchState&&Be.removeEventListener("hashchange",xe)}),O("transitionEnd _freeModeNoMomentumRelease",()=>{z&&mt()}),O("slideChange",()=>{z&&l.params.cssMode&&mt()})},function Xa(I){let{swiper:l,extendParams:h,on:y,emit:O,params:z}=I;l.autoplay={running:!1,paused:!1,timeLeft:0},h({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let Oe,Be,gt,Gt,un,fn,Sn,Pn,tn,kn,xe=z&&z.autoplay?z.autoplay.delay:3e3,mt=z&&z.autoplay?z.autoplay.delay:3e3,vt=(new Date).getTime();function Rn(Dr){!l||l.destroyed||!l.wrapperEl||Dr.target===l.wrapperEl&&(l.wrapperEl.removeEventListener("transitionend",Rn),!kn&&Zr())}const vr=()=>{if(l.destroyed||!l.autoplay.running)return;l.autoplay.paused?Gt=!0:Gt&&(mt=gt,Gt=!1);const Dr=l.autoplay.paused?gt:vt+mt-(new Date).getTime();l.autoplay.timeLeft=Dr,O("autoplayTimeLeft",Dr,Dr/xe),Be=requestAnimationFrame(()=>{vr()})},ui=Dr=>{if(l.destroyed||!l.autoplay.running)return;cancelAnimationFrame(Be),vr();let ai=typeof Dr>"u"?l.params.autoplay.delay:Dr;xe=l.params.autoplay.delay,mt=l.params.autoplay.delay;const Ei=(()=>{let Dr;return Dr=l.virtual&&l.params.virtual.enabled?l.slides.filter(Ei=>Ei.classList.contains("swiper-slide-active"))[0]:l.slides[l.activeIndex],Dr?parseInt(Dr.getAttribute("data-swiper-autoplay"),10):void 0})();!Number.isNaN(Ei)&&Ei>0&&typeof Dr>"u"&&(ai=Ei,xe=Ei,mt=Ei),gt=ai;const Bi=l.params.speed,Ys=()=>{!l||l.destroyed||(l.params.autoplay.reverseDirection?!l.isBeginning||l.params.loop||l.params.rewind?(l.slidePrev(Bi,!0,!0),O("autoplay")):l.params.autoplay.stopOnLastSlide||(l.slideTo(l.slides.length-1,Bi,!0,!0),O("autoplay")):!l.isEnd||l.params.loop||l.params.rewind?(l.slideNext(Bi,!0,!0),O("autoplay")):l.params.autoplay.stopOnLastSlide||(l.slideTo(0,Bi,!0,!0),O("autoplay")),l.params.cssMode&&(vt=(new Date).getTime(),requestAnimationFrame(()=>{ui()})))};return ai>0?(clearTimeout(Oe),Oe=setTimeout(()=>{Ys()},ai)):requestAnimationFrame(()=>{Ys()}),ai},Ri=()=>{vt=(new Date).getTime(),l.autoplay.running=!0,ui(),O("autoplayStart")},ni=()=>
1{l.autoplay.running=!1,clearTimeout(Oe),cancelAnimationFrame(Be),O("autoplayStop")},Qr=(Dr,ai)=>{if(l.destroyed||!l.autoplay.running)return;clearTimeout(Oe),Dr||(tn=!0);const Ei=()=>{O("autoplayPause"),l.params.autoplay.waitForTransition?l.wrapperEl.addEventListener("transitionend",Rn):Zr()};if(l.autoplay.paused=!0,ai)return Pn&&(gt=l.params.autoplay.delay),Pn=!1,void Ei();gt=(gt||l.params.autoplay.delay)-((new Date).getTime()-vt),(!(l.isEnd&><0)||l.params.loop)&&(gt<0&&(gt=0),Ei())},Zr=()=>{l.isEnd&><0&&!l.params.loop||l.destroyed||!l.autoplay.running||(vt=(new Date).getTime(),tn?(tn=!1,ui(gt)):ui(),l.autoplay.paused=!1,O("autoplayResume"))},Si=()=>{if(l.destroyed||!l.autoplay.running)return;const Dr=yo();"hidden"===Dr.visibilityState&&(tn=!0,Qr(!0)),"visible"===Dr.visibilityState&&Zr()},$r=Dr=>{"mouse"===Dr.pointerType&&(tn=!0,kn=!0,!l.animating&&!l.autoplay.paused&&Qr(!0))},Kn=Dr=>{"mouse"===Dr.pointerType&&(kn=!1,l.autoplay.paused&&Zr())};y("init",()=>{l.params.autoplay.enabled&&(l.params.autoplay.pauseOnMouseEnter&&(l.el.addEventListener("pointerenter",$r),l.el.addEventListener("pointerleave",Kn)),yo().addEventListener("visibilitychange",Si),Ri())}),y("destroy",()=>{l.el.removeEventListener("pointerenter",$r),l.el.removeEventListener("pointerleave",Kn),yo().removeEventListener("visibilitychange",Si),l.autoplay.running&&ni()}),y("_freeModeStaticRelease",()=>{(fn||tn)&&Zr()}),y("_freeModeNoMomentumRelease",()=>{l.params.autoplay.disableOnInteraction?ni():Qr(!0,!0)}),y("beforeTransitionStart",(Dr,ai,Ei)=>{l.destroyed||!l.autoplay.running||(Ei||!l.params.autoplay.disableOnInteraction?Qr(!0,!0):ni())}),y("sliderFirstMove",()=>{if(!l.destroyed&&l.autoplay.running){if(l.params.autoplay.disableOnInteraction)return void ni();un=!0,fn=!1,tn=!1,Sn=setTimeout(()=>{tn=!0,fn=!0,Qr(!0)},200)}}),y("touchEnd",()=>{if(!l.destroyed&&l.autoplay.running&&un){if(clearTimeout(Sn),clearTimeout(Oe),l.params.autoplay.disableOnInteraction)return fn=!1,void(un=!1);fn&&l.params.cssMode&&Zr(),fn=!1,un=!1}}),y("slideChange",()=>{l.destroyed||!l.autoplay.running||(Pn=!0)}),Object.assign(l.autoplay,{start:Ri,stop:ni,pause:Qr,resume:Zr})},function Eu(I){let{swiper:l,extendParams:h,on:y}=I;h({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let O=!1,z=!1;function Oe(){const mt=l.thumbs.swiper;if(!mt||mt.destroyed)return;const gt=mt.clickedIndex,vt=mt.clickedSlide;if(vt&&vt.classList.contains(l.params.thumbs.slideThumbActiveClass)||typeof gt>"u"||null===gt)return;let Gt;Gt=mt.params.loop?parseInt(mt.clickedSlide.getAttribute("data-swiper-slide-index"),10):gt,l.params.loop?l.slideToLoop(Gt):l.slideTo(Gt)}function Be(){const{thumbs:mt}=l.params;if(O)return!1;O=!0;const gt=l.constructor;if(mt.swiper instanceof gt)l.thumbs.swiper=mt.swiper,Object.assign(l.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(l.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),l.thumbs.swiper.update();else if(Ae(mt.swiper)){const vt=Object.assign({},mt.swiper);Object.assign(vt,{watchSlidesProgress:!0,slideToClickedSlide:!1}),l.thumbs.swiper=new gt(vt),z=!0}return l.thumbs.swiper.el.classList.add(l.params.thumbs.thumbsContainerClass),l.thumbs.swiper.on("tap",Oe),!0}function xe(mt){const gt=l.thumbs.swiper;if(!gt||gt.destroyed)return;const vt="auto"===gt.params.slidesPerView?gt.slidesPerViewDynamic():gt.params.slidesPerView;let Gt=1;const un=l.params.thumbs.slideThumbActiveClass;if(l.params.slidesPerView>1&&!l.params.centeredSlides&&(Gt=l.params.slidesPerView),l.params.thumbs.multipleActiveThumbs||(Gt=1),Gt=Math.floor(Gt),gt.slides.forEach(Pn=>Pn.classList.remove(un)),gt.params.loop||gt.params.virtual&>.params.virtual.enabled)for(let Pn=0;Pn<Gt;Pn+=1)pi(gt.slidesEl,`[data-swiper-slide-index="${l.realIndex+Pn}"]`).forEach(tn=>{tn.classList.add(un)});else for(let Pn=0;Pn<Gt;Pn+=1)gt.slides[l.realIndex+Pn]&>.slides[l.realIndex+Pn].classList.add(un);const fn=l.params.thumbs.autoScrollOffset,Sn=fn&&!gt.params.loop;if(l.realIndex!==gt.realIndex||Sn){const Pn=gt.activeIndex;let tn,kn;if(gt.params.loop){const Rn=gt.slides.filter(vr=>vr.getAttribute("data-swiper-slide-index")===`${l.realIndex}`)[0];tn=gt.slides.indexOf(Rn),kn=l.activeIndex>l.previousIndex?"next":"prev"}else tn=l.realIndex,kn=tn>l.previousIndex?"next":"prev";Sn&&(tn+="next"===kn?fn:-1*fn),gt.visibleSlidesIndexes&>.visibleSlidesIndexes.indexOf(tn)<0&&(gt.params.centeredSlides&&(tn=tn>Pn?tn-Math.floor(vt/2)+1:tn+Math.floor(vt/2)-1),gt.slideTo(tn,mt?0:void 0))}}l.thumbs={swiper:null},y("beforeInit",()=>{const{thumbs:mt}=l.params;if(mt&&mt.swiper)if("string"==typeof mt.swiper||mt.swiper instanceof HTMLElement){const gt=yo(),vt=()=>{const un="string"==typeof mt.swiper?gt.querySelector(mt.swiper):mt.swiper;if(un&&un.swiper)mt.swiper=un.swiper,Be(),xe(!0);else if(un){const fn=Sn=>{mt.swiper=Sn.detail[0],un.removeEventListener("init",fn),Be(),xe(!0),mt.swiper.update(
1),l.update()};un.addEventListener("init",fn)}return un},Gt=()=>{l.destroyed||vt()||requestAnimationFrame(Gt)};requestAnimationFrame(Gt)}else Be(),xe(!0)}),y("slideChange update resize observerUpdate",()=>{xe()}),y("setTransition",(mt,gt)=>{const vt=l.thumbs.swiper;!vt||vt.destroyed||vt.setTransition(gt)}),y("beforeDestroy",()=>{const mt=l.thumbs.swiper;!mt||mt.destroyed||z&&mt.destroy()}),Object.assign(l.thumbs,{init:Be,update:xe})},function dl(I){let{swiper:l,extendParams:h,emit:y,once:O}=I;h({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(l,{freeMode:{onTouchStart:function z(){if(l.params.cssMode)return;const xe=l.getTranslate();l.setTranslate(xe),l.setTransition(0),l.touchEventsData.velocities.length=0,l.freeMode.onTouchEnd({currentPos:l.rtl?l.translate:-l.translate})},onTouchMove:function Oe(){if(l.params.cssMode)return;const{touchEventsData:xe,touches:mt}=l;0===xe.velocities.length&&xe.velocities.push({position:mt[l.isHorizontal()?"startX":"startY"],time:xe.touchStartTime}),xe.velocities.push({position:mt[l.isHorizontal()?"currentX":"currentY"],time:Vo()})},onTouchEnd:function Be(xe){let{currentPos:mt}=xe;if(l.params.cssMode)return;const{params:gt,wrapperEl:vt,rtlTranslate:Gt,snapGrid:un,touchEventsData:fn}=l,Pn=Vo()-fn.touchStartTime;if(mt<-l.minTranslate())l.slideTo(l.activeIndex);else if(mt>-l.maxTranslate())l.slideTo(l.slides.length<un.length?un.length-1:l.slides.length-1);else{if(gt.freeMode.momentum){if(fn.velocities.length>1){const ni=fn.velocities.pop(),Qr=fn.velocities.pop(),Si=ni.time-Qr.time;l.velocity=(ni.position-Qr.position)/Si,l.velocity/=2,Math.abs(l.velocity)<gt.freeMode.minimumVelocity&&(l.velocity=0),(Si>150||Vo()-ni.time>300)&&(l.velocity=0)}else l.velocity=0;l.velocity*=gt.freeMode.momentumVelocityRatio,fn.velocities.length=0;let tn=1e3*gt.freeMode.momentumRatio,Rn=l.translate+l.velocity*tn;Gt&&(Rn=-Rn);let hi,vr=!1;const ui=20*Math.abs(l.velocity)*gt.freeMode.momentumBounceRatio;let Ri;if(Rn<l.maxTranslate())gt.freeMode.momentumBounce?(Rn+l.maxTranslate()<-ui&&(Rn=l.maxTranslate()-ui),hi=l.maxTranslate(),vr=!0,fn.allowMomentumBounce=!0):Rn=l.maxTranslate(),gt.loop&>.centeredSlides&&(Ri=!0);else if(Rn>l.minTranslate())gt.freeMode.momentumBounce?(Rn-l.minTranslate()>ui&&(Rn=l.minTranslate()+ui),hi=l.minTranslate(),vr=!0,fn.allowMomentumBounce=!0):Rn=l.minTranslate(),gt.loop&>.centeredSlides&&(Ri=!0);else if(gt.freeMode.sticky){let ni;for(let Qr=0;Qr<un.length;Qr+=1)if(un[Qr]>-Rn){ni=Qr;break}Rn=Math.abs(un[ni]-Rn)<Math.abs(un[ni-1]-Rn)||"next"===l.swipeDirection?un[ni]:un[ni-1],Rn=-Rn}if(Ri&&O("transitionEnd",()=>{l.loopFix()}),0!==l.velocity){if(tn=Gt?Math.abs((-Rn-l.translate)/l.velocity):Math.abs((Rn-l.translate)/l.velocity),gt.freeMode.sticky){const ni=Math.abs((Gt?-Rn:Rn)-l.translate),Qr=l.slidesSizesGrid[l.activeIndex];tn=ni<Qr?gt.speed:ni<2*Qr?1.5*gt.speed:2.5*gt.speed}}else if(gt.freeMode.sticky)return void l.slideToClosest();gt.freeMode.momentumBounce&&vr?(l.updateProgress(hi),l.setTransition(tn),l.setTranslate(Rn),l.transitionStart(!0,l.swipeDirection),l.animating=!0,ya(vt,()=>{!l||l.destroyed||!fn.allowMomentumBounce||(y("momentumBounce"),l.setTransition(gt.speed),setTimeout(()=>{l.setTranslate(hi),ya(vt,()=>{!l||l.destroyed||l.transitionEnd()})},0))})):l.velocity?(y("_freeModeNoMomentumRelease"),l.updateProgress(Rn),l.setTransition(tn),l.setTranslate(Rn),l.transitionStart(!0,l.swipeDirection),l.animating||(l.animating=!0,ya(vt,()=>{!l||l.destroyed||l.transitionEnd()}))):l.updateProgress(Rn),l.updateActiveIndex(),l.updateSlidesClasses()}else{if(gt.freeMode.sticky)return void l.slideToClosest();gt.freeMode&&y("_freeModeNoMomentumRelease")}(!gt.freeMode.momentum||Pn>=gt.longSwipesMs)&&(y("_freeModeStaticRelease"),l.updateProgress(),l.updateActiveIndex(),l.updateSlidesClasses())}}}})},function la(I){let O,z,Oe,Be,{swiper:l,extendParams:h,on:y}=I;h({grid:{rows:1,fill:"column"}});const xe=()=>{let Sn=l.params.spaceBetween;return"string"==typeof Sn&&Sn.indexOf("%")>=0?Sn=parseFloat(Sn.replace("%",""))/100*l.size:"string"==typeof Sn&&(Sn=parseFloat(Sn)),Sn};y("init",()=>{Be=l.params.grid&&l.params.grid.rows>1}),y("update",()=>{const{params:Sn,el:Pn}=l,tn=Sn.grid&&Sn.grid.rows>1;Be&&!tn?(Pn.classList.remove(`${Sn.containerModifierClass}grid`,`${Sn.containerModifierClass}grid-column`),Oe=1,l.emitContainerClasses()):!Be&&tn&&(Pn.classList.add(`${Sn.containerModifierClass}grid`),"column"===Sn.grid.fill&&Pn.classList.add(`${Sn.containerModifierClass}grid-column`),l.emitContainerClasses()),Be=tn}),l.grid={initSlides:Sn=>{const{slidesPerView:Pn}=l.params,{rows:tn,fill:kn}=l.params.grid,Rn=l.virtual&&l.params.virtual.enabled?l.virtual.slides.length:Sn.length;Oe=Math.floor(Rn/tn),O=Math.floor(Rn/tn)===Rn/tn?Rn:Math.ceil(Rn/tn)*tn,"auto"!==Pn&&"row"===kn&&(O=Math.max(O,Pn*tn)),z=O/tn},unsetSlides:()=>
vendor: 5,329 bytes, line 1
1{l.slides&&l.slides.forEach(Sn=>{Sn.swiperSlideGridSet&&(Sn.style.height="",Sn.style[l.getDirectionLabel("margin-top")]="")})},updateSlide:(Sn,Pn,tn)=>{const{slidesPerGroup:kn}=l.params,Rn=xe(),{rows:vr,fill:hi}=l.params.grid,ui=l.virtual&&l.params.virtual.enabled?l.virtual.slides.length:tn.length;let Ri,ni,Qr;if("row"===hi&&kn>1){const Zr=Math.floor(Sn/(kn*vr)),Si=Sn-vr*kn*Zr,$r=0===Zr?kn:Math.min(Math.ceil((ui-Zr*vr*kn)/vr),kn);Qr=Math.floor(Si/$r),ni=Si-Qr*$r+Zr*kn,Ri=ni+Qr*O/vr,Pn.style.order=Ri}else"column"===hi?(ni=Math.floor(Sn/vr),Qr=Sn-ni*vr,(ni>Oe||ni===Oe&&Qr===vr-1)&&(Qr+=1,Qr>=vr&&(Qr=0,ni+=1))):(Qr=Math.floor(Sn/z),ni=Sn-Qr*z);Pn.row=Qr,Pn.column=ni,Pn.style.height=`calc((100% - ${(vr-1)*Rn}px) / ${vr})`,Pn.style[l.getDirectionLabel("margin-top")]=0!==Qr?Rn&&`${Rn}px`:"",Pn.swiperSlideGridSet=!0},updateWrapperSize:(Sn,Pn)=>{const{centeredSlides:tn,roundLengths:kn}=l.params,Rn=xe(),{rows:vr}=l.params.grid;if(l.virtualSize=(Sn+Rn)*O,l.virtualSize=Math.ceil(l.virtualSize/vr)-Rn,l.params.cssMode||(l.wrapperEl.style[l.getDirectionLabel("width")]=`${l.virtualSize+Rn}px`),tn){const hi=[];for(let ui=0;ui<Pn.length;ui+=1){let Ri=Pn[ui];kn&&(Ri=Math.floor(Ri)),Pn[ui]<l.virtualSize+Pn[0]&&hi.push(Ri)}Pn.splice(0,Pn.length),Pn.push(...hi)}}}},function xs(I){let{swiper:l}=I;Object.assign(l,{appendSlide:Yl.bind(l),prependSlide:ta.bind(l),addSlide:zu.bind(l),removeSlide:Lo.bind(l),removeAllSlides:wu.bind(l)})},function Li(I){let{swiper:l,extendParams:h,on:y}=I;h({fadeEffect:{crossFade:!1}}),nn({effect:"fade",swiper:l,on:y,setTranslate:()=>{const{slides:Oe}=l;for(let xe=0;xe<Oe.length;xe+=1){const mt=l.slides[xe];let vt=-mt.swiperSlideOffset;l.params.virtualTranslate||(vt-=l.translate);let Gt=0;l.isHorizontal()||(Gt=vt,vt=0);const un=l.params.fadeEffect.crossFade?Math.max(1-Math.abs(mt.progress),0):1+Math.min(Math.max(mt.progress,-1),0),fn=_r(0,mt);fn.style.opacity=un,fn.style.transform=`translate3d(${vt}px, ${Gt}px, 0px)`}},setTransition:Oe=>{const Be=l.slides.map(xe=>ji(xe));Be.forEach(xe=>{xe.style.transitionDuration=`${Oe}ms`}),Wr({swiper:l,duration:Oe,transformElements:Be,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!l.params.cssMode})})},function $i(I){let{swiper:l,extendParams:h,on:y}=I;h({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const O=(xe,mt,gt)=>{let vt=xe.querySelector(gt?".swiper-slide-shadow-left":".swiper-slide-shadow-top"),Gt=xe.querySelector(gt?".swiper-slide-shadow-right":".swiper-slide-shadow-bottom");vt||(vt=Xr("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(gt?"left":"top")).split(" ")),xe.append(vt)),Gt||(Gt=Xr("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(gt?"right":"bottom")).split(" ")),xe.append(Gt)),vt&&(vt.style.opacity=Math.max(-mt,0)),Gt&&(Gt.style.opacity=Math.max(mt,0))};nn({effect:"cube",swiper:l,on:y,setTranslate:()=>{const{el:xe,wrapperEl:mt,slides:gt,width:vt,height:Gt,rtlTranslate:un,size:fn,browser:Sn}=l,Pn=l.params.cubeEffect,tn=l.isHorizontal(),kn=l.virtual&&l.params.virtual.enabled;let vr,Rn=0;Pn.shadow&&(tn?(vr=l.wrapperEl.querySelector(".swiper-cube-shadow"),vr||(vr=Xr("div","swiper-cube-shadow"),l.wrapperEl.append(vr)),vr.style.height=`${vt}px`):(vr=xe.querySelector(".swiper-cube-shadow"),vr||(vr=Xr("div","swiper-cube-shadow"),xe.append(vr))));for(let ui=0;ui<gt.length;ui+=1){const Ri=gt[ui];let ni=ui;kn&&(ni=parseInt(Ri.getAttribute("data-swiper-slide-index"),10));let Qr=90*ni,Zr=Math.floor(Qr/360);un&&(Qr=-Qr,Zr=Math.floor(-Qr/360));const Si=Math.max(Math.min(Ri.progress,1),-1);let $r=0,Kn=0,yr=0;ni%4==0?($r=4*-Zr*fn,yr=0):(ni-1)%4==0?($r=0,yr=4*-Zr*fn):(ni-2)%4==0?($r=fn+4*Zr*fn,yr=fn):(ni-3)%4==0&&($r=-fn,yr=3*fn+4*fn*Zr),un&&($r=-$r),tn||(Kn=$r,$r=0);const gi=`rotateX(${tn?0:-Qr}deg) rotateY(${tn?Qr:0}deg) translate3d(${$r}px, ${Kn}px, ${yr}px)`;Si<=1&&Si>-1&&(Rn=90*ni+90*Si,un&&(Rn=90*-ni-90*Si),l.browser&&l.browser.need3dFix&&Math.abs(Rn)/90%2==1&&(Rn+=.001)),Ri.style.transform=gi,Pn.slideShadows&&O(Ri,Si,tn)}if(mt.style.transformOrigin=`50% 50% -${fn/2}px`,mt.style["-webkit-transform-origin"]=`50% 50% -${fn/2}px`,Pn.shadow)if(tn)vr.style.transform=`translate3d(0px, ${vt/2+Pn.shadowOffset}px, ${-vt/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${Pn.shadowScale})`;else{const ui=Math.abs(Rn)-90*Math.floor(Math.abs(Rn)/90),Ri=1.5-(Math.sin(2*ui*Math.PI/360)/2+Math.cos(2*ui*Math.PI/360)/2),Qr=Pn.shadowScale/Ri;vr.style.transform=`scale3d(${Pn.shadowScale}, 1, ${Qr}) translate3d(0px, ${Gt/2+Pn.shadowOffset}px, ${-Gt/2/Qr}px) rotateX(-89.99deg)`}const hi=(Sn.isSafari||Sn.isWebView)&&Sn.needPerspectiveFix?-fn/2:0;mt.style.transform=`translate3d(0px,0,${hi}px) rotateX(${l.isHorizontal()?0:Rn}deg) rotateY(${l.isHorizontal()?-Rn:0}deg)`,mt.style.setProperty("--swiper-cube-translate-z",`${hi}px`)},setTransition:xe=>{const{el:mt,slides:gt}=l;if(gt.forEach(vt=>{vt.style.transitionDuration=`${xe}ms`,vt.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(Gt=>{Gt.style.transitionDuration=`${xe}ms`})}),l.params.cubeEffect.shadow&&!l.isHorizontal()){const vt=mt.querySelector(".swiper-cube-shadow");vt&&(vt.style.transitionDuration=`${xe}ms`)}},recreateShadows:()=>{const xe=l.isHorizontal();
1l.slides.forEach(mt=>{const gt=Math.max(Math.min(mt.progress,1),-1);O(mt,gt,xe)})},getEffectParams:()=>l.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function Ls(I){let{swiper:l,extendParams:h,on:y}=I;h({flipEffect:{slideShadows:!0,limitRotation:!0}});const O=(xe,mt)=>{let gt=l.isHorizontal()?xe.querySelector(".swiper-slide-shadow-left"):xe.querySelector(".swiper-slide-shadow-top"),vt=l.isHorizontal()?xe.querySelector(".swiper-slide-shadow-right"):xe.querySelector(".swiper-slide-shadow-bottom");gt||(gt=_s("flip",xe,l.isHorizontal()?"left":"top")),vt||(vt=_s("flip",xe,l.isHorizontal()?"right":"bottom")),gt&&(gt.style.opacity=Math.max(-mt,0)),vt&&(vt.style.opacity=Math.max(mt,0))};nn({effect:"flip",swiper:l,on:y,setTranslate:()=>{const{slides:xe,rtlTranslate:mt}=l,gt=l.params.flipEffect;for(let vt=0;vt<xe.length;vt+=1){const Gt=xe[vt];let un=Gt.progress;l.params.flipEffect.limitRotation&&(un=Math.max(Math.min(Gt.progress,
11),-1));const fn=Gt.swiperSlideOffset;let Pn=-180*un,tn=0,kn=l.params.cssMode?-fn-l.translate:-fn,Rn=0;l.isHorizontal()?mt&&(Pn=-Pn):(Rn=kn,kn=0,tn=-Pn,Pn=0),l.browser&&l.browser.need3dFix&&(Math.abs(Pn)/90%2==1&&(Pn+=.001),Math.abs(tn)/90%2==1&&(tn+=.001)),Gt.style.zIndex=-Math.abs(Math.round(un))+xe.length,gt.slideShadows&&O(Gt,un);const vr=`translate3d(${kn}px, ${Rn}px, 0px) rotateX(${tn}deg) rotateY(${Pn}deg)`;_r(0,Gt).style.transform=vr}},setTransition:xe=>{const mt=l.slides.map(gt=>ji(gt));mt.forEach(gt=>{gt.style.transitionDuration=`${xe}ms`,gt.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(vt=>{vt.style.transitionDuration=`${xe}ms`})}),Wr({swiper:l,duration:xe,transformElements:mt})},recreateShadows:()=>{l.slides.forEach(xe=>{let mt=xe.progress;l.params.flipEffect.limitRotation&&(mt=Math.max(Math.min(xe.progress,1),-1)),O(xe,mt)})},getEffectParams:()=>l.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!l.params.cssMode})})},function Os(I){let{swiper:l,extendParams:h,on:y}=I;h({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),nn({effect:"coverflow",swiper:l,on:y,setTranslate:()=>{const{width:Oe,height:Be,slides:xe,slidesSizesGrid:mt}=l,gt=l.params.coverflowEffect,vt=l.isHorizontal(),Gt=l.translate,un=vt?Oe/2-Gt:Be/2-Gt,fn=vt?gt.rotate:-gt.rotate,Sn=gt.depth;for(let Pn=0,tn=xe.length;Pn<tn;Pn+=1){const kn=xe[Pn],Rn=mt[Pn],hi=(un-kn.swiperSlideOffset-Rn/2)/Rn,ui="function"==typeof gt.modifier?gt.modifier(hi):hi*gt.modifier;let Ri=vt?fn*ui:0,ni=vt?0:fn*ui,Qr=-Sn*Math.abs(ui),Zr=gt.stretch;"string"==typeof Zr&&-1!==Zr.indexOf("%")&&(Zr=parseFloat(gt.stretch)/100*Rn);let Si=vt?0:Zr*ui,$r=vt?Zr*ui:0,Kn=1-(1-gt.scale)*Math.abs(ui);Math.abs($r)<.001&&($r=0),Math.abs(Si)<.001&&(Si=0),Math.abs(Qr)<.001&&(Qr=0),Math.abs(Ri)<.001&&(Ri=0),Math.abs(ni)<.001&&(ni=0),Math.abs(Kn)<.001&&(Kn=0),l.browser&&l.browser.need3dFix&&(Math.abs(Ri)/90%2==1&&(Ri+=.001),Math.abs(ni)/90%2==1&&(ni+=.001));const yr=`translate3d(${$r}px,${Si}px,${Qr}px) rotateX(${ni}deg) rotateY(${Ri}deg) scale(${Kn})`;if(_r(0,kn).style.transform=yr,kn.style.zIndex=1-Math.abs(Math.round(ui)),gt.slideShadows){let ci=kn.querySelector(vt?".swiper-slide-shadow-left":".swiper-slide-shadow-top"),Ui=kn.querySelector(vt?".swiper-slide-shadow-right":".swiper-slide-shadow-bottom");ci||(ci=_s("coverflow",kn,vt?"left":"top")),Ui||(Ui=_s("coverflow",kn,vt?"right":"bottom")),ci&&(ci.style.opacity=ui>0?ui:0),Ui&&(Ui.style.opacity=-ui>0?-ui:0)}}},setTransition:Oe=>{l.slides.map(xe=>ji(xe)).forEach(xe=>{xe.style.transitionDuration=`${Oe}ms`,xe.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(mt=>{mt.style.transitionDuration=`${Oe}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function oo(I){let{swiper:l,extendParams:h,on:y}=I;h({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const O=Be=>"string"==typeof Be?Be:`${Be}px`;nn({effect:"creative",swiper:l,on:y,setTranslate:()=>{const{slides:Be,wrapperEl:xe,slidesSizesGrid:mt}=l,gt=l.params.creativeEffect,{progressMultiplier:vt}=gt,Gt=l.params.centeredSlides;Gt&&(xe.style.transform=`translateX(calc(50% - ${mt[0]/2-l.params.slidesOffsetBefore||0}px))`);for(let un=0;un<Be.length;un+=1){const fn=Be[un],Sn=fn.progress,Pn=Math.min(Math.max(fn.progress,-gt.limitProgress),gt.limitProgress);let tn=Pn;Gt||(tn=Math.min(Math.max(fn.originalProgress,-gt.limitProgress),gt.limitProgress));const kn=fn.swiperSlideOffset,Rn=[l.params.cssMode?-kn-l.translate:-kn,0,0],vr=[0,0,0];let hi=!1;l.isHorizontal()||(Rn[1]=Rn[0],Rn[0]=0);let ui={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};Pn<0?(ui=gt.next,hi=!0):Pn>0&&(ui=gt.prev,hi=!0),Rn.forEach((Kn,yr)=>{Rn[yr]=`calc(${Kn}px + (${O(ui.translate[yr])} * ${Math.abs(Pn*vt)}))`}),vr.forEach((Kn,yr)=>{let gi=ui.rotate[yr]*Math.abs(Pn*vt);l.browser&&l.browser.need3dFix&&Math.abs(gi)/90%2==1&&(gi+=.001),vr[yr]=gi}),fn.style.zIndex=-Math.abs(Math.round(Sn))+Be.length;const Ri=Rn.join(", "),Zr=tn<0?1+(1-ui.opacity)*tn*vt:1-(1-ui.opacity)*tn*vt,Si=`translate3d(${Ri}) rotateX(${vr[0]}deg) rotateY(${vr[1]}deg) rotateZ(${vr[2]}deg) ${tn<0?`scale(${1+(1-ui.scale)*tn*vt})`:`scale(${1-(1-ui.scale)*tn*vt})`}`;if(hi&&ui.shadow||!hi){let Kn=fn.querySelector(".swiper-slide-shadow");!Kn&&ui.shadow&&(Kn=_s("creative",fn)),Kn&&(Kn.style.opacity=Math.min(Math.max(Math.abs(gt.shadowPerProgress?Pn*(1/gt.limitProgress):Pn),0),1))}const $r=_r(0,fn);$r.style.transform=Si,$r.style.opacity=Zr,ui.origin&&($r.style.transformOrigin=ui.origin)}},setTransition:Be=>{const xe=l.slides.map(mt=>ji(mt));xe.forEach(mt=>{mt.style.transitionDuration=`${Be}ms`,mt.querySelectorAll(".swiper-slide-shadow").forEach(gt=>{gt.style.transitionDuration=`${Be}ms`})}),Wr({swiper:l,duration:Be,transformElements:xe,allSlides:!0})},perspective:()=>l.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!l.params.cssMode})})},function wo(I){let{swiper:l,extendParams:h,on:y}=I;h({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),nn({effect:"cards",swiper:l,on:y,setTranslate:()=>{const{slides:Oe,activeIndex:Be,rtlTranslate:xe}=l,mt=l.params.cardsEffect,{startTranslate:gt,isTouched:vt}
1=l.touchEventsData,Gt=xe?-l.translate:l.translate;for(let un=0;un<Oe.length;un+=1){const fn=Oe[un],Sn=fn.progress,Pn=Math.min(Math.max(Sn,-4),4);let tn=fn.swiperSlideOffset;l.params.centeredSlides&&!l.params.cssMode&&(l.wrapperEl.style.transform=`translateX(${l.minTranslate()}px)`),l.params.centeredSlides&&l.params.cssMode&&(tn-=Oe[0].swiperSlideOffset);let kn=l.params.cssMode?-tn-l.translate:-tn,Rn=0;const vr=-100*Math.abs(Pn);let hi=1,ui=-mt.perSlideRotate*Pn,Ri=mt.perSlideOffset-.75*Math.abs(Pn);const ni=l.virtual&&l.params.virtual.enabled?l.virtual.from+un:un;if((ni===Be||ni===Be-1)&&Pn>0&&Pn<1&&(vt||l.params.cssMode)&&Gt<gt||(ni===Be||ni===Be+1)&&Pn<0&&Pn>-1&&(vt||l.params.cssMode)&&Gt>gt){const yr=(1-Math.abs((Math.abs(Pn)-.5)/.5))**.5;ui+=-28*Pn*yr,hi+=-.5*yr,Ri+=96*yr,Rn=-25*yr*Math.abs(Pn)+"%"}if(kn=Pn<0?`calc(${kn}px ${xe?"-":"+"} (${Ri*Math.abs(Pn)}%))`:Pn>0?`calc(${kn}px ${xe?"-":"+"} (-${Ri*Math.abs(Pn)}%))`:`${kn}px`,!l.isHorizontal()){const yr=Rn;Rn=kn,kn=yr}const $r=`\n translate3d(${kn}, ${Rn}, ${vr}px)\n rotateZ(${mt.rotate?xe?-ui:ui:0}deg)\n scale(${Pn<0?""+(1+(1-hi)*Pn):""+(1-(1-hi)*Pn)})\n `;if(mt.slideShadows){let yr=fn.querySelector(".swiper-slide-shadow");yr||(yr=_s("cards",fn)),yr&&(yr.style.opacity=Math.min(Math.max((Math.abs(Pn)-.5)/.5,0),1))}fn.style.zIndex=-Math.abs(Math.round(Sn))+Oe.length,_r(0,fn).style.transform=$r}},setTransition:Oe=>{const Be=l.slides.map(xe=>ji(xe));Be.forEach(xe=>{xe.style.transitionDuration=`${Oe}ms`,xe.querySelectorAll(".swiper-slide-shadow").forEach(mt=>{mt.style.transitionDuration=`${Oe}ms`})}),Wr({swiper:l,duration:Oe,transformElements:Be})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!l.params.cssMode})})}];Da.use(Mo);const xo=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Bs(I){return"object"==typeof I&&null!==I&&I.constructor&&"Object"===Object.prototype.toString.call(I).slice(8,-1)&&!I.__swiper__}function To(I,l){const h=["__proto__","constructor","prototype"];Object.keys(l).filter(y=>h.indexOf(y)<0).forEach(y=>{typeof I[y]>"u"?I[y]=l[y]:Bs(l[y])&&Bs(I[y])&&Object.keys(l[y]).length>0?l[y].__swiper__?I[y]=l[y]:To(I[y],l[y]):I[y]=l[y]})}function ws(I){return void 0===I&&(I=""),I.replace(/-[a-z]/g,l=>l.toUpperCase().replace("-",""))}const qi=I=>{if(parseFloat(I)===Number(I))return Number(I);if("true"===I||""===I)return!0;
1if("false"===I)return!1;if("null"===I)return null;if("undefined"!==I){if("string"==typeof I&&I.includes("{")&&I.includes("}")&&I.includes('"')){let l;try{l=JSON.parse(I)}catch{l=I}return l}return I}},ps=["a11y","autoplay","controller","cards-effect","coverflow-effect","creative-effect","cube-effect","fade-effect","flip-effect","free-mode","grid","hash-navigation","history","keyboard","mousewheel","navigation","pagination","parallax","scrollbar","thumbs","virtual","zoom"];function fl(I,l,h){const y={},O={};To(y,Zs);const z=[...xo,"on"],Oe=z.map(xe=>xe.replace(/_/,""));z.forEach(xe=>{xe=xe.replace("_",""),typeof I[xe]<"u"&&(O[xe]=I[xe])});const Be=[...I.attributes];return"string"==typeof l&&typeof h<"u"&&Be.push({name:l,value:Bs(h)?{...h}:h}),Be.forEach(xe=>{const mt=ps.filter(gt=>0===xe.name.indexOf(`${gt}-`))[0];if(mt){const gt=ws(mt),vt=ws(xe.name.split(`${mt}-`)[1]);typeof O[gt]>"u"&&(O[gt]={}),!0===O[gt]&&(O[gt]={enabled:!0}),O[gt][vt]=qi(xe.value)}else{const gt=ws(xe.name);if(!Oe.includes(gt))return;const vt=qi(xe.value);O[gt]&&ps.includes(xe.name)&&!Bs(vt)?(O[gt].constructor!==Object&&(O[gt]={}),O[gt].enabled=!!vt):O[gt]=vt}}),To(y,O),y.navigation?y.navigation={prevEl:".swiper-button-prev",nextEl:".swiper-button-next",...!0!==y.navigation?y.navigation:{}}:!1===y.navigation&&delete y.navigation,y.scrollbar?y.scrollbar={el:".swiper-scrollbar",...!0!==y.scrollbar?y.scrollbar:{}}:!1===y.scrollbar&&delete y.scrollbar,y.pagination?y.pagination={el:".swiper-pagination",...!0!==y.pagination?y.pagination:{}}:!1===y.pagination&&delete y.pagination,{params:y,passedParams:O}}const bu=
vendor: 11,666 bytes, line 1
1":host{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{width:100%;height:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android ::slotted(swiper-slide),.swiper-ios ::slotted(swiper-slide),.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}::slotted(swiper-slide){flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}::slotted(.swiper-slide-invisible-blank){visibility:hidden}.swiper-autoheight,.swiper-autoheight ::slotted(swiper-slide){height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden ::slotted(swiper-slide){transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d ::slotted(swiper-slide){transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode ::slotted(swiper-slide){scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode ::slotted(swiper-slide){scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered ::slotted(swiper-slide){scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal ::slotted(swiper-slide):first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical ::slotted(swiper-slide):first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-virtual ::slotted(swiper-slide){-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:host{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}::slotted(.swiper-slide-zoomed){cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode ::slotted(swiper-slide){transition-timing-function:ease-out}.swiper-fade ::slotted(swiper-slide){pointer-events:none;transition-property:opacity}.swiper-fade ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-fade ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-fade ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper
1-cube{overflow:visible}.swiper-cube ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-cube.swiper-rtl ::slotted(swiper-slide){transform-origin:100% 0}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-next),.swiper-cube ::slotted(.swiper-slide-prev){pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube ::slotted(.swiper-slide-next)+::slotted(swiper-slide){pointer-events:auto;visibility:visible}.swiper-flip{overflow:visible}.swiper-flip ::slotted(swiper-slide){pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-flip ::slotted(.swiper-slide-active),.swiper-flip ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-creative ::slotted(swiper-slide){-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards ::slotted(swiper-slide){transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}",dc=typeof window>"u"||typeof HTMLElement>"u"?class $d{}:HTMLElement,fc='<svg width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>\n ',Iu=(I,l)=>{if(typeof CSSStyleSheet<"u"&&I.adoptedStyleSheets){const h=new CSSStyleSheet;h.replaceSync(l),I.adoptedStyleSheets=[h]}else{const h=document.createElement("style");h.rel="stylesheet",h.textContent=l,I.appendChild(h)}};class sd extends dc{constructor(){super(),this.attachShadow({mode:"open"})}static get nextButtonSvg(){return fc}static get prevButtonSvg(){return fc.replace("/></svg>",' transform-origin="center" transform="rotate(180)"/></svg>')}cssStyles(){return[bu,...this.injectStyles&&Array.isArray(this.injectStyles)?this.injectStyles:[]].join("\n")}cssLinks(){return this.injectStylesUrls||[]}calcSlideSlots(){const l=this.slideSlots||0,h=[...this.querySelectorAll("[slot^=slide-]")].map(y=>parseInt(y.getAttribute("slot").split("slide-")[1],10));if(this.slideSlots=h.length?Math.max(...h)+1:0,this.rendered)if(this.slideSlots>l)for(let y=l;y<this.slideSlots;y+=1){const O=document.createElement("swiper-slide");O.setAttribute("part",`slide slide-${y+1}`);const z=document.createElement("slot");z.setAttribute("name",`slide-${y+1}`),O.appendChild(z),this.shadowRoot.querySelector(".swiper-wrapper").appendChild(O)}else if(this.slideSlots<l){const y=this.swiper.slides;for(let O=y.length-1;O>=0;O-=1)O>this.slideSlots&&y[O].remove()}}
1render(){if(this.rendered)return;this.calcSlideSlots();let l=this.cssStyles();this.slideSlots>0&&(l=l.replace(/::slotted\(([a-z-0-9.]*)\)/g,"$1")),l.length&&Iu(this.shadowRoot,l),this.cssLinks().forEach(y=>{if(this.shadowRoot.querySelector(`link[href="${y}"]`))return;const z=document.createElement("link");z.rel="stylesheet",z.href=y,this.shadowRoot.appendChild(z)});const h=document.createElement("div");h.classList.add("swiper"),h.part="container",h.innerHTML=`\n <slot name="container-start"></slot>\n <div class="swiper-wrapper" part="wrapper">\n <slot></slot>\n ${Array.from({length:this.slideSlots}).map((y,O)=>`\n <swiper-slide part="slide slide-${O}">\n <slot name="slide-${O}"></slot>\n </swiper-slide>\n `).join("")}\n </div>\n <slot name="container-end"></slot>\n ${function qs(I){return void 0===I&&(I={}),I.navigation&&typeof I.navigation.nextEl>"u"&&typeof I.navigation.prevEl>"u"}(this.passedParams)?`\n <div part="button-prev" class="swiper-button-prev">${this.constructor.prevButtonSvg}</div>\n <div part="button-next" class="swiper-button-next">${this.constructor.nextButtonSvg}</div>\n `:""}\n ${function Ho(I){return void 0===I&&(I={}),I.pagination&&typeof I.pagination.el>"u"}(this.passedParams)?'\n <div part="pagination" class="swiper-pagination"></div>\n ':""}\n ${function As(I){return void 0===I&&(I={}),I.scrollbar&&typeof I.scrollbar.el>"u"}(this.passedParams)?'\n <div part="scrollbar" class="swiper-scrollbar"></div>\n ':""}\n `,this.shadowRoot.appendChild(h),this.rendered=!0}initialize(){var l=this;if(this.initialized)return;this.initialized=!0;const{params:h,passedParams:y}=fl(this);this.swiperParams=h,this.passedParams=y,delete this.swiperParams.init,this.render(),this.swiper=new Da(this.shadowRoot.querySelector(".swiper"),{...h.virtual?{}:{observer:!0,observeSlideChildren:this.slideSlots>0},...h,touchEventsTarget:"container",onAny:function(O){"observerUpdate"===O&&l.calcSlideSlots();const z=h.eventsPrefix?`${h.eventsPrefix}${O.toLowerCase()}`:O.toLowerCase();for(var Oe=arguments.length,Be=new Array(Oe>1?Oe-1:0),xe=1;xe<Oe;xe++)Be[xe-1]=arguments[xe];const mt=new CustomEvent(z,{detail:Be,bubbles:"hashChange"!==O,cancelable:!0});l.dispatchEvent(mt)}})}connectedCallback(){this.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||!1===this.init||"false"===this.getAttribute("init")||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||(this.swiper&&this.swiper.destroy&&this.swiper.destroy(),this.initialized=!1)}updateSwiperOnPropChange(l,h){const{params:y,passedParams:O}=fl(this,l,h);this.passedParams=O,this.swiperParams=y,(!this.swiper||this.swiper.params[l]!==h)&&function co(I){let{swiper:l,slides:h,passedParams:y,changedParams:O,nextEl:z,prevEl:Oe,scrollbarEl:Be,paginationEl:xe}=I;const mt=O.filter(Qr=>"children"!==Qr&&"direction"!==Qr&&"wrapperClass"!==Qr),{params:gt,pagination:vt,navigation:Gt,scrollbar:un,virtual:fn,thumbs:Sn}=l;let Pn,tn,kn,Rn,vr,hi,ui,Ri;O.includes("thumbs")&&y.thumbs&&y.thumbs.swiper&>.thumbs&&!gt.thumbs.swiper&&(Pn=!0),O.includes("controller")&&y.controller&&y.controller.control&>.controller&&!gt.controller.control&&(tn=!0),O.includes("pagination")&&y.pagination&&(y.pagination.el||xe)&&(gt.pagination||!1===gt.pagination)&&vt&&!vt.el&&(kn=!0),O.includes("scrollbar")&&y.scrollbar&&(y.scrollbar.el||Be)&&(gt.scrollbar||!1===gt.scrollbar)&&un&&!un.el&&(Rn=!0),O.includes("navigation")&&y.navigation&&(y.navigation.prevEl||Oe)&&(y.navigation.nextEl||z)&&(gt.navigation||!1===gt.navigation)&&Gt&&!Gt.prevEl&&!Gt.nextEl&&(vr=!0);const ni=Qr=>{l[Qr]&&(l[Qr].destroy(),"navigation"===Qr?(l.isElement&&(l[Qr].prevEl.remove(),l[Qr].nextEl.remove()),gt[Qr].prevEl=void 0,gt[Qr].nextEl=void 0,l[Qr].prevEl=void 0,l[Qr].nextEl=void 0):(l.isElement&&l[Qr].el.remove(),gt[Qr].el=void 0,l[Qr].el=void 0))};O.includes("loop")&&l.isElement&&(gt.loop&&!y.loop?hi=!0:!gt.loop&&y.loop?ui=!0:Ri=!0),mt.forEach(Qr=>{if(Bs(gt[Qr])&&Bs(y[Qr]))Object.assign(gt[Qr],y[Qr]),("navigation"===Qr||"pagination"===Qr||"scrollbar"===Qr)&&"enabled"in y[Qr]&&!y[Qr].enabled&&ni(Qr);else{const Zr=y[Qr];!0!==Zr&&!1!==Zr||"navigation"!==Qr&&"pagination"!==Qr&&"scrollbar"!==Qr?gt[Qr]=y[Qr]:!1===Zr&&ni(Qr)}}),mt.includes("controller")&&!tn&&l.controller&&l.controller.control&>.controller&>.controller.control&&(l.controller.control=gt.controller.control),O.includes("children")&&h&&fn&>.virtual.enabled?(fn.slides=h,fn.update(!0)):O.includes("virtual")&&fn&>.virtual.enabled&&(h&&(fn.slides=h),fn.update(!0)),O.includes("children")&&h&>.loop&&(Ri=!0),Pn&&Sn.init()&&Sn.update(!0),tn&&(l.controller.control=gt.controller.control),kn&&(l.isElement&&(!xe||"string"==typeof xe)&&(xe=document.createElement("div"),xe.classList.add("swiper-pagination"),xe.part.add("pagination"),l.el.appendChild(xe)),xe&&(gt.pagination.el=xe),vt.init(),vt.render(),vt.update(
1)),Rn&&(l.isElement&&(!Be||"string"==typeof Be)&&(Be=document.createElement("div"),Be.classList.add("swiper-scrollbar"),Be.part.add("scrollbar"),l.el.appendChild(Be)),Be&&(gt.scrollbar.el=Be),un.init(),un.updateSize(),un.setTranslate()),vr&&(l.isElement&&((!z||"string"==typeof z)&&(z=document.createElement("div"),z.classList.add("swiper-button-next"),z.innerHTML=l.hostEl.constructor.nextButtonSvg,z.part.add("button-next"),l.el.appendChild(z)),(!Oe||"string"==typeof Oe)&&(Oe=document.createElement("div"),Oe.classList.add("swiper-button-prev"),Oe.innerHTML=l.hostEl.constructor.prevButtonSvg,Oe.part.add("button-prev"),l.el.appendChild(Oe))),z&&(gt.navigation.nextEl=z),Oe&&(gt.navigation.prevEl=Oe),Gt.init(),Gt.update()),O.includes("allowSlideNext")&&(l.allowSlideNext=y.allowSlideNext),O.includes("allowSlidePrev")&&(l.allowSlidePrev=y.allowSlidePrev),O.includes("direction")&&l.changeDirection(y.direction,!1),(hi||Ri)&&l.loopDestroy(),(ui||Ri)&&l.loopCreate(),l.update()}({swiper:this.swiper,passedParams:this.passedParams,changedParams:[ws(l)],..."navigation"===l&&O[l]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{},..."pagination"===l&&O[l]?{paginationEl:".swiper-pagination"}:{},..."scrollbar"===l&&O[l]?{scrollbarEl:".swiper-scrollbar"}:{}})}attributeChangedCallback(l,h,y){this.initialized&&("true"===h&&null===y&&(y=!1),this.updateSwiperOnPropChange(l,y))}static get observedAttributes(){return xo.filter(h=>h.includes("_")).map(h=>h.replace(/[A-Z]/g,y=>`-${y}`).replace("_","").toLowerCase())}}xo.forEach(I=>{"init"!==I&&(I=I.replace("_",""),Object.defineProperty(sd.prototype,I,{configurable:!0,get(){return(this.passedParams||{})[I]},set(l){this.passedParams||(this.passedParams={}),this.passedParams[I]=l,this.initialized&&this.updateSwiperOnPropChange(I,l)}}))});typeof window<"u"&&(window.SwiperElementRegisterParams=I=>{xo.push(...I)}),typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",sd),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",class Af extends dc{constructor(){super(),this.attachShadow({mode:"open"})}render(){const l=this.lazy||""===this.getAttribute("lazy")||"true"===this.getAttribute("lazy");if(Iu(this.shadowRoot,"::slotted(.swiper-slide-shadow),::slotted(.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-top){position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}::slotted(.swiper-slide-shadow){background:rgba(0,0,0,.15)}::slotted(.swiper-slide-shadow-left){background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-right){background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-top){background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}::slotted(.swiper-slide-shadow-bottom){background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear;width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-cube.swiper-slide-shadow-top){z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-bottom),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-left),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-right),::slotted(.swiper-slide-shadow-flip.swiper-slide-shadow-top){z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}::slotted(.swiper-zoom-container){width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}::slotted(.swiper-zoom-container)>canvas,::slotted(.swiper-zoom-container)>img,::slotted(.swiper-zoom-container)>svg{max-width:100%;max-height:100%;object-fit:contain}"),this.shadowRoot.appendChild(document.createElement("slot")),l){const h=document.createElement("div");h.classList.add("swiper-lazy-preloader"),h.part.add("preloader"),this.shadowRoot.appendChild(h)}}initialize(){this.render()}connectedCallback(){this.initialize()}}));const jd=I=>(0,b.c)(function*(){yield I.checkAuthState()});let Cc=(()=>{class I{static \u0275fac=function(y){return new(y||I)};static \u0275mod=v.a4G({type:I,bootstrap:[De]});static \u0275inj=v.s3X({providers:[ol.A,D.y,cu.Y,Ws.Y,Tl.Y,{provide:v.kZF,useFactory:jd,deps:[_e.e],multi:!0}],imports:[i.iE,x,C.wZ.forRoot(),xt.l,_.SU,ge.forRoot(),Ba,K.forRoot(),sl.UN.initializeApp(il.O.firebaseConfig),li.Se,Cs.Q$]})}return I})();var od=a(58637);console.log("prod env:",il.O.production),il.O.production&&(console.log=function(){},console.error=function(){},console.warn=function(){},(0,v.agy)()),i.o_().bootstrapModule(Cc).catch(I=>console.error(I)),window,typeof window>"u"?Promise.resolve():(0,od.p)().then(()=>(0,od.b)([["pwa-camera-modal",[[1,"pwa-camera-modal",{facingMode:[1,"facing-mode"],present:[64],dismiss:[64]}]]],["pwa-action-sheet",[[1,"pwa-action-sheet",{header:[1],cancelable:[4],options:[16],open:[32]}]]],["pwa-toast",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["pwa-camera",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],handlePhoto:[16],handleNoDeviceError:[16],noDevicesText:[1,"no-devices-text"],noDevicesButtonText:[1,"no-devices-button-text"],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32],hasCamera:[32],rotation:[32],deviceError:[32]}]]],["pwa-camera-modal-instance",[[1,"pwa-camera-modal-instance",{facingMode:[1,"facing-mode"],noDevicesText:[1,"no-devices-text"],noDevicesButtonText:[1,"no-devices-button-text"]},[[16,"keyup","handleBackdropKeyUp"]]]]]],undefined))},21576:(B,G,a)=>{"use strict";var v=typeof v<"u"?v:typeof self<"u"?self:typeof window<"u"?window:{};a(30256),a(62016),a(21040),a(53475),a(31956),a(12600),a(4376);var b=a(1196),_=a(71559),C=a(54216),P=a(96284),S=a(63532),R=a(2676),k=a(66024),x=a(94064);a(49640),a(79628),a(76568),a(82984);var D=a(33248),ee=a(59848);a(4248),a(29912),a(48928);var te=a(43752),J=a(88548);a(89120),a(29708),a(16760),a(9456),a(12644),a(54004),a(16699);var Q=a(64632),we=a(25724);a(32452);var de=a(63384),Y=a(52127);a(32928),a(51408),a(42984),a(35016),a(16968);var Se=a(97936);
1a(85607);var Ye=a(58416),pe=a(85720),ae=a(83984),Ve=a(54800),Ne=a(61248);a(57912),a(97355),a(17664),a(87168),a(20944),a(62496),a(7996),a(44376),a(69712),a(44524),a(61072),a(63240),a(16964),a(64872),a(90040),a(92027),a(36288),a(26932),a(51336),a(26596),a(67696),a(73784),a(89416),a(58372),a(16604),a(90600),a(11296),a(16680),a(19400),a(29168),a(40500),a(68392),a(45811);var Ie=a(9312);a(91088),a(87532),a(56468);var H=a(60764),j=a(75088);function ye(Nt){return Nt&&"object"==typeof Nt&&"default"in Nt?Nt:{default:Nt}}function Le(Nt){if(Nt&&Nt.__esModule)return Nt;var $t=Object.create(null);return Nt&&Object.keys(Nt).forEach(function(Je){if("default"!==Je){var be=Object.getOwnPropertyDescriptor(Nt,Je);Object.defineProperty($t,Je,be.get?be:{enumerable:!0,get:function(){return Nt[Je]}})}}),$t.default=Nt,Object.freeze($t)}a(35172);var W=ye(b),We=ye(_),At=ye(C),Ut=ye(P),it=ye(S),ue=ye(R),se=ye(k),ce=ye(x),K=ye(D),_e=ye(ee),Pe=Le(te),De=ye(we),ke=ye(Y),Lt=ye(Se),Dt=ye(H);function He(Nt,$t,Je,be){var Me,oe=arguments.length,qe=oe<3?$t:null===be?be=Object.getOwnPropertyDescriptor($t,Je):be;if("object"===(typeof Reflect>"u"?"undefined":_e.default(Reflect))&&"function"==typeof Reflect.decorate)qe=Reflect.decorate(Nt,$t,Je,be);else for(var Ce=Nt.length-1;Ce>=0;Ce--)(Me=Nt[Ce])&&(qe=(oe<3?Me(qe):oe>3?Me($t,Je,qe):Me($t,Je))||qe);return oe>3&&qe&&Object.defineProperty($t,Je,qe),qe}function ge(Nt,$t){if("object"===(typeof Reflect>"u"?"undefined":_e.default(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(Nt,$t)}function xt(Nt,$t){return["".concat((new Date).toISOString()," Conversations ").concat(Nt,":")].concat(Array.from($t))}var pt=Pe.getLogger("twilio-conversations"),rn=function(){function Nt($t){ce.default(this,Nt),ue.default(this,"prefix",""),this.prefix=null!=$t&&$t.length>0?$t+" ":""}return se.default(Nt,[{key:"setLevel",value:function(Je){pt.setLevel(Je)}},{key:"trace",value:function(){if(pt.getLevel()==pt.levels.TRACE){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.debug.apply(null,xt(this.prefix+"T",be))}}},{key:"debug",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.debug.apply(null,xt(this.prefix+"D",be))}},{key:"info",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.info.apply(null,xt(this.prefix+"I",be))}},{key:"warn",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.warn.apply(null,xt(this.prefix+"W",be))}},{key:"error",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.error.apply(null,xt(this.prefix+"E",be))}}],[{key:"scope",value:function(Je){return new Nt(Je)}},{key:"setLevel",value:function(Je){pt.setLevel(Je)}},{key:"trace",value:function(){if(pt.getLevel()==pt.levels.TRACE){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.debug.apply(null,xt("T",be))}}},{key:"debug",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.debug.apply(null,xt("D",be))}},{key:"info",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.info.apply(null,xt("I",be))}},{key:"warn",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.warn.apply(null,xt("W",be))}},{key:"error",value:function(){for(var Je=arguments.length,be=new Array(Je),oe=0;oe<Je;oe++)be[oe]=arguments[oe];pt.error.apply(null,xt("E",be))}}]),Nt}();function cn(Nt,$t){var Je=Object.keys(Nt);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(Nt);$t&&(be=be.filter(function(oe){return Object.getOwnPropertyDescriptor(Nt,oe).enumerable})),Je.push.apply(Je,be)}return Je}var lt="PT5S",rt="PT5S",gr=se.default(function Nt(){var $t,Je,be,oe,qe,Me,Ce,Ke,tt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},Et=arguments.length>1?arguments[1]:void 0,Vn=arguments.length>2?arguments[2]:void 0;ce.default(this,Nt),ue.default(this,"typingIndicatorTimeoutDefault",5e3);var Gn=tt.Chat||tt.IPMessaging||tt||{};this.productId=Gn.productId,this.links={myConversations:Et.links.my_conversations,conversations:Et.links.conversations,users:Et.links.users,currentUser:Et.links.current_user,typing:Et.links.typing,mediaService:Et.links.media_service,mediaSetService:Et.links.media_set_service,messagesReceipts:Et.links.messages_receipts},this.limits={mediaAttachmentsCountLimit:Et.options.media_attachments_count_limit,mediaAttachmentSizeLimitInMb:Et.options.media_attachment_size_limit_in_mb,mediaAttachmentsTotalSizeLimitInMb:Et.options.media_attachments_total_size_limit_in_mb,emailHistoriesAllowedContentTypes:Et.options.email_histories_allowed_mime_types,emailBodiesAllowedContentTypes:Et.options.email_bodies_allowed_mime_types},this.typingIndicatorTimeoutOverride=Gn.typingIndicatorTimeoutOverride,this.backoffConfiguration=function mn(Nt){for(var $t=1;$t<arguments.length;$t++){var Je=null!=arguments[$t]?arguments[$t]:{};
1$t%2?cn(Object(Je),!0).forEach(function(be){ue.default(Nt,be,Je[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(Je)):cn(Object(Je)).forEach(function(be){Object.defineProperty(Nt,be,Object.getOwnPropertyDescriptor(Je,be))})}return Nt}({min:1e3,max:4e3,maxAttemptsCount:3},Gn.backoffConfigOverride),this.retryWhenThrottled=void 0===Gn.retryWhenThrottledOverride||Gn.retryWhenThrottledOverride,this.userInfosToSubscribe=null!==($t=null!==(Je=Gn.userInfosToSubscribeOverride)&&void 0!==Je?Je:Et.options.user_infos_to_subscribe)&&void 0!==$t?$t:100,this.reachabilityEnabled=Et.options.reachability_enabled,this.userIdentity=Et.identity,this.userInfo=Et.sync_objects.my_user_info,this.myConversations=Et.sync_objects.my_conversations;var Jn=null!==(be=null!==(oe=Gn.httpCacheIntervalOverride)&&void 0!==oe?oe:Et.options.http_cache_interval)&&void 0!==be?be:lt;try{this.httpCacheInterval=J.toSeconds(J.parse(Jn))}catch{Vn.error("Failed to parse http cache interval ".concat(Jn,", using default value ").concat(lt)),this.httpCacheInterval=J.toSeconds(J.parse(lt))}var ar=null!==(qe=null!==(Me=Gn.consumptionReportIntervalOverride)&&void 0!==Me?Me:Et.options.consumption_report_interval)&&void 0!==qe?qe:rt;try{this.consumptionReportInterval=J.toSeconds(J.parse(ar))}catch{Vn.error("Failed to parse consumption report interval ".concat(ar,", using default value ").concat(rt)),this.consumptionReportInterval=J.toSeconds(J.parse(rt))}this.channelMetadataCacheCapacity=null!==(Ce=tt.channelMetadataCacheCapacity)&&void 0!==Ce?Ce:100,this.messageRecipientsCacheCapacity=null!==(Ke=tt.messageRecipientsCacheCapacity)&&void 0!==Ke?Ke:1e3});function Vr(Nt){return typeof Nt<"u"&&!isNaN(Number(Nt))?Number(Nt):null}function Fr(Nt){try{return new Date(Nt)}catch{return null}}function ti(Nt,$t,Je){var be={};if(Nt)try{be=JSON.parse(Nt)}catch(oe){Je.warn($t,oe)}return be}var Nr=function(){function Nt($t){ce.default(this,Nt),this.base=$t.replace(/\/$/,""),this.args=[],this.paths=[]}return se.default(Nt,[{key:"arg",value:function(Je,be){return typeof be<"u"&&this.args.push(encodeURIComponent(Je)+"="+encodeURIComponent(be)),this}},{key:"path",value:function(Je){return this.paths.push(encodeURIComponent(Je)),this}},{key:"build",value:function(){var Je=this.base;return this.paths.length&&(Je+="/"+this.paths.join("/")),this.args.length&&(Je+="?"+this.args.join("&")),Je}}]),Nt}(),Kr=Q.custom(function(Nt){return[["string","number","boolean","object"].includes(_e.default(Nt)),"a JSON type"]}),Jr=Q.custom(function(Nt){return[["undefined","string","number","boolean","object"].includes(_e.default(Nt)),"an optional JSON type"]}),sr=Q.objectSchema("send media options",{contentType:[Q.literal(null),"string"],filename:["string","undefined"],media:[Q.literal("null"),"string"].concat(De.default("function"==typeof Buffer?[Buffer]:[]),De.default("function"==typeof Blob?[Blob]:[]))});var sn=rn.scope("User"),Qe=function(Nt){At.default(Je,Nt);var be,$t=function or(Nt){var $t=function zr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe,qe,Me){var Ce;return ce.default(this,Je),Ce=$t.call(this),ue.default(We.default(Ce),"promiseToFetch",null),ue.default(We.default(Ce),"updated","updated"),ue.default(We.default(Ce),"userSubscribed","userSubscribed"),ue.default(We.default(Ce),"userUnsubscribed","userUnsubscribed"),Ce.services=Me,Ce.subscribed="initializing",Ce.setMaxListeners(0),Ce.state={identity:be,entityName:oe,friendlyName:null,attributes:{},online:null,notifiable:null},Ce._initializationPromise=new Promise(function(Ke){Ce._resolveInitializationPromise=Ke}),null!==qe&&Ce._resolveInitialization(qe,be,oe,!1),Ce}return se.default(Je,[{key:"identity",get:function(){return this.state.identity},set:function(oe){this.state.identity=oe}},{key:"entityName",set:function(oe){this.state.entityName=oe}},{key:"attributes",get:function(){return this.state.attributes}},{key:"friendlyName",get:function(){return this.state.friendlyName}},{key:"isOnline",get:function(){return this.state.online}},{key:"isNotifiable",get:function(){return this.state.notifiable}},{key:"isSubscribed",get:function(){return"subscribed"==this.subscribed}},{key:"_update",value:(be=W.default(K.default.mark(function qe(Me,Ce){var Ke,tt;return K.default.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return Vn.next=2,this._initializationPromise;case 2:Ke=[],sn.debug("User for",this.state.identity,"updated:",Me,Ce),Vn.t0=Me,Vn.next="friendlyName"===Vn.t0?7:"attributes"===Vn.t0?9:"reachability"===Vn.t0?12:15;break;case 7:return this.state.friendlyName!==Ce.value&&(Ke.push("friendlyName"),this.state.friendlyName=Ce.value),Vn.abrupt("break",16);case 9:return tt=ti(Ce.value,"Retrieved malformed attributes from the server for user: ".concat(this.state.identity),sn),ke.default(this.state.attributes,tt)||(this.state.attributes=tt,Ke.push("attributes")),Vn.abrupt("break",16);case 12:return this.state.online!==Ce.online&&(this.state.online=Ce.online,Ke.push("reachabilityOnline")),this.state.notifiable!==Ce.notifiable&&(this.state.notifiable=Ce.notifiable,Ke.push("reachabilityNotifiable")),Vn.abrupt("break",16);case 15:return Vn.abrupt("return");case 16:Ke.length>
10&&this.emit("updated",{user:this,updateReasons:Ke});case 17:case"end":return Vn.stop()}},qe,this)})),function oe(qe,Me){return be.apply(this,arguments)})},{key:"_updateReachabilityInfo",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var Ke=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,this._initializationPromise;case 2:if(this.configuration.reachabilityEnabled){Et.next=4;break}return Et.abrupt("return",Promise.resolve());case 4:return Et.abrupt("return",Me.get("reachability").then(Ce).catch(function(Vn){sn.warn("Failed to get reachability info for ",Ke.state.identity,Vn)}));case 5:case"end":return Et.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"_fetch",value:function(){var be=W.default(K.default.mark(function qe(){var Me=this;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._initializationPromise;case 2:if(this.state.entityName){Ke.next=4;break}return Ke.abrupt("return",this);case 4:return this.promiseToFetch=this.services.syncClient.map({id:this.state.entityName,mode:"open_existing",includeItems:!0}).then(function(tt){return Me.entity=tt,tt.on("itemUpdated",function(Et){return sn.debug(Me.state.entityName+" ("+Me.state.identity+") itemUpdated: "+Et.item.key),Me._update(Et.item.key,Et.item.data)}),tt.on("itemAdded",function(Et){return sn.debug(Me.state.entityName+" ("+Me.state.identity+") itemAdded: "+Et.item.key),Me._update(Et.item.key,Et.item.data)}),Promise.all([tt.get("friendlyName").then(function(Et){return Me._update(Et.key,Et.data)}),tt.get("attributes").then(function(Et){return Me._update(Et.key,Et.data)}),Me._updateReachabilityInfo(tt,function(Et){return Me._update(Et.key,Et.data)})])}).then(function(){return sn.debug("Fetched for",Me.identity),Me.subscribed="subscribed",Me.emit("userSubscribed",Me),Me}).catch(function(tt){throw Me.promiseToFetch=null,tt}),Ke.abrupt("return",this.promiseToFetch);case 6:case"end":return Ke.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_ensureFetched",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._initializationPromise;case 2:return Ce.abrupt("return",this.promiseToFetch||this._fetch());case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"updateAttributes",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._initializationPromise;case 2:if("unsubscribed"!=this.subscribed){Ke.next=4;break}throw new Error("Can't modify unsubscribed object");case 4:return Ke.next=6,this.services.commandExecutor.mutateResource("post",this.links.self,{attributes:JSON.stringify(Me)});case 6:return Ke.abrupt("return",this);case 7:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"updateFriendlyName",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._initializationPromise;case 2:if("unsubscribed"!=this.subscribed){Ke.next=4;break}throw new Error("Can't modify unsubscribed object");case 4:return Ke.next=6,this.services.commandExecutor.mutateResource("post",this.links.self,{friendly_name:Me});case 6:return Ke.abrupt("return",this);case 7:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"unsubscribe",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._initializationPromise;case 2:if(!this.promiseToFetch){Ce.next=9;break}return Ce.next=5,this.promiseToFetch;case 5:this.entity.close(),this.promiseToFetch=null,this.subscribed="unsubscribed",this.emit("userUnsubscribed",this);case 9:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_resolveInitialization",value:function(oe,qe,Me,Ce){this.configuration=oe,this.identity=qe,this.entityName=Me,this.links={self:"".concat(this.configuration.links.users,"/").concat(encodeURIComponent(this.identity))}
1,this._resolveInitializationPromise(),Ce&&this.emit("updated",{user:this,updateReasons:["friendlyName","attributes","reachabilityOnline","reachabilityNotifiable"]})}}]),Je}(de.ReplayEventEmitter);function wn(Nt,$t){(null==$t||$t>Nt.length)&&($t=Nt.length);for(var Je=0,be=new Array($t);Je<$t;Je++)be[Je]=Nt[Je];return be}He([Q.validateTypesAsync(Kr),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],Qe.prototype,"updateAttributes",null),He([Q.validateTypesAsync(["string"]),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],Qe.prototype,"updateFriendlyName",null);var dr=function(){function Nt($t,Je){ce.default(this,Nt),this.configuration=$t,this.services=Je,this.cache=new Map,this.cacheLifetime=100*this.configuration.httpCacheInterval,this.cleanupCache()}return se.default(Nt,[{key:"isExpired",value:function(Je){return!this.cacheLifetime||Date.now()-Je>this.cacheLifetime}},{key:"cleanupCache",value:function(){var be,Je=function ut(Nt,$t){var Je=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!Je){if(Array.isArray(Nt)||(Je=function Xt(Nt,$t){if(Nt){if("string"==typeof Nt)return wn(Nt,$t);var Je=Object.prototype.toString.call(Nt).slice(8,-1);if("Object"===Je&&Nt.constructor&&(Je=Nt.constructor.name),"Map"===Je||"Set"===Je)return Array.from(Nt);if("Arguments"===Je||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return wn(Nt,$t)}}(Nt))||$t&&Nt&&"number"==typeof Nt.length){Je&&(Nt=Je);var be=0,oe=function(){};return{s:oe,n:function(){return be>=Nt.length?{done:!0}:{done:!1,value:Nt[be++]}},e:function(tt){throw tt},f:oe}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ce,qe=!0,Me=!1;return{s:function(){Je=Je.call(Nt)},n:function(){var tt=Je.next();return qe=tt.done,tt},e:function(tt){Me=!0,Ce=tt},f:function(){try{!qe&&null!=Je.return&&Je.return()}finally{if(Me)throw Ce}}}}(this.cache);try{for(Je.s();!(be=Je.n()).done;){var oe=Lt.default(be.value,2),qe=oe[0];this.isExpired(oe[1].timestamp)&&this.cache.delete(qe)}}catch(Ce){Je.e(Ce)}finally{Je.f()}0===this.cache.size&&clearInterval(this.timer)}},{key:"pokeTimer",value:function(){var Je=this;this.timer=this.timer||setInterval(function(){return Je.cleanupCache()},2*this.cacheLifetime)}},{key:"executeWithRetry",value:function(Je){var be=this,oe=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(qe,Me){var Ce=[502,503,504];oe&&Ce.push(429);var Ke=new Ye.Retrier(be.configuration.backoffConfiguration);Ke.on("attempt",function(){Je().then(function(tt){return Ke.succeeded(tt)}).catch(function(tt){Ce.indexOf(tt.status)>-1||"Twilsock disconnected"===tt.message?Ke.failed(tt):(Ke.removeAllListeners(),Ke.cancel(),Me(tt))})}),Ke.on("succeeded",function(tt){qe(tt)}),Ke.on("cancelled",function(tt){return Me(tt)}),Ke.on("failed",function(tt){return Me(tt)}),Ke.start()})}},{key:"get",value:($t=W.default(K.default.mark(function be(oe){var Me,Ce,Ke,qe=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(!(Me=this.cache.get(oe))||this.isExpired(Me.timestamp)){Et.next=3;break}return Et.abrupt("return",Me.response);case 3:return Ce={},Et.next=6,this.executeWithRetry(function(){return qe.services.transport.get(oe,Ce,qe.configuration.productId)},this.configuration.retryWhenThrottled);case 6:return this.cache.set(oe,{response:Ke=Et.sent,timestamp:Date.now()}),this.pokeTimer(),Et.abrupt("return",Ke);case 10:case"end":return Et.stop()}},be,this)})),function Je(be){return $t.apply(this,arguments)})}]),Nt;var $t}(),vn=se.default(function Nt(){ce.default(this,Nt)});ue.default(vn,"TYPING_INDICATOR","twilio.ipmsg.typing_indicator"),ue.default(vn,"NEW_MESSAGE","twilio.conversations.new_message"),ue.default(vn,"ADDED_TO_CONVERSATION","twilio.conversations.added_to_conversation"),ue.default(vn,"REMOVED_FROM_CONVERSATION","twilio.conversations.removed_from_conversation"),ue.default(vn,"CONSUMPTION_UPDATE","twilio.channel.consumption_update");var Mt=rn.scope("Participant"),Ze=function(Nt){At.default(Je,Nt);var be,$t=function jt(Nt){var $t=function Ct(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe,qe,Me,Ce){var Ke,tt,Et;if(ce.default(this,Je),(Et=$t.call(this)).conversation=qe,Et.links=Me,Et.services=Ce,Et.state={attributes:ti(be.attributes,"Retrieved malformed attributes from the server for participant: "+oe,Mt),dateCreated:be.dateCreated?Fr(be.dateCreated):null,dateUpdated:be.dateCreated?Fr(be.dateUpdated):null,sid:oe,typingTimeout:null,isTyping:!1,identity:be.identity,roleSid:null!==(Ke=be.roleSid)&&void 0!==Ke?Ke:"",lastReadMessageIndex:Number.isInteger(be.lastConsumedMessageIndex)?be.lastConsumedMessageIndex:null,lastReadTimestamp:be.lastConsumptionTimestamp?Fr(be.lastConsumptionTimestamp):null,type:be.type||"chat",userInfo:be.userInfo,bindings:null!==(tt=be.bindings)&&void 0!==tt?tt:{}}
1,!be.identity&&!be.type)throw new Error("Received invalid Participant object from server: Missing identity or type of Participant.");return Et}return se.default(Je,[{key:"sid",get:function(){return this.state.sid}},{key:"attributes",get:function(){return this.state.attributes}},{key:"dateCreated",get:function(){return this.state.dateCreated}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"identity",get:function(){return this.state.identity}},{key:"isTyping",get:function(){return this.state.isTyping}},{key:"lastReadMessageIndex",get:function(){return this.state.lastReadMessageIndex}},{key:"lastReadTimestamp",get:function(){return this.state.lastReadTimestamp}},{key:"roleSid",get:function(){return this.state.roleSid}},{key:"type",get:function(){return this.state.type}},{key:"bindings",get:function(){var oe;return null!==(oe=this.state.bindings)&&void 0!==oe?oe:{}}},{key:"_startTyping",value:function(oe){var qe=this;return this.state.typingTimeout&&clearTimeout(this.state.typingTimeout),this.state.isTyping=!0,this.emit(Je.typingStarted,this),this.conversation.emit(gn.typingStarted,this),this.state.typingTimeout=Number(setTimeout(function(){return qe._endTyping()},oe)),this}},{key:"_endTyping",value:function(){this.state.typingTimeout&&(this.state.isTyping=!1,this.emit(Je.typingEnded,this),this.conversation.emit(gn.typingEnded,this),clearInterval(this.state.typingTimeout),this.state.typingTimeout=null)}},{key:"_update",value:function(oe){var qe=[],Me=ti(oe.attributes,"Retrieved malformed attributes from the server for participant: "+this.state.sid,Mt);oe.attributes&&!ke.default(this.state.attributes,Me)&&(this.state.attributes=Me,qe.push("attributes"));var Ce=Fr(oe.dateUpdated);oe.dateUpdated&&Ce?.getTime()!==(this.state.dateUpdated&&this.state.dateUpdated.getTime())&&(this.state.dateUpdated=Ce,qe.push("dateUpdated"));var Ke=Fr(oe.dateCreated);if(oe.dateCreated&&Ke?.getTime()!==(this.state.dateCreated&&this.state.dateCreated.getTime())&&(this.state.dateCreated=Ke,qe.push("dateCreated")),oe.roleSid&&this.state.roleSid!==oe.roleSid&&(this.state.roleSid=oe.roleSid,qe.push("roleSid")),(Number.isInteger(oe.lastConsumedMessageIndex)||null===oe.lastConsumedMessageIndex)&&this.state.lastReadMessageIndex!==oe.lastConsumedMessageIndex&&(this.state.lastReadMessageIndex=oe.lastConsumedMessageIndex,qe.push("lastReadMessageIndex")),oe.lastConsumptionTimestamp){var tt=new Date(oe.lastConsumptionTimestamp);(!this.state.lastReadTimestamp||this.state.lastReadTimestamp.getTime()!==tt.getTime())&&(this.state.lastReadTimestamp=tt,qe.push("lastReadTimestamp"))}return oe.bindings&&!ke.default(this.state.bindings,oe.bindings)&&(this.state.bindings=oe.bindings,qe.push("bindings")),qe.length>0&&this.emit(Je.updated,{participant:this,updateReasons:qe}),this}},{key:"getUser",value:(be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if("chat"==this.type){Ce.next=2;break}throw new Error("Getting User is not supported for this Participant type: "+this.type);case 2:return Ce.abrupt("return",this.services.users.getUser(this.state.identity,this.state.userInfo));case 3:case"end":return Ce.stop()}},qe,this)})),function oe(){return be.apply(this,arguments)})},{key:"remove",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.abrupt("return",this.conversation.removeParticipant(this));case 1:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"updateAttributes",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this.services.commandExecutor.mutateResource("post",this.links.self,{attributes:JSON.stringify(Me)});case 2:return Ke.abrupt("return",this);case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()}]),Je}(de.ReplayEventEmitter);ue.default(Ze,"typingStarted","typingStarted"),ue.default(Ze,"typingEnded","typingEnded"),ue.default(Ze,"updated","updated"),He([Q.validateTypesAsync(Kr),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],Ze.prototype,"updateAttributes",null);var Fe=rn.scope("Participants"),ft=function(Nt){At.default(Je,Nt);var be,$t=function et(Nt){var $t=function Zt(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);
1function Je(be,oe,qe,Me){var Ce;return ce.default(this,Je),Ce=$t.call(this),ue.default(We.default(Ce),"rosterEntityPromise",null),Ce.conversation=be,Ce.participants=oe,Ce.links=qe,Ce.services=Me,Ce}return se.default(Je,[{key:"unsubscribe",value:(be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(!this.rosterEntityPromise){Ke.next=6;break}return Ke.next=3,this.rosterEntityPromise;case 3:Ke.sent.close(),this.rosterEntityPromise=null;case 6:case"end":return Ke.stop()}},qe,this)})),function oe(){return be.apply(this,arguments)})},{key:"subscribe",value:function(oe){var qe=this,Me="string"==typeof oe?this.services.syncClient.map({id:oe,mode:"open_existing"}):Promise.resolve(oe);return this.rosterEntityPromise=this.rosterEntityPromise||Me.then(function(Ce){Ce.on(Ve.SyncMap.itemAdded,function(Et){Fe.debug(qe.conversation.sid+" itemAdded: "+Et.item.key),qe.upsertParticipant(Et.item.key,Et.item.data).then(function(Vn){qe.emit(gn.participantJoined,Vn)})}),Ce.on(Ve.SyncMap.itemRemoved,function(Et){Fe.debug(qe.conversation.sid+" itemRemoved: "+Et.key);var Vn=Et.key;if(qe.participants.has(Vn)){var Gn=qe.participants.get(Vn);qe.participants.delete(Vn),Gn&&qe.emit(gn.participantLeft,Gn)}}),Ce.on(Ve.SyncMap.itemUpdated,function(Et){Fe.debug(qe.conversation.sid+" itemUpdated: "+Et.item.key),qe.upsertParticipant(Et.item.key,Et.item.data).catch(function(Vn){return Fe.error(Vn)})});var Ke=[];return Ce.getItems().then(function Et(Vn){return Vn.items.forEach(function(Gn){Ke.push(qe.upsertParticipant(Gn.key,Gn.data))}),Vn.hasNextPage?Vn.nextPage().then(Et):null}).then(function(){return Promise.all(Ke)}).then(function(){return Ce})}).catch(function(Ce){throw qe.rosterEntityPromise=null,"disconnected"!=qe.services.syncClient.connectionState&&Fe.error("Failed to get roster object for conversation",qe.conversation.sid,Ce),Fe.debug("ERROR: Failed to get roster object for conversation",qe.conversation.sid,Ce),Ce})}},{key:"upsertParticipantFromResponse",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce,Ke,tt,Et,Vn,Gn,Jn,ar;return K.default.wrap(function(zi){for(;;)switch(zi.prev=zi.next){case 0:return Ke=Me.sid,tt=Me.attributes,Et=Me.date_created,Vn=Me.date_updated,Gn=Me.identity,Jn=Me.role_sid,ar=Me.messaging_binding,zi.next=3,this.upsertParticipant(Ke,{attributes:tt,dateCreated:new Date(Et),dateUpdated:new Date(Vn),identity:Gn,roleSid:Jn,lastConsumedMessageIndex:null,lastConsumptionTimestamp:null,type:null!==(Ce=ar?.type)&&void 0!==Ce?Ce:"chat"});case 3:return zi.abrupt("return",zi.sent);case 4:case"end":return zi.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"upsertParticipant",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var tt,Et,Ke=this;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:if(!(tt=this.participants.get(Me))){Gn.next=3;break}return Gn.abrupt("return",tt._update(Ce));case 3:return Et={self:"".concat(this.links.participants,"/").concat(Me)},tt=new Ze(Ce,Me,this.conversation,Et,this.services),this.participants.set(Me,tt),tt.on(Ze.updated,function(Jn){return Ke.emit(gn.participantUpdated,Jn)}),Gn.abrupt("return",tt);case 8:case"end":return Gn.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"getParticipants",value:function(){var be=W.default(K.default.mark(function qe(){var Me=this;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.abrupt("return",this.rosterEntityPromise?this.rosterEntityPromise.then(function(){var tt=[];
1return Me.participants.forEach(function(Et){return tt.push(Et)}),tt}):[]);case 1:case"end":return Ke.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getParticipantBySid",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce=this;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.abrupt("return",this.rosterEntityPromise?this.rosterEntityPromise.then(function(){var Et=Ce.participants.get(Me);if(!Et)throw new Error("Participant with SID "+Me+" was not found");return Et}):null);case 1:case"end":return tt.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getParticipantByIdentity",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ke,Ce=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Ke=null,Et.abrupt("return",this.rosterEntityPromise?this.rosterEntityPromise.then(function(){if(Ce.participants.forEach(function(Vn){Vn.identity===Me&&(Ke=Vn)}),!Ke)throw new Error("Participant with identity "+Me+" was not found");return Ke}):null);case 2:case"end":return Et.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"add",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this.services.commandExecutor.mutateResource("post",this.links.participants,{identity:Me,attributes:typeof Ce<"u"?JSON.stringify(Ce):void 0});case 2:return tt.abrupt("return",tt.sent);case 3:case"end":return tt.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"addNonChatParticipant",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var Ke,tt,Et,Vn,Gn=arguments;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return Et=Gn.length>2&&void 0!==Gn[2]?Gn[2]:{},Vn=Gn.length>3&&void 0!==Gn[3]?Gn[3]:{},ar.next=4,this.services.commandExecutor.mutateResource("post",this.links.participants,{attributes:typeof Et<"u"?JSON.stringify(Et):void 0,messaging_binding:{address:Ce,proxy_address:Me,name:null==Vn||null===(Ke=Vn.email)||void 0===Ke?void 0:Ke.name,level:null==Vn||null===(tt=Vn.email)||void 0===tt?void 0:tt.level}});case 4:return ar.abrupt("return",ar.sent);case 5:case"end":return ar.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"remove",value:function(oe){return this.services.commandExecutor.mutateResource("delete","".concat(this.links.participants,"/").concat(encodeURIComponent(oe)))}}]),Je}(de.ReplayEventEmitter),dn=function(){function Nt($t,Je){var be;ce.default(this,Nt),ue.default(this,"mcsMedia",null),this.services=Je,$t instanceof Ne.McsMedia&&(this.mcsMedia=$t),this.state={sid:$t.sid,c
1ategory:$t.category,filename:null!==(be=$t.filename)&&void 0!==be?be:null,contentType:$t.contentType,size:$t.size}}return se.default(Nt,[{key:"sid",get:function(){return this.state.sid}},{key:"filename",get:function(){return this.state.filename}},{key:"contentType",get:function(){return this.state.contentType}},{key:"size",get:function(){return this.state.size}},{key:"category",get:function(){return this.state.category}},{key:"getContentTemporaryUrl",value:function(){var Je=this;return new Ne.CancellablePromise(function(){var be=W.default(K.default.mark(function oe(qe,Me,Ce){var Ke,tt,Et,Vn;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(tt=Je.mcsMedia?void 0:Je._fetchMcsMedia(),Et=null===(Ke=Je.mcsMedia)||void 0===Ke?void 0:Ke.getContentUrl(),Ce(function(){tt&&tt.cancel(),Et&&Et.cancel()}),Jn.prev=3,Et){Jn.next=9;break}return Jn.next=7,tt;case 7:Vn=Jn.sent,Et=Vn?.getContentUrl();case 9:if(Jn.t0=qe,!Et){Jn.next=16;break}return Jn.next=13,Et;case 13:Jn.t1=Jn.sent,Jn.next=17;break;case 16:Jn.t1=null;case 17:Jn.t2=Jn.t1,(0,Jn.t0)(Jn.t2),Jn.next=24;break;case 21:Jn.prev=21,Jn.t3=Jn.catch(3),Me(Jn.t3);case 24:case"end":return Jn.stop()}},oe,null,[[3,21]])}));return function(oe,qe,Me){return be.apply(this,arguments)}}())}},{key:"_fetchMcsMedia",value:function(){var Je=this;return new Ne.CancellablePromise(function(){var be=W.default(K.default.mark(function oe(qe,Me,Ce){var Ke;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return null===Je.services.mcsClient&&Me(new Error("Media Content Service is unavailable")),Ke=Je.services.mcsClient.get(Je.state.sid),Ce(function(){return Ke.cancel()}),Et.prev=3,Et.next=6,Ke;case 6:Je.mcsMedia=Et.sent,Je.state=Je.mcsMedia._state(),qe(Je.mcsMedia),Et.next=14;break;case 11:Et.prev=11,Et.t0=Et.catch(3),Me(Et.t0);case 14:case"end":return Et.stop()}},oe,null,[[3,11]])}));return function(oe,qe,Me){return be.apply(this,arguments)}}())}},{key:"_state",value:function(){return this.state}}]),Nt}(),Tn=function(){function Nt($t){ce.default(this,Nt),this.state=$t}return se.default(Nt,[{key:"total",get:function(){return this.state.total}},{key:"sent",get:function(){return this.state.sent}},{key:"delivered",get:function(){return this.state.delivered}},{key:"read",get:function(){return this.state.read}},{key:"undelivered",get:function(){return this.state.undelivered}},{key:"failed",get:function(){return this.state.failed}},{key:"_update",value:function(Je){this.state=Je}},{key:"_isEquals",value:function(Je){return this.total===Je.total&&this.sent===Je.sent&&this.delivered===Je.delivered&&this.read===Je.read&&this.undelivered===Je.undelivered&&this.failed===Je.failed}}]),Nt}(),Bn=function(){function Nt($t,Je,be,oe){ce.default(this,Nt),this.state={prevToken:be,nextToken:oe,source:Je,items:$t}}return se.default(Nt,[{key:"hasNextPage",get:function(){return!!this.state.nextToken}},{key:"hasPrevPage",get:function(){return!!this.state.prevToken}},{key:"items",get:function(){return this.state.items}},{key:"nextPage",value:function(){return this.hasNextPage?this.state.source(this.state.nextToken):Promise.reject(new Error("No next page"))}},{key:"prevPage",value:function(){return this.hasPrevPage?this.state.source(this.state.prevToken):Promise.reject(new Error("No previous page"))}}]),Nt}(),mr=se.default(function Nt($t){ce.default(this,Nt),this.sid=$t.sid,this.messageSid=$t.message_sid,this.conversationSid=$t.conversation_sid,this.channelMessageSid=$t.channel_message_sid,this.participantSid=$t.participant_sid,this.status=$t.status||"queued",this.errorCode=$t.error_code||0,this.dateCreated=$t.date_created,this.dateUpdated=$t.date_updated}),tr=function($t){return $t.map(function(Je){var be,oe,qe,Me,Ce=JSON.stringify(Je);switch(Je.type){case"QUICK_REPLY":return{type:"reply",title:Je.title,id:null!==(be=Je.id)&&void 0!==be?be:"",index:null!==(oe=Je.index)&&void 0!==oe?oe:0,rawData:Ce};case"PHONE_NUMBER":return{type:"phone",title:Je.title,phone:null!==(qe=Je.phone)&&void 0!==qe?qe:"",rawData:Ce};case"URL":return{type:"url",title:Je.title,url:null!==(Me=Je.url)&&void 0!==Me?Me:"",rawData:Ce};default:return{type:"other",rawData:Ce}}})},Ir=function($t,Je){var be=JSON.stringify(Je);switch($t){case"twilio/text":return{type:"text",body:Je.body,rawData:be};case"twilio/media":return{type:"media",body:Je.body,media:Je.media,rawData:be};case"twilio/location":return{type:"location",longitude:Je.longitude,latitude:Je.latitude,label:Je.label,rawData:be};case"twilio/quick-reply":return{type:"quickReply",body:Je.body,replies:Je.actions,rawData:be};case"twilio/call-to-action":return{type:"callToAction",body:Je.body,actions:tr(Je.actions),rawData:be};case"twilio/list-picker":return{type:"listPicker",body:Je.body,button:Je.button,items:Je.items,rawData:be};case"twilio/card":var Et,Vn;return{type:"card",title:Je.title,subtitle:Je.subtitle,media:null!==(Et=Je.media)&&void 0!==Et?Et:[],actions:tr(null!==(Vn=Je.actions)&&void 0!==Vn?Vn:[]),rawData:be};default:return{type:"other",rawData:be}}},Er=function(){function Nt($t,Je){ce.default(this,Nt),this.name=$t,this.value=Je}
1return se.default(Nt,[{key:"copyWithValue",value:function(Je){return new Nt(this.name,Je)}}]),Nt}(),Ai=se.default(function Nt($t){ce.default(this,Nt),this.sid=$t.sid,this.friendlyName=$t.friendly_name,this.variables=Object.entries(JSON.parse($t.variables)).map(function(Je){var be=Lt.default(Je,2);return new Er(be[0],be[1])}),this.variants=function($t){for(var Je=new Map,be=0,oe=Object.entries($t);be<oe.length;be++){var qe=Lt.default(oe[be],2),Me=qe[0];Je.set(Me,Ir(Me,qe[1]))}return Je}($t.variants),this.dateCreated=new Date($t.date_created),this.dateUpdated=new Date($t.date_updated)});function Di(Nt,$t){var Je=Object.keys(Nt);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(Nt);$t&&(be=be.filter(function(oe){return Object.getOwnPropertyDescriptor(Nt,oe).enumerable})),Je.push.apply(Je,be)}return Je}function Pi(Nt){for(var $t=1;$t<arguments.length;$t++){var Je=null!=arguments[$t]?arguments[$t]:{};$t%2?Di(Object(Je),!0).forEach(function(be){ue.default(Nt,be,Je[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(Je)):Di(Object(Je)).forEach(function(be){Object.defineProperty(Nt,be,Object.getOwnPropertyDescriptor(Je,be))})}return Nt}function Wn(Nt,$t){(function $n(Nt,$t){if($t.has(Nt))throw new TypeError("Cannot initialize the same private elements twice on an object")})(Nt,$t),$t.add(Nt)}function jn(Nt,$t,Je){if(!$t.has(Nt))throw new TypeError("attempted to get private field on non-instance");return Je}var wr=rn.scope("Message"),mi=v.XMLHttpRequest||{},di=new WeakSet,Mi=new WeakSet,Qt=function(Nt){At.default(Je,Nt);var be,$t=function nr(Nt){var $t=function Ht(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe,qe,Me,Ce,Ke){var tt,Et,Vn,Gn,Jn,ar,Gi,zi;return ce.default(this,Je),zi=$t.call(this),Wn(We.default(zi),Mi),Wn(We.default(zi),di),zi.conversation=qe,zi.links=Me,zi.configuration=Ce,zi.services=Ke,zi.state={sid:oe.sid,index:be,author:oe.author,subject:oe.subject,contentSid:oe.contentSid,body:null!==(tt=oe.text)&&void 0!==tt?tt:null,timestamp:oe.timestamp?new Date(oe.timestamp):null,dateUpdated:oe.dateUpdated?new Date(oe.dateUpdated):null,lastUpdatedBy:null!==(Et=oe.lastUpdatedBy)&&void 0!==Et?Et:null,attributes:ti(oe.attributes,"Got malformed attributes for the message ".concat(oe.sid),wr),type:null!==(Vn=oe.type)&&void 0!==Vn?Vn:"text",media:null,medias:null,participantSid:null!==(Gn=oe.memberSid)&&void 0!==Gn?Gn:null,aggregatedDeliveryReceipt:oe.delivery?new Tn(oe.delivery):null,hasChannelMetadata:null!==(Jn=oe.channelMetadata)&&void 0!==Jn&&Jn},jn(We.default(zi),Mi,Ln).call(We.default(zi),null!==(ar=oe.medias)&&void 0!==ar?ar:null,null!==(Gi=oe.media)&&void 0!==Gi?Gi:null),zi}return se.default(Je,[{key:"sid",get:function(){return this.state.sid}},{key:"author",get:function(){return this.state.author}},{key:"subject",get:function(){return this.state.subject}},{key:"contentSid",get:function(){return this.state.contentSid}},{key:"body",get:function(){return this.state.body}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"index",get:function(){return this.state.index}},{key:"lastUpdatedBy",get:function(){return this.state.lastUpdatedBy}},{key:"dateCreated",get:function(){return this.state.timestamp}},{key:"attributes",get:function(){return this.state.attributes}},{key:"type",get:function(){return this.state.type}},{key:"media",get:function(){return this.state.media}},{key:"attachedMedia",get:function(){return this.getMediaByCategories(["media"])}},{key:"participantSid",get:function(){return this.state.participantSid}},{key:"aggregatedDeliveryReceipt",get:function(){return this.state.aggregatedDeliveryReceipt}},{key:"getMediaByCategory",value:function(oe){return this.getMediaByCategories(oe)}},{key:"getMediaByCategories",value:function(oe){var qe;return(null!==(qe=this.state.medias)&&void 0!==qe?qe:[]).filter(function(Me){return oe.includes(Me.category)})}},{key:"getEmailBody",value:function(){var oe,qe,Me=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"text/plain";return null!==(oe=null===(qe=this.getMediaByCategories(["body"]))||void 0===qe?void 0:qe.filter(function(Ce){return Ce.contentType==Me}).shift())&&void 0!==oe?oe:null}},{key:"getEmailHistory",value:function(){var oe,qe,Me=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"text/plain";return null!==(oe=null===(qe=this.getMediaByCategories(["history"]))||void 0===qe?void 0:qe.filter(function(Ce){return Ce.contentType==Me}).shift())&&void 0!==oe?oe:null}},{key:"_update",value:function(oe){var qe,Ce,Ke,tt,Me=this,Et=[];(oe.text||"string"==typeof oe.text)&&oe.text!==this.state.body&&(this.state.body=oe.text,Et.push("body")),oe.subject&&oe.subject!==this.state.subject&&(this.state.subject=oe.subject,Et.push("subject")),oe.lastUpdatedBy&&oe.lastUpdatedBy!==this.state.lastUpdatedBy&&(this.state.lastUpdatedBy=oe.lastUpdatedBy,Et.push("lastUpdatedBy")),oe.author&&oe.author!==this.state.author&&(this.state.author=oe.author,Et.push("author")),oe.dateUpdated&&new Date(oe.dateUpdated).getTime()!==(this.state.dateUpdated&&this.state.dateUpdated.getTime())&&(this.state.dateUpdated=new Date(oe.dateUpdated),Et.push("dateUpdated")),oe.timestamp&&new Date(oe.timestamp).getTime()!==(this.state.timestamp&&this.state.timestamp.getTime())&&(this.state.timestamp=new Date(oe.timestamp),Et.push("dateCreated"));var Vn=ti(oe.attributes,"Got malformed attributes for the message ".concat(this.sid),wr);ke.default(this.state.attributes,Vn)||(this.state.attributes=Vn,Et.push("attributes"));var Gn=oe.delivery,Jn=this.state.aggregatedDeliveryReceipt;Gn&&Gn.total&&Gn.delivered&&Gn.failed&&Gn.read&&Gn.sent&&Gn.undelivered&&(Jn?Jn._isEquals(Gn)||(Jn._update(Gn),Et.push("deliveryReceipt")):(this.state.aggregatedDeliveryReceipt=ne
1w Tn(Gn),Et.push("deliveryReceipt")));var is,es,Gi=(null!==(qe=oe.medias)&&void 0!==qe?qe:[]).map(function(go){var hs;return null===(hs=jn(Me,di,_n).call(Me,go))||void 0===hs?void 0:hs._state()}).filter(function(go){return null!==go}),zi=(null!==(Ce=this.state.medias)&&void 0!==Ce?Ce:[]).map(function(go){return go._state()}).filter(function(go){return null!==go});ke.default(Gi,zi)&&ke.default(null===(Ke=jn(this,di,_n).call(this,oe.media))||void 0===Ke?void 0:Ke._state(),null===(tt=this.state.media)||void 0===tt?void 0:tt._state())||(jn(this,Mi,Ln).call(this,null!==(is=oe.medias)&&void 0!==is?is:null,null!==(es=oe.media)&&void 0!==es?es:null),Et.push("media")),Et.length>0&&this.emit("updated",{message:this,updateReasons:Et})}},{key:"getParticipant",value:(be=W.default(K.default.mark(function qe(){var Ce,Ke,Me=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(Ce=null,!this.state.participantSid){Et.next=5;break}return Et.next=4,this.conversation.getParticipantBySid(this.state.participantSid).catch(function(){return wr.debug('Participant with sid "'.concat(Me.participantSid,'" not found for message ').concat(Me.sid)),null});case 4:Ce=Et.sent;case 5:if(Ce||!this.state.author){Et.next=9;break}return Et.next=8,this.conversation.getParticipantByIdentity(this.state.author).catch(function(){return wr.debug('Participant with identity "'.concat(Me.author,'" not found for message ').concat(Me.sid)),null});case 8:Ce=Et.sent;case 9:if(!Ce){Et.next=11;break}return Et.abrupt("return",Ce);case 11:throw Ke="Participant with ",this.state.participantSid&&(Ke+="SID '"+this.state.participantSid+"' "),this.state.author&&(this.state.participantSid&&(Ke+="or "),Ke+="identity '"+this.state.author+"' "),"Participant with "===Ke&&(Ke="Participant "),Ke+="was not found",new Error(Ke);case 17:case"end":return Et.stop()}},qe,this)})),function oe(){return be.apply(this,arguments)})},{key:"getDetailedDeliveryReceipts",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._getDetailedDeliveryReceiptsPaginator();case 2:Ce=(Me=tt.sent).items;case 4:if(!Me.hasNextPage){tt.next=11;break}return tt.next=7,Me.nextPage();case 7:Me=tt.sent,Ce=[].concat(De.default(Ce),De.default(Me.items)),tt.next=4;break;case 11:return tt.abrupt("return",Ce);case 12:case"end":return tt.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"remove",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this.services.commandExecutor.mutateResource("delete",this.links.self);case 2:return Ce.abrupt("return",this);case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"updateBody",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this.services.commandExecutor.mutateResource("post",this.links.self,{body:Me});case 2:return Ke.abrupt("return",this);case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"updateAttributes",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this.services.commandExecutor.mutateResource("post",this.links.self,{attributes:typeof Me<"u"?JSON.stringify(Me):void 0});case 2:return Ke.abrupt("return",this);case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"attachTemporaryUrlsFor",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ke,Ce=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(Ke=Me?.map(function(Vn){return Vn.sid}),!this.services.mcsClient||!Ke){Et.next=7;break}return Et.next=4,this.services.mcsClient.mediaSetGet(Ke);case 4:return Et.abrupt("return",Et.sent.map(function(Vn){return new dn(Vn,Ce.services)}));case 7:throw new Error("Media Content Service is unavailable");case 8:case"end":return Et.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getTemporaryContentUrlsForMedia",value:function(oe){var qe=oe.map(function(Me){return Me.sid});return this.getTemporaryContentUrlsForMediaSids(qe)}},{key:"getTemporaryContentUrlsForMediaSids",value:function(oe){var qe=this;return new Ne.CancellablePromise(function(){var Me=W.default(K.default.mark(function Ce(Ke,tt,Et){var Vn;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(Vn=qe.services.mcsClient.mediaSetGetContentUrls(oe??[]),qe.services.mcsClient&&oe){ar.next=4;break}return tt(new Error("Media Content Service is unavailable")),ar.abrupt("return");case 4:return Et(function(){Vn.cancel()}),ar.prev=5,ar.next=8,Vn;case 8:Ke(ar.sent),ar.next=15;break;case 12:ar.prev=12,ar.t0=ar.catch(5),tt(ar.t0);case 15:case"end":return ar.stop()}},Ce,null,[[5,12]])}));return function(Ce,Ke,tt){return Me.apply(this,arguments)}}())}},{key:"getTemporaryContentUrlsForAttachedMedia",value:function(){var oe,qe=this.attachedMedia,Me=null!==(oe=qe?.map(function(Ce){return Ce.sid}))&&void 0!==oe?oe:[];return this.getTemporaryContentUrlsForMediaSids(Me)}},{key:"_getDetailedDeliveryReceiptsPaginator",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ke,tt,Et,Ce=this;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return Ke=this.configuration.links.messagesReceipts.replace("%s",this.conversation.sid).replace("%s",this.sid),tt=new Nr(Ke).arg("PageToken",Me?.pageToken).arg("PageSize",Me?.pageSize).build(),Gn.next=4,this.services.network.get(tt);case 4:return Gn.abrupt("return",new Bn((Et=Gn.sent).body.delivery_receipts.map(function(Jn){return new mr(Jn)}),function(Jn,ar){return Ce._getDetailedDeliveryReceiptsPaginator({pageToken:Jn,pageSize:ar})},Et.body.meta.previous_token,Et.body.meta.next_token));case 6:case"end":return Gn.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getContentData",value:function(){var oe=this;return new Ne.CancellablePromise(function(){var qe=W.default(K.default.mark(function Me(Ce,Ke,tt){var Et,Vn,Gn,Jn,ar,Gi,zi,is,go;return K.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(null!==oe.state.contentSid){Ue.next=3;break}return Ce(null),Ue.abrupt("return");case 3:if(null!==(Et=oe.getMediaByCategories(["body"]))){Ue.next=7;break}return Ce(null),Ue.abrupt("return");case 7:if(Vn="application/x-vnd.com.twilio.rich.",0!==(Gn=Et.filter(function(yn){return yn.contentType.startsWith(Vn)})).length){Ue.next=12;break}return Ce(null),Ue.abrupt("return");case 12:return ar=(Jn=Gn[0]).getContentTemporaryUrl(),tt(function(){ar.cancel()}),Ue.prev=15,Ue.next=18,ar;case 18:Gi=Ue.sent,Ue.next=25;break;
1case 21:return Ue.prev=21,Ue.t0=Ue.catch(15),Ke(Ue.t0),Ue.abrupt("return");case 25:if(null!==Gi){Ue.next=28;break}return Ce(null),Ue.abrupt("return");case 28:return zi=new Promise(function(yn,Kt){var Bt,Qn=!1,cr=new mi;cr.open("GET",null!==(Bt=Gi)&&void 0!==Bt?Bt:"",!0),cr.responseType="text",cr.onreadystatechange=function(){4!==cr.readyState||Qn||yn(cr.responseText)},cr.onerror=function(){Kt(cr.statusText)},tt(function(){Qn=!0,cr.abort(),Kt(new Error("XHR has been aborted"))}),cr.send()}),Ue.prev=29,Ue.next=32,zi;case 32:is=JSON.parse(Ue.sent),Ue.next=40;break;case 36:return Ue.prev=36,Ue.t1=Ue.catch(29),Ke(Ue.t1),Ue.abrupt("return");case 40:go=Jn.contentType.replace(Vn,"").replace(".","/"),Ce(Ir(go,is.data));case 42:case"end":return Ue.stop()}},Me,null,[[15,21],[29,36]])}));return function(Me,Ce,Ke){return qe.apply(this,arguments)}}())}},{key:"getChannelMetadata",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(this.state.hasChannelMetadata){Ce.next=2;break}return Ce.abrupt("return",null);case 2:return Ce.next=4,this.services.channelMetadataClient.getChannelMetadata(this.conversation.sid,this.sid);case 4:return Ce.abrupt("return",Ce.sent);case 5:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getMessageRecipients",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this.services.messageRecipientsClient.getRecipientsFromMessage(this.conversation.sid,this.sid);case 2:return Ce.abrupt("return",Ce.sent);case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()}]),Je}(de.ReplayEventEmitter);function _n(Nt){var $t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nt?new dn($t?Pi(Pi({},Nt),{},{category:$t}):Nt,this.services):null}function Ln(Nt,$t){var Je=this;this.state.media=jn(this,di,_n).call(this,$t),this.state.medias=Nt?Nt.map(function(be){return jn(Je,di,_n).call(Je,be)}).filter(function(be){return null!==be}):$t&&!Nt?[jn(this,di,_n).call(this,$t,"media")].filter(function(be){return null!==be}):null}function Cn(Nt,$t){var Je=Object.keys(Nt);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(Nt);$t&&(be=be.filter(function(oe){return Object.getOwnPropertyDescriptor(Nt,oe).enumerable})),Je.push.apply(Je,be)}return Je}function kr(Nt){for(var $t=1;$t<arguments.length;$t++){var Je=null!=arguments[$t]?arguments[$t]:{};$t%2?Cn(Object(Je),!0).forEach(function(be){ue.default(Nt,be,Je[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(Je)):Cn(Object(Je)).forEach(function(be){Object.defineProperty(Nt,be,Object.getOwnPropertyDescriptor(Je,be))})}return Nt}function si(Nt,$t){var Je=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!Je){if(Array.isArray(Nt)||(Je=function oi(Nt,$t){if(Nt){if("string"==typeof Nt)return Ii(Nt,$t);var Je=Object.prototype.toString.call(Nt).slice(8,-1);if("Object"===Je&&Nt.constructor&&(Je=Nt.constructor.name),"Map"===Je||"Set"===Je)return Array.from(Nt);if("Arguments"===Je||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return Ii(Nt,$t)}}(Nt))||$t&&Nt&&"number"==typeof Nt.length){Je&&(Nt=Je);var be=0,oe=function(){};return{s:oe,n:function(){return be>=Nt.length?{done:!0}:{done:!1,value:Nt[be++]}},e:function(tt){throw tt},f:oe}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ce,qe=!0,Me=!1;return{s:function(){Je=Je.call(Nt)},n:function(){var tt=Je.next();return qe=tt.done,tt},e:function(tt){Me=!0,Ce=tt},f:function(){try{!qe&&null!=Je.return&&Je.return()}finally{if(Me)throw Ce}}}}function Ii(Nt,$t){(null==$t||$t>Nt.length)&&($t=Nt.length);for(var Je=0,be=new Array($t);Je<$t;Je++)be[Je]=Nt[Je];return be}ue.default(Qt,"updated","updated"),He([Ie.deprecated("getMediaByCategory","getMediaByCategories"),ge("design:type",Function),ge("design:paramtypes",[Array]),ge("design:returntype",Array)],Qt.prototype,"getMediaByCategory",null),He([Q.validateTypes([Q.nonEmptyString,"undefined"]),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",dn)],Qt.prototype,"getEmailBody",null),He([Q.validateTypes([Q.nonEmptyString,"undefined"]),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",dn)],Qt.prototype,"getEmailHistory",null),He([Q.validateTypesAsync("string"),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],Qt.prototype,"updateBody",null),He([Q.validateTypesAsync(Kr),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],Qt.prototype,"updateAttributes",null),He([Ie.deprecated("attachTemporaryUrlsFor","getTemporaryContentUrlsForMedia"),ge("design:type",Function),ge("design:paramtypes",[Array]),ge("design:returntype",Promise)],Qt.prototype,"attachTemporaryUrlsFor",null),He([Q.validateTypesAsync(Q.nonEmptyArray("media",dn)),ge("design:type",Function),ge("design:paramtypes",[Array]),ge("design:returntype",Ne.CancellablePromise)],Qt.prototype,"getTemporaryContentUrlsForMedia",null),He([Q.validateTypesAsync(Q.nonEmptyArray("strings","string")),ge("design:type",Function),ge("design:paramtypes",[Array]),ge("design:returntype",Ne.CancellablePromise)],Qt.prototype,"getTemporaryContentUrlsForMediaSids",null);var le=rn.scope("Messages"),me=function(Nt){At.default(Je,Nt);var be,$t=function yi(Nt){var $t=function on(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe,qe){var Me;return ce.default(this,Je),(Me=$t.call(this)).conversation=be,Me.configuration=oe,Me.services=qe,Me.messagesByIndex=new Map,Me.messagesListPromise=null,Me}return se.default(Je,[{key:"subscribe",value:(be=W.default(K.default.mark(function qe(Me){var Ke,Ce=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(!this.messagesListPromise){Et.next=2;break}return Et.abrupt("return",this.messagesListPromise);case 2:return this.messagesListPromise="string"==typeof Me?this.services.syncClient.list({id:Me,mode:"open_existing"}):Promise.resolve(Me),Et.prev=3,Et.next=6,this.messagesListPromise;case 6:return(Ke=Et.sent).on("itemAdded",function(Vn){le.debug("".concat(Ce.conversation.sid," itemAdded: ").concat(Vn.item.index));var Gn={self:"".concat(Ce.conversation._links.messages,"/").concat(Vn.item.data.sid),conversation:Ce.conversation._links.self,messages_receipts:"".concat(Ce.conversation._links.messages,"/").concat(Vn.item.data.sid,"/Receipts")},Jn=new Qt(Vn.item.index,Vn.item.data,Ce.conversation,Gn,Ce.configuration,Ce.services);Ce.messagesByIndex.has(Jn.index)?le.debug("Message arrived, but is already known and ignored",Ce.conversation.sid,Jn.index):(Ce.messagesByIndex.set(Jn.index,Jn),Jn.on("updated",function(ar){return Ce.emit("messageUpdated",ar)}),Ce.emit("messageAdded",Jn))}),Ke.on("itemRemoved",function(Vn){le.debug("#{this.conversation.sid} itemRemoved: ".concat(Vn.index));var Gn=Vn.index;if(Ce.messagesByIndex.has(Gn)){var Jn=Ce.messagesByIndex.get(Gn);if(!Jn)return;Ce.messagesByIndex.delete(Jn.index),Jn.removeAllListeners("updated"),Ce.emit("messageRemoved",Jn)}}),Ke.on("itemUpdated",function(Vn){le.debug("".concat(Ce.conversation.sid," itemUpdated: ").concat(Vn.item.index));var Gn=Ce.messagesByIndex.get(Vn.item.index);Gn&&Gn._update(Vn.item.data)}),Et.abrupt("return",Ke);case 13:throw Et.prev=13,Et.t0=Et.catch(3),this.messagesListPromise=null,"disconnected"!==this.services.syncClient.connectionState&&le.error("Failed to get messages object for conversation",this.conversation.sid,Et.t0),le.debug("ERROR: Failed to get messages object for conversation",this.conversation.sid,Et.t0),Et.t0;case 19:case"end":return Et.stop()}},qe,this,[[3,13]])})),function oe(qe){return be.apply(this,arguments)})},{key:"unsubscribe",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(this.messagesListPromise){Ke.next=2;break}return Ke.abrupt("return");case 2:return Ke.next=4,this.messagesListPromise;case 4:Ke.sent.close(),this.messagesListPromise=null;case 7:case"end":return Ke.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"sendV2",value:function(oe){var qe=this;return le.debug("Sending message V2",oe.mediaContent,oe.attributes,oe.emailOptions),new Ne.CancellablePromise(function(){var Me=W.default(K.default.mark(function Ce(Ke,tt,Et){var Vn,Gn,Jn,ar,Gi,zi,is,es,go,hs,Ue,yn;return K.default.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:Gn=[],Jn=[],Et(function(){Jn.forEac
1h(function(Qn){return Qn.cancel()})}),ar=si(oe.mediaContent),Bt.prev=4,ar.s();case 6:if((Gi=ar.n()).done){Bt.next=25;break}return zi=Lt.default(Gi.value,2),is=zi[0],es=zi[1],Bt.prev=8,le.debug("Adding media to a message as ".concat(es instanceof FormData?"FormData":"SendMediaOptions"),es),Ue=es instanceof FormData?qe.services.mcsClient.postFormData(es,is):qe.services.mcsClient.post(null!==(go=es.contentType)&&void 0!==go?go:"",null!==(hs=es.media)&&void 0!==hs?hs:"",is,es.filename),Jn.push(Ue),Bt.t0=Gn,Bt.next=15,Ue;case 15:Bt.t1=Bt.sent,Bt.t0.push.call(Bt.t0,Bt.t1),Bt.next=23;break;case 19:return Bt.prev=19,Bt.t2=Bt.catch(8),tt(Bt.t2),Bt.abrupt("return");case 23:Bt.next=6;break;case 25:Bt.next=30;break;case 27:Bt.prev=27,Bt.t3=Bt.catch(4),ar.e(Bt.t3);case 30:return Bt.prev=30,ar.f(),Bt.finish(30);case 33:return yn=qe.services.commandExecutor.mutateResource("post",qe.conversation._links.messages,{body:oe.text,subject:null===(Vn=oe.emailOptions)||void 0===Vn?void 0:Vn.subject,media_sids:Gn.map(function(Qn){return Qn.sid}),attributes:typeof oe.attributes<"u"?JSON.stringify(oe.attributes):void 0,content_sid:oe.contentSid,content_variables:typeof oe.contentVariables<"u"?JSON.stringify(oe.contentVariables.reduce(function(Qn,cr){return kr(kr({},Qn),{},ue.default({},cr.name,cr.value))},{})):void 0}),Bt.prev=34,Bt.t4=Ke,Bt.next=38,yn;case 38:Bt.t5=Bt.sent,(0,Bt.t4)(Bt.t5),Bt.next=45;break;case 42:Bt.prev=42,Bt.t6=Bt.catch(34),tt(Bt.t6);case 45:case"end":return Bt.stop()}},Ce,null,[[4,27,30,33],[8,19],[34,42]])}));return function(Ce,Ke,tt){return Me.apply(this,arguments)}}())}},{key:"send",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce,Ke,tt=arguments;return K.default.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return le.debug("Sending text message",Me,Ce=tt.length>1&&void 0!==tt[1]?tt[1]:{},Ke=tt.length>2?tt[2]:void 0),Vn.abrupt("return",this.services.commandExecutor.mutateResource("post",this.conversation._links.messages,{body:Me??"",attributes:typeof Ce<"u"?JSON.stringify(Ce):void 0,subject:Ke?.subject}));case 4:case"end":return Vn.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"sendMedia",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce,Ke,tt,Vn,Gn=arguments;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(le.debug("Sending media message",Me,tt=Gn.length>1&&void 0!==Gn[1]?Gn[1]:{},Gn.length>2?Gn[2]:void 0),le.debug("Sending media message as ".concat(Me instanceof FormData?"FormData":"SendMediaOptions"),Me,tt),!(Me instanceof FormData)){ar.next=10;break}return ar.next=7,this.services.mcsClient.postFormData(Me);case 7:ar.t0=ar.sent,ar.next=13;break;case 10:return ar.next=12,this.services.mcsClient.post(null!==(Ce=Me.contentType)&&void 0!==Ce?Ce:"",null!==(Ke=Me.media)&&void 0!==Ke?Ke:"","media",Me.filename);case 12:ar.t0=ar.sent;case 13:return Vn=ar.t0,ar.next=16,this.services.commandExecutor.mutateResource("post",this.conversation._links.messages,{media_sids:[Vn.sid],attributes:typeof tt<"u"?JSON.stringify(tt):void 0});case 16:return ar.abrupt("return",ar.sent);case 17:case"end":return ar.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getMessages",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var tt=arguments;return K.default.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return Vn.abrupt("return",this._getMessages(Me,Ce,tt.length>2&&void 0!==tt[2]?tt[2]:"backwards"));case 2:case"end":return Vn.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"_wrapPaginator",value:function(oe,qe,Me){var Ce=this,Ke="desc"===oe,tt=function(){return qe.nextPage().then(function(Gn){return Ce._wrapPaginator(oe,Gn,Me)})},Et=function(){return qe.prevPage().then(function(Gn){return Ce._wrapPaginator(oe,Gn,Me)})};return Me(qe.items).then(function(Vn){return{items:Vn.sort(function(Gn,Jn){return Gn.index-Jn.index}),hasPrevPage:Ke?qe.hasNextPage:qe.hasPrevPage,hasNextPage:Ke?qe.hasPrevPage:qe.hasNextPage,prevPage:Ke?tt:Et,nextPage:Ke?Et:tt}})}},{key:"_upsertMessage",value:function(oe,qe){var Me=this,Ce=this.messagesByIndex.get(oe);if(Ce)return Ce;var Ke={self:"".concat(this.conversation._links.messages,"/").concat(qe.sid),conversation:this.conversation._links.self,messages_receipts:"".concat(this.conversation._links.messages,"/").concat(qe.sid,"/Receipts")},tt=new Qt(oe,qe,this.conversation,Ke,this.configuration,this.services);return this.messagesByIndex.set(tt.index,tt),tt.on("updated",function(Et){return Me.emit("messageUpdated",Et)}),tt}},{key:"_getMessages",value:function(){var be=W.default(K.default.mark(function qe(){var Ce,Ke,Et,Vn,Gn,Me=this,Jn=arguments;return K.default.wrap(function(Gi){for(;;)switch(Gi.prev=Gi.next){case 0:return Ce=Jn.length>0&&void 0!==Jn[0]?Jn[0]:30,Ke=Jn.length>1&&void 0!==Jn[1]?Jn[1]:"end",Et="backwards"===(Jn.length>2&&void 0!==Jn[2]?Jn[2]:"forward")?"desc":"asc",Gi.next=6,this.messagesListPromise;case 6:return Vn=Gi.sent,Gi.next=9,Vn?.getItems({from:"end"!==Ke?Ke:void 0,pageSize:Ce,order:Et,limit:Ce});case 9:return Gn=Gi.sent,Gi.next=12,this._wrapPaginator(Et,Gn,function(zi){return Promise.all(zi.map(function(is){return Me._upsertMessage(is.index,is.data)}))});case 12:return Gi.abrupt("return",Gi.sent);case 13:case"end":return Gi.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()}]),Je}(de.ReplayEventEmitter),Re=function(){function Nt($t){ce.default(this,Nt),ue.default(this,"attributes",{}),ue.default(this,"mediaContent",[]),ue.default(this,"emailOptions",{}),this.messagesEntity=$t}return se.default(Nt,[{key:"send",value:function(){var Je=this;return new Ne.CancellablePromise(function(){var be=W.default(K.default.mark(function oe(qe,Me,Ce){var Ke;return K.default.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return Ke=Je.messagesEntity.sendV2(Je),Ce(function(){return Ke.cancel()}),Vn.prev=2,Vn.next=5,Ke;case 5:qe(Vr(Vn.sent.index)),Vn.next=12;break;case 9:Vn.prev=9,Vn.t0=Vn.catch(2),Me(Vn.t0);case 12:case"end":return Vn.stop()}},oe,null,[[2,9]])}
1));return function(oe,qe,Me){return be.apply(this,arguments)}}())}}]),Nt}(),Pt=function(){function Nt($t,Je){ce.default(this,Nt),this.limits=$t,this.message=new Re(Je),this.emailBodies=new Map,this.emailHistories=new Map}return se.default(Nt,[{key:"setBody",value:function(Je){return this.message.text=Je,this}},{key:"setSubject",value:function(Je){return this.message.emailOptions.subject=Je,this}},{key:"setAttributes",value:function(Je){return this.message.attributes=Je,this}},{key:"setEmailBody",value:function(Je,be){return this.emailBodies.set(Je,be),this}},{key:"setEmailHistory",value:function(Je,be){return this.emailHistories.set(Je,be),this}},{key:"setContentTemplate",value:function(Je){var be=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.message.contentSid=Je,this.message.contentVariables=be,this}},{key:"addMedia",value:function(Je){if(typeof FormData>"u"&&Je instanceof FormData)throw new Error("Could not add FormData content whilst not in a browser");if(!(Je instanceof FormData||Je.contentType&&Je.media))throw new Error("Media content in SendMediaOptions must contain non-empty contentType and media");return this.message.mediaContent.push(["media",Je]),this}},{key:"build",value:function(){var Je=this;if(this.emailBodies.forEach(function(be,oe){if(!Je.limits.emailBodiesAllowedContentTypes.includes(oe))throw new Error("Unsupported email body content type ".concat(oe))}),this.emailHistories.forEach(function(be,oe){if(!Je.limits.emailHistoriesAllowedContentTypes.includes(oe))throw new Error("Unsupported email history content type ".concat(oe))}),this.emailBodies.size>this.limits.emailBodiesAllowedContentTypes.length)throw new Error("Too many email bodies attached to the message (".concat(this.emailBodies.size," > ").concat(this.limits.emailBodiesAllowedContentTypes.length,")"));if(this.emailHistories.size>this.limits.emailHistoriesAllowedContentTypes.length)throw new Error("Too many email histories attached to the message (".concat(this.emailHistories.size," > ").concat(this.limits.emailHistoriesAllowedContentTypes.length,")"));if(this.message.mediaContent.length>this.limits.mediaAttachmentsCountLimit)throw new Error("Too many media attachments in the message (".concat(this.message.mediaContent.length," > ").concat(this.limits.mediaAttachmentsCountLimit,")"));return this.emailBodies.forEach(function(be){Je.message.mediaContent.push(["body",be])}),this.emailHistories.forEach(function(be){Je.message.mediaContent.push(["history",be])}),this.message}},{key:"buildAndSend",value:function(){return this.build().send()}}]),Nt}();function Mn(Nt,$t){(null==$t||$t>Nt.length)&&($t=Nt.length);for(var Je=0,be=new Array($t);Je<$t;Je++)be[Je]=Nt[Je];return be}He([Q.validateTypes("string"),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Pt)],Pt.prototype,"setBody",null),He([Q.validateTypes("string"),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Pt)],Pt.prototype,"setSubject",null),He([Q.validateTypes(Kr),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Pt)],Pt.prototype,"setAttributes",null),He([Q.validateTypes("string",[FormData,sr]),ge("design:type",Function),ge("design:paramtypes",[String,Object]),ge("design:returntype",Pt)],Pt.prototype,"setEmailBody",null),He([Q.validateTypes("string",[FormData,sr]),ge("design:type",Function),ge("design:paramtypes",[String,Object]),ge("design:returntype",Pt)],Pt.prototype,"setEmailHistory",null),He([Q.validateTypes("string",[Q.array("content variables",Er),"undefined"]),ge("design:type",Function),ge("design:paramtypes",[String,Array]),ge("design:returntype",Pt)],Pt.prototype,"setContentTemplate",null),He([Q.validateTypes([FormData,sr]),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Pt)],Pt.prototype,"addMedia",null);var jr={lastMessage:"lastMessage",attributes:"attributes",createdBy:"createdBy",dateCreated:"dateCreated",dateUpdated:"dateUpdated",friendlyName:"friendlyName",lastConsumedMessageIndex:"lastConsumedMessageIndex",notificationLevel:"notificationLevel",sid:"sid",status:"status",uniqueName:"uniqueName",state:"state",bindings:"bindings"},gn=function(Nt){At.default(Je,Nt);var be,$t=function br(Nt){var $t=function Br(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe,qe,Me,Ce){var Ke,tt,Et;ce.default(this,Je),(Et=$t.call(this)).sid=oe,Et._links=qe,Et._configuration=Me,Et._services=Ce,Et._entityName=be.channel,Et._internalState={uniqueName:be.uniqueName||null,status:"notParticipating",attributes:null!==(Ke=be.attributes)&&void 0!==Ke?Ke:{},createdBy:be.createdBy,dateCreated:Fr(be.dateCreated),dateUpdated:Fr(be.dateUpdated),friendlyName:be.friendlyName||null,lastReadMessageIndex:Number.isInteger(be.lastConsumedMessageIndex)?be.lastConsumedMessageIndex:null,bindings:null!==(tt=be.bindings)&&void 0!==tt?tt:{}},be.notificationLevel&&(Et._internalState.notificationLevel=be.notificationLevel);var Vn={participants:Et._links.participants};return Et._participants=new Map,Et._participantsEntity=new ft(We.default(Et),Et._participants,Vn,Et._services),Et._participantsEntity.on(Je.participantJoined,function(Gn){return Et.emit(Je.participantJoined,Gn)}),Et._participantsEntity.on(Je.participantLeft,function(Gn){return Et.emit(Je.participantLeft,Gn)}),Et._participantsEntity.on(Je.participantUpdated,function(Gn){return Et.emit(Je.participantUpdated,Gn)}),Et._messagesEntity=new me(We.default(Et),Me,Ce),Et._messagesEntity.on(Je.messageAdded,function(Gn){return Et._onMessageAdded(Gn)}),Et._messagesEntity.on(Je.messageUpdated,function(Gn){return Et.emit(Je.messageUpdated,Gn)}),Et._messagesEntity.on(Je.messageRemoved,function(Gn){return Et.emit(Je.messageRemoved,Gn)}),Et}return se.default(Je,[{key:"uniqueName",get:function(){return this._internalState.uniqueName}},{key:"status",get:function(){return this._internalState.status}},{key:"friendlyName",get:function(){return this._internalState.friendlyName}},{key:"dateUpdated",get:function(){return this._internalState.dateUpdated}},{key:"dateCreated",get:function(){return this._internalState.dateCreated}},{key:"createdBy",get:function(){var oe;return null!==(oe=this._internalState.createdBy)&&void 0!==oe?oe:""}},{key:"attributes",get:function(){return this._internalState.attributes}},{key:"lastReadMessageIndex",get:function(){return this._internalState.lastReadMessageIndex}},{key:"lastMessage",get:function(){var oe;return null!==(oe=this._internalState.lastMessage)&&void 0!==oe?oe:void 0}},{key:"notificationLevel",get:function(){var oe;return null!==(oe=this._internalState.notificationLevel)&&void 0!==oe?oe:"default"}},{key:"bindings",get:function(){return this._internalState.bindings}},{key:"limits",get:function(){return this._configuration.limits}},{key:"state",get:function(){return this._internalState.state}},{key:"_statusSource",get:function(){return this._dataSource}},{key:"add",value:(be=W.default(K.default.mark(function qe(Me,Ce){return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.abrupt("return",this._participantsEntity.add(Me,Ce??{}));case 1:case"end":return tt.stop()}},qe,this)})),function oe(qe,Me){return be.apply(this,arguments)})},{key:"addNonChatParticipant",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var Et=arguments;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return Gn.abrupt("return",this._participantsEntity.addNonChatParticipant(Me,Ce,(Et.length>2&&void 0!==Et[2]?Et[2]:{})??{},(Et.length>3&&void 0!==Et[3]?Et[3]:{})??{}));case 3:case"end":return Gn.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"advanceLastReadMessageIndex",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._subscribeStreams();case 2:if(!(Me<(null!==(Ce=this.lastReadMessageIndex)&&void 0!==Ce?Ce:0))){tt.next=6;break}return tt.next=5,this._setLastReadMessageIndex(this.lastReadMessageIndex);case 5:case 8:return tt.abrupt("return",tt.sent);case 6:return tt.next=8,this._setLastReadMessageIndex(Me);case 9:case"end":return tt.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"delete",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._services.commandExecutor.mutateResource("delete",this._links.self);case 2:return Ce.abrupt("return",this);case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getAttributes",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._subscribe();case 2:return Ce.abrupt("return",this.attributes);case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getMessages",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce,Ke){return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,this._subscribeStreams();case 2:return Et.abrupt("return",this._messagesEntity.getMessages(Me,Ce,Ke));case 3:case"end":return Et.stop()}},qe,this)}));return function oe(qe,Me,Ce){return be.apply(this,arguments)}}()},{key:"getParticipants",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._subscribeStreams();case 2:return Ce.abrupt("return",this._participantsEntity.getParticipants());case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getParticipantsCount",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Ce=new Nr(this._configuration.links.conversations).path(this.sid).build(),Et.next=3,this._services.network.get(Ce);case 3:return Et.abrupt("return",null!==(Me=Et.sent.body.participants_count)&&void 0!==Me?Me:0);case 5:case"end":return Et.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getParticipantBySid",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.abrupt("return",this._participantsEntity.getParticipantBySid(Me));case 1:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getParticipantByIdentity",value:function(){var be=W.default(K.default.mark(function qe(){var Ce=arguments;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.abrupt("return",this._participantsEntity.getParticipantByIdentity((Ce.length>0&&void 0!==Ce[0]?Ce[0]:"")??""));case 2:case"end":return tt.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getMessagesCount",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Ce=new Nr(this._configuration.links.conversations).path(this.sid).build(),Et.next=3,this._services.network.get(Ce);case 3:return Et.abrupt("return",null!==(Me=Et.sent.body.messages_count)&&void 0!==Me?Me:0);case 5:case"end":return Et.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getUnreadMessagesCount",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce,Ke;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Me=new Nr(this._configuration.links.myConversations).path(this.sid).build(),Et.next=3,this._services.network.get(Me);case 3:if((Ce=Et.sent).body.conversation_sid===this.sid){Et.next=6;break}throw new Error("Conversation was not found in the user conversations list");case 6:if("number"!=typeof(Ke=Ce.body.unread_messages_count)){Et.next=9;break}return Et.abrupt("return",Ke);case 9:return Et.abrupt("return",null);case 10:case"end":return Et.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"join",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._services.commandExecutor.mutateResource("post",this._links.participants,{identity:this._configuration.userIdentity});case 2:return Ce.abrupt("return",this);case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"leave",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if("joined"!==this._internalState.status){Ce.next=3;break}return Ce.next=3,this._services.commandExecutor.mutateResource("delete","".concat(this._links.participants,"/").concat(encodeURIComponent(this._configuration.userIdentity)));case 3:return Ce.abrupt("return",this);case 4:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"removeParticipant",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._participantsEntity.remove("string"==typeof Me?Me:Me.sid);case 2:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"sendMessage",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce,Ke){var tt,Et;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if("string"!=typeof Me&&null!==Me){ar.next=5;break}
1return ar.next=3,this._messagesEntity.send(Me,Ce,Ke);case 3:return ar.abrupt("return",null!==(Et=Vr(ar.sent.index))&&void 0!==Et?Et:0);case 5:return ar.next=7,this._messagesEntity.sendMedia(Me,Ce,Ke);case 7:return ar.abrupt("return",null!==(tt=Vr(ar.sent.index))&&void 0!==tt?tt:0);case 9:case"end":return ar.stop()}},qe,this)}));return function oe(qe,Me,Ce){return be.apply(this,arguments)}}()},{key:"prepareMessage",value:function(){return new Pt(this.limits,this._messagesEntity)}},{key:"setAllMessagesRead",value:function(){var be=W.default(K.default.mark(function qe(){var Me;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._subscribeStreams();case 2:return Ke.next=4,this.getMessages(1);case 4:if(!((Me=Ke.sent).items.length>0)){Ke.next=7;break}return Ke.abrupt("return",this.advanceLastReadMessageIndex(Me.items[0].index));case 7:return Ke.abrupt("return",0);case 8:case"end":return Ke.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"setAllMessagesUnread",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._subscribeStreams();case 2:return Ce.next=4,this._setLastReadMessageIndex(null);case 4:return Ce.abrupt("return",Ce.sent);case 5:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"setUserNotificationLevel",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._services.commandExecutor.mutateResource("post","".concat(this._configuration.links.myConversations,"/").concat(this.sid),{notification_level:Me});case 2:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"typing",value:function(){return this._services.typingIndicator.send(this.sid)}},{key:"updateAttributes",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._services.commandExecutor.mutateResource("post",this._links.self,{attributes:void 0!==Me?JSON.stringify(Me):void 0});case 2:return Ke.abrupt("return",this);case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"updateFriendlyName",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(this._internalState.friendlyName===Me){Ke.next=3;break}return Ke.next=3,this._services.commandExecutor.mutateResource("post",this._links.self,{friendly_name:Me});case 3:return Ke.abrupt("return",this);case 4:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"updateLastReadMessageIndex",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._subscribeStreams();case 2:return Ke.abrupt("return",this._setLastReadMessageIndex(Me));case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"updateUniqueName",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(this._internalState.uniqueName===Me){Ke.next=4;break}return Me||(Me=""),Ke.next=4,this._services.commandExecutor.mutateResource("post",this._links.self,{unique_name:Me});case 4:return Ke.abrupt("return",this);case 5:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getMessageRecipients",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._services.messageRecipientsClient.getRecipientsFromConversation(this.sid,Me);case 2:return Ke.abrupt("return",Ke.sent);case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"_subscribe",value:function(){var be=W.default(K.default.mark(function qe(){var Me=this;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(!this._entityPromise){Ke.next=2;break}return Ke.abrupt("return",this._entityPromise);case 2:return this._entityPromise=this._services.syncClient.document({id:this._entityName,mode:"open_existing"}),Ke.prev=3,Ke.next=6,this._entityPromise;case 6:return this._entity=Ke.sent,this._entity.on(Ve.SyncDocument.updated,function(tt){return Me._update(tt.data)}),this._entity.on(Ve.SyncDocument.removed,function(){return Me.emit(Je.removed,Me)}),this._update(this._entity.data),Ke.abrupt("return",this._entity);case 13:throw Ke.prev=13,Ke.t0=Ke.catch(3),this._entity=null,this._entityPromise=null,"disconnected"!=this._services.syncClient.connectionState&&Je._logger.error("Failed to get conversation object",Ke.t0),Je._logger.debug("ERROR: Failed to get conversation object",Ke.t0),Ke.t0;case 20:case"end":return Ke.stop()}},qe,this,[[3,13]])}));return function oe(){return be.apply(this,arguments)}}()},{key:"_fetchStreams",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce,Ke;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,this._subscribe();case 2:return Je._logger.trace("_streamsAvailable, this.entity.data=",null===(Me=this._entity)||void 0===Me?void 0:Me.data),Ke=null===(Ce=this._entity)||void 0===Ce?void 0:Ce.data,Et.next=6,this._services.syncClient.list({id:Ke.messages,mode:"open_existing"});case 6:return this._messagesList=Et.sent,Et.next=9,this._services.syncClient.map({id:Ke.roster,mode:"open_existing"});case 9:this._participantsMap=Et.sent;case 10:case"end":return Et.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_subscribeStreams",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce,Ke,tt,Et,Vn,Gn;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.prev=0,ar.next=3,this._subscribe();case 3:return Je._logger.trace("_subscribeStreams, this.entity.data=",null===(Me=this._entity)||void 0===Me?void 0:Me.data),Et=null===(Ce=this._entity)||void 0===Ce?void 0:Ce.data,Vn=Et.messages,Gn=Et.roster,ar.next=9,Promise.all([this._messagesEntity.subscribe(null!==(Ke=this._messagesList)&&void 0!==Ke?Ke:Vn),this._participantsEntity.subscribe(null!==(tt=this._participantsMap)&&void 0!==tt?tt:Gn)]);case 9:ar.next=16;break;case 11:throw ar.prev=11,ar.t0=ar.catch(0),"disconnected"!==this._services.syncClient.connectionState&&Je._logger.error("Failed to subscribe on conversation objects",this.sid,ar.t0),Je._logger.debug("ERROR: Failed to subscribe on conversation objects",this.sid,ar.t0),ar.t0;case 16:case"end":return ar.stop()}},qe,this,[[0,11]])}));return function oe(){return be.apply(this,arguments)}}()},{key:"_unsubscribe",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return this._entity&&(this._entity.close(),this._entity=null,this._entityPromise=null),Ce.abrupt("return",Promise.all([this._participantsEntity.unsubscribe(),this._messagesEntity.unsubscribe()]));case 2:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_setStatus",value:function(oe,qe){var Me=this;if(this._dataSource=qe,this._internalState.status!==oe){if(this._internalState.status=oe,"joined"===oe)return void this._subscribeStreams().catch(function(Ce){if(Je._logger.debug("ERROR while setting conversation status "+oe,Ce),"disconnected"!==Me._services.syncClient.connectionState)throw Ce});this._entityPromise&&this._unsubscribe().catch(function(Ce){if(Je._logger.debug("ERROR while setting conversation status "+oe,Ce),"disconnected"!==Me._services.syncClient.connectionState)throw Ce})}}},{key:"_update",value:function(oe){var qe,Me,Ce,Ke,tt;Je._logger.trace("_update",oe),Je.preprocessUpdate(oe,this.sid);for(var Et=new Set,Vn=0,Gn=Object.keys(oe);Vn<Gn.length;Vn++){var Jn=Gn[Vn],ar=jr[Jn];if(ar)switch(ar){case jr.status:if(!oe.status||"unknown"===oe.status||this._internalState.status===oe.status)break;this._internalState.status=oe.status,Et.add(ar);break;case jr.attributes:if(ke.default(this._internalState.attributes,oe.attributes))break;this._internalState.attributes=oe.attributes,Et.add(ar);break;case jr.lastConsumedMessageIndex:if(void 0===oe.lastConsumedMessageIndex||oe.lastConsumedMessageIndex===this._internalState.lastReadMessageIndex)break;this._internalState.lastReadMessageIndex=oe.lastConsumedMessageIndex,Et.add("lastReadMessageIndex");break;case jr.lastMessage:if(this._internalState.lastMessage&&!oe.lastMessage){delete this._internalState.lastMessage,Et.add(ar);break}this._internalState.lastMessage=this._internalState.lastMessage||{},void 0!==(null===(qe=oe.lastMessage)||void 0===qe?void 0:qe.index)&&oe.lastMessage.index!==this._internalState.lastMessage.index&&(this._internalState.lastMessage.index=oe.lastMessage.index,Et.add(ar)),void 0!==(null===(Me=oe.lastMessage)||void 0===Me?void 0:Me.timestamp)&&(null===(Ce=this._internalState.lastMessage)||void 0===Ce||null===(Ke=Ce.dateCreated)||void 0===Ke?void 0:Ke.getTime())!==oe.lastMessage.timestamp.getTime()&&(this._internalState.lastMessage.dateCreated=oe.lastMessage.timestamp,Et.add(ar)),ke.default(this._internalState.lastMessage,{})&&delete this._internalState.lastMessage;break;case jr.state:var Gi=oe.state||void 0;if(void 0!==Gi&&(Gi.dateUpdated=new Date(Gi.dateUpdated)),ke.default(this._internalState.state,Gi))break;this._internalState.state=Gi,Et.add(ar);break;case jr.bindings:if(ke.default(this._internalState.bindings,oe.bindings))break;this._internalState.bindings=oe.bindings,Et.add(ar);break;default:var zi=oe[Jn]instanceof Date;if(zi&&(null===(tt=this._internalState[ar])||void 0===tt?void 0:tt.getTime())===oe[Jn].getTime()||!zi&&this[ar]===oe[Jn])break;this._internalState[ar]=oe[Jn],Et.add(ar)}}Et.size>
10&&this.emit(Je.updated,{conversation:this,updateReasons:De.default(Et)})}},{key:"_onMessageAdded",value:function(oe){var Me,qe=function ln(Nt,$t){var Je=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!Je){if(Array.isArray(Nt)||(Je=function En(Nt,$t){if(Nt){if("string"==typeof Nt)return Mn(Nt,$t);var Je=Object.prototype.toString.call(Nt).slice(8,-1);if("Object"===Je&&Nt.constructor&&(Je=Nt.constructor.name),"Map"===Je||"Set"===Je)return Array.from(Nt);if("Arguments"===Je||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return Mn(Nt,$t)}}(Nt))||$t&&Nt&&"number"==typeof Nt.length){Je&&(Nt=Je);var be=0,oe=function(){};return{s:oe,n:function(){return be>=Nt.length?{done:!0}:{done:!1,value:Nt[be++]}},e:function(tt){throw tt},f:oe}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ce,qe=!0,Me=!1;return{s:function(){Je=Je.call(Nt)},n:function(){var tt=Je.next();return qe=tt.done,tt},e:function(tt){Me=!0,Ce=tt},f:function(){try{!qe&&null!=Je.return&&Je.return()}finally{if(Me)throw Ce}}}}(this._participants.values());try{for(qe.s();!(Me=qe.n()).done;){var Ce=Me.value;if(Ce.identity===oe.author){Ce._endTyping();break}}}catch(Ke){qe.e(Ke)}finally{qe.f()}this.emit(Je.messageAdded,oe)}},{key:"_setLastReadMessageIndex",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._services.commandExecutor.mutateResource("post","".concat(this._configuration.links.myConversations,"/").concat(this.sid),{last_read_message_index:Me});case 2:return tt.abrupt("return",tt.sent.unread_messages_count);case 4:case"end":return tt.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()}],[{key:"preprocessUpdate",value:function(oe,qe){try{"string"==typeof oe.attributes?oe.attributes=JSON.parse(oe.attributes):oe.attributes&&JSON.stringify(oe.attributes)}catch{Je._logger.warn("Retrieved malformed attributes from the server for conversation: "+qe),oe.attributes={}}try{oe.dateCreated&&(oe.dateCreated=new Date(oe.dateCreated))}catch{Je._logger.warn("Retrieved malformed dateCreated from the server for conversation: "+qe),delete oe.dateCreated}try{oe.dateUpdated&&(oe.dateUpdated=new Date(oe.dateUpdated))}catch{Je._logger.warn("Retrieved malformed dateUpdated from the server for conversation: "+qe),delete oe.dateUpdated}try{oe.lastMessage&&oe.lastMessage.timestamp&&(oe.lastMessage.timestamp=new Date(oe.lastMessage.timestamp))}catch{Je._logger.warn("Retrieved malformed lastMessage.timestamp from the server for conversation: "+qe),delete oe.lastMessage.timestamp}}}]),Je}(de.ReplayEventEmitter);ue.default(gn,"participantJoined","participantJoined"),ue.default(gn,"participantLeft","participantLeft"),ue.default(gn,"participantUpdated","participantUpdated"),ue.default(gn,"messageAdded","messageAdded"),ue.default(gn,"messageRemoved","messageRemoved"),ue.default(gn,"messageUpdated","messageUpdated"),ue.default(gn,"typingEnded","typingEnded"),ue.default(gn,"typingStarted","typingStarted"),ue.default(gn,"updated","updated"),ue.default(gn,"removed","removed"),ue.default(gn,"_logger",rn.scope("Conversation")),He([Q.validateTypesAsync(Q.nonEmptyString,Jr),ge("design:type",Function),ge("design:paramtypes",[String,Object]),ge("design:returntype",Promise)],gn.prototype,"add",null),He([Q.validateTypesAsync(Q.nonEmptyString,Q.nonEmptyString,Jr,Jr),ge("design:type",Function),ge("design:paramtypes",[String,String,Object,Object]),ge("design:returntype",Promise)],gn.prototype,"addNonChatParticipant",null),He([Q.validateTypesAsync(Q.nonNegativeInteger),ge("design:type",Function),ge("design:paramtypes",[Number]),ge("design:returntype",Promise)],gn.prototype,"advanceLastReadMessageIndex",null),He([Q.validateTypesAsync(["undefined",Q.nonNegativeInteger],["undefined",Q.nonNegativeInteger],["undefined",Q.literal("backwards","forward")]),ge("design:type",Function),ge("design:paramtypes",[Number,Number,String]),ge("design:returntype",Promise)],gn.prototype,"getMe
1ssages",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],gn.prototype,"getParticipantBySid",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],gn.prototype,"getParticipantByIdentity",null),He([Q.validateTypesAsync([Q.nonEmptyString,Ze]),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],gn.prototype,"removeParticipant",null),He([Q.validateTypesAsync(["string",FormData,Q.literal(null),Q.objectSchema("media options",{contentType:Q.nonEmptyString,media:Q.custom(function(Nt){var $t="string"==typeof Nt&&Nt.length>0||Nt instanceof Uint8Array||Nt instanceof ArrayBuffer;return"function"==typeof Blob&&($t=$t||Nt instanceof Blob),[$t,"a non-empty string, an instance of Buffer or an instance of Blob"]})})],Jr,["undefined",Q.literal(null),Q.objectSchema("email attributes",{subject:[Q.nonEmptyString,"undefined"]})]),ge("design:type",Function),ge("design:paramtypes",[Object,Object,Object]),ge("design:returntype",Promise)],gn.prototype,"sendMessage",null),He([Q.validateTypesAsync(Q.literal("default","muted")),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],gn.prototype,"setUserNotificationLevel",null),He([Q.validateTypesAsync(Kr),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],gn.prototype,"updateAttributes",null),He([Q.validateTypesAsync("string"),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],gn.prototype,"updateFriendlyName",null),He([Q.validateTypesAsync([Q.literal(null),Q.nonNegativeInteger]),ge("design:type",Function),ge("design:paramtypes",[Number]),ge("design:returntype",Promise)],gn.prototype,"updateLastReadMessageIndex",null),He([Q.validateTypesAsync(["string",Q.literal(null)]),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],gn.prototype,"updateUniqueName",null);var Xe=function(){function Nt(){var $t=this;ce.default(this,Nt),this._promise=new Promise(function(Je,be){$t._resolve=Je,$t._reject=be})}return se.default(Nt,[{key:"promise",get:function(){return this._promise}},{key:"update",value:function(Je){this._resolve(Je)}},{key:"set",value:function(Je){this.current=Je,this._resolve(Je)}},{key:"fail",value:function(Je){this._reject(Je)}}]),Nt}();function Tt(Nt,$t){var Je=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!Je){if(Array.isArray(Nt)||(Je=function An(Nt,$t){if(Nt){if("string"==typeof Nt)return Nn(Nt,$t);var Je=Object.prototype.toString.call(Nt).slice(8,-1);if("Object"===Je&&Nt.constructor&&(Je=Nt.constructor.name),"Map"===Je||"Set"===Je)return Array.from(Nt);if("Arguments"===Je||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return Nn(Nt,$t)}}(Nt))||$t&&Nt&&"number"==typeof Nt.length){Je&&(Nt=Je);var be=0,oe=function(){};return{s:oe,n:function(){return be>=Nt.length?{done:!0}:{done:!1,value:Nt[be++]}},e:function(tt){throw tt},f:oe}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ce,qe=!0,Me=!1;return{s:function(){Je=Je.call(Nt)},n:function(){var tt=Je.next();return qe=tt.done,tt},e:function(tt){Me=!0,Ce=tt},f:function(){try{!qe&&null!=Je.return&&Je.return()}finally{if(Me)throw Ce}}}}function Nn(Nt,$t){(null==$t||$t>Nt.length)&&($t=Nt.length);for(var Je=0,be=new Array($t);Je<$t;Je++)be[Je]=Nt[Je];return be}function ir(Nt,$t){var Je=Object.keys(Nt);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(Nt);$t&&(be=be.filter(function(oe){return Object.getOwnPropertyDescriptor(Nt,oe).enumerable})),Je.push.apply(Je,be)}return Je}function pr(Nt){for(var $t=1;$t<arguments.length;$t++){var Je=null!=arguments[$t]?arguments[$t]:{};$t%2?ir(Object(Je),!0).forEach(function(be){ue.default(Nt,be,Je[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(Je)):ir(Object(Je)).forEac
1h(function(be){Object.defineProperty(Nt,be,Object.getOwnPropertyDescriptor(Je,be))})}return Nt}var qr=rn.scope("Conversations"),ri=function(Nt){At.default(Je,Nt);var be,$t=function Tr(Nt){var $t=function Gr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe){var qe;return ce.default(this,Je),qe=$t.call(this),ue.default(We.default(qe),"conversations",new Map),ue.default(We.default(qe),"myConversationsRead",new Xe),ue.default(We.default(qe),"tombstones",new Set),ue.default(We.default(qe),"myConversationsFetched",!1),qe.configuration=be,qe.services=oe,qe}return se.default(Je,[{key:"addConversation",value:(be=W.default(K.default.mark(function qe(Me){var Ce,Ke,tt,Et,Vn,Gn,Jn,ar,Gi,zi;return K.default.wrap(function(es){for(;;)switch(es.prev=es.next){case 0:return Et=typeof Me?.attributes<"u"?Me.attributes:{},es.next=3,this.services.commandExecutor.mutateResource("post",this.configuration.links.conversations,{friendly_name:Me.friendlyName,unique_name:Me.uniqueName,attributes:typeof Et<"u"?JSON.stringify(Et):void 0});case 3:if(Gn=null!==(Ce=(Vn=es.sent).sid)&&void 0!==Ce?Ce:null,Jn=null!==(Ke=null===(tt=Vn.sync_objects)||void 0===tt?void 0:tt.conversation)&&void 0!==Ke?Ke:null,ar=pr({self:Vn.url},Vn.links),!(Gi=this.conversations.get(Gn))){es.next=12;break}return es.next=11,Gi._subscribe();case 11:return es.abrupt("return",Gi);case 12:return zi=new gn({channel:Jn,entityName:"",uniqueName:"",attributes:null,createdBy:"",friendlyName:"",lastConsumedMessageIndex:0,dateCreated:null,dateUpdated:null},Gn,ar,this.configuration,this.services),this.conversations.set(zi.sid,zi),this._registerForEvents(zi),es.next=17,zi._subscribe();case 17:return this.emit("conversationAdded",zi),es.abrupt("return",zi);case 19:case"end":return es.stop()}},qe,this)})),function oe(qe){return be.apply(this,arguments)})},{key:"fetchConversations",value:function(){var be=W.default(K.default.mark(function qe(){var Ce,tt,Et,Vn,Gn,Jn,Me=this;return K.default.wrap(function(Gi){for(;;)switch(Gi.prev=Gi.next){case 0:return Gi.prev=0,Gi.next=3,this._getMap();case 3:return(Ce=Gi.sent).on(Ve.SyncMap.itemAdded,function(zi){qr.debug("itemAdded: ".concat(zi.item.key)),Me._upsertConversation("sync",zi.item.key,zi.item.data)}),Ce.on(Ve.SyncMap.itemRemoved,function(zi){qr.debug("itemRemoved: ".concat(zi.key));var is=zi.key;Me.myConversationsFetched||Me.tombstones.add(is);var es=Me.conversations.get(is);es&&("joined"===es.status&&(es._setStatus("notParticipating","sync"),Me.emit("conversationLeft",es)),Me.conversations.delete(is),Me.emit("conversationRemoved",es),es.emit("removed",es))}),Ce.on(Ve.SyncMap.itemUpdated,function(zi){qr.debug("itemUpdated: ".concat(zi.item.key)),Me._upsertConversation("sync",zi.item.key,zi.item.data)}),Gi.next=9,this._fetchMyConversations();case 9:tt=[],Et=Tt(Gi.sent);try{for(Et.s();!(Vn=Et.n()).done;)tt.push(this._upsertConversation("rest",(Gn=Vn.value).channel_sid,Gn))}catch(zi){Et.e(zi)}finally{Et.f()}return this.myConversationsRead.set(!0),Gi.next=16,Promise.all(tt);case 16:return this.myConversationsFetched=!0,this.tombstones.clear(),qr.debug("The conversations list has been successfully fetched"),Gi.abrupt("return",this);case 22:throw Gi.prev=22,Gi.t0=Gi.catch(0),Jn="Failed to fetch the conversations list","disconnected"!==this.services.syncClient.connectionState&&qr.error(Jn,Gi.t0),qr.debug("ERROR: ".concat(Jn),Gi.t0),Gi.t0;case 28:case"end":return Gi.stop()}},qe,this,[[0,22]])}));return function oe(){return be.apply(this,arguments)}}()},{key:"getConversations",value:function(){var be=W.default(K.default.mark(function qe(){var Ce,Me=this;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,this._getMap();case 2:return Ce=Et.sent,Et.next=5,Ce.getItems();case 5:return Et.abrupt("return",this._wrapPaginator(Et.sent,function(Vn){return Promise.all(Vn.map(function(Gn){return Me._upsertConversation("sync",Gn.key,Gn.data)}))}));case 7:case"end":return Et.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getConversation",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ke,Et,Ce=this;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return Gn.next=2,this._getMap();case 2:return Ke=Gn.sent,Gn.next=5,Ke.getItems({key:Me});case 5:return Et=Gn.sent.items.map(function(Jn){return Ce._upsertConversation("sync",Jn.key,Jn.data)}),Gn.abrupt("return",Et.length>0?Et[0]:null);case 8:case"end":return Gn.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getConversationByUniqueName",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce,tt,Et,Vn;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Ce=new Nr(this.configuration.links.myConversations).path(Me).build(),Jn.next=3,this.services.network.get(Ce);case 3:return Et=(tt=Jn.sent.body).conversation_sid,Vn={entityName:null,lastConsumedMessageIndex:tt.last_read_message_index,status:tt?.status||"unknown",friendlyName:tt.friendly_name,dateUpdated:tt.date_updated,dateCreated:tt.date_created,uniqueName:tt.unique_name,createdBy:tt.created_by,attributes:tt.attributes,channel:tt.sync_objects.conversation,notificationLevel:tt?.notification_level,sid:Et},Jn.abrupt("return",Et?this._upsertConversation("sync",Et,Vn):null);case 8:case"end":return Jn.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"peekConversation",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce,tt,Et;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return Ce=new Nr(this.configuration.links.conversations).path(Me).build(),Gn.next=3,this.services.network.get(Ce);case 3:return tt=Gn.sent.body,Et={entityName:null,status:tt?.status||"unknown",friendlyName:tt.friendly_name,dateUpdated:tt.date_updated,dateCreated:tt.date_created,uniqueName:tt.unique_name,createdBy:tt.created_by,attributes:tt.attributes,channel:"".concat(Me,".channel"),sid:Me},Gn.abrupt("return",this._upsertConversation("sync",Me,Et));case 7:case"end":return Gn.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"_getMap",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this.services.syncClient.map({id:this.configuration.myConversations,mode:"open_existing"});case 2:return Ce.abrupt("return",Ce.sent);case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_wrapPaginator",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var Ke=this;return K.default.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return Vn.next=2,Ce(Me.items);case 2:return Vn.abrupt("return",{items:Vn.sent.filter(function(Gn){return null!==Gn}),hasNextPage:Me.hasNextPage,hasPrevPage:Me.hasPrevPage,nextPage:function(){return Me.nextPage().then(function(Jn){return Ke._wrapPaginator(Jn,Ce)})},prevPage:function(){return Me.prevPage().then(function(Jn){return Ke._wrapPaginator(Jn,Ce)})}});case 4:case"end":return Vn.stop()}},qe)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"_updateConversation",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce,Ke){var Et,Vn;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(Et="rest"!==Me||"sync"===Ce._statusSource,void 0===Ce._statusSource||Me===Ce._statusSource||!Et||"sync"===Me){Jn.next=5;break}return qr.trace("upsertConversation: conversation is known from sync and came from REST, ignoring",{sid:Ce.sid,data:Ke.status,conversation:Ce.status}),Jn.abrupt("return");case 5:if("joined"!==Ke.status||"joined"===Ce.status){Jn.next=15;break}return Ce._setStatus("joined",Me),Vn={}
1,typeof Ke.notificationLevel<"u"&&(Vn.notificationLevel=Ke.notificationLevel),typeof Ke.lastConsumedMessageIndex<"u"&&(Vn.lastConsumedMessageIndex=Ke.lastConsumedMessageIndex),ke.default(Vn,{})||Ce._update(Vn),Jn.next=13,Ce._subscribe();case 13:return this.emit("conversationJoined",Ce),Jn.abrupt("return");case 15:if("notParticipating"!==Ke.status||"joined"!==Ce.status){Jn.next=22;break}return Ce._setStatus("notParticipating",Me),Ce._update(Ke),Jn.next=20,Ce._subscribe();case 20:return this.emit("conversationLeft",Ce),Jn.abrupt("return");case 22:if("notParticipating"!==Ke.status){Jn.next=26;break}return Jn.next=25,Ce._subscribe();case 25:return Jn.abrupt("return");case 26:Ce._update(Ke);case 27:case"end":return Jn.stop()}},qe,this)}));return function oe(qe,Me,Ce){return be.apply(this,arguments)}}()},{key:"_upsertConversation",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce,Ke){var tt,Et,Vn,Gn;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(qr.trace("upsertConversation called for ".concat(Ce),Ke),!(tt=this.conversations.get(Ce))){ar.next=9;break}return qr.trace("upsertConversation: the conversation ".concat(tt.sid," is known;")+"its status is known from the source ".concat(tt._statusSource," ")+"and the update came from the source ".concat(Me),tt),ar.next=6,this._updateConversation(Me,tt,Ke);case 6:return ar.next=8,tt._subscribe();case 8:return ar.abrupt("return",tt);case 9:if("rest"!==Me||!this.tombstones.has(Ce)){ar.next=12;break}return qr.trace("upsertChannel: the conversation is deleted but reappeared again from REST, ignoring",Ce),ar.abrupt("return",null);case 12:return qr.trace("upsertConversation: creating a local conversation object with sid "+Ce,Ke),Et="".concat(this.configuration.links.conversations,"/").concat(Ce),Vn={self:Et,messages:"".concat(Et,"/Messages"),participants:"".concat(Et,"/Participants")},Gn=new gn(Ke,Ce,Vn,this.configuration,this.services),this.conversations.set(Ce,Gn),ar.prev=17,ar.next=20,Gn._subscribe();case 20:if("joined"!==Ke.status){ar.next=23;break}return ar.next=23,Gn._fetchStreams();case 23:ar.next=32;break;case 25:if(ar.prev=25,ar.t0=ar.catch(17),"SyncError"===ar.t0.name){ar.next=29;break}throw ar.t0;case 29:return qr.trace("upsertChannel: the conversation is missing some Sync entity(ies), ignoring",Ce,ar.t0),this.conversations.delete(Ce),ar.abrupt("return",null);case 32:return this._registerForEvents(Gn),this.emit("conversationAdded",Gn),"joined"===Ke.status&&(Gn._setStatus("joined",Me),this.emit("conversationJoined",Gn)),ar.abrupt("return",Gn);case 36:case"end":return ar.stop()}},qe,this,[[17,25]])}));return function oe(qe,Me,Ce){return be.apply(this,arguments)}}()},{key:"_fetchMyConversations",value:function(){var be=W.default(K.default.mark(function qe(){var Me,Ce,Ke,tt,Et,Vn;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:Me=[],Ce=null;case 2:return tt=new Nr(this.configuration.links.myConversations),Ce&&tt.arg("PageToken",Ce),Jn.next=6,this.services.network.get(tt.build());case 6:Vn=null===(Ke=(Et=Jn.sent).body)||void 0===Ke?void 0:Ke.conversations.map(function(ar){return{descriptor:ar,channel_sid:ar.conversation_sid,status:ar.status,channel:ar.sync_objects.conversation,messages:ar.sync_objects.messages,roster:"".concat(ar.conversation_sid,".roster"),lastConsumedMessageIndex:ar.last_read_message_index,notificationLevel:ar.notification_level}}),Ce=Et.body.meta.next_token,Me=[].concat(De.default(Me),De.default(Vn));case 10:if(Ce){Jn.next=2;break}case 11:return Jn.abrupt("return",Me);case 12:case"end":return Jn.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_onConversationRemoved",value:function(oe){var qe=this.conversations.get(oe);qe&&(this.conversations.delete(oe),this.emit("conversationRemoved",qe))}},{key:"_registerForEvents",value:function(oe){var qe=this;oe.on("removed",function(){return qe._onConversationRemoved(oe.sid)}),oe.on("updated",function(Me){return qe.emit("conversationUpdated",Me)}),oe.on("participantJoined",function(Me){return qe.emit("participantJoined",Me)}),oe.on("participantLeft",function(Me){return qe.emit("participantLeft",Me)}),oe.on("participantUpdated",function(Me){return qe.emit("participantUpdated",Me)}),oe.on("messageAdded",function(Me){return qe.emit("messageAdded",Me)}),oe.on("messageUpdated",function(Me){return qe.emit("messageUpdated",Me)}),oe.on("messageRemoved",function(Me){return qe.emit("messageRemoved",Me)}),oe.on("typingStarted",function(Me){return qe.emit("typingStarted",Me)}),oe.on("typingEnded",function(Me){return qe.emit("typingEnded",Me)})}}]),Je}(de.ReplayEventEmitter);var en=function(Nt){At.default(Je,Nt);var be,$t=function Hr(Nt){var $t=function zt(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be,oe,qe){var Me;return ce.default(this,Je),(Me=$t.call(this)).configuration=oe,Me.services=qe,Me.fifoStack=[],Me.myself=be,Me.myself.on("updated",function(Ce){return Me.emit("userUpdated",Ce)}),Me.myself.on("userSubscribed",function(){return Me.emit("userSubscribed",Me.myself)}),Me.myself.on("userUnsubscribed",function(){Me.emit("userUnsubscribed",Me.myself),Me.myself._ensureFetched()}),Me.subscribedUsers=new Map,Me}return se.default(Je,[{key:"handleUnsubscribeUser",value:function(oe){this.subscribedUsers.has(oe.identity)&&this.subscribedUsers.delete(oe.identity);var qe=0;this.fifoStack.find(function(Ce,Ke){return Ce==oe.identity&&(qe=Ke,!0)}
1)&&this.fifoStack.splice(qe,1),this.emit("userUnsubscribed",oe)}},{key:"handleSubscribeUser",value:function(oe){if(!this.subscribedUsers.has(oe.identity)){if(this.fifoStack.length>=this.configuration.userInfosToSubscribe){var qe,Me,Ce=this.fifoStack.shift();null===(qe=this.subscribedUsers)||void 0===qe||null===(Me=qe.get(Ce))||void 0===Me||Me.unsubscribe()}this.fifoStack.push(oe.identity),this.subscribedUsers.set(oe.identity,oe),this.emit("userSubscribed",oe)}}},{key:"getUser",value:(be=W.default(K.default.mark(function qe(Me,Ce){var Ke,Et,Vn,tt=this;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Jn.next=2,this.myself._ensureFetched();case 2:if(Me!=this.myself.identity){Jn.next=4;break}return Jn.abrupt("return",this.myself);case 4:if(!(Et=this.subscribedUsers.get(Me))){Jn.next=7;break}return Jn.abrupt("return",Et);case 7:if(null===(Ke=Ce)||void 0===Ke){Jn.next=11;break}Jn.next=14;break;case 11:return Jn.next=13,this.getSyncUniqueName(Me);case 13:Ce=Jn.sent;case 14:return(Vn=new Qe(Me,Ce,this.configuration,this.services)).on("updated",function(ar){return tt.emit("userUpdated",ar)}),Vn.on("userSubscribed",function(){return tt.handleSubscribeUser(Vn)}),Vn.on("userUnsubscribed",function(){return tt.handleUnsubscribeUser(Vn)}),Jn.next=20,Vn._ensureFetched();case 20:return Jn.abrupt("return",Vn);case 21:case"end":return Jn.stop()}},qe,this)})),function oe(qe,Me){return be.apply(this,arguments)})},{key:"getSubscribedUsers",value:function(){var be=W.default(K.default.mark(function qe(){var Me;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this.myself._ensureFetched();case 2:return Me=[this.myself],this.subscribedUsers.forEach(function(tt){return Me.push(tt)}),Ke.abrupt("return",Me);case 5:case"end":return Ke.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getSyncUniqueName",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce,Ke,tt;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return tt=new Nr(this.configuration.links.users).path(Me).build(),Gn.next=3,this.services.network.get(tt);case 3:return Gn.abrupt("return",null!==(Ce=null===(Ke=Gn.sent.body)||void 0===Ke?void 0:Ke.sync_objects.user_info_map)&&void 0!==Ce?Ce:"");case 5:case"end":return Gn.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()}]),Je}(de.ReplayEventEmitter),bt=rn.scope("TypingIndicator"),It=function(){function Nt($t,Je,be){ce.default(this,Nt),this.configuration=Je,this.services=be,this.getConversation=$t,this.serviceTypingTimeout=null,this.sentUpdates=new Map}return se.default(Nt,[{key:"typingTimeout",get:function(){return this.configuration.typingIndicatorTimeoutOverride||this.serviceTypingTimeout||this.configuration.typingIndicatorTimeoutDefault}},{key:"initialize",value:function(){var Je=this;this.services.notificationClient.on("message",function(){var be=W.default(K.default.mark(function oe(qe,Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(qe!==vn.TYPING_INDICATOR){Ke.next=3;break}return Ke.next=3,Je._handleRemoteTyping(Me);case 3:case"end":return Ke.stop()}},oe)}));return function(oe,qe){return be.apply(this,arguments)}}())}},{key:"_handleRemoteTyping",value:($t=W.default(K.default.mark(function be(oe){var qe=this;return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:bt.trace("Got new typing indicator ",oe),this.getConversation(oe.channel_sid).then(function(Ke){Ke&&Ke._participants.forEac
1h(function(tt){tt.identity===oe.identity&&tt._startTyping(qe.configuration.typingIndicatorTimeoutOverride?qe.configuration.typingIndicatorTimeoutOverride+1e3:1e3*oe.typing_timeout)})}).catch(function(Ke){throw bt.error(Ke),Ke});case 2:case"end":return Ce.stop()}},be,this)})),function Je(be){return $t.apply(this,arguments)})},{key:"send",value:function(Je){var be=this.sentUpdates.get(Je);return be&&be>Date.now()-this.typingTimeout?Promise.resolve():(this.sentUpdates.set(Je,Date.now()),this._send(Je))}},{key:"_send",value:function(Je){var be=this;bt.trace("Sending typing indicator");var oe=this.configuration.links.typing,Me="ChannelSid=".concat(Je);return this.services.twilsockClient.post(oe,{"Content-Type":"application/x-www-form-urlencoded"},Me,this.configuration.productId).then(function(Ce){Ce.body.hasOwnProperty("typing_timeout")&&(be.serviceTypingTimeout=1e3*Ce.body.typing_timeout)}).catch(function(Ce){throw bt.error("Failed to send typing indicator:",Ce),Ce})}}]),Nt;var $t}(),_t=se.default(function Nt($t){ce.default(this,Nt),this.title=$t.title||null,this.body=$t.body||null,this.sound=$t.sound||null,this.badge=$t.badge||null,this.action=$t.action||null,this.type=$t.type||null,this.data=$t.data||{}}),hn="2.5.0";function T(Nt,$t){var Je=Object.keys(Nt);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(Nt);$t&&(be=be.filter(function(oe){return Object.getOwnPropertyDescriptor(Nt,oe).enumerable})),Je.push.apply(Je,be)}return Je}function st(Nt){for(var $t=1;$t<arguments.length;$t++){var Je=null!=arguments[$t]?arguments[$t]:{};$t%2?T(Object(Je),!0).forEach(function(be){ue.default(Nt,be,Je[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(Je)):T(Object(Je)).forEach(function(be){Object.defineProperty(Nt,be,Object.getOwnPropertyDescriptor(Je,be))})}return Nt}var Vt=function($t){return $t.replace(/(^\/+|\/+$)/g,"")},Sr=function($t){return 202===$t.status.code},St=function(Nt){At.default(Je,Nt);var $t=function Z(Nt){var $t=function wt(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be){return ce.default(this,Je),$t.call(this,be)}return se.default(Je)}(Dt.default(Error)),Rt=function(){function Nt($t,Je,be){ce.default(this,Nt),this._serviceUrl=$t,this._services=Je,this._productId=be}return se.default(Nt,[{key:"_preProcessUrl",value:function(Je){var be=Vt(Je);return/^https?:\/\//.test(Je)?be:"".concat(Vt(this._serviceUrl),"/").concat(be)}},{key:"_makeRequest",value:($t=W.default(K.default.mark(function be(oe,qe,Me,Ce){var Ke,tt,Et,Vn;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:Ke=this._preProcessUrl(qe),tt=st({"Content-Type":"application/json; charset=utf-8"},Ce||{}),Jn.t0=oe,Jn.next="get"===Jn.t0?5:"post"===Jn.t0?11:"delete"===Jn.t0?15:19;break;case 5:return Vn=Ke,Me&&(Vn+="?"+Object.entries(Me).map(function(ar){return ar.map(encodeURIComponent).join("=")}).join("&")),Jn.next=9,this._services.transport.get(Vn,tt,this._productId);case 9:case 13:case 17:return Et=Jn.sent,Jn.abrupt("break",19);case 11:return Jn.next=13,this._services.transport.post(Ke,tt,JSON.stringify(Me),this._productId);case 15:return Jn.next=17,this._services.transport.delete(Ke,tt,{},this._productId);case 19:if(!(Et.status.code<200||Et.status.code>=300)){Jn.next=21;break}throw new Error("Request responded with a non-success code ".concat(Et.status.code));case 21:return Jn.abrupt("return",Et);case 22:case"end":return Jn.stop()}},be,this)})),function Je(be,oe,qe,Me){return $t.apply(this,arguments)})},{key:"fetchResource",value:function(){var $t=W.default(K.default.mark(function be(oe,qe){var Ke,tt,Me=this;return K.default.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return Ke=new Ye.AsyncRetrier({min:50,max:1600,maxAttemptsCount:6}),Vn.prev=2,Vn.next=5,Ke.run(W.default(K.default.mark(function Gn(){var ar,Gi;return K.default.wrap(function(is){for(;;)switch(is.prev=is.next){case 0:return is.prev=0,is.next=3,Me._makeRequest
1("get",oe,qe);case 3:return is.abrupt("return",{type:"success",data:is.sent.body});case 7:if(is.prev=7,is.t0=is.catch(0),404!==(null==is.t0||null===(ar=is.t0.body)||void 0===ar?void 0:ar.status)||50530!==(null==is.t0||null===(Gi=is.t0.body)||void 0===Gi?void 0:Gi.code)){is.next=11;break}return is.abrupt("return",{type:"noMetadata"});case 11:throw is.t0;case 12:case"end":return is.stop()}},Gn,null,[[0,7]])})));case 5:tt=Vn.sent,Vn.next=11;break;case 8:throw Vn.prev=8,Vn.t0=Vn.catch(2),new Error('Fetch resource from "'.concat(oe,'" failed.'));case 11:if("noMetadata"!==tt.type){Vn.next=13;break}throw new St("No metadata found.");case 13:return Vn.abrupt("return",tt.data);case 14:case"end":return Vn.stop()}},be,null,[[2,8]])}));return function Je(be,oe){return $t.apply(this,arguments)}}()},{key:"mutateResource",value:function(){var $t=W.default(K.default.mark(function be(oe,qe,Me){var Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._makeRequest(oe,qe,Me,{"X-Twilio-Mutation-Id":j.v4()});case 2:if(!Sr(Ce=tt.sent)){tt.next=7;break}return tt.next=6,this.fetchResource(Ce.body.resource_url);case 6:return tt.abrupt("return",tt.sent);case 7:return tt.abrupt("return",Ce.body);case 8:case"end":return tt.stop()}},be,this)}));return function Je(be,oe,qe){return $t.apply(this,arguments)}}()}]),Nt;var $t}(),Ee=function(){function Nt($t){var Je=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,be=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3;ce.default(this,Nt),ue.default(this,"_cachedTemplates",null),this._services=$t,this._pageSize=Je,this._cacheTtlMs=be}return se.default(Nt,[{key:"getContentTemplates",value:($t=W.default(K.default.mark(function be(){var Me,Ce,Ke,tt,Vn,oe=this;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(null===this._cachedTemplates){Jn.next=2;break}return Jn.abrupt("return",this._cachedTemplates);case 2:return Jn.next=4,this._fetchContentTemplates();case 4:Me=Lt.default(Jn.sent,2),Ke=Me[1],tt=Ce=Me[0];case 9:if(null===Ke){Jn.next=19;break}return Jn.next=12,this._fetchContentTemplates(Ke);case 12:Vn=Lt.default(Jn.sent,2),Ce=Vn[0],Ke=Vn[1],tt=[].concat(De.default(tt),De.default(Ce)),Jn.next=9;break;case 19:return this._cachedTemplates=Object.freeze(tt),setTimeout(function(){oe._cachedTemplates=null},this._cacheTtlMs),Jn.abrupt("return",tt);case 22:case"end":return Jn.stop()}},be,this)})),function Je(){return $t.apply(this,arguments)})},{key:"_fetchContentTemplates",value:function(){var $t=W.default(K.default.mark(function be(oe){var Me,Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return(Me=new Nr("Client/v2/ContentTemplates")).arg("PageSize",this._pageSize),void 0!==oe&&Me.arg("PageToken",oe),tt.next=6,this._services.commandExecutor.fetchResource(Me.build());case 6:return tt.abrupt("return",[(Ce=tt.sent).templates.map(function(Et){return new Ai(Et)}),Ce.meta.next_token]);case 8:case"end":return tt.stop()}},be,this)}));return function Je(be){return $t.apply(this,arguments)}}()}]),Nt;var $t}();function U(Nt,$t){var Je=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!Je){if(Array.isArray(Nt)||(Je=function ie(Nt,$t){if(Nt){if("string"==typeof Nt)return V(Nt,$t);var Je=Object.prototype.toString.call(Nt).slice(8,-1);if("Object"===Je&&Nt.constructor&&(Je=Nt.constructor.name),"Map"===Je||"Set"===Je)return Array.from(Nt);if("Arguments"===Je||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return V(Nt,$t)}}(Nt))||$t&&Nt&&"number"==typeof Nt.length){Je&&(Nt=Je);var be=0,oe=function(){};return{s:oe,n:function(){return be>=Nt.length?{done:!0}:{done:!1,value:Nt[be++]}},e:function(tt){throw tt},f:oe}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ce,qe=!0,Me=!1;return{s:function(){Je=Je.call(Nt)},n:function(){var tt=Je.next();return qe=tt.done,tt},e:function(tt){Me=!0,Ce=tt},f:function(){try{!qe&&null!=Je.return&&Je.return()}finally{if(Me)throw Ce}}}}function V(Nt,$t){(null==$t||$t>Nt.length)&&($t=Nt.length);for(var Je=0,be=new Array($t);Je<$t;Je++)be[Je]=Nt[Je];return be}var je=function(Nt){function $t(){var Je=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ce.default(this,$t),!(Je.maxSize&&Je.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=Je.maxSize,this.onEviction=Je.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}return se.default($t,[{key:"_set",value:function(be,oe){if(this.cache.set(be,oe),this._size++,this._size>=this.maxSize){if(this._size=0,"function"==typeof this.onEviction){var Me,qe=U(this.oldCache.entries());try{for(qe.s();!(Me=qe.n()).done;){var Ce=Lt.default(Me.value,2);this.onEviction(Ce[0],Ce[1])}}catch(Et){qe.e(Et)}finally{qe.f()}}this.oldCache=this.cache,this.cache=new Map}}},{key:"get",value:function(be){if(this.cache.has(be))return this.cache.get(be);if(this.oldCache.has(be)){var oe=this.oldCache.get(be);return this.oldCache.delete(be),this._set(be,oe),oe}}},{key:"set",value:function(be,oe){return this.cache.has(be)?this.cache.set(be,oe):this._set(be,oe),this}},{key:"has",value:function(be){return this.cache.has(be)||this.oldCache.has(be)}},{key:"peek",value:function(be){return this.cache.has(be)?this.cache.get(be):this.oldCache.has(be)?this.oldCache.get(be):void 0}},{key:"delete",value:function(be){var oe=this.cache.delete(be);return oe&&this._size--,this.oldCache.delete(be)||oe}},{key:"clear",value:function(){this.cache.clear(),this.oldCache.clear(),this._size=0}},{key:"keys",value:K.default.mark(function Je(){var be,oe,qe,Me;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:be=U(this),Ke.prev=1,be.s();case 3:if((oe=be.n()).done){Ke.next=9;break}return qe=Lt.default(oe.value,1),Me=qe[0],Ke.next=7,Me;case 7:Ke.next=3;break;case 9:Ke.next=14;break;case 11:Ke.prev=11,Ke.t0=Ke.catch(1),be.e(Ke.t0);case 14:return Ke.prev=14,be.f(),Ke.finish(14);case 17:case"end":return Ke.stop()}},Je,this,[[1,11,14,17]])})},{key:"values",value:K.default.mark(function Je(){var be,oe,qe,Me;return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:be=U(this),Ke.prev=1,be.s();case 3:if((oe=be.n()).done){Ke.next=9;break}return qe=Lt.default(oe.value,2),Me=qe[1],Ke.next=7,Me;case 7:Ke.next=3;break;case 9:Ke.next=14;break;case 11:Ke.prev=11,Ke.t0=Ke.catch(1),be.e(Ke.t0);case 14:return Ke.prev=14,be.f(),Ke.finish(14);case 17:case"end":return Ke.stop()}},Je,this,[[1,11,14,17]])})},{key:Nt,value:K.default.mark(function Je(){var be,oe,qe,Me,Ce,Ke,tt;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:be=U(this.cache),Gn.prev=1,be.s();case 3:if((oe=be.n()).done){Gn.next=9;break}return qe=oe.value,Gn.next=7,qe;case 7:Gn.next=3;break;case 9:Gn.next=14;break;case 11:Gn.prev=11,Gn.t0=Gn.catch(1),be.e(Gn.t0);case 14:return Gn.prev=14,be.f(),Gn.finish(14);case 17:Me=U(this.oldCache),Gn.prev=18,Me.s();case 20:if((Ce=Me.n()).done){Gn.next=28;break}if(tt=Lt.default(Ke=Ce.value,1),this.cache.has(tt[0])){Gn.next=26;break}return Gn.next=26,Ke;case 26:Gn.next=20;break;case 28:Gn.next=33;break;case 30:Gn.prev=30,Gn.t1=Gn.catch(18),Me.e(Gn.t1);case 33:return Gn.prev=33,Me.f(),Gn.finish(33);case 36:case"end":return Gn.stop()}},Je,this,[[1,11,14,17],[18,30,33,36]])})},{key:"size",get:function(){var qe,be=0,oe=U(this.oldCache.keys());try{for(oe.s();!(qe=oe.n()).done;)this.cache.has(qe.value)||be++}catch(Ce){oe.e(Ce)}finally{oe.f()}return Math.min(this._size+be,this.maxSize)}}]),$t}(Symbol.iterator),$e=se.default(function Nt($t,Je){ce.default(this,Nt),this.type=$t,this.data=Je,Object.freeze(Je)}),Wt=function(){function Nt($t,Je){ce.default(this,Nt),this._services=$t,this._configuration=Je,this._cache=new je({maxSize:Je.channelMetadataCacheCapacity})}return se.default(Nt,[{key:"getChannelMetadata",value:($t=W.default(K.default.mark(function be(oe,qe){var Me,Ce,Ke,tt,Et;return K.default.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:if(Me="".concat(oe,",").concat(qe),!(Ce=this._cache.get(Me))){Gn.next=4;break}return Gn.abrupt("return",Ce.item);case 4:return Ke="".concat(this._configuration.links.conversations,"/").concat(oe,"/Messages/").concat(qe,"/ChannelMetadata"),Gn.prev=5,Gn.next=8,this._services.commandExecutor.fetchResource(Ke);case 8:tt=Gn.sent,Gn.next=17;break;case 11:if(Gn.prev=11,Gn.t0=Gn.catch(5),!(Gn.t0 instanceof St)){Gn.next=16;break}return this._cache.set(Me,{item:null}),Gn.abrupt("return",null);case 16:throw new Error(Gn.t0);case 17:return Et=new $e(tt.type,tt.data),this._cache.set(Me,{item:Et}),Gn.abrupt("return",Et);case 20:case"end":return Gn.stop()}},be,this,[[5,11]])})),function Je(be,oe){return $t.apply(this,arguments)})}]),Nt;var $t}();function In(Nt,$t){var Je=typeof Symbol<"u"&&Nt[Symbol.iterator]||Nt["@@iterator"];if(!Je){if(Array.isArray(Nt)||(Je=function rr(Nt,$t){if(Nt){if("string"==typeof Nt)return fr(Nt,$t);var Je=Object.prototype.toString.call(Nt).slice(8,-1);if("Object"===Je&&Nt.constructor&&(Je=Nt.constructor.name),"Map"===Je||"Set"===Je)return Array.from(Nt);if("Arguments"===Je||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return fr(Nt,$t)}}(Nt))||$t&&Nt&&"number"==typeof Nt.length){Je&&(Nt=Je);var be=0,oe=function(){};return{s:oe,n:function(){return be>=Nt.length?{done:!0}:{done:!1,value:Nt[be++]}},e:function(tt){throw tt},f:oe}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Ce,qe=!0,Me=!1;return{s:function(){Je=Je.call(Nt)},n:function(){var tt=Je.next();return qe=tt.done,tt},e:function(tt){Me=!0,Ce=tt},f:function(){try{!qe&&null!=Je.return&&Je.return()}finally{if(Me)throw Ce}}}}function fr(Nt,$t){(null==$t||$t>Nt.length)&&($t=Nt.length);for(var Je=0,be=new Array($t);Je<$t;Je++)be[Je]=Nt[Je];return be}var Oi,Xn=se.default(function Nt($t){ce.default(this,Nt),ue.default(this,"type","email"),this.messageSid=$t.message_sid,this.level=$t.level,this.name=$t.name,this.address=$t.address}),Rr=se.default(function Nt($t){ce.default(this,Nt),this.type=$t.type,this.messageSid=$t.message_sid,this.rawData=JSON.stringify($t)}),xi=function(){function Nt($t,Je){ce.default(this,Nt),this._services=$t,this._configuration=Je,this._cache=new je({maxSize:Je.messageRecipientsCacheCapacity})}return se.default(Nt,[{key:"getRecipientsFromMessage",value:($t=W.default(K.default.mark(function be(oe,qe){var Ce,Ke,tt,Vn,Me=this;return K.default.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(Ce="".concat(oe,",").concat(qe),!(Ke=this._cache.get(Ce))){Jn.next=4;break}return Jn.abrupt("return",Ke.item);case 4:return tt=new Nr(this._configuration.links.conversations).path(oe).path("MessageRecipients").arg("MessageSid",qe).build(),Jn.next=7,this._services.commandExecutor.fetchResource(tt);case 7:return(Vn=Jn.sent.message_recipients.map(function(ar){return Me._wrapResponse(ar)})).length>0&&this._cache.set(Ce,{item:Vn}),Jn.abrupt("return",Vn);case 11:case"end":return Jn.stop()}},be,this)})),function Je(be,oe){return $t.apply(this,arguments)})},{key:"getRecipientsFromConversation",value:function(){var $t=W.default(K.default.mark(function be(oe,qe){var Me,Ce,tt,Et,Vn,Gn,Jn,ar,Gi,zi,is,es,Ke=this;return K.default.wrap(function(hs){for(;;)switch(hs.prev=hs.next){case 0:return tt=new Nr(this._configuration.links.conversations).path(oe).path("MessageRecipients").arg("PageToken",null!==(Me=qe?.pageToken)&&void 0!==Me?Me:void 0).arg("PageSize",null!==(Ce=qe?.pageSize)&&void 0!==Ce?Ce:void 0).build(),hs.next=3,this._services.commandExecutor.fetchResource(tt);case 3:Vn=(Et=hs.sent).message_recipients.map(function(Ue){return Ke._wrapResponse(Ue)}),Gn=In(Vn);try{for(Gn.s();!(Jn=Gn.n()).done;)zi=Jn.value,is="".concat(oe,",").concat(zi.messageSid),es=null!==(ar=null===(Gi=this._cache.get(is))||void 0===Gi?void 0:Gi.item)&&void 0!==ar?ar:[],this._cache.set(is,{item:[].concat(De.default(es),[zi])})}catch(Ue){Gn.e(Ue)}finally{Gn.f()}return hs.abrupt("return",new Bn(Vn,function(Ue,yn){return Ke.getRecipientsFromConversation(oe,{pageToken:Ue,pageSize:yn})},Et.meta.previous_token,Et.meta.next_token));case 8:case"end":return hs.stop()}},be,this)}));return function Je(be,oe){return $t.apply(this,arguments)}}()},{key:"_wrapResponse",value:function(Je){return"email"===Je.type?new Xn(Je):new Rr(Je)}
1}]),Nt;var $t}();function bs(Nt,$t){var Je=Object.keys(Nt);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(Nt);$t&&(be=be.filter(function(oe){return Object.getOwnPropertyDescriptor(Nt,oe).enumerable})),Je.push.apply(Je,be)}return Je}function fs(Nt){for(var $t=1;$t<arguments.length;$t++){var Je=null!=arguments[$t]?arguments[$t]:{};$t%2?bs(Object(Je),!0).forEach(function(be){ue.default(Nt,be,Je[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Nt,Object.getOwnPropertyDescriptors(Je)):bs(Object(Je)).forEach(function(be){Object.defineProperty(Nt,be,Object.getOwnPropertyDescriptor(Je,be))})}return Nt}var Ci,Js=se.default(function Nt(){ce.default(this,Nt)});G.QP=(Oi=function(Nt){At.default(Je,Nt);var be,$t=function Gs(Nt){var $t=function Ns(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var oe,be=it.default(Nt);if($t){var qe=it.default(this).constructor;oe=Reflect.construct(be,arguments,qe)}else oe=be.apply(this,arguments);return Ut.default(this,oe)}}(Je);function Je(be){var oe,qe,Me,Ce,Ke,tt,Et=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ce.default(this,Je),tt=$t.call(this),ue.default(We.default(tt),"version",hn),ue.default(We.default(tt),"connectionState","unknown"),ue.default(We.default(tt),"parsePushNotification",Ci.parsePushNotification),tt._fpaToken=be??"",tt._options=Et??{},!tt._options.disableDeepClone){var Vn=fs(fs({},tt._options),{},{transport:void 0,twilsockClient:void 0});Vn=function Mr(Nt){return JSON.parse(JSON.stringify(Nt))}(Vn),Vn.transport=tt._options.transport,Vn.twilsockClient=tt._options.twilsockClient,tt._options=Vn}tt._options.logLevel=null!==(oe=tt._options.logLevel)&&void 0!==oe?oe:"silent",Ci._logger.setLevel(tt._options.logLevel);var Gn=tt._options.productId="ip_messaging";if(tt._options.clientMetadata=tt._options.clientMetadata||{},tt._options.clientMetadata.hasOwnProperty("type")||(tt._options.clientMetadata.type="conversations"),tt._options.clientMetadata.hasOwnProperty("sdk")||(tt._options.clientMetadata.sdk="JS",tt._options.clientMetadata.sdkv=hn),tt._options.Sync=tt._options.Sync||{},typeof tt._options.Sync.enableSessionStorage>"u"&&(tt._options.Sync.enableSessionStorage=!0),tt._options.region&&(tt._options.Sync.region=tt._options.region),!be)throw new Error("A valid Twilio token should be provided");tt._services=new Js,tt._myself=new Qe("","",null,tt._services);var Jn=!tt._options.twilsockClient;if(!tt._options.initRegistrations){var ar=new pe.InitRegistration(Gn);Ci.populateInitRegistrations(ar),tt._options.initRegistrations=[ar]}tt._services.twilsockClient=tt._options.twilsockClient=null!==(qe=tt._options.twilsockClient)&&void 0!==qe?qe:new pe.TwilsockClient(be,Gn,tt._options),tt._services.twilsockClient.on(Ci.tokenAboutToExpire,function(){return tt.emit(Ci.tokenAboutToExpire)}),tt._services.twilsockClient.on(Ci.tokenExpired,function(){return tt.emit(Ci.tokenExpired)}),tt._services.twilsockClient.on(Ci.connectionError,function(hs){return tt.emit(Ci.connectionError,hs)}),tt._services.twilsockClient.on("stateChanged",function(hs){Ci._logger.debug("Handling stateChanged for ConversationsClient: new state ".concat(hs)),hs!==tt.connectionState&&(tt.connectionState=hs,tt.emit(Ci.connectionStateChanged,tt.connectionState))}),tt._services.transport=tt._options.transport=null!==(Me=tt._options.transport)&&void 0!==Me?Me:tt._options.twilsockClient,tt._services.notificationClient=tt._options.notificationsClient=null!==(Ce=tt._options.notificationsClient)&&void 0!==Ce?Ce:new ae.Notifications(be,tt._options),tt._services.syncClient=tt._options.syncClient=null!==(Ke=tt._options.syncClient)&&void 0!==Ke?Ke:new Ve.SyncClient(be,tt._options);var Gi=Et?.Chat||Et?.IPMessaging||Et||{},is=Gi.apiUri||Gi.typingUri||"https://aim.".concat(Gi.region||Et?.region||"us1",".twilio.com");tt._services.commandExecutor=new Rt(is,{transport:tt._options.transport},Gn),tt._services.contentClient=new Ee(tt._services);var es=function(Ue){tt._rejectEnsureReady(Ue),tt.emit(Ci.stateChanged,"failed"),tt.emit(Ci.initFailed,{error:Ue})},go=function(){es({terminal:!0,message:"Twilsock has disconnected."})};return tt._services.twilsockClient.once("connectionError",es),tt._services.twilsockClient.once("disconnected",go),tt._services.twilsockClient.once("connected",W.default(K.default.mark(function hs(){var Ue,yn;return K.default.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return Ci._logger.debug("ConversationsClient started INITIALIZING"),tt._services.twilsockClient.off("connectionError",es),tt._services.twilsockClient.off("disconnected",go),Bt.prev=3,tt._services.twilsockClient.addPartialTelemetryEvent(new pe.TelemetryEventDescription(Ue="conversations.client.startup","Conversations client startup",new Date),Ue,pe.TelemetryPoint.Start),Bt.next=8,tt._initialize();case 8:tt._services.twilsockClient.addPartialTelemetryEvent(new pe.TelemetryEventDescription("","",new Date),Ue,pe.TelemetryPoint.End),Bt.next=17;break;case 11:Bt.prev=11,Bt.t0=Bt.catch(3),tt._rejectEnsureReady(yn={terminal:!0,message:Bt.t0.message}),tt.emit(Ci.stateChanged,"failed"),tt.emit(Ci.initFailed,{error:yn});case 17:case"end":return Bt.stop()}},hs,null,[[3,11]])}))),tt._ensureReady=new Promise(function(hs,Ue){tt._resolveEnsureReady=hs,tt._rejectEnsureReady=Ue}).catch(function(){}),Jn&&tt._services.twilsockClient.connect(),tt}return se.default(Je,[{key:"user",get:function(){return this._myself}},{key:"reachabilityEnabled",get:function(){if(!this._configuration)throw new Error("Reachability information could not yet be accessed as the client has not yet been initialized. Subscribe to the 'stateChanged' event to properly react to the client initialization.");return this._configuration.reachabilityEnabled}},{key:"token",get:function(){return this._fpaToken}},{key:"shutdown",value:(be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._ensureReady;case 2:return Ce.next=4,this._services.twilsockClient.disconnect();case 4:case"end":return Ce.stop()}},qe,this)})),function oe(){return be.apply(this,arguments)})},{key:"updateToken",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._ensureReady;case 2:if(Ci._logger.info("updateToken"),this._fpaToken!==Me){Ke.next=5;break}return Ke.abrupt("return",this);case 5:return Ke.next=7,this._services.twilsockClient.updateToken(Me);case 7:return Ke.next=9,this._services.notificationClient.updateToken(Me);case 9:return Ke.next=11,this._services.mcsClient.updateToken(Me);case 11:return this._fpaToken=Me,Ke.abrupt("return",this);case 13:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getConversationBySid",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._ensureReady;case 2:return tt.next=4,this._conversationsEntity.myConversationsRead.promise;case 4:return tt.next=6,this._conversationsEntity.getConversation(Me);case 6:if(Ce=tt.sent){tt.next=12;break}return tt.next=10,this.peekConversationBySid(Me);case 10:(Ce=tt.sent)&&Ie.deprecationWarning("The method getConversationBySid is deprecated to retrieve conversations you're not part of. Use peekConversationBySid instead.");case 12:if(Ce){tt.next=14;break}throw new Error("Conversation with SID ".concat(Me," was not found."));case 14:return tt.abrupt("return",Ce);case 15:case"end":return tt.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"peekConversationBySid",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._ensureReady;case 2:return tt.next=4,this._conversationsEntity.peekConversation(Me);case 4:if(Ce=tt.sent){tt.next=7;break}throw new Error("Conversation with SID ".concat(Me," was not found."));case 7:return tt.abrupt("return",Ce);case 8:case"end":return tt.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getConversationByUniqueName",value:function(){var be=W.default(K.default.mark(function qe(Me){var Ce;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._ensureReady;case 2:return tt.next=4,this._conversationsEntity.myConversationsRead.promise;case 4:return tt.next=6,this._conversationsEntity.getConversationByUniqueName(Me);case 6:if(Ce=tt.sent){tt.next=9;break}throw new Error("Conversation with unique name ".concat(Me," was not found."));case 9:return tt.abrupt("return",Ce);case 10:case"end":return tt.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getSubscribedConversations",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._ensureReady;
1case 2:return Ce.abrupt("return",this._conversationsPromise.then(function(Ke){return Ke.getConversations()}));case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"createConversation",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._ensureReady;case 2:return Me=Me||{},Ke.abrupt("return",this._conversationsPromise.then(function(tt){return tt.addConversation(Me)}));case 4:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"setPushRegistrationId",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._ensureReady;case 2:return this._subscribeToPushNotifications(Me),this._services.notificationClient.setPushRegistrationId(Me,Ce),tt.next=6,this._services.notificationClient.commitChanges();case 6:case"end":return tt.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"unsetPushRegistrationId",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._ensureReady;case 2:return this._unsubscribeFromPushNotifications(Me),Ke.next=5,this._services.notificationClient.commitChanges();case 5:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"removePushRegistrations",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._services.notificationClient.removeRegistrations(Me,Ce);case 2:case"end":return tt.stop()}},qe,this)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"handlePushNotification",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._ensureReady;case 2:Ci._logger.debug("handlePushNotification, notificationPayload=",Me),this.emit("pushNotification",Ci.parsePushNotification(Me));case 4:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getUser",value:function(){var be=W.default(K.default.mark(function qe(Me){return K.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this._ensureReady;case 2:return Ke.abrupt("return",this._services.users.getUser(Me));case 3:case"end":return Ke.stop()}},qe,this)}));return function oe(qe){return be.apply(this,arguments)}}()},{key:"getSubscribedUsers",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._ensureReady;case 2:return Ce.abrupt("return",this._services.users.getSubscribedUsers());case 3:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"getTemporaryContentUrlsForMediaSids",value:function(oe){var qe=this;return new Ne.CancellablePromise(function(){var Me=W.default(K.default.mark(function Ce(Ke,tt,Et){var Vn;return K.default.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(qe._services.mcsClient&&oe){ar.next=3;break}return tt(new Error("Media Content Service is unavailable")),ar.abrupt("return");case 3:return Vn=qe._services.mcsClient.mediaSetGetContentUrls(oe),Et(function(){Vn.cancel()}),ar.prev=5,ar.next=8,Vn;case 8:Ke(ar.sent),ar.next=15;break;case 12:ar.prev=12,ar.t0=ar.catch(5),tt(ar.t0);case 15:case"end":return ar.stop()}},Ce,null,[[5,12]])}));return function(Ce,Ke,tt){return Me.apply(this,arguments)}}())}},{key:"getTemporaryContentUrlsForMedia",value:function(oe){var qe=oe.map(function(Me){return Me.sid});return this.getTemporaryContentUrlsForMediaSids(qe)}},{key:"getContentTemplates",value:function(){var be=W.default(K.default.mark(function qe(){return K.default.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,this._ensureReady;case 2:return Ce.next=4,this._services.contentClient.getContentTemplates();case 4:return Ce.abrupt("return",Ce.sent);case 5:case"end":return Ce.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_initialize",value:function(){var be=W.default(K.default.mark(function qe(){var Me=this;return K.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,this._services.commandExecutor.fetchResource("Client/v2/Configuration");case 2:return this._configuration=new gr(this._options,tt.sent,Ci._logger),this._services.channelMetadataClient=new Wt(this._services,this._configuration),this._services.messageRecipientsClient=new xi(this._services,this._configuration),this._myself._resolveInitialization(this._configuration,this._configuration.userIdentity,this._configuration.userInfo,!0),this._services.typingIndicator=new It(this.getConversationBySid.bind(this),this._configuration,this._services),this._services.network=new dr(this._configuration,this._services),this._services.users=new en(this._myself,this._configuration,this._services),this._services.users.on("userSubscribed",function(Et){Me.emit("userSubscribed",Et)}),this._services.users.on("userUpdated",function(Et){return Me.emit("userUpdated",Et)}),this._services.users.on("userUnsubscribed",function(Et){Me.emit("userUnsubscribed",Et)}),this._conversationsEntity=new ri(this._configuration,this._services),this._conversationsEntity.on("conversationAdded",function(Et){Me.emit("conversationAdded",Et)}),this._conversationsEntity.on("conversationRemoved",function(Et){Me.emit("conversationRemoved",Et)}),this._conversationsEntity.on("conversationJoined",function(Et){Me.emit("conversationJoined",Et)}),this._conversationsEntity.on("conversationLeft",function(Et){Me.emit("conversationLeft",Et)}
1),this._conversationsEntity.on("conversationUpdated",function(Et){return Me.emit("conversationUpdated",Et)}),this._conversationsEntity.on("participantJoined",function(Et){Me.emit("participantJoined",Et)}),this._conversationsEntity.on("participantLeft",function(Et){Me.emit("participantLeft",Et)}),this._conversationsEntity.on("participantUpdated",function(Et){return Me.emit("participantUpdated",Et)}),this._conversationsEntity.on("messageAdded",function(Et){return Me.emit("messageAdded",Et)}),this._conversationsEntity.on("messageUpdated",function(Et){return Me.emit("messageUpdated",Et)}),this._conversationsEntity.on("messageRemoved",function(Et){return Me.emit("messageRemoved",Et)}),this._conversationsEntity.on("typingStarted",function(Et){return Me.emit("typingStarted",Et)}),this._conversationsEntity.on("typingEnded",function(Et){return Me.emit("typingEnded",Et)}),this._conversationsPromise=this._conversationsEntity.fetchConversations().then(function(){return Me._conversationsEntity}).catch(function(Et){throw Et}),tt.next=30,this._services.users.myself._ensureFetched();case 30:Ci._supportedPushChannels.forEach(function(Et){return Me._subscribeToPushNotifications(Et)}),this._services.typingIndicator.initialize(),this._services.mcsClient=new Ne.McsClient(this._fpaToken,this._configuration.links.mediaService,this._configuration.links.mediaSetService,fs(fs({},this._options),{},{transport:void 0})),this._resolveEnsureReady(),this.emit(Ci.stateChanged,"initialized"),this.emit(Ci.initialized);case 36:case"end":return tt.stop()}},qe,this)}));return function oe(){return be.apply(this,arguments)}}()},{key:"_subscribeToPushNotifications",value:function(oe){var qe=this;[vn.NEW_MESSAGE,vn.ADDED_TO_CONVERSATION,vn.REMOVED_FROM_CONVERSATION,vn.TYPING_INDICATOR,vn.CONSUMPTION_UPDATE].forEac
1h(function(Me){qe._services.notificationClient.subscribe(oe,Me)})}},{key:"_unsubscribeFromPushNotifications",value:function(oe){var qe=this;[vn.NEW_MESSAGE,vn.ADDED_TO_CONVERSATION,vn.REMOVED_FROM_CONVERSATION,vn.TYPING_INDICATOR,vn.CONSUMPTION_UPDATE].forEach(function(Me){qe._services.notificationClient.unsubscribe(oe,Me)})}}],[{key:"create",value:function(){var be=W.default(K.default.mark(function qe(Me,Ce){var Ke;return K.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(null==Ce||!Ce.twilsockClient){Et.next=2;break}throw new Error("Obsolete usage of ConversationsClient.create() factory method: if you pass twilsock from the outside then you must use ConversationsClient constructor and be prepared to work with uninitialized client.");case 2:return Ke=new Ci(Me,Ce),Et.next=5,Ke._ensureReady;case 5:return Et.abrupt("return",Ke);case 6:case"end":return Et.stop()}},qe)}));return function oe(qe,Me){return be.apply(this,arguments)}}()},{key:"parsePushNotification",value:function(oe){if(Ci._logger.debug("parsePushNotification, notificationPayload=",oe),typeof oe.aps<"u"){if(!oe.twi_message_type)throw new Error("Provided push notification payload does not contain Programmable Chat push notification type");var Ce,tt,Et,qe=Ci._parsePushNotificationChatData(oe),Me=oe.aps,Ke=null;return"string"==typeof Me.alert?Ce=Me.alert||null:(Ce=(null===(tt=Me.alert)||void 0===tt?void 0:tt.body)||null,Ke=(null===(Et=Me.alert)||void 0===Et?void 0:Et.title)||null),new _t({title:Ke,body:Ce,sound:Me.sound||null,badge:Me.badge||null,action:Me.category||null,type:oe.twi_message_type,data:qe})}if(typeof oe.data<"u"){var Vn=oe.data;if(!Vn.twi_message_type)throw new Error("Provided push notification payload does not contain Programmable Chat push notification type");var Gn=Ci._parsePushNotificationChatData(oe.data);return new _t({title:Vn.twi_title||null,body:Vn.twi_body||null,sound:Vn.twi_sound||null,badge:null,action:Vn.twi_action||null,type:Vn.twi_message_type,data:Gn})}throw new Error("Provided push notification payload is not Programmable Chat notification")}},{key:"_parsePushNotificationChatData",value:function(oe){var qe={};for(var Me in Ci._supportedPushDataFields){var Ce=oe[Me];if(!(typeof Ce>"u"||null===Ce)){if("message_index"===Me||"media_count"===Me){var Ke=Vr(Ce);null!==Ke&&(qe[Ci._supportedPushDataFields[Me]]=Ke);continue}if("media"===Me){if("string"==typeof Ce)try{qe[Ci._supportedPushDataFields[Me]]=JSON.parse(Ce)}catch{Ci._logger.debug("Media message notification parsing error")}continue}qe[Ci._supportedPushDataFields[Me]]=Ce}}return qe}},{key:"populateInitRegistrations",value:function(oe){oe.populateInitRegistrations([vn.TYPING_INDICATOR]),Ve.SyncClient.populateInitRegistrations(oe)}}]),Je}(de.ReplayEventEmitter),ue.default(Oi,"conversationAdded","conversationAdded"),ue.default(Oi,"conversationJoined","conversationJoined"),ue.default(Oi,"conversationLeft","conversationLeft"),ue.default(Oi,"conversationRemoved","conversationRemoved"),ue.default(Oi,"conversationUpdated","conversationUpdated"),ue.default(Oi,"participantJoined","participantJoined"),ue.default(Oi,"participantLeft","participantLeft"),ue.default(Oi,"participantUpdated","participantUpdated"),ue.default(Oi,"messageAdded","messageAdded"),ue.default(Oi,"messageRemoved","messageRemoved"),ue.default(Oi,"messageUpdated","messageUpdated"),ue.default(Oi,"tokenAboutToExpire","tokenAboutToExpire"),ue.default(Oi,"tokenExpired","tokenExpired"),ue.default(Oi,"typingEnded","typingEnded"),ue.default(Oi,"typingStarted","typingStarted"),ue.default(Oi,"pushNotification","pushNotification"),ue.default(Oi,"userSubscribed","userSubscribed"),ue.default(Oi,"userUnsubscribed","userUnsubscribed"),ue.default(Oi,"userUpdated","userUpdated"),ue.default(Oi,"stateChanged","stateChanged"),ue.default(Oi,"initialized","initialized"),ue.default(Oi,"initFailed","initFailed"),ue.default(Oi,"connectionStateChanged","connectionStateChanged"),ue.default(Oi,"connectionError","connectionError"),ue.default(Oi,"version",hn),ue.default(Oi,"_logger",rn.scope("Client")),ue.default(Oi,"_supportedPushChannels",["fcm","a
1pn"]),ue.default(Oi,"_supportedPushDataFields",{conversation_sid:"conversationSid",conversation_title:"conversationTitle",message_sid:"messageSid",message_index:"messageIndex",media_count:"mediaCount",media:"media"}),Ci=Oi),He([Ie.deprecated("token"),ge("design:type",String),ge("design:paramtypes",[])],G.QP.prototype,"token",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],G.QP.prototype,"updateToken",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],G.QP.prototype,"getConversationBySid",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],G.QP.prototype,"peekConversationBySid",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],G.QP.prototype,"getConversationByUniqueName",null),He([Q.validateTypesAsync(["undefined",Q.objectSchema("conversation options",{friendlyName:["string","undefined"],isPrivate:["boolean","undefined"],uniqueName:["string","undefined"]})]),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],G.QP.prototype,"createConversation",null),He([Q.validateTypesAsync(Q.literal("fcm","apn"),"string"),ge("design:type",Function),ge("design:paramtypes",[String,String]),ge("design:returntype",Promise)],G.QP.prototype,"setPushRegistrationId",null),He([Q.validateTypesAsync(Q.literal("fcm","apn")),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],G.QP.prototype,"unsetPushRegistrationId",null),He([Q.validateTypesAsync(Q.literal("fcm","apn"),Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String,String]),ge("design:returntype",Promise)],G.QP.prototype,"removePushRegistrations",null),He([Q.validateTypesAsync(Q.pureObject),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",Promise)],G.QP.prototype,"handlePushNotification",null),He([Q.validateTypesAsync(Q.nonEmptyString),ge("design:type",Function),ge("design:paramtypes",[String]),ge("design:returntype",Promise)],G.QP.prototype,"getUser",null),He([Q.validateTypesAsync(Q.nonEmptyArray("strings","string")),ge("design:type",Function),ge("design:paramtypes",[Array]),ge("design:returntype",Ne.CancellablePromise)],G.QP.prototype,"getTemporaryContentUrlsForMediaSids",null),He([Q.validateTypesAsync(Q.nonEmptyArray("media",dn)),ge("design:type",Function),ge("design:paramtypes",[Array]),ge("design:returntype",Ne.CancellablePromise)],G.QP.prototype,"getTemporaryContentUrlsForMedia",null),He([Ie.deprecated("Client.create()","new Client()"),Q.validateTypesAsync("string",["undefined",Q.pureObject]),ge("design:type",Function),ge("design:paramtypes",[String,Object]),ge("design:returntype",Promise)],G.QP,"create",null),He([Q.validateTypes(Q.pureObject),ge("design:type",Function),ge("design:paramtypes",[Object]),ge("design:returntype",_t)],G.QP,"parsePushNotification",null),G.QP=Ci=He([Q.validateConstructorTypes(Q.nonEmptyString,[Q.pureObject,"undefined"]),ge("design:paramtypes",[String,Object])],G.QP)},64632:(B,G,a)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),a(32928),a(49640),a(29912),a(48928),a(12644),a(42984),a(53475),a(35016),a(16968),a(89120),a(29708);var i=a(59848);a(51408);var v=a(97936);a(4248),a(30256),a(62016);var b=a(25724),_=a(66024),C=a(94064),P=a(54216),S=a(96284),R=a(63532);function k(dt){return dt&&"object"==typeof dt&&"default"in dt?dt:{default:dt}}a(32452),a(79628),a(16699),a(97355),a(9456),a(91088);var x=k(i),D=k(v),ee=k(b),te=k(_),J=k(C),Q=k(P),we=k(S),de=k(R),Y=function(){for(var lt=arguments.length,rt=new Array(lt),kt=0;kt<lt;kt++)rt[kt]=arguments[kt];return{checks:rt}};function pe(dt,lt){(null==lt||lt>dt.length)&&(lt=dt.length);for(var rt=0,kt=new Array(lt);rt<lt;rt++)kt[rt]=dt[rt];return kt}var ae=function(){for(var lt=arguments.length,rt=new Array(lt),kt=0;kt<lt;kt++)rt[kt]=arguments[kt];return Y(function(an){var Fn,Yn=!1,bn=[],Hn=function Se(dt,lt){var rt=typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(!rt){if(Array.isArray(dt)||(rt=function Ye(dt,lt){if(dt){if("string"==typeof dt)return pe(dt,lt);var rt=Object.prototype.toString.call(dt).slice(8,-1);if("Object"===rt&&dt.constructor&&(rt=dt.constructor.name),"Map"===rt||"Set"===rt)return Array.from(dt);if("Arguments"===rt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return pe(dt,lt)}}(dt))||lt&&dt&&"number"==typeof dt.length){rt&&(dt=rt);var kt=0,an=function(){};return{s:an,n:function(){return kt>=dt.length?{done:!0}:{done:!1,value:dt[kt++]}},e:function(On){throw On},f:an}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Hn,Yn=!0,bn=!1;return{s:function(){rt=rt.call(dt)},n:function(){var On=rt.next();return Yn=On.done,On},e:function(On){bn=!0,Hn=On},f:function(){try{!Yn&&null!=rt.return&&rt.return()}finally{if(bn)throw Hn}}}}(rt);try{for(Hn.s();!(Fn=Hn.n()).done;){var On=Fn.value;"string"!=typeof On?(Yn=Yn||an instanceof On,bn.push("an instance of ".concat(On.name))):(Yn=Yn||x.default(an)===On,bn.push("of type ".concat(On)))}}catch(gr){Hn.e(gr)}finally{Hn.f()}return[Yn,bn]})};function Ie(dt,lt){(null==lt||lt>dt.length)&&(lt=dt.length);for(var rt=0,kt=new Array(lt);rt<lt;rt++)kt[rt]=dt[rt];return kt}function Le(dt,lt){var rt=typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(!rt){if(Array.isArray(dt)||(rt=function W(dt,lt){if(dt){if("string"==typeof dt)return We(dt,lt);var rt=Object.prototype.toString.call(dt).slice(8,-1);if("Object"===rt&&dt.constructor&&(rt=dt.constructor.name),"Map"===rt||"Set"===rt)return Array.from(dt);if("Arguments"===rt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return We(dt,lt)}}(dt))||lt&&dt&&"number"==typeof dt.length){rt&&(dt=rt);var kt=0,an=function(){};return{s:an,n:function(){return kt>=dt.length?{done:!0}:{done:!1,value:dt[kt++]}},e:function(On){throw On},f:an}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Hn,Yn=!0,bn=!1;return{s:function(){rt=rt.call(dt)},n:function(){var On=rt.next();return Yn=On.done,On},e:function(On){bn=!0,Hn=On},f:function(){try{!Yn&&null!=rt.return&&rt.return()}finally{if(bn)throw Hn}}}}function We(dt,lt){(null==lt||lt>dt.length)&&(lt=dt.length);for(var rt=0,kt=new Array(lt);rt<lt;rt++)kt[rt]=dt[rt];return kt}var At=function(lt,rt){if(rt.length>lt.length)throw new Error("Expected at most ".concat(lt.length," argument(s), but got ").concat(rt.length));for(;rt.length<lt.length;)rt.push(void 0);var an,kt=Le(rt.entries());try{for(kt.s();!(an=kt.n()).done;){var Yn=D.default(an.value,2),bn=Yn[0],Fn=_e(lt[bn],Yn[1]),On=D.default(Fn,4),Mr=On[1],Vr=On[2],Fr=On[3];if(!On[0])throw new Error("Argument ".concat(bn+1," is expected to be ").concat(Vr).concat(Fr," but got ").concat(Mr))}}catch(Nr){kt.e(Nr)}finally{kt.f()}},Ut=function(lt){var rt,kt,Yn;return["undefined","boolean","number","bigint","string"].includes(x.default(lt))&&(kt="string"==typeof lt?'"'.concat(lt,'"'):"".concat(lt)),"object"===x.default(lt)&&"Object"!==(null==lt||null===(rt=lt.constructor)||void 0===rt?void 0:rt.name)&&(kt=null===lt?"null":"instance of ".concat(null==lt||null===(Yn=lt.constructor)||void 0===Yn?void 0:Yn.name)),kt||(kt=x.default(lt)),kt},ce=function(lt){var an,rt=[],kt=Le(lt);try{for(kt.s();!(an=kt.n()).done;)rt.push(K(an.value))}catch(bn){kt.e(bn)}finally{kt.f()}return rt},K=function(lt){var Yn,rt=[],an=Le(Array.isArray(lt)?lt:[lt]);try{for(an.s();!(Yn=an.n()).done;){var bn=Yn.value;rt.push("string"!=typeof bn&&"function"!=typeof bn?bn:ae(bn))}}catch(Hn){an.e(Hn)}finally{an.f()}return rt},_e=function(lt,rt){var an,Hn,kt=[],Yn=!1,bn=Le(lt);try{for(bn.s();!(Hn=bn.n()).done;){var gr,On=Le(Hn.value.checks);try{for(On.s();!(gr=On.n()).done;){var Vr=(0,gr.value)(rt),Fr=D.default(Vr,3),Nr=Fr[1],Kr=Fr[2];Yn=Yn||Fr[0],!an&&Kr&&(an=Kr),Nr&&(kt=[].concat(ee.default(kt),"string"==typeof Nr?[Nr]:ee.default(Nr)))}}catch(zr){On.e(zr)}finally{On.f()}}}catch(zr){bn.e(zr)}finally{bn.f()}if(Yn)return[!0];var Jr=an||Ut(rt),sr=kt.length-1;return[!1,Jr,sr>0?"".concat(kt.slice(0,sr).join(", ")," or ").concat(kt[sr]):kt.join(", "),sr>1?";":","]};function ke(dt,lt){(null==lt||lt>dt.length)&&(lt=dt.length);for(var rt=0,kt=new Array(lt);rt<lt;rt++)kt[rt]=dt[rt];return kt}var Dt=Y(function(dt){return["string"==typeof dt&&dt.length>0,"a non-empty string"]}),He=Y(function(dt){return["number"==typeof dt&&Number.isInteger(dt)&&dt>=0,"a non-negative integer"]}),ge=Y(function(dt){return["object"===x.default(dt)&&null!==dt&&!Array.isArray(dt),"a pure object (non-null and non-array)"]});function cn(dt,lt){(null==lt||lt>dt.length)&&(lt=dt.length);for(var rt=0,kt=new Array(lt);rt<lt;rt++)kt[rt]=dt[rt];return kt}G.array=function(lt,rt){return Y(function(kt){if(!Array.isArray(kt))return[!1,"an array of ".concat(lt)];var Yn,an=function pt(dt,lt){var rt=typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(!rt){if(Array.isArray(dt)||(rt=function rn(dt,lt){if(dt){if("string"==typeof dt)return cn(dt,lt);var rt=Object.prototype.toString.call(dt).slice(8,-1);if("Object"===rt&&dt.constructor&&(rt=dt.constructor.name),"Map"===rt||"Set"===rt)return Array.from(dt);if("Arguments"===rt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return cn(dt,lt)}}(dt))||lt&&dt&&"number"==typeof dt.length){rt&&(dt=rt);var kt=0,an=function(){};return{s:an,n:function(){return kt>=dt.length?{done:!0}:{done:!1,value:dt[kt++]}},e:function(On){throw On},f:an}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Hn,Yn=!0,bn=!1;return{s:function(){rt=rt.call(dt)},n:function(){var On=rt.next();return Yn=On.done,On},e:function(On){bn=!0,Hn=On},f:function(){try{!Yn&&null!=rt.return&&rt.return()}finally{if(bn)throw Hn}}}}(kt.entries());try{for(an.s();!(Yn=an.n()).done;){var bn=D.default(Yn.value,2),Hn=bn[0],Fn=bn[1],On=_e(K(rt),Fn),gr=D.default(On,3),Vr=gr[1],Fr=gr[2];if(!gr[0])return[!1,"a valid array of ".concat(lt," (index ").concat(Hn," should be ").concat(Fr,")"),"malformed array of ".concat(lt," (index ").concat(Hn," is ").concat(Vr,")")]}}catch(ti){an.e(ti)}finally{an.f()}return[!0]})},G.custom=Y,G.literal=function(){for(var lt=arguments.length,rt=new Array(lt),kt=0;kt<lt;kt++)rt[kt]=arguments[kt];return Y(function(an){var Fn,Yn=!1,bn=[],Hn=function Ve(dt,lt){var rt=typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(!rt){if(Array.isArray(dt)||(rt=function Ne(dt,lt){if(dt){if("string"==typeof dt)return Ie(dt,lt);var rt=Object.prototype.toString.call(dt).slice(8,-1);if("Object"===rt&&dt.constructor&&(rt=dt.constructor.name),"Map"===rt||"Set"===rt)return Array.from(dt);if("Arguments"===rt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return Ie(dt,lt)}}(dt))||lt&&dt&&"number"==typeof dt.length){rt&&(dt=rt);var kt=0,an=function(){};return{s:an,n:function(){return kt>=dt.length?{done:!0}:{done:!1,value:dt[kt++]}},e:function(On){throw On},f:an}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Hn,Yn=!0,bn=!1;return{s:function(){rt=rt.call(dt)},n:function(){var On=rt.next();return Yn=On.done,On},e:function(On){bn=!0,Hn=On},f:function(){try{!Yn&&null!=rt.return&&rt.return()}finally{if(bn)throw Hn}}}}(rt);try{for(Hn.s();!(Fn=Hn.n()).done;){var On=Fn.value;Yn=Yn||an===On,bn.push("string"==typeof On?'"'.concat(On,'"'):"".concat(On))}}catch(gr){Hn.e(gr)}finally{Hn.f()}return[Yn,bn]})},G.nonEmptyArray=function(lt,rt){return Y(function(kt){if(!Array.isArray(kt)||kt.length<1)return[!1,"a non-empty array of ".concat(lt)];var Yn,an=function Pe(dt,lt){var rt=typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(!rt){if(Array.isArray(dt)||(rt=function De(dt,lt){if(dt){if("string"==typeof dt)return ke(dt,lt);var rt=Object.prototype.toString.call(dt).slice(8,-1);if("Object"===rt&&dt.constructor&&(rt=dt.constructor.name),"Map"===rt||"Set"===rt)return Array.from(dt);if("Arguments"===rt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(rt))return ke(dt,lt)}}(dt))||lt&&dt&&"number"==typeof dt.length){rt&&(dt=rt);var kt=0,an=function(){};return{s:an,n:function(){return kt>=dt.length?{done:!0}:{done:!1,value:dt[kt++]}},e:function(On){throw On},f:an}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Hn,Yn=!0,bn=!1;return{s:function(){rt=rt.call(dt)},n:function(){var On=rt.next();return Yn=On.done,On},e:function(On){bn=!0,Hn=On},f:function(){try{!Yn&&null!=rt.return&&rt.return()}finally{if(bn)throw Hn}}}}(kt.entries());try{for(an.s();!(Yn=an.n()).done;){var bn=D.default(Yn.value,2),Hn=bn[0],Fn=bn[1],On=_e(K(rt),Fn),gr=D.default(On,3),Vr=gr[1],Fr=gr[2];if(!gr[0])return[!1,"a valid non-empty array of ".concat(lt," (index ").concat(Hn," should be ").concat(Fr,")"),"malformed array of ".concat(lt," (index ").concat(Hn," is ").concat(Vr,")")]}}catch(ti){an.e(ti)}finally{an.f()}return[!0]})},G.nonEmptyString=Dt,G.nonNegativeInteger=He,G.objectSchema=function(lt,rt){return Y(function(kt){if("object"!==x.default(kt)||null===kt||Array.isArray(kt))return[!1,"valid ".concat(lt," (should be a pure object)")];for(var an=0,Yn=Object.entries(rt);an<Yn.length;an++){var bn=D.default(Yn[an],2),Hn=bn[0],On=_e(K(bn[1]),kt[Hn]),gr=D.default(On,3),Vr=gr[1],Fr=gr[2];if(!gr[0])return[!1,"valid ".concat(lt,' (key "').concat(Hn,'" should be ').concat(Fr,")"),"malformed ".concat(lt,' (key "').concat(Hn,'" is ').concat(Vr,")")]}return[!0]})},G.pureObject=ge,G.runtimeTypeValidation=At,G.stringifyReceivedType=Ut,G.type=ae,G.validateConstructorTypes=function(){for(var lt=arguments.length,rt=new Array(lt),kt=0;kt<lt;kt++)rt[kt]=arguments[kt];var an=ce(rt);return function(Yn){return function(bn){Q.default(Fn,bn);var Hn=function j(dt){var lt=function ye(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var an,kt=de.default(dt);if(lt){var Yn=de.default(this).constructor;an=Reflect.construct(kt,arguments,Yn)}else an=kt.apply(this,arguments);return we.default(this,an)}}(Fn);function Fn(){J.default(this,Fn);for(var On=arguments.length,gr=new Array(On),Mr=0;Mr<On;Mr++)gr[Mr]=arguments[Mr];return At(an,gr),Hn.call.apply(Hn,[this].concat(gr))}return te.default(Fn)}(Yn)}},G.validateTypes=function(){for(var lt=arguments.length,rt=new Array(lt),kt=0;kt<lt;kt++)rt[kt]=arguments[kt];var an=ce(rt);return function(Yn,bn,Hn){if("function"!=typeof Hn.value)throw new Error("The validateTypes decorator can only be applied to methods");var Fn=Hn.value;Hn.value=function(){for(var On=arguments.length,gr=new Array(On),Mr=0;Mr<On;Mr++)gr[Mr]=arguments[Mr];return At(an,gr),Fn.apply(this,gr)}}},G.validateTypesAsync=function(){for(var lt=arguments.length,rt=new Array(lt),kt=0;kt<lt;kt++)rt[kt]=arguments[kt];var an=ce(rt);return function(Yn,bn,Hn){if("function"!=typeof Hn.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var Fn=Hn.value;Hn.value=function(){for(var On=arguments.length,gr=new Array(On),Mr=0;Mr<On;Mr++)gr[Mr]=arguments[Mr];try{At(an,gr)}catch(Vr){return Promise.reject(Vr)}return Fn.apply(this,gr)}}}},9312:(B,G,a)=>{"use strict";function v(P){return P&&"object"==typeof P&&"default"in P?P:{default:P}}
1Object.defineProperty(G,"__esModule",{value:!0}),a(4248);var b=v(a(3516)),C=function(S){var R=b.default.getLevel();b.default.setLevel("warn"),b.default.warn(S),b.default.setLevel(R)};G.deprecated=function(S,R,k){return function(x,D,ee){if("function"!=typeof ee.value&&void 0===ee?.get)throw new Error("The deprecated decorator can only be applied to methods or getters");if("function"!=typeof ee.value){var J=ee.get;ee.get=function(){return C("The getter ".concat(S," is deprecated").concat(R?", use "+R+" instead":"").concat(k?", "+k:".")),J?.apply(this)}}else{var te=ee.value;ee.value=function(){C("The method ".concat(S," is deprecated").concat(R?", use "+R+" instead":"").concat(k?", "+k:"."));for(var Q=arguments.length,we=new Array(Q),de=0;de<Q;de++)we[de]=arguments[de];return te.apply(this,we)}}}},G.deprecationWarning=C},3516:function(B,G,a){var i,v;!function(b,_){"use strict";i=function(){var b=function(){},_="undefined",C=typeof window!==_&&typeof window.navigator!==_&&/Trident\/|MSIE /.test(window.navigator.userAgent),P=["trace","debug","info","warn","error"];function S(de,Y){var Se=de[Y];if("function"==typeof Se.bind)return Se.bind(de);try{return Function.prototype.bind.call(Se,de)}catch{return function(){return Function.prototype.apply.apply(Se,[de,arguments])}}}function R(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function x(de,Y){for(var Se=0;Se<P.length;Se++){var Ye=P[Se];this[Ye]=Se<de?b:this.methodFactory(Ye,de,Y)}this.log=this.debug}function D(de,Y,Se){return function(){typeof console!==_&&(x.call(this,Y,Se),this[de].apply(this,arguments))}}function ee(de,Y,Se){return function k(de){return"debug"===de&&(de="log"),typeof console!==_&&("trace"===de&&C?R:void 0!==console[de]?S(console,de):void 0!==console.log?S(console,"log"):b)}(de)||D.apply(this,arguments)}function te(de,Y,Se){var pe,Ye=this;Y=Y??"WARN";var ae="loglevel";function Ne(){var j;if(typeof window!==_&&ae){try{j=window.localStorage[ae]}catch{}if(typeof j===_)try{var ye=window.document.cookie,Le=ye.indexOf(encodeURIComponent(ae)+"=");-1!==Le&&(j=/^([^;]+)/.exec(ye.slice(Le))[1])}catch{}return void 0===Ye.levels[j]&&(j=void 0),j}}"string"==typeof de?ae+=":"+de:"symbol"==typeof de&&(ae=void 0),Ye.name=de,Ye.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Ye.methodFactory=Se||ee,Ye.getLevel=function(){return pe},Ye.setLevel=function(j,ye){if("string"==typeof j&&void 0!==Ye.levels[j.toUpperCase()]&&(j=Ye.levels[j.toUpperCase()]),!("number"==typeof j&&j>=0&&j<=Ye.levels.SILENT))throw"log.setLevel() called with invalid level: "+j;if(pe=j,!1!==ye&&function Ve(j){var ye=(P[j]||"silent").toUpperCase();if(typeof window!==_&&ae){try{return void(window.localStorage[ae]=ye)}catch{}try{window.document.cookie=encodeURIComponent(ae)+"="+ye+";"}catch{}}}(j),x.call(Ye,j,de),typeof console===_&&j<Ye.levels.SILENT)return"No console available for logging"},Ye.setDefaultLevel=function(j){Y=j,Ne()||Ye.setLevel(j,!1)},Ye.resetLevel=function(){Ye.setLevel(Y,!1),function Ie(){if(typeof window!==_&&ae){try{return void window.localStorage.removeItem(ae)}catch{}try{window.document.cookie=encodeURIComponent(ae)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},Ye.enableAll=function(j){Ye.setLevel(Ye.levels.TRACE,j)},Ye.disableAll=function(j){Ye.setLevel(Ye.levels.SILENT,j)};var H=Ne();null==H&&(H=Y),Ye.setLevel(H,!1)}var J=new te,Q={};J.getLogger=function(Y){if("symbol"!=typeof Y&&"string"!=typeof Y||""===Y)throw new TypeError("You must supply a name when creating a logger.");var Se=Q[Y];return Se||(Se=Q[Y]=new te(Y,J.getLevel(),J.methodFactory)),Se};var we=typeof window!==_?window.log:void 0;return J.noConflict=function(){return typeof window!==_&&window.log===J&&(window.log=we),J},J.getLoggers=function(){return Q},J.default=J,J},void 0!==(v=i.call(G,a,G,B))&&(B.exports=v)}()},61248:(B,G,a)=>{"use strict";var i=typeof i<"u"?i:typeof self<"u"?self:typeof window<"u"?window:{};Object.defineProperty(G,"__esModule",{value:!0}),a(30256),a(62016);var v=a(94064),b=a(66024),_=a(54216),C=a(96284),P=a(63532),S=a(60764),R=a(2676);a(49640),a(79628),a(89120),a(85607),a(48928),a(29708);var k=a(1196),x=a(33248);a(4248),a(76568),a(82984);var D=a(59848);a(29912);var ee=a(43752);a(68392),a(31956),a(12644),a(2808),a(54004),a(16699),a(32928),a(16760),a(78235),a(544),a(34088);var te=a(58416),J=a(64632);function Q(jt){return jt&&"object"==typeof jt&&"default"in jt?jt:{default:jt}}
1function we(jt){if(jt&&jt.__esModule)return jt;var Ct=Object.create(null);return jt&&Object.keys(jt).forEach(function(Mt){if("default"!==Mt){var Ze=Object.getOwnPropertyDescriptor(jt,Mt);Object.defineProperty(Ct,Mt,Ze.get?Ze:{enumerable:!0,get:function(){return jt[Mt]}})}}),Ct.default=jt,Object.freeze(Ct)}var de=Q(v),Y=Q(b),Se=Q(_),Ye=Q(C),pe=Q(P),ae=Q(S),Ve=Q(R),Ne=Q(k),Ie=Q(x),H=Q(D),j=we(ee),ye={exports:{}},Le=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(Le){var W=new Uint8Array(16);ye.exports=function(){return Le(W),W}}else{var We=new Array(16);ye.exports=function(){for(var Mt,Ct=0;Ct<16;Ct++)3&Ct||(Mt=4294967296*Math.random()),We[Ct]=Mt>>>((3&Ct)<<3)&255;return We}}for(var At=[],Ut=0;Ut<256;++Ut)At[Ut]=(Ut+256).toString(16).substr(1);var K,_e,ue=function it(jt,Ct){var Mt=Ct||0;return[At[jt[Mt++]],At[jt[Mt++]],At[jt[Mt++]],At[jt[Mt++]],"-",At[jt[Mt++]],At[jt[Mt++]],"-",At[jt[Mt++]],At[jt[Mt++]],"-",At[jt[Mt++]],At[jt[Mt++]],"-",At[jt[Mt++]],At[jt[Mt++]],At[jt[Mt++]],At[jt[Mt++]],At[jt[Mt++]],At[jt[Mt++]]].join("")},se=ye.exports,ce=ue,Pe=0,De=0,Dt=ye.exports,He=ue,rn=function ge(jt,Ct,Mt){var Ze=Ct&&Mt||0;"string"==typeof jt&&(Ct="binary"===jt?new Array(16):null,jt=null);var et=(jt=jt||{}).random||(jt.rng||Dt)();if(et[6]=15&et[6]|64,et[8]=63&et[8]|128,Ct)for(var Zt=0;Zt<16;++Zt)Ct[Ze+Zt]=et[Zt];return Ct||He(et)},cn=rn;cn.v1=function ke(jt,Ct,Mt){var Ze=Ct&&Mt||0,et=Ct||[],Zt=(jt=jt||{}).node||K,Fe=void 0!==jt.clockseq?jt.clockseq:_e;if(null==Zt||null==Fe){var ft=se();null==Zt&&(Zt=K=[1|ft[0],ft[1],ft[2],ft[3],ft[4],ft[5]]),null==Fe&&(Fe=_e=16383&(ft[6]<<8|ft[7]))}var dn=void 0!==jt.msecs?jt.msecs:(new Date).getTime(),Tn=void 0!==jt.nsecs?jt.nsecs:De+1,Bn=dn-Pe+(Tn-De)/1e4;if(Bn<0&&void 0===jt.clockseq&&(Fe=Fe+1&16383),(Bn<0||dn>Pe)&&void 0===jt.nsecs&&(Tn=0),Tn>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Pe=dn,De=Tn,_e=Fe;var mr=(1e4*(268435455&(dn+=122192928e5))+Tn)%4294967296;et[Ze++]=mr>>>24&255,et[Ze++]=mr>>>16&255,et[Ze++]=mr>>>8&255,et[Ze++]=255&mr;var tr=dn/4294967296*1e4&268435455;et[Ze++]=tr>>>8&255,et[Ze++]=255&tr,et[Ze++]=tr>>>24&15|16,et[Ze++]=tr>>>16&255,et[Ze++]=Fe>>>8|128,et[Ze++]=255&Fe;for(var Ir=0;Ir<6;++Ir)et[Ze+Ir]=Zt[Ir];return Ct||ce(et)},cn.v4=rn;var mn=cn;var rt=function(jt){Se.default(Mt,jt);var Ct=function dt(jt){var Ct=function lt(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var et,Ze=pe.default(jt);if(Ct){var Zt=pe.default(this).constructor;et=Reflect.construct(Ze,arguments,Zt)}else et=Ze.apply(this,arguments);return Ye.default(this,et)}}(Mt);function Mt(Ze){var et;de.default(this,Mt);var Fe,Zt=mn.v4();return(et=Ct.call(this,function(ft,dn){return Fe=dn,Ze(function(Tn){Mt.cancellationMap.delete(Zt),ft(Tn)},function(Tn){Mt.cancellationMap.delete(Zt),dn(Tn)},function(Tn){Mt.cancellationMap.set(Zt,Tn)})})).id=Zt,et.rejectPromise=Fe,et}return Y.default(Mt,[{key:"cancel",value:function(){var et=Mt.cancellationMap.get(this.id);return et?.(),this.rejectPromise&&(this.catch(function(){}),this.rejectPromise(new Error("Promise was cancelled"))),this}}]),Mt}(ae.default(Promise));function kt(jt,Ct,Mt,Ze){var Fe,et=arguments.length,Zt=et<3?Ct:null===Ze?Ze=Object.getOwnPropertyDescriptor(Ct,Mt):Ze;if("object"===(typeof Reflect>"u"?"undefined":H.default(Reflect))&&"function"==typeof Reflect.decorate)Zt=Reflect.decorate(jt,Ct,Mt,Ze);else for(var ft=jt.length-1;ft>=0;ft--)(Fe=jt[ft])&&(Zt=(et<3?Fe(Zt):et>3?Fe(Ct,Mt,Zt):Fe(Ct,Mt))||Zt);return et>3&&Zt&&Object.defineProperty(Ct,Mt,Zt),Zt}function an(jt,Ct){if("object"===(typeof Reflect>"u"?"undefined":H.default(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(jt,Ct)}function Yn(jt,Ct){return["".concat((new Date).toISOString()," MCS Client ").concat(jt,":")].concat(Array.from(Ct))}Ve.default(rt,"cancellationMap",new Map);var bn=function(){function jt(Ct){de.default(this,jt),Ve.default(this,"prefix",""),this.prefix=null!=Ct&&Ct.length>0?Ct+" ":""}return Y.default(jt,[{key:"setLevel",value:function(Mt){j.setLevel(Mt)}
1},{key:"trace",value:function(){if(j.getLevel()==j.levels.TRACE){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.debug.apply(null,Yn(this.prefix+"T",Ze))}}},{key:"debug",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.debug.apply(null,Yn(this.prefix+"D",Ze))}},{key:"info",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.info.apply(null,Yn(this.prefix+"I",Ze))}},{key:"warn",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.warn.apply(null,Yn(this.prefix+"W",Ze))}},{key:"error",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.error.apply(null,Yn(this.prefix+"E",Ze))}}],[{key:"scope",value:function(Mt){return new jt(Mt)}},{key:"setLevel",value:function(Mt){j.setLevel(Mt)}},{key:"trace",value:function(){if(j.getLevel()==j.levels.TRACE){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.debug.apply(null,Yn("T",Ze))}}},{key:"debug",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.debug.apply(null,Yn("D",Ze))}},{key:"info",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.info.apply(null,Yn("I",Ze))}},{key:"warn",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.warn.apply(null,Yn("W",Ze))}},{key:"error",value:function(){for(var Mt=arguments.length,Ze=new Array(Mt),et=0;et<Mt;et++)Ze[et]=arguments[et];j.error.apply(null,Yn("E",Ze))}}]),jt}(),Fr=function(Ct,Mt){return"".concat(function(Ct){return Ct.startsWith("http")}(Ct)?"":function(Ct){return"https://mcs.".concat(Ct??"us1",".twilio.com")}(Mt)).concat(Ct)},ti=function(){function jt(Ct,Mt,Ze,et){var Zt,Fe,ft,dn,Tn,Bn;de.default(this,jt);var mr=null!==(Zt=null!==(Fe=et.MCS)&&void 0!==Fe?Fe:et)&&void 0!==Zt?Zt:{};this.region=null!==(ft=null!==(dn=mr.region)&&void 0!==dn?dn:et.region)&&void 0!==ft?ft:"us1",this.mediaUrl=Fr(Mt,this.region),this.mediaSetUrl=Ze?Fr(Ze):"".concat(this.mediaUrl,"Set"),this.token=Ct,this.retryWhenThrottledOverride=null===(Tn=mr.retryWhenThrottledOverride)||void 0===Tn||Tn,this.backoffConfigOverride=null!==(Bn=mr.backoffConfigOverride)&&void 0!==Bn?Bn:jt.backoffConfigDefault}return Y.default(jt,[{key:"updateToken",value:function(Mt){this.token=Mt}}],[{key:"backoffConfigDefault",get:function(){return{min:1e3,max:4e3,maxAttemptsCount:3}}},{key:"retryWhenThrottledDefault",get:function(){return!0}}]),jt}(),Nr=function(){function jt(Ct,Mt,Ze){de.default(this,jt),this.config=Ct,this.network=Mt,this._update(Ze)}return Y.default(jt,[{key:"sid",get:function(){return this.state.sid}},{key:"serviceSid",get:function(){return this.state.serviceSid}},{key:"dateCreated",get:function(){return this.state.dateCreated}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"contentType",get:function(){return this.state.contentType}},{key:"size",get:function(){return this.state.size}},{key:"fileName",get:function(){return this.state.filename}},{key:"filename",get:function(){return this.state.filename}},{key:"category",get:function(){return this.state.category}},{key:"getContentUrl",value:function(){var Mt=this;return new rt(function(){var Ze=Ne.default(Ie.default.mark(function et(Zt,Fe,ft){var dn;return Ie.default.wrap(function(mr){for(;;)switch(mr.prev=mr.next){case 0:return dn=Mt.network.get("".concat(Mt.config.mediaUrl,"/").concat(Mt.sid)),ft(function(){return dn.cancel()}),mr.prev=2,mr.next=5,dn;case 5:Mt._update(mr.sent.body),Zt(Mt.state.contentDirectUrl),mr.next=13;break;case 10:mr.prev=10,mr.t0=mr.catch(2),Fe(mr.t0);case 13:case"end":return mr.stop()}},et,null,[[2,10]])}));return function(et,Zt,Fe){return Ze.apply(this,arguments)}}())}},{key:"_update",value:function(Mt){var Ze,et,Zt,Fe;this.state={sid:Mt.sid,serviceSid:Mt.service_sid,channelSid:Mt.channel_sid,messageSid:Mt.message_sid,dateCreated:Mt.date_created?new Date(Mt.date_created):null,dateUploadUpdated:Mt.date_upload_updated?new Date(Mt.date_upload_updated):null,dateUpdated:Mt.date_updated?new Date(Mt.date_updated):null,size:Mt.size,contentType:Mt.content_type,author:Mt.author,url:Mt.url,contentUrl:Mt.links.content,contentDirectUrl:null!==(Ze=Mt.links.content_direct_temporary)&&void 0!==Ze?Ze:null,filename:null!==(et=Mt.filename)&&void 0!==et?et:null,category:null!==(Zt=Mt.category)&&void 0!==Zt?Zt:"media",isMultipartUpstream:null!==(Fe=Mt.is_multipart_upstream)&&void 0!==Fe&&Fe}}},{key:"_state",value:function(){var Mt;return{sid:this.state.sid,category:this.state.category,filename:null!==(Mt=this.state.filename)&&void 0!==Mt?Mt:null,contentType:this.state.contentType,size:this.state.size}}}]),jt}();var dr,sr=function(jt){Se.default(Mt,jt);var Ct=function Kr(jt){var Ct=function Jr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var et,Ze=pe.default(jt);if(Ct){var Zt=pe.default(this).constructor;et=Reflect.construct(Ze,arguments,Zt)}else et=Ze.apply(this,arguments);return Ye.default(this,et)}}(Mt);function Mt(Ze,et,Zt,Fe,ft){var dn;return de.default(this,Mt),(dn=Ct.call(this,Ze)).code=et,dn.body=Zt,dn.status=Fe,dn.headers=ft,dn}return Y.default(Mt)}(ae.default(Error)),or=i.XMLHttpRequest||{}
1,Qe=function(){function jt(){de.default(this,jt)}return Y.default(jt,[{key:"get",value:function(Mt,Ze){return jt.request("GET",Mt,Ze)}},{key:"post",value:function(Mt,Ze,et){return jt.request("POST",Mt,Ze,et)}}],[{key:"request",value:function(Mt,Ze,et,Zt){return new rt(function(Fe,ft,dn){var Tn=new or,Bn=!1;for(var mr in dn(function(){Tn.abort(),Bn=!0}),Tn.open(Mt,Ze,!0),Tn.onreadystatechange=function(){if(4===Tn.readyState&&!Bn){var Ir=function zr(jt){return jt?jt.split("\r\n").map(function(Ct){return Ct.split(": ")}).filter(function(Ct){return 2===Ct.length&&Ct[1].length>0}).reduce(function(Ct,Mt){return Ct[Mt[0]]=Mt[1],Ct},{}):{}}(Tn.getAllResponseHeaders()),ur=function sn(jt){var Ct=jt.getResponseHeader("Content-Type");if(!Ct||0!==Ct.indexOf("application/json")||0===jt.responseText.length)return jt.responseText;try{return JSON.parse(jt.responseText)}catch{return jt.responseText}}(Tn);if(200<=Tn.status&&Tn.status<300)Fe({status:Tn.status,headers:Ir,body:ur});else{var Er,Di,Ai=null!==(Er=Tn.statusText)&&void 0!==Er?Er:"NONE";if("string"==typeof ur)if(ur&&1===ur.split("\n",2).length)Di=ur;else{var Pi,nr=null===(Pi=ur.replace(/<.*?>/g,"").split(/\r\n/g).filter(function(Wn){return Wn.length})[0])||void 0===Pi?void 0:Pi.split(" ");Di=nr?.length>2?nr?.slice(1).join(" "):""}else Di=JSON.stringify(ur);var Ht="".concat(Tn.status,": [").concat(Ai,"] ").concat(Di);ft(new sr(Ht,Tn.status,ur,Ai,Ir))}}},et)Tn.setRequestHeader(mr,et[mr]),"Content-Type"===mr&&"application/json"===et[mr]&&(Zt=JSON.stringify(Zt));Tn.send(Zt)})}}]),jt}(),ut=bn.scope("Network"),Xt=function(){function jt(Ct,Mt){de.default(this,jt),this.config=Ct,this.transport=Mt}return Y.default(jt,[{key:"backoffConfig",value:function(){return Object.assign(ti.backoffConfigDefault,this.config.backoffConfigOverride)}},{key:"retryWhenThrottled",value:function(){var Mt,Ze;return null!==(Mt=null!==(Ze=this.config.retryWhenThrottledOverride)&&void 0!==Ze?Ze:ti.retryWhenThrottledDefault)&&void 0!==Mt&&Mt}},{key:"executeWithRetry",value:function(Mt,Ze){var et=this;return new rt(function(){var Zt=Ne.default(Ie.default.mark(function Fe(ft,dn,Tn){var Bn,mr;return Ie.default.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:Bn=new te.Retrier(et.backoffConfig()),mr=[502,503,504],Ze&&mr.push(429),Tn(function(){Bn.cancel(),Bn.removeAllListeners()}),Bn.on("attempt",Ne.default(Ie.default.mark(function ur(){var Er;return Ie.default.wrap(function(Pi){for(;;)switch(Pi.prev=Pi.next){case 0:return Pi.prev=0,Er=Mt(),Tn(function(){Er.cancel(),Bn.cancel(),Bn.removeAllListeners()}),Pi.next=5,Er;case 5:Bn.succeeded(Pi.sent),Pi.next=12;break;case 9:Pi.prev=9,Pi.t0=Pi.catch(0),mr.indexOf(Pi.t0.status)>-1||"Twilsock disconnected"===Pi.t0.message?Bn.failed(Pi.t0):(Bn.removeAllListeners(),Bn.cancel(),dn(Pi.t0));case 12:case"end":return Pi.stop()}},ur,null,[[0,9]])}))),Bn.on("succeeded",function(ur){ft(ur)}),Bn.on("cancelled",function(ur){return dn(ur)}),Bn.on("failed",function(ur){return dn(ur)}),Bn.start();case 9:case"end":return Ir.stop()}},Fe)}));return function(Fe,ft,dn){return Zt.apply(this,arguments)}}())}},{key:"get",value:function(Mt){var Ze=this;return new rt(function(){var et=Ne.default(Ie.default.mark(function Zt(Fe,ft,dn){var Tn,Bn,mr;return Ie.default.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Tn={"X-Twilio-Token":Ze.config.token},Bn=Ze.executeWithRetry(function(){return Ze.transport.get(Mt,Tn)},Ze.retryWhenThrottled()),ut.trace("sending GET request to ",Mt," headers ",Tn),dn(function(){return Bn.cancel()}),Ir.prev=4,Ir.next=7,Bn;case 7:ut.trace("response",mr=Ir.sent),Fe(mr),Ir.next=16;break;case 12:Ir.prev=12,Ir.t0=Ir.catch(4),ut.debug("get() error ".concat(Ir.t0)),ft(Ir.t0);case 16:case"end":return Ir.stop()}},Zt,null,[[4,12]])}));return function(Zt,Fe,ft){return et.apply(this,arguments)}}())}},{key:"post",value:function(Mt,Ze,et,Zt,Fe){var ft=this,dn={"X-Twilio-Token":this.config.token};(typeof FormData>"u"||!(et instanceof FormData))&&Zt&&Object.assign(dn,{"Content-Type":Zt});var Tn=new URL(Mt);return Ze&&Tn.searchParams.append("Category",Ze),Fe&&Tn.searchParams.append("Filename",Fe),new rt(function(){var Bn=Ne.default(Ie.default.mark(function mr(tr,Ir,ur){var Er,Ai;return Ie.default.wrap(function(Pi){for(;;)switch(Pi.prev=Pi.next){case 0:return Er=ft.transport.post(Tn.href,dn,et),ur(function(){return Er.cancel()}),ut.trace("sending POST request to ".concat(Mt," with headers ").concat(dn)),Pi.prev=3,Pi.next=6,Er;case 6:Ai=Pi.sent,Pi.next=17;break;case 9:if(Pi.prev=9,Pi.t0=Pi.catch(3),!(void 0===i.XMLHttpRequest&&et instanceof FormData)){Pi.next=14;break}return Ir(new TypeError("Posting FormData supported only with browser engine's FormData")),Pi.abrupt("return");case 14:return ut.debug("post() error ".concat(Pi.t0)),Ir(Pi.t0),Pi.abrupt("return");case 17:ut.trace("response",Ai),tr(Ai);case 19:case"end":return Pi.stop()}},mr,null,[[3,9]])}));return function(mr,tr,Ir){return Bn.apply(this,arguments)}}())}}]),jt}(),vn=bn.scope("");G.default=(Ve.default(dr=function(){function jt(Ct,Mt,Ze){var et,Zt,Fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};de.default(this,jt),this.options=Fe,this.options.logLevel=null!==(et=this.options.logLevel)&&void 0!==et?et:"silent",this.config=new ti(Ct,Mt,Ze,this.options),vn.setLevel(this.options.logLevel),this.options.transport=null!==(Zt=this.options.transport)&&void 0!==Zt?Zt:new Qe,this.transport=this.options.transport,this.network=new Xt(this.config,this.transport)}return Y.default(jt,[{key:"updateToken",value:function(Mt){vn.info("updateToken"),this.config.updateToken(Mt)}},{key:"get",value:function(Mt){var Ze=this;return new rt(function(){var et=Ne.default(Ie.default.mark(function Zt(Fe,ft,dn){var Tn;return Ie.default.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return Tn=Ze.network.get("".concat(Ze.config.mediaUrl,"/").concat(Mt)),dn(function(){return Tn.cancel()}),tr.prev=2,tr.next=5,Tn;
1case 5:Fe(new Nr(Ze.config,Ze.network,tr.sent.body)),tr.next=12;break;case 9:tr.prev=9,tr.t0=tr.catch(2),ft(tr.t0);case 12:case"end":return tr.stop()}},Zt,null,[[2,9]])}));return function(Zt,Fe,ft){return et.apply(this,arguments)}}())}},{key:"post",value:function(Mt,Ze,et,Zt){var Fe=this;return new rt(function(){var ft=Ne.default(Ie.default.mark(function dn(Tn,Bn,mr){var tr;return Ie.default.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return tr=Fe.network.post(Fe.config.mediaUrl,et??"media",Ze,Mt,Zt),mr(function(){return tr.cancel()}),Er.prev=2,Er.next=5,tr;case 5:Tn(new Nr(Fe.config,Fe.network,Er.sent.body)),Er.next=12;break;case 9:Er.prev=9,Er.t0=Er.catch(2),Bn(Er.t0);case 12:case"end":return Er.stop()}},dn,null,[[2,9]])}));return function(dn,Tn,Bn){return ft.apply(this,arguments)}}())}},{key:"postFormData",value:function(Mt,Ze){var et=this;return new rt(function(){var Zt=Ne.default(Ie.default.mark(function Fe(ft,dn,Tn){var Bn;return Ie.default.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Bn=et.network.post(et.config.mediaUrl,Ze??"media",Mt),Tn(function(){return Bn.cancel()}),Ir.prev=2,Ir.next=5,Bn;case 5:ft(new Nr(et.config,et.network,Ir.sent.body)),Ir.next=12;break;case 9:Ir.prev=9,Ir.t0=Ir.catch(2),dn(Ir.t0);case 12:case"end":return Ir.stop()}},Fe,null,[[2,9]])}));return function(Fe,ft,dn){return Zt.apply(this,arguments)}}())}},{key:"mediaSetGet",value:function(Mt){var Ze=this;return new rt(function(){var et=Ne.default(Ie.default.mark(function Zt(Fe,ft,dn){var Tn,Bn,tr;return Ie.default.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return Tn={command:"get",list:Mt.map(function(Er){return{media_sid:Er}})},Bn=Ze.network.post("".concat(Ze.config.mediaSetUrl),null,Tn,"application/json"),dn(function(){return Bn.cancel()}),ur.prev=3,ur.next=6,Bn;case 6:tr=ur.sent.body.map(function(Er){if(200===Er.code)return new Nr(Ze.config,Ze.network,Er.media_record);ft("Failed to obtain detailed information about Media items (failed SID ".concat(Er.media_record.sid,")"))}),Fe(tr),ur.next=14;break;case 11:ur.prev=11,ur.t0=ur.catch(3),ft(ur.t0);case 14:case"end":return ur.stop()}},Zt,null,[[3,11]])}));return function(Zt,Fe,ft){return et.apply(this,arguments)}}())}},{key:"mediaSetGetContentUrls",value:function(Mt){var Ze=this;return new rt(function(){var et=Ne.default(Ie.default.mark(function Zt(Fe,ft,dn){var Tn,Bn,mr,tr;return Ie.default.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return Tn={command:"get",list:Mt.map(function(Er){return{media_sid:Er}})},Bn=Ze.network.post("".concat(Ze.config.mediaSetUrl),null,Tn,"application/json"),dn(function(){return Bn.cancel()}),ur.prev=3,ur.next=6,Bn;case 6:mr=ur.sent,tr=new Map,mr.body.forEach(function(Er){200===Er.code?tr.set(Er.media_record.sid,Er.media_record.links.content_direct_temporary):ft("Failed to obtain detailed information about Media items (failed SID ".concat(Er.media_record.sid,")"))}),Fe(tr),ur.next=15;break;case 12:ur.prev=12,ur.t0=ur.catch(3),ft(ur.t0);case 15:case"end":return ur.stop()}},Zt,null,[[3,12]])}));return function(Zt,Fe,ft){return et.apply(this,arguments)}}())}}]),jt}(),"version","0.6.7"),dr),kt([J.validateTypes(J.nonEmptyString),an("design:type",Function),an("design:paramtypes",[String]),an("design:returntype",void 0)],G.default.prototype,"updateToken",null),kt([J.validateTypesAsync(J.nonEmptyString),an("design:type",Function),an("design:paramtypes",[String]),an("design:returntype",rt)],G.default.prototype,"get",null),G.default=kt([J.validateConstructorTypes(J.nonEmptyString,J.nonEmptyString,[J.nonEmptyString,J.literal(null)],[J.pureObject,"undefined"]),an("design:paramtypes",[String,String,Object,Object])],G.default),G.CancellablePromise=rt,G.Client=G.default,G.McsClient=G.default,G.McsMedia=Nr,G.Media=Nr},83984:(B,G,a)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),a(30256),a(62016);var i=a(1196),v=a(94064),b=a(66024),_=a(54216),C=a(96284),P=a(63532),S=a(33248);a(89120),a(85607),a(49640),a(48928),a(29708),a(4248),a(82984),a(79628);var R=a(59848),k=a(85720),x=a(71559),D=a(2676);a(88096),a(29912),a(78235);var ee=a(58416),te=a(97936),J=a(25724);a(57912),a(31956);var Q=a(43752),we=a(75088),de=a(64632);function Y(sn){return sn&&"object"==typeof sn&&"default"in sn?sn:{default:sn}}function Se(sn){if(sn&&sn.__esModule)return sn;var Qe=Object.create(null);
1return sn&&Object.keys(sn).forEach(function(ut){if("default"!==ut){var Xt=Object.getOwnPropertyDescriptor(sn,ut);Object.defineProperty(Qe,ut,Xt.get?Xt:{enumerable:!0,get:function(){return sn[ut]}})}}),Qe.default=sn,Object.freeze(Qe)}var Ye=Y(i),pe=Y(v),ae=Y(b),Ve=Y(_),Ne=Y(C),Ie=Y(P),H=Y(S),j=Y(R),ye=Y(x),Le=Y(D),W=Y(te),We=Y(J),At=Se(Q),Ut=Se(we);function it(sn,Qe,ut,Xt){var vn,wn=arguments.length,dr=wn<3?Qe:null===Xt?Xt=Object.getOwnPropertyDescriptor(Qe,ut):Xt;if("object"===(typeof Reflect>"u"?"undefined":j.default(Reflect))&&"function"==typeof Reflect.decorate)dr=Reflect.decorate(sn,Qe,ut,Xt);else for(var jt=sn.length-1;jt>=0;jt--)(vn=sn[jt])&&(dr=(wn<3?vn(dr):wn>3?vn(Qe,ut,dr):vn(Qe,ut))||dr);return wn>3&&dr&&Object.defineProperty(Qe,ut,dr),dr}function ue(sn,Qe){if("object"===(typeof Reflect>"u"?"undefined":j.default(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(sn,Qe)}function ce(){}function K(){K.init.call(this)}function _e(sn){return void 0===sn._maxListeners?K.defaultMaxListeners:sn._maxListeners}function He(sn,Qe,ut,Xt){var wn,dr,vn;if("function"!=typeof ut)throw new TypeError('"listener" argument must be a function');if((dr=sn._events)?(dr.newListener&&(sn.emit("newListener",Qe,ut.listener?ut.listener:ut),dr=sn._events),vn=dr[Qe]):(dr=sn._events=new ce,sn._eventsCount=0),vn){if("function"==typeof vn?vn=dr[Qe]=Xt?[ut,vn]:[vn,ut]:Xt?vn.unshift(ut):vn.push(ut),!vn.warned&&(wn=_e(sn))&&wn>0&&vn.length>wn){vn.warned=!0;var jt=new Error("Possible EventEmitter memory leak detected. "+vn.length+" "+Qe+" listeners added. Use emitter.setMaxListeners() to increase limit");jt.name="MaxListenersExceededWarning",jt.emitter=sn,jt.type=Qe,jt.count=vn.length,function ge(sn){"function"==typeof console.warn?console.warn(sn):console.log(sn)}(jt)}}else vn=dr[Qe]=ut,++sn._eventsCount;return sn}function xt(sn,Qe,ut){var Xt=!1;function wn(){sn.removeListener(Qe,wn),Xt||(Xt=!0,ut.apply(sn,arguments))}return wn.listener=ut,wn}function pt(sn){var Qe=this._events;if(Qe){var ut=Qe[sn];if("function"==typeof ut)return 1;if(ut)return ut.length}return 0}function cn(sn,Qe){for(var ut=new Array(Qe);Qe--;)ut[Qe]=sn[Qe];return ut}ce.prototype=Object.create(null),K.EventEmitter=K,K.usingDomains=!1,K.prototype.domain=void 0,K.prototype._events=void 0,K.prototype._maxListeners=void 0,K.defaultMaxListeners=10,K.init=function(){this.domain=null,K.usingDomains&&(void 0).active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new ce,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},K.prototype.setMaxListeners=function(Qe){if("number"!=typeof Qe||Qe<0||isNaN(Qe))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=Qe,this},K.prototype.getMaxListeners=function(){return _e(this)},K.prototype.emit=function(Qe){var ut,Xt,wn,dr,vn,jt,Ct,Mt="error"===Qe;if(jt=this._events)Mt=Mt&&null==jt.error;else if(!Mt)return!1;if(Ct=this.domain,Mt){if(ut=arguments[1],!Ct){if(ut instanceof Error)throw ut;var Ze=new Error('Uncaught, unspecified "error" event. ('+ut+")");throw Ze.context=ut,Ze}return ut||(ut=new Error('Uncaught, unspecified "error" event')),ut.domainEmitter=this,ut.domain=Ct,ut.domainThrown=!1,Ct.emit("error",ut),!1}if(!(Xt=jt[Qe]))return!1;var et="function"==typeof Xt;switch(wn=arguments.length){case 1:!function Pe(sn,Qe,ut){if(Qe)sn.call(ut);else for(var Xt=sn.length,wn=cn(sn,Xt),dr=0;dr<Xt;++dr)wn[dr].call(ut)}(Xt,et,this);break;case 2:!function De(sn,Qe,ut,Xt){if(Qe)sn.call(ut,Xt);else for(var wn=sn.length,dr=cn(sn,wn),vn=0;vn<wn;++vn)dr[vn].call(ut,Xt)}(Xt,et,this,arguments[1]);break;case 3:!function ke(sn,Qe,ut,Xt,wn){if(Qe)sn.call(ut,Xt,wn);else for(var dr=sn.length,vn=cn(sn,dr),jt=0;jt<dr;++jt)vn[jt].call(ut,Xt,wn)}(Xt,et,this,arguments[1],arguments[2]);break;case 4:!function Lt(sn,Qe,ut,Xt,wn,dr){if(Qe)sn.call(ut,Xt,wn,dr);else for(var vn=sn.length,jt=cn(sn,vn),Ct=0;Ct<vn;++Ct)jt[Ct].call(ut,Xt,wn,dr)}(Xt,et,this,arguments[1],arguments[2],arguments[3]);break;default:for(dr=new Array(wn-1),vn=1;vn<wn;vn++)dr[vn-1]=arguments[vn];!function Dt(sn,Qe,ut,Xt){if(Qe)sn.apply(ut,Xt);else for(var wn=sn.length,dr=cn(sn,wn),vn=0;vn<wn;++vn)dr[vn].apply(ut,Xt)}(Xt,et,this,dr)}return!0},K.prototype.on=K.prototype.addListener=function(Qe,ut){return He(this,Qe,ut,!1)},K.prototype.prependListener=function(Qe,ut){return He(this,Qe,ut,!0)},K.prototype.once=function(Qe,ut){if("function"!=typeof ut)throw new TypeError('"listener" argument must be a function');return this.on(Qe,xt(this,Qe,ut)),this},K.prototype.prependOnceListener=function(Qe,ut){if("function"!=typeof ut)throw new TypeError('"listener" argument must be a function');return this.prependListener(Qe,xt(this,Qe,ut)),this},K.prototype.removeListener=function(Qe,ut){var Xt,wn,dr,vn,jt;if("function"!=typeof ut)throw new TypeError('"listener" argument must be a function');if(!(wn=this._events))return this;if(!(Xt=wn[Qe]))return this;if(Xt===ut||Xt.listener&&Xt.listener===ut)0==--this._eventsCount?this._events=new ce:(delete wn[Qe],wn.removeListener&&this.emit
1("removeListener",Qe,Xt.listener||ut));else if("function"!=typeof Xt){for(dr=-1,vn=Xt.length;vn-- >0;)if(Xt[vn]===ut||Xt[vn].listener&&Xt[vn].listener===ut){jt=Xt[vn].listener,dr=vn;break}if(dr<0)return this;if(1===Xt.length){if(Xt[0]=void 0,0==--this._eventsCount)return this._events=new ce,this;delete wn[Qe]}else!function rn(sn,Qe){for(var ut=Qe,Xt=ut+1,wn=sn.length;Xt<wn;ut+=1,Xt+=1)sn[ut]=sn[Xt];sn.pop()}(Xt,dr);wn.removeListener&&this.emit("removeListener",Qe,jt||ut)}return this},K.prototype.off=function(sn,Qe){return this.removeListener(sn,Qe)},K.prototype.removeAllListeners=function(Qe){var ut,Xt;if(!(Xt=this._events))return this;if(!Xt.removeListener)return 0===arguments.length?(this._events=new ce,this._eventsCount=0):Xt[Qe]&&(0==--this._eventsCount?this._events=new ce:delete Xt[Qe]),this;if(0===arguments.length){for(var vn,wn=Object.keys(Xt),dr=0;dr<wn.length;++dr)"removeListener"!==(vn=wn[dr])&&this.removeAllListeners(vn);return this.removeAllListeners("removeListener"),this._events=new ce,this._eventsCount=0,this}if("function"==typeof(ut=Xt[Qe]))this.removeListener(Qe,ut);else if(ut)do{this.removeListener(Qe,ut[ut.length-1])}while(ut[0]);return this},K.prototype.listeners=function(Qe){var ut,Xt,wn=this._events;return Xt=wn&&(ut=wn[Qe])?"function"==typeof ut?[ut.listener||ut]:function mn(sn){for(var Qe=new Array(sn.length),ut=0;ut<Qe.length;++ut)Qe[ut]=sn[ut].listener||sn[ut];return Qe}(ut):[],Xt},K.listenerCount=function(sn,Qe){return"function"==typeof sn.listenerCount?sn.listenerCount(Qe):pt.call(sn,Qe)},K.prototype.listenerCount=pt,K.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var dt=At.getLogger("twilio-notificatiions");function lt(sn,Qe){return["".concat((new Date).toISOString()," Twilio.Notifications ").concat(sn,":")].concat(Array.from(Qe))}var kt=new(function(){function sn(){pe.default(this,sn)}return ae.default(sn,[{key:"setLevel",value:function(ut){dt.setLevel(ut)}},{key:"trace",value:function(){if(dt.getLevel()==dt.levels.TRACE){for(var ut=arguments.length,Xt=new Array(ut),wn=0;wn<ut;wn++)Xt[wn]=arguments[wn];dt.debug.apply(null,lt("T",Xt))}}},{key:"debug",value:function(){for(var ut=arguments.length,Xt=new Array(ut),wn=0;wn<ut;wn++)Xt[wn]=arguments[wn];dt.debug.apply(null,lt("D",Xt))}},{key:"info",value:function(){for(var ut=arguments.length,Xt=new Array(ut),wn=0;wn<ut;wn++)Xt[wn]=arguments[wn];dt.info.apply(null,lt("I",Xt))}},{key:"warn",value:function(){for(var ut=arguments.length,Xt=new Array(ut),wn=0;wn<ut;wn++)Xt[wn]=arguments[wn];dt.warn.apply(null,lt("W",Xt))}},{key:"error",value:function(){for(var ut=arguments.length,Xt=new Array(ut),wn=0;wn<ut;wn++)Xt[wn]=arguments[wn];dt.error.apply(null,lt("E",Xt))}}]),sn}());var bn=ae.default(function sn(){var Qe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",ut=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",Xt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;pe.default(this,sn),this.token=Qe,this.notificationId=ut,this.messageTypes=Xt});function Fn(sn,Qe){var ut=new Set;return sn.notificationId!==Qe.notificationId&&ut.add("notificationId"),sn.token!==Qe.token&&ut.add("token"),function Hn(sn,Qe){return[].concat(We.default(We.default(sn).filter(function(ut){return!Qe.has(ut)})),We.default(We.default(Qe).filter(function(ut){return!sn.has(ut)})))}(sn.messageTypes,Qe.messageTypes).length>0&&ut.add("messageType"),[ut.size>0,ut]}var On=function(sn){Ve.default(ut,sn);var Xt,Qe=function an(sn){var Qe=function Yn(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var wn,Xt=Ie.default(sn);if(Qe){var dr=Ie.default(this).constructor;wn=Reflect.construct(Xt,arguments,dr)}else wn=Xt.apply(this,arguments);return Ne.default(this,wn)}}(ut);function ut(Xt){var wn;return pe.default(this,ut),wn=Qe.call(this),Le.default(ye.default(wn),"desiredState",new bn),Le.default(ye.default(wn),"currentState",new bn),Le.default(ye.default(wn),"_hasActiveAttempt",!1),wn.channelType=Xt,wn}return ae.default(ut,[{key:"setNotificationId",value:function(wn){this.desiredState.notificationId=wn}},{key:"isActive",value:function(){return""!==this.desiredState.notificationId}},{key:"subscribe",value:function(wn){this.desiredState.messageTypes.has(wn)?kt.debug("message type '".concat(wn,"' for channel ").concat(this.channelType," is already registered")):this.desiredState.messageTypes.add(wn)}},{key:"unsubscribe",value:function(wn){this.desiredState.messageTypes.has(wn)&&this.desiredState.messageTypes.delete(wn)}},{key:"updateToken",value:function(wn){this.desiredState.token=wn}},{key:"commitChanges",value:(Xt=Ye.default(H.default.mark(function dr(){var vn,jt,Mt,Ze,et;return H.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(!this._hasActiveAttempt){Fe.next=3;break}throw kt.error("One registration attempt is already in progress"),new Error("One registration attempt is already in progress");case 3:if(vn=Fn(this.desiredState,this.currentState),jt=W.default(vn,2),Mt=jt[1],jt[0]){Fe.next=6;break}return Fe.abrupt("return");case 6:if(this.currentState.notificationId||Mt.delete("notificationId"),kt.trace("Persisting ".concat(this.channelType," registration"),Mt,this.desiredState),Fe.prev=8,this._hasActiveAttempt=!0,(Ze=new bn).token=this.desiredState.token,Ze.notificationId=this.desiredState.notificationId,Ze.messageTypes=new Set(this.desiredState.messageTypes),!(Ze.messageTypes.size>0)){Fe.next=24;break}return Fe.next=17,this.updateRegistration(Ze,Mt);case 17:this.currentState.token=(et=Fe.sent).token,this.currentState.notificationId=et.notificationId,this.currentState.messageTypes=new Set(et.messageTypes),this.emit
1("stateChanged",this.channelType,"registered",this.currentState),Fe.next=30;break;case 24:return Fe.next=26,this.removeRegistration();case 26:this.currentState.token=Ze.token,this.currentState.notificationId=Ze.notificationId,this.currentState.messageTypes.clear(),this.emit("stateChanged",this.channelType,"unregistered",this.currentState);case 30:Fe.next=35;break;case 32:throw Fe.prev=32,Fe.t0=Fe.catch(8),Fe.t0;case 35:return Fe.prev=35,this._hasActiveAttempt=!1,Fe.finish(35);case 38:case"end":return Fe.stop()}},dr,this,[[8,32,35,38]])})),function wn(){return Xt.apply(this,arguments)})}]),ut}(K);var Vr={min:2e3,max:12e4,randomness:.2},Fr=function(sn){Ve.default(ut,sn);var Xt,Qe=function gr(sn){var Qe=function Mr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var wn,Xt=Ie.default(sn);if(Qe){var dr=Ie.default(this).constructor;wn=Reflect.construct(Xt,arguments,dr)}else wn=Xt.apply(this,arguments);return Ne.default(this,wn)}}(ut);function ut(Xt,wn,dr,vn){var jt;return pe.default(this,ut),jt=Qe.call(this,Xt),Le.default(ye.default(jt),"registrationId",null),jt.context=wn,jt.twilsock=dr,jt.registrarUrl=vn,jt}return ae.default(ut,[{key:"updateRegistration",value:(Xt=Ye.default(H.default.mark(function dr(vn,jt){var Mt,Ze,et,Zt,Fe,Ct=this;return H.default.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(!jt.has("notificationId")){dn.next=3;break}return dn.next=3,this.removeRegistration();case 3:if(vn.notificationId&&vn.notificationId.length){dn.next=6;break}throw kt.error("No push notification ID for registration"),new Error("No push notification ID for registration");case 6:return kt.trace("Registering",this.channelType,vn),Mt={endpoint_platform:this.context.platform,channel_type:this.channelType,version:this.context.protocolVersion.toString(),message_types:Array.from(vn.messageTypes),data:{registration_id:vn.notificationId}},Ze=this.context.productId,et="".concat(this.registrarUrl,"?productId=").concat(Ze),Zt={"Content-Type":"application/json"},kt.trace("Creating registration for channel ".concat(this.channelType)),dn.prev=12,dn.next=15,new ee.AsyncRetrier(Vr).run(function(){return Ct.twilsock.post(et,Zt,Mt,Ze)});case 15:this.registrationId=(Fe=dn.sent).body.id,kt.debug("Registration created: ",Fe),dn.next=24;break;case 20:throw dn.prev=20,dn.t0=dn.catch(12),kt.error("Registration failed: ",dn.t0),dn.t0;case 24:return dn.abrupt("return",vn);case 25:case"end":return dn.stop()}},dr,this,[[12,20]])})),function wn(dr,vn){return Xt.apply(this,arguments)})},{key:"removeRegistration",value:function(){var Xt=Ye.default(H.default.mark(function dr(){var jt,Ct,Mt,vn=this;return H.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(this.registrationId){et.next=2;break}return et.abrupt("return");case 2:return jt=this.context.productId,Ct="".concat(this.registrarUrl,"/").concat(this.registrationId,"?productId=").concat(jt),Mt={"Content-Type":"application/json"},kt.trace("Removing registration for ".concat(this.channelType)),et.prev=6,et.next=9,new ee.AsyncRetrier(Object.assign(Vr,{maxAttemptsCount:3})).run(function(){return vn.twilsock.delete(Ct,Mt,{},jt)});case 9:this.registrationId=null,this.currentState.notificationId="",kt.debug("Registration removed for ".concat(this.channelType)),et.next=18;break;case 14:throw et.prev=14,et.t0=et.catch(6),kt.error("Failed to remove registration ",this.channelType,et.t0),et.t0;case 18:case"end":return et.stop()}},dr,this,[[6,14]])}));return function wn(){return Xt.apply(this,arguments)}}()},{key:"sendDeviceRemoveRequest",value:function(){var Xt=Ye.default(H.default.mark(function dr(vn){var Ct,Mt,Ze,et,jt=this;return H.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(""!==vn){Fe.next=2;break}throw new Error("Empty registration ID");case 2:return Ct=this.context.productId,Mt="".concat(this.registrarUrl,"?productId=").concat(Ct),Ze={"Content-Type":"application/json"},et={binding_type:this.channelType,address:vn},Fe.prev=6,kt.trace("Removing old registrations for ".concat(this.channelType)),Fe.next=10,new ee.AsyncRetrier(Object.assign(Vr,{maxAttemptsCount:3})).run(function(){return jt.twilsock.delete(Mt,Ze,et,Ct)});case 10:this.registrationId=null,this.currentState.notificationId="",kt.debug("Registration removed for ".concat(this.channelType)),Fe.next=19;break;case 15:throw Fe.prev=15,Fe.t0=Fe.catch(6),kt.error("Failed to remove registration ",this.channelType,Fe.t0),Fe.t0;case 19:case"end":return Fe.stop()}},dr,this,[[6,15]])}));return function wn(dr){return Xt.apply(this,arguments)}}()}]),ut}(On);var Kr=function(sn){Ve.default(ut,sn);var Xt,Qe=function ti(sn){var Qe=function Nr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var wn,Xt=Ie.default(sn);if(Qe){var dr=Ie.default(this).constructor;wn=Reflect.construct(Xt,arguments,dr)}else wn=Xt.apply(this,arguments);return Ne.default(this,wn)}}(ut);function ut(Xt,wn,dr){var vn;return pe.default(this,ut),vn=Qe.call(this,"twilsock"),Le.default(ye.default(vn),"contextId",Ut.v4()
1),vn.productId=Xt,vn.platform=wn,vn.twilsock=dr,vn}return ae.default(ut,[{key:"updateRegistration",value:(Xt=Ye.default(H.default.mark(function dr(vn,jt){var Ct,Mt;return H.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(jt.has("messageType")){et.next=2;break}return et.abrupt("return",vn);case 2:return Ct=Array.from(vn.messageTypes),Mt={product_id:this.productId,notification_protocol_version:4,endpoint_platform:this.platform,message_types:Ct},et.prev=4,et.next=7,this.twilsock.setNotificationsContext(this.contextId,Mt);case 7:et.next=13;break;case 9:throw et.prev=9,et.t0=et.catch(4),kt.error("Failed to update twilsock notification context: ".concat(et.t0)),et.t0;case 13:return et.abrupt("return",vn);case 14:case"end":return et.stop()}},dr,this,[[4,9]])})),function wn(dr,vn){return Xt.apply(this,arguments)})},{key:"removeRegistration",value:function(){var Xt=Ye.default(H.default.mark(function dr(){return H.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return jt.prev=0,jt.next=3,this.twilsock.removeNotificationsContext(this.contextId);case 3:jt.next=9;break;case 5:throw jt.prev=5,jt.t0=jt.catch(0),kt.error("Failed to remove twilsock notification context: ".concat(jt.t0)),jt.t0;case 9:case"end":return jt.stop()}},dr,this,[[0,5]])}));return function wn(){return Xt.apply(this,arguments)}}()},{key:"sendDeviceRemoveRequest",value:function(){var Xt=Ye.default(H.default.mark(function dr(vn){return H.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:case"end":return Ct.stop()}},dr)}));return function wn(dr){return Xt.apply(this,arguments)}}()}]),ut}(On);var or,zr=de.literal("apn","fcm","twilsock");G.Notifications=or=function(sn){Ve.default(ut,sn);var Xt,Qe=function Jr(sn){var Qe=function sr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var wn,Xt=Ie.default(sn);if(Qe){var dr=Ie.default(this).constructor;wn=Reflect.construct(Xt,arguments,dr)}else wn=Xt.apply(this,arguments);return Ne.default(this,wn)}}(ut);function ut(Xt){var wn,dr,vn,jt,Ct,Mt,Ze,et=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};pe.default(this,ut),Ze=Qe.call(this),et.logLevel=null!==(wn=et.logLevel)&&void 0!==wn?wn:"error",kt.setLevel(et.logLevel);var Zt=null!==(dr=et.productId)&&void 0!==dr?dr:"notifications",Fe=!et.twilsockClient,ft=et.twilsockClient=null!==(vn=et.twilsockClient)&&void 0!==vn?vn:new k.TwilsockClient(Xt,Zt,et),dn=null!==(jt=et.notifications)&&void 0!==jt?jt:{},Tn=null!==(Ct=null!==(Mt=dn.region)&&void 0!==Mt?Mt:et.region)&&void 0!==Ct?Ct:"us1",Bn="https://ers.".concat(Tn,".twilio.com/v1/registrations"),mr=dn.ersUrl||Bn;Ze.connectors=new Map;var tr=or._detectPlatform();return Ze.connectors.set("apn",new Fr("apn",{protocolVersion:4,productId:Zt,platform:tr},ft,mr)),Ze.connectors.set("fcm",new Fr("fcm",{protocolVersion:3,productId:Zt,platform:tr},ft,mr)),Ze.connectors.set("twilsock",new Kr(Zt,tr,ft)),ft.on("stateChanged",function(Ir){return Ze.emit("transportState",Ir)}),Ze._connector("twilsock").on("stateChanged",function(Ir,ur,Er){return Ze.emit("stateChanged",Ir,ur,Er)}),Ze._connector("apn").on("stateChanged",function(Ir,ur,Er){return Ze.emit("stateChanged",Ir,ur,Er)}),Ze._connector("fcm").on("stateChanged",function(Ir,ur,Er){return Ze.emit("stateChanged",Ir,ur,Er)}),ft.on("message",function(Ir,ur){return Ze._routeMessage(Ir,ur)}),Ze.updateToken(Xt),Fe&&(ft.connect(),Ze.twilsock=ft),Ze}return ae.default(ut,[{key:"shutdown",value:(Xt=Ye.default(H.default.mark(function dr(){return H.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(this.connectors.clear(),!this.twilsock){jt.next=4;break}return jt.next=4,this.twilsock.disconnect();case 4:case"end":return jt.stop()}},dr,this)})),function wn(){return Xt.apply(this,arguments)})},{key:"setPushRegistrationId",value:function(wn,dr){kt.debug("Set ".concat(wn," push registration id '").concat(dr,"'")),this._connector(wn).setNotificationId(dr)}},{key:"subscribe",value:function(wn,dr){kt.debug("Add ".concat(wn," subscriptions for message type ").concat(dr)),this._connector(wn).subscribe(dr)}},{key:"unsubscribe",value:function(wn,dr){kt.debug("Remove ".concat(wn," subscriptions for message type ").concat(dr)),this._connector(wn).unsubscribe(dr)}}
1,{key:"updateToken",value:function(wn){this.connectors.forEach(function(dr){return dr.updateToken(wn)})}},{key:"commitChanges",value:function(){var Xt=Ye.default(H.default.mark(function dr(){var vn;return H.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return vn=[],this.connectors.forEach(function(Mt){Mt.isActive()&&vn.push(Mt.commitChanges())}),Ct.next=4,Promise.all(vn);case 4:case"end":return Ct.stop()}},dr,this)}));return function wn(){return Xt.apply(this,arguments)}}()},{key:"removeRegistrations",value:function(){var Xt=Ye.default(H.default.mark(function dr(vn,jt){return H.default.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,this._connector(vn).sendDeviceRemoveRequest(jt);case 2:case"end":return Mt.stop()}},dr,this)}));return function wn(dr,vn){return Xt.apply(this,arguments)}}()},{key:"handlePushNotification",value:function(wn){return{messageType:wn.twi_message_type,payload:wn.payload}}},{key:"_routeMessage",value:function(wn,dr){kt.debug("Notification message arrived: ",wn,dr),this.emit("message",wn,dr)}},{key:"_connector",value:function(wn){var dr=this.connectors.get(wn);if(!dr)throw new Error("Unknown channel type: ".concat(wn));return dr}}],[{key:"_detectPlatform",value:function(){var wn="";return typeof navigator<"u"?(wn="unknown",typeof navigator.product<"u"&&(wn=navigator.product),typeof navigator.userAgent<"u"&&(wn=navigator.userAgent)):wn="web",wn.substring(0,128)}}]),ut}(K),it([de.validateTypes(zr,de.nonEmptyString),ue("design:type",Function),ue("design:paramtypes",[String,String]),ue("design:returntype",void 0)],G.Notifications.prototype,"setPushRegistrationId",null),it([de.validateTypes(zr,de.nonEmptyString),ue("design:type",Function),ue("design:paramtypes",[String,String]),ue("design:returntype",void 0)],G.Notifications.prototype,"subscribe",null),it([de.validateTypes(zr,de.nonEmptyString),ue("design:type",Function),ue("design:paramtypes",[String,String]),ue("design:returntype",void 0)],G.Notifications.prototype,"unsubscribe",null),it([de.validateTypes(de.nonEmptyString),ue("design:type",Function),ue("design:paramtypes",[String]),ue("design:returntype",void 0)],G.Notifications.prototype,"updateToken",null),it([de.validateTypesAsync(zr,de.nonEmptyString),ue("design:type",Function),ue("design:paramtypes",[String,String]),ue("design:returntype",Promise)],G.Notifications.prototype,"removeRegistrations",null),G.Notifications=or=it([de.validateConstructorTypes(de.nonEmptyString,[de.pureObject,"undefined",de.literal(null)]),ue("design:paramtypes",[String,Object])],G.Notifications)},58416:(B,G,a)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),a(30256),a(62016);var i=a(94064),v=a(66024),b=a(71559),_=a(54216),C=a(96284),P=a(63532),S=a(2676);function R(Pe){return Pe&&"object"==typeof Pe&&"default"in Pe?Pe:{default:Pe}}a(49640),a(79628);var k=R(i),x=R(v),D=R(b),ee=R(_),te=R(C),J=R(P),Q=R(S);function de(){}function Y(){Y.init.call(this)}function Se(Pe){return void 0===Pe._maxListeners?Y.defaultMaxListeners:Pe._maxListeners}function Ie(Pe,De,ke,Lt){var Dt,He,ge;if("function"!=typeof ke)throw new TypeError('"listener" argument must be a function');if((He=Pe._events)?(He.newListener&&(Pe.emit("newListener",De,ke.listener?ke.listener:ke),He=Pe._events),ge=He[De]):(He=Pe._events=new de,Pe._eventsCount=0),ge){if("function"==typeof ge?ge=He[De]=Lt?[ke,ge]:[ge,ke]:Lt?ge.unshift(ke):ge.push(ke),!ge.warned&&(Dt=Se(Pe))&&Dt>0&&ge.length>Dt){ge.warned=!0;var xt=new Error("Possible EventEmitter memory leak detected. "+ge.length+" "+De+" listeners added. Use emitter.setMaxListeners() to increase limit");xt.name="MaxListenersExceededWarning",xt.emitter=Pe,xt.type=De,xt.count=ge.length,function H(Pe){"function"==typeof console.warn?console.warn(Pe):console.log(Pe)}(xt)}}else ge=He[De]=ke,++Pe._eventsCount;return Pe}function j(Pe,De,ke){var Lt=!1;function Dt(){Pe.removeListener(De,Dt),Lt||(Lt=!0,ke.apply(Pe,arguments))}return Dt.listener=ke,Dt}function ye(Pe){var De=this._events;if(De){var ke=De[Pe];if("function"==typeof ke)return 1;if(ke)return ke.length}return 0}function W(Pe,De){for(var ke=new Array(De);De--;)ke[De]=Pe[De];return ke}function At(Pe){var De=function Ut(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var Dt,Lt=J.default(Pe);if(De){var He=J.default(this).constructor;Dt=Reflect.construct(Lt,arguments,He)}else Dt=Lt.apply(this,arguments);return te.default(this,Dt)}}de.prototype=Object.create(null),Y.EventEmitter=Y,Y.usingDomains=!1,Y.prototype.domain=void 0,Y.prototype._events=void 0,Y.prototype._maxListeners=void 0,Y.defaultMaxListeners=10,Y.init=function(){this.domain=null,Y.usingDomains&&(void 0).active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new de,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Y.prototype.setMaxListeners=function(De){if("number"!=typeof De||De<0||isNaN(De))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=De,this},Y.prototype.getMaxListeners=function(){return Se(this)},Y.prototype.emit=function(De){var ke,Lt,Dt,He,ge,xt,pt,rn="error"===De;if(xt=this._events)rn=rn&&null==xt.error;else if(!rn)return!1;if(pt=this.domain,rn){if(ke=arguments[1],!pt){if(ke instanceof Error)throw ke;var cn=new Error('Uncaught, unspecified "error" event. ('+ke+")");throw cn.context=ke,cn}return ke||(ke=new Error('Uncaught, unspecified "error" event')),ke.domainEmitter=this,ke.domain=pt,ke.domainThrown=!1,pt.emit("error",ke),!1}if(!(Lt=xt[De]))return!1;var mn="function"==typeof Lt;switch(Dt=arguments.length){case 1:!function Ye(Pe,De,ke){if(De)Pe.call(ke);else for(var Lt=Pe.length,Dt=W(Pe,Lt),He=0;He<Lt;++He)Dt[He].call(ke)}(Lt,mn,this);break;case 2:!function pe(Pe,De,ke,Lt){if(De)Pe.call(ke,Lt);else for(var Dt=Pe.length,He=W(Pe,Dt),ge=0;ge<Dt;++ge)He[ge].call(ke,Lt)}(Lt,mn,this,arguments[1]);break;case 3:!function ae(Pe,De,ke,Lt,Dt){if(De)Pe.call(ke,Lt,Dt);else for(var He=Pe.length,ge=W(Pe,He),xt=0;xt<He;++xt)ge[xt].call(ke,Lt,Dt)}(Lt,mn,this,arguments[1],arguments[2]);break;case 4:!function Ve(Pe,De,ke,Lt,Dt,He){if(De)Pe.call(ke,Lt,Dt,He);else for(var ge=Pe.length,xt=W(Pe,ge),pt=0;pt<ge;++pt)xt[pt].call(ke,Lt,Dt,He)}(Lt,mn,this,arguments[1],arguments[2],arguments[3]);break;default:for(He=new Array(Dt-1),ge=1;ge<Dt;ge++)He[ge-1]=arguments[ge];!function Ne(Pe,De,ke,Lt){if(De)Pe.apply(ke,Lt);else for(var Dt=Pe.length,He=W(Pe,Dt),ge=0;ge<Dt;++ge)He[ge].apply(ke,Lt)}(Lt,mn,this,He)}return!0},Y.prototype.on=Y.prototype.addListener=function(De,ke){return Ie(this,De,ke,!1)},Y.prototype.prependListener=function(De,ke){return Ie(this,De,ke,!0)},Y.prototype.once=function(De,ke){if("function"!=typeof ke)throw new TypeError('"listener" argument must be a function');return this.on(De,j(this,De,ke)),this},Y.prototype.prependOnceListener=function(De,ke){if("function"!=typeof ke)throw new TypeError('"listener" argument must be a function');
1return this.prependListener(De,j(this,De,ke)),this},Y.prototype.removeListener=function(De,ke){var Lt,Dt,He,ge,xt;if("function"!=typeof ke)throw new TypeError('"listener" argument must be a function');if(!(Dt=this._events))return this;if(!(Lt=Dt[De]))return this;if(Lt===ke||Lt.listener&&Lt.listener===ke)0==--this._eventsCount?this._events=new de:(delete Dt[De],Dt.removeListener&&this.emit("removeListener",De,Lt.listener||ke));else if("function"!=typeof Lt){for(He=-1,ge=Lt.length;ge-- >0;)if(Lt[ge]===ke||Lt[ge].listener&&Lt[ge].listener===ke){xt=Lt[ge].listener,He=ge;break}if(He<0)return this;if(1===Lt.length){if(Lt[0]=void 0,0==--this._eventsCount)return this._events=new de,this;delete Dt[De]}else!function Le(Pe,De){for(var ke=De,Lt=ke+1,Dt=Pe.length;Lt<Dt;ke+=1,Lt+=1)Pe[ke]=Pe[Lt];Pe.pop()}(Lt,He);Dt.removeListener&&this.emit("removeListener",De,xt||ke)}return this},Y.prototype.off=function(Pe,De){return this.removeListener(Pe,De)},Y.prototype.removeAllListeners=function(De){var ke,Lt;if(!(Lt=this._events))return this;if(!Lt.removeListener)return 0===arguments.length?(this._events=new de,this._eventsCount=0):Lt[De]&&(0==--this._eventsCount?this._events=new de:delete Lt[De]),this;if(0===arguments.length){for(var ge,Dt=Object.keys(Lt),He=0;He<Dt.length;++He)"removeListener"!==(ge=Dt[He])&&this.removeAllListeners(ge);return this.removeAllListeners("removeListener"),this._events=new de,this._eventsCount=0,this}if("function"==typeof(ke=Lt[De]))this.removeListener(De,ke);else if(ke)do{this.removeListener(De,ke[ke.length-1])}while(ke[0]);return this},Y.prototype.listeners=function(De){var ke,Lt,Dt=this._events;return Lt=Dt&&(ke=Dt[De])?"function"==typeof ke?[ke.listener||ke]:function We(Pe){for(var De=new Array(Pe.length),ke=0;ke<De.length;++ke)De[ke]=Pe[ke].listener||Pe[ke];return De}(ke):[],Lt},Y.listenerCount=function(Pe,De){return"function"==typeof Pe.listenerCount?Pe.listenerCount(De):ye.call(Pe,De)},Y.prototype.listenerCount=ye,Y.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var it=function(Pe){ee.default(ke,Pe);var De=At(ke);function ke(Lt){var Dt;return k.default(this,ke),Dt=De.call(this),Q.default(D.default(Dt),"timeout",null),Q.default(D.default(Dt),"startTimestamp",-1),Dt.minDelay=Lt.min,Dt.maxDelay=Lt.max,Dt.initialDelay=Lt.initial||0,Dt.maxAttemptsCount=Lt.maxAttemptsCount||0,Dt.maxAttemptsTime=Lt.maxAttemptsTime||0,Dt.randomness=Lt.randomness||0,Dt.inProgress=!1,Dt.attemptNum=0,Dt.prevDelay=0,Dt.currDelay=0,Dt}return x.default(ke,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(Dt){if("number"==typeof Dt)return this.prevDelay=0,this.currDelay=Dt,Dt;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var He=this.currDelay+this.prevDelay;return this.maxDelay&&He>this.maxDelay&&(this.currDelay=this.maxDelay,He=this.maxDelay),this.currDelay=He,He}},{key:"randomize",value:function(Dt){var He=Dt*this.randomness,ge=Math.round(Math.random()*He*2-He);return Math.max(0,Dt+ge)}},{key:"scheduleAttempt",value:function(Dt){var He=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var ge=this.nextDelay(Dt);if(ge=this.randomize(ge),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+ge)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout(function(){return He.attempt()},ge)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit
1("cancelled"))}},{key:"succeeded",value:function(Dt){this.emit("succeeded",Dt)}},{key:"failed",value:function(Dt,He){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(He)}}]),ke}(Y),ue=function(Pe){ee.default(ke,Pe);var De=At(ke);function ke(Lt){var Dt;return k.default(this,ke),Dt=De.call(this),Q.default(D.default(Dt),"resolve",function(){}),Q.default(D.default(Dt),"reject",function(){}),Dt.retrier=new it(Lt),Dt}return x.default(ke,[{key:"run",value:function(Dt){var He=this;return this.retrier.on("attempt",function(){Dt().then(function(ge){return He.retrier.succeeded(ge)}).catch(function(ge){return He.retrier.failed(ge)})}),this.retrier.on("succeeded",function(ge){return He.resolve(ge)}),this.retrier.on("cancelled",function(){return He.reject(new Error("Cancelled"))}),this.retrier.on("failed",function(ge){return He.reject(ge)}),new Promise(function(ge,xt){He.resolve=ge,He.reject=xt,He.retrier.start()})}},{key:"cancel",value:function(){this.retrier.cancel()}}]),ke}(Y);function K(Pe){return null!=Pe}var _e=function(Pe){ee.default(ke,Pe);var De=function se(Pe){var De=function ce(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var Dt,Lt=J.default(Pe);if(De){var He=J.default(this).constructor;Dt=Reflect.construct(Lt,arguments,He)}else Dt=Lt.apply(this,arguments);return te.default(this,Dt)}}(ke);function ke(Lt){var Dt;k.default(this,ke),Dt=De.call(this),Q.default(D.default(Dt),"backoffDelay",0),Q.default(D.default(Dt),"nextBackoffDelay",0),Q.default(D.default(Dt),"backoffNumber",0),Q.default(D.default(Dt),"timeoutID",null),Q.default(D.default(Dt),"maxNumberOfRetry",-1);var ge=(Lt=Lt||{}).initialDelay,xt=Lt.maxDelay,pt=Lt.randomisationFactor,rn=Lt.factor;if(K(ge)&&ge<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(K(xt)&&xt<=1)throw new Error("The maximal timeout must be greater than 1.");if(K(pt)&&(pt<0||pt>1))throw new Error("The randomisation factor must be between 0 and 1.");if(K(rn)&&rn<=1)throw new Error("Exponential factor should be greater than 1.");if(Dt.initialDelay=ge||100,Dt.maxDelay=xt||1e4,Dt.maxDelay<=Dt.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return Dt.randomisationFactor=pt||0,Dt.factor=rn||2,Dt.reset(),Dt}return x.default(ke,[{key:"backoff",value:function(Dt){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",Dt),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,Dt)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(Dt){if(Dt<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(Dt));this.maxNumberOfRetry=Dt}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var Dt=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*Dt))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(Dt){return new ke(Dt)}}]),ke}(Y);G.AsyncRetrier=ue,G.Backoff=_e,G.Retrier=it},63384:(B,G,a)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});var i=a(25724),v=a(94064),b=a(66024),_=a(71559),C=a(87312),P=a(54216),S=a(96284),R=a(63532),k=a(2676);function x(_e){return _e&&"object"==typeof _e&&"default"in _e?_e:{default:_e}}var D=x(i),ee=x(v),te=x(b),J=x(_),Q=x(C),we=x(P),de=x(S),Y=x(R),Se=x(k);function pe(){}function ae(){ae.init.call(this)}function Ve(_e){return void 0===_e._maxListeners?ae.defaultMaxListeners:_e._maxListeners}function Le(_e,Pe,De,ke){var Lt,Dt,He;if("function"!=typeof De)throw new TypeError('"listener" argument must be a function');if((Dt=_e._events)?(Dt.newListener&&(_e.emit("newListener",Pe,De.listener?De.listener:De),Dt=_e._events),He=Dt[Pe]):(Dt=_e._events=new pe,_e._eventsCount=0),He){if("function"==typeof He?He=Dt[Pe]=ke?[De,He]:[He,De]:ke?He.unshift(De):He.push(De),!He.warned&&(Lt=Ve(_e))&&Lt>0&&He.length>Lt){He.warned=!0;var ge=new Error("Possible EventEmitter memory leak detected. "+He.length+" "+Pe+" listeners added. Use emitter.setMaxListeners() to increase limit");ge.name="MaxListenersExceededWarning",ge.emitter=_e,ge.type=Pe,ge.count=He.length,function W(_e){"function"==typeof console.warn?console.warn(_e):console.log(_e)}(ge)}}else He=Dt[Pe]=De,++_e._eventsCount;return _e}function We(_e,Pe,De){var ke=!1;
1function Lt(){_e.removeListener(Pe,Lt),ke||(ke=!0,De.apply(_e,arguments))}return Lt.listener=De,Lt}function At(_e){var Pe=this._events;if(Pe){var De=Pe[_e];if("function"==typeof De)return 1;if(De)return De.length}return 0}function it(_e,Pe){for(var De=new Array(Pe);Pe--;)De[Pe]=_e[Pe];return De}pe.prototype=Object.create(null),ae.EventEmitter=ae,ae.usingDomains=!1,ae.prototype.domain=void 0,ae.prototype._events=void 0,ae.prototype._maxListeners=void 0,ae.defaultMaxListeners=10,ae.init=function(){this.domain=null,ae.usingDomains&&(void 0).active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new pe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ae.prototype.setMaxListeners=function(Pe){if("number"!=typeof Pe||Pe<0||isNaN(Pe))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=Pe,this},ae.prototype.getMaxListeners=function(){return Ve(this)},ae.prototype.emit=function(Pe){var De,ke,Lt,Dt,He,ge,xt,pt="error"===Pe;if(ge=this._events)pt=pt&&null==ge.error;else if(!pt)return!1;if(xt=this.domain,pt){if(De=arguments[1],!xt){if(De instanceof Error)throw De;var rn=new Error('Uncaught, unspecified "error" event. ('+De+")");throw rn.context=De,rn}return De||(De=new Error('Uncaught, unspecified "error" event')),De.domainEmitter=this,De.domain=xt,De.domainThrown=!1,xt.emit("error",De),!1}if(!(ke=ge[Pe]))return!1;var cn="function"==typeof ke;switch(Lt=arguments.length){case 1:!function Ne(_e,Pe,De){if(Pe)_e.call(De);else for(var ke=_e.length,Lt=it(_e,ke),Dt=0;Dt<ke;++Dt)Lt[Dt].call(De)}(ke,cn,this);break;case 2:!function Ie(_e,Pe,De,ke){if(Pe)_e.call(De,ke);else for(var Lt=_e.length,Dt=it(_e,Lt),He=0;He<Lt;++He)Dt[He].call(De,ke)}(ke,cn,this,arguments[1]);break;case 3:!function H(_e,Pe,De,ke,Lt){if(Pe)_e.call(De,ke,Lt);else for(var Dt=_e.length,He=it(_e,Dt),ge=0;ge<Dt;++ge)He[ge].call(De,ke,Lt)}(ke,cn,this,arguments[1],arguments[2]);break;case 4:!function j(_e,Pe,De,ke,Lt,Dt){if(Pe)_e.call(De,ke,Lt,Dt);else for(var He=_e.length,ge=it(_e,He),xt=0;xt<He;++xt)ge[xt].call(De,ke,Lt,Dt)}(ke,cn,this,arguments[1],arguments[2],arguments[3]);break;default:for(Dt=new Array(Lt-1),He=1;He<Lt;He++)Dt[He-1]=arguments[He];!function ye(_e,Pe,De,ke){if(Pe)_e.apply(De,ke);else for(var Lt=_e.length,Dt=it(_e,Lt),He=0;He<Lt;++He)Dt[He].apply(De,ke)}(ke,cn,this,Dt)}return!0},ae.prototype.on=ae.prototype.addListener=function(Pe,De){return Le(this,Pe,De,!1)},ae.prototype.prependListener=function(Pe,De){return Le(this,Pe,De,!0)},ae.prototype.once=function(Pe,De){if("function"!=typeof De)throw new TypeError('"listener" argument must be a function');return this.on(Pe,We(this,Pe,De)),this},ae.prototype.prependOnceListener=function(Pe,De){if("function"!=typeof De)throw new TypeError('"listener" argument must be a function');return this.prependListener(Pe,We(this,Pe,De)),this},ae.prototype.removeListener=function(Pe,De){var ke,Lt,Dt,He,ge;if("function"!=typeof De)throw new TypeError('"listener" argument must be a function');if(!(Lt=this._events))return this;if(!(ke=Lt[Pe]))return this;if(ke===De||ke.listener&&ke.listener===De)0==--this._eventsCount?this._events=new pe:(delete Lt[Pe],Lt.removeListener&&this.emit("removeListener",Pe,ke.listener||De));else if("function"!=typeof ke){for(Dt=-1,He=ke.length;He-- >0;)if(ke[He]===De||ke[He].listener&&ke[He].listener===De){ge=ke[He].listener,Dt=He;break}if(Dt<0)return this;if(1===ke.length){if(ke[0]=void 0,0==--this._eventsCount)return this._events=new pe,this;delete Lt[Pe]}else!function Ut(_e,Pe){for(var De=Pe,ke=De+1,Lt=_e.length;ke<Lt;De+=1,ke+=1)_e[De]=_e[ke];_e.pop()}(ke,Dt);Lt.removeListener&&this.emit("removeListener",Pe,ge||De)}return this},ae.prototype.off=function(_e,Pe){return this.removeListener(_e,Pe)},ae.prototype.removeAllListeners=function(Pe){var De,ke;if(!(ke=this._events))return this;if(!ke.removeListener)return 0===arguments.length?(this._events=new pe,this._eventsCount=0):ke[Pe]&&(0==--this._eventsCount?this._events=new pe:delete ke[Pe]),this;if(0===arguments.length){for(var He,Lt=Object.keys(ke),Dt=0;Dt<Lt.length;++Dt)"removeListener"!==(He=Lt[Dt])&&this.removeAllListeners(He);return this.removeAllListeners("removeListener"),this._events=new pe,this._eventsCount=0,this}if("function"==typeof(De=ke[Pe]))this.removeListener(Pe,De);else if(De)do{this.removeListener(Pe,De[De.length-1])}while(De[0]);return this},ae.prototype.listeners=function(Pe){var De,ke,Lt=this._events;return ke=Lt&&(De=Lt[Pe])?"function"==typeof De?[De.listener||De]:function ue(_e){for(var Pe=new Array(_e.length),De=0;De<Pe.length;++De)Pe[De]=_e[De].listener||_e[De];return Pe}(De):[],ke},ae.listenerCount=function(_e,Pe){return"function"==typeof _e.listenerCount?_e.listenerCount(Pe):At.call(_e,Pe)},ae.prototype.listenerCount=At,ae.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},G.ReplayEventEmitter=function(_e){we.default(De,_e);
1var Pe=function se(_e){var Pe=function ce(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var Lt,ke=Y.default(_e);if(Pe){var Dt=Y.default(this).constructor;Lt=Reflect.construct(ke,arguments,Dt)}else Lt=ke.apply(this,arguments);return de.default(this,Lt)}}(De);function De(){var ke;return ee.default(this,De),ke=Pe.call(this),Se.default(J.default(ke),"eventHistory",new Map),ke}return te.default(De,[{key:"on",value:function(Lt,Dt){return Q.default(Y.default(De.prototype),"on",this).call(this,Lt,Dt)}},{key:"once",value:function(Lt,Dt){return Q.default(Y.default(De.prototype),"once",this).call(this,Lt,Dt)}},{key:"off",value:function(Lt,Dt){return Q.default(Y.default(De.prototype),"off",this).call(this,Lt,Dt)}},{key:"emit",value:function(Lt){for(var Dt,He=arguments.length,ge=new Array(He>1?He-1:0),xt=1;xt<He;xt++)ge[xt-1]=arguments[xt];return this.eventHistory.set(Lt,ge),(Dt=Q.default(Y.default(De.prototype),"emit",this)).call.apply(Dt,[this,Lt].concat(ge))}},{key:"addListener",value:function(Lt,Dt){return Q.default(Y.default(De.prototype),"addListener",this).call(this,Lt,Dt)}},{key:"removeListener",value:function(Lt,Dt){return Q.default(Y.default(De.prototype),"removeListener",this).call(this,Lt,Dt)}},{key:"addListenerWithReplay",value:function(Lt,Dt){var He=this.eventHistory.get(Lt);return void 0!==He&&Dt.apply(void 0,D.default(He)),this.addListener(Lt,Dt)}},{key:"onWithReplay",value:function(Lt,Dt){return this.addListenerWithReplay(Lt,Dt)}},{key:"onceWithReplay",value:function(Lt,Dt){var He=this.eventHistory.get(Lt);return void 0!==He?(Dt.apply(void 0,D.default(He)),this):Q.default(Y.default(De.prototype),"once",this).call(this,Lt,Dt)}}]),De}(ae)},88548:(B,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});var a="\\d+(?:[\\.,]\\d+)?",C=["weeks","years","months","days","hours","minutes","seconds"],P=G.pattern=new RegExp("P(?:("+a+"W)|("+a+"Y)?("+a+"M)?("+a+"D)?(?:T("+a+"H)?("+a+"M)?("+a+"S)?)?)"),S=G.parse=function(D){return D.match(P).slice(1).reduce(function(ee,te,J){return ee[C[J]]=parseFloat(te)||0,ee},{})},R=G.end=function(D,ee){var te=ee?ee.getTime():Date.now(),J=new Date(te);return J.setFullYear(J.getFullYear()+D.years),J.setMonth(J.getMonth()+D.months),J.setDate(J.getDate()+D.days),J.setHours(J.getHours()+D.hours),J.setMinutes(J.getMinutes()+D.minutes),J.setMilliseconds(J.getMilliseconds()+1e3*D.seconds),J.setDate(J.getDate()+7*D.weeks),J},k=G.toSeconds=function(D,ee){var te=ee?ee.getTime():Date.now(),J=new Date(te);return(R(D,J).getTime()-J.getTime())/1e3};G.default={end:R,toSeconds:k,pattern:P,parse:S}},19400:B=>{B.exports=window.FormData},79976:function(B){B.exports=function(G){var a={};function i(v){if(a[v])return a[v].exports;var b=a[v]={i:v,l:!1,exports:{}};return G[v].call(b.exports,b,b.exports,i),b.l=!0,b.exports}return i.m=G,i.c=a,i.i=function(v){return v},i.d=function(v,b,_){i.o(v,b)||Object.defineProperty(v,b,{configurable:!1,enumerable:!0,get:_})},i.n=function(v){var b=v&&v.__esModule?function(){return v.default}:function(){return v};return i.d(b,"a",b),b},i.o=function(v,b){return Object.prototype.hasOwnProperty.call(v,b)},i.p="",i(i.s=5)}([function(G,a,i){"use strict";G.exports=function(v,b){var _,C,P;for(_=1;_<arguments.length;_++)for(P in C=arguments[_])C.hasOwnProperty(P)&&(v[P]=C[P]);return v}},function(G,a,i){"use strict";var v=i(0);G.exports={build:function(b,_){var C,P,S,R=_.plugins;for(C=0,P=R.length;C<P;C++)(S=R[C]).methods&&v(b,S.methods),S.properties&&Object.defineProperties(b,S.properties)},hook:function(b,_,C){var P,S,R,x=b.config.plugins,D=[b.context];for(C&&(D=D.concat(C)),P=0,S=x.length;P<S;P++)(R=x[P][_])&&R.apply(x[P],D)}}},function(G,a,i){"use strict";function v(b){if(0===b.length)return b;var _,C,S=b.split(/[_-]/);if(1===S.length&&S[0][0].toLowerCase()===S[0][0])return b;for(C=S[0].toLowerCase(),_=1;_<S.length;_++)C=C+S[_].charAt(0).toUpperCase()+S[_].substring(1).toLowerCase();return C}v.prepended=function(b,_){return b+(_=v(_))[0].toUpperCase()+_.substring(1)},G.exports=v},function(G,a,i){"use strict";var v=i(0),b=i(2);function _(C,P){this.options=C=C||{},this.defaults=P.defaults,this.states=[],this.transitions=[],this.map={},this.lifecycle=this.configureLifecycle(),this.init=this.configureInitTransition(C.init),this.data=this.configureData(C.data),this.methods=this.configureMethods(C.methods),this.map[this.defaults.wildcard]={},this.configureTransitions(C.transitions||[]),this.plugins=this.configurePlugins(C.plugins,P.plugin)}v(_.prototype,{addState:function(C){this.map[C]||(this.states.push(C),this.addStateLifecycleNames(C),this.map[C]={})},addStateLifecycleNames:function(C){this.lifecycle.onEnter[C]=b.prepended("onEnter",C),this.lifecycle.onLeave[C]=b.prepended("onLeave",C),this.lifecycle.on[C]=b.prepended("on",C)},addTransition:function(C){this.transitions.indexOf(C)<0&&(this.transitions.push(C),this.addTransitionLifecycleNames(C))},addTransitionLifecycleNames:function(C){this.lifecycle.onBefore[C]=b.prepended("onBefore",C),this.lifecycle.onAfter[C]=b.prepended("onAfter",C),this.lifecycle.on[C]=b.prepended("on",C)},mapTransition:function(C){var P=C.name,S=C.from,R=C.to;return this.addState(S),"function"!=typeof R&&this.addState(R),this.addTransition(P),this.map[S][P]=C,C},configureLifecycle:function(){return{onBefore:{transition:"onBeforeTransition"},onAfter:{transition:"onAfterTransition"},onEnter:{state:"onEnterState"},onLeave:{state:"onLeaveState"},on:{transition:"onTransition"}}},configureInitTransition:function(C){return"string"==typeof C?this.mapTransition(v({},this.defaults.init,{to:C,active:!0})):"object"==typeof C?this.mapTransition(v({},this.defaults.init,C,{active:!0})):(this.addState(this.defaults.init.from),this.defaults.init)},configureData:function(C){return"function"==typeof C?C:"object"==typeof C?function(){return C}:function(){return{}}},configureMethods:function(C){return C||{}},configurePlugins:function(C,P){var S,R,k;for(S=0,R=(C=C||[]).length;S<R;S++)"function"==typeof(k=C[S])&&(C[S]=k=k()),k.configure&&k.configure(this);return C},configureTransitions:function(C){var P,S,R,k,x,D=this.defaults.wildcard;for(S=0;S<C.length;S++)for(R=C[S],k=Array.isArray(R.from)?R.from:[R.from||D],x=R.to||D,P=0;P<k.length;P++)this.mapTransition({name:R.name,from:k[P],to:x})},transitionFor:function(C,P){return this.map[C][P]||this.map[this.defaults.wildcard][P]},transitionsFor:function(C){var P=this.defaults.wildcard;return Object.keys(this.map[C]).concat(Object.keys(this.map[P]))},allStates:function(){return this.states},allTransitions:function(){return this.transitions}}),G.exports=_},function(G,a,i){var v=i(0),b=i(6),_=i(1),C=[null,[]];function P(S,R){this.context=S,this.config=R,this.state=R.init.from,this.observers=[S]}v(P.prototype,{init:function(S){if(v(this.context,this.config.data.apply(this.context,S)),_.hook(this,"init"),this.config.init.active)return this.fire(this.config.init.name,[])},is:function(S){return Array.isArray(S)?S.indexOf(this.state)>=0:this.state===S},isPending:function(){return this.pending},can:function(S){return!this.isPending()&&!!this.seek(S)},cannot:function(S){return!this.can(S)},allStates:function(){return this.config.allStates()},allTransitions:function(){return this.config.allTransitions()},transitions:function(){return this.config.transitionsFor(this.state)},seek:function(S,R){var k=this.config.defaults.wildcard,x=this.config.transitionFor(this.state,S),D=x&&x.to;return"function"==typeof D?D.apply(this.context,R):D===k?this.state:D},fire:function(S,R){return this.transit(S,this.state,this.seek(S,R),R)},transit:function(S,R,k,x){var D=this.config.lifecycle,ee=this.config.options.observeUnchangedState||R!==k;return k?this.isPending()?this.context.onPendingTransition(S,R,k):(this.config.addState(k),this.beginTransit(),x.unshift({transition:S,from:R,to:k,fsm:this.context}),this.observeEvents([this.observersForEvent(D.onBefore.transition),this.observersForEvent(D.onBefore[S]),ee?this.observersForEvent(D.onLeave.state):C,ee?this.observersForEvent(D.onLeave[R]):C,this.observersForEvent(D.on.transition),ee?["doTransit",[this]]:C,ee?this.observersForEvent(D.onEnter.state):C,ee?this.observersForEvent(D.onEnter[k]):C,ee?this.observersForEvent(D.on[k]):C,this.observersForEvent(D.onAfter.transition),this.observersForEvent(D.onAfter[S]),this.observersForEvent(D.on[S])],x)):this.context.onInvalidTransition(S,R,k)},beginTransit:function(){this.pending=!0},endTransit:function(S){return this.pending=!1,S},failTransit:function(S){throw this.pending=!1,S},doTransit:function(S){this.state=S.to},observe:function(S){if(2===S.length){var R={};R[S[0]]=S[1],this.observers.push(R)}else this.observers.push(S[0])},observersForEvent:function(S){for(var x,R=0,k=this.observers.length,D=[];R<k;R++)(x=this.observers[R])[S]&&D.push(x);return[S,D,!0]},observeEvents:function(S,R,k,x){if(0===S.length)return this.endTransit(void 0===x||x);var D=S[0][0],ee=S[0][1],te=S[0][2];if(R[0].event=D,D&&te&&D!==k&&_.hook(this,"lifecycle",R),0===ee.length)return S.shift(),this.observeEvents(S,R,D,x);var J=ee.shift(),Q=J[D].apply(J,R);return Q&&"function"==typeof Q.then?Q.then(this.observeEvents.bind(this,S,R,D)).catch(this.failTransit.bind(this)):!1===Q?this.endTransit(!1):this.observeEvents(S,R,D,Q)},onInvalidTransition:function(S,R,k){throw new b("transition is invali
1d in current state",S,R,k,this.state)},onPendingTransition:function(S,R,k){throw new b("transition is invalid while previous transition is still in progress",S,R,k,this.state)}}),G.exports=P},function(G,a,i){"use strict";var v=i(0),b=i(2),_=i(1),C=i(3),P=i(4),S={is:function(te){return this._fsm.is(te)},can:function(te){return this._fsm.can(te)},cannot:function(te){return this._fsm.cannot(te)},observe:function(){return this._fsm.observe(arguments)},transitions:function(){return this._fsm.transitions()},allTransitions:function(){return this._fsm.allTransitions()},allStates:function(){return this._fsm.allStates()},onInvalidTransition:function(te,J,Q){return this._fsm.onInvalidTransition(te,J,Q)},onPendingTransition:function(te,J,Q){return this._fsm.onPendingTransition(te,J,Q)}},R={state:{configurable:!1,enumerable:!0,get:function(){return this._fsm.state},set:function(te){throw Error("use transitions to change state")}}};function k(te){return D(this||{},te)}function D(te,J){return ee(te,new C(J,k)),te._fsm(),te}function ee(te,J){if("object"!=typeof te||Array.isArray(te))throw Error("StateMachine can only be applied to objects");_.build(te,J),Object.defineProperties(te,R),v(te,S),v(te,J.methods),J.allTransitions().forEach(function(Q){te[b(Q)]=function(){return this._fsm.fire(Q,[].slice.call(arguments))}}),te._fsm=function(){this._fsm=new P(this,J),this._fsm.init(arguments)}}k.version="3.0.1",k.factory=function x(){var te,J;"function"==typeof arguments[0]?(te=arguments[0],J=arguments[1]||{}):(te=function(){this._fsm.apply(this,arguments)},J=arguments[0]||{});var Q=new C(J,k);return ee(te.prototype,Q),te.prototype._fsm.config=Q,te},k.apply=D,k.defaults={wildcard:"*",init:{name:"init",from:"none"}},G.exports=k},function(G,a,i){"use strict";G.exports=function(v,b,_,C,P){this.message=v,this.transition=b,this.from=_,this.to=C,this.current=P}}])},91704:B=>{B.exports=function v(b,_,C){function P(k,x){if(!_[k]){if(!b[k]){if(S)return S(k,!0);var ee=new Error("Cannot find module '"+k+"'");throw ee.code="MODULE_NOT_FOUND",ee}var te=_[k]={exports:{}};b[k][0].call(te.exports,function(J){return P(b[k][1][J]||J)},te,te.exports,v,b,_,C)}return _[k].exports}for(var S=void 0,R=0;R<C.length;R++)P(C[R]);return P}({1:[function(v,b,_){(function(C){"use strict";var S,P=C.MutationObserver||C.WebKitMutationObserver;if(P){var R=0,k=new P(J),x=C.document.createTextNode("");k.observe(x,{characterData:!0}),S=function(){x.data=R=++R%2}}else if(!C.setImmediate&&typeof C.MessageChannel<"u"){var D=new C.MessageChannel;D.port1.onmessage=J,S=function(){D.port2.postMessage(0)}}else S="document"in C&&"onreadystatechange"in C.document.createElement("script")?function(){var we=C.document.createElement("script");we.onreadystatechange=function(){J(),we.onreadystatechange=null,we.parentNode.removeChild(we),we=null},C.document.documentElement.appendChild(we)}:function(){setTimeout(J,0)};var ee,te=[];function J(){ee=!0;for(var we,de,Y=te.length;Y;){for(de=te,te=[],we=-1;++we<Y;)de[we]();Y=te.length}ee=!1}b.exports=function Q(we){1===te.push(we)&&!ee&&S()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(v,b,_){"use strict";var C=v(1);function P(){}var S={},R=["REJECTED"],k=["FULFILLED"],x=["PENDING"];function D(pe){if("function"!=typeof pe)throw new TypeError("resolver must be a function");this.state=x,this.queue=[],this.outcome=void 0,pe!==P&&Q(this,pe)}function ee(pe,ae,Ve){this.promise=pe,"function"==typeof ae&&(this.onFulfilled=ae,this.callFulfilled=this.otherCallFulfilled),"function"==typeof Ve&&(this.onRejected=Ve,this.callRejected=this.otherCallRejected)}function te(pe,ae,Ve){C(function(){var Ne;try{Ne=ae(Ve)}catch(Ie){return S.reject(pe,Ie)}Ne===pe?S.reject(pe,new TypeError("Cannot resolve promise with itself")):S.resolve(pe,Ne)})}function J(pe){var ae=pe&&pe.then;if(pe&&("object"==typeof pe||"function"==typeof pe)&&"function"==typeof ae)return function(){ae.apply(pe,arguments)}}function Q(pe,ae){var Ve=!1;function Ne(ye){Ve||(Ve=!0,S.reject(pe,ye))}function Ie(ye){Ve||(Ve=!0,S.resolve(pe,ye))}var j=we(function H(){ae(Ie,Ne)});"error"===j.status&&Ne(j.value)}function we(pe,ae){var Ve={};
1try{Ve.value=pe(ae),Ve.status="success"}catch(Ne){Ve.status="error",Ve.value=Ne}return Ve}b.exports=D,D.prototype.catch=function(pe){return this.then(null,pe)},D.prototype.then=function(pe,ae){if("function"!=typeof pe&&this.state===k||"function"!=typeof ae&&this.state===R)return this;var Ve=new this.constructor(P);return this.state!==x?te(Ve,this.state===k?pe:ae,this.outcome):this.queue.push(new ee(Ve,pe,ae)),Ve},ee.prototype.callFulfilled=function(pe){S.resolve(this.promise,pe)},ee.prototype.otherCallFulfilled=function(pe){te(this.promise,this.onFulfilled,pe)},ee.prototype.callRejected=function(pe){S.reject(this.promise,pe)},ee.prototype.otherCallRejected=function(pe){te(this.promise,this.onRejected,pe)},S.resolve=function(pe,ae){var Ve=we(J,ae);if("error"===Ve.status)return S.reject(pe,Ve.value);var Ne=Ve.value;if(Ne)Q(pe,Ne);else{pe.state=k,pe.outcome=ae;for(var Ie=-1,H=pe.queue.length;++Ie<H;)pe.queue[Ie].callFulfilled(ae)}return pe},S.reject=function(pe,ae){pe.state=R,pe.outcome=ae;for(var Ve=-1,Ne=pe.queue.length;++Ve<Ne;)pe.queue[Ve].callRejected(ae);return pe},D.resolve=function de(pe){return pe instanceof this?pe:S.resolve(new this(P),pe)},D.reject=function Y(pe){var ae=new this(P);return S.reject(ae,pe)},D.all=function Se(pe){var ae=this;if("[object Array]"!==Object.prototype.toString.call(pe))return this.reject(new TypeError("must be an array"));var Ve=pe.length,Ne=!1;if(!Ve)return this.resolve([]);for(var Ie=new Array(Ve),H=0,j=-1,ye=new this(P);++j<Ve;)Le(pe[j],j);return ye;function Le(W,We){ae.resolve(W).then(function At(Ut){Ie[We]=Ut,++H===Ve&&!Ne&&(Ne=!0,S.resolve(ye,Ie))},function(Ut){Ne||(Ne=!0,S.reject(ye,Ut))})}},D.race=function Ye(pe){var ae=this;if("[object Array]"!==Object.prototype.toString.call(pe))return this.reject(new TypeError("must be an array"));var Ve=pe.length,Ne=!1;if(!Ve)return this.resolve([]);for(var Ie=-1,H=new this(P);++Ie<Ve;)ae.resolve(pe[Ie]).then(function(Le){Ne||(Ne=!0,S.resolve(H,Le))},function(Le){Ne||(Ne=!0,S.reject(H,Le))});return H}},{1:1}],3:[function(v,b,_){(function(C){"use strict";"function"!=typeof C.Promise&&(C.Promise=v(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(v,b,_){"use strict";var C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(le){return typeof le}:function(le){return le&&"function"==typeof Symbol&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le};var R=function S(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}();function x(le,me){le=le||[],me=me||{};try{return new Blob(le,me)}catch(En){if("TypeError"!==En.name)throw En;for(var Pt=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),ln=0;ln<le.length;ln+=1)Pt.append(le[ln]);return Pt.getBlob(me.type)}}typeof Promise>"u"&&v(3);var D=Promise;function ee(le,me){me&&le.then(function(Re){me(null,Re)},function(Re){me(Re)})}function te(le,me,Re){"function"==typeof me&&le.then(me),"function"==typeof Re&&le.catch(Re)}function J(le){return"string"!=typeof le&&(console.warn(le+" used as a key, but it is not a string."),le=String(le)),le}function Q(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var we="local-forage-detect-blob-support",de=void 0,Y={},Se=Object.prototype.toString,Ye="readonly",pe="readwrite";function ae(le){for(var me=le.length,Re=new ArrayBuffer(me),Pt=new Uint8Array(Re),ln=0;ln<me;ln++)Pt[ln]=le.charCodeAt(ln);return Re}function Ne(le){return"boolean"==typeof de?D.resolve(de):function Ve(le){return new D(function(me){var Re=le.transaction(we,pe),Pt=x([""]);Re.objectStore(we).put(Pt,"key"),Re.onabort=function(ln){ln.preventDefault(),ln.stopPropagation(),me(!1)},Re.oncomplete=function(){var ln=navigator.userAgent.match(/Chrome\/(\d+)/),En=navigator.userAgent.match(/Edge\//);me(En||!ln||parseInt(ln[1],10)>=43)}}).catch(function(){return!1})}(le).then(function(me){return de=me})}function Ie(le){var me=Y[le.name],Re={};Re.promise=new D(function(Pt,ln){Re.resolve=Pt,Re.reject=ln}),me.deferredOperations.push(Re),me.dbReady=me.dbReady?me.dbReady.then(function(){return Re.promise}):Re.promise}function H(le){var Re=Y[le.name].deferredOperations.pop();if(Re)return Re.resolve(),Re.promise}function j(le,me){var Pt=Y[le.name].deferredOperations.pop();if(Pt)return Pt.reject(me),Pt.promise}function ye(le,me){return new D(function(Re,Pt){if(Y[le.name]=Y[le.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},le.db){if(!me)return Re(le.db);Ie(le),le.db.close()}var ln=[le.name];me&&ln.push(le.version);var En=R.open.apply(R,ln);me&&(En.onupgradeneeded=function(Mn){var br=En.result;try{br.createObjectStore(le.storeName),Mn.oldVersion<=1&&br.createObjectStore(we)}catch(Br){if("ConstraintError"!==Br.name)throw Br;console.warn('The database "'+le.name+'" has been upgraded from version '+Mn.oldVersion+" to version "+Mn.newVersion+', but the storage "'+le.storeName+'" already exists.')}}),En.onerror=function(Mn){Mn.preventDefault(),Pt(En.error)},En.onsuccess=function(){var Mn=En.result;Mn.onversionchange=function(br){br.target.close()},Re(Mn),H(le)}})}function Le(le){return ye(le,!1)}function W(le){return ye(le,!0)}function We(le,me){if(!le.db)return!0;var Re=!le.db.objectStoreNames.contains(le.storeName),ln=le.version>
1le.db.version;if(le.version<le.db.version&&(le.version!==me&&console.warn('The database "'+le.name+"\" can't be downgraded from version "+le.db.version+" to version "+le.version+"."),le.version=le.db.version),ln||Re){if(Re){var En=le.db.version+1;En>le.version&&(le.version=En)}return!0}return!1}function Ut(le){return x([ae(atob(le.data))],{type:le.type})}function it(le){return le&&le.__local_forage_encoded_blob}function ue(le){var me=this,Re=me._initReady().then(function(){var Pt=Y[me._dbInfo.name];if(Pt&&Pt.dbReady)return Pt.dbReady});return te(Re,le,le),Re}function ce(le,me,Re,Pt){void 0===Pt&&(Pt=1);try{var ln=le.db.transaction(le.storeName,me);Re(null,ln)}catch(En){if(Pt>0&&(!le.db||"InvalidStateError"===En.name||"NotFoundError"===En.name))return D.resolve().then(function(){if(!le.db||"NotFoundError"===En.name&&!le.db.objectStoreNames.contains(le.storeName)&&le.version<=le.db.version)return le.db&&(le.version=le.db.version+1),W(le)}).then(function(){return function se(le){Ie(le);for(var me=Y[le.name],Re=me.forages,Pt=0;Pt<Re.length;Pt++){var ln=Re[Pt];ln._dbInfo.db&&(ln._dbInfo.db.close(),ln._dbInfo.db=null)}return le.db=null,Le(le).then(function(En){return le.db=En,We(le)?W(le):En}).then(function(En){le.db=me.db=En;for(var Mn=0;Mn<Re.length;Mn++)Re[Mn]._dbInfo.db=En}).catch(function(En){throw j(le,En),En})}(le).then(function(){ce(le,me,Re,Pt-1)})}).catch(Re);Re(En)}}var rn={_driver:"asyncStorage",_initStorage:function _e(le){var me=this,Re={db:null};if(le)for(var Pt in le)Re[Pt]=le[Pt];var ln=Y[Re.name];ln||(Y[Re.name]=ln={forages:[],db:null,dbReady:null,deferredOperations:[]}),ln.forages.push(me),me._initReady||(me._initReady=me.ready,me.ready=ue);var En=[];function Mn(){return D.resolve()}for(var br=0;br<ln.forages.length;br++){var Br=ln.forages[br];Br!==me&&En.push(Br._initReady().catch(Mn))}var jr=ln.forages.slice(0);return D.all(En).then(function(){return Re.db=ln.db,Le(Re)}).then(function(gn){return Re.db=gn,We(Re,me._defaultConfig.version)?W(Re):gn}).then(function(gn){Re.db=ln.db=gn,me._dbInfo=Re;for(var Xe=0;Xe<jr.length;Xe++){var Tt=jr[Xe];Tt!==me&&(Tt._dbInfo.db=Re.db,Tt._dbInfo.version=Re.version)}})},_support:function k(){try{if(!R||!R.open)return!1;var le=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),me="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!le||me)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}(),iterate:function De(le,me){var Re=this,Pt=new D(function(ln,En){Re.ready().then(function(){ce(Re._dbInfo,Ye,function(Mn,br){if(Mn)return En(Mn);try{var jr=br.objectStore(Re._dbInfo.storeName).openCursor(),gn=1;jr.onsuccess=function(){var Xe=jr.result;if(Xe){var Tt=Xe.value;it(Tt)&&(Tt=Ut(Tt));var An=le(Tt,Xe.key,gn++);void 0!==An?ln(An):Xe.continue()}else ln()},jr.onerror=function(){En(jr.error)}}catch(Xe){En(Xe)}})}).catch(En)});return ee(Pt,me),Pt},getItem:function Pe(le,me){var Re=this;le=J(le);var Pt=new D(function(ln,En){Re.ready().then(function(){ce(Re._dbInfo,Ye,function(Mn,br){if(Mn)return En(Mn);try{var jr=br.objectStore(Re._dbInfo.storeName).get(le);jr.onsuccess=function(){var gn=jr.result;void 0===gn&&(gn=null),it(gn)&&(gn=Ut(gn)),ln(gn)},jr.onerror=function(){En(jr.error)}}catch(gn){En(gn)}})}).catch(En)});return ee(Pt,me),Pt},setItem:function ke(le,me,Re){var Pt=this;le=J(le);var ln=new D(function(En,Mn){var br;Pt.ready().then(function(){return br=Pt._dbInfo,"[object Blob]"===Se.call(me)?Ne(br.db).then(function(Br){return Br?me:function At(le){return new D(function(me,Re){var Pt=new FileReader;Pt.onerror=Re,Pt.onloadend=function(ln){var En=btoa(ln.target.result||"");me({__local_forage_encoded_blob:!0,data:En,type:le.type})},Pt.readAsBinaryString(le)})}(me)}):me}).then(function(Br){ce(Pt._dbInfo,pe,function(jr,gn){if(jr)return Mn(jr);try{var Xe=gn.objectStore(Pt._dbInfo.storeName);null===Br&&(Br=void 0);var Tt=Xe.put(Br,le);gn.oncomplete=function(){void 0===Br&&(Br=null),En(Br)},gn.onabort=gn.onerror=function(){Mn(Tt.error?Tt.error:Tt.transaction.error)}}catch(An){Mn(An)}})}).catch(Mn)});return ee(ln,Re),ln},removeItem:function Lt(le,me){var Re=this;le=J(le);var Pt=new D(function(ln,En){Re.ready().then(function(){ce(Re._dbInfo,pe,function(Mn,br){if(Mn)return En(Mn);try{var jr=br.objectStore(Re._dbInfo.storeName).delete(le);br.oncomplete=function(){ln()},br.onerror=function(){En(jr.error)},br.onabort=function(){En(jr.error?jr.error:jr.transaction.error)}}catch(gn){En(gn)}})}).catch(En)});return ee(Pt,me),Pt},clear:function Dt(le){var me=this,Re=new D(function(Pt,ln){me.ready().then(function(){ce(me._dbInfo,pe,function(En,Mn){if(En)return ln(En);try{var Br=Mn.objectStore(me._dbInfo.storeName).clear();Mn.oncomplete=function(){Pt()},Mn.onabort=Mn.onerror=function(){ln(Br.error?Br.error:Br.transaction.error)}}catch(jr){ln(jr)}})}).catch(ln)});return ee(Re,le),Re},length:function He(le){var me=this,Re=new D(function(Pt,ln){me.ready().then(function(){ce(me._dbInfo,Ye,function(En,Mn){if(En)return ln(En);try{var Br=Mn.objectStore(me._dbInfo.storeName).count();Br.onsuccess=function(){Pt(Br.result)},Br.onerror=function(){ln(Br.error)}}catch(jr){ln(jr)}})}).catch(ln)});return ee(Re,le),Re},key:function ge(le,me){var Re=this,Pt=new D(function(ln,En){le<0?ln(null):Re.ready().then(function(){ce(Re._dbInfo,Ye,function(Mn,br){if(Mn)return En(Mn);try{var Br=br.objectStore(Re._dbInfo.storeName),jr=!1,gn=Br.openKeyCursor();gn.onsuccess=function(){var Xe=gn.result;Xe?0===le||jr?ln(Xe.key):(jr=!0,Xe.advance(le)):ln(null)},gn.onerror=function(){En(gn.error)}}catch(Xe){En(Xe)}})}).catch(En)});return ee(Pt,me),Pt},keys:function xt(le){var me=this,Re=new D(function(Pt,ln){me.ready().then(function(){ce(me._dbInfo,Ye,function(En,Mn){if(En)return ln(En);try{var Br=Mn.objectStore(me._dbInfo.storeName).openKeyCursor(),jr=[];Br.onsuccess=function(){var gn=Br.result;gn?(jr.push(gn.key),gn.continue()):Pt(jr)},Br.onerror=function(){ln(Br.error)}}catch(gn){ln(gn)}})}).catch(ln)});return ee(Re,le),Re},dropInstance:function pt(le,me){me=Q.apply(this,arguments);var ln,Re=this.config();return(le="function"!=typeof le&&le||{}).name||(le.name=le.name||Re.name,le.storeName=le.storeName||Re.storeName),ee(ln=le.name?(le.name===Re.name&&this._dbInfo.db?D.resolve(this._dbInfo.db):Le(le).then(function(br){var Br=Y[le.name],jr=Br.forages;Br.db=br;for(var gn=0;gn<jr.length;gn++)jr[gn]._dbInfo.db=br;return br})).then(le.storeName?function(br){if(br.objectStoreNames.contains(le.storeName)){var Br=br.version+1;Ie(le);var jr=Y[le.name],gn=jr.forages;br.close();for(var Xe=0;Xe<gn.length;Xe++){var Tt=gn[Xe];Tt._dbInfo.db=null,Tt._dbInfo.version=Br}return new D(function(Nn,ir){var pr=R.open(le.name,Br);pr.onerror=function(Tr){pr.result.close(),ir(Tr)},pr.onupgradeneeded=function(){pr.result.deleteObjectStore(le.storeName)},pr.onsuccess=function(){var Tr=pr.result;Tr.close(),Nn(Tr)}}).then(function(Nn){jr.db=Nn;for(var ir=0;ir<gn.length;ir++){var pr=gn[ir];pr._dbInfo.db=Nn,H(pr._dbInfo)}}).catch(function(Nn){throw(j(le,Nn)||D.resolve()).catch(function(){}),Nn})}}:function(br){Ie(le);var Br=Y[le.name],jr=Br.forages;br.close();for(var gn=0;gn<jr.length;gn++)jr[gn]._dbInfo.db=null;return new D(function(An,Nn){var ir=R.deleteDatabase(le.name);ir.onerror=function(){var pr=ir.result;pr&&pr.close(),Nn(ir.error)},ir.onblocked=function(){console.warn('dropInstance blocked for database "'+le.name+'" until all open connections are closed')},ir.onsuccess=function(){var pr=ir.result;pr&&pr.close(),An(pr)}}).then(function(An){Br.db=An;for(var Nn=0;Nn<jr.length;Nn++)H(jr[Nn]._dbInfo)}).catch(function(An){throw(j(le,An)||D.resolve()).catch(function(){}),An})}):D.reject("Invalid arguments"),me),ln}};var mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",lt=/^~~local_forage_type~([^~]+)~/,rt="__lfsc__:",an="arbf",Yn="blob",Kr=Object.prototype.toString;function Jr(le){var Pt,En,Mn,br,Br,me=.75*le.length,Re=le.length,ln=0;"="===le[le.length-1]&&(me--,"="===le[le.length-2]&&me--);var jr=new ArrayBuffer(me),gn=new Uint8Array(jr);for(Pt=0;Pt<Re;Pt+=4)En=mn.indexOf(le[Pt]),Mn=mn.indexOf(le[Pt+1]),br=mn.indexOf(le[Pt+2]),Br=mn.indexOf(le[Pt+3]),gn[ln++]=En<<2|Mn>>4,gn[ln++]=(15&Mn)<<4|br>>2,gn[ln++]=(3&br)<<6|63&Br;return jr}function sr(le){var Pt,me=new Uint8Array(le),Re="";for(Pt=0;Pt<me.length;Pt+=3)Re+=mn[me[Pt]>>2],Re+=mn[(3&me[Pt])<<4|me[Pt+1]>>4],Re+=mn[(15&me[Pt+1])<<2|me[Pt+2]>>6],Re+=mn[63&me[Pt+2]];return me.length%3==2?Re=Re.substring(0,Re.length-1)+"=":me.length%3==1&&(Re=Re.substring(0,Re.length-2)+"=="),Re}var sn={serialize:function or(le,me){var Re="";if(le&&(Re=Kr.call(le)),le&&("[object ArrayBuffer]"===Re||le.buffer&&"[object ArrayBuffer]"===Kr.call(le.buffer))){var Pt,ln=rt;le instanceof ArrayBuffer?(Pt=le,ln+=an):(Pt=le.buffer,"[object Int8Array]"===Re?ln+="si08":"[object Uint8Array]"===Re?ln+="ui08":"[object Uint8ClampedArray]"===Re?ln+="uic8":"[object Int16Array]"===Re?ln+="si16":"[object Uint16Array]"===Re?ln+="ur16":"[object Int32Array]"===Re?ln+="si32":"[object Uint32Array]"===Re?ln+="ui32":"[object Float32Array]"===Re?ln+="fl32":"[object Float64Array]"===Re?ln+="fl64":me(new Error("Failed to get type for BinaryArray"))),me(ln+sr(Pt))}else if("[object Blob]"===Re){var En=new FileReader;En.onload=function(){var Mn="~~local_forage_type~"+le.type+"~"+sr(this.result);me(rt+Yn+Mn)},En.readAsArrayBuffer(le)}else try{me(JSON.stringify(le))}catch(Mn){console.error("Couldn't convert value into a JSON string: ",le),me(null,Mn)}},deserialize:function zr(le){if(le.substring(0,9)!==rt)return JSON.parse(le);var Pt,me=le.substring(13),Re=le.substring(9,13);if(Re===Yn&<.test(me)){var ln=me.match(lt);Pt=ln[1],me=me.substring(ln[0].length)}var En=Jr(me);switch(Re){case an:return En;case Yn:return x([En],{type:Pt});case"si08":return new Int8Array(En);case"ui08":return new Uint8Array(En);case"uic8":return new Uint8ClampedArray(En);case"si16":return new Int16Array(En);case"ur16":return new Uint16Array(En);case"si32":return new Int32Array(En);case"ui32":return new Uint32Array(En);case"fl32":return new Float32Array(En);case"fl64":return new Float64Array(En);default:throw new Error("Unkown type: "+Re)}},stringToBuffer:Jr,bufferToString:sr};function Qe(le,me,Re,Pt){le.executeSql("CREATE TABLE IF NOT EXISTS "+me.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],Re,Pt)}function Xt(le,me,Re,Pt,ln,En){le.executeSql(Re,Pt,ln,function(Mn,br){br.code===br.SYNTAX_ERR?Mn.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[me.storeName],function(Br,jr){jr.rows.length?En(Br,br):Qe(Br,me,function(){Br.executeSql(Re,Pt,ln,En)},En)},En):En(Mn,br)},En)}function vn(le,me,Re,Pt){var ln=this;le=J(le);var En=new D(function(Mn,br){ln.ready().then(function(){void 0===me&&(me=null);var Br=me,jr=ln._dbInfo;jr.serializer.serialize(me,function(gn,Xe){Xe?br(Xe):jr.db.transaction(function(Tt){Xt(Tt,jr,"INSERT OR REPLACE INTO "+jr.storeName+" (key, value) VALUES (?, ?)",[le,gn],function(){Mn(Br)},function(An,Nn){br(Nn)})},function(Tt){if(Tt.code===Tt.QUOTA_ERR){if(Pt>0)return void Mn(vn.apply(ln,[le,Br,Re,Pt-1]));br(Tt)}})})}).catch(br)});return ee(En,Re),En}var dn={_driver:"webSQLStorage",_initStorage:function ut(le){var me=this,Re={db:null};if(le)for(var Pt in le)Re[Pt]="string"!=typeof le[Pt]?le[Pt].toString():le[Pt];var ln=new D(function(En,Mn){try{Re.db=openDatabase(Re.name,String(Re.version),Re.description,Re.size)}catch(br){return Mn(br)}Re.db.transaction(function(br){Qe(br,Re,function(){me._dbInfo=Re,En()},function(Br,jr){Mn(jr)})},Mn)});return Re.serializer=sn,ln},_support:function cn(){return"function"==typeof openDatabase}(),iterate:function dr(le,me){var Re=this,Pt=new D(function(ln,En){Re.ready().then(function(){var Mn=Re._dbInfo;Mn.db.transaction(function(br){Xt(br,Mn,"SELECT * FROM "+Mn.storeName,[],function(Br,jr){for(var gn=jr.rows,Xe=gn.length,Tt=0;Tt<Xe;Tt++){var An=gn.item(Tt),Nn=An.value;
1if(Nn&&(Nn=Mn.serializer.deserialize(Nn)),void 0!==(Nn=le(Nn,An.key,Tt+1)))return void ln(Nn)}ln()},function(Br,jr){En(jr)})})}).catch(En)});return ee(Pt,me),Pt},getItem:function wn(le,me){var Re=this;le=J(le);var Pt=new D(function(ln,En){Re.ready().then(function(){var Mn=Re._dbInfo;Mn.db.transaction(function(br){Xt(br,Mn,"SELECT * FROM "+Mn.storeName+" WHERE key = ? LIMIT 1",[le],function(Br,jr){var gn=jr.rows.length?jr.rows.item(0).value:null;gn&&(gn=Mn.serializer.deserialize(gn)),ln(gn)},function(Br,jr){En(jr)})})}).catch(En)});return ee(Pt,me),Pt},setItem:function jt(le,me,Re){return vn.apply(this,[le,me,Re,1])},removeItem:function Ct(le,me){var Re=this;le=J(le);var Pt=new D(function(ln,En){Re.ready().then(function(){var Mn=Re._dbInfo;Mn.db.transaction(function(br){Xt(br,Mn,"DELETE FROM "+Mn.storeName+" WHERE key = ?",[le],function(){ln()},function(Br,jr){En(jr)})})}).catch(En)});return ee(Pt,me),Pt},clear:function Mt(le){var me=this,Re=new D(function(Pt,ln){me.ready().then(function(){var En=me._dbInfo;En.db.transaction(function(Mn){Xt(Mn,En,"DELETE FROM "+En.storeName,[],function(){Pt()},function(br,Br){ln(Br)})})}).catch(ln)});return ee(Re,le),Re},length:function Ze(le){var me=this,Re=new D(function(Pt,ln){me.ready().then(function(){var En=me._dbInfo;En.db.transaction(function(Mn){Xt(Mn,En,"SELECT COUNT(key) as c FROM "+En.storeName,[],function(br,Br){var jr=Br.rows.item(0).c;Pt(jr)},function(br,Br){ln(Br)})})}).catch(ln)});return ee(Re,le),Re},key:function et(le,me){var Re=this,Pt=new D(function(ln,En){Re.ready().then(function(){var Mn=Re._dbInfo;Mn.db.transaction(function(br){Xt(br,Mn,"SELECT key FROM "+Mn.storeName+" WHERE id = ? LIMIT 1",[le+1],function(Br,jr){var gn=jr.rows.length?jr.rows.item(0).key:null;ln(gn)},function(Br,jr){En(jr)})})}).catch(En)});return ee(Pt,me),Pt},keys:function Zt(le){var me=this,Re=new D(function(Pt,ln){me.ready().then(function(){var En=me._dbInfo;En.db.transaction(function(Mn){Xt(Mn,En,"SELECT key FROM "+En.storeName,[],function(br,Br){for(var jr=[],gn=0;gn<Br.rows.length;gn++)jr.push(Br.rows.item(gn).key);Pt(jr)},function(br,Br){ln(Br)})})}).catch(ln)});return ee(Re,le),Re},dropInstance:function ft(le,me){me=Q.apply(this,arguments);var Re=this.config();(le="function"!=typeof le&&le||{}).name||(le.name=le.name||Re.name,le.storeName=le.storeName||Re.storeName);var ln,Pt=this;return ee(ln=le.name?new D(function(En){var Mn;Mn=le.name===Re.name?Pt._dbInfo.db:openDatabase(le.name,"","",0),En(le.storeName?{db:Mn,storeNames:[le.storeName]}:function Fe(le){return new D(function(me,Re){le.transaction(function(Pt){Pt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(ln,En){for(var Mn=[],br=0;br<En.rows.length;br++)Mn.push(En.rows.item(br).name);me({db:le,storeNames:Mn})},function(ln,En){Re(En)})},function(Pt){Re(Pt)})})}(Mn))}).then(function(En){return new D(function(Mn,br){En.db.transaction(function(Br){function jr(An){return new D(function(Nn,ir){Br.executeSql("DROP TABLE IF EXISTS "+An,[],function(){Nn()},function(pr,Tr){ir(Tr)})})}for(var gn=[],Xe=0,Tt=En.storeNames.length;Xe<Tt;Xe++)gn.push(jr(En.storeNames[Xe]));D.all(gn).then(function(){Mn()}).catch(function(An){br(An)})},function(Br){br(Br)})})}):D.reject("Invalid arguments"),me),ln}};function Bn(le,me){var Re=le.name+"/";return le.storeName!==me.storeName&&(Re+=le.storeName+"/"),Re}function tr(){return!function mr(){var le="_localforage_support_test";try{return localStorage.setItem(le,!0),localStorage.removeItem(le),!1}catch{return!0}}()||localStorage.length>0}var jn={_driver:"localStorageWrapper",_initStorage:function Ir(le){var Re={};if(le)for(var Pt in le)Re[Pt]=le[Pt];return Re.keyPrefix=Bn(le,this._defaultConfig),tr()?(this._dbInfo=Re,Re.serializer=sn,D.resolve()):D.reject()},_support:function Tn(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function Ai(le,me){var Re=this,Pt=Re.ready().then(function(){for(var ln=Re._dbInfo,En=ln.keyPrefix,Mn=En.length,br=localStorage.length,Br=1,jr=0;jr<br;jr++){var gn=localStorage.key(jr);if(0===gn.indexOf(En)){var Xe=localStorage.getItem(gn);if(Xe&&(Xe=ln.serializer.deserialize(Xe)),void 0!==(Xe=le(Xe,gn.substring(Mn),Br++)))return Xe}}});return ee(Pt,me),Pt},getItem:function Er(le,me){var Re=this;le=J(le);var Pt=Re.ready().then(function(){var ln=Re._dbInfo,En=localStorage.getItem(ln.keyPrefix+le);return En&&(En=ln.serializer.deserialize(En)),En});return ee(Pt,me),Pt},setItem:function Wn(le,me,Re){var Pt=this;le=J(le);var ln=Pt.ready().then(function(){void 0===me&&(me=null);var En=me;return new D(function(Mn,br){var Br=Pt._dbInfo;Br.serializer.serialize(me,function(jr,gn){if(gn)br(gn);else try{localStorage.setItem(Br.keyPrefix+le,jr),Mn(En)}catch(Xe){("QuotaExceededError"===Xe.name||"NS_ERROR_DOM_QUOTA_REACHED"===Xe.name)&&br(Xe),br(Xe)}})})});return ee(ln,Re),ln},removeItem:function Ht(le,me){var Re=this;le=J(le);var Pt=Re.ready().then(function(){localStorage.removeItem(Re._dbInfo.keyPrefix+le)});return ee(Pt,me),Pt},clear:function ur(le){var me=this,Re=me.ready().then(function(){for(var Pt=me._dbInfo.keyPrefix,ln=localStorage.length-1;ln>=0;ln--){var En=localStorage.key(ln);0===En.indexOf(Pt)&&localStorage.removeItem(En)}});return ee(Re,le),Re},length:function nr(le){var Re=this.keys().then(function(Pt){return Pt.length});return ee(Re,le),Re},key:function Di(le,me){var Re=this,Pt=Re.ready().then(function(){var En,ln=Re._dbInfo;try{En=localStorage.key(le)}catch{En=null}return En&&(En=En.substring(ln.keyPrefix.length)),En});return ee(Pt,me),Pt},keys:function Pi(le){var me=this,Re=me.ready().then(function(){for(var Pt=me._dbInfo,ln=localStorage.length,En=[],Mn=0;Mn<ln;Mn++){var br=localStorage.key(Mn);0===br.indexOf(Pt.keyPrefix)&&En.push(br.substring(Pt.keyPrefix.length))}return En});return ee(Re,le),Re},dropInstance:function $n(le,me){if(me=Q.apply(this,arguments),!(le="function"!=typeof le&&le||{}).name){var Re=this.config();le.name=le.name||Re.name,le.storeName=le.storeName||Re.storeName}var ln,Pt=this;return ee(ln=le.name?new D(function(En){En(le.storeName?Bn(le,Pt._defaultConfig):le.name+"/")}).then(function(En){for(var Mn=localStorage.length-1;Mn>=0;Mn--){var br=localStorage.key(Mn);0===br.indexOf(En)&&localStorage.removeItem(br)}}):D.reject("Invalid arguments"),me),ln}},wr=function(me,Re){return me===Re||"number"==typeof me&&"number"==typeof Re&&isNaN(me)&&isNaN(Re)},mi=function(me,Re){for(var Pt=me.length,ln=0;ln<Pt;){if(wr(me[ln],Re))return!0;ln++}return!1},di=Array.isArray||function(le){return"[object Array]"===Object.prototype.toString.call(le)},Mi={},Qt={},_n={INDEXEDDB:rn,WEBSQL:dn,LOCALSTORAGE:jn},Ln=[_n.INDEXEDDB._driver,_n.WEBSQL._driver,_n.LOCALSTORAGE._driver],Cn=["dropInstance"],kr=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Cn),si={description:"",driver:Ln.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function oi(le,me){le[me]=function(){var Re=arguments;return le.ready().then(function(){return le[me].apply(le,Re)})}}function Ii(){for(var le=1;le<arguments.length;le++){var me=arguments[le];if(me)for(var Re in me)me.hasOwnProperty(Re)&&(arguments[0][Re]=di(me[Re])?me[Re].slice():me[Re])}return arguments[0]}var yi=function(){function le(me){for(var Re in function P(le,me){if(!(le instanceof me))throw new TypeError("Cannot call a class as a function")}(this,le),_n)if(_n.hasOwnProperty(Re)){var Pt=_n[Re],ln=Pt._driver;this[Re]=ln,Mi[ln]||this.defineDriver(Pt)}this._defaultConfig=Ii({},si),this._config=Ii({},this._defaultConfig,me),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return le.prototype.config=function(Re){if("object"===(typeof Re>"u"?"undefined":C(Re))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Pt in Re){if("storeName"===Pt&&(Re[Pt]=Re[Pt].replace(/\W/g,"_")),"version"===Pt&&"number"!=typeof Re[Pt])return new Error("Database version must be a number.");this._config[Pt]=Re[Pt]}return!("driver"in Re)||!Re.driver||this.setDriver(this._config.driver)}return"string"==typeof Re?this._config[Re]:this._config},le.prototype.defineDriver=function(Re,Pt,ln){var En=new D(function(Mn,br){try{var Br=Re._driver,jr=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!Re._driver)return void br(jr);for(var gn=kr.concat("_initStorage"),Xe=0,Tt=gn.length;Xe<Tt;Xe++){var An=gn[Xe];if((!mi(Cn,An)||Re[An])&&"function"!=typeof Re[An])return void br(jr)}!function(){for(var Gr=function(en){return function(){var bt=new Error("Method "+en+" is not implemented by the current driver"),It=D.reject(bt);return ee(It,arguments[arguments.length-1]),It}},qr=0,ri=Cn.length;qr<ri;qr++){var Hr=Cn[qr];Re[Hr]||(Re[Hr]=Gr(Hr))}}();var pr=function(Gr){Mi[Br]&&console.info("Redefining LocalForage driver: "+Br),Mi[Br]=Re,Qt[Br]=Gr,Mn()};"_support"in Re?Re._support&&"function"==typeof Re._support?Re._support().then(pr,br):pr(!!Re._support):pr(!0)}catch(Tr){br(Tr)}});return te(En,Pt,ln),En},le.prototype.driver=function(){return this._driver||null},le.prototype.getDriver=function(Re,Pt,ln){var En=Mi[Re]?D.resolve(Mi[Re]):D.reject(new Error("Driver not found."));return te(En,Pt,ln),En}
1,le.prototype.getSerializer=function(Re){var Pt=D.resolve(sn);return te(Pt,Re),Pt},le.prototype.ready=function(Re){var Pt=this,ln=Pt._driverSet.then(function(){return null===Pt._ready&&(Pt._ready=Pt._initDriver()),Pt._ready});return te(ln,Re,Re),ln},le.prototype.setDriver=function(Re,Pt,ln){var En=this;di(Re)||(Re=[Re]);var Mn=this._getSupportedDrivers(Re);function br(){En._config.driver=En.driver()}function Br(Xe){return En._extend(Xe),br(),En._ready=En._initStorage(En._config),En._ready}var gn=null!==this._driverSet?this._driverSet.catch(function(){return D.resolve()}):D.resolve();return this._driverSet=gn.then(function(){var Xe=Mn[0];return En._dbInfo=null,En._ready=null,En.getDriver(Xe).then(function(Tt){En._driver=Tt._driver,br(),En._wrapLibraryMethodsWithReady(),En._initDriver=function jr(Xe){return function(){var Tt=0;return function An(){for(;Tt<Xe.length;){var Nn=Xe[Tt];return Tt++,En._dbInfo=null,En._ready=null,En.getDriver(Nn).then(Br).catch(An)}br();var ir=new Error("No available storage method found.");return En._driverSet=D.reject(ir),En._driverSet}()}}(Mn)})}).catch(function(){br();var Xe=new Error("No available storage method found.");return En._driverSet=D.reject(Xe),En._driverSet}),te(this._driverSet,Pt,ln),this._driverSet},le.prototype.supports=function(Re){return!!Qt[Re]},le.prototype._extend=function(Re){Ii(this,Re)},le.prototype._getSupportedDrivers=function(Re){for(var Pt=[],ln=0,En=Re.length;ln<En;ln++){var Mn=Re[ln];this.supports(Mn)&&Pt.push(Mn)}return Pt},le.prototype._wrapLibraryMethodsWithReady=function(){for(var Re=0,Pt=kr.length;Re<Pt;Re++)oi(this,kr[Re])},le.prototype.createInstance=function(Re){return new le(Re)},le}(),on=new yi;b.exports=on},{3:3}]},{},[4])(4)},52127:(B,G,a)=>{B=a.nmd(B);var v="__lodash_hash_undefined__",b=1,_=2,C=9007199254740991,P="[object Arguments]",S="[object Array]",R="[object AsyncFunction]",k="[object Boolean]",x="[object Date]",D="[object Error]",ee="[object Function]",te="[object GeneratorFunction]",J="[object Map]",Q="[object Number]",we="[object Null]",de="[object Object]",Y="[object Promise]",Se="[object Proxy]",Ye="[object RegExp]",pe="[object Set]",ae="[object String]",Ne="[object Undefined]",Ie="[object WeakMap]",H="[object ArrayBuffer]",j="[object DataView]",K=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,Pe={};Pe["[object Float32Array]"]=Pe["[object Float64Array]"]=Pe["[object Int8Array]"]=Pe["[object Int16Array]"]=Pe["[object Int32Array]"]=Pe["[object Uint8Array]"]=Pe["[object Uint8ClampedArray]"]=Pe["[object Uint16Array]"]=Pe["[object Uint32Array]"]=!0,Pe[P]=Pe[S]=Pe[H]=Pe[k]=Pe[j]=Pe[x]=Pe[D]=Pe[ee]=Pe[J]=Pe[Q]=Pe[de]=Pe[Ye]=Pe[pe]=Pe[ae]=Pe[Ie]=!1;var De="object"==typeof global&&global&&global.Object===Object&&global,ke="object"==typeof self&&self&&self.Object===Object&&self,Lt=De||ke||Function("return this")(),Dt=G&&!G.nodeType&&G,He=Dt&&B&&!B.nodeType&&B,ge=He&&He.exports===Dt,xt=ge&&De.process,pt=function(){try{return xt&&xt.binding&&xt.binding("util")}catch{}}(),rn=pt&&pt.isTypedArray;function dt(V,ne){for(var je=-1,$e=null==V?0:V.length;++je<$e;)if(ne(V[je],je,V))return!0;return!1}function kt(V,ne){return V.has(ne)}function Yn(V){var ne=-1,je=Array(V.size);return V.forEach(function($e,Wt){je[++ne]=[Wt,$e]}),je}function Hn(V){var ne=-1,je=Array(V.size);return V.forEach(function($e){je[++ne]=$e}),je}var V,Fn=Array.prototype,gr=Object.prototype,Mr=Lt["__core-js_shared__"],Vr=Function.prototype.toString,Fr=gr.hasOwnProperty,ti=(V=/[^.]+$/.exec(Mr&&Mr.keys&&Mr.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",Nr=gr.toString,Kr=RegExp("^"+Vr.call(Fr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jr=ge?Lt.Buffer:void 0,sr=Lt.Symbol,or=Lt.Uint8Array,zr=gr.propertyIsEnumerable,sn=Fn.splice,Qe=sr?sr.toStringTag:void 0,ut=Object.getOwnPropertySymbols,Xt=Jr?Jr.isBuffer:void 0,wn=function bn(V,ne){return function(je){return V(ne(je))}}(Object.keys,Object),dr=ir(Lt,"DataView"),vn=ir(Lt,"Map"),jt=ir(Lt,"Promise"),Ct=ir(Lt,"Set"),Mt=ir(Lt,"WeakMap"),Ze=ir(Object,"create"),et=bt(dr),Zt=bt(vn),Fe=bt(jt),ft=bt(Ct),dn=bt(Mt),Tn=sr?sr.prototype:void 0,Bn=Tn?Tn.valueOf
1:void 0;function mr(V){var ne=-1,je=null==V?0:V.length;for(this.clear();++ne<je;){var $e=V[ne];this.set($e[0],$e[1])}}function Di(V){var ne=-1,je=null==V?0:V.length;for(this.clear();++ne<je;){var $e=V[ne];this.set($e[0],$e[1])}}function jn(V){var ne=-1,je=null==V?0:V.length;for(this.clear();++ne<je;){var $e=V[ne];this.set($e[0],$e[1])}}function _n(V){var ne=-1,je=null==V?0:V.length;for(this.__data__=new jn;++ne<je;)this.add(V[ne])}function kr(V){var ne=this.__data__=new Di(V);this.size=ne.size}function me(V,ne){for(var je=V.length;je--;)if(It(V[je][0],ne))return je;return-1}function Pt(V){return null==V?void 0===V?Ne:we:Qe&&Qe in Object(V)?function pr(V){var ne=Fr.call(V,Qe),je=V[Qe];try{V[Qe]=void 0;var $e=!0}catch{}var Wt=Nr.call(V);return $e&&(ne?V[Qe]=je:delete V[Qe]),Wt}(V):function en(V){return Nr.call(V)}(V)}function ln(V){return St(V)&&Pt(V)==P}function En(V,ne,je,$e,Wt){return V===ne||(null==V||null==ne||!St(V)&&!St(ne)?V!=V&&ne!=ne:function Mn(V,ne,je,$e,Wt,In){var rr=hn(V),fr=hn(ne),Xn=rr?S:Gr(V),Rr=fr?S:Gr(ne),xi=(Xn=Xn==P?de:Xn)==de,Oi=(Rr=Rr==P?de:Rr)==de,bs=Xn==Rr;if(bs&&st(V)){if(!st(ne))return!1;rr=!0,xi=!1}if(bs&&!xi)return In||(In=new kr),rr||Rt(V)?gn(V,ne,je,$e,Wt,In):function Xe(V,ne,je,$e,Wt,In,rr){switch(je){case j:if(V.byteLength!=ne.byteLength||V.byteOffset!=ne.byteOffset)return!1;V=V.buffer,ne=ne.buffer;case H:return!(V.byteLength!=ne.byteLength||!In(new or(V),new or(ne)));case k:case x:case Q:return It(+V,+ne);case D:return V.name==ne.name&&V.message==ne.message;case Ye:case ae:return V==ne+"";case J:var fr=Yn;case pe:if(fr||(fr=Hn),V.size!=ne.size&&!($e&b))return!1;var Rr=rr.get(V);if(Rr)return Rr==ne;$e|=_,rr.set(V,ne);var xi=gn(fr(V),fr(ne),$e,Wt,In,rr);return rr.delete(V),xi;case"[object Symbol]":if(Bn)return Bn.call(V)==Bn.call(ne)}return!1}(V,ne,Xn,je,$e,Wt,In);if(!(je&b)){var fs=xi&&Fr.call(V,"__wrapped__"),Gs=Oi&&Fr.call(ne,"__wrapped__");
1if(fs||Gs){var Ns=fs?V.value():V,Ci=Gs?ne.value():ne;return In||(In=new kr),Wt(Ns,Ci,je,$e,In)}}return!!bs&&(In||(In=new kr),function Tt(V,ne,je,$e,Wt,In){var rr=je&b,fr=An(V),Xn=fr.length;if(Xn!=An(ne).length&&!rr)return!1;for(var Oi=Xn;Oi--;){var bs=fr[Oi];if(!(rr?bs in ne:Fr.call(ne,bs)))return!1}var fs=In.get(V);if(fs&&In.get(ne))return fs==ne;var Gs=!0;In.set(V,ne),In.set(ne,V);for(var Ns=rr;++Oi<Xn;){var Ci=V[bs=fr[Oi]],Js=ne[bs];if($e)var Nt=rr?$e(Js,Ci,bs,ne,V,In):$e(Ci,Js,bs,V,ne,In);if(!(void 0===Nt?Ci===Js||Wt(Ci,Js,je,$e,In):Nt)){Gs=!1;break}Ns||(Ns="constructor"==bs)}if(Gs&&!Ns){var $t=V.constructor,Je=ne.constructor;$t!=Je&&"constructor"in V&&"constructor"in ne&&!("function"==typeof $t&&$t instanceof $t&&"function"==typeof Je&&Je instanceof Je)&&(Gs=!1)}return In.delete(V),In.delete(ne),Gs}(V,ne,je,$e,Wt,In))}(V,ne,je,$e,En,Wt))}function gn(V,ne,je,$e,Wt,In){var rr=je&b,fr=V.length,Xn=ne.length;if(fr!=Xn&&!(rr&&Xn>fr))return!1;var Rr=In.get(V);if(Rr&&In.get(ne))return Rr==ne;var xi=-1,Oi=!0,bs=je&_?new _n:void 0;for(In.set(V,ne),In.set(ne,V);++xi<fr;){var fs=V[xi],Gs=ne[xi];if($e)var Ns=rr?$e(Gs,fs,xi,ne,V,In):$e(fs,Gs,xi,V,ne,In);if(void 0!==Ns){if(Ns)continue;Oi=!1;break}if(bs){if(!dt(ne,function(Ci,Js){if(!kt(bs,Js)&&(fs===Ci||Wt(fs,Ci,je,$e,In)))return bs.push(Js)})){Oi=!1;break}}else if(fs!==Gs&&!Wt(fs,Gs,je,$e,In)){Oi=!1;break}}return In.delete(V),In.delete(ne),Oi}function An(V){return function Re(V,ne,je){var $e=ne(V);return hn(V)?$e:function mn(V,ne){for(var je=-1,$e=ne.length,Wt=V.length;++je<$e;)V[Wt+je]=ne[je];return V}($e,je(V))}(V,Ee,Tr)}function Nn(V,ne){var je=V.__data__;return function ri(V){var ne=typeof V;return"string"==ne||"number"==ne||"symbol"==ne||"boolean"==ne?"__proto__"!==V:null===V}(ne)?je["string"==typeof ne?"string":"hash"]:je.map}function ir(V,ne){var je=function an(V,ne){return V?.[ne]}(V,ne);return function br(V){return!(!Sr(V)||function Hr(V){return!!ti&&ti in V}(V))&&(wt(V)?Kr:K).test(bt(V))}(je)?je:void 0}mr.prototype.clear=function tr(){this.__data__=Ze?Ze(null):{},this.size=0},mr.prototype.delete=function Ir(V){var ne=this.has(V)&&delete this.__data__[V];return this.size-=ne?1:0,ne},mr.prototype.get=function ur(V){var ne=this.__data__;if(Ze){var je=ne[V];return je===v?void 0:je}return Fr.call(ne,V)?ne[V]:void 0},mr.prototype.has=function Er(V){var ne=this.__data__;return Ze?void 0!==ne[V]:Fr.call(ne,V)},mr.prototype.set=function Ai(V,ne){var je=this.__data__;return this.size+=this.has(V)?0:1,je[V]=Ze&&void 0===ne?v:ne,this},Di.prototype.clear=function Pi(){this.__data__=[],this.size=0},Di.prototype.delete=function nr(V){var ne=this.__data__,je=me(ne,V);return!(je<0||(je==ne.length-1?ne.pop():sn.call(ne,je,1),--this.size,0))},Di.prototype.get=function Ht(V){var ne=this.__data__,je=me(ne,V);return je<0?void 0:ne[je][1]},Di.prototype.has=function Wn(V){return me(this.__data__,V)>-1},Di.prototype.set=function $n(V,ne){var je=this.__data__,$e=me(je,V);return $e<0?(++this.size,je.push([V,ne])):je[$e][1]=ne,this},jn.prototype.clear=function wr(){this.size=0,this.__data__={hash:new mr,map:new(vn||Di),string:new mr}},jn.prototype.delete=function mi(V){var ne=Nn(this,V).delete(V);return this.size-=ne?1:0,ne},jn.prototype.get=function di(V){return Nn(this,V).get(V)},jn.prototype.has=function Mi(V){return Nn(this,V).has(V)},jn.prototype.set=function Qt(V,ne){var je=Nn(this,V),$e=je.size;return je.set(V,ne),this.size+=je.size==$e?0:1,this},_n.prototype.add=_n.prototype.push=function Ln(V){return this.__data__.set(V,v),this},_n.prototype.has=function Cn(V){return this.__data__.has(V)},kr.prototype.clear=function si(){this.__data__=new Di,this.size=0},kr.prototype.delete=function oi(V){var ne=this.__data__,je=ne.delete(V);return this.size=ne.size,je},kr.prototype.get=function Ii(V){return this.__data__.get(V)},kr.prototype.has=function yi(V){return this.__data__.has(V)},kr.prototype.set=function on(V,ne){var je=this.__data__;if(je instanceof Di){var $e=je.__data__;if(!vn||$e.length<199)return $e.push([V,ne]),this.size=++je.size,this;je=this.__data__=new jn($e)}return je.set(V,ne),this.size=je.size,this};var Tr=ut?function(V){return null==V?[]:(V=Object(V),function cn(V,ne){for(var je=-1,$e=null==V?0:V.length,Wt=0,In=[];++je<$e;){var rr=V[je];ne(rr,je,V)&&(In[Wt++]=rr)}return In}(ut(V),function(ne){return zr.call(V,ne)}))}:function U(){return[]},Gr=Pt;function qr(V,ne){return!!(ne=ne??C)&&("number"==typeof V||_e.test(V))&&
1V>-1&&V%1==0&&V<ne}function bt(V){if(null!=V){try{return Vr.call(V)}catch{}try{return V+""}catch{}}return""}function It(V,ne){return V===ne||V!=V&&ne!=ne}(dr&&Gr(new dr(new ArrayBuffer(1)))!=j||vn&&Gr(new vn)!=J||jt&&Gr(jt.resolve())!=Y||Ct&&Gr(new Ct)!=pe||Mt&&Gr(new Mt)!=Ie)&&(Gr=function(V){var ne=Pt(V),je=ne==de?V.constructor:void 0,$e=je?bt(je):"";if($e)switch($e){case et:return j;case Zt:return J;case Fe:return Y;case ft:return pe;case dn:return Ie}return ne});var _t=ln(function(){return arguments}())?ln:function(V){return St(V)&&Fr.call(V,"callee")&&!zr.call(V,"callee")},hn=Array.isArray,st=Xt||function ie(){return!1};function wt(V){if(!Sr(V))return!1;var ne=Pt(V);return ne==ee||ne==te||ne==R||ne==Se}function Vt(V){return"number"==typeof V&&V>-1&&V%1==0&&V<=C}function Sr(V){var ne=typeof V;return null!=V&&("object"==ne||"function"==ne)}function St(V){return null!=V&&"object"==typeof V}var Rt=rn?function rt(V){return function(ne){return V(ne)}}(rn):function Br(V){return St(V)&&Vt(V.length)&&!!Pe[Pt(V)]};function Ee(V){return function T(V){return null!=V&&Vt(V.length)&&!wt(V)}(V)?function le(V,ne){var je=hn(V),$e=!je&&_t(V),Wt=!je&&!$e&&st(V),In=!je&&!$e&&!Wt&&Rt(V),rr=je||$e||Wt||In,fr=rr?function lt(V,ne){for(var je=-1,$e=Array(V);++je<V;)$e[je]=ne(je);return $e}(V.length,String):[],Xn=fr.length;for(var Rr in V)(ne||Fr.call(V,Rr))&&(!rr||!("length"==Rr||Wt&&("offset"==Rr||"parent"==Rr)||In&&("buffer"==Rr||"byteLength"==Rr||"byteOffset"==Rr)||qr(Rr,Xn)))&&fr.push(Rr);return fr}(V):function jr(V){if(!function zt(V){var ne=V&&V.constructor;return V===("function"==typeof ne&&ne.prototype||gr)}(V))return wn(V);var ne=[];for(var je in Object(V))Fr.call(V,je)&&"constructor"!=je&&ne.push(je);return ne}(V)}B.exports=function Z(V,ne){return En(V,ne)}},43752:function(B,G,a){var i,v;!function(b,_){"use strict";i=function(){var b=function(){},_="undefined",C=typeof window!==_&&typeof window.navigator!==_&&/Trident\/|MSIE /.test(window.navigator.userAgent),P=["trace","debug","info","warn","error"],S={},R=null;function k(de,Y){var Se=de[Y];if("function"==typeof Se.bind)return Se.bind(de);try{return Function.prototype.bind.call(Se,de)}catch{return function(){return Function.prototype.apply.apply(Se,[de,arguments])}}}function x(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function ee(){for(var de=this.getLevel(),Y=0;Y<P.length;Y++){var Se=P[Y];this[Se]=Y<de?b:this.methodFactory(Se,de,this.name)}if(this.log=this.debug,typeof console===_&&de<this.levels.SILENT)return"No console available for logging"}function te(de){return function(){typeof console!==_&&(ee.call(this),this[de].apply(this,arguments))}}function J(de,Y,Se){return function D(de){return"debug"===de&&(de="log"),typeof console!==_&&("trace"===de&&C?x:void 0!==console[de]?k(console,de):void 0!==console.log?k(console,"log"):b)}(de)||te.apply(this,arguments)}function Q(de,Y){var Ye,pe,ae,Se=this,Ve="loglevel";function Ie(){var Le;if(typeof window!==_&&Ve){try{Le=window.localStorage[Ve]}catch{}if(typeof Le===_)try{var W=window.document.cookie,We=encodeURIComponent(Ve),At=W.indexOf(We+"=");-1!==At&&(Le=/^([^;]+)/.exec(W.slice(At+We.length+1))[1])}catch{}return void 0===Se.levels[Le]&&(Le=void 0),Le}}function j(Le){var W=Le;if("string"==typeof W&&void 0!==Se.levels[W.toUpperCase()]&&(W=Se.levels[W.toUpperCase()]),"number"==typeof W&&W>=0&&W<=Se.levels.SILENT)return W;throw new TypeError("log.setLevel() called with invalid level: "+Le)}"string"==typeof de?Ve+=":"+de:"symbol"==typeof de&&(Ve=void 0),Se.name=de,Se.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Se.methodFactory=Y||J,Se.getLevel=function(){return ae??pe??Ye},Se.setLevel=function(Le,W){return ae=j(Le),!1!==W&&function Ne(Le){var W=(P[Le]||"silent").toUpperCase();if(typeof window!==_&&Ve){try{return void(window.localStorage[Ve]=W)}catch{}try{window.document.cookie=encodeURIComponent(Ve)+"="+W+";"}catch{}}}(ae),ee.call(Se)},Se.setDefaultLevel=function(Le){pe=j(Le),Ie()||Se.setLevel(Le,!1)},Se.resetLevel=function(){ae=null,function H(){if(typeof window!==_&&Ve){try{window.localStorage.removeItem(Ve)}catch{}try{window.document.cookie=encodeURIComponent(Ve)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}(),ee.call(Se)},Se.enableAll=function(Le){Se.setLevel(Se.levels.TRACE,Le)},Se.disableAll=function(Le){Se.setLevel(Se.levels.SILENT,Le)},Se.rebuild=function(){if(R!==Se&&(Ye=j(R.getLevel())),ee.call(Se),R===Se)for(var Le in S)S[Le].rebuild()},Ye=j(R?R.getLevel():"WARN");var ye=Ie();null!=ye&&(ae=j(ye)),ee.call(Se)}(R=new Q).getLogger=function(Y){if("symbol"!=typeof Y&&"string"!=typeof Y||""===Y)throw new TypeError("You must supply a name when creating a logger.");var Se=S[Y];return Se||(Se=S[Y]=new Q(Y,R.methodFactory)),Se};var we=typeof window!==_?window.log:void 0;return R.noConflict=function(){return typeof window!==_&&window.log===R&&(window.log=we),R},R.getLoggers=function(){return S},R.default=R,R},void 0!==(v=i.call(G,a,G,B))&&(B.exports=v)}()},70544:function(B,G,a){var i;B=a.nmd(B),function(){"use strict";var v={function:!0,object:!0},b=v[typeof window]&&window||this,S=v[typeof G]&&G&&v.object&&B&&!B.nodeType&&B&&"object"==typeof global&&global;S&&(S.global===S||S.window===S||S.self===S)&&(b=S);var R=Math.pow(2,53)-1,k=/\bOpera/,D=Object.prototype,ee=D.hasOwnProperty,te=D.toString;function J(H){return(H=String(H)).charAt(0).toUpperCase()+H.slice(1)}function de(H){return H=Ve(H),/^(?:webOS|i(?:OS|P))/.test(H)?H:J(H)}function Y(H,j){for(var ye in H)ee.call(H,ye)&&j(H[ye],ye,H)}function Se(H){return null==H?J(H):te.call(H).slice(8,-1)}function pe(H){return String(H).replace(/([ -])(?!$)/g,"$1?")}function ae(H,j){var ye=null;return function we(H,j){var ye=-1,Le=H?H.length:0;if("number"==typeof Le&&Le>-1&&Le<=R)for(;++ye<Le;)j(H[ye],ye,H);else Y(H,j)}(H,function(Le,W){ye=j(ye,Le,W,H)}),ye}function Ve(H){return String(H).replace(/^ +| +$/g,"")}var Ie=function Ne(H){var j=b,ye=H&&"object"==typeof H&&"String"!=Se(H);ye&&(j=H,H=null);var Le=j.navigator||{},W=Le.userAgent||"";H||(H=W);var He,mn,At=ye?!!Le.likeChrome:/\bChrome\b/.test(H)&&!/internal|\n/i.test(te.toString()),Ut="Object",it=ye?Ut:"ScriptBridgingProxyObject",ue=ye?Ut:"Environment",se=ye&&j.java?"JavaPackage":Se(j.java),ce=ye?Ut:"RuntimeObject",K=/\bJava/.test(se)&&j.java,_e=K&&Se(j.environment)==ue,Pe=K?"a":"\u03b1",De=K?"b":"\u03b2",ke=j.document||{},Lt=j.operamini||j.opera,Dt=k.test(Dt=ye&&Lt?Lt["[[Class]]"]:Se(Lt))?Dt:Lt=null,ge=H,xt=[],pt=null,rn=H==W,cn=rn&&Lt&&"function"==typeof Lt.version&&Lt.version(),dt=function Yn(Fr){return ae(Fr,function(ti,Nr){return ti||RegExp("\\b"+(Nr.pattern||pe(Nr))+"\\b","i").exec(H)&&(Nr.label||Nr)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),lt=function Hn(Fr){return ae(Fr,function(ti,Nr){return ti||RegExp("\\b"+(Nr.pattern||pe(Nr))+"\\b","i").exec(H)&&(Nr.label||Nr)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","Green
1Browser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),rt=On([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),kt=function bn(Fr){return ae(Fr,function(ti,Nr,Kr){return ti||(Nr[rt]||Nr[/^[a-z]+(?: +[a-z]+\b)*/i.exec(rt)]||RegExp("\\b"+pe(Kr)+"(?:\\b|\\w*\\d)","i").exec(H))&&Kr})}({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),an=function Fn(Fr){return ae(Fr,function(ti,Nr){var Kr=Nr.pattern||pe(Nr);return!ti&&(ti=RegExp("\\b"+Kr+"(?:/[\\d.]+|[ \\w.]*)","i").exec(H))&&(ti=function Q(H,j,ye){var Le={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return j&&ye&&/^Win/i.test(H)&&!/^Windows Phone /i.test(H)&&(Le=Le[/[\d.]+$/.exec(H)])&&(H="Windows "+Le),H=String(H),j&&ye&&(H=H.replace(RegExp(j,"i"),ye)),de(H.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(ti,Kr,Nr.label||Nr)),ti})}(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function On(Fr){return ae(Fr,function(ti,Nr){var Kr=Nr.pattern||pe(Nr);return!ti&&(ti=RegExp("\\b"+Kr+" *\\d+[.\\w_]*","i").exec(H)||RegExp("\\b"+Kr+" *\\w+-[\\w]*","i").exec(H)||RegExp("\\b"+Kr+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(H))&&((ti=String(Nr.label&&!RegExp(Kr,"i").test(Nr.label)?Nr.label:ti).split("/"))[1]&&!/[\d.]+/.test(ti[0])&&(ti[0]+=" "+ti[1]),Nr=Nr.label||Nr,ti=de(ti[0].replace(RegExp(Kr,"i"),Nr).replace(RegExp("; *(?:"+Nr+"[_-])?","i")," ").replace(RegExp("("+Nr+")[-_.]?(\\w)","i"),"$1 $2"))),ti})}function gr(Fr){return ae(Fr,function(ti,Nr){return ti||(RegExp(Nr+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(H)||0)[1]||null})}
vendor: 7,420 bytes, line 1
1if(dt&&(dt=[dt]),/\bAndroid\b/.test(an)&&!rt&&(He=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(H))&&(rt=Ve(He[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),kt&&!rt?rt=On([kt]):kt&&rt&&(rt=rt.replace(RegExp("^("+pe(kt)+")[-_.\\s]","i"),kt+" ").replace(RegExp("^("+pe(kt)+")[-_.]?(\\w)","i"),kt+" $2")),(He=/\bGoogle TV\b/.exec(rt))&&(rt=He[0]),/\bSimulator\b/i.test(H)&&(rt=(rt?rt+" ":"")+"Simulator"),"Opera Mini"==lt&&/\bOPiOS\b/.test(H)&&xt.push("running in Turbo/Uncompressed mode"),"IE"==lt&&/\blike iPhone OS\b/.test(H)?(kt=(He=Ne(H.replace(/like iPhone OS/,""))).manufacturer,rt=He.product):/^iP/.test(rt)?(lt||(lt="Safari"),an="iOS"+((He=/ OS ([\d_]+)/i.exec(H))?" "+He[1].replace(/_/g,"."):"")):"Konqueror"==lt&&/^Linux\b/i.test(an)?an="Kubuntu":kt&&"Google"!=kt&&(/Chrome/.test(lt)&&!/\bMobile Safari\b/i.test(H)||/\bVita\b/.test(rt))||/\bAndroid\b/.test(an)&&/^Chrome/.test(lt)&&/\bVersion\//i.test(H)?(lt="Android Browser",an=/\bAndroid\b/.test(an)?an:"Android"):"Silk"==lt?(/\bMobi/i.test(H)||(an="Android",xt.unshift("desktop mode")),/Accelerated *= *true/i.test(H)&&xt.unshift("accelerated")):"UC Browser"==lt&&/\bUCWEB\b/.test(H)?xt.push("speed mode"):"PaleMoon"==lt&&(He=/\bFirefox\/([\d.]+)\b/.exec(H))?xt.push("identifying as Firefox "+He[1]):"Firefox"==lt&&(He=/\b(Mobile|Tablet|TV)\b/i.exec(H))?(an||(an="Firefox OS"),rt||(rt=He[1])):!lt||(He=!/\bMinefield\b/i.test(H)&&/\b(?:Firefox|Safari)\b/.exec(lt))?(lt&&!rt&&/[\/,]|^[^(]+?\)/.test(H.slice(H.indexOf(He+"/")+8))&&(lt=null),(He=rt||kt||an)&&(rt||kt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(an))&&(lt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(an)?an:He)+" Browser")):"Electron"==lt&&(He=(/\bChrome\/([\d.]+)\b/.exec(H)||0)[1])&&xt.push("Chromium "+He),cn||(cn=gr(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",pe(lt),"(?:Firefox|Minefield|NetFront)"])),(He=("iCab"==dt&&parseFloat(cn)>3?"WebKit":/\bOpera\b/.test(lt)&&(/\bOPR\b/.test(H)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(H)&&!/^(?:Trident|EdgeHTML)$/.test(dt)&&"WebKit"||!dt&&/\bMSIE\b/i.test(H)&&("Mac OS"==an?"Tasman":"Trident")||"WebKit"==dt&&/\bPlayStation\b(?! Vita\b)/i.test(lt)&&"NetFront")&&(dt=[He]),"IE"==lt&&(He=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(H)||0)[1])?(lt+=" Mobile",an="Windows Phone "+(/\+$/.test(He)?He:He+".x"),xt.unshift("desktop mode")):/\bWPDesktop\b/i.test(H)?(lt="IE Mobile",an="Windows Phone 8.x",xt.unshift("desktop mode"),cn||(cn=(/\brv:([\d.]+)/.exec(H)||0)[1])):"IE"!=lt&&"Trident"==dt&&(He=/\brv:([\d.]+)/.exec(H))&&(lt&&xt.push("identifying as "+lt+(cn?" "+cn:"")),lt="IE",cn=He[1]),rn){if(function Ye(H,j){var ye=null!=H?typeof H[j]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(ye)||"object"==ye&&!H[j])}(j,"global"))if(K&&(ge=(He=K.lang.System).getProperty("os.arch"),an=an||He.getProperty("os.name")+" "+He.getProperty("os.version")),_e){try{cn=j.require("ringo/engine").version.join("."),lt="RingoJS"}catch{(He=j.system)&&He.global.system==j.system&&(lt="Narwhal",an||(an=He[0].os||null))}lt||(lt="Rhino")}else"object"==typeof j.process&&!j.process.browser&&(He=j.process)&&("object"==typeof He.versions&&("string"==typeof He.versions.electron?(xt.push("Node "+He.versions.node),lt="Electron",cn=He.versions.electron):"string"==typeof He.versions.nw&&(xt.push("Chromium "+cn,"Node "+He.versions.node),lt="NW.js",cn=He.versions.nw)),lt||(lt="Node.js",ge=He.arch,an=He.platform,cn=(cn=/[\d.]+/.exec(He.version))?cn[0]:null));else Se(He=j.runtime)==it?(lt="Adobe AIR",an=He.flash.system.Capabilities.os):Se(He=j.phantom)==ce?(lt="PhantomJS",cn=(He=He.version||null)&&He.major+"."+He.minor+"."+He.patch):"number"==typeof ke.documentMode&&(He=/\bTrident\/(\d+)/i.exec(H))?((He=+He[1]+4)!=(cn=[cn,ke.documentMode])[1]&&(xt.push("IE "+cn[1]+" mode"),dt&&(dt[1]=""),cn[1]=He),cn="IE"==lt?String(cn[1].toFixed(1)):cn[0]):"number"==typeof ke.documentMode&&/^(?:Chrome|Firefox)\b/.test(lt)&&(xt.push("masking as "+lt+" "+cn),lt="IE",cn="11.0",dt=["Trident"],an="Windows");an=an&&de(an)}if(cn&&(He=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(cn)||/(?:alpha|beta)(?: ?\d)?/i.exec(H+";"+(rn&&Le.appMinorVersion))||/\bMinefield\b/i.test(H)&&"a")&&(pt=/b/i.test(He)?"beta":"alpha",cn=cn.replace(RegExp(He+"\\+?$"),"")+("beta"==pt?De:Pe)+(/\d+\+?/.exec(He)||"")),"Fennec"==lt||"Firefox"==lt&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(an))lt="Firefox Mobile";else if("Maxthon"==lt&&cn)cn=cn.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(rt))"Xbox 360"==rt&&(an=null),"Xbox 360"==rt&&/\bIEMobile\b/.test(H)&&xt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(lt)&&(!lt||rt||/Browser|Mobi/.test(lt))||"Windows CE"!=an&&!/Mobi/i.test(H))if("IE"==lt&&rn)try{null===j.external&&xt.unshift("platform preview")}catch{xt.unshift("embedded")}else(/\bBlackBerry\b/.test(rt)||/\bBB10\b/.test(H))&&(He=(RegExp(rt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(H)||0)[1]||cn)?(an=((He=[He,/BB10/.test(H)])[1]?(rt=null,kt="BlackBerry"):"Device Software")+" "+He[0],cn=null):this!=Y&&"Wii"!=rt&&(rn&&Lt||/Opera/.test(lt)&&/\b(?:MSIE|Firefox)\b/i.test(H)||"Firefox"==lt&&/\bOS X (?:\d+\.){2,}/.test(an)||"IE"==lt&&(an&&!/^Win/.test(an)&&cn>5.5||/\bWindows XP\b/.test(an)&&cn>8||8==cn&&!/\bTrident\b/.test(H)))&&!k.test(He=Ne.call(Y,H.replace(k,"")+";"))&&He.name&&(He="ing as "+He.name+((He=He.version)?" "+He:""),k.test(lt)?(/\bIE\b/.test(He)&&"Mac OS"==an&&(an=null),He="identify"+He):(He="mask"+He,lt=Dt?de(Dt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(He)&&(an=null),rn||(cn=null)),dt=["Presto"],xt.push(He));else lt+=" Mobile";(He=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(H)||0)[1])&&(He=[parseFloat(He.replace(/\.(\d)$/,".0$1")),He],"Safari"==lt&&"+"==He[1].slice(-1)?(lt="WebKit Nightly",pt="alpha",cn=He[1].slice(0,-1)):(cn==He[1]||cn==(He[2]=(/\bSafari\/([\d.]+\+?)/i.exec(H)||0)[1]))&&(cn=null),He[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(H)||0)[1],537.36==He[0]&&537.36==He[2]&&parseFloat(He[1])>=28&&"WebKit"==dt&&(dt=["Blink"]),rn&&(At||He[1])?(dt&&(dt[1]="like Chrome"),He=He[1]||((He=He[0])<530?1:He<532?2:He<532.05?3:He<533?4:He<534.03?5:He<534.07?6:He<534.1?7:He<534.13?8:He<534.16?9:He<534.24?10:He<534.3?11:He<535.01?12:He<535.02?"13+":He<535.07?15:He<535.11?16:He<535.19?17:He<536.05?18:He<536.1?19:He<537.01?20:He<537.11?"21+":He<537.13?23:He<537.18?24:He<537.24?25:He<537.36?26:"Blink"!=dt?"27":"28")):(dt&&(dt[1]="like Safari"),He=(He=He[0])<400?1:He<500?2:He<526?3:He<533?4:He<534?"4+":He<535?5:He<537?6:He<538?7:He<601?8:He<602?9:He<604?10:He<606?11:He<608?12:"12"),dt&&(dt[1]+=" "+(He+="number"==typeof He?".x":/[.+]/.test(He)?"":"+")),"Safari"==lt&&(!cn||parseInt(cn)>45)?cn=He:"Chrome"==lt&&/\bHeadlessChrome/i.test(H)&&xt.unshift("headless")),"Opera"==lt&&(He=/\bzbov|zvav$/.exec(an))?(lt+=" ",xt.unshift("desktop mode"),"zvav"==He?(lt+="Mini",cn=null):lt+="Mobile",an=an.replace(RegExp(" *"+He+"$"),"")):"Safari"==lt&&/\bChrome\b/.exec(dt&&dt[1])?(xt.unshift("desktop mode"),lt="Chrome Mobile",cn=null,/\bOS X\b/.test(an)?(kt="Apple",an="iOS 4.3+"):an=null):/\bSRWare Iron\b/.test(lt)&&!cn&&(cn=gr("Chrome")),cn&&0==cn.indexOf(He=/[\d.]+$/.exec(an))&&H.indexOf("/"+He+"-")>-1&&(an=Ve(an.replace(He,""))),an&&-1!=an.indexOf(lt)&&!RegExp(lt+" OS").test(an)&&(an=an.replace(RegExp(" *"+pe(lt)+" *"),"")),dt&&!/\b(?:Avant|Nook)\b/.test(lt)&&(/Browser|Lun
1ascape|Maxthon/.test(lt)||"Safari"!=lt&&/^iOS/.test(an)&&/\bSafari\b/.test(dt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(lt)&&dt[1])&&(He=dt[dt.length-1])&&xt.push(He),xt.length&&(xt=["("+xt.join("; ")+")"]),kt&&rt&&rt.indexOf(kt)<0&&xt.push("on "+kt),rt&&xt.push((/^on /.test(xt[xt.length-1])?"":"on ")+rt),an&&(He=/ ([\d.+]+)$/.exec(an),mn=He&&"/"==an.charAt(an.length-He[0].length-1),an={architecture:32,family:He&&!mn?an.replace(He[0],""):an,version:He?He[1]:null,toString:function(){var Fr=this.version;return this.family+(Fr&&!mn?" "+Fr:"")+(64==this.architecture?" 64-bit":"")}}),(He=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ge))&&!/\bi686\b/i.test(ge)?(an&&(an.architecture=64,an.family=an.family.replace(RegExp(" *"+He),"")),lt&&(/\bWOW64\b/i.test(H)||rn&&/\w(?:86|32)$/.test(Le.cpuClass||Le.platform)&&!/\bWin64; x64\b/i.test(H))&&xt.unshift("32-bit")):an&&/^OS X/.test(an.family)&&"Chrome"==lt&&parseFloat(cn)>=39&&(an.architecture=64),H||(H=null);var Vr={};return Vr.description=H,Vr.layout=dt&&dt[0],Vr.manufacturer=kt,Vr.name=lt,Vr.prerelease=pt,Vr.product=rt,Vr.ua=H,Vr.version=lt&&cn,Vr.os=an||{architecture:null,family:null,version:null,toString:function(){return"null"}},Vr.parse=Ne,Vr.toString=function Mr(){return this.description||""},Vr.version&&xt.unshift(cn),Vr.name&&xt.unshift(lt),an&<&&!(an==String(an).split(" ")[0]&&(an==lt.split(" ")[0]||rt))&&xt.push(rt?"("+an+")":"on "+an),xt.length&&(Vr.description=xt.join(" ")),Vr}();b.platform=Ie,void 0!==(i=function(){return Ie}.call(G,a,G,B))&&(B.exports=i)}.call(this)},46700:(B,G,a)=>{"use strict";a.d(G,{g:()=>v});var i=a(95657);class v extends i.E{constructor(_){super(),this._value=_}get value(){return this.getValue()}_subscribe(_){const C=super._subscribe(_);return!C.closed&&_.next(this._value),C}getValue(){const{hasError:_,thrownError:C,_value:P}=this;if(_)throw C;return this._throwIfClosed(),P}next(_){super.next(this._value=_)}}},53252:(B,G,a)=>{"use strict";a.d(G,{_:()=>R});var i=a(41760),v=a(46928),b=a(90472),_=a(83928),C=a(74491),P=a(38880),S=a(92075);let R=(()=>{class ee{constructor(J){J&&(this._subscribe=J)}lift(J){const Q=new ee;return Q.source=this,Q.operator=J,Q}subscribe(J,Q,we){const de=function D(ee){return ee&&ee instanceof i.yR||function x(ee){return ee&&(0,P.m)(ee.next)&&(0,P.m)(ee.error)&&(0,P.m)(ee.complete)}(ee)&&(0,v.GI)(ee)}(J)?J:new i.ot(J,Q,we);return(0,S.c)(()=>{const{operator:Y,source:Se}=this;de.add(Y?Y.call(de,Se):Se?this._subscribe(de):this._trySubscribe(de))}),de}_trySubscribe(J){try{return this._subscribe(J)}catch(Q){J.error(Q)}}forEach(J,Q){return new(Q=k(Q))((we,de)=>{const Y=new i.ot({next:Se=>{try{J(Se)}catch(Ye){de(Ye),Y.unsubscribe()}},error:de,complete:we});this.subscribe(Y)})}_subscribe(J){var Q;return null===(Q=this.source)||void 0===Q?void 0:Q.subscribe(J)}[b.a](){return this}pipe(...J){return(0,_.Y)(J)(this)}toPromise(J){return new(J=k(J))((Q,we)=>{let de;this.subscribe(Y=>de=Y,Y=>we(Y),()=>Q(de))})}}return ee.create=te=>new ee(te),ee})();function k(ee){var te;return null!==(te=ee??C.config.Promise)&&void 0!==te?te:Promise}},22540:(B,G,a)=>{"use strict";a.d(G,{o:()=>b});var i=a(95657),v=a(35960);class b extends i.E{constructor(C=1/0,P=1/0,S=v.K){super(),this._bufferSize=C,this._windowTime=P,this._timestampProvider=S,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=P===1/0,this._bufferSize=Math.max(1,C),this._windowTime=Math.max(1,P)}next(C){const{isStopped:P,_buffer:S,_infiniteTimeWindow:R,_timestampProvider:k,_windowTime:x}=this;P||(S.push(C),!R&&S.push(k.now()+x)),this._trimBuffer(),super.next(C)}_subscribe(C){this._throwIfClosed(),this._trimBuffer();const P=this._innerSubscribe(C),{_infiniteTimeWindow:S,_buffer:R}=this,k=R.slice();for(let x=0;x<k.length&&!C.closed;x+=S?1:2)C.next(k[x]);return this._checkFinalizedStatuses(C),P}_trimBuffer(){const{_bufferSize:C,_timestampProvider:P,_buffer:S,_infiniteTimeWindow:R}=this,k=(R?1:2)*C;if(C<1/0&&k<S.length&&S.splice(0,S.length-k),!R){const x=P.now();let D=0;for(let ee=1;ee<S.length&&S[ee]<=x;ee+=2)D=ee;D&&S.splice(0,D+1)}}}},95657:(B,G,a)=>{"use strict";a.d(G,{E:()=>S});var i=a(53252),v=a(46928);const _=(0,a(14912).w)(k=>function(){k(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});
vendor: 4,386 bytes, line 1
1var C=a(41248),P=a(92075);let S=(()=>{class k extends i._{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(D){const ee=new R(this,this);return ee.operator=D,ee}_throwIfClosed(){if(this.closed)throw new _}next(D){(0,P.c)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const ee of this.currentObservers)ee.next(D)}})}error(D){(0,P.c)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=D;const{observers:ee}=this;for(;ee.length;)ee.shift().error(D)}})}complete(){(0,P.c)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:D}=this;for(;D.length;)D.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var D;return(null===(D=this.observers)||void 0===D?void 0:D.length)>0}_trySubscribe(D){return this._throwIfClosed(),super._trySubscribe(D)}_subscribe(D){return this._throwIfClosed(),this._checkFinalizedStatuses(D),this._innerSubscribe(D)}_innerSubscribe(D){const{hasError:ee,isStopped:te,observers:J}=this;return ee||te?v.au:(this.currentObservers=null,J.push(D),new v.wH(()=>{this.currentObservers=null,(0,C.k)(J,D)}))}_checkFinalizedStatuses(D){const{hasError:ee,thrownError:te,isStopped:J}=this;ee?D.error(te):J&&D.complete()}asObservable(){const D=new i._;return D.source=this,D}}return k.create=(x,D)=>new R(x,D),k})();class R extends S{constructor(x,D){super(),this.destination=x,this.source=D}next(x){var D,ee;null===(ee=null===(D=this.destination)||void 0===D?void 0:D.next)||void 0===ee||ee.call(D,x)}error(x){var D,ee;null===(ee=null===(D=this.destination)||void 0===D?void 0:D.error)||void 0===ee||ee.call(D,x)}complete(){var x,D;null===(D=null===(x=this.destination)||void 0===x?void 0:x.complete)||void 0===D||D.call(x)}_subscribe(x){var D,ee;return null!==(ee=null===(D=this.source)||void 0===D?void 0:D.subscribe(x))&&void 0!==ee?ee:v.au}}},41760:(B,G,a)=>{"use strict";a.d(G,{ot:()=>we,yR:()=>ee});var i=a(38880),v=a(46928),b=a(74491),_=a(31984),C=a(20308);const P=k("C",void 0,void 0);function k(pe,ae,Ve){return{kind:pe,value:ae,error:Ve}}var x=a(43376),D=a(92075);class ee extends v.wH{constructor(ae){super(),this.isStopped=!1,ae?(this.destination=ae,(0,v.GI)(ae)&&ae.add(this)):this.destination=Ye}static create(ae,Ve,Ne){return new we(ae,Ve,Ne)}next(ae){this.isStopped?Se(function R(pe){return k("N",pe,void 0)}(ae),this):this._next(ae)}error(ae){this.isStopped?Se(function S(pe){return k("E",void 0,pe)}(ae),this):(this.isStopped=!0,this._error(ae))}complete(){this.isStopped?Se(P,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(ae){this.destination.next(ae)}_error(ae){try{this.destination.error(ae)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const te=Function.prototype.bind;function J(pe,ae){return te.call(pe,ae)}class Q{constructor(ae){this.partialObserver=ae}next(ae){const{partialObserver:Ve}=this;if(Ve.next)try{Ve.next(ae)}catch(Ne){de(Ne)}}error(ae){const{partialObserver:Ve}=this;if(Ve.error)try{Ve.error(ae)}catch(Ne){de(Ne)}else de(ae)}complete(){const{partialObserver:ae}=this;if(ae.complete)try{ae.complete()}catch(Ve){de(Ve)}}}class we extends ee{constructor(ae,Ve,Ne){let Ie;if(super(),(0,i.m)(ae)||!ae)Ie={next:ae??void 0,error:Ve??void 0,complete:Ne??void 0};else{let H;this&&b.config.useDeprecatedNextContext?(H=Object.create(ae),H.unsubscribe=()=>this.unsubscribe(),Ie={next:ae.next&&J(ae.next,H),error:ae.error&&J(ae.error,H),complete:ae.complete&&J(ae.complete,H)}):Ie=ae}this.destination=new Q(Ie)}}function de(pe){b.config.useDeprecatedSynchronousErrorHandling?(0,D.q)(pe):(0,_.U)(pe)}function Se(pe,ae){const{onStoppedNotification:Ve}=b.config;Ve&&x.u.setTimeout(()=>Ve(pe,ae))}const Ye={closed:!0,next:C.K,error:function Y(pe){throw pe},complete:C.K}},46928:(B,G,a)=>{"use strict";a.d(G,{au:()=>P,wH:()=>C,GI:()=>S});var i=a(38880);const b=(0,a(14912).w)(k=>function(D){k(this),this.message=D?`${D.length} errors occurred during unsubscription:\n${D.map((ee,te)=>`${te+1}) ${ee.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=D});var _=a(41248);
1class C{constructor(x){this.initialTeardown=x,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let x;if(!this.closed){this.closed=!0;const{_parentage:D}=this;if(D)if(this._parentage=null,Array.isArray(D))for(const J of D)J.remove(this);else D.remove(this);const{initialTeardown:ee}=this;if((0,i.m)(ee))try{ee()}catch(J){x=J instanceof b?J.errors:[J]}const{_finalizers:te}=this;if(te){this._finalizers=null;for(const J of te)try{R(J)}catch(Q){x=x??[],Q instanceof b?x=[...x,...Q.errors]:x.push(Q)}}if(x)throw new b(x)}}add(x){var D;if(x&&x!==this)if(this.closed)R(x);else{if(x instanceof C){if(x.closed||x._hasParent(this))return;x._addParent(this)}(this._finalizers=null!==(D=this._finalizers)&&void 0!==D?D:[]).push(x)}}_hasParent(x){const{_parentage:D}=this;return D===x||Array.isArray(D)&&D.includes(x)}_addParent(x){const{_parentage:D}=this;this._parentage=Array.isArray(D)?(D.push(x),D):D?[D,x]:x}_removeParent(x){const{_parentage:D}=this;D===x?this._parentage=null:Array.isArray(D)&&(0,_.k)(D,x)}remove(x){const{_finalizers:D}=this;D&&(0,_.k)(D,x),x instanceof C&&x._removeParent(this)}}C.EMPTY=(()=>{const k=new C;return k.closed=!0,k})();const P=C.EMPTY;function S(k){return k instanceof C||k&&"closed"in k&&(0,i.m)(k.remove)&&(0,i.m)(k.add)&&(0,i.m)(k.unsubscribe)}function R(k){(0,i.m)(k)?k():k.unsubscribe()}},74491:(B,G,a)=>{"use strict";a.d(G,{config:()=>i});const i={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},56040:(B,G,a)=>{"use strict";a.d(G,{E:()=>x});var i=a(53252),v=a(64300),b=a(19900),_=a(528),C=a(74187),P=a(46624),S=a(67904),R=a(87773),k=a(69399);function x(...te){const J=(0,P.e_)(te),Q=(0,P.yu)(te),{args:we,keys:de}=(0,v.Q)(te);if(0===we.length)return(0,b.Q)([],J);const Y=new i._(function D(te,J,Q=_.Z){return we=>{ee(J,()=>{const{length:de}=te,Y=new Array(de);let Se=de,Ye=de;for(let pe=0;pe<de;pe++)ee(J,()=>{const ae=(0,b.Q)(te[pe],J);let Ve=!1;ae.subscribe((0,R.e)(we,Ne=>{Y[pe]=Ne,Ve||(Ve=!0,Ye--),Ye||we.next(Q(Y.slice()))},()=>{--Se||we.complete()}))},we)},we)}}(we,J,de?Se=>(0,S.q)(de,Se):_.Z));return Q?Y.pipe((0,C.j)(Q)):Y}function ee(te,J,Q){te?(0,k._)(Q,te,J):J()}},37228:(B,G,a)=>{"use strict";a.d(G,{W:()=>C});var i=a(80267),b=a(46624),_=a(19900);function C(...P){return function v(){return(0,i.u)(1)}()((0,_.Q)(P,(0,b.e_)(P)))}},41424:(B,G,a)=>{"use strict";a.d(G,{Q:()=>b});var i=a(53252),v=a(50560);function b(_){return new i._(C=>{(0,v.Uv)(_()).subscribe(C)})}},28960:(B,G,a)=>{"use strict";a.d(G,{k:()=>v});const v=new(a(53252)._)(C=>C.complete())},19900:(B,G,a)=>{"use strict";a.d(G,{Q:()=>ae});var i=a(50560),v=a(93920),b=a(92924),P=a(53252),R=a(23835),k=a(38880),x=a(69399);function ee(Ve,Ne){if(!Ve)throw new Error("Iterable cannot be null");return new P._(Ie=>{(0,x._)(Ie,Ne,()=>{const H=Ve[Symbol.asyncIterator]();(0,x._)(Ie,Ne,()=>{H.next().then(j=>{j.done?Ie.complete():Ie.next(j.value)})},0,!0)})})}var te=a(35099),J=a(55432),Q=a(45428),we=a(61688),de=a(60376),Y=a(58272),Se=a(45832);function ae(Ve,Ne){return Ne?function pe(Ve,Ne){if(null!=Ve){if((0,te.O)(Ve))return function _(Ve,Ne){return(0,i.Uv)(Ve).pipe((0,b.y)(Ne),(0,v.y)(Ne))}(Ve,Ne);
1if((0,Q.G)(Ve))return function S(Ve,Ne){return new P._(Ie=>{let H=0;return Ne.schedule(function(){H===Ve.length?Ie.complete():(Ie.next(Ve[H++]),Ie.closed||this.schedule())})})}(Ve,Ne);if((0,J.u)(Ve))return function C(Ve,Ne){return(0,i.Uv)(Ve).pipe((0,b.y)(Ne),(0,v.y)(Ne))}(Ve,Ne);if((0,de.E)(Ve))return ee(Ve,Ne);if((0,we.i)(Ve))return function D(Ve,Ne){return new P._(Ie=>{let H;return(0,x._)(Ie,Ne,()=>{H=Ve[R.w](),(0,x._)(Ie,Ne,()=>{let j,ye;try{({value:j,done:ye}=H.next())}catch(Le){return void Ie.error(Le)}ye?Ie.complete():Ie.next(j)},0,!0)}),()=>(0,k.m)(H?.return)&&H.return()})}(Ve,Ne);if((0,Se.K)(Ve))return function Ye(Ve,Ne){return ee((0,Se._)(Ve),Ne)}(Ve,Ne)}throw(0,Y.W)(Ve)}(Ve,Ne):(0,i.Uv)(Ve)}},70800:(B,G,a)=>{"use strict";a.d(G,{w:()=>x});var i=a(50560),v=a(53252),b=a(7400),_=a(45428),C=a(38880),P=a(74187);const S=["addListener","removeListener"],R=["addEventListener","removeEventListener"],k=["on","off"];function x(Q,we,de,Y){if((0,C.m)(de)&&(Y=de,de=void 0),Y)return x(Q,we,de).pipe((0,P.j)(Y));const[Se,Ye]=function J(Q){return(0,C.m)(Q.addEventListener)&&(0,C.m)(Q.removeEventListener)}(Q)?R.map(pe=>ae=>Q[pe](we,ae,de)):function ee(Q){return(0,C.m)(Q.addListener)&&(0,C.m)(Q.removeListener)}(Q)?S.map(D(Q,we)):function te(Q){return(0,C.m)(Q.on)&&(0,C.m)(Q.off)}(Q)?k.map(D(Q,we)):[];if(!Se&&(0,_.G)(Q))return(0,b.O)(pe=>x(pe,we,de))((0,i.Uv)(Q));if(!Se)throw new TypeError("Invalid event target");return new v._(pe=>{const ae=(...Ve)=>pe.next(1<Ve.length?Ve:Ve[0]);return Se(ae),()=>Ye(ae)})}function D(Q,we){return de=>Y=>Q[de](we,Y)}},50560:(B,G,a)=>{"use strict";a.d(G,{Uv:()=>te});var i=a(81316),v=a(45428),b=a(55432),_=a(53252),C=a(35099),P=a(60376),S=a(58272),R=a(61688),k=a(45832),x=a(38880),D=a(31984),ee=a(90472);function te(pe){if(pe instanceof _._)return pe;if(null!=pe){if((0,C.O)(pe))return function J(pe){return new _._(ae=>{const Ve=pe[ee.a]();if((0,x.m)(Ve.subscribe))return Ve.subscribe(ae);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(pe);if((0,v.G)(pe))return function Q(pe){return new _._(ae=>{for(let Ve=0;Ve<pe.length&&!ae.closed;Ve++)ae.next(pe[Ve]);ae.complete()})}(pe);if((0,b.u)(pe))return function we(pe){return new _._(ae=>{pe.then(Ve=>{ae.closed||(ae.next(Ve),ae.complete())},Ve=>ae.error(Ve)).then(null,D.U)})}(pe);if((0,P.E)(pe))return Y(pe);if((0,R.i)(pe))return function de(pe){return new _._(ae=>{for(const Ve of pe)if(ae.next(Ve),ae.closed)return;ae.complete()})}(pe);if((0,k.K)(pe))return function Se(pe){return Y((0,k._)(pe))}(pe)}throw(0,S.W)(pe)}function Y(pe){return new _._(ae=>{(function Ye(pe,ae){var Ve,Ne,Ie,H;return(0,i.kH)(this,void 0,void 0,function*(){try{for(Ve=(0,i.mA)(pe);!(Ne=yield Ve.next()).done;)if(ae.next(Ne.value),ae.closed)return}catch(j){Ie={error:j}}finally{try{Ne&&!Ne.done&&(H=Ve.return)&&(yield H.call(Ve))}finally{if(Ie)throw Ie.error}}ae.complete()})})(pe,ae).catch(Ve=>ae.error(Ve))})}},33412:(B,G,a)=>{"use strict";a.d(G,{U:()=>P});var i=a(80267),v=a(50560),b=a(28960),_=a(46624),C=a(19900);function P(...S){const R=(0,_.e_)(S),k=(0,_._8)(S,1/0),x=S;return x.length?1===x.length?(0,v.Uv)(x[0]):(0,i.u)(k)((0,C.Q)(x,R)):b.k}},82700:(B,G,a)=>{"use strict";a.d(G,{of:()=>b});var i=a(46624),v=a(19900);function b(..._){const C=(0,i.e_)(_);return(0,v.Q)(_,C)}},83120:(B,G,a)=>{"use strict";a.d(G,{k:()=>C});var i=a(53252),v=a(112),b=a(83048),_=a(31252);function C(P=0,S,R=v.a){let k=-1;return null!=S&&((0,b.G)(S)?R=S:k=S),new i._(x=>{let D=(0,_.e)(P)?+P-R.now():P;D<0&&(D=0);let ee=0;return R.schedule(function(){x.closed||(x.next(ee++),0<=k?this.schedule(void 0,k):x.complete())},D)})}},87773:(B,G,a)=>{"use strict";a.d(G,{e:()=>v});var i=a(41760);function v(_,C,P,S,R){return new b(_,C,P,S,R)}class b extends i.yR{constructor(C,P,S,R,k,x){super(C),this.onFinalize=k,this.shouldUnsubscribe=x,this._next=P?function(D){try{P(D)}catch(ee){C.error(ee)}}:super._next,this._error=R?function(D){try{R(D)}catch(ee){C.error(ee)}finally{this.unsubscribe()}}:super._error,this._complete=S?function(){try{S()}catch(D){C.error(D)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var C;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:P}=this;super.unsubscribe(),!P&&(null===(C=this.onFinalize)||void 0===C||C.call(this))}}}},26020:(B,G,a)=>{"use strict";a.d(G,{m:()=>b});var i=a(7400),v=a(38880);function b(_,C){return(0,v.m)(C)?(0,i.O)(_,C,1):(0,i.O)(_,1)}},34680:(B,G,a)=>{"use strict";a.d(G,{o:()=>_});var i=a(112),v=a(95448),b=a(87773);function _(C,P=i.M){return(0,v.i)((S,R)=>{let k=null,x=null,D=null;const ee=()=>{if(k){k.unsubscribe(),k=null;const J=x;x=null,R.next(J)}};function te(){const J=D+C,Q=P.now();if(Q<J)return k=this.schedule(void 0,J-Q),void R.add(k);
1ee()}S.subscribe((0,b.e)(R,J=>{x=J,D=P.now(),k||(k=P.schedule(te,C),R.add(k))},()=>{ee(),R.complete()},void 0,()=>{x=k=null}))})}},22156:(B,G,a)=>{"use strict";a.d(G,{G:()=>b});var i=a(95448),v=a(87773);function b(_){return(0,i.i)((C,P)=>{let S=!1;C.subscribe((0,v.e)(P,R=>{S=!0,P.next(R)},()=>{S||P.next(_),P.complete()}))})}},74e3:(B,G,a)=>{"use strict";a.d(G,{a:()=>_});var i=a(528),v=a(95448),b=a(87773);function _(P,S=i.Z){return P=P??C,(0,v.i)((R,k)=>{let x,D=!0;R.subscribe((0,b.e)(k,ee=>{const te=S(ee);(D||!P(x,te))&&(D=!1,x=te,k.next(ee))}))})}function C(P,S){return P===S}},66684:(B,G,a)=>{"use strict";a.d(G,{I:()=>b});var i=a(95448),v=a(87773);function b(_,C){return(0,i.i)((P,S)=>{let R=0;P.subscribe((0,v.e)(S,k=>_.call(C,k,R++)&&S.next(k)))})}},68824:(B,G,a)=>{"use strict";a.d(G,{U:()=>v});var i=a(95448);function v(b){return(0,i.i)((_,C)=>{try{_.subscribe(C)}finally{C.add(b)}})}},75084:(B,G,a)=>{"use strict";a.d(G,{K:()=>S});var i=a(37696),v=a(66684),b=a(3992),_=a(22156),C=a(98124),P=a(528);function S(R,k){const x=arguments.length>=2;return D=>D.pipe(R?(0,v.I)((ee,te)=>R(ee,te,D)):P.Z,(0,b.U)(1),x?(0,_.G)(k):(0,C._)(()=>new i.G))}},54704:(B,G,a)=>{"use strict";a.d(G,{k:()=>b});var i=a(95448),v=a(87773);function b(_,C){return(0,i.i)((P,S)=>{let R=0;P.subscribe((0,v.e)(S,k=>{S.next(_.call(C,k,R++))}))})}},32700:(B,G,a)=>{"use strict";a.d(G,{e:()=>v});var i=a(54704);function v(b){return(0,i.k)(()=>b)}},80267:(B,G,a)=>{"use strict";a.d(G,{u:()=>b});var i=a(7400),v=a(528);function b(_=1/0){return(0,i.O)(v.Z,_)}},7400:(B,G,a)=>{"use strict";a.d(G,{O:()=>R});var i=a(54704),v=a(50560),b=a(95448),_=a(69399),C=a(87773),S=a(38880);function R(k,x,D=1/0){return(0,S.m)(x)?R((ee,te)=>(0,i.k)((J,Q)=>x(ee,J,te,Q))((0,v.Uv)(k(ee,te))),D):("number"==typeof x&&(D=x),(0,b.i)((ee,te)=>function P(k,x,D,ee,te,J,Q,we){const de=[];let Y=0,Se=0,Ye=!1;const pe=()=>{Ye&&!de.length&&!Y&&x.complete()},ae=Ne=>Y<ee?Ve(Ne):de.push(Ne),Ve=Ne=>{J&&x.next(Ne),Y++;let Ie=!1;(0,v.Uv)(D(Ne,Se++)).subscribe((0,C.e)(x,H=>{te?.(H),J?ae(H):x.next(H)},()=>{Ie=!0},void 0,()=>{if(Ie)try{for(Y--;de.length&&Y<ee;){const H=de.shift();Q?(0,_._)(x,Q,()=>Ve(H)):Ve(H)}pe()}catch(H){x.error(H)}}))};return k.subscribe((0,C.e)(x,ae,()=>{Ye=!0,pe()})),()=>{we?.()}}(ee,te,k,D)))}},93920:(B,G,a)=>{"use strict";a.d(G,{y:()=>_});var i=a(69399),v=a(95448),b=a(87773);function _(C,P=0){return(0,v.i)((S,R)=>{S.subscribe((0,b.e)(R,k=>(0,i._)(R,C,()=>R.next(k),P),()=>(0,i._)(R,C,()=>R.complete(),P),k=>(0,i._)(R,C,()=>R.error(k),P)))})}},37036:(B,G,a)=>{"use strict";a.d(G,{c:()=>b});var i=a(95448),v=a(87773);function b(){return(0,i.i)((_,C)=>{let P,S=!1;_.subscribe((0,v.e)(C,R=>{const k=P;P=R,S&&C.next([k,R]),S=!0}))})}},21112:(B,G,a)=>{"use strict";a.d(G,{K:()=>b});var i=a(95448),v=a(48904);function b(_,C){return(0,i.i)((0,v.g)(_,C,arguments.length>=2,!0))}},48904:(B,G,a)=>{"use strict";a.d(G,{g:()=>v});var i=a(87773);function v(b,_,C,P,S){return(R,k)=>{let x=C,D=_,ee=0;R.subscribe((0,i.e)(k,te=>{const J=ee++;D=x?b(D,te,J):(x=!0,te),P&&k.next(D)},S&&(()=>{x&&k.next(D),k.complete()})))}}},67648:(B,G,a)=>{"use strict";a.d(G,{o:()=>C});var i=a(50560),v=a(95657),b=a(41760),_=a(95448);function C(S={}){const{connector:R=(()=>new v.E),resetOnError:k=!0,resetOnComplete:x=!0,resetOnRefCountZero:D=!0}=S;return ee=>{let te,J,Q,we=0,de=!1,Y=!1;const Se=()=>{J?.unsubscribe(),J=void 0},Ye=()=>{Se(),te=Q=void 0,de=Y=!1},pe=()=>{const ae=te;Ye(),ae?.unsubscribe()};return(0,_.i)((ae,Ve)=>{we++,!Y&&!de&&Se();const Ne=Q=Q??R();Ve.add(()=>{we--,0===we&&!Y&&!de&&(J=P(pe,D))}),Ne.subscribe(Ve),!te&&we>0&&(te=new b.ot({next:Ie=>Ne.next(Ie),error:Ie=>{Y=!0,Se(),J=P(Ye,k,Ie),Ne.error(Ie)},complete:()=>{de=!0,Se(),J=P(Ye,x),Ne.complete()}}),(0,i.Uv)(ae).subscribe(te))})(ee)}}function P(S,R,...k){if(!0===R)return void S();if(!1===R)return;const x=new b.ot({next:()=>{x.unsubscribe(),S()}});return(0,i.Uv)(R(...k)).subscribe(x)}},8716:(B,G,a)=>{"use strict";a.d(G,{C:()=>b});var i=a(22540),v=a(67648);function b(_,C,P){let S,R=!1;return _&&"object"==typeof _?({bufferSize:S=1/0,windowTime:C=1/0,refCount:R=!1,scheduler:P}=_):S=_??1/0,(0,v.o)({connector:()=>new i.o(S,C,P),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:R})}},75568:(B,G,a)=>{"use strict";a.d(G,{W:()=>_});var i=a(37228),v=a(46624),b=a(95448);function _(...C){const P=(0,v.e_)(C);return(0,b.i)((S,R)=>
1{(P?(0,i.W)(C,S,P):(0,i.W)(C,S)).subscribe(R)})}},92924:(B,G,a)=>{"use strict";a.d(G,{y:()=>v});var i=a(95448);function v(b,_=0){return(0,i.i)((C,P)=>{P.add(b.schedule(()=>C.subscribe(P),_))})}},17368:(B,G,a)=>{"use strict";a.d(G,{G:()=>_});var i=a(50560),v=a(95448),b=a(87773);function _(C,P){return(0,v.i)((S,R)=>{let k=null,x=0,D=!1;const ee=()=>D&&!k&&R.complete();S.subscribe((0,b.e)(R,te=>{k?.unsubscribe();let J=0;const Q=x++;(0,i.Uv)(C(te,Q)).subscribe(k=(0,b.e)(R,we=>R.next(P?P(te,we,Q,J++):we),()=>{k=null,ee()}))},()=>{D=!0,ee()}))})}},90320:(B,G,a)=>{"use strict";a.d(G,{i:()=>b});var i=a(17368),v=a(38880);function b(_,C){return(0,v.m)(C)?(0,i.G)(()=>_,C):(0,i.G)(()=>_)}},3992:(B,G,a)=>{"use strict";a.d(G,{U:()=>_});var i=a(28960),v=a(95448),b=a(87773);function _(C){return C<=0?()=>i.k:(0,v.i)((P,S)=>{let R=0;P.subscribe((0,b.e)(S,k=>{++R<=C&&(S.next(k),C<=R&&S.complete())}))})}},63492:(B,G,a)=>{"use strict";a.d(G,{s:()=>_});var i=a(28960),v=a(95448),b=a(87773);function _(C){return C<=0?()=>i.k:(0,v.i)((P,S)=>{let R=[];P.subscribe((0,b.e)(S,k=>{R.push(k),C<R.length&&R.shift()},()=>{for(const k of R)S.next(k);S.complete()},void 0,()=>{R=null}))})}},53616:(B,G,a)=>{"use strict";a.d(G,{a:()=>C});var i=a(95448),v=a(87773),b=a(50560),_=a(20308);function C(P){return(0,i.i)((S,R)=>{(0,b.Uv)(P).subscribe((0,v.e)(R,()=>R.complete(),_.K)),!R.closed&&S.subscribe(R)})}},19212:(B,G,a)=>{"use strict";a.d(G,{y:()=>C});var i=a(38880),v=a(95448),b=a(87773),_=a(528);function C(P,S,R){const k=(0,i.m)(P)||S||R?{next:P,error:S,complete:R}:P;return k?(0,v.i)((x,D)=>{var ee;null===(ee=k.subscribe)||void 0===ee||ee.call(k);let te=!0;x.subscribe((0,b.e)(D,J=>{var Q;null===(Q=k.next)||void 0===Q||Q.call(k,J),D.next(J)},()=>{var J;te=!1,null===(J=k.complete)||void 0===J||J.call(k),D.complete()},J=>{var Q;te=!1,null===(Q=k.error)||void 0===Q||Q.call(k,J),D.error(J)},()=>{var J,Q;te&&(null===(J=k.unsubscribe)||void 0===J||J.call(k)),null===(Q=k.finalize)||void 0===Q||Q.call(k)}))}):_.Z}},65800:(B,G,a)=>{"use strict";a.d(G,{U:()=>S});var i=a(112),v=a(95448),b=a(87773),_=a(50560),P=a(83120);function S(R,k=i.M,x){const D=(0,P.k)(R,k);return function C(R,k){return(0,v.i)((x,D)=>{const{leading:ee=!0,trailing:te=!1}=k??{};let J=!1,Q=null,we=null,de=!1;const Y=()=>{we?.unsubscribe(),we=null,te&&(pe(),de&&D.complete())},Se=()=>{we=null,de&&D.complete()},Ye=ae=>we=(0,_.Uv)(R(ae)).subscribe((0,b.e)(D,Y,Se)),pe=()=>{if(J){J=!1;const ae=Q;Q=null,D.next(ae),!de&&Ye(ae)}};x.subscribe((0,b.e)(D,ae=>{J=!0,Q=ae,(!we||we.closed)&&(ee?pe():Ye(ae))},()=>{de=!0,(!(te&&J&&we)||we.closed)&&D.complete()}))})}(()=>D,x)}},98124:(B,G,a)=>{"use strict";a.d(G,{_:()=>_});var i=a(37696),v=a(95448),b=a(87773);function _(P=C){return(0,v.i)((S,R)=>{let k=!1;S.subscribe((0,b.e)(R,x=>{k=!0,R.next(x)},()=>k?R.complete():R.error(P())))})}function C(){return new i.G}},1364:(B,G,a)=>{"use strict";a.d(G,{m:()=>C});var i=a(46928);class v extends i.wH{constructor(S,R){super()}schedule(S,R=0){return this}}const b={setInterval(P,S,...R){const{delegate:k}=b;return k?.setInterval?k.setInterval(P,S,...R):setInterval(P,S,...R)},clearInterval(P){const{delegate:S}=b;return(S?.clearInterval||clearInterval)(P)},delegate:void 0};var _=a(41248);class C extends v{constructor(S,R){super(S,R),this.scheduler=S,this.work=R,this.pending=!1}schedule(S,R=0){var k;if(this.closed)return this;this.state=S;const x=this.id,D=this.scheduler;return null!=x&&(this.id=this.recycleAsyncId(D,x,R)),this.pending=!0,this.delay=R,this.id=null!==(k=this.id)&&void 0!==k?k:this.requestAsyncId(D,this.id,R),this}requestAsyncId(S,R,k=0){return b.setInterval(S.flush.bind(S,this),k)}recycleAsyncId(S,R,k=0){if(null!=k&&this.delay===k&&!1===this.pending)return R;null!=R&&b.clearInterval(R)}execute(S,R){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const k=this._execute(S,R);if(k)return k;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(S,R){let x,k=!1;try{this.work(S)}catch(D){k=!0,x=D||new Error("Scheduled action threw falsy error")}if(k)return this.unsubscribe(),x}unsubscribe(){if(!this.closed){const{id:S,scheduler:R}=this,{actions:k}=R;
1this.work=this.state=this.scheduler=null,this.pending=!1,(0,_.k)(k,this),null!=S&&(this.id=this.recycleAsyncId(R,S,null)),this.delay=null,super.unsubscribe()}}}},9816:(B,G,a)=>{"use strict";a.d(G,{k:()=>b});var i=a(35960);class v{constructor(C,P=v.now){this.schedulerActionCtor=C,this.now=P}schedule(C,P=0,S){return new this.schedulerActionCtor(this,C).schedule(S,P)}}v.now=i.K.now;class b extends v{constructor(C,P=v.now){super(C,P),this.actions=[],this._active=!1}flush(C){const{actions:P}=this;if(this._active)return void P.push(C);let S;this._active=!0;do{if(S=C.execute(C.state,C.delay))break}while(C=P.shift());if(this._active=!1,S){for(;C=P.shift();)C.unsubscribe();throw S}}}},112:(B,G,a)=>{"use strict";a.d(G,{M:()=>b,a:()=>_});var i=a(1364);const b=new(a(9816).k)(i.m),_=b},35960:(B,G,a)=>{"use strict";a.d(G,{K:()=>i});const i={now:()=>(i.delegate||Date).now(),delegate:void 0}},43376:(B,G,a)=>{"use strict";a.d(G,{u:()=>i});const i={setTimeout(v,b,..._){const{delegate:C}=i;return C?.setTimeout?C.setTimeout(v,b,..._):setTimeout(v,b,..._)},clearTimeout(v){const{delegate:b}=i;return(b?.clearTimeout||clearTimeout)(v)},delegate:void 0}},23835:(B,G,a)=>{"use strict";a.d(G,{w:()=>v});const v=function i(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},90472:(B,G,a)=>{"use strict";a.d(G,{a:()=>i});const i="function"==typeof Symbol&&Symbol.observable||"@@observable"},37696:(B,G,a)=>{"use strict";a.d(G,{G:()=>v});const v=(0,a(14912).w)(b=>function(){b(this),this.name="EmptyError",this.message="no elements in sequence"})},46624:(B,G,a)=>{"use strict";a.d(G,{_8:()=>P,e_:()=>C,yu:()=>_});var i=a(38880),v=a(83048);function b(S){return S[S.length-1]}function _(S){return(0,i.m)(b(S))?S.pop():void 0}function C(S){return(0,v.G)(b(S))?S.pop():void 0}function P(S,R){return"number"==typeof b(S)?S.pop():R}},64300:(B,G,a)=>{"use strict";a.d(G,{Q:()=>C});const{isArray:i}=Array,{getPrototypeOf:v,prototype:b,keys:_}=Object;function C(S){if(1===S.length){const R=S[0];if(i(R))return{args:R,keys:null};if(function P(S){return S&&"object"==typeof S&&v(S)===b}(R)){const k=_(R);return{args:k.map(x=>R[x]),keys:k}}}return{args:S,keys:null}}},41248:(B,G,a)=>{"use strict";function i(v,b){if(v){const _=v.indexOf(b);0<=_&&v.splice(_,1)}}a.d(G,{k:()=>i})},14912:(B,G,a)=>{"use strict";function i(v){const _=v(C=>{Error.call(C),C.stack=(new Error).stack});return _.prototype=Object.create(Error.prototype),_.prototype.constructor=_,_}a.d(G,{w:()=>i})},67904:(B,G,a)=>{"use strict";function i(v,b){return v.reduce((_,C,P)=>(_[C]=b[P],_),{})}a.d(G,{q:()=>i})},92075:(B,G,a)=>{"use strict";a.d(G,{c:()=>b,q:()=>_});var i=a(74491);let v=null;function b(C){if(i.config.useDeprecatedSynchronousErrorHandling){const P=!v;if(P&&(v={errorThrown:!1,error:null}),C(),P){const{errorThrown:S,error:R}=v;if(v=null,S)throw R}}else C()}function _(C){i.config.useDeprecatedSynchronousErrorHandling&&v&&(v.errorThrown=!0,v.error=C)}},69399:(B,G,a)=>{"use strict";function i(v,b,_,C=0,P=!1){const S=b.schedule(function(){_(),P?v.add(this.schedule(null,C)):this.unsubscribe()},C);if(v.add(S),!P)return S}a.d(G,{_:()=>i})},528:(B,G,a)=>{"use strict";function i(v){return v}a.d(G,{Z:()=>i})},45428:(B,G,a)=>{"use strict";a.d(G,{G:()=>i});const i=v=>v&&"number"==typeof v.length&&"function"!=typeof v},60376:(B,G,a)=>{"use strict";a.d(G,{E:()=>v});var i=a(38880);function v(b){return Symbol.asyncIterator&&(0,i.m)(b?.[Symbol.asyncIterator])}},31252:(B,G,a)=>{"use strict";function i(v){return v instanceof Date&&!isNaN(v)}a.d(G,{e:()=>i})},38880:(B,G,a)=>{"use strict";function i(v){return"function"==typeof v}a.d(G,{m:()=>i})},35099:(B,G,a)=>{"use strict";a.d(G,{O:()=>b});var i=a(90472),v=a(38880);function b(_){return(0,v.m)(_[i.a])}},61688:(B,G,a)=>{"use strict";a.d(G,{i:()=>b});var i=a(23835),v=a(38880);function b(_){return(0,v.m)(_?.[i.w])}},55432:(B,G,a)=>{"use strict";a.d(G,{u:()=>v});var i=a(38880);function v(b){return(0,i.m)(b?.then)}},45832:(B,G,a)=>{"use strict";a.d(G,{K:()=>_,_:()=>b});var i=a(81316),v=a(38880);function b(C){return(0,i.o7)(this,arguments,function*(){const S=C.getReader();try{for(;;){const{value:R,done:k}=yield(0,i.U1)(S.read());if(k)return yield(0,i.U1)(void 0);yield yield(0,i.U1)(R)}}finally{S.releaseLock()}})}function _(C){return(0,v.m)(C?.getReader)}},83048:(B,G,a)=>{"use strict";a.d(G,{G:()=>v});var i=a(38880);function v(b){return b&&(0,i.m)(b.schedule)}},95448:(B,G,a)=>{"use strict";a.d(G,{e:()=>v,i:()=>b});var i=a(38880);function v(_){return(0,i.m)(_?.lift)}function b(_){return C=>{if(v(C))return C.lift(function(P){try{return _(P,this)}catch(S){this.error(S)}});throw new TypeError("Unable to lift unknown Observable type")}}},74187:(B,G,a)=>{"use strict";a.d(G,{j:()=>_});var i=a(54704);const{isArray:v}=Array;function _(C){return(0,i.k)(P=>function b(C,P){return v(P)?C(...P):C(P)}(C,P))}},20308:(B,G,a)=>{"use strict";function i(){}a.d(G,{K:()=>i})},83928:(B,G,a)=>{"use strict";a.d(G,{W:()=>v,Y:()=>b});var i=a(528);function v(..._){return b(_)}
1function b(_){return 0===_.length?i.Z:1===_.length?_[0]:function(P){return _.reduce((S,R)=>R(S),P)}}},31984:(B,G,a)=>{"use strict";a.d(G,{U:()=>b});var i=a(74491),v=a(43376);function b(_){v.u.setTimeout(()=>{const{onUnhandledError:C}=i.config;if(!C)throw _;C(_)})}},58272:(B,G,a)=>{"use strict";function i(v){return new TypeError(`You provided ${null!==v&&"object"==typeof v?"an invalid object":`'${v}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}a.d(G,{W:()=>i})},54800:(B,G,a)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),a(21040),a(53475),a(31956),a(12600),a(82984),a(4376),a(62016);var i=a(1196),v=a(94064),b=a(66024),_=a(71559),C=a(54216),P=a(96284),S=a(63532),R=a(2676);a(76568),a(49640),a(79628);var k=a(33248),x=a(59848),D=a(45376),ee=a(85720);a(16699);var te=a(60764);a(51408),a(4248),a(32452),a(29912),a(48928);var J=a(43752);a(32928),a(35016),a(16968);var Q=a(97936);a(89120),a(85607),a(29708),a(78235),a(12644),a(32888);var we=a(58416);a(54004);var de=a(75088),Y=a(87312);a(9456);var Se=a(70544);function Ye(St){return St&&"object"==typeof St&&"default"in St?St:{default:St}}function pe(St){if(St&&St.__esModule)return St;var Rt=Object.create(null);return St&&Object.keys(St).forEach(function(Ee){if("default"!==Ee){var U=Object.getOwnPropertyDescriptor(St,Ee);Object.defineProperty(Rt,Ee,U.get?U:{enumerable:!0,get:function(){return St[Ee]}})}}),Rt.default=St,Object.freeze(Rt)}var ae=Ye(i),Ve=Ye(v),Ne=Ye(b),Ie=Ye(_),H=Ye(C),j=Ye(P),ye=Ye(S),Le=Ye(R),W=Ye(k),We=Ye(x),At=Ye(te),Ut=pe(J),it=Ye(Q),ue=pe(de),se=Ye(Y),ce=pe(Se);function K(St,Rt,Ee,U){var ne,ie=arguments.length,V=ie<3?Rt:null===U?U=Object.getOwnPropertyDescriptor(Rt,Ee):U;if("object"===(typeof Reflect>"u"?"undefined":We.default(Reflect))&&"function"==typeof Reflect.decorate)V=Reflect.decorate(St,Rt,Ee,U);else for(var je=St.length-1;je>=0;je--)(ne=St[je])&&(V=(ie<3?ne(V):ie>3?ne(Rt,Ee,V):ne(Rt,Ee))||V);return ie>3&&V&&Object.defineProperty(Rt,Ee,V),V}function _e(St,Rt){if("object"===(typeof Reflect>"u"?"undefined":We.default(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(St,Rt)}function De(){}function ke(){ke.init.call(this)}function Lt(St){return void 0===St._maxListeners?ke.defaultMaxListeners:St._maxListeners}function rn(St,Rt,Ee,U){var ie,V,ne;if("function"!=typeof Ee)throw new TypeError('"listener" argument must be a function');if((V=St._events)?(V.newListener&&(St.emit("newListener",Rt,Ee.listener?Ee.listener:Ee),V=St._events),ne=V[Rt]):(V=St._events=new De,St._eventsCount=0),ne){if("function"==typeof ne?ne=V[Rt]=U?[Ee,ne]:[ne,Ee]:U?ne.unshift(Ee):ne.push(Ee),!ne.warned&&(ie=Lt(St))&&ie>0&&ne.length>ie){ne.warned=!0;var je=new Error("Possible EventEmitter memory leak detected. "+ne.length+" "+Rt+" listeners added. Use emitter.setMaxListeners() to increase limit");je.name="MaxListenersExceededWarning",je.emitter=St,je.type=Rt,je.count=ne.length,function cn(St){"function"==typeof console.warn?console.warn(St):console.log(St)}(je)}}else ne=V[Rt]=Ee,++St._eventsCount;return St}function mn(St,Rt,Ee){var U=!1;function ie(){St.removeListener(Rt,ie),U||(U=!0,Ee.apply(St,arguments))}return ie.listener=Ee,ie}function dt(St){var Rt=this._events;if(Rt){var Ee=Rt[St];if("function"==typeof Ee)return 1;if(Ee)return Ee.length}return 0}function rt(St,Rt){for(var Ee=new Array(Rt);Rt--;)Ee[Rt]=St[Rt];return Ee}De.prototype=Object.create(null),ke.EventEmitter=ke,ke.usingDomains=!1,ke.prototype.domain=void 0,ke.prototype._events=void 0,ke.prototype._maxListeners=void 0,ke.defaultMaxListeners=10,ke.init=function(){this.domain=null,ke.usingDomains&&(void 0).active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new De,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ke.prototype.setMaxListeners=function(Rt){if("number"!=typeof Rt||Rt<0||isNaN(Rt))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=Rt,this},ke.prototype.getMaxListeners=function(){return Lt(this)},ke.prototype.emit=function(Rt){var Ee,U,ie,V,ne,je,$e,Wt="error"===Rt;if(je=this._events)Wt=Wt&&null==je.error;else if(!Wt)return!1;if($e=this.domain,Wt){if(Ee=arguments[1],!$e){if(Ee instanceof Error)throw Ee;var In=new Error('Uncaught, unspecified "error" event. ('+Ee+")");throw In.context=Ee,In}return Ee||(Ee=new Error('Uncaught, unspecified "error" event')),Ee.domainEmitter=this,Ee.domain=$e,Ee.domainThrown=!1,$e.emit("error",Ee),!1}if(!(U=je[Rt]))return!1;var rr="function"==typeof U;switch(ie=arguments.length){case 1:!function Dt(St,Rt,Ee){if(Rt)St.call(Ee);else for(var U=St.length,ie=rt(St,U),V=0;V<U;++V)ie[V].call(Ee)}(U,rr,this);break;case 2:!function He(St,Rt,Ee,U){if(Rt)St.call(Ee,U);else for(var ie=St.length,V=rt(St,ie),ne=0;ne<ie;++ne)V[ne].call(Ee,U)}(U,rr,this,arguments[1]);break;case 3:!function ge(St,Rt,Ee,U,ie){if(Rt)St.call(Ee,U,ie);else for(var V=St.length,ne=rt(St,V),je=0;je<V;++je)ne[je].call(Ee,U,ie)}(U,rr,this,arguments[1],arguments[2]);break;
1case 4:!function xt(St,Rt,Ee,U,ie,V){if(Rt)St.call(Ee,U,ie,V);else for(var ne=St.length,je=rt(St,ne),$e=0;$e<ne;++$e)je[$e].call(Ee,U,ie,V)}(U,rr,this,arguments[1],arguments[2],arguments[3]);break;default:for(V=new Array(ie-1),ne=1;ne<ie;ne++)V[ne-1]=arguments[ne];!function pt(St,Rt,Ee,U){if(Rt)St.apply(Ee,U);else for(var ie=St.length,V=rt(St,ie),ne=0;ne<ie;++ne)V[ne].apply(Ee,U)}(U,rr,this,V)}return!0},ke.prototype.on=ke.prototype.addListener=function(Rt,Ee){return rn(this,Rt,Ee,!1)},ke.prototype.prependListener=function(Rt,Ee){return rn(this,Rt,Ee,!0)},ke.prototype.once=function(Rt,Ee){if("function"!=typeof Ee)throw new TypeError('"listener" argument must be a function');return this.on(Rt,mn(this,Rt,Ee)),this},ke.prototype.prependOnceListener=function(Rt,Ee){if("function"!=typeof Ee)throw new TypeError('"listener" argument must be a function');return this.prependListener(Rt,mn(this,Rt,Ee)),this},ke.prototype.removeListener=function(Rt,Ee){var U,ie,V,ne,je;if("function"!=typeof Ee)throw new TypeError('"listener" argument must be a function');if(!(ie=this._events))return this;if(!(U=ie[Rt]))return this;if(U===Ee||U.listener&&U.listener===Ee)0==--this._eventsCount?this._events=new De:(delete ie[Rt],ie.removeListener&&this.emit("removeListener",Rt,U.listener||Ee));else if("function"!=typeof U){for(V=-1,ne=U.length;ne-- >0;)if(U[ne]===Ee||U[ne].listener&&U[ne].listener===Ee){je=U[ne].listener,V=ne;break}if(V<0)return this;if(1===U.length){if(U[0]=void 0,0==--this._eventsCount)return this._events=new De,this;delete ie[Rt]}else!function lt(St,Rt){for(var Ee=Rt,U=Ee+1,ie=St.length;U<ie;Ee+=1,U+=1)St[Ee]=St[U];St.pop()}(U,V);ie.removeListener&&this.emit("removeListener",Rt,je||Ee)}return this},ke.prototype.off=function(St,Rt){return this.removeListener(St,Rt)},ke.prototype.removeAllListeners=function(Rt){var Ee,U;if(!(U=this._events))return this;if(!U.removeListener)return 0===arguments.length?(this._events=new De,this._eventsCount=0):U[Rt]&&(0==--this._eventsCount?this._events=new De:delete U[Rt]),this;if(0===arguments.length){for(var ne,ie=Object.keys(U),V=0;V<ie.length;++V)"removeListener"!==(ne=ie[V])&&this.removeAllListeners(ne);return this.removeAllListeners("removeListener"),this._events=new De,this._eventsCount=0,this}if("function"==typeof(Ee=U[Rt]))this.removeListener(Rt,Ee);else if(Ee)do{this.removeListener(Rt,Ee[Ee.length-1])}while(Ee[0]);return this},ke.prototype.listeners=function(Rt){var Ee,U,ie=this._events;return U=ie&&(Ee=ie[Rt])?"function"==typeof Ee?[Ee.listener||Ee]:function kt(St){for(var Rt=new Array(St.length),Ee=0;Ee<Rt.length;++Ee)Rt[Ee]=St[Ee].listener||St[Ee];return Rt}(Ee):[],U},ke.listenerCount=function(St,Rt){return"function"==typeof St.listenerCount?St.listenerCount(Rt):dt.call(St,Rt)},ke.prototype.listenerCount=dt,ke.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var an=function(){function St(Rt){Ve.default(this,St),this.base=Rt,this.args=new Array,this.paths=new Array}return Ne.default(St,[{key:"pathSegment",value:function(Ee){return this.paths.push(encodeURIComponent(Ee)),this}},{key:"queryParam",value:function(Ee,U){return typeof U<"u"&&this.args.push(encodeURIComponent(Ee)+"="+encodeURIComponent(U)),this}},{key:"build",value:function(){var Ee=this.base;return this.paths.length&&(Ee+="/"+this.paths.join("/")),this.args.length&&(Ee+="?"+this.args.join("&")),Ee}}]),St}();function Yn(St){var Rt=function bn(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}var Hn=function(St){H.default(Ee,St);var Rt=Yn(Ee);function Ee(U){var ie,V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,ne=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Ve.default(this,Ee),(ie=Rt.call(this)).name=ie.constructor.name,ie.message="".concat(U," (status: ").concat(V,", code: ").concat(ne,")"),ie.status=V,ie.code=ne,ie}return Ee}(At.default(Error)),Fn=function(St){H.default(Ee,St);var Rt=Yn(Ee);function Ee(U){var ie,V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,ne=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,je=arguments.length>3?arguments[3]:void 0;return Ve.default(this,Ee),(ie=Rt.call(this,U,V,ne)).body=je,ie}return Ee}(Hn);function On(St){return JSON.parse(JSON.stringify(St))}function gr(St){if(void 0!==St&&!Vr(St))throw new Hn("Invalid pageSize parameter. Expected a positive integer, was '".concat(St,"'."),400,20007)}function Vr(St){return function Mr(St){return!isNaN(parseInt(St))&&isFinite(St)}(St)&&St>0}var Fr=Ut.getLogger("twilio-sync");function ti(St,Rt){return["".concat((new Date).toISOString()," Sync ").concat(St,":")].concat(Array.from(Rt))}var Nr_setLevel=function(Rt){Fr.setLevel(Rt)},Nr_trace=function(){for(var Rt=arguments.length,Ee=new Array(Rt),U=0;U<Rt;U++)Ee[U]=arguments[U];Fr.trace.apply(null,ti("T",Ee))},Nr_debug=function(){for(var Rt=arguments.length,Ee=new Array(Rt),U=0;U<Rt;U++)Ee[U]=arguments[U];Fr.debug.apply(null,ti("D",Ee))},Nr_warn=function(){for(var Rt=arguments.length,Ee=new Array(Rt),U=0;U<Rt;U++)Ee[U]=arguments[U];Fr.warn.apply(null,ti("W",Ee))},Nr_error=function(){for(var Rt=arguments.length,Ee=new Array(Rt),U=0;U<Rt;U++)Ee[U]=arguments[U];Fr.error.apply(null,ti("E",Ee))};function Qe(St,Rt,Ee){return St&&typeof St[Rt]<"u"?St[Rt]:Ee}var ut=function(){function St(){var Rt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ve.default(this,St);var U="https://cds.".concat(Rt.region||"us1",".twilio.com"),ie=Rt.cdsUri||U;this.settings={subscriptionsUri:ie+"/v4/Subscriptions",documentsUri:ie+"/v3/Documents",listsUri:ie+"/v3/Lists",mapsUri:ie+"/v3/Maps",streamsUri:ie+"/v3/Stream
1s",insightsUri:ie+"/v3/Insights",sessionStorageEnabled:Qe(Rt.Sync,"enableSessionStorage",!0),productId:Rt.productId}}return Ne.default(St,[{key:"subscriptionsUri",get:function(){return this.settings.subscriptionsUri}},{key:"documentsUri",get:function(){return this.settings.documentsUri}},{key:"listsUri",get:function(){return this.settings.listsUri}},{key:"mapsUri",get:function(){return this.settings.mapsUri}},{key:"streamsUri",get:function(){return this.settings.streamsUri}},{key:"insightsUri",get:function(){return this.settings.insightsUri}},{key:"backoffConfig",get:function(){return this.settings.backoffConfig||{}}},{key:"sessionStorageEnabled",get:function(){return this.settings.sessionStorageEnabled}},{key:"productId",get:function(){return this.settings.productId}}]),St}();function Xt(St,Rt){var Ee=typeof Symbol<"u"&&St[Symbol.iterator]||St["@@iterator"];if(!Ee){if(Array.isArray(St)||(Ee=function wn(St,Rt){if(St){if("string"==typeof St)return dr(St,Rt);var Ee=Object.prototype.toString.call(St).slice(8,-1);if("Object"===Ee&&St.constructor&&(Ee=St.constructor.name),"Map"===Ee||"Set"===Ee)return Array.from(St);
1if("Arguments"===Ee||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return dr(St,Rt)}}(St))||Rt&&St&&"number"==typeof St.length){Ee&&(St=Ee);var U=0,ie=function(){};return{s:ie,n:function(){return U>=St.length?{done:!0}:{done:!1,value:St[U++]}},e:function(Wt){throw Wt},f:ie}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var je,V=!0,ne=!1;return{s:function(){Ee=Ee.call(St)},n:function(){var Wt=Ee.next();return V=Wt.done,Wt},e:function(Wt){ne=!0,je=Wt},f:function(){try{!V&&null!=Ee.return&&Ee.return()}finally{if(ne)throw je}}}}function dr(St,Rt){(null==Rt||Rt>St.length)&&(Rt=St.length);for(var Ee=0,U=new Array(Rt);Ee<Rt;Ee++)U[Ee]=St[Ee];return U}var vn=function(){function St(Rt){Ve.default(this,St),this.localObject=Rt,this.pendingCorrelationId=null,this.pendingAction=null,this.established=!1,this.retryCount=0}return Ne.default(St,[{key:"sid",get:function(){return this.localObject.sid}},{key:"type",get:function(){return this.localObject.type}},{key:"lastEventId",get:function(){return this.localObject.lastEventId}},{key:"indexName",get:function(){return this.localObject.indexName}},{key:"queryString",get:function(){return this.localObject.queryString}},{key:"isEstablished",get:function(){return this.established}},{key:"update",value:function(Ee,U){this.localObject._update(Ee,U)}},{key:"updatePending",value:function(Ee,U){this.pendingAction=Ee,this.pendingCorrelationId=U}},{key:"reset",value:function(){this.updatePending(null,null),this.retryCount=0,this.established=!1,this.setSubscriptionState("none")}},{key:"markAsFailed",value:function(Ee){this.rejectedWithError=Ee.error,this.updatePending(null,null),this.localObject.reportFailure(new Hn("Failed to subscribe on service events: ".concat(Ee.error.message),Ee.error.status,Ee.error.code))}},{key:"complete",value:function(Ee){this.updatePending(null,null),this.established=!0,this.localObject._advanceLastEventId(Ee)}},{key:"setSubscriptionState",value:function(Ee){this.localObject._setSubscriptionState(Ee)}}]),St}(),jt=function(){function St(Rt){var Ee=this;Ve.default(this,St),Le.default(this,"isConnected",!1),Le.default(this,"maxBatchSize",100),Le.default(this,"subscriptionTtlTimer",null),Le.default(this,"pendingPokeReason",null),this.services=Rt,this.subscriptions=new Map,this.persisted=new Map,this.latestPokeResponseArrivalTimestampByCorrelationId=new Map,this.backoff=we.Backoff.exponential(Object.assign({randomisationFactor:.2,initialDelay:100,maxDelay:12e4},this.services.config.backoffConfig)),this.backoff.on("ready",function(){var ie=Ee.getSubscriptionUpdateBatch(),V=ie.action;V?Ee.applyNewSubscriptionUpdateBatch(V,ie.subscriptions):(Ee.backoff.reset(),Nr_debug("All subscriptions resolved."))})}return Ne.default(St,[{key:"getSubscriptionUpdateBatch",value:function(){function Ee(V,ne,je,$e){var rr,Wt=[],In=Xt(V);try{for(In.s();!(rr=In.n()).done;){var fr=it.default(rr.value,2),Rr=fr[1];if(!ne.get(fr[0])&&je!==Rr.pendingAction&&!Rr.rejectedWithError&&(Wt.push(Rr),$e&&Wt.length>=$e))break}}catch(Oi){In.e(Oi)}finally{In.f()}return Wt}var U=Ee(this.subscriptions,this.persisted,"establish",this.maxBatchSize);if(U.length>0)return{action:"establish",subscriptions:U};var ie=Ee(this.persisted,this.subscriptions,"cancel",this.maxBatchSize);return ie.length>0?{action:"cancel",subscriptions:ie}:{action:null,subscriptions:null}}},{key:"persist",value:function(){this.backoff.backoff()}},{key:"applyNewSubscriptionUpdateBatch",value:(Rt=ae.default(W.default.mark(function U(ie,V){var je,$e,Wt,rr,fr,Xn,Rr,bs,Ns,Ci,ne=this;return W.default.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:if(this.isConnected){$t.next=4;break}return Nr_debug("Twilsock connection (required for subscription) not ready; waiting\u2026"),this.backoff.reset(),$t.abrupt("return");case 4:V=this.processLocalActions(ie,V),je=(new Date).getTime(),$e=Xt(V);try{for($e.s();!(Wt=$e.n()).done;)this.recordActionAttemptOn(Wt.value,ie,je)}catch(Je){$e.e(Je)}finally{$e.f()}return rr=this.pendingPokeReason,this.pendingPokeReason=null,$t.prev=10,$t.next=13,this.request(ie,je,rr,V);case 13:Xn=(fr=$t.sent).body.max_batch_size,!isNaN(parseInt(Xn))&&isFinite(Xn)&&Xn>0&&(this.maxBatchSize=Xn),this.subscriptionTtlTimer||(Rr=fr.body.ttl_in_s,!isNaN(parseFloat(Rr))&&isFinite(Rr)&&Rr>0&&(this.subscriptionTtlTimer=setTimeout(function(){return ne.onSubscriptionTtlElapsed()},1e3*Rr))),"establish"===ie&&(bs=fr.body.estimated_delivery_in_ms,!isNaN(parseFloat(bs))&&isFinite(bs)&&bs>
10?setTimeout(function(){return ne.verifyPokeDelivery(je,bs,V)},bs):Nr_error("Invalid timeout: ".concat(bs)),V.filter(function(Je){return Je.pendingCorrelationId===je}).forEach(function(Je){return Je.setSubscriptionState("response_in_flight")})),this.backoff.reset(),$t.next=26;break;case 21:$t.prev=21,$t.t0=$t.catch(10),Ns=Xt(V);try{for(Ns.s();!(Ci=Ns.n()).done;)this.recordActionFailureOn(Ci.value,ie)}catch(Je){Ns.e(Je)}finally{Ns.f()}$t.t0 instanceof ee.TransportUnavailableError?(Nr_debug("Twilsock connection (required for subscription) not ready (c:".concat(je,"); waiting\u2026")),this.backoff.reset()):(Nr_debug("Failed an attempt to ".concat(ie," subscriptions (c:").concat(je,"); retrying"),$t.t0),this.persist());case 26:case"end":return $t.stop()}},U,this,[[10,21]])})),function Ee(U,ie){return Rt.apply(this,arguments)})},{key:"verifyPokeDelivery",value:function(Ee,U,ie){var V=this,ne=this.latestPokeResponseArrivalTimestampByCorrelationId.get(Ee),je=ne?(new Date).getTime()-ne:U;je>=U?(ie.filter(function(Wt){return Wt.pendingCorrelationId===Ee}).forEach(function(Wt){Wt.updatePending(null,null),Wt.retryCount++,V.persisted.delete(Wt.sid)}),this.persist(),this.latestPokeResponseArrivalTimestampByCorrelationId.delete(Ee)):setTimeout(function(){return V.verifyPokeDelivery(Ee,U,ie)},U-je)}},{key:"processLocalActions",value:function(Ee,U){return"cancel"===Ee?U.filter(function(ie){return!ie.rejectedWithError}):U}},{key:"recordActionAttemptOn",value:function(Ee,U,ie){if(Ee.setSubscriptionState("request_in_flight"),"establish"===U)this.persisted.set(Ee.sid,Ee),Ee.updatePending(U,ie);else{var V=this.persisted.get(Ee.sid);V&&V.updatePending(U,ie)}}},{key:"recordActionFailureOn",value:function(Ee,U){Ee.setSubscriptionState("none"),Ee.updatePending(null,null),"establish"===U&&this.persisted.delete(Ee.sid)}},{key:"request",value:function(Ee,U,ie,V){var ne=V.map(function(Wt){return{object_sid:Wt.sid,object_type:Wt.type,last_event_id:"establish"===Ee?Wt.lastEventId:void 0,index_name:"establish"===Ee?Wt.indexName:void 0,query_string:"establish"===Ee?Wt.queryString:void 0}}),je=V.filter(function(Wt){return Wt.retryCount>0}).length;Nr_debug("Attempting '".concat(Ee,"' request (c:").concat(U,"):"),ne);var $e={event_protocol_version:4,action:Ee,correlation_id:U,retried_requests:je,ttl_in_s:-1,requests:ne};return"ttl"===ie&&($e.reason=ie),this.services.network.post(this.services.config.subscriptionsUri,$e)}},{key:"add",value:function(Ee,U){Nr_debug("Establishing intent to subscribe to ".concat(Ee));var ie=this.subscriptions.get(Ee);ie&&U&&ie.lastEventId===U.lastEventId||(this.persisted.delete(Ee),this.subscriptions.set(Ee,new vn(U)),this.persist())}},{key:"remove",value:function(Ee){Nr_debug("Establishing intent to unsubscribe from ".concat(Ee)),this.subscriptions.delete(Ee)&&this.persist()}},{key:"acceptMessage",value:function(Ee,U){Nr_trace("Subscriptions received",Ee);var ie=Ee.event_type,V=typeof Ee.events<"u"?Ee.events:[Ee.event],ne=Ee.correlation_id;ne&&this.latestPokeResponseArrivalTimestampByCorrelationId.set(ne,(new Date).getTime());var $e,je=Xt(V);try{for(je.s();!($e=je.n()).done;){var Wt=$e.value,In=void 0;switch(Ee.event_type){case"subscription_established":this.applySubscriptionEstablishedMessage(Wt,ne);break;case"subscription_canceled":this.applySubscriptionCancelledMessage(Wt,ne);break;case"subscription_failed":this.applySubscriptionFailedMessage(Wt,ne);break;case(In=ie.match(/^(?:map|list|document|stream|live_query)_/)||{}).input:var rr=void 0;switch(In[0]){case"map_":rr=Wt.map_sid;break;case"list_":rr=Wt.list_sid;break;case"document_":rr=Wt.document_sid;break;case"stream_":rr=Wt.stream_sid;break;case"live_query_":rr=Wt.query_id,U=!1,!0===Ee.strictly_ordered&&(U=!0);break;default:rr=void 0}this.applyEventToSubscribedEntity(rr,Wt,ie,U);break;default:Nr_debug("Dropping unknown message type ".concat(ie))}}}catch(fr){je.e(fr)}finally{je.f()}}},{key:"applySubscriptionEstablishedMessage",value:function(Ee,U){var ie=Ee.object_sid,V=this.persisted.get(Ee.object_sid);V&&V.pendingCorrelationId===U?"interrupted"===Ee.replay_status?(Nr_debug("Event Replay for subscription to ".concat(ie," (c:").concat(U,") interrupted; continuing eagerly.")),V.updatePending(null,null),this.persisted.delete(V.sid),this.backoff.reset()):"completed"===Ee.replay_status&&(Nr_debug("Event Replay for subscription to ".concat(ie," (c:").concat(U,") completed. Subscription is ready.")),V.complete(Ee.last_event_id),this.persisted.set(Ee.object_sid,V),V.setSubscriptionState("established"),this.backoff.reset()):Nr_debug("Late message for ".concat(Ee.object_sid," (c:").concat(U,") dropped.")),this.persist()}},{key:"applySubscriptionCancelledMessage",value:function(Ee,U){var ie=this.persisted.get(Ee.object_sid);ie&&ie.pendingCorrelationId===U?(ie.updatePending(null,null),ie.setSubscriptionState("none"),this.persisted.delete(Ee.object_sid)):Nr_debug("Late message for ".concat(Ee.object_sid," (c:").concat(U,") dropped.")),this.persist()}},{key:"applySubscriptionFailedMessage",value:function(Ee,U){var ie=Ee.object_sid,V=this.subscriptions.get(ie),ne=this.persisted.get(ie);V&&ne?ne.pendingCorrelationId===U&&(Nr_error("Failed to subscribe on ".concat(ne.sid),Ee.error),ne.markAsFailed(Ee),ne.setSubscriptionState("none")):!V&&ne&&(this.persisted.delete(ie),ne.setSubscriptionState("none")),this.persist()}},{key:"applyEventToSubscribedEntity",value:function(Ee,U,ie,V){var $e;if(Ee){V=V||($e=this.persisted.get(Ee))&&$e.isEstablished;var je=this.subscriptions.get(Ee);je?(U.type=ie,je.update(U,V)):Nr_debug("Message dropped for SID '".concat(Ee,"', for which there is no subscription."))}}},{key:"onConnectionStateChanged",value:function(Ee){this.isConnected=Ee,Ee&&this.poke("reconnect")}},{key:"onSubscriptionTtlElapsed",value:function(){this.isConnected&&this.poke("ttl")}},{key:"poke",value:function(Ee){Nr_debug("Triggering event replay for all subscriptions, reason=".concat(Ee)),this.pendingPokeReason=Ee,this.subscriptionTtlTimer&&(clearTimeout(this.subscriptionTtlTimer),this.subscriptionTtlTimer=null);var V,U=[],ie=Xt(this.persisted.values());try{for(ie.s();!(V=ie.n()).done;){var ne=V.value;ne.reset(),ne.rejectedWithError&&U.push(ne)}}catch(In){ie.e(In)}finally{ie.f()}this.persisted.clear();for(var je=0,$e=U;je<$e.length;je++){var Wt=$e[je];this.persisted.set(Wt.sid,Wt)}this.persist()}},{key:"shutdown",value:function(){this.backoff.reset(),this.subscriptions.clear()}}]),St;var Rt}();function Zt(St){if(St.body&&St.body.message)return St.body.message;switch(St.status){case 429:return"Throttled by server";case 404:return"Not found from server";default:return"Error from server"}}function Fe(St){return St.body?St.body.code:0}function ft(St){return 409===St.status?new Fn(Zt(St),St.status,Fe(St),St.body):St.status?new Hn(Zt(St),St.status,Fe(St)):St instanceof ee.TransportUnavailableError?St:ne
1w Hn(St.message,0,0)}var dn=function(){function St(Rt,Ee,U){Ve.default(this,St),this.clientInfo=Rt,this.config=Ee,this.transport=U}return Ne.default(St,[{key:"createHeaders",value:function(){return{"Content-Type":"application/json","Twilio-Sync-Client-Info":JSON.stringify(this.clientInfo),"Twilio-Request-Id":"RQ"+ue.v4().replace(/-/g,"")}}},{key:"backoffConfig",value:function(){return Object.assign({min:4e3,max:6e4,maxAttemptsTime:9e4,randomness:.2},this.config.backoffConfig)}},{key:"executeWithRetry",value:function(Ee){var U=this,ie=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise(function(V,ne){var je=[502,503,504];ie&&je.push(429);var $e=new we.Retrier(U.backoffConfig());$e.on("attempt",function(){Ee().then(function(Wt){return $e.succeeded(Wt)}).catch(function(Wt){if(je.includes(Wt.status)){var In=parseInt(Wt.headers?Wt.headers["Retry-After"]:null);$e.failed(ft(Wt),isNaN(In)?null:1e3*In)}else"Twilsock disconnected"===Wt.message?$e.failed(ft(Wt)):($e.removeAllListeners(),$e.cancel(),ne(ft(Wt)))})}),$e.on("succeeded",function(Wt){V(Wt)}),$e.on("cancelled",function(Wt){return ne(ft(Wt))}),$e.on("failed",function(Wt){return ne(ft(Wt))}),$e.start()})}},{key:"get",value:function(Ee){var U=this,ie=this.createHeaders();return Nr_debug("GET",Ee,"ID:",ie["Twilio-Request-Id"]),this.executeWithRetry(function(){return U.transport.get(Ee,ie,U.config.productId)},!0)}},{key:"post",value:function(Ee,U,ie){var V=this,ne=arguments.length>3&&void 0!==arguments[3]&&arguments[3],je=this.createHeaders();return typeof ie<"u"&&null!==ie&&(je["If-Match"]=ie),Nr_debug("POST",Ee,"ID:",je["Twilio-Request-Id"]),this.executeWithRetry(function(){return V.transport.post(Ee,je,U,V.config.productId)},ne)}},{key:"put",value:function(Ee,U,ie){var V=this,ne=this.createHeaders();return typeof ie<"u"&&null!==ie&&(ne["If-Match"]=ie),Nr_debug("PUT",Ee,"ID:",ne["Twilio-Request-Id"]),this.executeWithRetry(function(){return V.transport.put(Ee,ne,U,V.config.productId)},!1)}},{key:"delete",value:function(Ee){var U=this,ie=this.createHeaders();return Nr_debug("DELETE",Ee,"ID:",ie["Twilio-Request-Id"]),this.executeWithRetry(function(){return U.transport.delete(Ee,ie,U.config.productId)},!1)}}]),St}(),Tn=function(){function St(Rt,Ee){Ve.default(this,St),this.config=Rt,this.storageId=null;try{this.storage=Ee||sessionStorage}catch{}}return Ne.default(St,[{key:"storageKey",value:function(Ee,U){return"".concat(this.storageId,"::").concat(Ee,"::").concat(U)}},{key:"isReady",get:function(){return this.config.sessionStorageEnabled&&!!this.storageId}},{key:"updateStorageId",value:function(Ee){this.storageId=Ee}},{key:"store",value:function(Ee,U,ie){return this.isReady?this._store(this.storageKey(Ee,U),ie):null}},{key:"read",value:function(Ee,U){return this.isReady?this._read(this.storageKey(Ee,U)):null}},{key:"remove",value:function(Ee,U,ie){if(!this.isReady)return null;try{this.storage.removeItem(this.storageKey(Ee,U)),ie&&this.storage.removeItem(this.storageKey(Ee,ie))}catch{}}},{key:"update",value:function(Ee,U,ie,V){if(!this.isReady)return null;this._apply(this.storageKey(Ee,U),V),ie&&this._apply(this.storageKey(Ee,ie),V)}},{key:"_store",value:function(Ee,U){try{this.storage.setItem(Ee,JSON.stringify(U))}catch{}}},{key:"_read",value:function(Ee){try{var U=this.storage.getItem(Ee);if(U)return JSON.parse(U)}catch{}return null}},{key:"_apply",value:function(Ee,U){var ie=this._read(Ee);if(!ie)return!1;this._store(Ee,Object.assign(ie,U))}}]),St}();function tr(St,Rt){(null==Rt||Rt>St.length)&&(Rt=St.length);for(var Ee=0,U=new Array(Rt);Ee<Rt;Ee++)U[Ee]=St[Ee];return U}var Ir=function(){function St(Rt,Ee){Ve.default(this,St),this.services=Rt,this.removalHandler=Ee,this.subscriptionState="none",this._attachedListeners=new Map}return Ne.default(St,[{key:"_advanceLastEventId",value:function(Ee,U){}},{key:"reportFailure",value:function(Ee){404===Ee.status?this.onRemoved(!1):this.broadcastEventToListeners("failure",Ee)}},{key:"_subscribe",value:function(){this.services.router._subscribe(this.sid,this)}},{key:"_unsubscribe",value:function(){this.services.router._unsubscribe(this.sid)}},{key:"_setSubscriptionState",value:function(Ee){this.subscriptionState=Ee,this.broadcastEventToListeners("_subscriptionStateChanged",Ee)}},{key:"close",value:function(){this._unsubscribe(),null!=this.removalHandler&&this.removalHandler(this.type,this.sid,this.uniqueName)}},{key:"attach",value:function(Ee){var U=Ee.listenerUuid;this._attachedListeners.get(U)||(this._attachedListeners.size||this._subscribe(),this._attachedListeners.set(U,Ee))}},{key:"detach",value:function(Ee){this._attachedListeners.delete(Ee),this._attachedListeners.size||this.close()}},{key:"broadcastEventToListeners",value:function(Ee,U){var V,ie=function Bn(St,Rt){var Ee=typeof Symbol<"u"&&St[Symbol.iterator]||St["@@iterator"];if(!Ee){if(Array.isArray(St)||(Ee=function mr(St,Rt){if(St){if("string"==typeof St)return tr(St,Rt);var Ee=Object.prototype.toString.call(St).slice(8,-1);if("Object"===Ee&&St.constructor&&(Ee=St.constructor.name),"Map"===Ee||"Set"===Ee)return Array.from(St);
1if("Arguments"===Ee||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return tr(St,Rt)}}(St))||Rt&&St&&"number"==typeof St.length){Ee&&(St=Ee);var U=0,ie=function(){};return{s:ie,n:function(){return U>=St.length?{done:!0}:{done:!1,value:St[U++]}},e:function(Wt){throw Wt},f:ie}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var je,V=!0,ne=!1;return{s:function(){Ee=Ee.call(St)},n:function(){var Wt=Ee.next();return V=Wt.done,Wt},e:function(Wt){ne=!0,je=Wt},f:function(){try{!V&&null!=Ee.return&&Ee.return()}finally{if(ne)throw je}}}}(this._attachedListeners.values());try{for(ie.s();!(V=ie.n()).done;)V.value.emit(Ee,U)}catch(je){ie.e(je)}finally{ie.f()}}}]),St}(),ur=function(){function St(Rt){Ve.default(this,St),Le.default(this,"queuedRequests",[]),Le.default(this,"isRequestInFlight",!1),this.inputMergingFunction=Rt}return Ne.default(St,[{key:"add",value:function(Ee,U){var ie=this,V=new Promise(function(ne,je){return ie.queuedRequests.push({input:Ee,requestFunction:U,resolve:ne,reject:je})});return this.wakeupQueue(),V}},{key:"squashAndAdd",value:function(Ee,U){var V,ie=this.queuedRequests;this.queuedRequests=[],ie.length>0?(V=ie.map(function(je){return je.input}).reduce(this.inputMergingFunction),V=this.inputMergingFunction(V,Ee)):V=Ee;var ne=this.add(V,U);return ie.forEach(function(je){return ne.then(je.resolve,je.reject)}),ne}},{key:"isEmpty",value:function(){return 0===this.queuedRequests.length&&!this.isRequestInFlight}},{key:"wakeupQueue",value:function(){var Ee=this;if(0!==this.queuedRequests.length&&!this.isRequestInFlight){var U=this.queuedRequests.shift();this.isRequestInFlight=!0,U.requestFunction(U.input).then(U.resolve,U.reject).then(function(ie){Ee.isRequestInFlight=!1,Ee.wakeupQueue()})}}}]),St}(),Er=function(){function St(Rt){Ve.default(this,St),Le.default(this,"queueByNamespaceKey",new Map),this.inputReducer=Rt}return Ne.default(St,[{key:"add",value:(Rt=ae.default(W.default.mark(function U(ie,V,ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.invokeQueueMethod(ie,function(Wt){return Wt.add(V,ne)}));case 1:case"end":return $e.stop()}},U,this)})),function Ee(U,ie,V){return Rt.apply(this,arguments)})},{key:"squashAndAdd",value:function(){var Rt=ae.default(W.default.mark(function U(ie,V,ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.invokeQueueMethod(ie,function(Wt){return Wt.squashAndAdd(V,ne)}));case 1:case"end":return $e.stop()}},U,this)}));return function Ee(U,ie,V){return Rt.apply(this,arguments)}}()},{key:"invokeQueueMethod",value:function(){var Rt=ae.default(W.default.mark(function U(ie,V){var ne,je;return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.queueByNamespaceKey.has(ie)||this.queueByNamespaceKey.set(ie,new ur(this.inputReducer)),ne=this.queueByNamespaceKey.get(ie),je=V(ne),this.queueByNamespaceKey.get(ie).isEmpty()&&this.queueByNamespaceKey.delete(ie),Wt.abrupt("return",je);case 5:case"end":return Wt.stop()}},U,this)}));return function Ee(U,ie){return Rt.apply(this,arguments)}}()}]),St;var Rt}();var Pi=function(St){H.default(Ee,St);var Rt=function Ai(St){var Rt=function Di(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}(Ee);function Ee(){var U;return Ve.default(this,Ee),(U=Rt.call(this)).closed=!1,U.uuid=de.v4(),U}return Ne.default(Ee,[{key:"listenerUuid",get:function(){return this.uuid}},{key:"close",value:function(){this.removeAllListeners(),this.closed=!0}},{key:"ensureNotClosed",value:function(){if(this.closed)throw new Error("Invalid operation on closed object")}}]),Ee}(ke);function nr(St){var Rt=function Ht(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}var Wn=function(St){H.default(Ee,St);var U,Rt=nr(Ee);function Ee(U,ie,V){var ne;return Ve.default(this,Ee),ne=Rt.call(this,U,V),Le.default(Ie.default(ne),"isDeleted",!1),ne.updateMergingQueue=new ur(function(Wt,In){return"number"==typeof In.ttl?{ttl:In.ttl}:Wt}),ne.descriptor=ie,ne.descriptor.data=ne.descriptor.data||{},ne.descriptor.date_updated=new Date(ne.descriptor.date_updated),ne}return Ne.default(Ee,[{key:"uri",get:function(){return this.descriptor.url}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"document"}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"data",get:function(){return this.descriptor.data}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}},{key:"_update",value:function(ie){switch(ie.date_created=new Date(ie.date_created),ie.type){case"document_updated":if(ie.id<=this.lastEventId){Nr_trace("Document update skipped, current:",this.lastEventId,", remote:",ie.id);break}var V=void 0!==this.descriptor.data?On(this.descriptor.data):null;this.descriptor.last_event_id=ie.id,this.descriptor.revision=ie.document_revision,this.descriptor.date_updated=ie.date_created,this.descriptor.data=ie.document_data,this.broadcastEventToListeners("updated",{data:ie.document_data,isLocal:!1,previousData:V}
1),this.services.storage.update(this.type,this.sid,this.uniqueName,{last_event_id:ie.id,revision:ie.document_revision,date_updated:ie.date_created,data:ie.document_data});break;case"document_removed":this.onRemoved(!1)}}},{key:"set",value:(U=ae.default(W.default.mark(function V(ne,je){var $e=this;return W.default.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.abrupt("return",this.updateMergingQueue.squashAndAdd(je||{},function(fr){return $e._setUnconditionally(ne,fr.ttl)}));case 2:case"end":return rr.stop()}},V,this)})),function ie(V,ne){return U.apply(this,arguments)})},{key:"mutate",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e=this;return W.default.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.abrupt("return",this.updateMergingQueue.add(je||{},function(fr){return $e._setWithIfMatch(ne,fr.ttl)}));case 2:case"end":return rr.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"update",value:function(){var U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Wt.abrupt("return",this.mutate(function(In){return Object.assign(In,ne)},je));case 1:case"end":return Wt.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Wt.next=2,this._postUpdateToServer({ttl:ne});case 2:this.descriptor.date_expires=Wt.sent.date_expires;case 4:case"end":return Wt.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_setUnconditionally",value:function(){var U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,this._postUpdateToServer({data:ne,revision:void 0,ttl:je});case 2:return this._handleSuccessfulUpdateResult(In.sent),In.abrupt("return",this.descriptor.data);case 5:case"end":return In.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"_setWithIfMatch",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e,Wt;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:if(!($e=ne(On(this.descriptor.data)))){fr.next=22;break}return Wt=this.revision,fr.prev=3,fr.next=6,this._postUpdateToServer({data:$e,revision:Wt,ttl:je});case 6:return this._handleSuccessfulUpdateResult(fr.sent),fr.abrupt("return",this.descriptor.data);case 11:if(fr.prev=11,fr.t0=fr.catch(3),412!==fr.t0.status){fr.next=19;break}return fr.next=16,this._softSync();case 16:return fr.abrupt("return",this._setWithIfMatch(ne));case 19:throw fr.t0;case 20:fr.next=23;break;case 22:return fr.abrupt("return",this.descriptor.data);case 23:case"end":return fr.stop()}},V,this,[[3,11]])}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"_handleSuccessfulUpdateResult",value:function(ie){if(!(ie.last_event_id<=this.descriptor.last_event_id)){var V=void 0!==this.descriptor.data?On(this.descriptor.data):null;this.descriptor.revision=ie.revision,this.descriptor.data=ie.data,this.descriptor.last_event_id=ie.last_event_id,this.descriptor.date_expires=ie.date_expires,this.descriptor.date_updated=new Date(ie.date_updated),this.services.storage.update(this.type,this.sid,this.uniqueName,{last_event_id:ie.last_event_id,revision:ie.revision,date_updated:ie.date_updated,data:ie.data}),this.broadcastEventToListeners("updated",{data:this.descriptor.data,isLocal:!0,previousData:V})}}},{key:"_postUpdateToServer",value:function(){var U=ae.default(W.default.mark(function V(ne){var je,$e,Wt;return W.default.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(this.isDeleted){rr.next=17;break}return je={data:ne.data},void 0!==ne.ttl&&(je.ttl=ne.ttl),$e=ne.revision,rr.prev=4,rr.next=7,this.services.network.post(this.uri,je,$e);case 7:return rr.abrupt("return",{revision:(Wt=rr.sent).body.revision,data:ne.data,last_event_id:Wt.body.last_event_id,date_updated:Wt.body.date_updated,date_expires:Wt.body.date_expires});case 11:throw rr.prev=11,rr.t0=rr.catch(4),404===rr.t0.status&&this.onRemoved(!1),rr.t0;case 15:rr.next=18;break;case 17:return rr.abrupt("return",Promise.reject(new Hn("The Document has been removed",404,54100)));case 18:case"end":return rr.stop()}},V,this,[[4,11]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_softSync",value:function(){var U=ae.default(W.default.mark(function V(){var ne=this;return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.services.network.get(this.uri).then(function(Wt){return ne._update({type:"document_updated",id:Wt.body.last_event_id,document_revision:Wt.body.revision,document_data:Wt.body.data,date_created:Wt.body.date_updated}),ne}).catch(function(Wt){404===Wt.status?ne.onRemoved(!1):Nr_error("Can't get updates for ".concat(ne.sid,":"),Wt)}));case 1:case"end":return $e.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"onRemoved",value:function(ie){if(!this.isDeleted){var V=void 0!==this.descriptor.data?On(this.descriptor.data):null;this.isDeleted=!0,this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:ie,previousData:V})}}},{key:"removeDocument",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(this.isDeleted){je.next=6;break}return je.next=3,this.services.network.delete(this.uri);case 3:this.onRemoved(!0),je.next=7;break;case 6:return je.abrupt("return",Promise.reject(new Hn("The Document has been removed",404,54100)));case 7:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()}],[{key:"type",get:function(){return"document"}}]),Ee}(Ir),$n=function(St){H.default(Ee,St);var U,Rt=nr(Ee);function Ee(U){var ie;return Ve.default(this,Ee),(ie=Rt.call(this)).syncDocumentImpl=U,ie.syncDocumentImpl.attach(Ie.default(ie)),ie}return Ne.default(Ee,[{key:"uri",get:function(){return this.syncDocumentImpl.uri}},{key:"revision",get:function(){return this.syncDocumentImpl.revision}},{key:"lastEventId",get:function(){return this.syncDocumentImpl.lastEventId}},{key:"dateExpires",get:function(){return this.syncDocumentImpl.dateExpires}},{key:"type",get:function(){return Wn.type}},{key:"sid",get:function(){return this.syncDocumentImpl.sid}},{key:"data",get:function(){return this.syncDocumentImpl.data}},{key:"dateUpdated",get:function(){return this.syncDocumentImpl.dateUpdated}},{key:"uniqueName",get:function(){return this.syncDocumentImpl.uniqueName}},{key:"set",value:(U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.ensureNotClosed(),Wt.abrupt("return",this.syncDocumentImpl.set(ne,je));case 2:case"end":return Wt.stop()}},V,this)})),function ie(V,ne){return U.apply(this,arguments)})},{key:"mutate",value:function(){var U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.ensureNotClosed(),Wt.abrupt("return",this.syncDocumentImpl.mutate(ne,je));case 2:case"end":return Wt.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"update",value:function(){var U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.ensureNotClosed(),Wt.abrupt("return",this.syncDocumentImpl.update(ne,je));case 2:case"end":return Wt.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncDocumentImpl.setTtl(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"removeDocument",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return this.ensureNotClosed(),je.abrupt("return",this.syncDocumentImpl.removeDocument());case 2:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"close",value:function(){se.default(ye.default(Ee.prototype),"close",this).call(this),this.syncDocumentImpl.detach(this.listenerUuid)}}],[{key:"type",get:function(){return Wn.type}}]),Ee}(Pi);Le.default($n,"removed","removed"),Le.default($n,"updated","updated"),K([D.validateTypesAsync(D.pureObject,["undefined",D.objectSchema("document metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object,Object]),_e("design:returntype",Promise)],$n.prototype,"set",null),K([D.validateTypesAsync("function",["undefined",D.objectSchema("document metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Function,Object]),_e("design:returntype",Promise)],$n.prototype,"mutate",null),K([D.validateTypesAsync(D.pureObject,["undefined",D.objectSchema("document metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object,Object]),_e("design:returntype",Promise)],$n.prototype,"update",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],$n.prototype,"setTtl",null);var jn=function(){function St(Rt){Ve.default(this,St),this.descriptor=Rt}return Ne.default(St,[{key:"uri",get:function(){return this.descriptor.uri}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.lastEventId}},{key:"dateUpdated",get:function(){return this.descriptor.dateUpdated}},{key:"dateExpires",get:function(){return this.descriptor.dateExpires}},{key:"index",get:function(){return this.descriptor.index}},{key:"data",get:function(){return this.descriptor.data}},{key:"update",value:function(Ee,U,ie,V){return this.descriptor.lastEventId=Ee,this.descriptor.revision=U,this.descriptor.data=ie,this.descriptor.dateUpdated=V,this}},{key:"updateDateExpires",value:function(Ee){this.descriptor.dateExpires=Ee}}]),St}(),wr=function(){function St(Rt,Ee,U,ie){Ve.default(this,St),this.prevToken=U,this.nextToken=ie,this.items=Rt,this.source=Ee}return Ne.default(St,[{key:"hasNextPage",get:function(){return!!this.nextToken}},{key:"hasPrevPage",get:function(){return!!this.prevToken}},{key:"nextPage",value:(Rt=ae.default(W.default.mark(function U(){return W.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(this.hasNextPage){V.next=2;break}throw new Error("No next page");case 2:return V.abrupt("return",this.source(this.nextToken));case 3:case"end":return V.stop()}},U,this)})),function Ee(){return Rt.apply(this,arguments)})},{key:"prevPage",value:function(){var Rt=ae.default(W.default.mark(function U(){return W.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(this.hasPrevPage){V.next=2;break}throw new Error("No previous page");case 2:return V.abrupt("return",this.source(this.prevToken));case 3:case"end":return V.stop()}},U,this)}));return function Ee(){return Rt.apply(this,arguments)}}()}]),St;var Rt}();function mi(St,Rt){var Ee=typeof Symbol<"u"&&St[Symbol.iterator]||St["@@iterator"];if(!Ee){if(Array.isArray(St)||(Ee=function di(St,Rt){if(St){if("string"==typeof St)return Mi(St,Rt);var Ee=Object.prototype.toString.call(St).slice(8,-1);if("Object"===Ee&&St.constructor&&(Ee=St.constructor.name),"Map"===Ee||"Set"===Ee)return Array.from(St);
1if("Arguments"===Ee||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return Mi(St,Rt)}}(St))||Rt&&St&&"number"==typeof St.length){Ee&&(St=Ee);var U=0,ie=function(){};return{s:ie,n:function(){return U>=St.length?{done:!0}:{done:!1,value:St[U++]}},e:function(Wt){throw Wt},f:ie}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var je,V=!0,ne=!1;return{s:function(){Ee=Ee.call(St)},n:function(){var Wt=Ee.next();return V=Wt.done,Wt},e:function(Wt){ne=!0,je=Wt},f:function(){try{!V&&null!=Ee.return&&Ee.return()}finally{if(ne)throw je}}}}function Mi(St,Rt){(null==Rt||Rt>St.length)&&(Rt=St.length);for(var Ee=0,U=new Array(Rt);Ee<Rt;Ee++)U[Ee]=St[Ee];return U}var Qt=function(){function St(Rt,Ee){Ve.default(this,St),this.balanceFactor=0,this.key=Rt,this.value=Ee,this.parent=null,this.left=null,this.right=null}return Ne.default(St,[{key:"isRoot",get:function(){return null===this.parent}},{key:"isLeaf",get:function(){return null===this.left&&null===this.right}},{key:"isLeftChild",get:function(){return this.parent.left===this}},{key:"update",value:function(Ee){this.value=Ee}},{key:"replace",value:function(Ee,U){Ee&&(this.left===U?this.left=U:this.right===U&&(this.right=U))}}]),St}(),_n=function(){function St(Rt,Ee){Ve.default(this,St),this.isLessThan=Rt||function(U,ie){return U<ie},this.isEqual=Ee||function(U,ie){return U===ie},this.root=null,this.count=null}return Ne.default(St,[{key:"size",get:function(){return this.count}},{key:"clear",value:function(){this.root=null,this.count=0}},{key:"set",value:function(Ee,U){var ie=this.getNode(Ee);ie?ie.update(U):this.insert(Ee,U)}},{key:"insert",value:function(Ee,U){var ie=new Qt(Ee,U);if(this.count++,this.root){for(var V=this.root;;)if(this.isLessThan(Ee,V.key)){if(!V.left){V.left=ie;break}V=V.left}else{if(!V.right){V.right=ie;break}V=V.right}for(ie.parent=V,V=ie;V.parent;){var ne=V.parent,je=ne.balanceFactor;if(V.isLeftChild?ne.balanceFactor++:ne.balanceFactor--,Math.abs(ne.balanceFactor)<Math.abs(je))break;if(ne.balanceFactor<-1||ne.balanceFactor>1){this.rebalance(ne);break}V=ne}}else this.root=ie}},{key:"get",value:function(Ee){for(var U=this.root;U;){if(this.isEqual(Ee,U.key))return U.value;U=this.isLessThan(Ee,U.key)?U.left:U.right}return null}},{key:"delete",value:function(Ee){var U=this.getNode(Ee);if(!U||U.key!==Ee)return null;var ie=U.parent,V=U.left,ne=U.right;if(!!V!=!!ne){var je=V||ne;ie||je?ie&&!je?this.root=je:(ie.replace(U,null),this.rebalance(ie)):this.root=null}else{for(var $e=U.left;$e.right;)$e=$e.right;if(U.left===$e)U.isRoot?(this.root=$e,$e.parent=null):(U.isLeftChild?U.parent.left=$e:U.parent.right=$e,$e.parent=U.parent),$e.right=U.right,$e.right.parent=$e,$e.balanceFactor=U.balanceFactor,U={parent:$e,isLeftChild:!0};else{var Wt=$e.parent,In=$e.left;Wt.right=In,In&&(In.parent=Wt),U.isRoot?(this.root=$e,$e.parent=null):(U.isLeftChild?U.parent.left=$e:U.parent.right=$e,$e.parent=U.parent),$e.right=U.right,$e.right.parent=$e,$e.left=U.left,$e.left.parent=$e,$e.balanceFactor=U.balanceFactor,U={parent:Wt,isLeftChild:!1}}}for(this.count--;U.parent;){var rr=U.parent,fr=rr.balanceFactor;if(U.isLeftChild?rr.balanceFactor-=1:rr.balanceFactor+=1,Math.abs(rr.balanceFactor)>Math.abs(fr)){if(!(rr.balanceFactor<-1||rr.balanceFactor>1))break;if(this.rebalance(rr),0!==rr.parent.balanceFactor)break;U=rr.parent}else U=rr}return null}},{key:"getNode",value:function(Ee){for(var U=this.root;U;){if(this.isEqual(Ee,U.key))return U;U=this.isLessThan(Ee,U.key)?U.left:U.right}return null}},{key:"rebalance",value:function(Ee){Ee.balanceFactor<0?Ee.right.balanceFactor>0?(this.rotateRight(Ee.right),this.rotateLeft(Ee)):this.rotateLeft(Ee):Ee.balanceFactor>0&&(Ee.left.balanceFactor<0?(this.rotateLeft(Ee.left),this.rotateRight(Ee)):this.rotateRight(Ee))}},{key:"rotateLeft",value:function(Ee){var U=Ee.right;Ee.right=U.left,null!==U.left&&(U.left.parent=Ee),U.parent=Ee.parent,null===U.parent?this.root=U:Ee.isLeftChild?U.parent.left=U:U.parent.right=U,U.left=Ee,Ee.parent=U,Ee.balanceFactor=Ee.balanceFactor+1-Math.min(U.balanceFactor,0),U.balanceFactor=U.balanceFactor+1-Math.max(Ee.balanceFactor,0)}},{key:"rotateRight",value:function(Ee){var U=Ee.left;Ee.left=U.right,null!==U.right&&(U.right.parent=Ee),U.parent=Ee.parent,null===U.parent?this.root=U:Ee.isLeftChild?U.parent.left=U:U.parent.right=U,U.right=Ee,Ee.parent=U,Ee.balanceFactor=Ee.balanceFactor-1-Math.min(U.balanceFactor,0),U.balanceFactor=U.balanceFactor-1-Math.max(Ee.balanceFactor,0)}},{key:Symbol.iterator,value:W.default.mark(function Rt(){var Ee,U,ie;return W.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:Ee=mi(this.getIterator()),ne.prev=1,Ee.s();case 3:if((U=Ee.n()).done){ne.next=9;break}
1return ie=U.value,ne.next=7,ie;case 7:ne.next=3;break;case 9:ne.next=14;break;case 11:ne.prev=11,ne.t0=ne.catch(1),Ee.e(ne.t0);case 14:return ne.prev=14,Ee.f(),ne.finish(14);case 17:case"end":return ne.stop()}},Rt,this,[[1,11,14,17]])})},{key:"getIterator",value:W.default.mark(function Rt(){var Ee,U,ie,V=arguments;return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Ee=V.length>0&&void 0!==V[0]?V[0]:null,U=this.root;case 2:if(!U){je.next=8;break}if(!this.isEqual(Ee,U.key)&&(null!==Ee||U.left)){je.next=5;break}return je.abrupt("break",8);case 5:U=this.isLessThan(Ee,U.key)||null===Ee?U.left:U.right,je.next=2;break;case 8:if(U){je.next=10;break}return je.abrupt("return",null);case 10:ie=!0;case 11:if(!ie){je.next=29;break}return je.next=14,[U.key,U.value];case 14:if(ie=!1,!U.right){je.next=21;break}for(U=U.right;U.left;)U=U.left;ie=!0,je.next=27;break;case 21:if(!U.parent){je.next=26;break}ie=U.parent.left===U,U=U.parent,je.next=27;break;case 26:return je.abrupt("break",37);case 27:je.next=35;break;case 29:if(!U.parent){je.next=34;break}ie=U.parent.left===U,U=U.parent,je.next=35;break;case 34:return je.abrupt("break",37);case 35:je.next=11;break;case 37:return je.abrupt("return",null);case 38:case"end":return je.stop()}},Rt,this)})},{key:"getReverseIterator",value:W.default.mark(function Rt(){var Ee,U,ie,V=arguments;return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Ee=V.length>0&&void 0!==V[0]?V[0]:null,U=this.root;case 2:if(!U){je.next=8;break}if(!this.isEqual(Ee,U.key)&&(null!==Ee||U.right)){je.next=5;break}return je.abrupt("break",8);case 5:U=this.isLessThan(Ee,U.key)&&null!==Ee?U.left:U.right,je.next=2;break;case 8:if(U){je.next=10;break}return je.abrupt("return",null);case 10:ie=!0;case 11:if(!ie){je.next=29;break}return je.next=14,[U.key,U.value];case 14:if(ie=!1,!U.left){je.next=21;break}for(U=U.left;U.right;)U=U.right;ie=!0,je.next=27;break;case 21:if(!U.parent){je.next=26;break}ie=U.parent.right===U,U=U.parent,je.next=27;break;case 26:return je.abrupt("break",37);case 27:je.next=35;break;case 29:if(!U.parent){je.next=34;break}ie=U.parent.right===U,U=U.parent,je.next=35;break;case 34:return je.abrupt("break",37);case 35:je.next=11;break;case 37:return je.abrupt("return",null);case 38:case"end":return je.stop()}},Rt,this)})}]),St}();function kr(St,Rt){(null==Rt||Rt>St.length)&&(Rt=St.length);for(var Ee=0,U=new Array(Rt);Ee<Rt;Ee++)U[Ee]=St[Ee];return U}var si=function(){function St(Rt,Ee){Ve.default(this,St),this.value=Rt,this.revision=Ee||0}return Ne.default(St,[{key:"isValid",get:function(){return!0}}]),St}(),oi=function(){function St(Rt){Ve.default(this,St),this.revision=Rt}return Ne.default(St,[{key:"isValid",get:function(){return!1}}]),St}(),Ii=function(){function St(){Ve.default(this,St),this.items=new _n}return Ne.default(St,[{key:"store",value:function(Ee,U,ie){var V=this.items.get(Ee);return V&&V.revision>ie?V.isValid?V.value:null:(this.items.set(Ee,new si(U,ie)),U)}},{key:"delete",value:function(Ee,U){var ie=arguments.length>2&&void 0!==arguments[2]&&arguments[2],V=this.items.get(Ee);(!V||V.revision<U||V&&!0===ie)&&this.items.set(Ee,new oi(U))}},{key:"isKnown",value:function(Ee,U){var ie=this.items.get(Ee);return ie&&ie.revision>=U}},{key:"get",value:function(Ee){var U=this.items.get(Ee);return U&&U.isValid?U.value:null}},{key:"has",value:function(Ee){var U=this.items.get(Ee);return U&&U.isValid}},{key:"forEach",value:function(Ee){if(this.items){var ie,U=function Ln(St,Rt){var Ee=typeof Symbol<"u"&&St[Symbol.iterator]||St["@@iterator"];if(!Ee){if(Array.isArray(St)||(Ee=function Cn(St,Rt){if(St){if("string"==typeof St)return kr(St,Rt);var Ee=Object.prototype.toString.call(St).slice(8,-1);if("Object"===Ee&&St.constructor&&(Ee=St.constructor.name),"Map"===Ee||"Set"===Ee)return Array.from(St);
1if("Arguments"===Ee||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return kr(St,Rt)}}(St))||Rt&&St&&"number"==typeof St.length){Ee&&(St=Ee);var U=0,ie=function(){};return{s:ie,n:function(){return U>=St.length?{done:!0}:{done:!1,value:St[U++]}},e:function(Wt){throw Wt},f:ie}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var je,V=!0,ne=!1;return{s:function(){Ee=Ee.call(St)},n:function(){var Wt=Ee.next();return V=Wt.done,Wt},e:function(Wt){ne=!0,je=Wt},f:function(){try{!V&&null!=Ee.return&&Ee.return()}finally{if(ne)throw je}}}}(this.items);try{for(U.s();!(ie=U.n()).done;){var V=it.default(ie.value,2),je=V[1];je.isValid&&Ee(V[0],je.value)}}catch($e){U.e($e)}finally{U.f()}}}}]),St}();function yi(St){var Rt=function on(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}var le=function(St){H.default(Ee,St);var U,Rt=yi(Ee);function Ee(U,ie,V){var ne;return Ve.default(this,Ee),(ne=Rt.call(this,U,V)).updateMergingQueue=new Er(function(Wt,In){return"number"==typeof In.ttl?{ttl:In.ttl}:Wt}),ne.cache=new Ii,ne.descriptor=ie,ne.descriptor.date_updated=new Date(ne.descriptor.date_updated),ne}return Ne.default(Ee,[{key:"uri",get:function(){return this.descriptor.url}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"links",get:function(){return this.descriptor.links}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"list"}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}},{key:"_addOrUpdateItemOnServer",value:(U=ae.default(W.default.mark(function V(ne,je,$e,Wt){var In,rr;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return In={data:je},void 0!==Wt&&(In.ttl=Wt),Xn.next=4,this.services.network.post(ne,In,$e);case 4:return(rr=Xn.sent).body.data=je,rr.body.date_updated=new Date(rr.body.date_updated),Xn.abrupt("return",rr.body);case 8:case"end":return Xn.stop()}},V,this)})),function ie(V,ne,je,$e){return U.apply(this,arguments)})},{key:"push",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e,Wt,In;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return $e=(je||{}).ttl,fr.next=3,this._addOrUpdateItemOnServer(this.links.items,ne,void 0,$e);case 3:return Wt=fr.sent,In=Number(Wt.index),this._handleItemMutated(In,Wt.url,Wt.last_event_id,Wt.revision,ne,Wt.date_updated,Wt.date_expires,!0,!1),fr.abrupt("return",this.cache.get(In));case 7:case"end":return fr.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"set",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt=this;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.abrupt("return",this.updateMergingQueue.squashAndAdd(ne,$e||{},function(Xn){return Wt._updateItemUnconditionally(ne,je,Xn.ttl)}));case 2:case"end":return fr.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"_updateItemUnconditionally",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt,In;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,this.get(ne);case 2:return Wt=fr.sent,fr.next=5,this._addOrUpdateItemOnServer(Wt.uri,je,void 0,$e);case 5:return this._handleItemMutated(ne,(In=fr.sent).url,In.last_event_id,In.revision,In.data,In.date_updated,In.date_expires,!1,!1),fr.abrupt("return",this.cache.get(ne));case 8:case"end":return fr.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"_updateItemWithIfMatch",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt,In,rr,fr;return W.default.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,this.get(ne);case 2:if(!(In=je(On((Wt=Rr.sent).data)))){Rr.next=25;break}return rr=Wt.revision,Rr.prev=6,Rr.next=9,this._addOrUpdateItemOnServer(Wt.uri,In,rr,$e);case 9:return this._handleItemMutated(ne,(fr=Rr.sent).url,fr.last_event_id,fr.revision,fr.data,fr.date_updated,fr.date_expires,!1,!1),Rr.abrupt("return",this.cache.get(ne));case 14:if(Rr.prev=14,Rr.t0=Rr.catch(6),412!==Rr.t0.status){Rr.next=22;break}return Rr.next=19,this._getItemFromServer(ne);case 19:return Rr.abrupt("return",this._updateItemWithIfMatch(ne,je,$e));case 22:throw Rr.t0;case 23:Rr.next=26;break;case 25:return Rr.abrupt("return",Wt);case 26:case"end":return Rr.stop()}},V,this,[[6,14]])}
1));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"mutate",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt=this;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.abrupt("return",this.updateMergingQueue.add(ne,$e||{},function(Xn){return Wt._updateItemWithIfMatch(ne,je,Xn.ttl)}));case 2:case"end":return fr.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"update",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.abrupt("return",this.mutate(ne,function(rr){return Object.assign(rr,je)},$e));case 1:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"remove",value:function(){var U=ae.default(W.default.mark(function V(ne){var je,$e,Wt;return W.default.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,this.get(ne);case 2:return $e=On((je=rr.sent).data),rr.next=6,this.services.network.delete(je.uri);case 6:this._handleItemRemoved(ne,(Wt=rr.sent).body.last_event_id,$e,new Date(Wt.body.date_updated),!1);case 8:case"end":return rr.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"get",value:function(){var U=ae.default(W.default.mark(function V(ne){var je;return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(!(je=this.cache.get(ne))){Wt.next=5;break}return Wt.abrupt("return",je);case 5:return Wt.abrupt("return",this._getItemFromServer(ne));case 6:case"end":return Wt.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_getItemFromServer",value:function(){var U=ae.default(W.default.mark(function V(ne){var je;return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Wt.next=2,this.queryItems({index:ne});case 2:if(!((je=Wt.sent).items.length<1)){Wt.next=7;break}throw new Hn("No item with index ".concat(ne," found"),404,54151);case 7:return Wt.abrupt("return",je.items[0]);case 8:case"end":return Wt.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"queryItems",value:function(){var U=ae.default(W.default.mark(function V(ne){var $e,Wt,In,rr,je=this;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return ne=ne||{},$e=new an(this.links.items).queryParam("From",ne.from).queryParam("PageSize",ne.limit).queryParam("Index",ne.index).queryParam("PageToken",ne.pageToken).queryParam("Order",ne.order).build(),Xn.next=4,this.services.network.get($e);case 4:return In=(Wt=Xn.sent).body.items.map(function(Rr){return Rr.date_updated=new Date(Rr.date_updated),je.cache.get(Rr.index)?je._handleItemMutated(Rr.index,Rr.url,Rr.last_event_id,Rr.revision,Rr.data,Rr.date_updated,Rr.date_expires,!1,!0):je.cache.store(Number(Rr.index),new jn({index:Number(Rr.index),uri:Rr.url,revision:Rr.revision,lastEventId:Rr.last_event_id,dateUpdated:Rr.date_updated,dateExpires:Rr.date_expires,data:Rr.data}),Rr.last_event_id),je.cache.get(Rr.index)}),Xn.abrupt("return",new wr(In,function(Rr){return je.queryItems({pageToken:Rr})},(rr=Wt.body.meta).previous_token,rr.next_token));case 8:case"end":return Xn.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"getItems",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return gr((ne=ne||{}).pageSize),ne.limit=ne.pageSize||ne.limit||50,ne.order=ne.order||"asc",$e.abrupt("return",this.queryItems(ne));case 5:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"getContext",value:function(){var U=ae.default(W.default.mark(function V(){var ne;return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(this.context){$e.next=5;break}return $e.next=3,this.services.network.get(this.links.context);case 3:this._updateContextIfRequired((ne=$e.sent).body.data,ne.body.last_event_id);case 5:return $e.abrupt("return",this.context);case 6:case"end":return $e.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){var je;return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.prev=0,je={ttl:ne},In.next=4,this.services.network.post(this.uri,je);case 4:this.descriptor.date_expires=In.sent.body.date_expires,In.next=12;break;
1case 8:throw In.prev=8,In.t0=In.catch(0),404===In.t0.status&&this.onRemoved(!1),In.t0;case 12:case"end":return In.stop()}},V,this,[[0,8]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e,Wt;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,this.get(ne);case 2:return $e=fr.sent,Wt={ttl:je},fr.next=6,this.services.network.post($e.uri,Wt);case 6:$e.updateDateExpires(fr.sent.body.date_expires);case 8:case"end":return fr.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"removeList",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,this.services.network.delete(this.uri);case 2:this.onRemoved(!0);case 3:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"onRemoved",value:function(ie){this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:ie})}},{key:"shouldIgnoreEvent",value:function(ie,V){return this.cache.isKnown(ie,V)}},{key:"_update",value:function(ie,V){var ne=Number(ie.item_index);switch(ie.date_created=new Date(ie.date_created),ie.type){case"list_item_added":case"list_item_updated":this._handleItemMutated(ne,ie.item_url,ie.id,ie.item_revision,ie.item_data,ie.date_created,void 0,"list_item_added"===ie.type,!0);break;case"list_item_removed":this._handleItemRemoved(ne,ie.id,ie.item_data,ie.date_created,!0);break;case"list_context_updated":this._handleContextUpdate(ie.context_data,ie.id,ie.date_created);break;case"list_removed":this.onRemoved(!1)}V&&this._advanceLastEventId(ie.id,ie.list_revision)}},{key:"_advanceLastEventId",value:function(ie,V){this.lastEventId<ie&&(this.descriptor.last_event_id=ie,V&&(this.descriptor.revision=V))}},{key:"_updateRootDateUpdated",value:function(ie){(!this.descriptor.date_updated||ie.getTime()>this.descriptor.date_updated.getTime())&&(this.descriptor.date_updated=ie,this.services.storage.update(this.type,this.sid,this.uniqueName,{date_updated:ie}))}},{key:"_handleItemMutated",value:function(ie,V,ne,je,$e,Wt,In,rr,fr){if(this.shouldIgnoreEvent(ie,ne))Nr_trace("Item ".concat(ie," update skipped, current: ").concat(this.lastEventId,", remote: ").concat(ne));else{this._updateRootDateUpdated(Wt);var Xn=this.cache.get(ie);if(!Xn){var Rr=new jn({index:ie,uri:V,lastEventId:ne,revision:je,data:$e,dateUpdated:Wt,dateExpires:In});return this.cache.store(ie,Rr,ne),void this.emitItemMutationEvent(Rr,fr,rr)}var xi=On(Xn.data);Xn.update(ne,je,$e,Wt),this.cache.store(ie,Xn,ne),void 0!==In&&Xn.updateDateExpires(In),this.emitItemMutationEvent(Xn,fr,!1,xi)}}},{key:"emitItemMutationEvent",value:function(ie,V,ne){var $e=ne?"itemAdded":"itemUpdated",Wt={item:ie,isLocal:!V};ne||(Wt.previousItemData=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null),this.broadcastEventToListeners($e,Wt)}},{key:"_handleItemRemoved",value:function(ie,V,ne,je,$e){this._updateRootDateUpdated(je),this.cache.delete(ie,V),this.broadcastEventToListeners("itemRemoved",{index:ie,isLocal:!$e,previousItemData:ne})}},{key:"_handleContextUpdate",value:function(ie,V,ne){this._updateRootDateUpdated(ne),this._updateContextIfRequired(ie,V)&&this.broadcastEventToListeners("contextUpdated",{context:ie,isLocal:!1})}},{key:"_updateContextIfRequired",value:function(ie,V){return!this.contextEventId||V>this.contextEventId?(this.context=ie,this.contextEventId=V,!0):(Nr_trace("Context update skipped, current:",this.lastEventId,", remote:",V),!1)}}],[{key:"type",get:function(){return"list"}}]),Ee}(Ir),me=function(St){H.default(Ee,St);var U,Rt=yi(Ee);function Ee(U){var ie;return Ve.default(this,Ee),(ie=Rt.call(this)).syncListImpl=U,ie.syncListImpl.attach(Ie.default(ie)),ie}return Ne.default(Ee,[{key:"uri",get:function(){return this.syncListImpl.uri}},{key:"revision",get:function(){return this.syncListImpl.revision}},{key:"lastEventId",get:function(){return this.syncListImpl.lastEventId}},{key:"links",get:function(){return this.syncListImpl.links}},{key:"dateExpires",get:function(){return this.syncListImpl.dateExpires}},{key:"type",get:function(){return le.type}},{key:"sid",get:function(){return this.syncListImpl.sid}},{key:"uniqueName",get:function(){return this.syncListImpl.uniqueName}},{key:"dateUpdated",get:function(){return this.syncListImpl.dateUpdated}},{key:"push",value:(U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.ensureNotClosed(),Wt.abrupt("return",this.syncListImpl.push(ne,je));case 2:case"end":return Wt.stop()}},V,this)})),function ie(V,ne){return U.apply(this,arguments)})},{key:"set",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return this.ensureNotClosed(),In.abrupt("return",this.syncListImpl.set(ne,je,$e));case 2:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"mutate",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return this.ensureNotClosed(),In.abrupt("return",this.syncListImpl.mutate(ne,je,$e));case 2:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"update",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return this.ensureNotClosed(),In.abrupt("return",this.syncListImpl.update(ne,je,$e));case 2:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"remove",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncListImpl.remove(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"get",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncListImpl.get(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"getContext",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return this.ensureNotClosed(),je.abrupt("return",this.syncListImpl.getContext());case 2:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"getItems",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncListImpl.getItems(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncListImpl.setTtl(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.ensureNotClosed(),Wt.abrupt("return",this.syncListImpl.setItemTtl(ne,je));case 2:case"end":return Wt.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"removeList",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return this.ensureNotClosed(),je.abrupt("return",this.syncListImpl.removeList());case 2:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"close",value:function(){se.default(ye.default(Ee.prototype),"close",this).call(this),this.syncListImpl.detach(this.listenerUuid)}}],[{key:"type",get:function(){return le.type}}]),Ee}(Pi);Le.default(me,"itemAdded","itemAdded"),Le.default(me,"itemUpdated","itemUpdated"),Le.default(me,"itemRemoved","itemRemoved"),Le.default(me,"removed","removed"),K([D.validateTypesAsync(D.pureObject,["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object,Object]),_e("design:returntype",Promise)],me.prototype,"push",null),K([D.validateTypesAsync(D.nonNegativeInteger,D.pureObject,["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Number,Object,Object]),_e("design:returntype",Promise)],me.prototype,"set",null),K([D.validateTypesAsync(D.nonNegativeInteger,"function",["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Number,Function,Object]),_e("design:returntype",Promise)],me.prototype,"mutate",null),K([D.validateTypesAsync(D.nonNegativeInteger,D.pureObject,["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Number,Object,Object]),_e("design:returntype",Promise)],me.prototype,"update",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],me.prototype,"remove",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],me.prototype,"get",null),K([D.validateTypesAsync(["undefined",D.objectSchema("query options",{from:[D.nonNegativeInteger,"undefined"],pageSize:[D.custom(function(St){return[Vr(St),"a positive integer"]}),"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],me.prototype,"getItems",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],me.prototype,"setTtl",null),K([D.validateTypesAsync(D.nonNegativeInteger,D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number,Number]),_e("design:returntype",Promise)],me.prototype,"setItemTtl",null);var Re=function(){function St(Rt){Ve.default(this,St),this.descriptor=Rt}return Ne.default(St,[{key:"uri",get:function(){return this.descriptor.url}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"key",get:function(){return this.descriptor.key}},{key:"data",get:function(){return this.descriptor.data}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}},{key:"update",value:function(Ee,U,ie,V){return this.descriptor.last_event_id=Ee,this.descriptor.revision=U,this.descriptor.data=ie,this.descriptor.date_updated=V,this}},{key:"updateDateExpires",value:function(Ee){this.descriptor.date_expires=Ee}}]),St}();function Pt(St){var Rt=function ln(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}var En=function(St){H.default(Ee,St);var U,Rt=Pt(Ee);function Ee(U,ie,V){var ne;
1return Ve.default(this,Ee),(ne=Rt.call(this,U,V)).updateMergingQueue=new Er(function(Wt,In){return"number"==typeof In.ttl?{ttl:In.ttl}:Wt}),ne.cache=new Ii,ne.descriptor=ie,ne.descriptor.date_updated=new Date(ne.descriptor.date_updated),ie.items&&ie.items.forEach(function($e){$e.date_updated=new Date($e.date_updated),ne.cache.store($e.key,new Re($e),$e.last_event_id)}),ne}return Ne.default(Ee,[{key:"uri",get:function(){return this.descriptor.url}},{key:"links",get:function(){return this.descriptor.links}},{key:"revision",get:function(){return this.descriptor.revision}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"map"}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}},{key:"dateUpdated",get:function(){return this.descriptor.date_updated}},{key:"set",value:(U=ae.default(W.default.mark(function V(ne,je,$e){var Wt=this;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.abrupt("return",this.updateMergingQueue.squashAndAdd(ne,$e||{},function(Xn){return Wt._putItemUnconditionally(ne,je,Xn.ttl)}));case 2:case"end":return fr.stop()}},V,this)})),function ie(V,ne,je){return U.apply(this,arguments)})},{key:"get",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(null!=ne){$e.next=2;break}throw new Hn("SyncMapItem key may not be empty",400,54209);case 2:if(!this.cache.has(ne)){$e.next=6;break}return $e.abrupt("return",this.cache.get(ne));case 6:return $e.abrupt("return",this._getItemFromServer(ne));case 7:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_getItemFromServer",value:function(){var U=ae.default(W.default.mark(function V(ne){var je;return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Wt.next=2,this.queryItems({key:ne});case 2:if(!((je=Wt.sent).items.length<1)){Wt.next=7;break}throw new Hn("The specified Map Item does not exist",404,54201);case 7:return Wt.abrupt("return",je.items[0]);case 8:case"end":return Wt.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"mutate",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt=this;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.abrupt("return",this.updateMergingQueue.add(ne,$e||{},function(Xn){return Wt._putItemWithIfMatch(ne,je,Xn.ttl)}));case 2:case"end":return fr.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"update",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.abrupt("return",this.mutate(ne,function(rr){return Object.assign(rr,je)},$e));case 1:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"_putItemUnconditionally",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt,In;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,this._putItemToServer(ne,je,void 0,$e);case 2:return this._handleItemMutated((In=(Wt=fr.sent).item).key,In.url,In.last_event_id,In.revision,In.data,In.date_updated,In.date_expires,Wt.added,!1),fr.abrupt("return",this.cache.get(In.key));case 6:case"end":return fr.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"_putItemWithIfMatch",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){var Wt,In,rr,fr,Xn;return W.default.wrap(function(xi){for(;;)switch(xi.prev=xi.next){case 0:return xi.next=2,this.get(ne).catch(function(Oi){if(404===Oi.status)return new Re({key:ne,data:{},last_event_id:-1,revision:"-1",url:null,date_updated:null,date_expires:null});throw Oi});case 2:if(!(In=je(On((Wt=xi.sent).data)))){xi.next=26;break}return rr=Wt.revision,xi.prev=6,xi.next=9,this._putItemToServer(ne,In,rr,$e);case 9:return this._handleItemMutated((Xn=(fr=xi.sent).item).key,Xn.url,Xn.last_event_id,Xn.revision,Xn.data,Xn.date_updated,Xn.date_expires,fr.added,!1),xi.abrupt("return",this.cache.get(Xn.key));case 15:if(xi.prev=15,xi.t0=xi.catch(6),412!==xi.t0.status){xi.next=23;break}return xi.next=20,this._getItemFromServer(ne);case 20:return xi.abrupt("return",this._putItemWithIfMatch(ne,je,$e));case 23:throw xi.t0;case 24:xi.next=27;break;case 26:return xi.abrupt("return",Wt);case 27:case"end":return xi.stop()}},V,this,[[6,15]])}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"_putItemToServer",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e,Wt){var In,rr,fr,Xn;return W.default.wrap(function(Oi){for(;;)switch(Oi.prev=Oi.next){case 0:return In=new an(this.links.items).pathSegment(ne).build(),rr={data:je},void 0!==Wt&&(rr.ttl=Wt),Oi.prev=3,Oi.next=6,this.services.network.put(In,rr,$e);case 6:return(Xn=(fr=Oi.sent).body).data=je,Xn.date_updated=new Date(Xn.date_updated),Oi.abrupt("return",{added:201===fr.status.code,item:Xn});case 14:throw Oi.prev=14,Oi.t0=Oi.catch(3),404===Oi.t0.status&&this.onRemoved(!1),Oi.t0;case 18:case"end":return Oi.stop()}},V,this,[[3,14]])}));return function ie(V,ne,je,$e){return U.apply(this,arguments)}}()},{key:"remove",value:function(){var U=ae.default(W.default.mark(function V(ne){var je,$e,Wt;return W.default.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,this.get(ne);case 2:return $e=On((je=rr.sent).data),rr.next=6,this.services.network.delete(je.ur
1i);case 6:this._handleItemRemoved(ne,(Wt=rr.sent).body.last_event_id,$e,new Date(Wt.body.date_updated),!1);case 8:case"end":return rr.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"queryItems",value:function(){var U=ae.default(W.default.mark(function V(ne){var $e,Wt,In,rr,je=this;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return ne=ne||{},$e=new an(this.links.items).queryParam("From",ne.from).queryParam("PageSize",ne.limit).queryParam("Key",ne.key).queryParam("PageToken",ne.pageToken).queryParam("Order",ne.order).build(),Xn.next=4,this.services.network.get($e);case 4:return In=(Wt=Xn.sent).body.items.map(function(Rr){return Rr.date_updated=new Date(Rr.date_updated),je.cache.get(Rr.key)?je._handleItemMutated(Rr.key,Rr.url,Rr.last_event_id,Rr.revision,Rr.data,Rr.date_updated,Rr.date_expires,!1,!0):je.cache.store(Rr.key,new Re(Rr),Rr.last_event_id),je.cache.get(Rr.key)}),Xn.abrupt("return",new wr(In,function(Rr){return je.queryItems({pageToken:Rr})},(rr=Wt.body.meta).previous_token,rr.next_token));case 8:case"end":return Xn.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"getItems",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return gr((ne=ne||{}).pageSize),ne.limit=ne.pageSize||ne.limit||50,ne.order=ne.order||"asc",$e.abrupt("return",this.queryItems(ne));case 5:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"shouldIgnoreEvent",value:function(ie,V){return this.cache.isKnown(ie,V)}},{key:"_update",value:function(ie,V){switch(ie.date_created=new Date(ie.date_created),ie.type){case"map_item_added":case"map_item_updated":this._handleItemMutated(ie.item_key,ie.item_url,ie.id,ie.item_revision,ie.item_data,ie.date_created,void 0,"map_item_added"===ie.type,!0);break;case"map_item_removed":this._handleItemRemoved(ie.item_key,ie.id,ie.item_data,ie.date_created,!0);break;case"map_removed":this.onRemoved(!1)}V&&this._advanceLastEventId(ie.id,ie.map_revision)}},{key:"_advanceLastEventId",value:function(ie,V){this.lastEventId<ie&&(this.descriptor.last_event_id=ie,V&&(this.descriptor.revision=V))}},{key:"_updateRootDateUpdated",value:function(ie){(!this.descriptor.date_updated||ie.getTime()>this.descriptor.date_updated.getTime())&&(this.descriptor.date_updated=ie,this.services.storage.update(this.type,this.sid,this.uniqueName,{date_updated:ie}))}},{key:"_handleItemMutated",value:function(ie,V,ne,je,$e,Wt,In,rr,fr){if(this.shouldIgnoreEvent(ie,ne))Nr_trace("SyncMapItem ",ie," update skipped, current:",this.lastEventId,", remote:",ne);else{this._updateRootDateUpdated(Wt);var Xn=this.cache.get(ie);if(!Xn){var Rr=new Re({key:ie,url:V,last_event_id:ne,revision:je,data:$e,date_updated:Wt,date_expires:In});return this.cache.store(ie,Rr,ne),void this.emitItemMutationEvent(Rr,fr,rr)}var xi=On(Xn.data);Xn.update(ne,je,$e,Wt),this.cache.store(ie,Xn,ne),void 0!==In&&Xn.updateDateExpires(In),this.emitItemMutationEvent(Xn,fr,!1,xi)}}},{key:"emitItemMutationEvent",value:function(ie,V,ne){var $e=ne?"itemAdded":"itemUpdated",Wt={item:ie,isLocal:!V};ne||(Wt.previousItemData=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null),this.broadcastEventToListeners($e,Wt)}},{key:"_handleItemRemoved",value:function(ie,V,ne,je,$e){this._updateRootDateUpdated(je),this.cache.delete(ie,V),this.broadcastEventToListeners("itemRemoved",{key:ie,isLocal:!$e,previousItemData:ne})}},{key:"onRemoved",value:function(ie){this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:ie})}},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){var je;return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.prev=0,je={ttl:ne},In.next=4,this.services.network.post(this.uri,je);case 4:this.descriptor.date_expires=In.sent.body.date_expires,In.next=12;break;case 8:throw In.prev=8,In.t0=In.catch(0),404===In.t0.status&&this.onRemoved(!1),In.t0;case 12:case"end":return In.stop()}},V,this,[[0,8]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e,Wt;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,this.get(ne);case 2:return $e=fr.sent,Wt={ttl:je},fr.next=6,this.services.network.post($e.uri,Wt);case 6:$e.updateDateExpires(fr.sent.body.date_expires);case 8:case"end":return fr.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"removeMap",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,this.services.network.delete(this.uri);case 2:this.onRemoved(!0);case 3:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()}],[{key:"type",get:function(){return"map"}}]),Ee}(Ir),Mn=function(St){H.default(Ee,St);var U,Rt=Pt(Ee);function Ee(U){var ie;return Ve.default(this,Ee),(ie=Rt.call(this)).syncMapImpl=U,ie.syncMapImpl.attach(Ie.default(ie)),ie}return Ne.default(Ee,[{key:"uri",get:function(){return this.syncMapImpl.uri}},{key:"links",get:function(){return this.syncMapImpl.links}},{key:"revision",get:function(){return this.syncMapImpl.revision}},{key:"lastEventId",get:function(){return this.syncMapImpl.lastEventId}},{key:"dateExpires",get:function(){return this.syncMapImpl.dateExpires}},{key:"type",get:function(){return En.type}},{key:"sid",get:function(){return this.syncMapImpl.sid}},{key:"uniqueName",get:function(){return this.syncMapImpl.uniqueName}},{key:"dateUpdated",get:function(){return this.syncMapImpl.dateUpdated}},{key:"set",value:(U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return this.ensureNotClosed(),In.abrupt("return",this.syncMapImpl.set(ne,je,$e));case 2:case"end":return In.stop()}},V,this)})),function ie(V,ne,je){return U.apply(this,arguments)})},{key:"get",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncMapImpl.get(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"mutate",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return this.ensureNotClosed(),In.abrupt("return",this.syncMapImpl.mutate(ne,je,$e));case 2:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"update",value:function(){var U=ae.default(W.default.mark(function V(ne,je,$e){return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return this.ensureNotClosed(),In.abrupt("return",this.syncMapImpl.update(ne,je,$e));case 2:case"end":return In.stop()}},V,this)}));return function ie(V,ne,je){return U.apply(this,arguments)}}()},{key:"remove",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncMapImpl.remove(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"getItems",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncMapImpl.getItems(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncMapImpl.setTtl(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"setItemTtl",value:function(){var U=ae.default(W.default.mark(function V(ne,je){return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.ensureNotClosed(),Wt.abrupt("return",this.syncMapImpl.setItemTtl(ne,je));case 2:case"end":return Wt.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"removeMap",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return this.ensureNotClosed(),je.next=3,this.syncMapImpl.removeMap();case 3:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"close",value:function(){se.default(ye.default(Ee.prototype),"close",this).call(this),this.syncMapImpl.detach(this.listenerUuid)}}],[{key:"type",get:function(){return En.type}}]),Ee}(Pi);function br(St){var Rt=function Br(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}Le.default(Mn,"itemAdded","itemAdded"),Le.default(Mn,"itemUpdated","itemUpdated"),Le.default(Mn,"itemRemoved","itemRemoved"),Le.default(Mn,"removed","removed"),K([D.validateTypesAsync("string",D.pureObject,["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[String,Object,Object]),_e("design:returntype",Promise)],Mn.prototype,"set",null),K([D.validateTypesAsync("string"),_e("design:type",Function),_e("design:paramtypes",[String]),_e("design:returntype",Promise)],Mn.prototype,"get",null),K([D.validateTypesAsync("string","function",["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[String,Function,Object]),_e("design:returntype",Promise)],Mn.prototype,"mutate",null),K([D.validateTypesAsync("string",D.pureObject,["undefined",D.objectSchema("item metadata",{ttl:[D.nonNegativeInteger,"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[String,Object,Object]),_e("design:returntype",Promise)],Mn.prototype,"update",null),K([D.validateTypesAsync("string"),_e("design:type",Function),_e("design:paramtypes",[String]),_e("design:returntype",Promise)],Mn.prototype,"remove",null),K([D.validateTypesAsync(["undefined",D.objectSchema("query options",{from:["string","undefined"],pageSize:[D.custom(function(St){return[Vr(St),"a positive integer"]}),"undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],Mn.prototype,"getItems",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],Mn.prototype,"setTtl",null),K([D.validateTypesAsync("string",D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[String,Number]),_e("design:returntype",Promise)],Mn.prototype,"setItemTtl",null);var jr=function(St){H.default(Ee,St);var U,Rt=br(Ee);function Ee(U,ie,V){var ne;
1return Ve.default(this,Ee),(ne=Rt.call(this,U,V)).descriptor=ie,ne}return Ne.default(Ee,[{key:"uri",get:function(){return this.descriptor.url}},{key:"links",get:function(){return this.descriptor.links}},{key:"dateExpires",get:function(){return this.descriptor.date_expires}},{key:"type",get:function(){return"stream"}},{key:"lastEventId",get:function(){return null}},{key:"indexName",get:function(){}},{key:"queryString",get:function(){}},{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return this.descriptor.unique_name||null}},{key:"publishMessage",value:(U=ae.default(W.default.mark(function V(ne){var je,In;return W.default.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return je={data:ne},fr.next=3,this.services.network.post(this.links.messages,je);case 3:return In=this._handleMessagePublished(fr.sent.body.sid,ne,!1),fr.abrupt("return",In);case 7:case"end":return fr.stop()}},V,this)})),function ie(V){return U.apply(this,arguments)})},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){var je;return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.prev=0,je={ttl:ne},In.next=4,this.services.network.post(this.uri,je);case 4:this.descriptor.date_expires=In.sent.body.date_expires,In.next=12;break;case 8:throw In.prev=8,In.t0=In.catch(0),404===In.t0.status&&this.onRemoved(!1),In.t0;case 12:case"end":return In.stop()}},V,this,[[0,8]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"removeStream",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,this.services.network.delete(this.uri);case 2:this.onRemoved(!0);case 3:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"_update",value:function(ie){switch(ie.type){case"stream_message_published":this._handleMessagePublished(ie.message_sid,ie.message_data,!0);break;case"stream_removed":this.onRemoved(!1)}}},{key:"_handleMessagePublished",value:function(ie,V,ne){var je={sid:ie,data:V};return this.broadcastEventToListeners("messagePublished",{message:je,isLocal:!ne}),je}},{key:"onRemoved",value:function(ie){this._unsubscribe(),this.removalHandler(this.type,this.sid,this.uniqueName),this.broadcastEventToListeners("removed",{isLocal:ie})}}],[{key:"type",get:function(){return"stream"}}]),Ee}(Ir);K([D.validateTypesAsync(D.pureObject),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],jr.prototype,"publishMessage",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],jr.prototype,"setTtl",null);var gn=function(St){H.default(Ee,St);var U,Rt=br(Ee);function Ee(U){var ie;return Ve.default(this,Ee),(ie=Rt.call(this)).syncStreamImpl=U,ie.syncStreamImpl.attach(Ie.default(ie)),ie}return Ne.default(Ee,[{key:"uri",get:function(){return this.syncStreamImpl.uri}},{key:"links",get:function(){return this.syncStreamImpl.links}},{key:"dateExpires",get:function(){return this.syncStreamImpl.dateExpires}},{key:"type",get:function(){return jr.type}},{key:"lastEventId",get:function(){return null}},{key:"sid",get:function(){return this.syncStreamImpl.sid}},{key:"uniqueName",get:function(){return this.syncStreamImpl.uniqueName}},{key:"publishMessage",value:(U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncStreamImpl.publishMessage(ne));case 2:case"end":return $e.stop()}},V,this)})),function ie(V){return U.apply(this,arguments)})},{key:"setTtl",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return this.ensureNotClosed(),$e.abrupt("return",this.syncStreamImpl.setTtl(ne));case 2:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"removeStream",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return this.ensureNotClosed(),je.abrupt("return",this.syncStreamImpl.removeStream());case 2:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"close",value:function(){se.default(ye.default(Ee.prototype),"close",this).call(this),this.syncStreamImpl.detach(this.listenerUuid)}}],[{key:"type",get:function(){return jr.type}}]),Ee}(Pi);Le.default(gn,"messagePublished","messagePublished"),Le.default(gn,"removed","removed"),K([D.validateTypesAsync(D.pureObject),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],gn.prototype,"publishMessage",null),K([D.validateTypesAsync(D.nonNegativeInteger),_e("design:type",Function),_e("design:paramtypes",[Number]),_e("design:returntype",Promise)],gn.prototype,"setTtl",null);var Xe=function St(Rt){Ve.default(this,St),this.sdk="js",this.sdkVer=Rt,this.os=ce.os.family,this.osVer=ce.os.version,this.pl=ce.name,this.plVer=ce.version},Tt=function(){function St(){Ve.default(this,St),this.names=new Map,this.entities=new Map}return Ne.default(St,[{key:"store",value:function(Ee){return this.entities.get(Ee.sid)||(this.entities.set(Ee.sid,Ee),Ee.uniqueName&&this.names.set(Ee.type+"::"+Ee.uniqueName,Ee.sid),Ee)}},{key:"getResolved",value:function(Ee,U){var ie=this.names.get(U+"::"+Ee);return ie?this.entities.get(ie):null}},{key:"get",value:function(Ee,U){return this.entities.get(Ee)||this.getResolved(Ee,U)||null}},{key:"remove",value:function(Ee){var U=this.entities.get(Ee);U&&(this.entities.delete(Ee),U.uniqueName&&this.names.delete(U.type+"::"+U.uniqueName))}}]),St}();function An(St){var Rt=function Nn(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}var pr=function(St){H.default(Ee,St);var Rt=An(Ee);function Ee(U,ie,V,ne){var je;
1return Ve.default(this,Ee),(je=Rt.call(this,ie,V)).descriptor=U,je.cache=new Ii,ne&&ne.forEach(function($e){je.cache.store($e.key,{key:$e.key,value:$e.data},$e.revision)}),je}return Ne.default(Ee,[{key:"sid",get:function(){return this.descriptor.sid}},{key:"uniqueName",get:function(){return null}},{key:"type",get:function(){return Ee.type}},{key:"lastEventId",get:function(){return this.descriptor.last_event_id}},{key:"indexName",get:function(){return this.descriptor.indexName}},{key:"queryString",get:function(){return this.descriptor.queryExpression}},{key:"queryUri",get:function(){return this.descriptor.queryUri}},{key:"liveQueryDescriptor",get:function(){return this.descriptor}},{key:"onRemoved",value:function(){}},{key:"getItems",value:function(){var ie={};return this.cache.forEach(function(V,ne){ie[V]=ne.value}),ie}},{key:"_update",value:function(ie,V){switch(ie.type){case"live_query_item_updated":this.handleItemMutated(ie.item_key,ie.item_data,ie.item_revision);break;case"live_query_item_removed":this.handleItemRemoved(ie.item_key,ie.item_revision);break;case"live_query_updated":this.handleBatchUpdate(ie.items)}V&&this._advanceLastEventId(ie.last_event_id)}},{key:"handleItemMutated",value:function(ie,V,ne){if(this.shouldIgnoreEvent(ie,ne))Nr_trace("Item ".concat(ie," update skipped, revision: ").concat(ne));else{var je={key:ie,value:V};this.cache.store(ie,je,ne),this.broadcastEventToListeners("itemUpdated",je)}}},{key:"handleItemRemoved",value:function(ie,V){var ne=null===V;this.shouldIgnoreEvent(ie,V)?Nr_trace("Item ".concat(ie," delete skipped, revision: ").concat(V)):(this.cache.delete(ie,V,ne),this.broadcastEventToListeners("itemRemoved",{key:ie}))}},{key:"handleBatchUpdate",value:function(ie){var V=this,ne={};for(var je in ie?.forEach(function($e){ne[$e.key]={data:$e.data,revision:$e.revision}}),this.cache.forEach(function($e,Wt){var In=ne[$e];null!=In?V.handleItemMutated($e,In.data,In.revision):V.handleItemRemoved($e,null),delete ne[$e]}),ne)this.handleItemMutated(je,ne[je].data,ne[je].revision)}},{key:"shouldIgnoreEvent",value:function(ie,V){return null!=ie&&null!=V&&this.cache.isKnown(ie,V)}},{key:"_advanceLastEventId",value:function(ie,V){this.lastEventId<ie&&(this.descriptor.last_event_id=ie)}}],[{key:"type",get:function(){return"live_query"}}]),Ee}(Ir);function Tr(St){return Gr.apply(this,arguments)}function Gr(){return(Gr=ae.default(W.default.mark(function St(Rt){var Ee,U,ie,V,ne;return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(Ee=Rt.network,ie=Rt.uri,V=Rt.type,null!=(U=Rt.queryString)){Wt.next=3;break}throw new Hn("Invalid query",400,54507);case 3:return ne={query_string:U},V===qr.type&&(ne.type=V),Wt.next=7,Ee.post(ie,ne,void 0,!0);case 7:return Wt.abrupt("return",Wt.sent.body);case 9:case"end":return Wt.stop()}},St)}))).apply(this,arguments)}var qr=function(St){H.default(Ee,St);var Rt=An(Ee);function Ee(U){var ie;return Ve.default(this,Ee),(ie=Rt.call(this)).liveQueryImpl=U,ie.liveQueryImpl.attach(Ie.default(ie)),ie}return Ne.default(Ee,[{key:"type",get:function(){return pr.type}},{key:"lastEventId",get:function(){return this.liveQueryImpl.lastEventId}},{key:"sid",get:function(){return this.liveQueryImpl.sid}},{key:"close",value:function(){se.default(ye.default(Ee.prototype),"close",this).call(this),this.liveQueryImpl.detach(this.listenerUuid)}},{key:"getItems",value:function(){return this.ensureNotClosed(),this.liveQueryImpl.getItems()}}],[{key:"type",get:function(){return pr.type}}]),Ee}(Pi);Le.default(qr,"itemUpdated","itemUpdated"),Le.default(qr,"itemRemoved","itemRemoved");var ri=function(St){H.default(Ee,St);var U,Rt=An(Ee);function Ee(U){var ie;return Ve.default(this,Ee),ie=Rt.call(this),Le.default(Ie.default(ie),"queryExpression",null),Le.default(Ie.default(ie),"items",{}),Object.assign(Ie.default(ie),U),ie.updateIndexName(U.indexName),ie}return Ne.default(Ee,[{key:"type",get:function(){return Ee.type}},{key:"search",value:(U=ae.default(W.default.mark(function V(ne){var je=this;return W.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this.items={},Wt.abrupt("return",Tr({network:this.network,uri:this.queryUri,queryString:ne}).then(function(In){je.queryExpression=ne,In.items&&In.items.forEac
1h(function(rr){je.items[rr.key]=rr.data}),je.emit("searchResult",je.getItems())}).catch(function(In){throw Nr_error("Error '".concat(In.message,"' while executing query '").concat(ne,"'")),je.queryExpression=null,In}));case 2:case"end":return Wt.stop()}},V,this)})),function ie(V){return U.apply(this,arguments)})},{key:"subscribe",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(null!=this.queryExpression){je.next=2;break}return je.abrupt("return",Promise.reject(new Hn("Invalid query",400,54507)));case 2:return je.abrupt("return",this.liveQueryCreator(this.indexName,this.queryExpression));case 3:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"getItems",value:function(){return this.items}},{key:"updateIndexName",value:function(ie){this.indexName=ie,this.queryUri=this.generateQueryUri(this.indexName)}},{key:"generateQueryUri",value:function(ie){return new an(this.insightsUri).pathSegment(ie).pathSegment("Items").build()}}],[{key:"type",get:function(){return"instant_query"}}]),Ee}(ke);function bt(St,Rt){var Ee=Object.keys(St);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(St);Rt&&(U=U.filter(function(ie){return Object.getOwnPropertyDescriptor(St,ie).enumerable})),Ee.push.apply(Ee,U)}return Ee}function It(St){for(var Rt=1;Rt<arguments.length;Rt++){var Ee=null!=arguments[Rt]?arguments[Rt]:{};Rt%2?bt(Object(Ee),!0).forEach(function(U){Le.default(St,U,Ee[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(St,Object.getOwnPropertyDescriptors(Ee)):bt(Object(Ee)).forEach(function(U){Object.defineProperty(St,U,Object.getOwnPropertyDescriptor(Ee,U))})}return St}Le.default(ri,"searchResult","searchResult"),K([D.validateTypesAsync("string"),_e("design:type",Function),_e("design:paramtypes",[String]),_e("design:returntype",Promise)],ri.prototype,"search",null),K([D.validateTypes(D.nonEmptyString),_e("design:type",Function),_e("design:paramtypes",[String]),_e("design:returntype",void 0)],ri.prototype,"updateIndexName",null);var hn="3.1.0";function T(St){if(St){if("string"==typeof St)return{id:St,mode:"open_or_create"};var Rt=St.mode||(St.id?"open_or_create":"create_new");return It(It({},St),{},{mode:Rt})}return{mode:"create_new"}}var st="com.twilio.rtd.cds.document",Z="com.twilio.rtd.cds.list",wt="com.twilio.rtd.cds.map",Vt="twilio.sync.event",Sr=function(St){H.default(Ee,St);var U,Rt=function zt(St){var Rt=function en(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var ie,U=ye.default(St);if(Rt){var V=ye.default(this).constructor;ie=Reflect.construct(U,arguments,V)}else ie=U.apply(this,arguments);return j.default(this,ie)}}(Ee);function Ee(U){var ie,V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ve.default(this,Ee),ie=Rt.call(this),!U)throw new Error("Sync library needs a valid Twilio token to be passed");V.hasOwnProperty("logLevel")?Nr_setLevel(V.logLevel):Nr_setLevel("silent");var ne=V.productId=V.productId||"data_sync";V.clientMetadata=V.clientMetadata||{},V.clientMetadata.hasOwnProperty("type")||(V.clientMetadata.type="sync"),V.clientMetadata.hasOwnProperty("sdk")||(V.clientMetadata.sdk="JS",V.clientMetadata.sdkv=hn);var je=!V.twilsockClient;if(!V.initRegistrations){var $e=new ee.InitRegistration(ne);Ee.populateInitRegistrations($e),V.initRegistrations=[$e]}var Wt=V.twilsockClient=V.twilsockClient||new ee.Twilsock(U,ne,V);Wt.on("tokenAboutToExpire",function(Xn){return ie.emit("tokenAboutToExpire",Xn)}),Wt.on("tokenExpired",function(){return ie.emit("tokenExpired")}),Wt.on("connectionError",function(Xn){return ie.emit("connectionError",Xn)}),Wt.on("stateChanged",function(Xn){ie.emit("connectionStateChanged",Xn),ie.services.subscriptions.onConnectionStateChanged("connected"===Xn)}),Wt.on("message",function(Xn,Rr){return ie._routeMessage(Xn,Rr)});var In=new ut(V),rr=new dn(new Xe(hn),In,Wt),fr=new Tn(In);return ie.services={config:In,twilsock:Wt,network:rr,storage:fr,router:Ie.default(ie),subscriptions:null},ie.services.subscriptions=new jt(ie.services),ie.entities=new Tt,je&&Wt.connect(),ie}return Ne.default(Ee,[{key:"_routeMessage",value:function(ie,V){switch(Nr_trace("Notification type:",ie,"content:",V),ie){case st:case Z:case wt:this.services.subscriptions.acceptMessage(V,!1);break;case Vt:this.services.subscriptions.acceptMessage(V,!0)}}},{key:"_subscribe",value:function(ie,V){this.services.subscriptions.add(ie,V)}},{key:"_unsubscribe",value:function(ie){this.services.subscriptions.remove(ie)}},{key:"connectionState",get:function(){return this.services.twilsock.state}},{key:"ensureReady",value:(U=ae.default(W.default.mark(function V(){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(this.services.config.sessionStorageEnabled){$e.next=2;break}return $e.abrupt("return");case 2:return $e.prev=2,$e.next=5,this.services.twilsock.storageId();case 5:this.services.storage.updateStorageId($e.sent.id),$e.next=12;break;case 9:$e.prev=9,$e.t0=$e.catch(2),Nr_warn("Failed to initialize storage",$e.t0);case 12:case"end":return $e.stop()}},V,this,[[2,9]])}
1)),function ie(){return U.apply(this,arguments)})},{key:"storeRootInSessionCache",value:function(ie,V,ne){if(this.services.config.sessionStorageEnabled&&V){var je=On(ne);(ie===me.type||ie===Mn.type)&&(je.last_event_id=null,delete je.items),this.services.storage.store(ie,V,je)}}},{key:"readRootFromSessionCache",value:function(ie,V){return this.services.config.sessionStorageEnabled&&V?this.services.storage.read(ie,V):null}},{key:"_get",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e,Wt,rr=arguments;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:if($e=rr.length>2&&void 0!==rr[2]&&rr[2],je){Xn.next=3;break}throw new Hn("Cannot get entity without id",404);case 3:return Wt=new an(ne).pathSegment(je).queryParam("Include",$e?"items":void 0).build(),Xn.next=6,this.services.network.get(Wt);case 6:return Xn.abrupt("return",Xn.sent.body);case 8:case"end":return Xn.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"_createDocument",value:function(ie,V,ne){var je={unique_name:ie,data:V||{}};return void 0!==ne&&(je.ttl=ne),this.services.network.post(this.services.config.documentsUri,je).then(function($e){return $e.body.data=je.data,$e.body})}},{key:"_getDocument",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.readRootFromSessionCache($n.type,ne)||this._get(this.services.config.documentsUri,ne));case 1:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_createList",value:function(ie,V,ne,je){var $e={unique_name:ie,purpose:V,context:ne};return void 0!==je&&($e.ttl=je),this.services.network.post(this.services.config.listsUri,$e).then(function(Wt){return Wt.body})}},{key:"_getList",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.readRootFromSessionCache(me.type,ne)||this._get(this.services.config.listsUri,ne));case 1:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_createMap",value:function(ie,V){var ne={unique_name:ie};return void 0!==V&&(ne.ttl=V),this.services.network.post(this.services.config.mapsUri,ne).then(function(je){return je.body})}},{key:"_getMap",value:function(){var U=ae.default(W.default.mark(function V(ne){var je,$e=arguments;return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return je=$e.length>1&&void 0!==$e[1]&&$e[1],In.abrupt("return",this.readRootFromSessionCache(Mn.type,ne)||this._get(this.services.config.mapsUri,ne,je));case 2:case"end":return In.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_getStream",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.readRootFromSessionCache(gn.type,ne)||this._get(this.services.config.streamsUri,ne,!1));case 1:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"_createStream",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var $e;return W.default.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return $e={unique_name:ne},void 0!==je&&($e.ttl=je),rr.next=4,this.services.network.post(this.services.config.streamsUri,$e);case 4:return rr.abrupt("return",rr.sent.body);case 6:case"end":return rr.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"_getLiveQuery",value:function(ie){return this.readRootFromSessionCache(qr.type,ie)}},{key:"getCached",value:function(ie,V){return ie&&this.entities.get(ie,V)||null}},{key:"removeFromCacheAndSession",value:function(ie,V,ne){this.entities.remove(V),this.services.config.sessionStorageEnabled&&this.services.storage.remove(ie,V,ne)}},{key:"document",value:function(){var U=ae.default(W.default.mark(function V(ne){var $e,Wt,In,rr,je=this;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xn.next=2,this.ensureReady();case 2:if("create_new"!==($e=T(ne)).mode){Xn.next=9;break}return Xn.next=6,this._createDocument($e.id,$e.data,$e.ttl);case 6:case 17:case 29:Wt=Xn.sent,Xn.next=39;break;case 9:if(!(In=this.getCached($e.id,$n.type))){Xn.next=14;break}return Xn.abrupt("return",new $n(In));case 14:return Xn.prev=14,Xn.next=17,this._getDocument($e.id);
1case 20:if(Xn.prev=20,Xn.t0=Xn.catch(14),404===Xn.t0.status&&"open_existing"!==$e.mode){Xn.next=26;break}throw Xn.t0;case 26:return Xn.prev=26,Xn.next=29,this._createDocument($e.id,$e.data,$e.ttl);case 32:if(Xn.prev=32,Xn.t1=Xn.catch(26),409!==Xn.t1.status){Xn.next=38;break}return Xn.abrupt("return",this.document(ne));case 38:throw Xn.t1;case 39:return this.storeRootInSessionCache($n.type,$e.id,Wt),rr=new Wn(this.services,Wt,function(Rr,xi,Oi){return je.removeFromCacheAndSession(Rr,xi,Oi)}),rr=this.entities.store(rr),Xn.abrupt("return",new $n(rr));case 43:case"end":return Xn.stop()}},V,this,[[14,20],[26,32]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"map",value:function(){var U=ae.default(W.default.mark(function V(ne){var $e,Wt,In,rr,je=this;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xn.next=2,this.ensureReady();case 2:if("create_new"!==($e=T(ne)).mode){Xn.next=9;break}return Xn.next=6,this._createMap($e.id,$e.ttl);case 6:case 17:case 29:Wt=Xn.sent,Xn.next=39;break;case 9:if(!(In=this.getCached($e.id,Mn.type))){Xn.next=14;break}return Xn.abrupt("return",new Mn(In));case 14:return Xn.prev=14,Xn.next=17,this._getMap($e.id,$e.includeItems);case 20:if(Xn.prev=20,Xn.t0=Xn.catch(14),404===Xn.t0.status&&"open_existing"!==$e.mode){Xn.next=26;break}throw Xn.t0;case 26:return Xn.prev=26,Xn.next=29,this._createMap($e.id,$e.ttl);case 32:if(Xn.prev=32,Xn.t1=Xn.catch(26),409!==Xn.t1.status){Xn.next=38;break}return Xn.abrupt("return",this.map(ne));case 38:throw Xn.t1;case 39:return this.storeRootInSessionCache(Mn.type,$e.id,Wt),rr=new En(this.services,Wt,function(Rr,xi,Oi){return je.removeFromCacheAndSession(Rr,xi,Oi)}),rr=this.entities.store(rr),Xn.abrupt("return",new Mn(rr));case 43:case"end":return Xn.stop()}},V,this,[[14,20],[26,32]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"list",value:function(){var U=ae.default(W.default.mark(function V(ne){var $e,Wt,In,rr,je=this;return W.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xn.next=2,this.ensureReady();case 2:if("create_new"!==($e=T(ne)).mode){Xn.next=9;break}return Xn.next=6,this._createList($e.id,$e.purpose,$e.context,$e.ttl);case 6:case 17:case 29:Wt=Xn.sent,Xn.next=39;break;case 9:if(!(In=this.getCached($e.id,me.type))){Xn.next=14;break}return Xn.abrupt("return",new me(In));case 14:return Xn.prev=14,Xn.next=17,this._getList($e.id);case 20:if(Xn.prev=20,Xn.t0=Xn.catch(14),404===Xn.t0.status&&"open_existing"!==$e.mode){Xn.next=26;break}throw Xn.t0;case 26:return Xn.prev=26,Xn.next=29,this._createList($e.id,$e.purpose,$e.context,$e.ttl);case 32:if(Xn.prev=32,Xn.t1=Xn.catch(26),409!==Xn.t1.status){Xn.next=38;break}return Xn.abrupt("return",this.list(ne));case 38:throw Xn.t1;case 39:return this.storeRootInSessionCache(me.type,$e.id,Wt),rr=new le(this.services,Wt,function(Rr,xi,Oi){return je.removeFromCacheAndSession(Rr,xi,Oi)}),rr=this.entities.store(rr),Xn.abrupt("return",new me(rr));case 43:case"end":return Xn.stop()}},V,this,[[14,20],[26,32]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"stream",value:function(){var U=ae.default(W.default.mark(function V(ne){var $e,Wt,In,fr,je=this;return W.default.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,this.ensureReady();case 2:if("create_new"!==($e=T(ne)).mode){Rr.next=9;break}return Rr.next=6,this._createStream($e.id,$e.ttl);case 6:case 17:case 29:Wt=Rr.sent,Rr.next=39;break;case 9:if(!(In=this.getCached($e.id,gn.type))){Rr.next=14;break}return Rr.abrupt("return",new gn(In));case 14:return Rr.prev=14,Rr.next=17,this._getStream($e.id);case 20:if(Rr.prev=20,Rr.t0=Rr.catch(14),404===Rr.t0.status&&"open_existing"!==$e.mode){Rr.next=26;break}throw Rr.t0;case 26:return Rr.prev=26,Rr.next=29,this._createStream($e.id,$e.ttl);case 32:if(Rr.prev=32,Rr.t1=Rr.catch(26),409!==Rr.t1.status){Rr.next=38;break}return Rr.abrupt("return",this.stream(ne));case 38:throw Rr.t1;case 39:return this.storeRootInSessionCache(gn.type,$e.id,Wt),fr=new jr(this.services,Wt,function(Oi,bs,fs){return je.removeFromCacheAndSession(Oi,bs,fs)}),fr=this.entities.store(fr),Rr.abrupt("return",new gn(fr));case 44:case"end":return Rr.stop()}},V,this,[[14,20],[26,32]])}));return function ie(V){return U.apply(this,arguments)}}()},{key:"shutdown",value:function(){var U=ae.default(W.default.mark(function V(){return W.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,this.services.subscriptions.shutdown();case 2:return je.next=4,this.services.twilsock.disconnect();case 4:case"end":return je.stop()}},V,this)}));return function ie(){return U.apply(this,arguments)}}()},{key:"updateToken",value:function(){var U=ae.default(W.default.mark(function V(ne){return W.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.abrupt("return",this.services.twilsock.updateToken(ne).catch(function(Wt){var In,rr=null==Wt||null===(In=Wt.reply)||void 0===In?void 0:In.status;throw 401===rr?.code&&"UNAUTHORIZED"===rr?.status?new Hn("Updated token was rejected by server",400,51130):Wt}));case 1:case"end":return $e.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()},{key:"liveQuery",value:function(){var U=ae.default(W.default.mark(function V(ne,je){var Wt,In,rr,fr,$e=this;return W.default.wrap(function(xi){for(;;)switch(xi.prev=xi.next){case 0:return xi.next=2,this.ensureReady();case 2:return Wt=new an(this.services.config.insightsUri).pathSegment(ne).pathSegment("Items").build(),xi.next=5,Tr({network:this.services.network,uri:Wt,queryString:je,type:qr.type});case 5:return(rr=this.getCached((In=xi.sent).query_id,qr.type))||((fr=this._getLiveQuery(In.query_id))||(fr={indexName:ne,queryExpression:je,sid:In.query_id,queryUri:Wt,last_event_id:In.last_event_id}),rr=new pr(fr,this.services,function(bs,fs,Gs){return $e.removeFromCacheAndSession(bs,fs,Gs)},In.items)),this.storeRootInSessionCache(qr.type,In.query_id,rr.liveQueryDescriptor),rr=this.entities.store(rr),xi.abrupt("return",new qr(rr));case 11:case"end":return xi.stop()}},V,this)}));return function ie(V,ne){return U.apply(this,arguments)}}()},{key:"instantQuery",value:function(){var U=ae.default(W.default.mark(function V(ne){var je=this;return W.default.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,this.ensureReady();case 2:return In.abrupt("return",new ri({indexName:ne,network:this.services.network,insightsUri:this.services.config.insightsUri,liveQueryCreator:function(fr,Xn){return je.liveQuery(fr,Xn)}}));case 4:case"end":return In.stop()}},V,this)}));return function ie(V){return U.apply(this,arguments)}}()}],[{key:"populateInitRegistrations",value:function(ie){ie.populateInitRegistrations([Vt,st,Z,wt])}},{key:"version",get:function(){return hn}}]),Ee}(ke);Le.default(Sr,"connectionStateChanged","connectionStateChanged"),Le.default(Sr,"connectionError","connectionError"),Le.default(Sr,"tokenAboutToExpire","tokenAboutToExpire"),Le.default(Sr,"tokenExpired","tokenExpired"),K([D.validateTypesAsync(["undefined","string",D.objectSchema("open document options",{id:["string","undefined"],mode:[D.literal("open_or_create","open_existing","create_new"),"undefined"],ttl:[D.nonNegativeInteger,"undefined"],data:[D.pureObject,"undefined",D.literal(null)]})]),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],Sr.prototype,"document",null),K([D.validateTypesAsync(["undefined","string",D.objectSchema("open map options",{id:["string","undefined"],mode:[D.literal("open_or_create","open_existing","create_new"),"undefined"],ttl:[D.nonNegativeInteger,"undefined"],data:[D.pureObject,"undefined",D.literal(null)],includeItems:["boolean","undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],Sr.prototype,"map",null),K([D.validateTypesAsync(["undefined","string",D.objectSchema("open list options",{id:["string","undefined"],mode:[D.literal("open_or_create","open_existing","create_new"),"undefined"],ttl:[D.nonNegativeInteger,"undefined"],data:[D.pureObject,"undefined",D.literal(null)],purpose:["string","undefined"],context:[D.pureObject,"undefined"],includeItems:["boolean","undefined"]})]),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],Sr.prototype,"list",null),K([D.validateTypesAsync(["undefined","string",D.objectSchema("open stream options",{id:["string","undefined"],mode:[D.literal("open_or_create","open_existing","create_new"),"undefined"],ttl:[D.nonNegativeInteger,"undefined"],data:[D.pureObject,"undefined",D.literal(null)]})]),_e("design:type",Function),_e("design:paramtypes",[Object]),_e("design:returntype",Promise)],Sr.prototype,"stream",null),K([D.validateTypesAsync(D.nonEmptyString),_e("design:type",Function),_e("design:paramtypes",[String]),_e("design:returntype",Promise)],Sr.prototype,"updateToken",null),K([D.validateTypesAsync(D.nonEmptyString,"string"),_e("design:type",Function),_e("design:paramtypes",[String,String]),_e("design:returntype",Promise)],Sr.prototype,"liveQuery",null),K([D.validateTypesAsync(D.nonEmptyString),_e("design:type",Function),_e("design:paramtypes",[String]),_e("design:returntype",Promise)],Sr.prototype,"instantQuery",null),G.Client=Sr,G.InsightsItem=function St(){Ve.default(this,St)},G.InstantQuery=ri,G.LiveQuery=qr,G.Paginator=wr,G.SyncClient=Sr,G.SyncDocument=$n,G.SyncList=me,G.SyncListItem=jn,G.SyncMap=Mn,G.SyncMapItem=Re,G.SyncStream=gn},45376:(B,G,a)=>{"use strict";
1Object.defineProperty(G,"__esModule",{value:!0}),a(32928),a(49640),a(29912),a(48928),a(53475),a(35016),a(16968),a(89120),a(29708);var i=a(59848);a(51408),a(97355),a(9456);var v=a(97936);a(91088),a(4248),a(62016);var b=a(25724),_=a(94064),C=a(54216),P=a(96284),S=a(63532);function R(ge){return ge&&"object"==typeof ge&&"default"in ge?ge:{default:ge}}a(32452),a(79628),a(16699);var k=R(i),x=R(v),D=R(b),ee=R(_),te=R(C),J=R(P),Q=R(S),we=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];return{checks:pt}};function Se(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}var Ye=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];return we(function(cn){var rt,mn=!1,dt=[],lt=function de(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function Y(ge,xt){if(ge){if("string"==typeof ge)return Se(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return Se(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}(pt);try{for(lt.s();!(rt=lt.n()).done;){var kt=rt.value;"string"!=typeof kt?(mn=mn||cn instanceof kt,dt.push("an instance of ".concat(kt.name))):(mn=mn||k.default(cn)===kt,dt.push("of type ".concat(kt)))}}catch(an){lt.e(an)}finally{lt.f()}return[mn,dt]})};function Ve(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}var Ie=we(function(ge){return["string"==typeof ge&&ge.length>0,"a non-empty string"]}),H=we(function(ge){return["number"==typeof ge&&Number.isInteger(ge)&&ge>=0,"a non-negative integer"]}),j=we(function(ge){return["object"===k.default(ge)&&null!==ge&&!Array.isArray(ge),"a pure object (non-null and non-array)"]});function W(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function We(ge,xt){if(ge){if("string"==typeof ge)return At(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return At(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}function At(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}var Ut=function(xt,pt){if(pt.length>xt.length)throw new Error("Expected at most ".concat(xt.length," argument(s), but got ").concat(pt.length));for(;pt.length<xt.length;)pt.push(void 0);var cn,rn=W(pt.entries());try{for(rn.s();!(cn=rn.n()).done;){var mn=x.default(cn.value,2),dt=mn[0],rt=Pe(xt[dt],mn[1]),kt=x.default(rt,4),Yn=kt[1],bn=kt[2],Hn=kt[3];if(!kt[0])throw new Error("Argument ".concat(dt+1," is expected to be ").concat(bn).concat(Hn," but got ").concat(Yn))}}catch(On){rn.e(On)}finally{rn.f()}},it=function(xt){var pt,rn,mn;return["undefined","boolean","number","bigint","string"].includes(k.default(xt))&&(rn="string"==typeof xt?'"'.concat(xt,'"'):"".concat(xt)),"object"===k.default(xt)&&"Object"!==(null==xt||null===(pt=xt.constructor)||void 0===pt?void 0:pt.name)&&(rn=null===xt?"null":"instance of ".concat(null==xt||null===(mn=xt.constructor)||void 0===mn?void 0:mn.name)),rn||(rn=k.default(xt)),rn},K=function(xt){var cn,pt=[],rn=W(xt);try{for(rn.s();!(cn=rn.n()).done;)pt.push(_e(cn.value))}catch(dt){rn.e(dt)}finally{rn.f()}return pt},_e=function(xt){var mn,pt=[],cn=W(Array.isArray(xt)?xt:[xt]);try{for(cn.s();!(mn=cn.n()).done;){var dt=mn.value;pt.push("string"!=typeof dt&&"function"!=typeof dt?dt:Ye(dt))}}catch(lt){cn.e(lt)}finally{cn.f()}return pt},Pe=function(xt,pt){var cn,lt,rn=[],mn=!1,dt=W(xt);try{for(dt.s();!(lt=dt.n()).done;){var an,kt=W(lt.value.checks);try{for(kt.s();!(an=kt.n()).done;){var bn=(0,an.value)(pt),Hn=x.default(bn,3),On=Hn[1],gr=Hn[2];mn=mn||Hn[0],!cn&&gr&&(cn=gr),On&&(rn=[].concat(D.default(rn),"string"==typeof On?[On]:D.default(On)))}}catch(ti){kt.e(ti)}finally{kt.f()}}}catch(ti){dt.e(ti)}finally{dt.f()}if(mn)return[!0];var Mr=cn||it(pt),Vr=rn.length-1;return[!1,Mr,Vr>0?"".concat(rn.slice(0,Vr).join(", ")," or ").concat(rn[Vr]):rn.join(", "),Vr>1?";":","]};function Dt(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}
1G.array=function(xt,pt){return we(function(rn){if(!Array.isArray(rn))return[!1,"an array of ".concat(xt)];var mn,cn=function ke(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function Lt(ge,xt){if(ge){if("string"==typeof ge)return Dt(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return Dt(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}(rn.entries());try{for(cn.s();!(mn=cn.n()).done;){var dt=x.default(mn.value,2),lt=dt[0],rt=dt[1],kt=Pe(_e(pt),rt),an=x.default(kt,3),bn=an[1],Hn=an[2];
1if(!an[0])return[!1,"a valid array of ".concat(xt," (index ").concat(lt," should be ").concat(Hn,")"),"malformed array of ".concat(xt," (index ").concat(lt," is ").concat(bn,")")]}}catch(Fn){cn.e(Fn)}finally{cn.f()}return[!0]})},G.custom=we,G.literal=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];return we(function(cn){var rt,mn=!1,dt=[],lt=function pe(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function ae(ge,xt){if(ge){if("string"==typeof ge)return Ve(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return Ve(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}(pt);try{for(lt.s();!(rt=lt.n()).done;){var kt=rt.value;mn=mn||cn===kt,dt.push("string"==typeof kt?'"'.concat(kt,'"'):"".concat(kt))}}catch(an){lt.e(an)}finally{lt.f()}return[mn,dt]})},G.nonEmptyString=Ie,G.nonNegativeInteger=H,G.objectSchema=function(xt,pt){return we(function(rn){if("object"!==k.default(rn)||null===rn||Array.isArray(rn))return[!1,"valid ".concat(xt,"
1(should be a pure object)")];for(var cn=0,mn=Object.entries(pt);cn<mn.length;cn++){var dt=x.default(mn[cn],2),lt=dt[0],kt=Pe(_e(dt[1]),rn[lt]),an=x.default(kt,3),bn=an[1],Hn=an[2];if(!an[0])return[!1,"valid ".concat(xt,' (key "').concat(lt,'" should be ').concat(Hn,")"),"malformed ".concat(xt,' (key "').concat(lt,'" is ').concat(bn,")")]}return[!0]})},G.pureObject=j,G.runtimeTypeValidation=Ut,G.stringifyReceivedType=it,G.type=Ye,G.validateConstructorTypes=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];var cn=K(pt);return function(mn){return function(dt){te.default(rt,dt);var lt=function ye(ge){var xt=function Le(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var cn,rn=Q.default(ge);if(xt){var mn=Q.default(this).constructor;cn=Reflect.construct(rn,arguments,mn)}else cn=rn.apply(this,arguments);return J.default(this,cn)}}(rt);function rt(){ee.default(this,rt);for(var kt=arguments.length,an=new Array(kt),Yn=0;Yn<kt;Yn++)an[Yn]=arguments[Yn];return Ut(cn,an),lt.call.apply(lt,[this].concat(an))}return rt}(mn)}},G.validateTypes=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];var cn=K(pt);return function(mn,dt,lt){if("function"!=typeof lt.value)throw new Error("The validateTypes decorator can only be applied to methods");var rt=lt.value;lt.value=function(){for(var kt=arguments.length,an=new Array(kt),Yn=0;Yn<kt;Yn++)an[Yn]=arguments[Yn];return Ut(cn,an),rt.apply(this,an)}}},G.validateTypesAsync=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];var cn=K(pt);return function(mn,dt,lt){if("function"!=typeof lt.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var rt=lt.value;lt.value=function(){for(var kt=arguments.length,an=new Array(kt),Yn=0;Yn<kt;Yn++)an[Yn]=arguments[Yn];try{Ut(cn,an)}catch(bn){return Promise.reject(bn)}return rt.apply(this,an)}}}},85720:(B,G,a)=>{"use strict";var i=typeof i<"u"?i:typeof self<"u"?self:typeof window<"u"?window:{};Object.defineProperty(G,"__esModule",{value:!0}),a(62016);var v=a(1196),b=a(66024),_=a(71559),C=a(87312),P=a(54216),S=a(96284),R=a(63532),k=a(94064),x=a(2676),D=a(33248);a(4248),a(49640),a(88096),a(16699),a(76568);var ee=a(59848),te=a(59316);a(29912),a(48928);var J=a(43752);a(89120),a(57912),a(29708),a(53475),a(35016),a(79628);var Q=a(79976),we=a(75088);a(12644),a(54004),a(9456),a(17664),a(20944),a(62496),a(7996),a(44376),a(69712),a(44524),a(61072),a(63240),a(16964),a(64872),a(90040),a(92027),a(36288),a(26932),a(51336),a(26596),a(67696),a(73784),a(89416),a(58372),a(16604),a(90600),a(11296),a(2808);var de=a(60764);a(21040),a(31956),a(12600),a(82984),a(4376);var Y=a(58416);a(85607);var Se=a(70544);function Ye(zt){return zt&&"object"==typeof zt&&"default"in zt?zt:{default:zt}}function pe(zt){if(zt&&zt.__esModule)return zt;var en=Object.create(null);return zt&&Object.keys(zt).forEach(function(bt){if("default"!==bt){var It=Object.getOwnPropertyDescriptor(zt,bt);Object.defineProperty(en,bt,It.get?It:{enumerable:!0,get:function(){return zt[bt]}})}}),en.default=zt,Object.freeze(en)}a(32888),a(8824),a(56468);var ae=Ye(v),Ve=Ye(b),Ne=Ye(_),Ie=Ye(C),H=Ye(P),j=Ye(S),ye=Ye(R),Le=Ye(k),W=Ye(x),We=Ye(D),At=Ye(ee),Ut=pe(J),it=pe(Q),ue=Ye(de),se=pe(Se);function Pe(){}function De(){De.init.call(this)}function ke(zt){return void 0===zt._maxListeners?De.defaultMaxListeners:zt._maxListeners}function pt(zt,en,bt,It){var _t,hn,T;if("function"!=typeof bt)throw new TypeError('"listener" argument must be a function');if((hn=zt._events)?(hn.newListener&&(zt.emit("newListener",en,bt.listener?bt.listener:bt),hn=zt._events),T=hn[en]):(hn=zt._events=new Pe,zt._eventsCount=0),T){if("function"==typeof T?T=hn[en]=It?[bt,T]:[T,bt]:It?T.unshift(bt):T.push(bt),!T.warned&&(_t=ke(zt))&&_t>0&&T.length>_t){T.warned=!0;var st=new Error("Possible EventEmitter memory leak detected. "+T.length+" "+en+" listeners added. Use emitter.setMaxListeners() to increase limit");st.name="MaxListenersExceededWarning",st.emitter=zt,st.type=en,st.count=T.length,function rn(zt){"function"==typeof console.warn?console.warn(zt):console.log(zt)}(st)}}else T=hn[en]=bt,++zt._eventsCount;return zt}function cn(zt,en,bt){var It=!1;function _t(){zt.removeListener(en,_t),It||(It=!0,bt.apply(zt,arguments))}return _t.listener=bt,_t}function mn(zt){var en=this._events;if(en){var bt=en[zt];if("function"==typeof bt)return 1;if(bt)return bt.length}return 0}function lt(zt,en){for(var bt=new Array(en);en--;)bt[en]=zt[en];return bt}Pe.prototype=Object.create(null),De.EventEmitter=De,De.usingDomains=!1,De.prototype.domain=void 0,De.prototype._events=void 0,De.prototype._maxListeners=void 0,De.defaultMaxListeners=10,De.init=function(){this.domain=null,De.usingDomains&&(void 0).active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new Pe,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},De.prototype.setMaxListeners=function(en){if("number"!=typeof en||en<0||isNaN(en))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=en,this},De.prototype.getMaxListeners=function(){return ke(this)},De.prototype.emit=function(en){var bt,It,_t,hn,T,st,Z,wt="error"===en;if(st=this._events)wt=wt&&null==st.error;else if(!wt)return!1;
1if(Z=this.domain,wt){if(bt=arguments[1],!Z){if(bt instanceof Error)throw bt;var Vt=new Error('Uncaught, unspecified "error" event. ('+bt+")");throw Vt.context=bt,Vt}return bt||(bt=new Error('Uncaught, unspecified "error" event')),bt.domainEmitter=this,bt.domain=Z,bt.domainThrown=!1,Z.emit("error",bt),!1}if(!(It=st[en]))return!1;var Sr="function"==typeof It;switch(_t=arguments.length){case 1:!function Lt(zt,en,bt){if(en)zt.call(bt);else for(var It=zt.length,_t=lt(zt,It),hn=0;hn<It;++hn)_t[hn].call(bt)}(It,Sr,this);break;case 2:!function Dt(zt,en,bt,It){if(en)zt.call(bt,It);else for(var _t=zt.length,hn=lt(zt,_t),T=0;T<_t;++T)hn[T].call(bt,It)}(It,Sr,this,arguments[1]);break;case 3:!function He(zt,en,bt,It,_t){if(en)zt.call(bt,It,_t);else for(var hn=zt.length,T=lt(zt,hn),st=0;st<hn;++st)T[st].call(bt,It,_t)}(It,Sr,this,arguments[1],arguments[2]);break;case 4:!function ge(zt,en,bt,It,_t,hn){if(en)zt.call(bt,It,_t,hn);else for(var T=zt.length,st=lt(zt,T),Z=0;Z<T;++Z)st[Z].call(bt,It,_t,hn)}(It,Sr,this,arguments[1],arguments[2],arguments[3]);break;default:for(hn=new Array(_t-1),T=1;T<_t;T++)hn[T-1]=arguments[T];!function xt(zt,en,bt,It){if(en)zt.apply(bt,It);else for(var _t=zt.length,hn=lt(zt,_t),T=0;T<_t;++T)hn[T].apply(bt,It)}(It,Sr,this,hn)}return!0},De.prototype.on=De.prototype.addListener=function(en,bt){return pt(this,en,bt,!1)},De.prototype.prependListener=function(en,bt){return pt(this,en,bt,!0)},De.prototype.once=function(en,bt){if("function"!=typeof bt)throw new TypeError('"listener" argument must be a function');return this.on(en,cn(this,en,bt)),this},De.prototype.prependOnceListener=function(en,bt){if("function"!=typeof bt)throw new TypeError('"listener" argument must be a function');return this.prependListener(en,cn(this,en,bt)),this},De.prototype.removeListener=function(en,bt){var It,_t,hn,T,st;if("function"!=typeof bt)throw new TypeError('"listener" argument must be a function');if(!(_t=this._events))return this;if(!(It=_t[en]))return this;if(It===bt||It.listener&&It.listener===bt)0==--this._eventsCount?this._events=new Pe:(delete _t[en],_t.removeListener&&this.emit("removeListener",en,It.listener||bt));else if("function"!=typeof It){for(hn=-1,T=It.length;T-- >0;)if(It[T]===bt||It[T].listener&&It[T].listener===bt){st=It[T].listener,hn=T;break}if(hn<0)return this;if(1===It.length){if(It[0]=void 0,0==--this._eventsCount)return this._events=new Pe,this;delete _t[en]}else!function dt(zt,en){for(var bt=en,It=bt+1,_t=zt.length;It<_t;bt+=1,It+=1)zt[bt]=zt[It];zt.pop()}(It,hn);_t.removeListener&&this.emit("removeListener",en,st||bt)}return this},De.prototype.off=function(zt,en){return this.removeListener(zt,en)},De.prototype.removeAllListeners=function(en){var bt,It;if(!(It=this._events))return this;if(!It.removeListener)return 0===arguments.length?(this._events=new Pe,this._eventsCount=0):It[en]&&(0==--this._eventsCount?this._events=new Pe:delete It[en]),this;if(0===arguments.length){for(var T,_t=Object.keys(It),hn=0;hn<_t.length;++hn)"removeListener"!==(T=_t[hn])&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=new Pe,this._eventsCount=0,this}if("function"==typeof(bt=It[en]))this.removeListener(en,bt);else if(bt)do{this.removeListener(en,bt[bt.length-1])}while(bt[0]);return this},De.prototype.listeners=function(en){var bt,It,_t=this._events;return It=_t&&(bt=_t[en])?"function"==typeof bt?[bt.listener||bt]:function rt(zt){for(var en=new Array(zt.length),bt=0;bt<en.length;++bt)en[bt]=zt[bt].listener||zt[bt];return en}(bt):[],It},De.listenerCount=function(zt,en){return"function"==typeof zt.listenerCount?zt.listenerCount(en):mn.call(zt,en)},De.prototype.listenerCount=mn,De.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var kt=Ut.getLogger("twilsock");function an(zt,en){return["".concat((new Date).toISOString()," Twilsock ").concat(zt,":")].concat(Array.from(en))}var Yn=function(){function zt(en){Le.default(this,zt),W.default(this,"prefix",""),this.prefix=null!=en&&en.length>0?" "+en+":":""}return Ve.default(zt,[{key:"setLevel",value:function(bt){kt.setLevel(bt)}},{key:"trace",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.trace.apply(null,an("T",It))}},{key:"debug",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.debug.apply(null,an("D",It))}},{key:"info",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.info.apply(null,an("I",It))}},{key:"warn",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.warn.apply(null,an("W",It))}},{key:"error",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.error.apply(null,an("E",It))}}],[{key:"setLevel",value:function(bt){kt.setLevel(bt)}},{key:"trace",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.trace.apply(null,an("T",It))}},{key:"debug",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.debug.apply(null,an("D",It))}},{key:"info",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.info.apply(null,an("I",It))}},{key:"warn",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.warn.apply(null,an("W",It))}},{key:"error",value:function(){for(var bt=arguments.length,It=new Array(bt),_t=0;_t<bt;_t++)It[_t]=arguments[_t];kt.error.apply(null,an("E",It))}}]),zt}(),bn=new Yn(""),Fn=function(){function zt(en,bt,It){Le.default(this,zt),W.default(this,"confirmedCapabilities",new Set),this.activeGrant=bt,this._token=en;var hn="wss://tsock.".concat(It.region||"us1",".twilio.com/v3/wsconnect");this.url=(It.twilsock||It.Twilsock||{}).uri||hn,this._continuationToken=It.continuationToken?It.continuationToken:null,this.logLevel=It.logLevel?It.logLevel:"error",this.retryPolicy=It.retryPolicy?It.retryPolicy:{min:1e3,max:12e4,randomness:.2},this.clientMetadata=It.clientMetadata?It.clientMetadata:{},this.clientMetadata.ver="0.12.2",this.initRegistrations=It.initRegistrations?It.initRegistrations:null,this.tweaks=It.tweaks?It.tweaks:null}return Ve.default(zt,[{key:"token",get:function(){return this._token}},{key:"continuationToken",get:function(){return this._continuationToken}},{key:"updateToken",value:function(bt){this._token=bt}},{key:"updateContinuationToken",value:function(bt){this._continuationToken=bt}}]),zt}(),On=function zt(en){Le.default(this,zt),this.id=en||"TM".concat(we.v4())};var Vr=function(zt){H.default(bt,zt);var en=function gr(zt){var en=function Mr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t,hn,T,st){var Z;return Le.default(this,bt),Z=en.call(this),W.default(Ne.default(Z),"method","init"),Z.token=It,Z.continuation_token=_t,Z.metadata=hn,Z.registrations=T,Z.tweaks=st,Z.capabilities=["client_update","offline_storage","telemetry.v1"],Z}return bt}(On);var Nr=function(zt){H.default(bt,zt);
1var en=function Fr(zt){var en=function ti(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t,hn,T,st,Z,wt){var Vt;return Le.default(this,bt),(Vt=en.call(this,It)).continuationToken=_t,Vt.continuationTokenStatus=T,Vt.offlineStorage=st,Vt.initRegistrations=Z,Vt.debugInfo=wt,Vt.confirmedCapabilities=hn,Vt}return bt}(On);var sr=function(zt){H.default(bt,zt);var en=function Kr(zt){var en=function Jr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){var _t;return Le.default(this,bt),_t=en.call(this),W.default(Ne.default(_t),"method","update"),_t.token=It,_t}return bt}(On);var sn=function(zt){H.default(bt,zt);var en=function or(zt){var en=function zr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t,hn){var T;return Le.default(this,bt),T=en.call(this),W.default(Ne.default(T),"method","message"),T.active_grant=It,T.payload_type=_t,T.http_request=hn,T}return bt}(On);var Xt=function(zt){H.default(bt,zt);var en=function Qe(zt){var en=function ut(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){var _t;return Le.default(this,bt),_t=en.call(this,It),W.default(Ne.default(_t),"method","reply"),W.default(Ne.default(_t),"payload_type","application/json"),W.default(Ne.default(_t),"status",{code:200,status:"OK"}),_t}return bt}(On);var vn=function(zt){H.default(bt,zt);var en=function wn(zt){var en=function dr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(){var It;return Le.default(this,bt),It=en.call(this),W.default(Ne.default(It),"method","close"),It}return bt}(On);var Mt=function zt(en,bt,It,_t,hn,T){Le.default(this,zt),this.start=en,this.end=bt,this.title=It,this.details=_t,this.id=hn,this.type=T},Ze=function(zt){H.default(bt,zt);var en=function jt(zt){var en=function Ct(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){var _t;return Le.default(this,bt),_t=en.call(this),W.default(Ne.default(_t),"method","telemetry.v1"),_t.events=It,_t}return bt}(On);function et(zt){return encodeURIComponent(zt).replace(/%([0-9A-F]{2})/g,function(It,_t){return String.fromCharCode(+("0x"+_t))}).length}function Fe(zt){var bt=Array.prototype.map.call(zt,function(It){return String.fromCharCode(It)}).join("").replace(/(.)/g,function(It,_t){var hn=_t.charCodeAt(0).toString(16).toUpperCase();return hn.length<2&&(hn="0"+hn),"%"+hn});return decodeURIComponent(bt)}function ft(zt){return JSON.parse(Fe(zt))}var Tn=function(){function zt(){Le.default(this,zt)}return Ve.default(zt,null,[{key:"parse",value:function(bt){var T,st,_t=new Uint8Array(bt),hn=function dn(zt){for(var en="",bt=0;bt<zt.length;++bt){var It=String.fromCharCode(zt[bt]);if(en+=It,"\r"===It){bt+=2;break}}var _t=en.split(" ");return{size:bt,protocol:_t[0],version:_t[1],headerSize:Number(_t[2])}}(_t);if("TWILSOCK"!==hn.protocol||"V3.0"!==hn.version)return bn.error("unsupported protocol: ".concat(hn.protocol," ver ").concat(hn.version)),null;try{T=ft(_t.subarray(hn.size,hn.size+hn.headerSize))}catch(Vt){return bn.error("failed to parse message header",Vt,bt),null}if(bn.debug("message received: ",T.method),bn.trace("message received: ",T),T.payload_size>0){var Z=2+hn.size+hn.headerSize,wt=T.payload_size;if(T.hasOwnProperty("payload_type")&&0!==T.payload_type.indexOf("application/json"))0===T.payload_type.indexOf("text/plain")&&(st=Fe(_t.subarray(Z,Z+wt)));else try{st=ft(_t.subarray(Z,Z+wt))}catch(Vt){return bn.error("failed to parse message body",Vt,bt),null}}return{method:T.method,header:T,payload:st}}},{key:"createPacket",value:function(bt){var It=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";bt.payload_size=et(It);var _t=JSON.stringify(bt),hn="TWILSOCK V3.0 "+et(_t);bn.debug("send request:",hn+_t+It);var T=function Zt(zt){var bt=encodeURIComponent(zt).replace(/%([0-9A-F]{2})/g,function(_t,hn){return String.fromCharCode(+("0x"+hn))}),It=new Uint8Array(bt.length);return Array.prototype.forEach.call(bt,function(_t,hn){It[hn]=_t.charCodeAt(0)}),It}(hn+"\r\n"+_t+"\r\n"+It);return T.buffer}}]),zt}();var tr=function(zt){H.default(bt,zt);var en=function Bn(zt){var en=function mr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){return Le.default(this,bt),en.call(this,It)}return bt}(ue.default(Error));var Er=function(zt){H.default(bt,zt);var en=function Ir(zt){var en=function ur(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t){var hn;return Le.default(this,bt),(hn=en.call(this,It)).reply=_t,hn}return bt}(tr);function Ai(zt,en){var bt=Object.keys(zt);if(Object.getOwnPropertySymbols){var It=Object.getOwnPropertySymbols(zt);en&&(It=It.filter(function(_t){return Object.getOwnPropertyDescriptor(zt,_t).enumerable})),bt.push.apply(bt,It)}return bt}function Di(zt){for(var en=1;en<arguments.length;en++){var bt=null!=arguments[en]?arguments[en]:{};
1en%2?Ai(Object(bt),!0).forEach(function(It){W.default(zt,It,bt[It])}):Object.getOwnPropertyDescriptors?Object.defineProperties(zt,Object.getOwnPropertyDescriptors(bt)):Ai(Object(bt)).forEach(function(It){Object.defineProperty(zt,It,Object.getOwnPropertyDescriptor(bt,It))})}return zt}var Ht=function(zt){H.default(bt,zt);var en=function Pi(zt){var en=function nr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){var _t;return Le.default(this,bt),_t=en.call(this),W.default(Ne.default(_t),"newBackoff",null),W.default(Ne.default(_t),"usedBackoff",null),W.default(Ne.default(_t),"retrier",null),_t.options=It?Di({},It):{},_t}return Ve.default(bt,[{key:"inProgress",get:function(){return!!this.retrier}},{key:"start",value:function(){if(this.inProgress)throw new Error("Already waiting for next attempt, call finishAttempt(success : boolean) to finish it");this.createRetrier()}},{key:"stop",value:function(){this.cleanRetrier(),this.newBackoff=null,this.usedBackoff=null}},{key:"modifyBackoff",value:function(_t){this.newBackoff=_t}},{key:"attemptFailed",value:function(){if(!this.inProgress)throw new Error("No attempt is in progress");var hn,T;this.newBackoff?!this.usedBackoff||this.usedBackoff<this.newBackoff?this.createRetrier():null===(hn=this.retrier)||void 0===hn||hn.failed(new Error):null===(T=this.retrier)||void 0===T||T.failed(new Error)}},{key:"cancel",value:function(){var _t;null===(_t=this.retrier)||void 0===_t||_t.cancel()}},{key:"cleanRetrier",value:function(){var _t,hn;null===(_t=this.retrier)||void 0===_t||_t.removeAllListeners(),null===(hn=this.retrier)||void 0===hn||hn.cancel(),this.retrier=null}},{key:"getRetryPolicy",value:function(){var _t=Di({},this.options);return this.newBackoff&&(_t.min=this.newBackoff,_t.max=this.options.max&&this.options.max>this.newBackoff?this.options.max:this.newBackoff),_t.maxAttemptsCount=this.options.maxAttemptsCount?this.options.maxAttemptsCount+1:void 0,_t}},{key:"createRetrier",value:function(){var _t=this;this.cleanRetrier();var hn=this.getRetryPolicy();this.retrier=new Y.Retrier(hn),this.retrier.once("attempt",function(){var T,st;null===(T=_t.retrier)||void 0===T||T.on("attempt",function(){return _t.emit("attempt")}),null===(st=_t.retrier)||void 0===st||st.failed(new Error("Skipping first attempt"))}),this.retrier.on("failed",function(T){return _t.emit("failed",T)}),this.usedBackoff=this.newBackoff,this.newBackoff=null,this.retrier.start()}}]),bt}(De);var mi=function(zt){H.default(bt,zt);var It,en=function Wn(zt){var en=function $n(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t,hn){var T;Le.default(this,bt),T=en.call(this),W.default(Ne.default(T),"disconnectingTimer",null),W.default(Ne.default(T),"disconnectedPromiseResolve",null),W.default(Ne.default(T),"terminalStates",["disconnected","rejected"]),W.default(Ne.default(T),"tokenExpiredSasCode",20104),W.default(Ne.default(T),"terminationReason","Connection is not initialized"),T.websocket=It,T.websocket.on("connected",function(){return T.fsm.socketConnected()}),T.websocket.on("disconnected",function(){return T.fsm.socketClosed()}),T.websocket.on("message",function(Z){return T.onIncomingMessage(Z)}),T.websocket.on("socketError",function(Z){return T.emit("connectionError",{terminal:!1,message:"Socket error: ".concat(Z.message),httpStatusCode:null,errorCode:null})}),T.transport=_t,T.config=hn,T.retrier=new Ht(hn.retryPolicy),T.retrier.on("attempt",function(){return T.retry()}),T.retrier.on("failed",function(Z){bn.warn("Retrying failed: ".concat(Z.message)),T.disconnect()}),typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",function(){bn.debug("Browser reported connectivity state: online"),T.resetBackoff(),T.fsm.systemOnline()}),window.addEventListener("offline",function(){bn.debug("Browser reported connectivity state: offline"),T.websocket.close(),T.fsm.socketClosed()}));var st=it.factory({init:"disconnected",transitions:[{name:"userConnect",from:["disconnected","rejected"],to:"connecting"},{name:"userConnect",from:["connecting","connected"]},{name:"userDisconnect",from:["connecting","initialising","connected","updating","retrying","rejected","waitSocketClosed","waitOffloadSocketClosed"],to:"disconnecting"},{name:"userRetry",from:["retrying"],to:"connecting"},{name:"socketConnected",from:["connecting"],to:"initialising"},{name:"socketClosed",from:["connecting","initialising","connected","updating","error","waitOffloadSocketClosed"],to:"retrying"},{name:"socketClosed",from:["disconnecting"],to:"disconnected"},{name:"socketClosed",from:["waitSocketClosed"],to:"disconnected"},{name:"socketClosed",from:["rejected"],to:"rejected"},{name:"initSuccess",from:["initialising"],to:"connected"},{name:"initError",from:["initialising"],to:"error"},{name:"tokenRejected",from:["initialising","updating"],to:"rejected"},{name:"protocolError",from:["initialising","connected","updating"],to:"error"},{name:"receiveClose",from:["initialising","connected","updating"],to:"waitSocketClosed"},{name:"receiveOffload",from:["initialising","connected","updating"],to:"waitOffloadSocketClosed"},{name:"unsupportedProtocol",from:["initialising","connected","updating"],to:"unsupported"},{name:"receiveFatalClose",from:["initialising","connected","updating"],to:"unsupported"},{name:"userUpdateToken",from:["disconnected","rejected","connecting","retrying"],to:"connecting"},{name:"userUpdateToken",from:["connected"],to:"updating"},{name:"updateSuccess",from:["updating"],to:"connected"},{name:"updateError",from:["updating"],to:"error"},{name:"userSend",from:["connected"],to:"connected"},{name:"systemOnline",from:["retrying"],to:"connecting"}],methods:{onConnecting:function(){T.setupSocket(),T.emit("connecting")},onEnterInitialising:function(){T.sendInit()},onLeaveInitialising:function(){T.cancelInit()},onEnterUpdating:function(){T.sendUpdate()},onLeaveUpdating:function(){T.cancelUpdate()},onEnterRetrying:function(){T.initRetry(),T.emit("connecting")},onEnterConnected:function(){T.resetBackoff(),T.onConnected()},onUserUpdateToken:function(){T.resetBackoff()},onTokenRejected:function(){T.resetBackoff(),T.closeSocket(!0),T.finalizeSocket()},onUserDisconnect:function(){T.closeSocket(!0)},onEnterDisconnecting:function(){T.startDisconnectTimer()},onLeaveDisconnecting:function(){T.cancelDisconnectTimer()},onEnterWaitSocketClosed:function(){T.startDisconnectTimer()},onLeaveWaitSocketClosed:function(){T.cancelDisconnectTimer()},onEnterWaitOffloadSocketClosed:function(){T.startDisconnectTimer()},onLeaveWaitOffloadSocketClosed:function(){T.cancelDisconnectTimer()},onDisconnected:function(){T.resetBackoff(),T.finalizeSocket()},onReceiveClose:function(){T.onCloseReceived()},onReceiveOffload:function(wt,Vt){bn.debug("onreceiveoffload: ",Vt),T.modifyBackoff(Vt.body),T.onCloseReceived()},onUnsupported:function(){T.closeSocket(!0),T.finalizeSocket()},onError:function(wt,Vt){T.closeSocket(Vt),T.finalizeSocket()},onEnterState:function(wt){"none"!==wt.from&&T.changeState(wt)},onInvalidTransition:function(wt,Vt,Sr){bn.warn("FSM: unexpected transition",Vt,Sr)}}});return T.fsm=new st,T}return Ve.default(bt,[{key:"changeState",value:function(_t){bn.debug("FSM: ".concat(_t.transition,": ").concat(_t.from," --\x3e ").concat(_t.to)),this.lastEmittedState!==this.state&&(this.lastEmittedState=this.state,this.emit
1("stateChanged",this.state))}},{key:"resetBackoff",value:function(){bn.trace("resetBackoff"),this.retrier.stop()}},{key:"modifyBackoff",value:function(_t){bn.trace("modifyBackoff",_t);var hn=_t?_t.backoff_policy:null;hn&&"number"==typeof hn.reconnect_min_ms&&this.retrier.modifyBackoff(hn.reconnect_min_ms)}},{key:"startDisconnectTimer",value:function(){var _t=this;bn.trace("startDisconnectTimer"),this.disconnectingTimer&&(clearTimeout(this.disconnectingTimer),this.disconnectingTimer=null),this.disconnectingTimer=setTimeout(function(){bn.debug("disconnecting is timed out"),_t.closeSocket(!0)},3e3)}},{key:"cancelDisconnectTimer",value:function(){bn.trace("cancelDisconnectTimer"),this.disconnectingTimer&&(clearTimeout(this.disconnectingTimer),this.disconnectingTimer=null)}},{key:"isConnected",get:function(){return"connected"===this.state&&this.websocket.isConnected}},{key:"state",get:function(){switch(this.fsm.state){case"connecting":case"initialising":case"retrying":case"error":return"connecting";case"updating":case"connected":return"connected";case"rejected":return"denied";case"disconnecting":case"waitSocketClosed":case"waitOffloadSocketClosed":return"disconnecting";default:return"disconnected"}}},{key:"initRetry",value:function(){bn.debug("initRetry"),this.retrier.inProgress?this.retrier.attemptFailed():this.retrier.start()}},{key:"retry",value:function(){"connecting"!=this.fsm.state?(bn.trace("retry"),this.websocket.close(),this.fsm.userRetry()):bn.trace("can\t retry as already connecting")}},{key:"onConnected",value:function(){this.emit("connected")}},{key:"finalizeSocket",value:function(){bn.trace("finalizeSocket"),this.websocket.close(),this.emit("disconnected"),this.disconnectedPromiseResolve&&(this.disconnectedPromiseResolve(),this.disconnectedPromiseResolve=null)}},{key:"setupSocket",value:function(){bn.trace("setupSocket:",this.config.token),this.emit("beforeConnect"),this.websocket.connect()}},{key:"onIncomingMessage",value:function(_t){var hn=Tn.parse(_t);if(hn){var T=hn.method,st=hn.header,Z=hn.payload;if("reply"!==T&&this.confirmReceiving(st),"notification"===T)this.emit("message",st.message_type,Z);else if("reply"===st.method)this.transport.processReply({id:st.id,status:st.status,header:st,body:Z});else if("client_update"===st.method)"token_about_to_expire"===st.client_update_type&&this.emit("tokenAboutToExpire");else if("close"===st.method)if(308===st.status.code)bn.debug("Connection has been offloaded"),this.fsm.receiveOffload({status:st.status.status,body:Z});else if(406===st.status.code){var wt="Server closed connection because can't parse protocol: ".concat(JSON.stringify(st.status));this.emitReplyConnectionError(wt,st,!0),bn.error(wt),this.fsm.receiveFatalClose()}else 417===st.status.code?(bn.error("Server closed connection because can't parse client reply: ".concat(JSON.stringify(st.status))),this.fsm.receiveFatalClose(st.status.status)):410===st.status.code?(bn.warn("Server closed connection: ".concat(JSON.stringify(st.status))),this.fsm.receiveClose(st.status.status),this.emit("tokenExpired")):401===st.status.code?(bn.error("Server closed connection: ".concat(JSON.stringify(st.status))),this.fsm.receiveClose(st.status.status)):(bn.warn("unexpected message: ",st.status),this.fsm.receiveOffload({status:st.status.status,body:null}))}}},{key:"sendInit",value:(It=ae.default(We.default.mark(function hn(){var T,st;return We.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return bn.trace("sendInit"),wt.prev=1,this.emit("beforeSendInit"),wt.next=5,this.transport.sendInit();case 5:this.config.updateContinuationToken((T=wt.sent).continuationToken),this.config.confirmedCapabilities=T.confirmedCapabilities,this.fsm.initSuccess(T),this.emit("initialized",T),this.emit("tokenUpdated"),wt.next=17;break;case 13:wt.prev=13,wt.t0=wt.catch(1),wt.t0 instanceof Er?(st=!1,bn.warn("Init rejected by server: ".concat(JSON.stringify(wt.t0.reply.status))),this.emit("sendInitFailed"),401===wt.t0.reply.status.code||403===wt.t0.reply.status.code?(st=!0,this.fsm.tokenRejected(wt.t0.reply.status),wt.t0.reply.status.errorCode===this.tokenExpiredSasCode&&this.emit
1("tokenExpired")):429===wt.t0.reply.status.code?(this.modifyBackoff(wt.t0.reply.body),this.fsm.initError(!0)):this.fsm.initError(500!==wt.t0.reply.status.code),this.emitReplyConnectionError(wt.t0.message,wt.t0.reply,st)):(this.terminationReason=wt.t0.message,this.emit("connectionError",{terminal:!0,message:"Unknown error during connection initialisation: ".concat(wt.t0.message,"\n").concat(JSON.stringify(wt.t0,null,2)),httpStatusCode:null,errorCode:null}),this.fsm.initError(!0)),this.emit("tokenUpdated",wt.t0);case 17:case"end":return wt.stop()}},hn,this,[[1,13]])})),function _t(){return It.apply(this,arguments)})},{key:"sendUpdate",value:function(){var It=ae.default(We.default.mark(function hn(){var T,Z;return We.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return bn.trace("sendUpdate"),T=new sr(this.config.token),Vt.prev=2,Vt.next=5,this.transport.sendWithReply(T);case 5:this.fsm.updateSuccess(Vt.sent.body),this.emit("tokenUpdated"),Vt.next=14;break;case 10:Vt.prev=10,Vt.t0=Vt.catch(2),Vt.t0 instanceof Er?(Z=!1,bn.warn("Token update rejected by server: ".concat(JSON.stringify(Vt.t0.reply.status))),401===Vt.t0.reply.status.code||403===Vt.t0.reply.status.code?(Z=!0,this.fsm.tokenRejected(Vt.t0.reply.status),Vt.t0.reply.status.errorCode===this.tokenExpiredSasCode&&this.emit("tokenExpired")):429===Vt.t0.reply.status.code?(this.modifyBackoff(Vt.t0.reply.body),this.fsm.updateError(Vt.t0.reply.status)):this.fsm.updateError(Vt.t0.reply.status),this.emitReplyConnectionError(Vt.t0.message,Vt.t0.reply,Z)):(this.emit("error",!1,Vt.t0.message,null,null),this.fsm.updateError(Vt.t0)),this.emit("tokenUpdated",Vt.t0);case 14:case"end":return Vt.stop()}},hn,this,[[2,10]])}));return function _t(){return It.apply(this,arguments)}}()},{key:"emitReplyConnectionError",value:function(_t,hn,T){var st=hn.status&&hn.status.description?hn.status.description:_t,Z=hn.status.code,wt=hn.status&&hn.status.errorCode?hn.status.errorCode:null;T&&(this.terminationReason=st),this.emit("connectionError",{terminal:T,message:"Connection error: ".concat(st),httpStatusCode:Z,errorCode:wt})}},{key:"cancelInit",value:function(){bn.trace("cancelInit")}},{key:"cancelUpdate",value:function(){bn.trace("cancelUpdate")}},{key:"confirmReceiving",value:function(_t){bn.trace("confirmReceiving");try{this.transport.send(new Xt(_t.id))}catch(hn){bn.debug("failed to confirm packet receiving",hn)}}},{key:"closeSocket",value:function(_t){var hn=this;bn.trace("closeSocket (graceful: ".concat(_t,")")),_t&&this.transport.isConnected&&this.transport.sendClose(),this.websocket.close(),function wr(zt){setTimeout(zt,0)}(function(){return hn.fsm.socketClosed()})}},{key:"connect",value:function(){bn.trace("connect"),this.fsm.userConnect()}},{key:"disconnect",value:function(){var _t=this;return bn.trace("disconnect"),this.fsm.is("disconnected")?Promise.resolve():new Promise(function(hn){_t.disconnectedPromiseResolve=hn,_t.fsm.userDisconnect()})}},{key:"updateToken",value:function(_t){var hn=this;return bn.trace("updateToken:",_t),new Promise(function(T,st){hn.once("tokenUpdated",function(Z){Z?st(Z):T()}),hn.fsm.userUpdateToken()})}},{key:"isTerminalState",get:function(){return-1!==this.terminalStates.indexOf(this.fsm.state)}},{key:"getTerminationReason",get:function(){return this.terminationReason}},{key:"onCloseReceived",value:function(){this.websocket.close()}}]),bt}(De),di=function(){function zt(){Le.default(this,zt)}return Ve.default(zt,null,[{key:"getMetadata",value:function(bt){var It,_t,hn,T,st,Z,wt,Vt,Sr=bt&&bt.clientMetadata?bt.clientMetadata:{},Rt={env:null!==(It=se.name)&&void 0!==It?It:"unknown",envv:null!==(_t=se.version)&&void 0!==_t?_t:"unknown",os:null!==(hn=null===(T=se.os)||void 0===T?void 0:T.family)&&void 0!==hn?hn:"unknown",osv:null!==(st=null===(Z=se.os)||void 0===Z?void 0:Z.version)&&void 0!==st?st:"unknown",osa:null!==(wt=null===(Vt=se.os)||void 0===Vt?void 0:Vt.architecture)&&void 0!==wt?wt:"unknown",sdk:"js-default"},Ee={};return["ver","env","envv","os","osv","osa","type","sdk","sdkv","dev","devv","devt","app","appv"].filter(function(U){return U in Sr||U in Rt}
1).forEach(function(U){return Ee[U]=U in Sr?Sr[U]:Rt[U]}),Ee}}]),zt}(),Ln=function(){function zt(en,bt){var It=this;Le.default(this,zt),this.config=bt,this.activeRequests=new Map,this.channel=en,this.channel.on("reply",function(_t){return It.processReply(_t)}),this.channel.on("disconnected",function(){It.activeRequests.forEach(function(_t){clearTimeout(_t.timeout),_t.reject(new tr("disconnected"))}),It.activeRequests.clear()})}return Ve.default(zt,[{key:"isConnected",get:function(){return this.channel.isConnected}},{key:"processReply",value:function(bt){var It=this.activeRequests.get(bt.id);It&&(clearTimeout(It.timeout),this.activeRequests.delete(bt.id),function Qt(zt){return zt>=200&&zt<300}(bt.status.code)?It.resolve(bt):(It.reject(new Er("Transport failure: "+bt.status.status,bt)),bn.trace("message rejected")))}},{key:"storeRequest",value:function(bt,It,_t){var hn={resolve:It,reject:_t,timeout:setTimeout(function(){bn.trace("request",bt,"is timed out"),_t(new tr("Twilsock: request timeout: "+bt))},3e4)};this.activeRequests.set(bt,hn)}},{key:"shutdown",value:function(){this.activeRequests.forEach(function(bt){clearTimeout(bt.timeout),bt.reject(new tr("Twilsock: request cancelled by user"))}),this.activeRequests.clear()}},{key:"sendInit",value:(en=ae.default(We.default.mark(function It(){var _t,hn,T;return We.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return bn.trace("sendInit"),_t=di.getMetadata(this.config),hn=new Vr(this.config.token,this.config.continuationToken,_t,this.config.initRegistrations,this.config.tweaks),Z.next=5,this.sendWithReply(hn);case 5:return Z.abrupt("return",new Nr((T=Z.sent).id,T.header.continuation_token,new Set(T.header.capabilities),T.header.continuation_token_status,T.header.offline_storage,T.header.init_registrations,T.header.debug_info));case 7:case"end":return Z.stop()}},It,this)})),function bt(){return en.apply(this,arguments)})},{key:"sendClose",value:function(){var bt=new vn;this.send(bt)}},{key:"sendWithReply",value:function(bt,It){var _t=this;return new Promise(function(hn,T){var st=_t.send(bt,It);_t.storeRequest(st,hn,T)})}},{key:"send",value:function(bt,It){bt.id=bt.id||"TM".concat(we.v4());var _t=Tn.createPacket(bt,function _n(zt){switch(At.default(zt)){case"undefined":return"";case"object":return JSON.stringify(zt);default:return zt}}(It));try{return this.channel.send(_t),bt.id}catch(hn){throw bn.debug("failed to send ",bt,hn),bn.trace(hn.stack),hn}}}]),zt;var en}();var si=function(zt){H.default(bt,zt);var en=function Cn(zt){var en=function kr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){var _t;return Le.default(this,bt),_t=en.call(this),W.default(Ne.default(_t),"socket",null),_t.url=It,_t.url=It,_t.WebSocket=i.WebSocket||i.MozWebSocket||{},_t}return Ve.default(bt,[{key:"isConnected",get:function(){return!!this.socket&&1===this.socket.readyState}},{key:"connect",value:function(){var hn,_t=this;bn.trace("connecting to socket");try{hn=new this.WebSocket(this.url)}catch(T){return bn.debug("Socket error: ".concat(this.url)),void this.emit("socketError",T)}hn.binaryType="arraybuffer",hn.onopen=function(){bn.debug("socket opened ".concat(_t.url)),_t.emit("connected")},hn.onclose=function(T){bn.debug("socket closed",T),_t.emit("disconnected",T)},hn.onerror=function(T){bn.debug("Socket error:",T),_t.emit("socketError",T)},hn.onmessage=function(T){_t.emit("message",T.data)},this.socket=hn}},{key:"send",value:function(_t){return this.socket&&this.socket.send(_t)}},{key:"close",value:function(){if(bn.trace("closing socket"),this.socket){this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null;try{this.socket.close()}finally{}}}}]),bt}(De);var yi=function(zt){H.default(bt,zt);var It,en=function oi(zt){var en=function Ii(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){var _t;return Le.default(this,bt),(_t=en.call(this)).transport=It,_t.registrations=new Map,_t.registrationsInProgress=new Map,_t}return Ve.default(bt,[{key:"putNotificationContext",value:(It=ae.default(We.default.mark(function hn(T,st){var Z;return We.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Z={method:"put_notification_ctx",notification_ctx_id:T},Vt.next=3,this.transport.sendWithReply(Z,st);case 3:case"end":return Vt.stop()}},hn,this)})),function _t(hn,T){return It.apply(this,arguments)})},{key:"deleteNotificationContext",value:function(){var It=ae.default(We.default.mark(function hn(T){var st;return We.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return st={method:"delete_notification_ctx",notification_ctx_id:T},wt.next=3,this.transport.sendWithReply(st);case 3:case"end":return wt.stop()}},hn,this)}));return function _t(hn){return It.apply(this,arguments)}}()},{key:"updateRegistration",value:function(){var It=ae.default(We.default.mark(function hn(T,st){var Z,wt;return We.default.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return bn.debug("update registration for context",T),(Z=this.registrationsInProgress.get(T))||this.registrationsInProgress.set(T,Z=new Set),wt=we.v4(),Z.add(wt),Sr.prev=5,Sr.next=8,this.putNotificationContext(T,st);
1case 8:bn.debug("registration attempt succeeded for context",st),Z.delete(wt),0===Z.size&&(this.registrationsInProgress.delete(T),this.emit("registered",T)),Sr.next=19;break;case 13:Sr.prev=13,Sr.t0=Sr.catch(5),bn.warn("registration attempt failed for context",st),bn.debug(Sr.t0),Z.delete(wt),0===Z.size&&(this.registrationsInProgress.delete(T),this.emit("registrationFailed",T,Sr.t0));case 19:case"end":return Sr.stop()}},hn,this,[[5,13]])}));return function _t(hn,T){return It.apply(this,arguments)}}()},{key:"updateRegistrations",value:function(){var It=ae.default(We.default.mark(function hn(){var st,T=this;return We.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return bn.trace("refreshing ".concat(this.registrations.size," registrations")),st=[],this.registrations.forEach(function(Vt,Sr){st.push(T.updateRegistration(Sr,Vt))}),wt.next=5,Promise.all(st);case 5:case"end":return wt.stop()}},hn,this)}));return function _t(){return It.apply(this,arguments)}}()},{key:"setNotificationsContext",value:function(){var It=ae.default(We.default.mark(function hn(T,st){return We.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(T&&st){wt.next=2;break}throw new tr("Invalid arguments provided");case 2:return this.registrations.set(T,st),wt.next=5,this.updateRegistration(T,st);case 5:return wt.abrupt("return",wt.sent);case 6:case"end":return wt.stop()}},hn,this)}));return function _t(hn,T){return It.apply(this,arguments)}}()},{key:"removeNotificationsContext",value:function(){var It=ae.default(We.default.mark(function hn(T){return We.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(this.registrations.has(T)){Z.next=2;break}return Z.abrupt("return");case 2:return Z.next=4,this.deleteNotificationContext(T);case 4:this.transport.isConnected&&this.registrations.delete(T);case 5:case"end":return Z.stop()}},hn,this)}));return function _t(hn){return It.apply(this,arguments)}}()}]),bt}(De);var me=function(zt){H.default(bt,zt);var en=function on(zt){var en=function le(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t,hn){var T;
1return Le.default(this,bt),(T=en.call(this,_t)).status=It,T.description=_t,T.body=hn,T}return bt}(tr);var ln=function(zt){H.default(bt,zt);var en=function Re(zt){var en=function Pt(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It){return Le.default(this,bt),en.call(this,It)}return bt}(tr);function Mn(zt){return zt>=200&&zt<300}function br(zt){return zt&&zt.header&&zt.header.http_status}function jr(zt,en){var bt=function Br(zt){var en=zt.match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)(\/[^?#]*)(\?[^#]*|)(#.*|)$/);if(en){var bt={protocol:en[1],host:en[2],hostname:en[3],port:en[4],pathname:en[5],search:en[6],hash:en[7],params:{}};if(bt.search.length>0){var It=bt.search.substring(1);bt.params=It.split("&").map(function(_t){return _t.split("=")}).reduce(function(_t,hn){return _t.hasOwnProperty(hn[0])?Array.isArray(_t[hn[0]])?_t[hn[0]].push(hn[1]):_t[hn[0]]=[_t[hn[0]],hn[1]]:_t[hn[0]]=hn[1],_t},{})}return bt}throw new tr("Incorrect URI: "+zt)}(en),It={method:zt,host:bt.host,path:bt.pathname};return bt.params&&(It.params=bt.params),It}var Xe=function(){function zt(en,bt,It){Le.default(this,zt),this.config=It,this.transport=en,this.pendingMessages=[],this.twilsock=bt}return Ve.default(zt,[{key:"saveMessage",value:function(bt){var It=this;return new Promise(function(_t,hn){var T={message:bt,resolve:_t,reject:hn,alreadyRejected:!1,timeout:setTimeout(function(){bn.debug("request is timed out"),hn(new tr("request '".concat(bt.to.method,"' to '").concat(bt.to.host,"' timed out"))),T.alreadyRejected=!0},2e4)};It.pendingMessages.push(T)})}},{key:"sendPendingMessages",value:function(){for(var bt=this,It=function(){var T=bt.pendingMessages[0];if(!T.alreadyRejected)try{bt.actualSend(T.message).then(function(Z){return T.resolve(Z)}).catch(function(Z){return T.reject(Z)}),clearTimeout(T.timeout)}catch(Z){return bn.debug("Failed to send pending message",Z),"break"}bt.pendingMessages.splice(0,1)};this.pendingMessages.length>0&&"break"!==It(););}},{key:"rejectPendingMessages",value:function(){var bt=this;this.pendingMessages.forEach(function(It){It.reject(new ln("Unable to connect: "+bt.twilsock.getTerminationReason)),It.alreadyRejected=!0,clearTimeout(It.timeout)}),this.pendingMessages.splice(0,this.pendingMessages.length)}},{key:"actualSend",value:(en=ae.default(We.default.mark(function It(_t){var hn,T,st,Z,wt,Sr,St;return We.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Z=_t.body,wt=null!==(hn=_t.grant)&&void 0!==hn?hn:this.config.activeGrant,Sr=new sn(wt,(st=_t.headers)["Content-Type"]||"application/json",{host:(T=_t.to).host,path:T.path,method:T.method,params:T.params,headers:st}),bn.trace("Sending upstream message",Sr),Ee.next=9,this.transport.sendWithReply(Sr,Z);case 9:if(bn.trace("Received upstream message response",St=Ee.sent),!br(St)||Mn(St.header.http_status.code)){Ee.next=13;break}throw new me(St.header.http_status.code,St.header.http_status.status,St.body);case 13:return Ee.abrupt("return",{status:St.header.http_status,headers:St.header.http_headers,body:St.body});case 14:case"end":return Ee.stop()}},It,this)})),function bt(It){return en.apply(this,arguments)})},{key:"send",value:function(bt,It){var _t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hn=arguments.length>3?arguments[3]:void 0,T=arguments.length>4?arguments[4]:void 0;if(this.twilsock.isTerminalState)return Promise.reject(new ln("Unable to connect: "+this.twilsock.getTerminationReason));var st=function gn(zt,en,bt,It,_t){return{to:jr(zt,en),headers:bt,body:It,grant:_t}}(bt,It,_t,hn,T);return this.twilsock.isConnected?this.actualSend(st):this.saveMessage(st)}}]),zt;var en}(),Tt=function(){function zt(){var en=this;Le.default(this,zt),this._promise=new Promise(function(bt,It){en._resolve=bt,en._reject=It})}return Ve.default(zt,[{key:"promise",get:function(){return this._promise}},{key:"update",value:function(bt){this._resolve(bt)}},{key:"set",value:function(bt){this._resolve(bt)}},{key:"fail",value:function(bt){this._reject(bt)}}]),zt}(),An=function(){function zt(en){Le.default(this,zt),this.id=en}return Ve.default(zt,null,[{key:"create",value:function(bt){if(bt instanceof Object&&"storage_id"in bt)return new zt(bt.storage_id);throw new tr('Field "storage_id" is missing')}}]),zt}(),Nn=function(){function zt(){return Le.default(this,zt),W.default(this,"initializedFlag","twilio_twilsock_token_storage"),W.default(this,"tokenStoragePrefix","twilio_continuation_token_"),zt._instance||(this.initialize(),zt._instance=this),zt._instance}return Ve.default(zt,[{key:"sessionStorage",value:function(){try{return i.sessionStorage}catch{return null}}},{key:"window",value:function(){try{return i.window}catch{return null}}},{key:"storeToken",value:function(bt,It){this.canStore()&&this.sessionStorage.setItem(this.getKeyName(It),bt)}},{key:"getStoredToken",value:function(bt){return this.canStore()?this.sessionStorage.getItem(this.getKeyName(bt)):null}},{key:"initialize",value:function(){var bt=this;if(this.canStore()){this.sessionStorage.getItem(this.initializedFlag)&&this.clear(),this.sessionStorage.setItem(this.initializedFlag,"true");var _t=this.sessionStorage.removeItem;this.window.addEventListener("unload",function(){_t(bt.initializedFlag)})}}},{key:"clear",value:function(){if(this.canStore()){for(var bt=[],It=0;It<this.sessionStorage.length;It++){var _t=this.sessionStorage.key(It);_t&&0===_t.indexOf(this.tokenStoragePrefix)&&bt.push(_t)}var hn=this.sessionStorage.removeItem;bt.forEach(function(T){return hn(T)}),hn(this.initializedFlag)}}},{key:"getKeyName",value:function(bt){return"".concat(this.tokenStoragePrefix).concat(bt)}},{key:"canStore",value:function(){return!!(this.sessionStorage&&this.sessionStorage.length&&this.window)}}]),zt}();W.default(Nn,"_instance",null);var zt,ir=new Nn,pr=function(){function zt(en,bt,It,_t,hn,T){Le.default(this,zt),this.title=en,this.details=bt,this.start=It,this.type=hn,this.id=T,this.end=_t}return Ve.default(zt,[{key:"toTelemetryEvent",value:function(){var bt=new Date,It=this.start,_t=this.end?this.end:bt;if(_t<It){var hn=_t;_t=It,It=hn}
1var T=It.getTime()-bt.getTime(),st=_t.getTime()-bt.getTime();return new Mt(T,st,this.title,this.details,this.id,this.type)}}]),zt}();G.TelemetryPoint=void 0,(zt=G.TelemetryPoint||(G.TelemetryPoint={}))[zt.Start=0]="Start",zt[zt.End=1]="End",G.EventSendingLimitation=void 0,function(zt){zt[zt.MinEventsPortion=0]="MinEventsPortion",zt[zt.AnyEvents=1]="AnyEvents",zt[zt.AnyEventsIncludingUnfinished=2]="AnyEventsIncludingUnfinished"}(G.EventSendingLimitation||(G.EventSendingLimitation={}));var Tr=function(){function zt(en,bt){Le.default(this,zt),W.default(this,"minEventsPortionToSend",50),W.default(this,"maxEventsPortionToSend",100),W.default(this,"pendingEvents",new Map),W.default(this,"readyEvents",[]),W.default(this,"hasInitializationFinished",!1),W.default(this,"_canSendTelemetry",!1),this.config=en,this.packetInterface=bt}return Ve.default(zt,[{key:"isTelemetryEnabled",get:function(){return this.config.confirmedCapabilities.has("telemetry.v1")}},{key:"canSendTelemetry",get:function(){return this._canSendTelemetry&&this.isTelemetryEnabled},set:function(bt){bn.debug("TelemetryTracker.canSendTelemetry: ".concat(bt," TelemetryTracker.isTelemetryEnabled: ").concat(this.isTelemetryEnabled)),this._canSendTelemetry&&!bt&&(this.pendingEvents.clear(),this.readyEvents=[]),this._canSendTelemetry=bt,bt&&this.sendTelemetry(G.EventSendingLimitation.AnyEvents),bt&&!this.hasInitializationFinished&&(this.hasInitializationFinished=!0)}},{key:"addTelemetryEvent",value:function(bt){!this.canSendTelemetry&&this.hasInitializationFinished||this.readyEvents.push(bt)}},{key:"addPartialEvent",value:function(bt,It,_t){bn.debug("Adding ".concat(_t===G.TelemetryPoint.Start?"starting":"ending"," timepoint for '").concat(It,"' event"));var hn=this.pendingEvents.has(It);if(_t===G.TelemetryPoint.Start)hn&&bn.debug("Overwriting starting point for '".concat(It,"' event")),this.pendingEvents.set(It,bt);else{if(!hn)return void bn.info("Could not find started event for '".concat(It,"' event"));this.addTelemetryEvent(this.merge(this.pendingEvents.get(It),bt)),this.pendingEvents.delete(It)}}},{key:"getTelemetryToSend",value:function(bt){return this.canSendTelemetry&&0!=this.readyEvents.length?bt==G.EventSendingLimitation.MinEventsPortion&&this.readyEvents.length<this.minEventsPortionToSend?[]:this.getTelemetryPortion(bt==G.EventSendingLimitation.AnyEventsIncludingUnfinished):[]}},{key:"getTelemetryPortion",value:function(bt){var It=this,_t=Math.min(this.readyEvents.length,this.maxEventsPortionToSend),hn=this.readyEvents.splice(0,_t);return bt&&hn.length<this.maxEventsPortionToSend&&this.pendingEvents.forEach(function(T,st){if(!(hn.length>=It.maxEventsPortionToSend)){var Z=It.pendingEvents.get(st);It.pendingEvents.delete(st),hn.push(new pr("[UNFINISHED] ".concat(Z.title),Z.details,Z.start,null,Z.type,Z.id))}}),hn}},{key:"merge",value:function(bt,It){return new pr(It.title?It.title:bt.title,It.details?It.details:bt.details,bt.start,It.end,It.type?It.type:bt.type,It.id?It.id:bt.id)}},{key:"sendTelemetryIfMinimalPortionCollected",value:function(){this.sendTelemetry(G.EventSendingLimitation.MinEventsPortion)}},{key:"sendTelemetry",value:function(bt){var It=this.getTelemetryToSend(bt);if(0!==It.length)try{this.packetInterface.send(new Ze(It.map(function(_t){return _t.toTelemetryEvent()})))}catch(_t){bn.debug("Error while sending ".concat(It.length," telemetry events due to ").concat(_t,"; they will be resubmitted")),this.readyEvents=this.readyEvents.concat(It)}}}]),zt}();var ri=function zt(){Le.default(this,zt)};W.default(ri,"TWILSOCK_CONNECT","twilsock.sdk.connect"),W.default(ri,"TWILSOCK_INIT","twilsock.sdk.init"),G.TwilsockClient=function(zt){H.default(bt,zt);var It,en=function Gr(zt){var en=function qr(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var _t,It=ye.default(zt);if(en){var hn=ye.default(this).constructor;_t=Reflect.construct(It,arguments,hn)}else _t=It.apply(this,arguments);return j.default(this,_t)}}(bt);function bt(It,_t,hn){var T;Le.default(this,bt),T=en.call(this),W.default(Ne.default(T),"version","0.12.2"),W.default(Ne.default(T),"offlineStorageDeferred",new Tt),hn.continuationToken=hn.continuationToken?hn.continuationToken:ir.getStoredToken(_t);var st=T.config=new Fn(It,_t,hn);bn.setLevel(st.logLevel);var Z=new si(st.url),wt=new Ln(Z,st);return T.channel=new mi(Z,wt,st),T.registrations=new yi(wt),T.upstream=new Xe(wt,T.channel,st),T.telemetryTracker=new Tr(st,wt),T.channel.on("initialized",function(){return T.telemetryTracker.canSendTelemetry=!0}),Z.on("disconnected",function(){return T.telemetryTracker.canSendTelemetry=!1}),T.registrations.on("registered",function(Vt){return T.emit("registered",Vt)}),T.channel.on("message",function(Vt,Sr){return setTimeout(function(){return T.emit("message",Vt,Sr)},0)}),T.channel.on("stateChanged",function(Vt){return setTimeout(function(){return T.emit("stateChanged",Vt)},0)}),T.channel.on("connectionError",function(Vt){return setTimeout(function(){return T.emit("connectionError",Vt)},0)}),T.channel.on("tokenAboutToExpire",function(){return setTimeout(function(){return T.emit("tokenAboutToExpire")},0)}),T.channel.on("tokenExpired",function(){return setTimeout(function(){return T.emit("tokenExpired")},0)}),T.channel.on("connected",function(){return T.registrations.updateRegistrations()}),T.channel.on("connected",function(){return T.upstream.sendPendingMessages()}),T.channel.on("connected",function(){return setTimeout(function(){return T.emit("connected")},0)}),T.channel.on("beforeConnect",function(){return T.telemetryTracker.addPartialEvent(new pr("Establish WebSocket connection","",new Date),ri.TWILSOCK_CONNECT,G.TelemetryPoint.Start)}),T.channel.on("connected",function(){return T.telemetryTracker.addPartialEvent(new pr("Establish WebSocket connection","",new Date,new Date),ri.TWILSOCK_CONNECT,G.TelemetryPoint.End)}),T.channel.on("beforeSendInit",function(){return T.telemetryTracker.addPartialEvent(new pr("Send Twilsock init","",new Date),ri.TWILSOCK_INIT,G.TelemetryPoint.Start)}),T.channel.on("initialized",function(){return T.telemetryTracker.addPartialEvent(new pr("Send Twilsock init","Succeeded",new Date,new Date),ri.TWILSOCK_INIT,G.TelemetryPoint.End)}),T.channel.on("sendInitFailed",function(){return T.telemetryTracker.addPartialEvent(new pr("Send Twilsock init","Failed",new Date,new Date),ri.TWILSOCK_INIT,G.TelemetryPoint.End)}),T.channel.on("initialized",function(Vt){T.handleStorageId(_t,Vt),ir.storeToken(Vt.continuationToken,_t),setTimeout(function(){return T.emit("initialized",Vt)},0)}),T.channel.on("disconnected",function(){return setTimeout(function(){return T.emit("disconnected")},0)}),T.channel.on("disconnected",function(){return T.upstream.rejectPendingMessages()}),T.channel.on("disconnected",function(){return T.offlineStorageDeferred.fail(new tr("Client disconnected"))}),T.offlineStorageDeferred.promise.catch(function(){}),T}return Ve.default(bt,[{key:"emit",value:function(_t){for(var hn,T=arguments.length,st=ne
1w Array(T>1?T-1:0),Z=1;Z<T;Z++)st[Z-1]=arguments[Z];return bn.debug("Emitting ".concat(_t.toString(),"(").concat(st.map(function(wt){return JSON.stringify(wt)}).join(", "),")")),(hn=Ie.default(ye.default(bt.prototype),"emit",this)).call.apply(hn,[this,_t].concat(st))}},{key:"handleStorageId",value:function(_t,hn){if(hn.offlineStorage)if(hn.offlineStorage.hasOwnProperty(_t))try{this.offlineStorageDeferred.set(An.create(hn.offlineStorage[_t])),bn.debug("Offline storage for '".concat(_t,"' product: ").concat(JSON.stringify(hn.offlineStorage[_t]),"."))}catch(T){this.offlineStorageDeferred.fail(new tr("Failed to parse offline storage for ".concat(_t," ").concat(JSON.stringify(hn.offlineStorage[_t]),". ").concat(T,".")))}else this.offlineStorageDeferred.fail(new tr("No offline storage id for '".concat(_t,"' product: ").concat(JSON.stringify(hn.offlineStorage))));else this.offlineStorageDeferred.fail(new tr("No offline storage id"))}},{key:"storageId",value:function(){return this.offlineStorageDeferred.promise}},{key:"isConnected",get:function(){return this.channel.isConnected}},{key:"state",get:function(){return this.channel.state}},{key:"updateToken",value:(It=ae.default(We.default.mark(function hn(T){return We.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(bn.trace("updating token '".concat(T,"'")),this.config.token!==T){Z.next=3;break}return Z.abrupt("return");case 3:return this.config.updateToken(T),Z.next=6,this.channel.updateToken(T);case 6:return Z.abrupt("return",Z.sent);case 7:case"end":return Z.stop()}},hn,this)})),function _t(hn){return It.apply(this,arguments)})},{key:"setNotificationsContext",value:function(){var It=ae.default(We.default.mark(function hn(T,st){return We.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,this.registrations.setNotificationsContext(T,st);case 2:case"end":return wt.stop()}},hn,this)}));return function _t(hn,T){return It.apply(this,arguments)}}()},{key:"removeNotificationsContext",value:function(){var It=ae.default(We.default.mark(function hn(T){return We.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,this.registrations.removeNotificationsContext(T);case 2:case"end":return Z.stop()}},hn,this)}));return function _t(hn){return It.apply(this,arguments)}}()},{key:"connect",value:function(){return this.channel.connect()}},{key:"disconnect",value:function(){var It=ae.default(We.default.mark(function hn(){return We.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return this.telemetryTracker.sendTelemetry(G.EventSendingLimitation.AnyEventsIncludingUnfinished),st.next=3,this.channel.disconnect();case 3:return st.abrupt("return",st.sent);case 4:case"end":return st.stop()}},hn,this)}));return function _t(){return It.apply(this,arguments)}}()},{key:"get",value:function(){var It=ae.default(We.default.mark(function hn(T,st,Z){return We.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return this.telemetryTracker.sendTelemetry(G.EventSendingLimitation.AnyEvents),Vt.next=3,this.upstream.send("GET",T,st,void 0,Z);case 3:return Vt.abrupt("return",Vt.sent);case 4:case"end":return Vt.stop()}},hn,this)}));return function _t(hn,T,st){return It.apply(this,arguments)}}()},{key:"post",value:function(){var It=ae.default(We.default.mark(function hn(T,st,Z,wt){return We.default.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return this.telemetryTracker.sendTelemetry(G.EventSendingLimitation.AnyEvents),Sr.next=3,this.upstream.send("POST",T,st,Z,wt);case 3:return Sr.abrupt("return",Sr.sent);case 4:case"end":return Sr.stop()}},hn,this)}));return function _t(hn,T,st,Z){return It.apply(this,arguments)}}()},{key:"put",value:function(){var It=ae.default(We.default.mark(function hn(T,st,Z,wt){return We.default.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return this.telemetryTracker.sendTelemetry(G.EventSendingLimitation.AnyEvents),Sr.next=3,this.upstream.send("PUT",T,st,Z,wt);case 3:return Sr.abrupt("return",Sr.sent);case 4:case"end":return Sr.stop()}},hn,this)}));return function _t(hn,T,st,Z){return It.apply(this,arguments)}}()},{key:"delete",value:function(){var It=ae.default(We.default.mark(function hn(T,st,Z,wt){return We.default.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return this.telemetryTracker.sendTelemetry(G.EventSendingLimitation.AnyEvents),Sr.next=3,this.upstream.send("DELETE",T,st,Z,wt);case 3:return Sr.abrupt("return",Sr.sent);case 4:case"end":return Sr.stop()}},hn,this)}));return function _t(hn,T,st,Z){return It.apply(this,arguments)}}()},{key:"addTelemetryEvent",value:function(_t){this.telemetryTracker.addTelemetryEvent(_t),this.telemetryTracker.sendTelemetryIfMinimalPortionCollected()}},{key:"addPartialTelemetryEvent",value:function(_t,hn,T){this.telemetryTracker.addPartialEvent(_t,hn,T),T===G.TelemetryPoint.End&&this.telemetryTracker.sendTelemetryIfMinimalPortionCollected()}}]),bt}(De),G.TwilsockClient=function ce(zt,en,bt,It){var T,_t=arguments.length,hn=_t<3?en:null===It?It=Object.getOwnPropertyDescriptor(en,bt):It;if("object"===(typeof Reflect>"u"?"undefined":At.default(Reflect))&&"function"==typeof Reflect.decorate)hn=Reflect.decorate(zt,en,bt,It);else for(var st=zt.length-1;st>=0;st--)(T=zt[st])&&(hn=(_t<3?T(hn):_t>3?T(en,bt,hn):T(en,bt))||hn);return _t>3&&hn&&Object.defineProperty(en,bt,hn),hn}([te.validateConstructorTypes(te.nonEmptyString,te.nonEmptyString,[te.pureObject,"undefined",te.literal(null)]),function K(zt,en){if
1("object"===(typeof Reflect>"u"?"undefined":At.default(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(zt,en)}("design:paramtypes",[String,String,Object])],G.TwilsockClient);var Hr=function(){function zt(en){Le.default(this,zt),this.product=en,this.type="ers",this.notification_protocol_version=0,this.message_types=[]}return Ve.default(zt,[{key:"populateInitRegistrations",value:function(bt){var It=new Set(this.message_types);for(var _t in bt)It.add(bt[_t]);this.message_types=Array.from(It)}}]),zt}();G.InitRegistration=Hr,G.TelemetryEventDescription=pr,G.TelemetryTracker=Tr,G.TransportUnavailableError=ln,G.Twilsock=G.TwilsockClient,G.TwilsockError=tr},59316:(B,G,a)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),a(32928),a(49640),a(29912),a(48928),a(53475),a(35016),a(16968),a(89120),a(29708);var i=a(59848);a(51408),a(97355),a(9456);var v=a(97936);a(91088),a(4248),a(62016);var b=a(25724),_=a(94064),C=a(54216),P=a(96284),S=a(63532);function R(ge){return ge&&"object"==typeof ge&&"default"in ge?ge:{default:ge}}a(32452),a(79628),a(16699);var k=R(i),x=R(v),D=R(b),ee=R(_),te=R(C),J=R(P),Q=R(S),we=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];return{checks:pt}};function Se(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}var Ye=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];return we(function(cn){var rt,mn=!1,dt=[],lt=function de(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function Y(ge,xt){if(ge){if("string"==typeof ge)return Se(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return Se(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}(pt);try{for(lt.s();!(rt=lt.n()).done;){var kt=rt.value;"string"!=typeof kt?(mn=mn||cn instanceof kt,dt.push("an instance of ".concat(kt.name))):(mn=mn||k.default(cn)===kt,dt.push("of type ".concat(kt)))}}catch(an){lt.e(an)}finally{lt.f()}return[mn,dt]})};function Ve(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}var Ie=we(function(ge){return["string"==typeof ge&&ge.length>0,"a non-empty string"]}),H=we(function(ge){return["number"==typeof ge&&Number.isInteger(ge)&&ge>=0,"a non-negative integer"]}),j=we(function(ge){return["object"===k.default(ge)&&null!==ge&&!Array.isArray(ge),"a pure object (non-null and non-array)"]});function W(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function We(ge,xt){if(ge){if("string"==typeof ge)return At(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return At(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}function At(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}var Ut=function(xt,pt){if(pt.length>xt.length)throw new Error("Expected at most ".concat(xt.length," argument(s), but got ").concat(pt.length));for(;pt.length<xt.length;)pt.push(void 0);var cn,rn=W(pt.entries());try{for(rn.s();!(cn=rn.n()).done;){var mn=x.default(cn.value,2),dt=mn[0],rt=Pe(xt[dt],mn[1]),kt=x.default(rt,4),Yn=kt[1],bn=kt[2],Hn=kt[3];if(!kt[0])throw new Error("Argument ".concat(dt+1," is expected to be ").concat(bn).concat(Hn," but got ").concat(Yn))}}catch(On){rn.e(On)}finally{rn.f()}},it=function(xt){var pt,rn,mn;return["undefined","boolean","number","bigint","string"].includes(k.default(xt))&&(rn="string"==typeof xt?'"'.concat(xt,'"'):"".concat(xt)),"object"===k.default(xt)&&"Object"!==(null==xt||null===(pt=xt.constructor)||void 0===pt?void 0:pt.name)&&(rn=null===xt?"null":"instance of ".concat(null==xt||null===(mn=xt.constructor)||void 0===mn?void 0:mn.name)),rn||(rn=k.default(xt)),rn},K=function(xt){var cn,pt=[],rn=W(xt);try{for(rn.s();!(cn=rn.n()).done;)pt.push(_e(cn.value))}catch(dt){rn.e(dt)}finally{rn.f()}return pt},_e=function(xt){var mn,pt=[],cn=W(Array.isArray(xt)?xt:[xt]);try{for(cn.s();!(mn=cn.n()).done;){var dt=mn.value;pt.push("string"!=typeof dt&&"function"!=typeof dt?dt:Ye(dt))}}catch(lt){cn.e(lt)}finally{cn.f()}return pt},Pe=function(xt,pt){var cn,lt,rn=[],mn=!1,dt=W(xt);try{for(dt.s();!(lt=dt.n()).done;){var an,kt=W(lt.value.checks);try{for(kt.s();!(an=kt.n()).done;){var bn=(0,an.value)(pt),Hn=x.default(bn,3),On=Hn[1],gr=Hn[2];mn=mn||Hn[0],!cn&&gr&&(cn=gr),On&&(rn=[].concat(D.default(rn),"string"==typeof On?[On]:D.default(On)))}}catch(ti){kt.e(ti)}finally{kt.f()}}}catch(ti){dt.e(ti)}finally{dt.f()}if(mn)return[!0];var Mr=cn||it(pt),Vr=rn.length-1;return[!1,Mr,Vr>0?"".concat(rn.slice(0,Vr).join(", ")," or ").concat(rn[Vr]):rn.join(", "),Vr>1?";":","]};function Dt(ge,xt){(null==xt||xt>ge.length)&&(xt=ge.length);for(var pt=0,rn=new Array(xt);pt<xt;pt++)rn[pt]=ge[pt];return rn}
1G.array=function(xt,pt){return we(function(rn){if(!Array.isArray(rn))return[!1,"an array of ".concat(xt)];var mn,cn=function ke(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function Lt(ge,xt){if(ge){if("string"==typeof ge)return Dt(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return Dt(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}(rn.entries());try{for(cn.s();!(mn=cn.n()).done;){var dt=x.default(mn.value,2),lt=dt[0],rt=dt[1],kt=Pe(_e(pt),rt),an=x.default(kt,3),bn=an[1],Hn=an[2];
1if(!an[0])return[!1,"a valid array of ".concat(xt," (index ").concat(lt," should be ").concat(Hn,")"),"malformed array of ".concat(xt," (index ").concat(lt," is ").concat(bn,")")]}}catch(Fn){cn.e(Fn)}finally{cn.f()}return[!0]})},G.custom=we,G.literal=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];return we(function(cn){var rt,mn=!1,dt=[],lt=function pe(ge,xt){var pt=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!pt){if(Array.isArray(ge)||(pt=function ae(ge,xt){if(ge){if("string"==typeof ge)return Ve(ge,xt);var pt=Object.prototype.toString.call(ge).slice(8,-1);if("Object"===pt&&ge.constructor&&(pt=ge.constructor.name),"Map"===pt||"Set"===pt)return Array.from(ge);if("Arguments"===pt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pt))return Ve(ge,xt)}}(ge))||xt&&ge&&"number"==typeof ge.length){pt&&(ge=pt);var rn=0,cn=function(){};return{s:cn,n:function(){return rn>=ge.length?{done:!0}:{done:!1,value:ge[rn++]}},e:function(kt){throw kt},f:cn}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var lt,mn=!0,dt=!1;return{s:function(){pt=pt.call(ge)},n:function(){var kt=pt.next();return mn=kt.done,kt},e:function(kt){dt=!0,lt=kt},f:function(){try{!mn&&null!=pt.return&&pt.return()}finally{if(dt)throw lt}}}}(pt);try{for(lt.s();!(rt=lt.n()).done;){var kt=rt.value;mn=mn||cn===kt,dt.push("string"==typeof kt?'"'.concat(kt,'"'):"".concat(kt))}}catch(an){lt.e(an)}finally{lt.f()}return[mn,dt]})},G.nonEmptyString=Ie,G.nonNegativeInteger=H,G.objectSchema=function(xt,pt){return we(function(rn){if("object"!==k.default(rn)||null===rn||Array.isArray(rn))return[!1,"valid ".concat(xt,"
1(should be a pure object)")];for(var cn=0,mn=Object.entries(pt);cn<mn.length;cn++){var dt=x.default(mn[cn],2),lt=dt[0],kt=Pe(_e(dt[1]),rn[lt]),an=x.default(kt,3),bn=an[1],Hn=an[2];if(!an[0])return[!1,"valid ".concat(xt,' (key "').concat(lt,'" should be ').concat(Hn,")"),"malformed ".concat(xt,' (key "').concat(lt,'" is ').concat(bn,")")]}return[!0]})},G.pureObject=j,G.runtimeTypeValidation=Ut,G.stringifyReceivedType=it,G.type=Ye,G.validateConstructorTypes=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];var cn=K(pt);return function(mn){return function(dt){te.default(rt,dt);var lt=function ye(ge){var xt=function Le(){if(typeof Reflect>"u"||!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{return!1}}();return function(){var cn,rn=Q.default(ge);if(xt){var mn=Q.default(this).constructor;cn=Reflect.construct(rn,arguments,mn)}else cn=rn.apply(this,arguments);return J.default(this,cn)}}(rt);function rt(){ee.default(this,rt);for(var kt=arguments.length,an=new Array(kt),Yn=0;Yn<kt;Yn++)an[Yn]=arguments[Yn];return Ut(cn,an),lt.call.apply(lt,[this].concat(an))}return rt}(mn)}},G.validateTypes=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];var cn=K(pt);return function(mn,dt,lt){if("function"!=typeof lt.value)throw new Error("The validateTypes decorator can only be applied to methods");var rt=lt.value;lt.value=function(){for(var kt=arguments.length,an=new Array(kt),Yn=0;Yn<kt;Yn++)an[Yn]=arguments[Yn];return Ut(cn,an),rt.apply(this,an)}}},G.validateTypesAsync=function(){for(var xt=arguments.length,pt=new Array(xt),rn=0;rn<xt;rn++)pt[rn]=arguments[rn];var cn=K(pt);return function(mn,dt,lt){if("function"!=typeof lt.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var rt=lt.value;lt.value=function(){for(var kt=arguments.length,an=new Array(kt),Yn=0;Yn<kt;Yn++)an[Yn]=arguments[Yn];try{Ut(cn,an)}catch(bn){return Promise.reject(bn)}return rt.apply(this,an)}}}},75088:(B,G,a)=>{var i=a(61268),v=a(51028),b=v;b.v1=i,b.v4=v,B.exports=b},83304:B=>{for(var G=[],a=0;a<256;++a)G[a]=(a+256).toString(16).substr(1);B.exports=function i(v,b){var _=b||0;return[G[v[_++]],G[v[_++]],G[v[_++]],G[v[_++]],"-",G[v[_++]],G[v[_++]],"-",G[v[_++]],G[v[_++]],"-",G[v[_++]],G[v[_++]],"-",G[v[_++]],G[v[_++]],G[v[_++]],G[v[_++]],G[v[_++]],G[v[_++]]].join("")}},74848:B=>{var G=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(G){var a=new Uint8Array(16);B.exports=function(){return G(a),a}}else{var i=new Array(16);B.exports=function(){for(var _,b=0;b<16;b++)3&b||(_=4294967296*Math.random()),i[b]=_>>>((3&b)<<3)&255;return i}}},61268:(B,G,a)=>{var b,_,i=a(74848),v=a(83304),C=0,P=0;B.exports=function S(R,k,x){var D=k&&x||0,ee=k||[],te=(R=R||{}).node||b,J=void 0!==R.clockseq?R.clockseq:_;if(null==te||null==J){var Q=i();null==te&&(te=b=[1|Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]]),null==J&&(J=_=16383&(Q[6]<<8|Q[7]))}var we=void 0!==R.msecs?R.msecs:(new Date).getTime(),de=void 0!==R.nsecs?R.nsecs:P+1,Y=we-C+(de-P)/1e4;if(Y<0&&void 0===R.clockseq&&(J=J+1&16383),(Y<0||we>C)&&void 0===R.nsecs&&(de=0),de>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=we,P=de,_=J;var Se=(1e4*(268435455&(we+=122192928e5))+de)%4294967296;ee[D++]=Se>>>24&255,ee[D++]=Se>>>16&255,ee[D++]=Se>>>8&255,ee[D++]=255&Se;var Ye=we/4294967296*1e4&268435455;ee[D++]=Ye>>>8&255,ee[D++]=255&Ye,ee[D++]=Ye>>>24&15|16,ee[D++]=Ye>>>16&255,ee[D++]=J>>>8|128,ee[D++]=255&J;for(var pe=0;pe<6;++pe)ee[D+pe]=te[pe];return k||v(ee)}},51028:(B,G,a)=>{var i=a(74848),v=a(83304);B.exports=function b(_,C,P){var S=C&&P||0;"string"==typeof _&&(C="binary"===_?new Array(16):null,_=null);var R=(_=_||{}).random||(_.rng||i)();if(R[6]=15&R[6]|64,R[8]=63&R[8]|128,C)for(var k=0;k<16;++k)C[S+k]=R[k];return C||v(R)}},21480:(B,G,a)=>{var i={"./ion-accordion_2.entry.js":[28956,9312,8956],"./ion-action-sheet.entry.js":[6736,9312,6736],"./ion-alert.entry.js":[41644,9312,1644],"./ion-app_8.entry.js":[63936,9312,3936],"./ion-avatar_3.entry.js":[79428,9428],"./ion-back-button.entry.js":[66932,9312,6932],"./ion-backdrop.entry.js":[38019,8019],"./ion-breadcrumb_2.entry.js":[67752,9312,7752],"./ion-button_2.entry.js":[9580,9580],"./ion-card_5.entry.js":[71048,1048],"./ion-checkbox.entry.js":[21372,9312,3752],"./ion-chip.entry.js":[1492,1492],"./ion-col_3.entry.js":[49584,9584],"./ion-datetime-button.entry.js":[17864,5024,7864],"./ion-datetime_3.entry.js":[38048,5024,9312,8048],"./ion-fab_3.entry.js":[61812,9312,1812],"./ion-img.entry.js":[73296,3296],"./ion-infinite-scroll_2.entry.js":[11488,9312,1488],"./ion-input.entry.js":[93500,9312,3500],"./ion-item-option_3.entry.js":[42448,9312,2448],"./ion-item_8.entry.js":[8772,9312,8772],"./ion-loading.entry.js":[82948,9312,2948],"./ion-menu_3.entry.js":[47676,9312,7676],"./ion-modal.entry.js":[96824,9312,6824],"./ion-nav_2.entry.js":[2372,2372],"./ion-picker-column-internal.entry.js":[88232,9312,8232],"./ion-picker-internal.entry.js":[74656,4656],"./ion-popover.entry.js":[24168,9312,4168],"./ion-progress-bar.entry.js":[83264,3264],"./ion-radio_2.entry.js":[57176,9312,7176],"./ion-range.entry.js":[63180,9312,3180],"./ion-refresher_2.entry.js":[32e3,9312,2e3],"./ion-reorder_2.entry.js":[93604,9312,3604],"./ion-ripple-effect.entry.js":[43667,3667],"./ion-route_4.entry.js":[54284,4284],"./ion-searchbar.entry.js":[82580,9312,2580],"./ion-segment_2.entry.js":[47528,9312,7528],"./ion-select_3.entry.js":[44272,9312,4272],"./ion-spinner.entry.js":[71172,9312,1172],"./ion-split-pane.entry.js":[42624,2624],"./ion-tab-bar_2.entry.js":[31708,9312,1708],"./ion-tab_2.entry.js":[95956,5956],"./ion-text.entry.js":[55828,5828],"./ion-textarea.entry.js":[9440,9312,9440],"./ion-toast.entry.js":[39836,9312,9836],"./ion-toggle.entry.js":[42776,9312,2776]};function v(b){if(!a.o(i,b))return Promise.resolve().then(()=>{var P=new Error("Cannot find module '"+b+"'");throw P.code="MODULE_NOT_FOUND",P});var _=i[b],C=_[0];return Promise.all(_.slice(1).map(a.e)).then(()=>a(C))}v.keys=()=>Object.keys(i),v.id=21480,B.exports=v},70996:(B,G,a)=>{var i={"./pwa-action-sheet.entry.js":[52152,2152],"./pwa-camera-modal-instance.entry.js":[51148,1148],"./pwa-camera-modal.entry.js":[56056,6056],"./pwa-camera.entry.js":[10580,580],"./pwa-toast.entry.js":[53276,3276]};function v(b){if(!a.o(i,b))return Promise.resolve().then(()=>{var P=new Error("Cannot find module '"+b+"'");throw P.code="MODULE_NOT_FOUND",P});var _=i[b],C=_[0];return a.e(_[1]).then(()=>a(C))}v.keys=()=>Object.keys(i),v.id=70996,B.exports=v},74899:B=>{B.exports=function G(a,i){(null==i||i>a.length)&&(i=a.length);for(var v=0,b=new Array(i);v<i;v++)b[v]=a[v];return b},B.exports.__esModule=!0,B.exports.default=B.exports},48388:B=>{B.exports=function G(a){if(Array.isArray(a))return a},B.exports.__esModule=!0,B.exports.default=B.exports},57920:(B,G,a)=>{var i=a(74899);B.exports=function v(b){if(Array.isArray(b))return i(b)},B.exports.__esModule=!0,B.exports.default=B.exports},71559:B=>{B.exports=function G(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a},B.exports.__esModule=!0,B.exports.default=B.exports},1196:B=>{function G(i,v,b,_,C,P,S){try{var R=i[P](S),k=R.value}catch(x){return void b(x)}R.done?v(k):Promise.resolve(k).then(_,C)}B.exports=function a(i){return function(){var v=this,b=arguments;return new Promise(function(_,C){var P=i.apply(v,b);function S(k){G(P,_,C,S,R,"next",k)}function R(k){G(P,_,C,S,R,"throw",k)}S(void 0)})}},B.exports.__esModule=!0,B.exports.default=B.exports},94064:B=>{B.exports=function G(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")},B.exports.__esModule=!0,B.exports.default=B.exports},40112:(B,G,a)=>{var i=a(5816),v=a(72356);B.exports=function b(_,C,P){if(v())return Reflect.construct.apply(null,arguments);var S=[null];S.push.apply(S,C);var R=new(_.bind.apply(_,S));return P&&i(R,P.prototype),R},B.exports.__esModule=!0,B.exports.default=B.exports},66024:(B,G,a)=>{var i=a(35216);function v(_,C){for(var P=0;P<C.length;P++){var S=C[P];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(_,i(S.key),S)}}B.exports=function b(_,C,P){return C&&v(_.prototype,C),P&&v(_,P),Object.defineProperty(_,"prototype",{writable:!1}),_},B.exports.__esModule=!0,B.exports.default=B.exports},2676:(B,G,a)=>{var i=a(35216);B.exports=function v(b,_,C){return(_=i(_))in b?Object.defineProperty(b,_,{value:C,enumerable:!0,configurable:!0,writable:!0}):b[_]=C,b},B.exports.__esModule=!0,B.exports.default=B.exports},87312:(B,G,a)=>{var i=a(93248);function v(){return typeof Reflect<"u"&&Reflect.get?(B.exports=v=Reflect.get.bind(),B.exports.__esModule=!0,B.exports.default=B.exports
1):(B.exports=v=function(_,C,P){var S=i(_,C);if(S){var R=Object.getOwnPropertyDescriptor(S,C);return R.get?R.get.call(arguments.length<3?_:P):R.value}},B.exports.__esModule=!0,B.exports.default=B.exports),v.apply(this,arguments)}B.exports=v,B.exports.__esModule=!0,B.exports.default=B.exports},63532:B=>{function G(a){return B.exports=G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},B.exports.__esModule=!0,B.exports.default=B.exports,G(a)}B.exports=G,B.exports.__esModule=!0,B.exports.default=B.exports},54216:(B,G,a)=>{var i=a(5816);B.exports=function v(b,_){if("function"!=typeof _&&null!==_)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),_&&i(b,_)},B.exports.__esModule=!0,B.exports.default=B.exports},51552:B=>{B.exports=function G(a){try{return-1!==Function.toString.call(a).indexOf("[native code]")}catch{return"function"==typeof a}},B.exports.__esModule=!0,B.exports.default=B.exports},72356:B=>{function G(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B.exports=G=function(){return!!a},B.exports.__esModule=!0,B.exports.default=B.exports)()}B.exports=G,B.exports.__esModule=!0,B.exports.default=B.exports},40203:B=>{B.exports=function G(a){if(typeof Symbol<"u"&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)},B.exports.__esModule=!0,B.exports.default=B.exports},90064:B=>{B.exports=function G(a,i){var v=null==a?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(null!=v){var b,_,C,P,S=[],R=!0,k=!1;try{if(C=(v=v.call(a)).next,0===i){if(Object(v)!==v)return;R=!1}else for(;!(R=(b=C.call(v)).done)&&(S.push(b.value),S.length!==i);R=!0);}catch(x){k=!0,_=x}finally{try{if(!R&&null!=v.return&&(P=v.return(),Object(P)!==P))return}finally{if(k)throw _}}return S}},B.exports.__esModule=!0,B.exports.default=B.exports},89708:B=>{B.exports=function G(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},B.exports.__esModule=!0,B.exports.default=B.exports},37752:B=>{B.exports=function G(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},B.exports.__esModule=!0,B.exports.default=B.exports},96284:(B,G,a)=>{var i=a(59848).default,v=a(71559);B.exports=function b(_,C){if(C&&("object"===i(C)||"function"==typeof C))return C;if(void 0!==C)throw new TypeError("Derived constructors may only return object or undefined");return v(_)},B.exports.__esModule=!0,B.exports.default=B.exports},6636:(B,G,a)=>{var i=a(59848).default;function v(){"use strict";B.exports=v=function(){return _},B.exports.__esModule=!0,B.exports.default=B.exports;var b,_={},C=Object.prototype,P=C.hasOwnProperty,S=Object.defineProperty||function(ue,se,ce){ue[se]=ce.value},R="function"==typeof Symbol?Symbol:{},k=R.iterator||"@@iterator",x=R.asyncIterator||"@@asyncIterator",D=R.toStringTag||"@@toStringTag";function ee(ue,se,ce){return Object.defineProperty(ue,se,{value:ce,enumerable:!0,configurable:!0,writable:!0}),ue[se]}try{ee({},"")}catch{ee=function(ce,K,_e){return ce[K]=_e}}function te(ue,se,ce,K){var Pe=Object.create((se&&se.prototype instanceof Ye?se:Ye).prototype),De=new Ut(K||[]);return S(Pe,"_invoke",{value:Le(ue,ce,De)}),Pe}function J(ue,se,ce){try{return{type:"normal",arg:ue.call(se,ce)}}catch(K){return{type:"throw",arg:K}}}_.wrap=te;var Q="suspendedStart",we="suspendedYield",de="executing",Y="completed",Se={};function Ye(){}function pe(){}function ae(){}var Ve={};ee(Ve,k,function(){return this});var Ne=Object.getPrototypeOf,Ie=Ne&&Ne(Ne(it([])));Ie&&Ie!==C&&P.call(Ie,k)&&(Ve=Ie);var H=ae.prototype=Ye.prototype=Object.create(Ve);function j(ue){["next","throw","return"].forEach(function(se){ee(ue,se,function(ce){return this._invoke(se,ce)})})}function ye(ue,se){function ce(_e,Pe,De,ke){var Lt=J(ue[_e],ue,Pe);if("throw"!==Lt.type){var Dt=Lt.arg,He=Dt.value;return He&&"object"==i(He)&&P.call(He,"__await")?se.resolve(He.__await).then(function(ge){ce("next",ge,De,ke)},function(ge){ce("throw",ge,De,ke)}):se.resolve(He).then(function(ge){Dt.value=ge,De(Dt)},function(ge){return ce("throw",ge,De,ke)})}ke(Lt.arg)}var K;S(this,"_invoke",{value:function(Pe,De){function ke(){return new se(function(Lt,Dt){ce(Pe,De,Lt,Dt)})}return K=K?K.then(ke,ke):ke()}})}function Le(ue,se,ce){var K=Q;return function(_e,Pe){if(K===de)throw Error("Generator is already running");if(K===Y){if("throw"===_e)throw Pe;return{value:b,done:!0}}for(ce.method=_e,ce.arg=Pe;;){var De=ce.delegate;if(De){var ke=W(De,ce);if(ke){if(ke===Se)continue;return ke}}if("next"===ce.method)ce.sent=ce._sent=ce.arg;else if("throw"===ce.method){if(K===Q)throw K=Y,ce.arg;ce.dispatchException(ce.arg)}else"return"===ce.method&&ce.abrupt("return",ce.arg);K=de;var Lt=J(ue,se,ce);if("normal"===Lt.type){if(K=ce.done?Y:we,Lt.arg===Se)continue;return{value:Lt.arg,done:ce.done}}"throw"===Lt.type&&(K=Y,ce.method="throw",ce.arg=Lt.arg)}}}function W(ue,se){var ce=se.method,K=ue.iterator[ce];if(K===b)return se.delegate=null,"throw"===ce&&ue.iterator.return&&
1(se.method="return",se.arg=b,W(ue,se),"throw"===se.method)||"return"!==ce&&(se.method="throw",se.arg=new TypeError("The iterator does not provide a '"+ce+"' method")),Se;var _e=J(K,ue.iterator,se.arg);if("throw"===_e.type)return se.method="throw",se.arg=_e.arg,se.delegate=null,Se;var Pe=_e.arg;return Pe?Pe.done?(se[ue.resultName]=Pe.value,se.next=ue.nextLoc,"return"!==se.method&&(se.method="next",se.arg=b),se.delegate=null,Se):Pe:(se.method="throw",se.arg=new TypeError("iterator result is not an object"),se.delegate=null,Se)}function We(ue){var se={tryLoc:ue[0]};1 in ue&&(se.catchLoc=ue[1]),2 in ue&&(se.finallyLoc=ue[2],se.afterLoc=ue[3]),this.tryEntries.push(se)}function At(ue){var se=ue.completion||{};se.type="normal",delete se.arg,ue.completion=se}function Ut(ue){this.tryEntries=[{tryLoc:"root"}],ue.forEach(We,this),this.reset(!0)}function it(ue){if(ue||""===ue){var se=ue[k];if(se)return se.call(ue);if("function"==typeof ue.next)return ue;if(!isNaN(ue.length)){var ce=-1,K=function _e(){for(;++ce<ue.length;)if(P.call(ue,ce))return _e.value=ue[ce],_e.done=!1,_e;return _e.value=b,_e.done=!0,_e};return K.next=K}}throw new TypeError(i(ue)+" is not iterable")}return pe.prototype=ae,S(H,"constructor",{value:ae,configurable:!0}),S(ae,"constructor",{value:pe,configurable:!0}),pe.displayName=ee(ae,D,"GeneratorFunction"),_.isGeneratorFunction=function(ue){var se="function"==typeof ue&&ue.constructor;return!!se&&(se===pe||"GeneratorFunction"===(se.displayName||se.name))},_.mark=function(ue){return Object.setPrototypeOf?Object.setPrototypeOf(ue,ae):(ue.__proto__=ae,ee(ue,D,"GeneratorFunction")),ue.prototype=Object.create(H),ue},_.awrap=function(ue){return{__await:ue}},j(ye.prototype),ee(ye.prototype,x,function(){return this}),_.AsyncIterator=ye,_.async=function(ue,se,ce,K,_e){void 0===_e&&(_e=Promise);var Pe=new ye(te(ue,se,ce,K),_e);return _.isGeneratorFunction(se)?Pe:Pe.next().then(function(De){return De.done?De.value:Pe.next()})},j(H),ee(H,D,"Generator"),ee(H,k,function(){return this}),ee(H,"toString",function(){return"[object Generator]"}),_.keys=function(ue){var se=Object(ue),ce=[];for(var K in se)ce.push(K);return ce.reverse(),function _e(){for(;ce.length;){var Pe=ce.pop();if(Pe in se)return _e.value=Pe,_e.done=!1,_e}return _e.done=!0,_e}},_.values=it,Ut.prototype={constructor:Ut,reset:function(se){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(At),!se)for(var ce in this)"t"===ce.charAt(0)&&P.call(this,ce)&&!isNaN(+ce.slice(1))&&(this[ce]=b)},stop:function(){this.done=!0;var se=this.tryEntries[0].completion;if("throw"===se.type)throw se.arg;return this.rval},dispatchException:function(se){if(this.done)throw se;var ce=this;function K(Dt,He){return De.type="throw",De.arg=se,ce.next=Dt,He&&(ce.method="next",ce.arg=b),!!He}for(var _e=this.tryEntries.length-1;_e>=0;--_e){var Pe=this.tryEntries[_e],De=Pe.completion;if("root"===Pe.tryLoc)return K("end");if(Pe.tryLoc<=this.prev){var ke=P.call(Pe,"catchLoc"),Lt=P.call(Pe,"finallyLoc");if(ke&&Lt){if(this.prev<Pe.catchLoc)return K(Pe.catchLoc,!0);if(this.prev<Pe.finallyLoc)return K(Pe.finallyLoc)}else if(ke){if(this.prev<Pe.catchLoc)return K(Pe.catchLoc,!0)}else{if(!Lt)throw Error("try statement without catch or finally");if(this.prev<Pe.finallyLoc)return K(Pe.finallyLoc)}}}},abrupt:function(se,ce){for(var K=this.tryEntries.length-1;K>=0;--K){var _e=this.tryEntries[K];if(_e.tryLoc<=this.prev&&P.call(_e,"finallyLoc")&&this.prev<_e.finallyLoc){var Pe=_e;break}}Pe&&("break"===se||"continue"===se)&&Pe.tryLoc<=ce&&ce<=Pe.finallyLoc&&(Pe=null);var De=Pe?Pe.completion:{};return De.type=se,De.arg=ce,Pe?(this.method="next",this.next=Pe.finallyLoc,Se):this.complete(De)},complete:function(se,ce){if("throw"===se.type)throw se.arg;return"break"===se.type||"continue"===se.type?this.next=se.arg:"return"===se.type?(this.rval=this.arg=se.arg,this.method="return",this.next="end"):"normal"===se.type&&ce&&(this.next=ce),Se},finish:function(se){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var K=this.tryEntries[ce];if(K.finallyLoc===se)return this.complete(K.completion,K.afterLoc),At(K),Se}},catch:function(se){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var K=this.tryEntries[ce];if(K.tryLoc===se){var _e=K.completion;if("throw"===_e.type){var Pe=_e.arg;At(K)}return Pe}}throw Error("illegal catch attempt")},delegateYield:function(se,ce,K){return this.delegate={iterator:it(se),resultName:ce,nextLoc:K},"next"===this.method&&(this.arg=b),Se}},_}B.exports=v,B.exports.__esModule=!0,B.exports.default=B.exports},5816:B=>{function G(a,i){return B.exports=G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,_){return b.__proto__=_,b},B.exports.__esModule=!0,B.exports.default=B.exports,G(a,i)}B.exports=G,B.exports.__esModule=!0,B.exports.default=B.exports},97936:(B,G,a)=>{var i=a(48388),v=a(90064),b=a(83384),_=a(89708);B.exports=function C(P,S){return i(P)||v(P,S)||b(P,S)||_()},B.exports.__esModule=!0,B.exports.default=B.exports},93248:(B,G,a)=>{var i=a(63532);B.exports=function v(b,_){for(;!Object.prototype.hasOwnProperty.call(b,_)&&null!==(b=i(b)););return b},B.exports.__esModule=!0,B.exports.default=B.exports},25724:(B,G,a)=>{var i=a(57920),v=a(40203),b=a(83384),_=a(37752);B.exports=function C(P){return i(P)||v(P)||b(P)||_()},B.exports.__esModule=!0,B.exports.default=B.exports},26776:(B,G,a)=>{var i=a(59848).default;B.exports=function v(b,_){if("object"!=i(b)||!b)return b;var C=b[Symbol.toPrimitive];if(void 0!==C){var P=C.call(b,_||"default");if("object"!=i(P))return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===_?String:Number)(b)},B.exports.__esModule=!0,B.exports.default=B.exports},35216:(B,G,a)=>{var i=a(59848).default,v=a(26776);B.exports=function b(_){var C=v(_,"string");return"symbol"==i(C)?C:C+""},B.exports.__esModule=!0,B.exports.default=B.exports},59848:B=>{function G(a){return B.exports=G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},B.exports.__esModule=!0,B.exports.default=B.exports,G(a)}B.exports=G,B.exports.__esModule=!0,B.exports.default=B.exports},83384:(B,G,a)=>{var i=a(74899);B.exports=function v(b,_){if(b){if("string"==typeof b)return i(b,_);var C=Object.prototype.toString.call(b).slice(8,-1);if("Object"===C&&b.constructor&&(C=b.constructor.name),"Map"===C||"Set"===C)return Array.from(b);if("Arguments"===C||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return i(b,_)}},B.exports.__esModule=!0,B.exports.default=B.exports},60764:(B,G,a)=>{var i=a(63532),v=a(5816),b=a(51552),_=a(40112);function C(P){var S="function"==typeof Map?new Map:void 0;return B.exports=C=function(k){if(null===k||!b(k))return k;if("function"!=typeof k)throw new TypeError("Super expression must either be null or a function");if(typeof S<"u"){if(S.has(k))return S.get(k);S.set(k,x)}function x(){return _(k,arguments,i(this).constructor)}return x.prototype=Object.create(k.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v(x,k)},B.exports.__esModule=!0,B.exports.default=B.exports,C(P)}B.exports=C,B.exports.__esModule=!0,B.exports.default=B.exports},33248:(B,G,a)=>{var i=a(6636)();B.exports=i;try{regeneratorRuntime=i}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},11896:(B,G,a)=>{"use strict";var i=a(69063),v=a(44596),b=TypeError;B.exports=function(_){if(i(_))return _;throw new b(v(_)+" is not a function")}},43984:(B,G,a)=>{"use strict";var i=a(70780),v=a(44596),b=TypeError;B.exports=function(_){if(i(_))return _;throw new b(v(_)+" is not a constructor")}},19472:(B,G,a)=>{"use strict";var i=a(10968),v=String,b=TypeError;B.exports=function(_){if(i(_))return _;throw new b("Can't set "+v(_)+" as a prototype")}},62328:(B,G,a)=>{"use strict";var i=a(81840),v=a(28340),b=a(50368).f,_=i("unscopables"),C=Array.prototype;void 0===C[_]&&b(C,_,{configurable:!0,value:v(null)}),B.exports=function(P){C[_][P]=!0}},6884:(B,G,a)=>{"use strict";var i=a(1968).charAt;B.exports=function(v,b,_){return b+(_?i(v,b).length:1)}},38176:(B,G,a)=>{"use strict";var i=a(46056),v=TypeError;B.exports=function(b,_){if(i(_,b))return b;throw new v("Incorrect invocation")}},78424:(B,G,a)=>{"use strict";var i=a(30808),v=String,b=TypeError;B.exports=function(_){if(i(_))return _;throw new b(v(_)+" is not an object")}},56460:B=>{"use strict";B.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},68444:(B,G,a)=>{"use strict";var i=a(46040);B.exports=i(function(){if("function"==typeof ArrayBuffer){var v=new ArrayBuffer(8);Object.isExtensible(v)&&Object.defineProperty(v,"a",{value:8})}})},67736:(B,G,a)=>{"use strict";var Ut,it,ue,i=a(56460),v=a(83528),b=a(35624),_=a(69063),C=a(30808),P=a(16216),S=a(38040),R=a(44596),k=a(13652),x=a(63244),D=a(41720),ee=a(46056),te=a(81304),J=a(45168),Q=a(81840),we=a(10320),de=a(5444),Y=de.enforce,Se=de.get,Ye=b.Int8Array,pe=Ye&&Ye.prototype,ae=b.Uint8ClampedArray,Ve=ae&&ae.prototype,Ne=Ye&&te(Ye),Ie=pe&&te(pe),H=Object.prototype,j=b.TypeError,ye=Q("toStringTag"),Le=we("TYPED_ARRAY_TAG"),W="TypedArrayConstructor",We=i&&!!J&&"Opera"!==S(b.opera),At=!1,se={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ce={BigInt64Array:8,BigUint64Array:8},_e=function(He){var ge=te(He);if(C(ge)){var xt=Se(ge);return xt&&P(xt,W)?xt[W]:_e(ge)}},Pe=function(He){if(!C(He))return!1;var ge=S(He);return P(se,ge)||P(ce,ge)};for(Ut in se)(ue=(it=b[Ut])&&it.prototype)?Y(ue)[W]=it:We=!1;for(Ut in ce)(ue=(it=b[Ut])&&it.prototype)&&(Y(ue)[W]=it);if((!We||!_(Ne)||Ne===Function.prototype)&&(Ne=function(){throw new j("Incorrect invocation")},We))for(Ut in se)b[Ut]&&J(b[Ut],Ne);
vendor: 9,550 bytes, line 1
1if((!We||!Ie||Ie===H)&&(Ie=Ne.prototype,We))for(Ut in se)b[Ut]&&J(b[Ut].prototype,Ie);if(We&&te(Ve)!==Ie&&J(Ve,Ie),v&&!P(Ie,ye))for(Ut in At=!0,D(Ie,ye,{configurable:!0,get:function(){return C(this)?this[Le]:void 0}}),se)b[Ut]&&k(b[Ut],Le,Ut);B.exports={NATIVE_ARRAY_BUFFER_VIEWS:We,TYPED_ARRAY_TAG:At&&Le,aTypedArray:function(He){if(Pe(He))return He;throw new j("Target is not a typed array")},aTypedArrayConstructor:function(He){if(_(He)&&(!J||ee(Ne,He)))return He;throw new j(R(He)+" is not a typed array constructor")},exportTypedArrayMethod:function(He,ge,xt,pt){if(v){if(xt)for(var rn in se){var cn=b[rn];if(cn&&P(cn.prototype,He))try{delete cn.prototype[He]}catch{try{cn.prototype[He]=ge}catch{}}}(!Ie[He]||xt)&&x(Ie,He,xt?ge:We&&pe[He]||ge,pt)}},exportTypedArrayStaticMethod:function(He,ge,xt){var pt,rn;if(v){if(J){if(xt)for(pt in se)if((rn=b[pt])&&P(rn,He))try{delete rn[He]}catch{}if(Ne[He]&&!xt)return;try{return x(Ne,He,xt?ge:We&&Ne[He]||ge)}catch{}}for(pt in se)(rn=b[pt])&&(!rn[He]||xt)&&x(rn,He,ge)}},getTypedArrayConstructor:_e,isView:function(ge){if(!C(ge))return!1;var xt=S(ge);return"DataView"===xt||P(se,xt)||P(ce,xt)},isTypedArray:Pe,TypedArray:Ne,TypedArrayPrototype:Ie}},84025:(B,G,a)=>{"use strict";var i=a(35624),v=a(11447),b=a(83528),_=a(56460),C=a(43788),P=a(13652),S=a(41720),R=a(5248),k=a(46040),x=a(38176),D=a(83288),ee=a(50960),te=a(4084),J=a(6136),Q=a(47015),we=a(81304),de=a(45168),Y=a(85212),Se=a(87588),Ye=a(2744),pe=a(34304),ae=a(54200),Ve=a(5444),Ne=C.PROPER,Ie=C.CONFIGURABLE,H="ArrayBuffer",j="DataView",ye="prototype",W="Wrong index",We=Ve.getterFor(H),At=Ve.getterFor(j),Ut=Ve.set,it=i[H],ue=it,se=ue&&ue[ye],ce=i[j],K=ce&&ce[ye],_e=Object.prototype,Pe=i.Array,De=i.RangeError,ke=v(Y),Lt=v([].reverse),Dt=Q.pack,He=Q.unpack,ge=function(bn){return[255&bn]},xt=function(bn){return[255&bn,bn>>8&255]},pt=function(bn){return[255&bn,bn>>8&255,bn>>16&255,bn>>24&255]},rn=function(bn){return bn[3]<<24|bn[2]<<16|bn[1]<<8|bn[0]},cn=function(bn){return Dt(J(bn),23,4)},mn=function(bn){return Dt(bn,52,8)},dt=function(bn,Hn,Fn){S(bn[ye],Hn,{configurable:!0,get:function(){return Fn(this)[Hn]}})},lt=function(bn,Hn,Fn,On){var gr=At(bn),Mr=te(Fn),Vr=!!On;if(Mr+Hn>gr.byteLength)throw new De(W);var ti=Mr+gr.byteOffset,Nr=Se(gr.bytes,ti,ti+Hn);return Vr?Nr:Lt(Nr)},rt=function(bn,Hn,Fn,On,gr,Mr){var Vr=At(bn),Fr=te(Fn),ti=On(+gr),Nr=!!Mr;if(Fr+Hn>Vr.byteLength)throw new De(W);for(var Kr=Vr.bytes,Jr=Fr+Vr.byteOffset,sr=0;sr<Hn;sr++)Kr[Jr+sr]=ti[Nr?sr:Hn-sr-1]};if(_){var kt=Ne&&it.name!==H;k(function(){it(1)})&&k(function(){new it(-1)})&&!k(function(){return new it,new it(1.5),new it(NaN),1!==it.length||kt&&!Ie})?kt&&Ie&&P(it,"name",H):((ue=function(Hn){return x(this,se),Ye(new it(te(Hn)),this,ue)})[ye]=se,se.constructor=ue,pe(ue,it)),de&&we(K)!==_e&&de(K,_e);var an=new ce(new ue(2)),Yn=v(K.setInt8);an.setInt8(0,2147483648),an.setInt8(1,2147483649),(an.getInt8(0)||!an.getInt8(1))&&R(K,{setInt8:function(Hn,Fn){Yn(this,Hn,Fn<<24>>24)},setUint8:function(Hn,Fn){Yn(this,Hn,Fn<<24>>24)}},{unsafe:!0})}else se=(ue=function(Hn){x(this,se);var Fn=te(Hn);Ut(this,{type:H,bytes:ke(Pe(Fn),0),byteLength:Fn}),b||(this.byteLength=Fn,this.detached=!1)})[ye],K=(ce=function(Hn,Fn,On){x(this,K),x(Hn,se);var gr=We(Hn),Mr=gr.byteLength,Vr=D(Fn);if(Vr<0||Vr>Mr)throw new De("Wrong offset");if(Vr+(On=void 0===On?Mr-Vr:ee(On))>Mr)throw new De("Wrong length");Ut(this,{type:j,buffer:Hn,byteLength:On,byteOffset:Vr,bytes:gr.bytes}),b||(this.buffer=Hn,this.byteLength=On,this.byteOffset=Vr)})[ye],b&&(dt(ue,"byteLength",We),dt(ce,"buffer",At),dt(ce,"byteLength",At),dt(ce,"byteOffset",At)),R(K,{getInt8:function(Hn){return lt(this,1,Hn)[0]<<24>>24},getUint8:function(Hn){return lt(this,1,Hn)[0]},getInt16:function(Hn){var Fn=lt(this,2,Hn,arguments.length>1&&arguments[1]);return(Fn[1]<<8|Fn[0])<<16>>16},getUint16:function(Hn){var Fn=lt(this,2,Hn,arguments.length>1&&arguments[1]);return Fn[1]<<8|Fn[0]},getInt32:function(Hn){return rn(lt(this,4,Hn,arguments.length>1&&arguments[1]))},getUint32:function(Hn){return rn(lt(this,4,Hn,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(Hn){return He(lt(this,4,Hn,arguments.length>1&&arguments[1]),23)},getFloat64:function(Hn){return He(lt(this,8,Hn,arguments.length>1&&arguments[1]),52)},setInt8:function(Hn,Fn){rt(this,1,Hn,ge,Fn)},setUint8:function(Hn,Fn){rt(this,1,Hn,ge,Fn)},setInt16:function(Hn,Fn){rt(this,2,Hn,xt,Fn,arguments.length>2&&arguments[2])},setUint16:function(Hn,Fn){rt(this,2,Hn,xt,Fn,arguments.length>2&&arguments[2])},setInt32:function(Hn,Fn){rt(this,4,Hn,pt,Fn,arguments.length>2&&arguments[2])},setUint32:function(Hn,Fn){rt(this,4,Hn,pt,Fn,arguments.length>2&&arguments[2])},setFloat32:function(Hn,Fn){rt(this,4,Hn,cn,Fn,arguments.length>2&&arguments[2])},setFloat64:function(Hn,Fn){rt(this,8,Hn,mn,Fn,arguments.length>2&&arguments[2])}});ae(ue,H),ae(ce,j),B.exports={ArrayBuffer:ue,DataView:ce}},68368:(B,G,a)=>{"use strict";var i=a(16804),v=a(34160),b=a(29480),_=a(21136),C=Math.min;B.exports=[].copyWithin||function(S,R){var k=i(this),x=b(k),D=v(S,x),ee=v(R,x),te=arguments.length>2?arguments[2]:void 0,J=C((void 0===te?x:v(te,x))-ee,x-D),Q=1;for(ee<D&&D<ee+J&&(Q=-1,ee+=J-1,D+=J-1);J-- >0;)ee in k?k[D]=k[ee]:_(k,D),D+=Q,ee+=Q;return k}},85212:(B,G,a)=>{"use strict";var i=a(16804),v=a(34160),b=a(29480);B.exports=function(C){for(var P=i(this),S=b(P),R=arguments.length,k=v(R>1?arguments[1]:void 0,S),x=R>2?arguments[2]:void 0,D=void 0===x?S:v(x,S);D>k;)P[k++]=C;return P}},75935:(B,G,a)=>{"use strict";var i=a(44904).forEach,b=a(94528)("forEach");B.exports=b?[].forEach:function(C){return i(this,C,arguments.length>1?arguments[1]:void 0)}},94244:(B,G,a)=>{"use strict";var i=a(29480);B.exports=function(v,b,_){for(var C=0,P=arguments.length>2?_:i(b),S=new v(P);P>C;)S[C]=b[C++];return S}},27992:(B,G,a)=>{"use strict";var i=a(62880),v=a(40892),b=a(16804),_=a(14136),C=a(34264),P=a(70780),S=a(29480),R=a(98931),k=a(82704),x=a(67508),D=Array;B.exports=function(te){var J=b(te),Q=P(this),we=arguments.length,de=we>1?arguments[1]:void 0,Y=void 0!==de;Y&&(de=i(de,we>2?arguments[2]:void 0));var pe,ae,Ve,Ne,Ie,H,Se=x(J),Ye=0;if(!Se||this===D&&C(Se))for(pe=S(J),ae=Q?new this(pe):D(pe);pe>Ye;Ye++)H=Y?de(J[Ye],Ye):J[Ye],R(ae,Ye,H);else for(ae=Q?new this:[],Ie=(Ne=k(J,Se)).next;!(Ve=v(Ie,Ne)).done;Ye++)H=Y?_(Ne,de,[Ve.value,Ye],!0):Ve.value,R(ae,Ye,H);return ae.length=Ye,ae}},22196:(B,G,a)=>{"use strict";var i=a(99740),v=a(34160),b=a(29480),_=function(C){return function(P,S,R){var k=i(P),x=b(k);if(0===x)return!C&&-1;var ee,D=v(R,x);if(C&&S!=S){for(;x>D;)if((ee=k[D++])!=ee)return!0}else for(;x>D;D++)if((C||D in k)&&k[D]===S)return C||D||0;return!C&&-1}};B.exports={includes:_(!0),indexOf:_(!1)}},44904:(B,G,a)=>{"use strict";var i=a(62880),v=a(11447),b=a(26212),_=a(16804),C=a(29480),P=a(38488),S=v([].push),R=function(k){var x=1===k,D=2===k,ee=3===k,te=4===k,J=6===k,Q=7===k,we=5===k||J;return function(de,Y,Se,Ye){for(var ye,Le,pe=_(de),ae=b(pe),Ve=C(ae),Ne=i(Y,Se),Ie=0,H=Ye||P,j=x?H(de,Ve):D||Q?H(de,0):void 0;Ve>Ie;Ie++)if((we||Ie in ae)&&(Le=Ne(ye=ae[Ie],Ie,pe),k))if(x)j[Ie]=Le;else if(Le)switch(k){case 3:return!0;case 5:return ye;case 6:return Ie;case 2:S(j,ye)}else switch(k){case 4:return!1;case 7:S(j,ye)}return J?-1:ee||te?te:j}};B.exports={forEach:R(0),map:R(1),filter:R(2),some:R(3),every:R(4),find:R(5),findIndex:R(6),filterReject:R(7)}},54496:(B,G,a)=>{"use strict";var i=a(54744),v=a(99740),b=a(83288),_=a(29480),C=a(94528),P=Math.min,S=[].lastIndexOf,R=!!S&&1/[1].lastIndexOf(1,-0)<0,k=C("lastIndexOf");B.exports=R||!k?function(ee){if(R)return i(S,this,arguments)||0;var te=v(this),J=_(te);if(0===J)return-1;var Q=J-1;for(arguments.length>1&&(Q=P(Q,b(arguments[1]))),Q<0&&(Q=J+Q);Q>=0;Q--)if(Q in te&&te[Q]===ee)return Q||0;return-1}:S},37776:(B,G,a)=>{"use strict";var i=a(46040),v=a(81840),b=a(43356),_=v("species");B.exports=function(C){return b>=51||!i(function(){var P=[];return(P.constructor={})[_]=function(){return{foo:1}},1!==P[C](Boolean).foo})}},94528:(B,G,a)=>{"use strict";var i=a(46040);B.exports=function(v,b){var _=[][v];return!!_&&i(function(){_.call(null,b||function(){return 1},1)})}},22396:(B,G,a)=>{"use strict";var i=a(11896),v=a(16804),b=a(26212),_=a(29480),C=TypeError,P="Reduce of empty array with no initial value",S=function(R){return function(k,x,D,ee){var te=v(k),J=b(te),Q=_(te);if(i(x),0===Q&&D<2)throw new C(P);var we=R?Q-1:0,de=R?-1:1;if(D<2)for(;;){if(we in J){ee=J[we],we+=de;break}if(we+=de,R?we<0:Q<=we)throw new C(P)}for(;R?we>=0:Q>we;we+=de)we in J&&(ee=x(ee,J[we],we,te));return ee}};B.exports={left:S(!1),right:S(!0)}},42696:(B,G,a)=>{"use strict";var i=a(83528),v=a(41064),b=TypeError,_=Object.getOwnPropertyDescriptor,C=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(P){return P instanceof TypeError}}();B.exports=C?function(P,S){if(v(P)&&!_(P,"length").writable)throw new b("Cannot set read only .length");return P.length=S}:function(P,S){return P.length=S}},87588:(B,G,a)=>{"use strict";var i=a(11447);B.exports=i([].slice)},90584:(B,G,a)=>{"use strict";var i=a(87588),v=Math.floor,b=function(_,C){var P=_.length;if(P<8)for(var R,k,S=1;S<P;){for(k=S,R=_[S];k&&C(_[k-1],R)>0;)_[k]=_[--k];k!==S++&&(_[k]=R)}else for(var x=v(P/2),D=b(i(_,0,x),C),ee=b(i(_,x),C),te=D.length,J=ee.length,Q=0,we=0;Q<te||we<J;)_[Q+we]=Q<te&&we<J?C(D[Q],ee[we])<=0?D[Q++]:ee[we++]:Q<te?D[Q++]:ee[we++];return _};B.exports=b},92244:(B,G,a)=>{"use strict";var i=a(41064),v=a(70780),b=a(30808),C=a(81840)("species"),P=Array;B.exports=function(S){var R;
1return i(S)&&(v(R=S.constructor)&&(R===P||i(R.prototype))||b(R)&&null===(R=R[C]))&&(R=void 0),void 0===R?P:R}},38488:(B,G,a)=>{"use strict";var i=a(92244);B.exports=function(v,b){return new(i(v))(0===b?0:b)}},14136:(B,G,a)=>{"use strict";var i=a(78424),v=a(12252);B.exports=function(b,_,C,P){try{return P?_(i(C)[0],C[1]):_(C)}catch(S){v(b,"throw",S)}}},91400:(B,G,a)=>{"use strict";var v=a(81840)("iterator"),b=!1;try{var _=0,C={next:function(){return{done:!!_++}},return:function(){b=!0}};C[v]=function(){return this},Array.from(C,function(){throw 2})}catch{}B.exports=function(P,S){try{if(!S&&!b)return!1}catch{return!1}var R=!1;try{var k={};k[v]=function(){return{next:function(){return{done:R=!0}}}},P(k)}catch{}return R}},75983:(B,G,a)=>{"use strict";var i=a(11447),v=i({}.toString),b=i("".slice);B.exports=function(_){return b(v(_),8,-1)}},38040:(B,G,a)=>{"use strict";var i=a(41712),v=a(69063),b=a(75983),C=a(81840)("toStringTag"),P=Object,S="Arguments"===b(function(){return arguments}());B.exports=i?b:function(k){var x,D,ee;return void 0===k?"Undefined":null===k?"Null":"string"==typeof(D=function(k,x){try{return k[x]}catch{}}(x=P(k),C))?D:S?b(x):"Object"===(ee=b(x))&&v(x.callee)?"Arguments":ee}},97796:(B,G,a)=>{"use strict";var i=a(28340),v=a(41720),b=a(5248),_=a(62880),C=a(38176),P=a(40952),S=a(34216),R=a(48752),k=a(42596),x=a(44440),D=a(83528),ee=a(34872).fastKey,te=a(5444),J=te.set,Q=te.getterFor;B.exports={getConstructor:function(we,de,Y,Se){var Ye=we(function(Ie,H){C(Ie,pe),J(Ie,{type:de,index:i(null),first:void 0,last:void 0,size:0}),D||(Ie.size=0),P(H)||S(H,Ie[Se],{that:Ie,AS_ENTRIES:Y})}),pe=Ye.prototype,ae=Q(de),Ve=function(Ie,H,j){var W,We,ye=ae(Ie),Le=Ne(Ie,H);return Le?Le.value=j:(ye.last=Le={index:We=ee(H,!0),key:H,value:j,previous:W=ye.last,next:void 0,removed:!1},ye.first||(ye.first=Le),W&&(W.next=Le),D?ye.size++:Ie.size++,"F"!==We&&(ye.index[We]=Le)),Ie},Ne=function(Ie,H){var Le,j=ae(Ie),ye=ee(H);if("F"!==ye)return j.index[ye];for(Le=j.first;Le;Le=Le.next)if(Le.key===H)return Le};return b(pe,{clear:function(){for(var j=ae(this),ye=j.first;ye;)ye.removed=!0,ye.previous&&(ye.previous=ye.previous.next=void 0),ye=ye.next;j.first=j.last=void 0,j.index=i(null),D?j.size=0:this.size=0},delete:function(Ie){var H=this,j=ae(H),ye=Ne(H,Ie);if(ye){var Le=ye.next,W=ye.previous;delete j.index[ye.index],ye.removed=!0,W&&(W.next=Le),Le&&(Le.previous=W),j.first===ye&&(j.first=Le),j.last===ye&&(j.last=W),D?j.size--:H.size--}return!!ye},forEach:function(H){for(var Le,j=ae(this),ye=_(H,arguments.length>1?arguments[1]:void 0);Le=Le?Le.next:j.first;)for(ye(Le.value,Le.key,this);Le&&Le.removed;)Le=Le.previous},has:function(H){return!!Ne(this,H)}}),b(pe,Y?{get:function(H){var j=Ne(this,H);return j&&j.value},set:function(H,j){return Ve(this,0===H?0:H,j)}}:{add:function(H){return Ve(this,H=0===H?0:H,H)}}),D&&v(pe,"size",{configurable:!0,get:function(){return ae(this).size}}),Ye},setStrong:function(we,de,Y){var Se=de+" Iterator",Ye=Q(de),pe=Q(Se);R(we,de,function(ae,Ve){J(this,{type:Se,target:ae,state:Ye(ae),kind:Ve,last:void 0})},function(){for(var ae=pe(this),Ve=ae.kind,Ne=ae.last;Ne&&Ne.removed;)Ne=Ne.previous;return ae.target&&(ae.last=Ne=Ne?Ne.next:ae.state.first)?k("keys"===Ve?Ne.key:"values"===Ve?Ne.value:[Ne.key,Ne.value],!1):(ae.target=void 0,k(void 0,!0))},Y?"entries":"values",!Y,!0),x(de)}}},51280:(B,G,a)=>{"use strict";var i=a(11447),v=a(5248),b=a(34872).getWeakData,_=a(38176),C=a(78424),P=a(40952),S=a(30808),R=a(34216),k=a(44904),x=a(16216),D=a(5444),ee=D.set,te=D.getterFor,J=k.find,Q=k.findIndex,we=i([].splice),de=0,Y=function(pe){return pe.frozen||(pe.frozen=new Se)},Se=function(){this.entries=[]},Ye=function(pe,ae){return J(pe.entries,function(Ve){return Ve[0]===ae})};Se.prototype={get:function(pe){var ae=Ye(this,pe);if(ae)return ae[1]},has:function(pe){return!!Ye(this,pe)},set:function(pe,ae){var Ve=Ye(this,pe);Ve?Ve[1]=ae:this.entries.push([pe,ae])},delete:function(pe){var ae=Q(this.entries,function(Ve){return Ve[0]===pe});return~ae&&we(this.entries,ae,1),!!~ae}},B.exports={getConstructor:function(pe,ae,Ve,Ne){var Ie=pe(function(Le,W){_(Le,H),ee(Le,{type:ae,id:de++,frozen:void 0}),P(W)||R(W,Le[Ne],{that:Le,AS_ENTRIES:Ve})}),H=Ie.prototype,j=te(ae),ye=function(Le,W,We){var At=j(Le),Ut=b(C(W),!0);return!0===Ut?Y(At).set(W,We):Ut[At.id]=We,Le};return v(H,{delete:function(Le){var W=j(this);if(!S(Le))return!1;var We=b(Le);return!0===We?Y(W).delete(Le):We&&x(We,W.id)&&delete We[W.id]},has:function(W){var We=j(this);if(!S(W))return!1;var At=b(W);return!0===At?Y(We).has(W):At&&x(At,We.id)}}),v(H,Ve?{get:function(W){var We=j(this);if(S(W)){var At=b(W);
1return!0===At?Y(We).get(W):At?At[We.id]:void 0}},set:function(W,We){return ye(this,W,We)}}:{add:function(W){return ye(this,W,!0)}}),Ie}}},86528:(B,G,a)=>{"use strict";var i=a(3748),v=a(35624),b=a(11447),_=a(15272),C=a(63244),P=a(34872),S=a(34216),R=a(38176),k=a(69063),x=a(40952),D=a(30808),ee=a(46040),te=a(91400),J=a(54200),Q=a(2744);B.exports=function(we,de,Y){var Se=-1!==we.indexOf("Map"),Ye=-1!==we.indexOf("Weak"),pe=Se?"set":"add",ae=v[we],Ve=ae&&ae.prototype,Ne=ae,Ie={},H=function(Ut){var it=b(Ve[Ut]);C(Ve,Ut,"add"===Ut?function(se){return it(this,0===se?0:se),this}:"delete"===Ut?function(ue){return!(Ye&&!D(ue))&&it(this,0===ue?0:ue)}:"get"===Ut?function(se){return Ye&&!D(se)?void 0:it(this,0===se?0:se)}:"has"===Ut?function(se){return!(Ye&&!D(se))&&it(this,0===se?0:se)}:function(se,ce){return it(this,0===se?0:se,ce),this})};if(_(we,!k(ae)||!(Ye||Ve.forEach&&!ee(function(){(new ae).entries().next()}))))Ne=Y.getConstructor(de,we,Se,pe),P.enable();else if(_(we,!0)){var ye=new Ne,Le=ye[pe](Ye?{}:-0,1)!==ye,W=ee(function(){ye.has(1)}),We=te(function(Ut){new ae(Ut)}),At=!Ye&&ee(function(){for(var Ut=new ae,it=5;it--;)Ut[pe](it,it);return!Ut.has(-0)});We||((Ne=de(function(Ut,it){R(Ut,Ve);var ue=Q(new ae,Ut,Ne);return x(it)||S(it,ue[pe],{that:ue,AS_ENTRIES:Se}),ue})).prototype=Ve,Ve.constructor=Ne),(W||At)&&(H("delete"),H("has"),Se&&H("get")),(At||Le)&&H(pe),Ye&&Ve.clear&&delete Ve.clear}return Ie[we]=Ne,i({global:!0,constructor:!0,forced:Ne!==ae},Ie),J(Ne,we),Ye||Y.setStrong(Ne,we,Se),Ne}},34304:(B,G,a)=>{"use strict";var i=a(16216),v=a(89976),b=a(14560),_=a(50368);B.exports=function(C,P,S){for(var R=v(P),k=_.f,x=b.f,D=0;D<R.length;D++){var ee=R[D];!i(C,ee)&&(!S||!i(S,ee))&&k(C,ee,x(P,ee))}}},74312:(B,G,a)=>{"use strict";var v=a(81840)("match");B.exports=function(b){var _=/./;try{"/./"[b](_)}catch{try{return _[v]=!1,"/./"[b](_)}catch{}}return!1}},29120:(B,G,a)=>{"use strict";var i=a(46040);B.exports=!i(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})},42596:B=>{"use strict";B.exports=function(G,a){return{value:G,done:a}}},13652:(B,G,a)=>{"use strict";var i=a(83528),v=a(50368),b=a(89200);B.exports=i?function(_,C,P){return v.f(_,C,b(1,P))}:function(_,C,P){return _[C]=P,_}},89200:B=>{"use strict";B.exports=function(G,a){return{enumerable:!(1&G),configurable:!(2&G),writable:!(4&G),value:a}}},98931:(B,G,a)=>{"use strict";var i=a(83528),v=a(50368),b=a(89200);B.exports=function(_,C,P){i?v.f(_,C,b(0,P)):_[C]=P}},41720:(B,G,a)=>{"use strict";var i=a(50316),v=a(50368);B.exports=function(b,_,C){return C.get&&i(C.get,_,{getter:!0}),C.set&&i(C.set,_,{setter:!0}),v.f(b,_,C)}},63244:(B,G,a)=>{"use strict";var i=a(69063),v=a(50368),b=a(50316),_=a(1544);B.exports=function(C,P,S,R){R||(R={});var k=R.enumerable,x=void 0!==R.name?R.name:P;if(i(S)&&b(S,x,R),R.global)k?C[P]=S:_(P,S);else{try{R.unsafe?C[P]&&(k=!0):delete C[P]}catch{}k?C[P]=S:v.f(C,P,{value:S,enumerable:!1,configurable:!R.nonConfigurable,writable:!R.nonWritable})}return C}},5248:(B,G,a)=>{"use strict";var i=a(63244);B.exports=function(v,b,_){for(var C in b)i(v,C,b[C],_);return v}},1544:(B,G,a)=>{"use strict";var i=a(35624),v=Object.defineProperty;B.exports=function(b,_){try{v(i,b,{value:_,configurable:!0,writable:!0})}catch{i[b]=_}return _}},21136:(B,G,a)=>{"use strict";var i=a(44596),v=TypeError;B.exports=function(b,_){if(!delete b[_])throw new v("Cannot delete property "+i(_)+" of "+i(b))}},83528:(B,G,a)=>{"use strict";var i=a(46040);B.exports=!i(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},19308:(B,G,a)=>{"use strict";var i=a(35624),v=a(30808),b=i.document,_=v(b)&&v(b.createElement);B.exports=function(C){return _?b.createElement(C):{}}},83272:B=>{"use strict";var G=TypeError;B.exports=function(i){if(i>9007199254740991)throw G("Maximum allowed index exceeded");return i}},95848:B=>{"use strict";B.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8280:(B,G,a)=>{"use strict";var v=a(19308)("span").classList,b=v&&v.constructor&&v.constructor.prototype;B.exports=b===Object.prototype?void 0:b},92392:(B,G,a)=>{"use strict";var v=a(18232).match(/firefox\/(\d+)/i);B.exports=!!v&&+v[1]},80888:(B,G,a)=>{"use strict";var i=a(18104),v=a(71648);B.exports=!i&&!v&&"object"==typeof window&&"object"==typeof document},18104:B=>{"use strict";B.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7464:(B,G,a)=>{"use strict";var i=a(18232);B.exports=/MSIE|Trident/.test(i)},35851:(B,G,a)=>{"use strict";var i=a(18232);B.exports=/ipad|iphone|ipod/i.test(i)&&typeof Pebble<"u"},46632:(B,G,a)=>{"use strict";var i=a(18232);
vendor: 1,038 bytes, line 1
1B.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},71648:(B,G,a)=>{"use strict";var i=a(35624),v=a(75983);B.exports="process"===v(i.process)},22424:(B,G,a)=>{"use strict";var i=a(18232);B.exports=/web0s(?!.*chrome)/i.test(i)},18232:B=>{"use strict";B.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},43356:(B,G,a)=>{"use strict";var S,R,i=a(35624),v=a(18232),b=i.process,_=i.Deno,C=b&&b.versions||_&&_.version,P=C&&C.v8;P&&(R=(S=P.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!R&&v&&(!(S=v.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=v.match(/Chrome\/(\d+)/))&&(R=+S[1]),B.exports=R},40315:(B,G,a)=>{"use strict";var v=a(18232).match(/AppleWebKit\/(\d+)\./);B.exports=!!v&&+v[1]},44656:B=>{"use strict";B.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3748:(B,G,a)=>{"use strict";var i=a(35624),v=a(14560).f,b=a(13652),_=a(63244),C=a(1544),P=a(34304),S=a(15272);B.exports=function(R,k){var J,Q,we,de,Y,x=R.target,D=R.global,ee=R.stat;if(J=D?i:ee?i[x]||C(x,{}
vendor: 7,767 bytes, line 1
1):i[x]&&i[x].prototype)for(Q in k){if(de=k[Q],we=R.dontCallGetSet?(Y=v(J,Q))&&Y.value:J[Q],!S(D?Q:x+(ee?".":"#")+Q,R.forced)&&void 0!==we){if(typeof de==typeof we)continue;P(de,we)}(R.sham||we&&we.sham)&&b(de,"sham",!0),_(J,Q,de,R)}}},46040:B=>{"use strict";B.exports=function(G){try{return!!G()}catch{return!0}}},38760:(B,G,a)=>{"use strict";a(12644);var i=a(40892),v=a(63244),b=a(68096),_=a(46040),C=a(81840),P=a(13652),S=C("species"),R=RegExp.prototype;B.exports=function(k,x,D,ee){var te=C(k),J=!_(function(){var Y={};return Y[te]=function(){return 7},7!==""[k](Y)}),Q=J&&!_(function(){var Y=!1,Se=/a/;return"split"===k&&((Se={}).constructor={},Se.constructor[S]=function(){return Se},Se.flags="",Se[te]=/./[te]),Se.exec=function(){return Y=!0,null},Se[te](""),!Y});if(!J||!Q||D){var we=/./[te],de=x(te,""[k],function(Y,Se,Ye,pe,ae){var Ve=Se.exec;return Ve===b||Ve===R.exec?J&&!ae?{done:!0,value:i(we,Se,Ye,pe)}:{done:!0,value:i(Y,Ye,Se,pe)}:{done:!1}});v(String.prototype,k,de[0]),v(R,te,de[1])}ee&&P(R[te],"sham",!0)}},7256:(B,G,a)=>{"use strict";var i=a(46040);B.exports=!i(function(){return Object.isExtensible(Object.preventExtensions({}))})},54744:(B,G,a)=>{"use strict";var i=a(95744),v=Function.prototype,b=v.apply,_=v.call;B.exports="object"==typeof Reflect&&Reflect.apply||(i?_.bind(b):function(){return _.apply(b,arguments)})},62880:(B,G,a)=>{"use strict";var i=a(78168),v=a(11896),b=a(95744),_=i(i.bind);B.exports=function(C,P){return v(C),void 0===P?C:b?_(C,P):function(){return C.apply(P,arguments)}}},95744:(B,G,a)=>{"use strict";var i=a(46040);B.exports=!i(function(){var v=function(){}.bind();return"function"!=typeof v||v.hasOwnProperty("prototype")})},29960:(B,G,a)=>{"use strict";var i=a(11447),v=a(11896),b=a(30808),_=a(16216),C=a(87588),P=a(95744),S=Function,R=i([].concat),k=i([].join),x={};B.exports=P?S.bind:function(te){var J=v(this),Q=J.prototype,we=C(arguments,1),de=function(){var Se=R(we,C(arguments));return this instanceof de?function(ee,te,J){if(!_(x,te)){for(var Q=[],we=0;we<te;we++)Q[we]="a["+we+"]";x[te]=S("C,a","return new C("+k(Q,",")+")")}return x[te](ee,J)}(J,Se.length,Se):J.apply(te,Se)};return b(Q)&&(de.prototype=Q),de}},40892:(B,G,a)=>{"use strict";var i=a(95744),v=Function.prototype.call;B.exports=i?v.bind(v):function(){return v.apply(v,arguments)}},43788:(B,G,a)=>{"use strict";var i=a(83528),v=a(16216),b=Function.prototype,_=i&&Object.getOwnPropertyDescriptor,C=v(b,"name"),P=C&&"something"===function(){}.name,S=C&&(!i||i&&_(b,"name").configurable);B.exports={EXISTS:C,PROPER:P,CONFIGURABLE:S}},56632:(B,G,a)=>{"use strict";var i=a(11447),v=a(11896);B.exports=function(b,_,C){try{return i(v(Object.getOwnPropertyDescriptor(b,_)[C]))}catch{}}},78168:(B,G,a)=>{"use strict";var i=a(75983),v=a(11447);B.exports=function(b){if("Function"===i(b))return v(b)}},11447:(B,G,a)=>{"use strict";var i=a(95744),v=Function.prototype,b=v.call,_=i&&v.bind.bind(b,b);B.exports=i?_:function(C){return function(){return b.apply(C,arguments)}}},64960:(B,G,a)=>{"use strict";var i=a(35624),v=a(69063);B.exports=function(_,C){return arguments.length<2?function(_){return v(_)?_:void 0}(i[_]):i[_]&&i[_][C]}},67508:(B,G,a)=>{"use strict";var i=a(38040),v=a(30364),b=a(40952),_=a(34920),P=a(81840)("iterator");B.exports=function(S){if(!b(S))return v(S,P)||v(S,"@@iterator")||_[i(S)]}},82704:(B,G,a)=>{"use strict";var i=a(40892),v=a(11896),b=a(78424),_=a(44596),C=a(67508),P=TypeError;B.exports=function(S,R){var k=arguments.length<2?C(S):R;if(v(k))return b(i(k,S));throw new P(_(S)+" is not iterable")}},6852:(B,G,a)=>{"use strict";var i=a(11447),v=a(41064),b=a(69063),_=a(75983),C=a(91992),P=i([].push);B.exports=function(S){if(b(S))return S;if(v(S)){for(var R=S.length,k=[],x=0;x<R;x++){var D=S[x];"string"==typeof D?P(k,D):("number"==typeof D||"Number"===_(D)||"String"===_(D))&&P(k,C(D))}var ee=k.length,te=!0;return function(J,Q){if(te)return te=!1,Q;if(v(this))return Q;for(var we=0;we<ee;we++)if(k[we]===J)return Q}}}},30364:(B,G,a)=>{"use strict";var i=a(11896),v=a(40952);B.exports=function(b,_){var C=b[_];return v(C)?void 0:i(C)}},34740:(B,G,a)=>{"use strict";var i=a(11447),v=a(16804),b=Math.floor,_=i("".charAt),C=i("".replace),P=i("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,R=/\$([$&'`]|\d{1,2})/g;B.exports=function(k,x,D,ee,te,J){var Q=D+k.length,we=ee.length,de=R;return void 0!==te&&(te=v(te),de=S),C(J,de,function(Y,Se){var Ye;switch(_(Se,0)){case"$":return"$";case"&":return k;case"`":return P(x,0,D);case"'":return P(x,Q);case"<":Ye=te[P(Se,1,-1)];break;default:var pe=+Se;if(0===pe)return Y;if(pe>we){var ae=b(pe/10);return 0===ae?Y:ae<=we?void 0===ee[ae-1]?_(Se,1):ee[ae-1]+_(Se,1):Y}Ye=ee[pe-1]}return void 0===Ye?"":Ye})}},35624:function(B){"use strict";var G=function(a){return a&&a.Math===Math&&a};B.exports=G("object"==typeof globalThis&&globalThis)||G("object"==typeof window&&window)||G("object"==typeof self&&self)||G("object"==typeof global&&global)||G("object"==typeof this&&this)||function(){return this}()||Function("return this")()},16216:(B,G,a)=>{"use strict";var i=a(11447),v=a(16804),b=i({}.hasOwnProperty);B.exports=Object.hasOwn||function(C,P){return b(v(C),P)}},96480:B=>{"use strict";B.exports={}},68600:B=>{"use strict";B.exports=function(G,a){try{1===arguments.length?console.error(G):console.error(G,a)}catch{}}},36836:(B,G,a)=>{"use strict";var i=a(64960);B.exports=i("document","documentElement")},80784:(B,G,a)=>{"use strict";var i=a(83528),v=a(46040),b=a(19308);B.exports=!i&&!v(function(){return 7!==Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a})},47015:B=>{"use strict";var G=Array,a=Math.abs,i=Math.pow,v=Math.floor,b=Math.log,_=Math.LN2;B.exports={pack:function(S,R,k){var de,Y,Se,x=G(k),D=8*k-R-1,ee=(1<<D)-1,te=ee>>1,J=23===R?i(2,-24)-i(2,-77):0,Q=S<0||0===S&&1/S<0?1:0,we=0;for((S=a(S))!=S||S===1/0?(Y=S!=S?1:0,de=ee):(de=v(b(S)/_),S*(Se=i(2,-de))<1&&(de--,Se*=2),(S+=de+te>=1?J/Se:J*i(2,1-te))*Se>=2&&(de++,Se/=2),de+te>=ee?(Y=0,de=ee):de+te>=1?(Y=(S*Se-1)*i(2,R),de+=te):(Y=S*i(2,te-1)*i(2,R),de=0));R>=8;)x[we++]=255&Y,Y/=256,R-=8;for(de=de<<R|Y,D+=R;D>0;)x[we++]=255&de,de/=256,D-=8;return x[--we]|=128*Q,x},unpack:function(S,R){var de,k=S.length,x=8*k-R-1,D=(1<<x)-1,ee=D>>1,te=x-7,J=k-1,Q=S[J--],we=127&Q;for(Q>>=7;te>0;)we=256*we+S[J--],te-=8;for(de=we&(1<<-te)-1,we>>=-te,te+=R;te>0;)de=256*de+S[J--],te-=8;if(0===we)we=1-ee;else{if(we===D)return de?NaN:Q?-1/0:1/0;de+=i(2,R),we-=ee}return(Q?-1:1)*de*i(2,we-R)}}},26212:(B,G,a)=>{"use strict";var i=a(11447),v=a(46040),b=a(75983),_=Object,C=i("".split);B.exports=v(function(){return!_("z").propertyIsEnumerable(0)})?function(P){return"String"===b(P)?C(P,""):_(P)}:_},2744:(B,G,a)=>{"use strict";var i=a(69063),v=a(30808),b=a(45168);B.exports=function(_,C,P){var S,R;return b&&i(S=C.constructor)&&S!==P&&v(R=S.prototype)&&R!==P.prototype&&b(_,R),_}},58460:(B,G,a)=>{"use strict";var i=a(11447),v=a(69063),b=a(49136),_=i(Function.toString);v(b.inspectSource)||(b.inspectSource=function(C){return _(C)}),B.exports=b.inspectSource},34872:(B,G,a)=>{"use strict";var i=a(3748),v=a(11447),b=a(96480),_=a(30808),C=a(16216),P=a(50368).f,S=a(30692),R=a(64856),k=a(17440),x=a(10320),D=a(7256),ee=!1,te=x("meta"),J=0,Q=function(pe){P(pe,te,{value:{objectID:"O"+J++,weakData:{}}})},Ye=B.exports={enable:function(){Ye.enable=function(){},ee=!0;var pe=S.f,ae=v([].splice),Ve={};Ve[te]=1,pe(Ve).length&&(S.f=function(Ne){for(var Ie=pe(Ne),H=0,j=Ie.length;H<j;H++)if(Ie[H]===te){ae(Ie,H,1);break}return Ie},i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:R.f}))},fastKey:function(pe,ae){if(!_(pe))return"symbol"==typeof pe?pe:("string"==typeof pe?"S":"P")+pe;if(!C(pe,te)){if(!k(pe))return"F";if(!ae)return"E";Q(pe)}return pe[te].objectID},getWeakData:function(pe,ae){if(!C(pe,te)){if(!k(pe))return!0;
1if(!ae)return!1;Q(pe)}return pe[te].weakData},onFreeze:function(pe){return D&&ee&&k(pe)&&!C(pe,te)&&Q(pe),pe}};b[te]=!0},5444:(B,G,a)=>{"use strict";var ee,te,J,i=a(40280),v=a(35624),b=a(30808),_=a(13652),C=a(16216),P=a(49136),S=a(58192),R=a(96480),k="Object already initialized",x=v.TypeError;if(i||P.state){var de=P.state||(P.state=new(0,v.WeakMap));de.get=de.get,de.has=de.has,de.set=de.set,ee=function(Se,Ye){if(de.has(Se))throw new x(k);return Ye.facade=Se,de.set(Se,Ye),Ye},te=function(Se){return de.get(Se)||{}},J=function(Se){return de.has(Se)}}else{var Y=S("state");R[Y]=!0,ee=function(Se,Ye){if(C(Se,Y))throw new x(k);return Ye.facade=Se,_(Se,Y,Ye),Ye},te=function(Se){return C(Se,Y)?Se[Y]:{}},J=function(Se){return C(Se,Y)}}B.exports={set:ee,get:te,has:J,enforce:function(Se){return J(Se)?te(Se):ee(Se,{})},getterFor:function(Se){return function(Ye){var pe;if(!b(Ye)||(pe=te(Ye)).type!==Se)throw new x("Incompatible receiver, "+Se+" required");return pe}}}},34264:(B,G,a)=>{"use strict";var i=a(81840),v=a(34920),b=i("iterator"),_=Array.prototype;B.exports=function(C){return void 0!==C&&(v.Array===C||_[b]===C)}},41064:(B,G,a)=>{"use strict";var i=a(75983);B.exports=Array.isArray||function(b){return"Array"===i(b)}},82040:(B,G,a)=>{"use strict";var i=a(38040);B.exports=function(v){var b=i(v);return"BigInt64Array"===b||"BigUint64Array"===b}},69063:B=>{"use strict";var G="object"==typeof document&&document.all;B.exports=typeof G>"u"&&void 0!==G?function(a){return"function"==typeof a||a===G}:function(a){return"function"==typeof a}},70780:(B,G,a)=>{"use strict";var i=a(11447),v=a(46040),b=a(69063),_=a(38040),C=a(64960),P=a(58460),S=function(){},R=C("Reflect","construct"),k=/^\s*(?:class|function)\b/,x=i(k.exec),D=!k.test(S),ee=function(Q){if(!b(Q))return!1;try{return R(S,[],Q),!0}catch{return!1}},te=function(Q){if(!b(Q))return!1;switch(_(Q)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return D||!!x(k,P(Q))}catch{return!0}};te.sham=!0,B.exports=!R||v(function(){var J;return ee(ee.call)||!ee(Object)||!ee(function(){J=!0})||J})?te:ee},15272:(B,G,a)=>{"use strict";var i=a(46040),v=a(69063),b=/#|\.prototype\./,_=function(k,x){var D=P[C(k)];return D===R||D!==S&&(v(x)?i(x):!!x)},C=_.normalize=function(k){return String(k).replace(b,".").toLowerCase()},P=_.data={},S=_.NATIVE="N",R=_.POLYFILL="P";B.exports=_},27432:(B,G,a)=>{"use strict";var i=a(30808),v=Math.floor;B.exports=Number.isInteger||function(_){return!i(_)&&isFinite(_)&&v(_)===_}},40952:B=>{"use strict";B.exports=function(G){return null==G}},30808:(B,G,a)=>{"use strict";var i=a(69063);B.exports=function(v){return"object"==typeof v?null!==v:i(v)}},10968:(B,G,a)=>{"use strict";var i=a(30808);B.exports=function(v){return i(v)||null===v}},52804:B=>{"use strict";B.exports=!1},392:(B,G,a)=>{"use strict";var i=a(30808),v=a(75983),_=a(81840)("match");B.exports=function(C){var P;return i(C)&&(void 0!==(P=C[_])?!!P:"RegExp"===v(C))}},26232:(B,G,a)=>{"use strict";var i=a(64960),v=a(69063),b=a(46056),_=a(59448),C=Object;B.exports=_?function(P){return"symbol"==typeof P}:function(P){var S=i("Symbol");return v(S)&&b(S.prototype,C(P))}},34216:(B,G,a)=>{"use strict";var i=a(62880),v=a(40892),b=a(78424),_=a(44596),C=a(34264),P=a(29480),S=a(46056),R=a(82704),k=a(67508),x=a(12252),D=TypeError,ee=function(J,Q){this.stopped=J,this.result=Q},te=ee.prototype;B.exports=function(J,Q,we){var Ve,Ne,Ie,H,j,ye,Le,Y=!(!we||!we.AS_ENTRIES),Se=!(!we||!we.IS_RECORD),Ye=!(!we||!we.IS_ITERATOR),pe=!(!we||!we.INTERRUPTED),ae=i(Q,we&&we.that),W=function(At){return Ve&&x(Ve,"normal",At),new ee(!0,At)},We=function(At){return Y?(b(At),pe?ae(At[0],At[1],W):ae(At[0],At[1])):pe?ae(At,W):ae(At)};if(Se)Ve=J.iterator;else if(Ye)Ve=J;else{if(!(Ne=k(J)))throw new D(_(J)+" is not iterable");if(C(Ne)){for(Ie=0,H=P(J);H>Ie;Ie++)if((j=We(J[Ie]))&&S(te,j))return j;return new ee(!1)}Ve=R(J,Ne)}for(ye=Se?J.next:Ve.next;!(Le=v(ye,Ve)).done;){try{j=We(Le.value)}catch(At){x(Ve,"throw",At)}if("object"==typeof j&&j&&S(te,j))return j}return new ee(!1)}},12252:(B,G,a)=>{"use strict";var i=a(40892),v=a(78424),b=a(30364);B.exports=function(_,C,P){var S,R;v(_);
1try{if(!(S=b(_,"return"))){if("throw"===C)throw P;return P}S=i(S,_)}catch(k){R=!0,S=k}if("throw"===C)throw P;if(R)throw S;return v(S),P}},12696:(B,G,a)=>{"use strict";var i=a(85412).IteratorPrototype,v=a(28340),b=a(89200),_=a(54200),C=a(34920),P=function(){return this};B.exports=function(S,R,k,x){var D=R+" Iterator";return S.prototype=v(i,{next:b(+!x,k)}),_(S,D,!1,!0),C[D]=P,S}},48752:(B,G,a)=>{"use strict";var i=a(3748),v=a(40892),b=a(52804),_=a(43788),C=a(69063),P=a(12696),S=a(81304),R=a(45168),k=a(54200),x=a(13652),D=a(63244),ee=a(81840),te=a(34920),J=a(85412),Q=_.PROPER,we=_.CONFIGURABLE,de=J.IteratorPrototype,Y=J.BUGGY_SAFARI_ITERATORS,Se=ee("iterator"),pe="values",ae="entries",Ve=function(){return this};B.exports=function(Ne,Ie,H,j,ye,Le,W){P(H,Ie,j);var K,_e,Pe,We=function(De){if(De===ye&&se)return se;if(!Y&&De&&De in it)return it[De];switch(De){case"keys":case pe:case ae:return function(){return new H(this,De)}}return function(){return new H(this)}},At=Ie+" Iterator",Ut=!1,it=Ne.prototype,ue=it[Se]||it["@@iterator"]||ye&&it[ye],se=!Y&&ue||We(ye),ce="Array"===Ie&&it.entries||ue;if(ce&&(K=S(ce.call(new Ne)))!==Object.prototype&&K.next&&(!b&&S(K)!==de&&(R?R(K,de):C(K[Se])||D(K,Se,Ve)),k(K,At,!0,!0),b&&(te[At]=Ve)),Q&&ye===pe&&ue&&ue.name!==pe&&(!b&&we?x(it,"name",pe):(Ut=!0,se=function(){return v(ue,this)})),ye)if(_e={values:We(pe),keys:Le?se:We("keys"),entries:We(ae)},W)for(Pe in _e)(Y||Ut||!(Pe in it))&&D(it,Pe,_e[Pe]);else i({target:Ie,proto:!0,forced:Y||Ut},_e);return(!b||W)&&it[Se]!==se&&D(it,Se,se,{name:ye}),te[Ie]=se,_e}},85412:(B,G,a)=>{"use strict";var D,ee,te,i=a(46040),v=a(69063),b=a(30808),_=a(28340),C=a(81304),P=a(63244),S=a(81840),R=a(52804),k=S("iterator"),x=!1;[].keys&&("next"in(te=[].keys())?(ee=C(C(te)))!==Object.prototype&&(D=ee):x=!0),!b(D)||i(function(){var Q={};return D[k].call(Q)!==Q})?D={}:R&&(D=_(D)),v(D[k])||P(D,k,function(){return this}),B.exports={IteratorPrototype:D,BUGGY_SAFARI_ITERATORS:x}},34920:B=>{"use strict";B.exports={}},29480:(B,G,a)=>{"use strict";var i=a(50960);B.exports=function(v){return i(v.length)}},50316:(B,G,a)=>{"use strict";var i=a(11447),v=a(46040),b=a(69063),_=a(16216),C=a(83528),P=a(43788).CONFIGURABLE,S=a(58460),R=a(5444),k=R.enforce,x=R.get,D=String,ee=Object.defineProperty,te=i("".slice),J=i("".replace),Q=i([].join),we=C&&!v(function(){return 8!==ee(function(){},"length",{value:8}).length}),de=String(String).split("String"),Y=B.exports=function(Se,Ye,pe){"Symbol("===te(D(Ye),0,7)&&(Ye="["+J(D(Ye),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),pe&&pe.getter&&(Ye="get "+Ye),pe&&pe.setter&&(Ye="set "+Ye),(!_(Se,"name")||P&&Se.name!==Ye)&&(C?ee(Se,"name",{value:Ye,configurable:!0}):Se.name=Ye),we&&pe&&_(pe,"arity")&&Se.length!==pe.arity&&ee(Se,"length",{value:pe.arity});try{pe&&_(pe,"constructor")&&pe.constructor?C&&ee(Se,"prototype",{writable:!1}):Se.prototype&&(Se.prototype=void 0)}catch{}var ae=k(Se);return _(ae,"source")||(ae.source=Q(de,"string"==typeof Ye?Ye:"")),Se};Function.prototype.toString=Y(function(){return b(this)&&x(this).source||S(this)},"toString")},75151:(B,G,a)=>{"use strict";var i=a(27824),v=Math.abs,b=2220446049250313e-31,_=1/b;B.exports=function(P,S,R,k){var x=+P,D=v(x),ee=i(x);if(D<k)return ee*function(P){return P+_-_}(D/k/S)*k*S;var te=(1+S/b)*D,J=te-(te-D);return J>R||J!=J?ee*(1/0):ee*J}},6136:(B,G,a)=>{"use strict";var i=a(75151);B.exports=Math.fround||function(P){return i(P,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},27824:B=>{"use strict";B.exports=Math.sign||function(a){var i=+a;return 0===i||i!=i?i:i<0?-1:1}},81736:B=>{"use strict";var G=Math.ceil,a=Math.floor;B.exports=Math.trunc||function(v){var b=+v;return(b>0?a:G)(b)}},37104:(B,G,a)=>{"use strict";var Q,we,de,Y,Se,i=a(35624),v=a(63440),b=a(62880),_=a(97604).set,C=a(98716),P=a(46632),S=a(35851),R=a(22424),k=a(71648),x=i.MutationObserver||i.WebKitMutationObserver,D=i.document,ee=i.process,te=i.Promise,J=v("queueMicrotask");if(!J){var Ye=new C,pe=function(){var ae,Ve;for(k&&(ae=ee.domain)&&ae.exit();Ve=Ye.get();)try{Ve()}catch(Ne){throw Ye.head&&Q(),Ne}ae&&ae.enter()};P||k||R||!x||!D?!S&&te&&te.resolve?((Y=te.resolve(void 0)).constructor=te,Se=b(Y.then,Y),Q=function(){Se(pe)}):k?Q=function(){ee.nextTick(pe)}:(_=b(_,i),Q=function(){_(pe)}):(we=!0,de=D.createTextNode(""),new x(pe).observe(de,{characterData:!0}
vendor: 1,083 bytes, line 1
1),Q=function(){de.data=we=!we}),J=function(ae){Ye.head||Q(),Ye.add(ae)}}B.exports=J},6848:(B,G,a)=>{"use strict";var i=a(11896),v=TypeError,b=function(_){var C,P;this.promise=new _(function(S,R){if(void 0!==C||void 0!==P)throw new v("Bad Promise constructor");C=S,P=R}),this.resolve=i(C),this.reject=i(P)};B.exports.f=function(_){return new b(_)}},70836:(B,G,a)=>{"use strict";var i=a(392),v=TypeError;B.exports=function(b){if(i(b))throw new v("The method doesn't accept regular expressions");return b}},57048:(B,G,a)=>{"use strict";var i=a(83528),v=a(11447),b=a(40892),_=a(46040),C=a(64152),P=a(48167),S=a(62460),R=a(16804),k=a(26212),x=Object.assign,D=Object.defineProperty,ee=v([].concat);B.exports=!x||_(function(){if(i&&1!==x({b:1},x(D({},"a",{enumerable:!0,get:function(){D(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var te={},J={},Q=Symbol("assign detection"),we="abcdefghijklmnopqrst";return te[Q]=7,we.split("").forEach(function(de){J[de]=de}),7!==x({},te)[Q]||C(x({},J)).join("")!==we})?function(J,Q){for(var we=R(J),de=arguments.length,Y=1,Se=P.f,Ye=S.f;de>Y;
1)for(var Ie,pe=k(arguments[Y++]),ae=Se?ee(C(pe),Se(pe)):C(pe),Ve=ae.length,Ne=0;Ve>Ne;)Ie=ae[Ne++],(!i||b(Ye,pe,Ie))&&(we[Ie]=pe[Ie]);return we}:x},28340:(B,G,a)=>{"use strict";var de,i=a(78424),v=a(35045),b=a(44656),_=a(96480),C=a(36836),P=a(19308),S=a(58192),x="prototype",D="script",ee=S("IE_PROTO"),te=function(){},J=function(Se){return"<"+D+">"+Se+"</"+D+">"},Q=function(Se){Se.write(J("")),Se.close();var Ye=Se.parentWindow.Object;return Se=null,Ye},Y=function(){try{de=new ActiveXObject("htmlfile")}catch{}Y=typeof document<"u"?document.domain&&de?Q(de):function(){var pe,Se=P("iframe"),Ye="java"+D+":";return Se.style.display="none",C.appendChild(Se),Se.src=String(Ye),(pe=Se.contentWindow.document).open(),pe.write(J("document.F=Object")),pe.close(),pe.F}():Q(de);for(var Se=b.length;Se--;)delete Y[x][b[Se]];return Y()};_[ee]=!0,B.exports=Object.create||function(Ye,pe){var ae;return null!==Ye?(te[x]=i(Ye),ae=new te,te[x]=null,ae[ee]=Ye):ae=Y(),void 0===pe?ae:v.f(ae,pe)}},35045:(B,G,a)=>{"use strict";var i=a(83528),v=a(34859),b=a(50368),_=a(78424),C=a(99740),P=a(64152);
1G.f=i&&!v?Object.defineProperties:function(R,k){_(R);for(var J,x=C(k),D=P(k),ee=D.length,te=0;ee>te;)b.f(R,J=D[te++],x[J]);return R}},50368:(B,G,a)=>{"use strict";var i=a(83528),v=a(80784),b=a(34859),_=a(78424),C=a(38732),P=TypeError,S=Object.defineProperty,R=Object.getOwnPropertyDescriptor,k="enumerable",x="configurable",D="writable";G.f=i?b?function(te,J,Q){if(_(te),J=C(J),_(Q),"function"==typeof te&&"prototype"===J&&"value"in Q&&D in Q&&!Q[D]){var we=R(te,J);we&&we[D]&&(te[J]=Q.value,Q={configurable:x in Q?Q[x]:we[x],enumerable:k in Q?Q[k]:we[k],writable:!1})}return S(te,J,Q)}:S:function(te,J,Q){if(_(te),J=C(J),_(Q),v)try{return S(te,J,Q)}catch{}if("get"in Q||"set"in Q)throw new P("Accessors not supported");return"value"in Q&&(te[J]=Q.value),te}},14560:(B,G,a)=>{"use strict";var i=a(83528),v=a(40892),b=a(62460),_=a(89200),C=a(99740),P=a(38732),S=a(16216),R=a(80784),k=Object.getOwnPropertyDescriptor;G.f=i?k:function(D,ee){if(D=C(D),ee=P(ee),R)try{return k(D,ee)}catch{}if(S(D,ee))return _(!v(b.f,D,ee),D[ee])}},64856:(B,G,a)=>{"use strict";var i=a(75983),v=a(99740),b=a(30692).f,_=a(87588),C="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];B.exports.f=function(R){return C&&"Window"===i(R)?function(S){try{return b(S)}catch{return _(C)}}(R):b(v(R))}},30692:(B,G,a)=>{"use strict";var i=a(19232),b=a(44656).concat("length","prototype");G.f=Object.getOwnPropertyNames||function(C){return i(C,b)}},48167:(B,G)=>{"use strict";G.f=Object.getOwnPropertySymbols},81304:(B,G,a)=>{"use strict";var i=a(16216),v=a(69063),b=a(16804),_=a(58192),C=a(29120),P=_("IE_PROTO"),S=Object,R=S.prototype;B.exports=C?S.getPrototypeOf:function(k){var x=b(k);if(i(x,P))return x[P];var D=x.constructor;return v(D)&&x instanceof D?D.prototype:x instanceof S?R:null}},17440:(B,G,a)=>{"use strict";var i=a(46040),v=a(30808),b=a(75983),_=a(68444),C=Object.isExtensible,P=i(function(){C(1)});B.exports=P||_?function(R){return!(!v(R)||_&&"ArrayBuffer"===b(R))&&(!C||C(R))}:C},46056:(B,G,a)=>{"use strict";var i=a(11447);B.exports=i({}.isPrototypeOf)},19232:(B,G,a)=>{"use strict";var i=a(11447),v=a(16216),b=a(99740),_=a(22196).indexOf,C=a(96480),P=i([].push);B.exports=function(S,R){var ee,k=b(S),x=0,D=[];for(ee in k)!v(C,ee)&&v(k,ee)&&P(D,ee);for(;R.length>x;)v(k,ee=R[x++])&&(~_(D,ee)||P(D,ee));return D}},64152:(B,G,a)=>{"use strict";var i=a(19232),v=a(44656);B.exports=Object.keys||function(_){return i(_,v)}},62460:(B,G)=>{"use strict";var a={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,v=i&&!a.call({1:2},1);G.f=v?function(_){var C=i(this,_);return!!C&&C.enumerable}:a},45168:(B,G,a)=>{"use strict";var i=a(56632),v=a(30808),b=a(72696),_=a(19472);
vendor: 49,366 bytes, line 1
1B.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var S,C=!1,P={};try{(S=i(Object.prototype,"__proto__","set"))(P,[]),C=P instanceof Array}catch{}return function(k,x){return b(k),_(x),v(k)&&(C?S(k,x):k.__proto__=x),k}}():void 0)},65660:(B,G,a)=>{"use strict";var i=a(83528),v=a(46040),b=a(11447),_=a(81304),C=a(64152),P=a(99740),R=b(a(62460).f),k=b([].push),x=i&&v(function(){var ee=Object.create(null);return ee[2]=2,!R(ee,2)}),D=function(ee){return function(te){for(var Ye,J=P(te),Q=C(J),we=x&&null===_(J),de=Q.length,Y=0,Se=[];de>Y;)Ye=Q[Y++],(!i||(we?Ye in J:R(J,Ye)))&&k(Se,ee?[Ye,J[Ye]]:J[Ye]);return Se}};B.exports={entries:D(!0),values:D(!1)}},53532:(B,G,a)=>{"use strict";var i=a(41712),v=a(38040);B.exports=i?{}.toString:function(){return"[object "+v(this)+"]"}},57664:(B,G,a)=>{"use strict";var i=a(40892),v=a(69063),b=a(30808),_=TypeError;B.exports=function(C,P){var S,R;if("string"===P&&v(S=C.toString)&&!b(R=i(S,C))||v(S=C.valueOf)&&!b(R=i(S,C))||"string"!==P&&v(S=C.toString)&&!b(R=i(S,C)))return R;throw new _("Can't convert object to primitive value")}},89976:(B,G,a)=>{"use strict";var i=a(64960),v=a(11447),b=a(30692),_=a(48167),C=a(78424),P=v([].concat);B.exports=i("Reflect","ownKeys")||function(R){var k=b.f(C(R)),x=_.f;return x?P(k,x(R)):k}},14880:(B,G,a)=>{"use strict";var i=a(35624);B.exports=i},65960:B=>{"use strict";B.exports=function(G){try{return{error:!1,value:G()}}catch(a){return{error:!0,value:a}}}},69636:(B,G,a)=>{"use strict";var i=a(35624),v=a(73008),b=a(69063),_=a(15272),C=a(58460),P=a(81840),S=a(80888),R=a(18104),k=a(52804),x=a(43356),D=v&&v.prototype,ee=P("species"),te=!1,J=b(i.PromiseRejectionEvent),Q=_("Promise",function(){var we=C(v),de=we!==String(v);if(!de&&66===x||k&&(!D.catch||!D.finally))return!0;if(!x||x<51||!/native code/.test(we)){var Y=new v(function(pe){pe(1)}),Se=function(pe){pe(function(){},function(){})};if((Y.constructor={})[ee]=Se,!(te=Y.then(function(){})instanceof Se))return!0}return!de&&(S||R)&&!J});B.exports={CONSTRUCTOR:Q,REJECTION_EVENT:J,SUBCLASSING:te}},73008:(B,G,a)=>{"use strict";var i=a(35624);B.exports=i.Promise},5200:(B,G,a)=>{"use strict";var i=a(78424),v=a(30808),b=a(6848);B.exports=function(_,C){if(i(_),v(C)&&C.constructor===_)return C;var P=b.f(_);return(0,P.resolve)(C),P.promise}},12384:(B,G,a)=>{"use strict";var i=a(73008),v=a(91400),b=a(69636).CONSTRUCTOR;B.exports=b||!v(function(_){i.all(_).then(void 0,function(){})})},98716:B=>{"use strict";var G=function(){this.head=null,this.tail=null};G.prototype={add:function(a){var i={item:a,next:null},v=this.tail;v?v.next=i:this.head=i,this.tail=i},get:function(){var a=this.head;if(a)return null===(this.head=a.next)&&(this.tail=null),a.item}},B.exports=G},51456:(B,G,a)=>{"use strict";var i=a(40892),v=a(78424),b=a(69063),_=a(75983),C=a(68096),P=TypeError;B.exports=function(S,R){var k=S.exec;if(b(k)){var x=i(k,S,R);return null!==x&&v(x),x}if("RegExp"===_(S))return i(C,S,R);throw new P("RegExp#exec called on incompatible receiver")}},68096:(B,G,a)=>{"use strict";var ae,Ve,i=a(40892),v=a(11447),b=a(91992),_=a(58020),C=a(48548),P=a(28196),S=a(28340),R=a(5444).get,k=a(39160),x=a(77416),D=P("native-string-replace",String.prototype.replace),ee=RegExp.prototype.exec,te=ee,J=v("".charAt),Q=v("".indexOf),we=v("".replace),de=v("".slice),Y=(Ve=/b*/g,i(ee,ae=/a/,"a"),i(ee,Ve,"a"),0!==ae.lastIndex||0!==Ve.lastIndex),Se=C.BROKEN_CARET,Ye=void 0!==/()??/.exec("")[1];(Y||Ye||Se||k||x)&&(te=function(Ve){var ye,Le,W,We,At,Ut,it,Ne=this,Ie=R(Ne),H=b(Ve),j=Ie.raw;if(j)return j.lastIndex=Ne.lastIndex,ye=i(te,j,H),Ne.lastIndex=j.lastIndex,ye;var ue=Ie.groups,se=Se&&Ne.sticky,ce=i(_,Ne),K=Ne.source,_e=0,Pe=H;if(se&&(ce=we(ce,"y",""),-1===Q(ce,"g")&&(ce+="g"),Pe=de(H,Ne.lastIndex),Ne.lastIndex>0&&(!Ne.multiline||Ne.multiline&&"\n"!==J(H,Ne.lastIndex-1))&&(K="(?: "+K+")",Pe=" "+Pe,_e++),Le=new RegExp("^(?:"+K+")",ce)),Ye&&(Le=new RegExp("^"+K+"$(?!\\s)",ce)),Y&&(W=Ne.lastIndex),We=i(ee,se?Le:Ne,Pe),se?We?(We.input=de(We.input,_e),We[0]=de(We[0],_e),We.index=Ne.lastIndex,Ne.lastIndex+=We[0].length):Ne.lastIndex=0:Y&&We&&(Ne.lastIndex=Ne.global?We.index+We[0].length:W),Ye&&We&&We.length>1&&i(D,We[0],Le,function(){for(At=1;At<arguments.length-2;At++)void 0===arguments[At]&&(We[At]=void 0)}),We&&ue)for(We.groups=Ut=S(null),At=0;At<ue.length;At++)Ut[(it=ue[At])[0]]=We[it[1]];return We}),B.exports=te},58020:(B,G,a)=>{"use strict";var i=a(78424);B.exports=function(){var v=i(this),b="";return v.hasIndices&&(b+="d"),v.global&&(b+="g"),v.ignoreCase&&(b+="i"),v.multiline&&(b+="m"),v.dotAll&&(b+="s"),v.unicode&&(b+="u"),v.unicodeSets&&(b+="v"),v.sticky&&(b+="y"),b}},99840:(B,G,a)=>{"use strict";var i=a(40892),v=a(16216),b=a(46056),_=a(58020),C=RegExp.prototype;B.exports=function(P){var S=P.flags;return void 0!==S||"flags"in C||v(P,"flags")||!b(C,P)?S:i(_,P)}},48548:(B,G,a)=>{"use strict";var i=a(46040),b=a(35624).RegExp,_=i(function(){var S=b("a","y");return S.lastIndex=2,null!==S.exec("abcd")}),C=_||i(function(){return!b("a","y").sticky}),P=_||i(function(){var S=b("^r","gy");return S.lastIndex=2,null!==S.exec("str")});B.exports={BROKEN_CARET:P,MISSED_STICKY:C,UNSUPPORTED_Y:_}},39160:(B,G,a)=>{"use strict";var i=a(46040),b=a(35624).RegExp;B.exports=i(function(){var _=b(".","s");return!(_.dotAll&&_.test("\n")&&"s"===_.flags)})},77416:(B,G,a)=>{"use strict";var i=a(46040),b=a(35624).RegExp;B.exports=i(function(){var _=b("(?<a>b)","g");return"b"!==_.exec("b").groups.a||"bc"!=="b".replace(_,"$<a>c")})},72696:(B,G,a)=>{"use strict";var i=a(40952),v=TypeError;B.exports=function(b){if(i(b))throw new v("Can't call method on "+b);return b}},63440:(B,G,a)=>{"use strict";var i=a(35624),v=a(83528),b=Object.getOwnPropertyDescriptor;B.exports=function(_){if(!v)return i[_];var C=b(i,_);return C&&C.value}},74096:B=>{"use strict";B.exports=Object.is||function(a,i){return a===i?0!==a||1/a==1/i:a!=a&&i!=i}},44440:(B,G,a)=>{"use strict";var i=a(64960),v=a(41720),b=a(81840),_=a(83528),C=b("species");B.exports=function(P){var S=i(P);_&&S&&!S[C]&&v(S,C,{configurable:!0,get:function(){return this}})}},54200:(B,G,a)=>{"use strict";var i=a(50368).f,v=a(16216),_=a(81840)("toStringTag");B.exports=function(C,P,S){C&&!S&&(C=C.prototype),C&&!v(C,_)&&i(C,_,{configurable:!0,value:P})}},58192:(B,G,a)=>{"use strict";var i=a(28196),v=a(10320),b=i("keys");B.exports=function(_){return b[_]||(b[_]=v(_))}},49136:(B,G,a)=>{"use strict";var i=a(52804),v=a(35624),b=a(1544),_="__core-js_shared__",C=B.exports=v[_]||b(_,{});(C.versions||(C.versions=[])).push({version:"3.36.1",mode:i?"pure":"global",copyright:"\xa9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},28196:(B,G,a)=>{"use strict";var i=a(49136);B.exports=function(v,b){return i[v]||(i[v]=b||{})}},6080:(B,G,a)=>{"use strict";var i=a(78424),v=a(43984),b=a(40952),C=a(81840)("species");B.exports=function(P,S){var k,R=i(P).constructor;return void 0===R||b(k=i(R)[C])?S:v(k)}},1968:(B,G,a)=>{"use strict";var i=a(11447),v=a(83288),b=a(91992),_=a(72696),C=i("".charAt),P=i("".charCodeAt),S=i("".slice),R=function(k){return function(x,D){var Q,we,ee=b(_(x)),te=v(D),J=ee.length;return te<0||te>=J?k?"":void 0:(Q=P(ee,te))<55296||Q>56319||te+1===J||(we=P(ee,te+1))<56320||we>57343?k?C(ee,te):Q:k?S(ee,te,te+2):we-56320+(Q-55296<<10)+65536}};B.exports={codeAt:R(!1),charAt:R(!0)}},1572:(B,G,a)=>{"use strict";var i=a(11447),v=2147483647,D=/[^\0-\u007E]/,ee=/[.\u3002\uFF0E\uFF61]/g,te="Overflow: input needs wider integers to process",Q=RangeError,we=i(ee.exec),de=Math.floor,Y=String.fromCharCode,Se=i("".charCodeAt),Ye=i([].join),pe=i([].push),ae=i("".replace),Ve=i("".split),Ne=i("".toLowerCase),H=function(Le){return Le+22+75*(Le<26)},j=function(Le,W,We){var At=0;for(Le=We?de(Le/700):Le>>1,Le+=de(Le/W);Le>455;)Le=de(Le/35),At+=36;return de(At+36*Le/(Le+38))},ye=function(Le){var W=[];Le=function(Le){for(var W=[],We=0,At=Le.length;We<At;){var Ut=Se(Le,We++);if(Ut>=55296&&Ut<=56319&&We<At){var it=Se(Le,We++);56320==(64512&it)?pe(W,((1023&Ut)<<10)+(1023&it)+65536):(pe(W,Ut),We--)}else pe(W,Ut)}return W}(Le);var ue,se,We=Le.length,At=128,Ut=0,it=72;for(ue=0;ue<Le.length;ue++)(se=Le[ue])<128&&pe(W,Y(se));var ce=W.length,K=ce;for(ce&&pe(W,"-");K<We;){var _e=v;for(ue=0;ue<Le.length;ue++)(se=Le[ue])>=At&&se<_e&&(_e=se);var Pe=K+1;if(_e-At>de((v-Ut)/Pe))throw new Q(te);for(Ut+=(_e-At)*Pe,At=_e,ue=0;ue<Le.length;ue++){if((se=Le[ue])<At&&++Ut>v)throw new Q(te);if(se===At){for(var De=Ut,ke=36;;){var Lt=ke<=it?1:ke>=it+26?26:ke-it;if(De<Lt)break;var Dt=De-Lt,He=36-Lt;pe(W,Y(H(Lt+Dt%He))),De=de(Dt/He),ke+=36}pe(W,Y(H(De))),it=j(Ut,Pe,K===ce),Ut=0,K++}}Ut++,At++}return Ye(W,"")};B.exports=function(Le){var At,Ut,W=[],We=Ve(ae(Ne(Le),ee,"."),".");for(At=0;At<We.length;At++)pe(W,we(D,Ut=We[At])?"xn--"+ye(Ut):Ut);return Ye(W,".")}},1096:(B,G,a)=>{"use strict";var i=a(11447),v=a(72696),b=a(91992),_=a(73388),C=i("".replace),P=RegExp("^["+_+"]+"),S=RegExp("(^|[^"+_+"])["+_+"]+$"),R=function(k){return function(x){var D=b(v(x));return 1&k&&(D=C(D,P,"")),2&k&&(D=C(D,S,"$1")),D}};B.exports={start:R(1),end:R(2),trim:R(3)}},88972:(B,G,a)=>{"use strict";var i=a(43356),v=a(46040),_=a(35624).String;B.exports=!!Object.getOwnPropertySymbols&&!v(function(){var C=Symbol("symbol detection");return!_(C)||!(Object(C)instanceof Symbol)||!Symbol.sham&&i&&i<41})},94208:(B,G,a)=>{"use strict";var i=a(40892),v=a(64960),b=a(81840),_=a(63244);B.exports=function(){var C=v("Symbol"),P=C&&C.prototype,S=P&&P.valueOf,R=b("toPrimitive");P&&!P[R]&&_(P,R,function(k){return i(S,this)},{arity:1})}},4680:(B,G,a)=>{"use strict";var i=a(88972);B.exports=i&&!!Symbol.for&&!!Symbol.keyFor},97604:(B,G,a)=>{"use strict";var Ve,Ne,Ie,H,i=a(35624),v=a(54744),b=a(62880),_=a(69063),C=a(16216),P=a(46040),S=a(36836),R=a(87588),k=a(19308),x=a(3416),D=a(46632),ee=a(71648),te=i.setImmediate,J=i.clearImmediate,Q=i.process,we=i.Dispatch,de=i.Function,Y=i.MessageChannel,Se=i.String,Ye=0,pe={},ae="onreadystatechange";P(function(){Ve=i.location});var j=function(We){if(C(pe,We)){var At=pe[We];delete pe[We],At()}},ye=function(We){return function(){j(We)}},Le=function(We){j(We.data)},W=function(We){i.postMessage(Se(We),Ve.protocol+"//"+Ve.host)};(!te||!J)&&(te=function(At){x(arguments.length,1);var Ut=_(At)?At:de(At),it=R(arguments,1);return pe[++Ye]=function(){v(Ut,void 0,it)},Ne(Ye),Ye},J=function(At){delete pe[At]},ee?Ne=function(We){Q.nextTick(ye(We))}:we&&we.now?Ne=function(We){we.now(ye(We))}:Y&&!D?(H=(Ie=new Y).port2,Ie.port1.onmessage=Le,Ne=b(H.postMessage,H)):i.addEventListener&&_(i.postMessage)&&!i.importScripts&&Ve&&"file:"!==Ve.protocol&&!P(W)?(Ne=W,i.addEventListener("message",Le,!1)):Ne=ae in k("script")?function(We){S.appendChild(k("script"))[ae]=function(){S.removeChild(this),j(We)}}:function(We){setTimeout(ye(We),0)}),B.exports={set:te,clear:J}},34128:(B,G,a)=>{"use strict";var i=a(11447);B.exports=i(1..valueOf)},34160:(B,G,a)=>{"use strict";var i=a(83288),v=Math.max,b=Math.min;B.exports=function(_,C){var P=i(_);return P<0?v(P+C,0):b(P,C)}},72724:(B,G,a)=>{"use strict";var i=a(78176),v=TypeError;B.exports=function(b){var _=i(b,"number");if("number"==typeof _)throw new v("Can't convert number to bigint");return BigInt(_)}},4084:(B,G,a)=>{"use strict";var i=a(83288),v=a(50960),b=RangeError;B.exports=function(_){if(void 0===_)return 0;var C=i(_),P=v(C);if(C!==P)throw new b("Wrong length or index");return P}},99740:(B,G,a)=>{"use strict";var i=a(26212),v=a(72696);B.exports=function(b){return i(v(b))}},83288:(B,G,a)=>{"use strict";var i=a(81736);B.exports=function(v){var b=+v;return b!=b||0===b?0:i(b)}},50960:(B,G,a)=>{"use strict";var i=a(83288),v=Math.min;B.exports=function(b){var _=i(b);return _>0?v(_,9007199254740991):0}},16804:(B,G,a)=>{"use strict";var i=a(72696),v=Object;B.exports=function(b){return v(i(b))}},11544:(B,G,a)=>{"use strict";var i=a(21500),v=RangeError;B.exports=function(b,_){var C=i(b);if(C%_)throw new v("Wrong offset");return C}},21500:(B,G,a)=>{"use strict";var i=a(83288),v=RangeError;B.exports=function(b){var _=i(b);if(_<0)throw new v("The argument can't be less than 0");return _}},78176:(B,G,a)=>{"use strict";var i=a(40892),v=a(30808),b=a(26232),_=a(30364),C=a(57664),P=a(81840),S=TypeError,R=P("toPrimitive");B.exports=function(k,x){if(!v(k)||b(k))return k;var ee,D=_(k,R);if(D){if(void 0===x&&(x="default"),ee=i(D,k,x),!v(ee)||b(ee))return ee;throw new S("Can't convert object to primitive value")}return void 0===x&&(x="number"),C(k,x)}},38732:(B,G,a)=>{"use strict";var i=a(78176),v=a(26232);B.exports=function(b){var _=i(b,"string");return v(_)?_:_+""}},41712:(B,G,a)=>{"use strict";var b={};b[a(81840)("toStringTag")]="z",B.exports="[object z]"===String(b)},91992:(B,G,a)=>{"use strict";var i=a(38040),v=String;B.exports=function(b){if("Symbol"===i(b))throw new TypeError("Cannot convert a Symbol value to a string");return v(b)}},72360:B=>{"use strict";var G=Math.round;B.exports=function(a){var i=G(a);return i<0?0:i>255?255:255&i}},44596:B=>{"use strict";var G=String;B.exports=function(a){try{return G(a)}catch{return"Object"}}},66736:(B,G,a)=>{"use strict";var i=a(3748),v=a(35624),b=a(40892),_=a(83528),C=a(2300),P=a(67736),S=a(84025),R=a(38176),k=a(89200),x=a(13652),D=a(27432),ee=a(50960),te=a(4084),J=a(11544),Q=a(72360),we=a(38732),de=a(16216),Y=a(38040),Se=a(30808),Ye=a(26232),pe=a(28340),ae=a(46056),Ve=a(45168),Ne=a(30692).f,Ie=a(5552),H=a(44904).forEach,j=a(44440),ye=a(41720),Le=a(50368),W=a(14560),We=a(94244),At=a(5444),Ut=a(2744),it=At.get,ue=At.set,se=At.enforce,ce=Le.f,K=W.f,_e=v.RangeError,Pe=S.ArrayBuffer,De=Pe.prototype,ke=S.DataView,Lt=P.NATIVE_ARRAY_BUFFER_VIEWS,Dt=P.TYPED_ARRAY_TAG,He=P.TypedArray,ge=P.TypedArrayPrototype,xt=P.isTypedArray,pt="BYTES_PER_ELEMENT",rn="Wrong length",cn=function(kt,an){ye(kt,an,{configurable:!0,get:function(){return it(this)[an]}})},mn=function(kt){var an;return ae(De,kt)||"ArrayBuffer"===(an=Y(kt))||"SharedArrayBuffer"===an},dt=function(kt,an){return xt(kt)&&!Ye(an)&&an in kt&&D(+an)&&an>=0},lt=function(an,Yn){return Yn=we(Yn),dt(an,Yn)?k(2,an[Yn]):K(an,Yn)},rt=function(an,Yn,bn){return Yn=we(Yn),!(dt(an,Yn)&&Se(bn)&&de(bn,"value"))||de(bn,"get")||de(bn,"set")||bn.configurable||de(bn,"writable")&&!bn.writable||de(bn,"enumerable")&&!bn.enumerable?ce(an,Yn,bn):(an[Yn]=bn.value,an)};_?(Lt||(W.f=lt,Le.f=rt,cn(ge,"buffer"),cn(ge,"byteOffset"),cn(ge,"byteLength"),cn(ge,"length")),i({target:"Object",stat:!0,forced:!Lt},{getOwnPropertyDescriptor:lt,defineProperty:rt}),B.exports=function(kt,an,Yn){var bn=kt.match(/\d+/)[0]/8,Hn=kt+(Yn?"Clamped":"")+"Array",Fn="get"+kt,On="set"+kt,gr=v[Hn],Mr=gr,Vr=Mr&&Mr.prototype,Fr={},Kr=function(sr,or){ce(sr,or,{get:function(){return function(sr,or){var zr=it(sr);return zr.view[Fn](or*bn+zr.byteOffset,!0)}(this,or)},set:function(zr){return function(sr,or,zr){var sn=it(sr);sn.view[On](or*bn+sn.byteOffset,Yn?Q(zr):zr,!0)}(this,or,zr)},enumerable:!0})};Lt?C&&(Mr=an(function(sr,or,zr,sn){return R(sr,Vr),Ut(Se(or)?mn(or)?void 0!==sn?new gr(or,J(zr,bn),sn):void 0!==zr?new gr(or,J(zr,bn)):new gr(or):xt(or)?We(Mr,or):b(Ie,Mr,or):new gr(te(or)),sr,Mr)}),Ve&&Ve(Mr,He),H(Ne(gr),function(sr){sr in Mr||x(Mr,sr,gr[sr])}),Mr.prototype=Vr):(Mr=an(function(sr,or,zr,sn){R(sr,Vr);var Xt,wn,dr,Qe=0,ut=0;if(Se(or)){if(!mn(or))return xt(or)?We(Mr,or):b(Ie,Mr,or);Xt=or,ut=J(zr,bn);var vn=or.byteLength;if(void 0===sn){if(vn%bn)throw new _e(rn);if((wn=vn-ut)<0)throw new _e(rn)}else if((wn=ee(sn)*bn)+ut>vn)throw new _e(rn);dr=wn/bn}else dr=te(or),Xt=new Pe(wn=dr*bn);for(ue(sr,{buffer:Xt,byteOffset:ut,byteLength:wn,length:dr,view:new ke(Xt)});Qe<dr;)Kr(sr,Qe++)}),Ve&&Ve(Mr,He),Vr=Mr.prototype=pe(ge)),Vr.constructor!==Mr&&x(Vr,"constructor",Mr),se(Vr).TypedArrayConstructor=Mr,Dt&&x(Vr,Dt,Hn);var Jr=Mr!==gr;Fr[Hn]=Mr,i({global:!0,constructor:!0,forced:Jr,sham:!Lt},Fr),pt in Mr||x(Mr,pt,bn),pt in Vr||x(Vr,pt,bn),j(Hn)}):B.exports=function(){}},2300:(B,G,a)=>{"use strict";var i=a(35624),v=a(46040),b=a(91400),_=a(67736).NATIVE_ARRAY_BUFFER_VIEWS,C=i.ArrayBuffer,P=i.Int8Array;B.exports=!_||!v(function(){P(1)})||!v(function(){new P(-1)})||!b(function(S){new P,new P(null),new P(1.5),new P(S)},!0)||v(function(){return 1!==new P(new C(2),1,void 0).length})},24848:(B,G,a)=>{"use strict";var i=a(94244),v=a(76576);B.exports=function(b,_){return i(v(b),_)}},5552:(B,G,a)=>{"use strict";var i=a(62880),v=a(40892),b=a(43984),_=a(16804),C=a(29480),P=a(82704),S=a(67508),R=a(34264),k=a(82040),x=a(67736).aTypedArrayConstructor,D=a(72724);B.exports=function(te){var Ye,pe,ae,Ve,Ne,Ie,H,j,J=b(this),Q=_(te),we=arguments.length,de=we>1?arguments[1]:void 0,Y=void 0!==de,Se=S(Q);if(Se&&!R(Se))for(j=(H=P(Q,Se)).next,Q=[];!(Ie=v(j,H)).done;)Q.push(Ie.value);for(Y&&we>2&&(de=i(de,arguments[2])),pe=C(Q),ae=new(x(J))(pe),Ve=k(ae),Ye=0;pe>Ye;Ye++)Ne=Y?de(Q[Ye],Ye):Q[Ye],ae[Ye]=Ve?D(Ne):+Ne;return ae}},76576:(B,G,a)=>{"use strict";var i=a(67736),v=a(6080),b=i.aTypedArrayConstructor,_=i.getTypedArrayConstructor;B.exports=function(C){return b(v(C,_(C)))}},10320:(B,G,a)=>{"use strict";var i=a(11447),v=0,b=Math.random(),_=i(1..toString);B.exports=function(C){return"Symbol("+(void 0===C?"":C)+")_"+_(++v+b,36)}},18020:(B,G,a)=>{"use strict";var i=a(46040),v=a(81840),b=a(83528),_=a(52804),C=v("iterator");B.exports=!i(function(){var P=new URL("b?a=1&b=2&c=3","http://a"),S=P.searchParams,R=new URLSearchParams("a=1&a=2&b=3"),k="";return P.pathname="c%20d",S.forEach(function(x,D){S.delete("b"),k+=D+x}),R.delete("a",2),R.delete("b",void 0),_&&(!P.toJSON||!R.has("a",1)||R.has("a",2)||!R.has("a",void 0)||R.has("b"))||!S.size&&(_||!b)||!S.sort||"http://a/c%20d?a=1&c=3"!==P.href||"3"!==S.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!S[C]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("http://a#\u0431").hash||"a1c3"!==k||"x"!==new URL("http://x",void 0).host})},59448:(B,G,a)=>{"use strict";var i=a(88972);B.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},34859:(B,G,a)=>{"use strict";var i=a(83528),v=a(46040);B.exports=i&&v(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3416:B=>{"use strict";var G=TypeError;B.exports=function(a,i){if(a<i)throw new G("Not enough arguments");return a}},40280:(B,G,a)=>{"use strict";var i=a(35624),v=a(69063),b=i.WeakMap;B.exports=v(b)&&/native code/.test(String(b))},9635:(B,G,a)=>{"use strict";var i=a(14880),v=a(16216),b=a(27732),_=a(50368).f;B.exports=function(C){var P=i.Symbol||(i.Symbol={});v(P,C)||_(P,C,{value:b.f(C)})}},27732:(B,G,a)=>{"use strict";var i=a(81840);G.f=i},81840:(B,G,a)=>{"use strict";var i=a(35624),v=a(28196),b=a(16216),_=a(10320),C=a(88972),P=a(59448),S=i.Symbol,R=v("wks"),k=P?S.for||S:S&&S.withoutSetter||_;B.exports=function(x){return b(R,x)||(R[x]=C&&b(S,x)?S[x]:k("Symbol."+x)),R[x]}},73388:B=>{"use strict";B.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},16680:(B,G,a)=>{"use strict";var i=a(3748),v=a(35624),b=a(84025),_=a(44440),C="ArrayBuffer",P=b[C];i({global:!0,constructor:!0,forced:v[C]!==P},{ArrayBuffer:P}),_(C)},4248:(B,G,a)=>{"use strict";var i=a(3748),v=a(46040),b=a(41064),_=a(30808),C=a(16804),P=a(29480),S=a(83272),R=a(98931),k=a(38488),x=a(37776),D=a(81840),ee=a(43356),te=D("isConcatSpreadable"),J=ee>=51||!v(function(){var de=[];return de[te]=!1,de.concat()[0]!==de}),Q=function(de){if(!_(de))return!1;var Y=de[te];return void 0!==Y?!!Y:b(de)};i({target:"Array",proto:!0,arity:1,forced:!J||!x("concat")},{concat:function(Y){var ae,Ve,Ne,Ie,H,Se=C(this),Ye=k(Se,0),pe=0;for(ae=-1,Ne=arguments.length;ae<Ne;ae++)if(Q(H=-1===ae?Se:arguments[ae]))for(Ie=P(H),S(pe+Ie),Ve=0;Ve<Ie;Ve++,pe++)Ve in H&&R(Ye,pe,H[Ve]);else S(pe+1),R(Ye,pe++,H);return Ye.length=pe,Ye}})},31956:(B,G,a)=>{"use strict";var i=a(3748),v=a(44904).filter;i({target:"Array",proto:!0,forced:!a(37776)("filter")},{filter:function(P){return v(this,P,arguments.length>1?arguments[1]:void 0)}})},87532:(B,G,a)=>{"use strict";var i=a(3748),v=a(44904).find,b=a(62328),_="find",C=!0;_ in[]&&Array(1)[_](function(){C=!1}),i({target:"Array",proto:!0,forced:C},{find:function(S){return v(this,S,arguments.length>1?arguments[1]:void 0)}}),b(_)},29912:(B,G,a)=>{"use strict";var i=a(3748),v=a(27992);i({target:"Array",stat:!0,forced:!a(91400)(function(C){Array.from(C)})},{from:v})},32452:(B,G,a)=>{"use strict";var i=a(3748),v=a(22196).includes,b=a(46040),_=a(62328);i({target:"Array",proto:!0,forced:b(function(){return!Array(1).includes()})},{includes:function(S){return v(this,S,arguments.length>1?arguments[1]:void 0)}}),_("includes")},89120:(B,G,a)=>{"use strict";var i=a(99740),v=a(62328),b=a(34920),_=a(5444),C=a(50368).f,P=a(48752),S=a(42596),R=a(52804),k=a(83528),x="Array Iterator",D=_.set,ee=_.getterFor(x);B.exports=P(Array,"Array",function(J,Q){D(this,{type:x,target:i(J),index:0,kind:Q})},function(){var J=ee(this),Q=J.target,we=J.index++;if(!Q||we>=Q.length)return J.target=void 0,S(void 0,!0);switch(J.kind){case"keys":return S(we,!1);case"values":return S(Q[we],!1)}return S([we,Q[we]],!1)},"values");var te=b.Arguments=b.Array;if(v("keys"),v("values"),v("entries"),!R&&k&&"values"!==te.name)try{C(te,"name",{value:"values"})}catch{}},16699:(B,G,a)=>{"use strict";var i=a(3748),v=a(11447),b=a(26212),_=a(99740),C=a(94528),P=v([].join);i({target:"Array",proto:!0,forced:b!==Object||!C("join",",")},{join:function(x){return P(_(this),void 0===x?",":x)}})},76568:(B,G,a)=>{"use strict";var i=a(3748),v=a(44904).map;i({target:"Array",proto:!0,forced:!a(37776)("map")},{map:function(P){return v(this,P,arguments.length>1?arguments[1]:void 0)}})},32928:(B,G,a)=>{"use strict";var i=a(3748),v=a(41064),b=a(70780),_=a(30808),C=a(34160),P=a(29480),S=a(99740),R=a(98931),k=a(81840),x=a(37776),D=a(87588),ee=x("slice"),te=k("species"),J=Array,Q=Math.max;i({target:"Array",proto:!0,forced:!ee},{slice:function(de,Y){var Ve,Ne,Ie,Se=S(this),Ye=P(Se),pe=C(de,Ye),ae=C(void 0===Y?Ye:Y,Ye);if(v(Se)&&((b(Ve=Se.constructor)&&(Ve===J||v(Ve.prototype))||_(Ve)&&null===(Ve=Ve[te]))&&(Ve=void 0),Ve===J||void 0===Ve))return D(Se,pe,ae);for(Ne=new(void 0===Ve?J:Ve)(Q(ae-pe,0)),Ie=0;pe<ae;pe++,Ie++)pe in Se&&R(Ne,Ie,Se[pe]);return Ne.length=Ie,Ne}})},29168:(B,G,a)=>{"use strict";var i=a(3748),v=a(11447),b=a(11896),_=a(16804),C=a(29480),P=a(21136),S=a(91992),R=a(46040),k=a(90584),x=a(94528),D=a(92392),ee=a(7464),te=a(43356),J=a(40315),Q=[],we=v(Q.sort),de=v(Q.push),Y=R(function(){Q.sort(void 0)}),Se=R(function(){Q.sort(null)}),Ye=x("sort"),pe=!R(function(){if(te)return te<70;if(!(D&&D>3)){if(ee)return!0;if(J)return J<603;var Ie,H,j,ye,Ne="";for(Ie=65;Ie<76;Ie++){switch(H=String.fromCharCode(Ie),Ie){case 66:case 69:case 70:case 72:j=3;break;case 68:case 71:j=4;break;default:j=2}for(ye=0;ye<47;ye++)Q.push({k:H+ye,v:j})}for(Q.sort(function(Le,W){return W.v-Le.v}),ye=0;ye<Q.length;ye++)H=Q[ye].k.charAt(0),Ne.charAt(Ne.length-1)!==H&&(Ne+=H);return"DGBEFHACIJK"!==Ne}});i({target:"Array",proto:!0,forced:Y||!Se||!Ye||!pe},{sort:function(Ie){void 0!==Ie&&b(Ie);var H=_(this);if(pe)return void 0===Ie?we(H):we(H,Ie);var Le,W,j=[],ye=C(H);for(W=0;W<ye;W++)W in H&&de(j,H[W]);for(k(j,function(Ne){return function(Ie,H){return void 0===H?-1:void 0===Ie?1:void 0!==Ne?+Ne(Ie,H)||0:S(Ie)>S(H)?1:-1}}(Ie)),Le=C(j),W=0;W<Le;)H[W]=j[W++];for(;W<ye;)P(H,W++);return H}})},56468:(B,G,a)=>{"use strict";var i=a(3748),v=a(16804),b=a(34160),_=a(83288),C=a(29480),P=a(42696),S=a(83272),R=a(38488),k=a(98931),x=a(21136),ee=a(37776)("splice"),te=Math.max,J=Math.min;i({target:"Array",proto:!0,forced:!ee},{splice:function(we,de){var ae,Ve,Ne,Ie,H,j,Y=v(this),Se=C(Y),Ye=b(we,Se),pe=arguments.length;for(0===pe?ae=Ve=0:1===pe?(ae=0,Ve=Se-Ye):(ae=pe-2,Ve=J(te(_(de),0),Se-Ye)),S(Se+ae-Ve),Ne=R(Y,Ve),Ie=0;Ie<Ve;Ie++)(H=Ye+Ie)in Y&&k(Ne,Ie,Y[H]);if(Ne.length=Ve,ae<Ve){for(Ie=Ye;Ie<Se-Ve;Ie++)j=Ie+ae,(H=Ie+Ve)in Y?Y[j]=Y[H]:x(Y,j);for(Ie=Se;Ie>Se-Ve+ae;Ie--)x(Y,Ie-1)}else if(ae>Ve)for(Ie=Se-Ve;Ie>Ye;Ie--)j=Ie+ae-1,(H=Ie+Ve-1)in Y?Y[j]=Y[H]:x(Y,j);for(Ie=0;Ie<ae;Ie++)Y[Ie+Ye]=arguments[Ie+2];return P(Y,Se-Ve+ae),Ne}})},51408:(B,G,a)=>{"use strict";var i=a(83528),v=a(43788).EXISTS,b=a(11447),_=a(41720),C=Function.prototype,P=b(C.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,R=b(S.exec);i&&!v&&_(C,"name",{configurable:!0,get:function(){try{return R(S,P(this))[1]}catch{return""}}})},16760:(B,G,a)=>{"use strict";var i=a(3748),v=a(64960),b=a(54744),_=a(40892),C=a(11447),P=a(46040),S=a(69063),R=a(26232),k=a(87588),x=a(6852),D=a(88972),ee=String,te=v("JSON","stringify"),J=C(/./.exec),Q=C("".charAt),we=C("".charCodeAt),de=C("".replace),Y=C(1..toString),Se=/[\uD800-\uDFFF]/g,Ye=/^[\uD800-\uDBFF]$/,pe=/^[\uDC00-\uDFFF]$/,ae=!D||P(function(){var H=v("Symbol")("stringify detection");return"[null]"!==te([H])||"{}"!==te({a:H})||"{}"!==te(Object(H))}),Ve=P(function(){return'"\\udf06\\ud834"'!==te("\udf06\ud834")||'"\\udead"'!==te("\udead")}),Ne=function(H,j){var ye=k(arguments),Le=x(j);if(S(Le)||void 0!==H&&!R(H))return ye[1]=function(W,We){if(S(Le)&&(We=_(Le,this,ee(W),We)),!R(We))return We},b(te,null,ye)},Ie=function(H,j,ye){var Le=Q(ye,j-1),W=Q(ye,j+1);return J(Ye,H)&&!J(pe,W)||J(pe,H)&&!J(Ye,Le)?"\\u"+Y(we(H,0),16):H};te&&i({target:"JSON",stat:!0,arity:3,forced:ae||Ve},{stringify:function(j,ye,Le){var W=k(arguments),We=b(ae?Ne:te,null,W);return Ve&&"string"==typeof We?de(We,Se,Ie):We}})},86704:(B,G,a)=>{"use strict";a(86528)("Map",function(b){return function(){return b(this,arguments.length?arguments[0]:void 0)}},a(97796))},85607:(B,G,a)=>{"use strict";a(86704)},9456:(B,G,a)=>{"use strict";var i=a(3748),v=a(52804),b=a(83528),_=a(35624),C=a(14880),P=a(11447),S=a(15272),R=a(16216),k=a(2744),x=a(46056),D=a(26232),ee=a(78176),te=a(46040),J=a(30692).f,Q=a(14560).f,we=a(50368).f,de=a(34128),Y=a(1096).trim,Se="Number",Ye=_[Se],pe=C[Se],ae=Ye.prototype,Ve=_.TypeError,Ne=P("".slice),Ie=P("".charCodeAt),ye=S(Se,!Ye(" 0o1")||!Ye("0b1")||Ye("+0x1")),W=function(Ut){var At,it=arguments.length<1?0:Ye(function(At){var Ut=ee(At,"number");return"bigint"==typeof Ut?Ut:function(At){var it,ue,se,ce,K,_e,Pe,De,Ut=ee(At,"number");if(D(Ut))throw new Ve("Cannot convert a Symbol value to a number");if("string"==typeof Ut&&Ut.length>2)if(Ut=Y(Ut),43===(it=Ie(Ut,0))||45===it){if(88===(ue=Ie(Ut,2))||120===ue)return NaN}else if(48===it){switch(Ie(Ut,1)){case 66:case 98:se=2,ce=49;break;case 79:case 111:se=8,ce=55;break;default:return+Ut}for(_e=(K=Ne(Ut,2)).length,Pe=0;Pe<_e;Pe++)if((De=Ie(K,Pe))<48||De>ce)return NaN;return parseInt(K,se)}return+Ut}(Ut)}(Ut));return x(ae,At=this)&&te(function(){de(At)})?k(Object(it),this,W):it};W.prototype=ae,ye&&!v&&(ae.constructor=W),i({global:!0,constructor:!0,wrap:!0,forced:ye},{Number:W});var We=function(At,Ut){for(var se,it=b?J(Ut):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),ue=0;it.length>ue;ue++)R(Ut,se=it[ue])&&!R(At,se)&&we(At,se,Q(Ut,se))};v&&pe&&We(C[Se],pe),(ye||v)&&We(C[Se],Ye)},97355:(B,G,a)=>{"use strict";a(3748)({target:"Number",stat:!0},{isInteger:a(27432)})},78235:(B,G,a)=>{"use strict";var i=a(3748),v=a(57048);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})},91088:(B,G,a)=>{"use strict";var i=a(3748),v=a(65660).entries;i({target:"Object",stat:!0},{entries:function(_){return v(_)}})},35172:(B,G,a)=>{"use strict";var i=a(3748),v=a(7256),b=a(46040),_=a(30808),C=a(34872).onFreeze,P=Object.freeze;i({target:"Object",stat:!0,forced:b(function(){P(1)}),sham:!v},{freeze:function(k){return P&&_(k)?P(C(k)):k}})},12600:(B,G,a)=>{"use strict";var i=a(3748),v=a(46040),b=a(99740),_=a(14560).f,C=a(83528);i({target:"Object",stat:!0,forced:!C||v(function(){_(1)}),sham:!C},{getOwnPropertyDescriptor:function(R,k){return _(b(R),k)}})},4376:(B,G,a)=>{"use strict";var i=a(3748),v=a(83528),b=a(89976),_=a(99740),C=a(14560),P=a(98931);i({target:"Object",stat:!0,sham:!v},{getOwnPropertyDescriptors:function(R){for(var J,Q,k=_(R),x=C.f,D=b(k),ee={},te=0;D.length>te;)void 0!==(Q=x(k,J=D[te++]))&&P(ee,J,Q);return ee}})},18728:(B,G,a)=>{"use strict";var i=a(3748),v=a(88972),b=a(46040),_=a(48167),C=a(16804);i({target:"Object",stat:!0,forced:!v||b(function(){_.f(1)})},{getOwnPropertySymbols:function(R){var k=_.f;return k?k(C(R)):[]}})},21040:(B,G,a)=>{"use strict";var i=a(3748),v=a(16804),b=a(64152);i({target:"Object",stat:!0,forced:a(46040)(function(){b(1)})},{keys:function(S){return b(v(S))}})},49640:(B,G,a)=>{"use strict";var i=a(41712),v=a(63244),b=a(53532);i||v(Object.prototype,"toString",b,{unsafe:!0})},11856:(B,G,a)=>{"use strict";var i=a(3748),v=a(40892),b=a(11896),_=a(6848),C=a(65960),P=a(34216);i({target:"Promise",stat:!0,forced:a(12384)},{all:function(k){var x=this,D=_.f(x),ee=D.resolve,te=D.reject,J=C(function(){var Q=b(x.resolve),we=[],de=0,Y=1;P(k,function(Se){var Ye=de++,pe=!1;Y++,v(Q,x,Se).then(function(ae){pe||(pe=!0,we[Ye]=ae,--Y||ee(we))},te)}),--Y||ee(we)});return J.error&&te(J.value),D.promise}})},30896:(B,G,a)=>{"use strict";var i=a(3748),v=a(52804),b=a(69636).CONSTRUCTOR,_=a(73008),C=a(64960),P=a(69063),S=a(63244),R=_&&_.prototype;if(i({target:"Promise",proto:!0,forced:b,real:!0},{catch:function(x){return this.then(void 0,x)}}),!v&&P(_)){var k=C("Promise").prototype.catch;R.catch!==k&&S(R,"catch",k,{unsafe:!0})}},7616:(B,G,a)=>{"use strict";var ge,xt,rn,i=a(3748),v=a(52804),b=a(71648),_=a(35624),C=a(40892),P=a(63244),S=a(45168),R=a(54200),k=a(44440),x=a(11896),D=a(69063),ee=a(30808),te=a(38176),J=a(6080),Q=a(97604).set,we=a(37104),de=a(68600),Y=a(65960),Se=a(98716),Ye=a(5444),pe=a(73008),ae=a(69636),Ve=a(6848),Ne="Promise",Ie=ae.CONSTRUCTOR,H=ae.REJECTION_EVENT,j=ae.SUBCLASSING,ye=Ye.getterFor(Ne),Le=Ye.set,W=pe&&pe.prototype,We=pe,At=W,Ut=_.TypeError,it=_.document,ue=_.process,se=Ve.f,ce=se,K=!!(it&&it.createEvent&&_.dispatchEvent),_e="unhandledrejection",cn=function(Fn){var On;return!(!ee(Fn)||!D(On=Fn.then))&&On},mn=function(Fn,On){var Kr,Jr,sr,gr=On.value,Mr=1===On.state,Vr=Mr?Fn.ok:Fn.fail,Fr=Fn.resolve,ti=Fn.reject,Nr=Fn.domain;try{Vr?(Mr||(2===On.rejection&&an(On),On.rejection=1),!0===Vr?Kr=gr:(Nr&&Nr.enter(),Kr=Vr(gr),Nr&&(Nr.exit(),sr=!0)),Kr===Fn.promise?ti(new Ut("Promise-chain cycle")):(Jr=cn(Kr))?C(Jr,Kr,Fr,ti):Fr(Kr)):ti(gr)}catch(or){Nr&&!sr&&Nr.exit(),ti(or)}},dt=function(Fn,On){Fn.notified||(Fn.notified=!0,we(function(){for(var Mr,gr=Fn.reactions;Mr=gr.get();)mn(Mr,Fn);Fn.notified=!1,On&&!Fn.rejection&&rt(Fn)}))},lt=function(Fn,On,gr){var Mr,Vr;K?((Mr=it.createEvent("Event")).promise=On,Mr.reason=gr,Mr.initEvent(Fn,!1,!0),_.dispatchEvent(Mr)):Mr={promise:On,reason:gr},!H&&(Vr=_["on"+Fn])?Vr(Mr):Fn===_e&&de("Unhandled promise rejection",gr)},rt=function(Fn){C(Q,_,function(){var Vr,On=Fn.facade,gr=Fn.value;if(kt(Fn)&&(Vr=Y(function(){b?ue.emit("unhandledRejection",gr,On):lt(_e,On,gr)}),Fn.rejection=b||kt(Fn)?2:1,Vr.error))throw Vr.value})},kt=function(Fn){return 1!==Fn.rejection&&!Fn.parent},an=function(Fn){C(Q,_,function(){var On=Fn.facade;b?ue.emit("rejectionHandled",On):lt("rejectionhandled",On,Fn.value)})},Yn=function(Fn,On,gr){return function(Mr){Fn(On,Mr,gr)}},bn=function(Fn,On,gr){Fn.done||(Fn.done=!0,gr&&(Fn=gr),Fn.value=On,Fn.state=2,dt(Fn,!0))},Hn=function(Fn,On,gr){if(!Fn.done){Fn.done=!0,gr&&(Fn=gr);try{if(Fn.facade===On)throw new Ut("Promise can't be resolved itself");var Mr=cn(On);Mr?we(function(){var Vr={done:!1};try{C(Mr,On,Yn(Hn,Vr,Fn),Yn(bn,Vr,Fn))}catch(Fr){bn(Vr,Fr,Fn)}}):(Fn.value=On,Fn.state=1,dt(Fn,!1))}catch(Vr){bn({done:!1},Vr,Fn)}}};if(Ie&&(We=function(On){te(this,At),x(On),C(ge,this);var gr=ye(this);try{On(Yn(Hn,gr),Yn(bn,gr))}catch(Mr){bn(gr,Mr)}},(ge=function(On){Le(this,{type:Ne,done:!1,notified:!1,parent:!1,reactions:new Se,rejection:!1,state:0,value:void 0})}).prototype=P(At=We.prototype,"then",function(On,gr){var Mr=ye(this),Vr=se(J(this,We));return Mr.parent=!0,Vr.ok=!D(On)||On,Vr.fail=D(gr)&&gr,Vr.domain=b?ue.domain:void 0,0===Mr.state?Mr.reactions.add(Vr):we(function(){mn(Vr,Mr)}),Vr.promise}),xt=function(){var Fn=new ge,On=ye(Fn);this.promise=Fn,this.resolve=Yn(Hn,On),this.reject=Yn(bn,On)},Ve.f=se=function(Fn){return Fn===We||void 0===Fn?new xt(Fn):ce(Fn)},!v&&D(pe)&&W!==Object.prototype)){rn=W.then,j||P(W,"then",function(On,gr){var Mr=this;return new We(function(Vr,Fr){C(rn,Mr,Vr,Fr)}).then(On,gr)},{unsafe:!0});try{delete W.constructor}catch{}S&&S(W,At)}i({global:!0,constructor:!0,wrap:!0,forced:Ie},{Promise:We}),R(We,Ne,!1,!0),k(Ne)},79628:(B,G,a)=>{"use strict";a(7616),a(11856),a(30896),a(8076),a(94861),a(24324)},8076:(B,G,a)=>{"use strict";var i=a(3748),v=a(40892),b=a(11896),_=a(6848),C=a(65960),P=a(34216);i({target:"Promise",stat:!0,forced:a(12384)},{race:function(k){var x=this,D=_.f(x),ee=D.reject,te=C(function(){var J=b(x.resolve);P(k,function(Q){v(J,x,Q).then(D.resolve,ee)})});return te.error&&ee(te.value),D.promise}})},94861:(B,G,a)=>{"use strict";var i=a(3748),v=a(6848);i({target:"Promise",stat:!0,forced:a(69636).CONSTRUCTOR},{reject:function(C){var P=v.f(this);return(0,P.reject)(C),P.promise}})},24324:(B,G,a)=>{"use strict";var i=a(3748),v=a(64960),b=a(52804),_=a(73008),C=a(69636).CONSTRUCTOR,P=a(5200),S=v("Promise"),R=b&&!C;i({target:"Promise",stat:!0,forced:b||C},{resolve:function(x){return P(R&&this===S?_:this,x)}})},62016:(B,G,a)=>{"use strict";var i=a(3748),v=a(64960),b=a(54744),_=a(29960),C=a(43984),P=a(78424),S=a(30808),R=a(28340),k=a(46040),x=v("Reflect","construct"),D=Object.prototype,ee=[].push,te=k(function(){function we(){}return!(x(function(){},[],we)instanceof we)}),J=!k(function(){x(function(){})}),Q=te||J;i({target:"Reflect",stat:!0,forced:Q,sham:Q},{construct:function(de,Y){C(de),P(Y);var Se=arguments.length<3?de:C(arguments[2]);if(J&&!te)return x(de,Y,Se);if(de===Se){switch(Y.length){case 0:return new de;case 1:return new de(Y[0]);case 2:return new de(Y[0],Y[1]);case 3:return new de(Y[0],Y[1],Y[2]);case 4:return new de(Y[0],Y[1],Y[2],Y[3])}var Ye=[null];return b(ee,Ye,Y),new(b(_,de,Ye))}var pe=Se.prototype,ae=R(S(pe)?pe:D),Ve=b(de,ae,Y);return S(Ve)?Ve:ae}})},30256:(B,G,a)=>{"use strict";var i=a(3748),v=a(35624),b=a(54200);i({global:!0},{Reflect:{}}),b(v.Reflect,"Reflect",!0)},12644:(B,G,a)=>{"use strict";var i=a(3748),v=a(68096);i({target:"RegExp",proto:!0,forced:/./.exec!==v},{exec:v})},42984:(B,G,a)=>{"use strict";a(12644);var R,k,i=a(3748),v=a(40892),b=a(69063),_=a(78424),C=a(91992),P=(R=!1,(k=/[ac]/).exec=function(){return R=!0,/./.exec.apply(this,arguments)},!0===k.test("abc")&&R),S=/./.test;i({target:"RegExp",proto:!0,forced:!P},{test:function(R){var k=_(this),x=C(R),D=k.exec;if(!b(D))return v(S,k,x);var ee=v(D,k,x);return null!==ee&&(_(ee),!0)}})},88096:(B,G,a)=>{"use strict";var i=a(43788).PROPER,v=a(63244),b=a(78424),_=a(91992),C=a(46040),P=a(99840),S="toString",R=RegExp.prototype,k=R[S];(C(function(){return"/a/b"!==k.call({source:"a",flags:"b"})})||i&&k.name!==S)&&v(R,S,function(){var te=b(this);return"/"+_(te.source)+"/"+_(P(te))},{unsafe:!0})},95736:(B,G,a)=>{"use strict";a(86528)("Set",function(b){return function(){return b(this,arguments.length?arguments[0]:void 0)}},a(97796))},57912:(B,G,a)=>{"use strict";a(95736)},40500:(B,G,a)=>{"use strict";var i=a(3748),v=a(11447),b=a(70836),_=a(72696),C=a(91992),P=a(74312),S=v("".indexOf);i({target:"String",proto:!0,forced:!P("includes")},{includes:function(k){return!!~S(C(_(this)),C(b(k)),arguments.length>1?arguments[1]:void 0)}})},48928:(B,G,a)=>{"use strict";var i=a(1968).charAt,v=a(91992),b=a(5444),_=a(48752),C=a(42596),P="String Iterator",S=b.set,R=b.getterFor(P);_(String,"String",function(k){S(this,{type:P,string:v(k),index:0})},function(){var te,x=R(this),D=x.string,ee=x.index;return ee>=D.length?C(void 0,!0):(te=i(D,ee),x.index+=te.length,C(te,!1))})},32888:(B,G,a)=>{"use strict";var i=a(40892),v=a(38760),b=a(78424),_=a(40952),C=a(50960),P=a(91992),S=a(72696),R=a(30364),k=a(6884),x=a(51456);v("match",function(D,ee,te){return[function(Q){var we=S(this),de=_(Q)?void 0:R(Q,D);return de?i(de,Q,we):new RegExp(Q)[D](P(we))},function(J){var Q=b(this),we=P(J),de=te(ee,Q,we);if(de.done)return de.value;if(!Q.global)return x(Q,we);var Y=Q.unicode;Q.lastIndex=0;for(var pe,Se=[],Ye=0;null!==(pe=x(Q,we));){var ae=P(pe[0]);Se[Ye]=ae,""===ae&&(Q.lastIndex=k(we,C(Q.lastIndex),Y)),Ye++}return 0===Ye?null:Se}]})},54004:(B,G,a)=>{"use strict";var i=a(54744),v=a(40892),b=a(11447),_=a(38760),C=a(46040),P=a(78424),S=a(69063),R=a(40952),k=a(83288),x=a(50960),D=a(91992),ee=a(72696),te=a(6884),J=a(30364),Q=a(34740),we=a(51456),Y=a(81840)("replace"),Se=Math.max,Ye=Math.min,pe=b([].concat),ae=b([].push),Ve=b("".indexOf),Ne=b("".slice),Ie=function(Le){return void 0===Le?Le:String(Le)},H="$0"==="a".replace(/./,"$0"),j=!!/./[Y]&&""===/./[Y]("a","$0");_("replace",function(Le,W,We){var At=j?"$":"$0";return[function(it,ue){var se=ee(this),ce=R(it)?void 0:J(it,Y);return ce?v(ce,it,se,ue):v(W,D(se),it,ue)},function(Ut,it){var ue=P(this),se=D(Ut);if("string"==typeof it&&-1===Ve(it,At)&&-1===Ve(it,"$<")){var ce=We(W,ue,se,it);if(ce.done)return ce.value}var K=S(it);K||(it=D(it));var Pe,_e=ue.global;_e&&(Pe=ue.unicode,ue.lastIndex=0);for(var ke,De=[];null!==(ke=we(ue,se))&&(ae(De,ke),_e);)""===D(ke[0])&&(ue.lastIndex=te(se,x(ue.lastIndex),Pe));for(var Dt="",He=0,ge=0;ge<De.length;ge++){for(var cn,xt=D((ke=De[ge])[0]),pt=Se(Ye(k(ke.index),se.length),0),rn=[],mn=1;mn<ke.length;mn++)ae(rn,Ie(ke[mn]));var dt=ke.groups;if(K){var lt=pe([xt],rn,pt,se);void 0!==dt&&ae(lt,dt),cn=D(i(it,void 0,lt))}else cn=Q(xt,se,pt,rn,dt,it);pt>=He&&(Dt+=Ne(se,He,pt)+cn,He=pt+xt.length)}return Dt+Ne(se,He)}]},!!C(function(){var Le=/./;return Le.exec=function(){var W=[];return W.groups={a:"7"},W},"7"!=="".replace(Le,"$<a>")})||!H||j)},8824:(B,G,a)=>{"use strict";var i=a(40892),v=a(38760),b=a(78424),_=a(40952),C=a(72696),P=a(74096),S=a(91992),R=a(30364),k=a(51456);v("search",function(x,D,ee){return[function(J){var Q=C(this),we=_(J)?void 0:R(J,x);return we?i(we,J,Q):new RegExp(J)[x](S(Q))},function(te){var J=b(this),Q=S(te),we=ee(D,J,Q);if(we.done)return we.value;var de=J.lastIndex;P(de,0)||(J.lastIndex=0);var Y=k(J,Q);return P(J.lastIndex,de)||(J.lastIndex=de),null===Y?-1:Y.index}]})},2808:(B,G,a)=>{"use strict";var i=a(40892),v=a(11447),b=a(38760),_=a(78424),C=a(40952),P=a(72696),S=a(6080),R=a(6884),k=a(50960),x=a(91992),D=a(30364),ee=a(51456),te=a(48548),J=a(46040),Q=te.UNSUPPORTED_Y,de=Math.min,Y=v([].push),Se=v("".slice),Ye=!J(function(){var ae=/(?:)/,Ve=ae.exec;ae.exec=function(){return Ve.apply(this,arguments)};var Ne="ab".split(ae);return 2!==Ne.length||"a"!==Ne[0]||"b"!==Ne[1]}),pe="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;b("split",function(ae,Ve,Ne){var Ie="0".split(void 0,0).length?function(H,j){return void 0===H&&0===j?[]:i(Ve,this,H,j)}:Ve;return[function(j,ye){var Le=P(this),W=C(j)?void 0:D(j,ae);return W?i(W,j,Le,ye):i(Ie,x(Le),j,ye)},function(H,j){var ye=_(this),Le=x(H);if(!pe){var W=Ne(Ie,ye,Le,j,Ie!==Ve);if(W.done)return W.value}var We=S(ye,RegExp),At=ye.unicode,it=new We(Q?"^(?:"+ye.source+")":ye,(ye.ignoreCase?"i":"")+(ye.multiline?"m":"")+(ye.unicode?"u":"")+(Q?"g":"y")),ue=void 0===j?4294967295:j>>>0;if(0===ue)return[];if(0===Le.length)return null===ee(it,Le)?[Le]:[];for(var se=0,ce=0,K=[];ce<Le.length;){it.lastIndex=Q?0:ce;var Pe,_e=ee(it,Q?Se(Le,ce):Le);if(null===_e||(Pe=de(k(it.lastIndex+(Q?ce:0)),Le.length))===se)ce=R(Le,ce,At);else{if(Y(K,Se(Le,se,ce)),K.length===ue)return K;for(var De=1;De<=_e.length-1;De++)if(Y(K,_e[De]),K.length===ue)return K;ce=se=Pe}}return Y(K,Se(Le,se)),K}]},pe||!Ye,Q)},68392:(B,G,a)=>{"use strict";var J,i=a(3748),v=a(78168),b=a(14560).f,_=a(50960),C=a(91992),P=a(70836),S=a(72696),R=a(74312),k=a(52804),x=v("".slice),D=Math.min,ee=R("startsWith");i({target:"String",proto:!0,forced:!(!k&&!ee&&(J=b(String.prototype,"startsWith"),J&&!J.writable)||ee)},{startsWith:function(Q){var we=C(S(this));P(Q);var de=_(D(arguments.length>1?arguments[1]:void 0,we.length)),Y=C(Q);return x(we,de,de+Y.length)===Y}})},692:(B,G,a)=>{"use strict";var i=a(3748),v=a(35624),b=a(40892),_=a(11447),C=a(52804),P=a(83528),S=a(88972),R=a(46040),k=a(16216),x=a(46056),D=a(78424),ee=a(99740),te=a(38732),J=a(91992),Q=a(89200),we=a(28340),de=a(64152),Y=a(30692),Se=a(64856),Ye=a(48167),pe=a(14560),ae=a(50368),Ve=a(35045),Ne=a(62460),Ie=a(63244),H=a(41720),j=a(28196),ye=a(58192),Le=a(96480),W=a(10320),We=a(81840),At=a(27732),Ut=a(9635),it=a(94208),ue=a(54200),se=a(5444),ce=a(44904).forEach,K=ye("hidden"),_e="Symbol",Pe="prototype",De=se.set,ke=se.getterFor(_e),Lt=Object[Pe],Dt=v.Symbol,He=Dt&&Dt[Pe],ge=v.RangeError,xt=v.TypeError,pt=v.QObject,rn=pe.f,cn=ae.f,mn=Se.f,dt=Ne.f,lt=_([].push),rt=j("symbols"),kt=j("op-symbols"),an=j("wks"),Yn=!pt||!pt[Pe]||!pt[Pe].findChild,bn=function(Kr,Jr,sr){var or=rn(Lt,Jr);or&&delete Lt[Jr],cn(Kr,Jr,sr),or&&Kr!==Lt&&cn(Lt,Jr,or)},Hn=P&&R(function(){return 7!==we(cn({},"a",{get:function(){return cn(this,"a",{value:7}).a}})).a})?bn:cn,Fn=function(Kr,Jr){var sr=rt[Kr]=we(He);return De(sr,{type:_e,tag:Kr,description:Jr}),P||(sr.description=Jr),sr},On=function(Jr,sr,or){Jr===Lt&&On(kt,sr,or),D(Jr);var zr=te(sr);return D(or),k(rt,zr)?(or.enumerable?(k(Jr,K)&&Jr[K][zr]&&(Jr[K][zr]=!1),or=we(or,{enumerable:Q(0,!1)})):(k(Jr,K)||cn(Jr,K,Q(1,we(null))),Jr[K][zr]=!0),Hn(Jr,zr,or)):cn(Jr,zr,or)},gr=function(Jr,sr){D(Jr);var or=ee(sr),zr=de(or).concat(Nr(or));return ce(zr,function(sn){(!P||b(Vr,or,sn))&&On(Jr,sn,or[sn])}),Jr},Vr=function(Jr){var sr=te(Jr),or=b(dt,this,sr);return!(this===Lt&&k(rt,sr)&&!k(kt,sr))&&(!(or||!k(this,sr)||!k(rt,sr)||k(this,K)&&this[K][sr])||or)},Fr=function(Jr,sr){var or=ee(Jr),zr=te(sr);if(or!==Lt||!k(rt,zr)||k(kt,zr)){var sn=rn(or,zr);return sn&&k(rt,zr)&&!(k(or,K)&&or[K][zr])&&(sn.enumerable=!0),sn}},ti=function(Jr){var sr=mn(ee(Jr)),or=[];return ce(sr,function(zr){!k(rt,zr)&&!k(Le,zr)&<(or,zr)}),or},Nr=function(Kr){var Jr=Kr===Lt,sr=mn(Jr?kt:ee(Kr)),or=[];return ce(sr,function(zr){k(rt,zr)&&(!Jr||k(Lt,zr))&<(or,rt[zr])}),or};S||(Ie(He=(Dt=function(){if(x(He,this))throw new xt("Symbol is not a constructor");var Jr=arguments.length&&void 0!==arguments[0]?J(arguments[0]):void 0,sr=W(Jr),or=function(zr){var sn=void 0===this?v:this;sn===Lt&&b(or,kt,zr),k(sn,K)&&k(sn[K],sr)&&(sn[K][sr]=!1);var Qe=Q(1,zr);try{Hn(sn,sr,Qe)}catch(ut){if(!(ut instanceof ge))throw ut;bn(sn,sr,Qe)}};return P&&Yn&&Hn(Lt,sr,{configurable:!0,set:or}),Fn(sr,Jr)})[Pe],"toString",function(){return ke(this).tag}),Ie(Dt,"withoutSetter",function(Kr){return Fn(W(Kr),Kr)}),Ne.f=Vr,ae.f=On,Ve.f=gr,pe.f=Fr,Y.f=Se.f=ti,Ye.f=Nr,At.f=function(Kr){return Fn(We(Kr),Kr)},P&&(H(He,"description",{configurable:!0,get:function(){return ke(this).description}}),C||Ie(Lt,"propertyIsEnumerable",Vr,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:Dt}),ce(de(an),function(Kr){Ut(Kr)}),i({target:_e,stat:!0,forced:!S},{useSetter:function(){Yn=!0},useSimple:function(){Yn=!1}}),i({target:"Object",stat:!0,forced:!S,sham:!P},{create:function(Jr,sr){return void 0===sr?we(Jr):gr(we(Jr),sr)},defineProperty:On,defineProperties:gr,getOwnPropertyDescriptor:Fr}),i({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:ti}),it(),ue(Dt,_e),Le[K]=!0},35016:(B,G,a)=>{"use strict";var i=a(3748),v=a(83528),b=a(35624),_=a(11447),C=a(16216),P=a(69063),S=a(46056),R=a(91992),k=a(41720),x=a(34304),D=b.Symbol,ee=D&&D.prototype;if(v&&P(D)&&(!("description"in ee)||void 0!==D().description)){var te={},J=function(){var ae=arguments.length<1||void 0===arguments[0]?void 0:R(arguments[0]),Ve=S(ee,this)?new D(ae):void 0===ae?D():D(ae);return""===ae&&(te[Ve]=!0),Ve};x(J,D),J.prototype=ee,ee.constructor=J;var Q="Symbol(description detection)"===String(D("description detection")),we=_(ee.valueOf),de=_(ee.toString),Y=/^Symbol\((.*)\)[^)]+$/,Se=_("".replace),Ye=_("".slice);k(ee,"description",{configurable:!0,get:function(){var ae=we(this);if(C(te,ae))return"";var Ve=de(ae),Ne=Q?Ye(Ve,7,-1):Se(Ve,Y,"$1");return""===Ne?void 0:Ne}}),i({global:!0,constructor:!0,forced:!0},{Symbol:J})}},5256:(B,G,a)=>{"use strict";var i=a(3748),v=a(64960),b=a(16216),_=a(91992),C=a(28196),P=a(4680),S=C("string-to-symbol-registry"),R=C("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!P},{for:function(k){var x=_(k);if(b(S,x))return S[x];var D=v("Symbol")(x);return S[x]=D,R[D]=x,D}})},16968:(B,G,a)=>{"use strict";a(9635)("iterator")},53475:(B,G,a)=>{"use strict";a(692),a(5256),a(11352),a(16760),a(18728)},11352:(B,G,a)=>{"use strict";var i=a(3748),v=a(16216),b=a(26232),_=a(44596),C=a(28196),P=a(4680),S=C("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!P},{keyFor:function(k){if(!b(k))throw new TypeError(_(k)+" is not a symbol");if(v(S,k))return S[k]}})},87168:(B,G,a)=>{"use strict";var i=a(67736),v=a(29480),b=a(83288),_=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",function(S){var R=_(this),k=v(R),x=b(S),D=x>=0?x:k+x;return D<0||D>=k?void 0:R[D]})},20944:(B,G,a)=>{"use strict";var i=a(11447),v=a(67736),_=i(a(68368)),C=v.aTypedArray;(0,v.exportTypedArrayMethod)("copyWithin",function(R,k){return _(C(this),R,k,arguments.length>2?arguments[2]:void 0)})},62496:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).every,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",function(P){return v(b(this),P,arguments.length>1?arguments[1]:void 0)})},7996:(B,G,a)=>{"use strict";var i=a(67736),v=a(85212),b=a(72724),_=a(38040),C=a(40892),P=a(11447),S=a(46040),R=i.aTypedArray,k=i.exportTypedArrayMethod,x=P("".slice);k("fill",function(te){var J=arguments.length;R(this);var Q="Big"===x(_(this),0,3)?b(te):+te;return C(v,this,Q,J>1?arguments[1]:void 0,J>2?arguments[2]:void 0)},S(function(){var ee=0;return new Int8Array(2).fill({valueOf:function(){return ee++}}),1!==ee}))},44376:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).filter,b=a(24848),_=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",function(S){var R=v(_(this),S,arguments.length>1?arguments[1]:void 0);return b(this,R)})},44524:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).findIndex,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",function(P){return v(b(this),P,arguments.length>1?arguments[1]:void 0)})},69712:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).find,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",function(P){return v(b(this),P,arguments.length>1?arguments[1]:void 0)})},61072:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).forEach,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",function(P){v(b(this),P,arguments.length>1?arguments[1]:void 0)})},63240:(B,G,a)=>{"use strict";var i=a(67736),v=a(22196).includes,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",function(P){return v(b(this),P,arguments.length>1?arguments[1]:void 0)})},16964:(B,G,a)=>{"use strict";var i=a(67736),v=a(22196).indexOf,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",function(P){return v(b(this),P,arguments.length>1?arguments[1]:void 0)})},64872:(B,G,a)=>{"use strict";var i=a(35624),v=a(46040),b=a(11447),_=a(67736),C=a(89120),S=a(81840)("iterator"),R=i.Uint8Array,k=b(C.values),x=b(C.keys),D=b(C.entries),ee=_.aTypedArray,te=_.exportTypedArrayMethod,J=R&&R.prototype,Q=!v(function(){J[S].call([1])}),we=!!J&&J.values&&J[S]===J.values&&"values"===J.values.name,de=function(){return k(ee(this))};te("entries",function(){return D(ee(this))},Q),te("keys",function(){return x(ee(this))},Q),te("values",de,Q||!we,{name:"values"}),te(S,de,Q||!we,{name:"values"})},90040:(B,G,a)=>{"use strict";var i=a(67736),v=a(11447),b=i.aTypedArray,_=i.exportTypedArrayMethod,C=v([].join);_("join",function(S){return C(b(this),S)})},92027:(B,G,a)=>{"use strict";var i=a(67736),v=a(54744),b=a(54496),_=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",function(S){var R=arguments.length;return v(b,_(this),R>1?[S,arguments[1]]:[S])})},36288:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).map,b=a(76576),_=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",function(S){return v(_(this),S,arguments.length>1?arguments[1]:void 0,function(R,k){return new(b(R))(k)})})},51336:(B,G,a)=>{"use strict";var i=a(67736),v=a(22396).right,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",function(P){var S=arguments.length;return v(b(this),P,S,S>1?arguments[1]:void 0)})},26932:(B,G,a)=>{"use strict";var i=a(67736),v=a(22396).left,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",function(P){var S=arguments.length;return v(b(this),P,S,S>1?arguments[1]:void 0)})},26596:(B,G,a)=>{"use strict";var i=a(67736),v=i.aTypedArray,_=Math.floor;(0,i.exportTypedArrayMethod)("reverse",function(){for(var x,P=this,S=v(P).length,R=_(S/2),k=0;k<R;)x=P[k],P[k++]=P[--S],P[S]=x;return P})},67696:(B,G,a)=>{"use strict";var i=a(35624),v=a(40892),b=a(67736),_=a(29480),C=a(11544),P=a(16804),S=a(46040),R=i.RangeError,k=i.Int8Array,x=k&&k.prototype,D=x&&x.set,ee=b.aTypedArray,te=b.exportTypedArrayMethod,J=!S(function(){var we=new Uint8ClampedArray(2);return v(D,we,{length:1,0:3},1),3!==we[1]}),Q=J&&b.NATIVE_ARRAY_BUFFER_VIEWS&&S(function(){var we=new k(2);return we.set(1),we.set("2",1),0!==we[0]||2!==we[1]});te("set",function(de){ee(this);var Y=C(arguments.length>
11?arguments[1]:void 0,1),Se=P(de);if(J)return v(D,this,Se,Y);var Ye=this.length,pe=_(Se),ae=0;if(pe+Y>Ye)throw new R("Wrong length");for(;ae<pe;)this[Y+ae]=Se[ae++]},!J||Q)},73784:(B,G,a)=>{"use strict";var i=a(67736),v=a(76576),b=a(46040),_=a(87588),C=i.aTypedArray;(0,i.exportTypedArrayMethod)("slice",function(k,x){for(var D=_(C(this),k,x),ee=v(this),te=0,J=D.length,Q=new ee(J);J>te;)Q[te]=D[te++];return Q},b(function(){new Int8Array(1).slice()}))},89416:(B,G,a)=>{"use strict";var i=a(67736),v=a(44904).some,b=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",function(P){return v(b(this),P,arguments.length>1?arguments[1]:void 0)})},58372:(B,G,a)=>{"use strict";var i=a(35624),v=a(78168),b=a(46040),_=a(11896),C=a(90584),P=a(67736),S=a(92392),R=a(7464),k=a(43356),x=a(40315),D=P.aTypedArray,ee=P.exportTypedArrayMethod,te=i.Uint16Array,J=te&&v(te.prototype.sort),Q=!(!J||b(function(){J(new te(2),null)})&&b(function(){J(new te(2),{})})),we=!!J&&!b(function(){if(k)return k<74;if(S)return S<67;if(R)return!0;if(x)return x<602;var Ye,pe,Y=new te(516),Se=Array(516);for(Ye=0;Ye<516;Ye++)pe=Ye%4,Y[Ye]=515-Ye,Se[Ye]=Ye-2*pe+3;for(J(Y,function(ae,Ve){return(ae/4|0)-(Ve/4|0)}),Ye=0;Ye<516;Ye++)if(Y[Ye]!==Se[Ye])return!0});ee("sort",function(Se){return void 0!==Se&&_(Se),we?J(this,Se):C(D(this),(Y=Se,function(Se,Ye){return void 0!==Y?+Y(Se,Ye)||0:Ye!=Ye?-1:Se!=Se?1:0===Se&&0===Ye?1/Se>0&&1/Ye<0?1:-1:Se>Ye}));var Y},!we||Q)},16604:(B,G,a)=>{"use strict";var i=a(67736),v=a(50960),b=a(34160),_=a(76576),C=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",function(R,k){var x=C(this),D=x.length,ee=b(R,D);return new(_(x))(x.buffer,x.byteOffset+ee*x.BYTES_PER_ELEMENT,v((void 0===k?D:b(k,D))-ee))})},90600:(B,G,a)=>{"use strict";var i=a(35624),v=a(54744),b=a(67736),_=a(46040),C=a(87588),P=i.Int8Array,S=b.aTypedArray,R=b.exportTypedArrayMethod,k=[].toLocaleString,x=!!P&&_(function(){k.call(new P(1))});R("toLocaleString",function(){return v(k,x?C(S(this)):S(this),C(arguments))},_(function(){return[1,2].toLocaleString()!==new P([1,2]).toLocaleString()})||!_(function(){P.prototype.toLocaleString.call([1,2])}))},11296:(B,G,a)=>{"use strict";var i=a(67736).exportTypedArrayMethod,v=a(46040),b=a(35624),_=a(11447),C=b.Uint8Array,P=C&&C.prototype||{},S=[].toString,R=_([].join);v(function(){S.call({})})&&(S=function(){return R(this)}),i("toString",S,P.toString!==S)},17664:(B,G,a)=>{"use strict";a(66736)("Uint8",function(v){return function(_,C,P){return v(this,_,C,P)}})},3944:(B,G,a)=>{"use strict";a(86528)("WeakSet",function(b){return function(){return b(this,arguments.length?arguments[0]:void 0)}},a(51280))},45811:(B,G,a)=>{"use strict";a(3944)},82984:(B,G,a)=>{"use strict";var i=a(35624),v=a(95848),b=a(8280),_=a(75935),C=a(13652),P=function(R){if(R&&R.forEach!==_)try{C(R,"forEach",_)}catch{R.forEach=_}};for(var S in v)v[S]&&P(i[S]&&i[S].prototype);P(b)},29708:(B,G,a)=>{"use strict";var i=a(35624),v=a(95848),b=a(8280),_=a(89120),C=a(13652),P=a(54200),R=a(81840)("iterator"),k=_.values,x=function(ee,te){if(ee){if(ee[R]!==k)try{C(ee,R,k)}catch{ee[R]=k}if(P(ee,te,!0),v[te])for(var J in _)if(ee[J]!==_[J])try{C(ee,J,_[J])}catch{ee[J]=_[J]}}};for(var D in v)x(i[D]&&i[D].prototype,D);x(b,"DOMTokenList")},15704:(B,G,a)=>{"use strict";a(89120);var i=a(3748),v=a(35624),b=a(63440),_=a(40892),C=a(11447),P=a(83528),S=a(18020),R=a(63244),k=a(41720),x=a(5248),D=a(54200),ee=a(12696),te=a(5444),J=a(38176),Q=a(69063),we=a(16216),de=a(62880),Y=a(38040),Se=a(78424),Ye=a(30808),pe=a(91992),ae=a(28340),Ve=a(89200),Ne=a(82704),Ie=a(67508),H=a(42596),j=a(3416),ye=a(81840),Le=a(90584),W=ye("iterator"),We="URLSearchParams",At=We+"Iterator",Ut=te.set,it=te.getterFor(We),ue=te.getterFor(At),se=b("fetch"),ce=b("Request"),K=b("Headers"),_e=ce&&ce.prototype,Pe=K&&K.prototype,De=v.RegExp,ke=v.TypeError,Lt=v.decodeURIComponent,Dt=v.encodeURIComponent,He=C("".charAt),ge=C([].join),xt=C([].push),pt=C("".replace),rn=C([].shift),cn=C([].splice),mn=C("".split),dt=C("".slice),lt=/\+/g,rt=Array(4),kt=function(sr){return rt[sr-1]||(rt[sr-1]=De("((?:%[\\da-f]{2}){"+sr+"})","gi"))},an=function(sr){try{return Lt(sr)}catch{return sr}},Yn=function(sr){var or=pt(sr,lt," "),zr=4;try{return Lt(or)}catch{for(;zr;)or=pt(or,kt(zr--),an);return or}}
vendor: 6,375 bytes, line 1
1,bn=/[!'()~]|%20/g,Hn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Fn=function(sr){return Hn[sr]},On=function(sr){return pt(Dt(sr),bn,Fn)},gr=ee(function(or,zr){Ut(this,{type:At,target:it(or).entries,index:0,kind:zr})},We,function(){var or=ue(this),zr=or.target,sn=or.index++;if(!zr||sn>=zr.length)return or.target=void 0,H(void 0,!0);var Qe=zr[sn];switch(or.kind){case"keys":return H(Qe.key,!1);case"values":return H(Qe.value,!1)}return H([Qe.key,Qe.value],!1)},!0),Mr=function(sr){this.entries=[],this.url=null,void 0!==sr&&(Ye(sr)?this.parseObject(sr):this.parseQuery("string"==typeof sr?"?"===He(sr,0)?dt(sr,1):sr:pe(sr)))};Mr.prototype={type:We,bindURL:function(sr){this.url=sr,this.update()},parseObject:function(sr){var sn,Qe,ut,Xt,wn,dr,vn,or=this.entries,zr=Ie(sr);if(zr)for(Qe=(sn=Ne(sr,zr)).next;!(ut=_(Qe,sn)).done;){if(Xt=Ne(Se(ut.value)),(dr=_(wn=Xt.next,Xt)).done||(vn=_(wn,Xt)).done||!_(wn,Xt).done)throw new ke("Expected sequence with length 2");xt(or,{key:pe(dr.value),value:pe(vn.value)})}else for(var jt in sr)we(sr,jt)&&xt(or,{key:jt,value:pe(sr[jt])})},parseQuery:function(sr){if(sr)for(var Qe,ut,or=this.entries,zr=mn(sr,"&"),sn=0;sn<zr.length;)(Qe=zr[sn++]).length&&(ut=mn(Qe,"="),xt(or,{key:Yn(rn(ut)),value:Yn(ge(ut,"="))}))},serialize:function(){for(var sn,sr=this.entries,or=[],zr=0;zr<sr.length;)sn=sr[zr++],xt(or,On(sn.key)+"="+On(sn.value));return ge(or,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Vr=function(){J(this,Fr);var zr=Ut(this,new Mr(arguments.length>0?arguments[0]:void 0));P||(this.size=zr.entries.length)},Fr=Vr.prototype;if(x(Fr,{append:function(or,zr){var sn=it(this);j(arguments.length,2),xt(sn.entries,{key:pe(or),value:pe(zr)}),P||this.length++,sn.updateURL()},delete:function(sr){for(var or=it(this),zr=j(arguments.length,1),sn=or.entries,Qe=pe(sr),ut=zr<2?void 0:arguments[1],Xt=void 0===ut?ut:pe(ut),wn=0;wn<sn.length;){var dr=sn[wn];if(dr.key!==Qe||void 0!==Xt&&dr.value!==Xt)wn++;else if(cn(sn,wn,1),void 0!==Xt)break}P||(this.size=sn.length),or.updateURL()},get:function(or){var zr=it(this).entries;j(arguments.length,1);for(var sn=pe(or),Qe=0;Qe<zr.length;Qe++)if(zr[Qe].key===sn)return zr[Qe].value;return null},getAll:function(or){var zr=it(this).entries;j(arguments.length,1);for(var sn=pe(or),Qe=[],ut=0;ut<zr.length;ut++)zr[ut].key===sn&&xt(Qe,zr[ut].value);return Qe},has:function(or){for(var zr=it(this).entries,sn=j(arguments.length,1),Qe=pe(or),ut=sn<2?void 0:arguments[1],Xt=void 0===ut?ut:pe(ut),wn=0;wn<zr.length;){var dr=zr[wn++];if(dr.key===Qe&&(void 0===Xt||dr.value===Xt))return!0}return!1},set:function(or,zr){var sn=it(this);j(arguments.length,1);for(var vn,Qe=sn.entries,ut=!1,Xt=pe(or),wn=pe(zr),dr=0;dr<Qe.length;dr++)(vn=Qe[dr]).key===Xt&&(ut?cn(Qe,dr--,1):(ut=!0,vn.value=wn));ut||xt(Qe,{key:Xt,value:wn}),P||(this.size=Qe.length),sn.updateURL()},sort:function(){var or=it(this);Le(or.entries,function(zr,sn){return zr.key>sn.key?1:-1}),or.updateURL()},forEach:function(or){for(var ut,zr=it(this).entries,sn=de(or,arguments.length>1?arguments[1]:void 0),Qe=0;Qe<zr.length;)sn((ut=zr[Qe++]).value,ut.key,this)},keys:function(){return new gr(this,"keys")},values:function(){return new gr(this,"values")},entries:function(){return new gr(this,"entries")}},{enumerable:!0}),R(Fr,W,Fr.entries,{name:"entries"}),R(Fr,"toString",function(){return it(this).serialize()},{enumerable:!0}),P&&k(Fr,"size",{get:function(){return it(this).entries.length},configurable:!0,enumerable:!0}),D(Vr,We),i({global:!0,constructor:!0,forced:!S},{URLSearchParams:Vr}),!S&&Q(K)){var ti=C(Pe.has),Nr=C(Pe.set),Kr=function(sr){if(Ye(sr)){var zr,or=sr.body;if(Y(or)===We)return zr=sr.headers?new K(sr.headers):new K,ti(zr,"content-type")||Nr(zr,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),ae(sr,{body:Ve(0,pe(or)),headers:Ve(0,zr)})}return sr};if(Q(se)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(or){return se(or,arguments.length>1?Kr(arguments[1]):{})}}),Q(ce)){var Jr=function(or){return J(this,_e),new ce(or,arguments.length>1?Kr(arguments[1]):{})};_e.constructor=Jr,Jr.prototype=_e,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Jr})}}B.exports={URLSearchParams:Vr,getState:it}},34088:(B,G,a)=>{"use strict";a(15704)},57332:(B,G,a)=>{"use strict";a(48928);var bn,i=a(3748),v=a(83528),b=a(18020),_=a(35624),C=a(62880),P=a(11447),S=a(63244),R=a(41720),k=a(38176),x=a(16216),D=a(57048),ee=a(27992),te=a(87588),J=a(1968).codeAt,Q=a(1572),we=a(91992),de=a(54200),Y=a(3416),Se=a(15704),Ye=a(5444),pe=Ye.set,ae=Ye.getterFor("URL"),Ve=Se.URLSearchParams,Ne=Se.getState,Ie=_.URL,H=_.TypeError,j=_.parseInt,ye=Math.floor,Le=Math.pow,W=P("".charAt),We=P(/./.exec),At=P([].join),Ut=P(1..toString),it=P([].pop),ue=P([].push),se=P("".replace),ce=P([].shift),K=P("".split),_e=P("".slice),Pe=P("".toLowerCase),De=P([].unshift),Lt="Invalid scheme",Dt="Invalid host",He="Invalid port",ge=/[a-z]/i,xt=/[\d+-.a-z]/i,pt=/\d/,rn=/^0x/i,cn=/^[0-7]+$/,mn=/^\d+$/,dt=/^[\da-f]+$/i,lt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,kt=/^[\u0000-\u0020]+/,an=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Yn=/[\t\n\r]/g,gr=function(Ht){var Wn,$n,jn,wr;if("number"==typeof Ht){for(Wn=[],$n=0;$n<4;$n++)De(Wn,Ht%256),Ht=ye(Ht/256);return At(Wn,".")}if("object"==typeof Ht){for(Wn="",jn=function(Ht){for(var Wn=null,$n=1,jn=null,wr=0,mi=0;mi<8;mi++)0!==Ht[mi]?(wr>$n&&(Wn=jn,$n=wr),jn=null,wr=0):(null===jn&&(jn=mi),++wr);return wr>$n&&(Wn=jn,$n=wr),Wn}(Ht),$n=0;$n<8;$n++)wr&&0===Ht[$n]||(wr&&(wr=!1),jn===$n?(Wn+=$n?":":"::",wr=!0):(Wn+=Ut(Ht[$n],16),$n<7&&(Wn+=":")));return"["+Wn+"]"}return Ht},Mr={},Vr=D({},Mr,{" ":1,'"':1,"<":1,">":1,"`":1}),Fr=D({},Vr,{"#":1,"?":1,"{":1,"}":1}),ti=D({},Fr,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Nr=function(Ht,Wn){var $n=J(Ht,0);return $n>32&&$n<127&&!x(Wn,Ht)?Ht:encodeURIComponent(Ht)},Kr={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Jr=function(Ht,Wn){var $n;return 2===Ht.length&&We(ge,W(Ht,0))&&(":"===($n=W(Ht,1))||!Wn&&"|"===$n)},sr=function(Ht){var Wn;return Ht.length>1&&Jr(_e(Ht,0,2))&&(2===Ht.length||"/"===(Wn=W(Ht,2))||"\\"===Wn||"?"===Wn||"#"===Wn)},or=function(Ht){return"."===Ht||"%2e"===Pe(Ht)},zr=function(Ht){return".."===(Ht=Pe(Ht))||"%2e."===Ht||".%2e"===Ht||"%2e%2e"===
vendor: 7,711 bytes, line 1
1Ht},sn={},Qe={},ut={},Xt={},wn={},dr={},vn={},jt={},Ct={},Mt={},Ze={},et={},Zt={},Fe={},ft={},dn={},Tn={},Bn={},mr={},tr={},Ir={},ur=function(Ht,Wn,$n){var wr,mi,di,jn=we(Ht);if(Wn){if(mi=this.parse(jn))throw new H(mi);this.searchParams=null}else{if(void 0!==$n&&(wr=new ur($n,!0)),mi=this.parse(jn,null,wr))throw new H(mi);(di=Ne(new Ve)).bindURL(this),this.searchParams=di}};ur.prototype={type:"URL",parse:function(Ht,Wn,$n){var Ln,Cn,kr,si,jn=this,wr=Wn||sn,mi=0,di="",Mi=!1,Qt=!1,_n=!1;for(Ht=we(Ht),Wn||(jn.scheme="",jn.username="",jn.password="",jn.host=null,jn.port=null,jn.path=[],jn.query=null,jn.fragment=null,jn.cannotBeABaseURL=!1,Ht=se(Ht,kt,""),Ht=se(Ht,an,"$1")),Ht=se(Ht,Yn,""),Ln=ee(Ht);mi<=Ln.length;){switch(Cn=Ln[mi],wr){case sn:if(!Cn||!We(ge,Cn)){if(Wn)return Lt;wr=ut;continue}di+=Pe(Cn),wr=Qe;break;case Qe:if(Cn&&(We(xt,Cn)||"+"===Cn||"-"===Cn||"."===Cn))di+=Pe(Cn);else{if(":"!==Cn){if(Wn)return Lt;di="",wr=ut,mi=0;continue}if(Wn&&(jn.isSpecial()!==x(Kr,di)||"file"===di&&(jn.includesCredentials()||null!==jn.port)||"file"===jn.scheme&&!jn.host))return;if(jn.scheme=di,Wn)return void(jn.isSpecial()&&Kr[jn.scheme]===jn.port&&(jn.port=null));di="","file"===jn.scheme?wr=Fe:jn.isSpecial()&&$n&&$n.scheme===jn.scheme?wr=Xt:jn.isSpecial()?wr=jt:"/"===Ln[mi+1]?(wr=wn,mi++):(jn.cannotBeABaseURL=!0,ue(jn.path,""),wr=mr)}break;case ut:if(!$n||$n.cannotBeABaseURL&&"#"!==Cn)return Lt;if($n.cannotBeABaseURL&&"#"===Cn){jn.scheme=$n.scheme,jn.path=te($n.path),jn.query=$n.query,jn.fragment="",jn.cannotBeABaseURL=!0,wr=Ir;break}wr="file"===$n.scheme?Fe:dr;continue;case Xt:if("/"!==Cn||"/"!==Ln[mi+1]){wr=dr;continue}wr=Ct,mi++;break;case wn:if("/"===Cn){wr=Mt;break}wr=Bn;continue;case dr:if(jn.scheme=$n.scheme,Cn===bn)jn.username=$n.username,jn.password=$n.password,jn.host=$n.host,jn.port=$n.port,jn.path=te($n.path),jn.query=$n.query;else if("/"===Cn||"\\"===Cn&&jn.isSpecial())wr=vn;else if("?"===Cn)jn.username=$n.username,jn.password=$n.password,jn.host=$n.host,jn.port=$n.port,jn.path=te($n.path),jn.query="",wr=tr;else{if("#"!==Cn){jn.username=$n.username,jn.password=$n.password,jn.host=$n.host,jn.port=$n.port,jn.path=te($n.path),jn.path.length--,wr=Bn;continue}jn.username=$n.username,jn.password=$n.password,jn.host=$n.host,jn.port=$n.port,jn.path=te($n.path),jn.query=$n.query,jn.fragment="",wr=Ir}break;case vn:if(!jn.isSpecial()||"/"!==Cn&&"\\"!==Cn){if("/"!==Cn){jn.username=$n.username,jn.password=$n.password,jn.host=$n.host,jn.port=$n.port,wr=Bn;continue}wr=Mt}else wr=Ct;break;case jt:if(wr=Ct,"/"!==Cn||"/"!==W(di,mi+1))continue;mi++;break;case Ct:if("/"!==Cn&&"\\"!==Cn){wr=Mt;continue}break;case Mt:if("@"===Cn){Mi&&(di="%40"+di),Mi=!0,kr=ee(di);for(var oi=0;oi<kr.length;oi++){var Ii=kr[oi];if(":"!==Ii||_n){var yi=Nr(Ii,ti);_n?jn.password+=yi:jn.username+=yi}else _n=!0}di=""}else if(Cn===bn||"/"===Cn||"?"===Cn||"#"===Cn||"\\"===Cn&&jn.isSpecial()){if(Mi&&""===di)return"Invalid authority";mi-=ee(di).length+1,di="",wr=Ze}else di+=Cn;break;case Ze:case et:if(Wn&&"file"===jn.scheme){wr=dn;continue}if(":"!==Cn||Qt){if(Cn===bn||"/"===Cn||"?"===Cn||"#"===Cn||"\\"===Cn&&jn.isSpecial()){if(jn.isSpecial()&&""===di)return Dt;if(Wn&&""===di&&(jn.includesCredentials()||null!==jn.port))return;if(si=jn.parseHost(di))return si;if(di="",wr=Tn,Wn)return;continue}"["===Cn?Qt=!0:"]"===Cn&&(Qt=!1),di+=Cn}else{if(""===di)return Dt;if(si=jn.parseHost(di))return si;if(di="",wr=Zt,Wn===et)return}break;case Zt:if(!We(pt,Cn)){if(Cn===bn||"/"===Cn||"?"===Cn||"#"===Cn||"\\"===Cn&&jn.isSpecial()||Wn){if(""!==di){var on=j(di,10);if(on>65535)return He;jn.port=jn.isSpecial()&&on===Kr[jn.scheme]?null:on,di=""}if(Wn)return;wr=Tn;continue}return He}di+=Cn;break;case Fe:if(jn.scheme="file","/"===Cn||"\\"===Cn)wr=ft;else{if(!$n||"file"!==$n.scheme){wr=Bn;continue}switch(Cn){case bn:jn.host=$n.host,jn.path=te($n.path),jn.query=$n.query;break;case"?":jn.host=$n.host,jn.path=te($n.path),jn.query="",wr=tr;break;case"#":jn.host=$n.host,jn.path=te($n.path),jn.query=$n.query,jn.fragment="",wr=Ir;break;default:sr(At(te(Ln,mi),""))||(jn.host=$n.host,jn.path=te($n.path),jn.shortenPath()),wr=Bn;continue}}break;case ft:if("/"===Cn||"\\"===Cn){wr=dn;break}$n&&"file"===$n.scheme&&!sr(At(te(Ln,mi),""))&&(Jr($n.path[0],!0)?ue(jn.path,$n.path[0]):jn.host=$n.host),wr=Bn;continue;case dn:if(Cn===bn||"/"===Cn||"\\"===Cn||"?"===Cn||"#"===Cn){if(!Wn&&Jr(di))wr=Bn;else if(""===di){if(jn.host="",Wn)return;wr=Tn}else{if(si=jn.parseHost(di))return si;if("localhost"===jn.host&&(jn.host=""),Wn)return;di="",wr=Tn}continue}di+=Cn;break;case Tn:if(jn.isSpecial()){if(wr=Bn,"/"!==Cn&&"\\"!==Cn)continue}else if(Wn||"?"!==Cn)if(Wn||"#"!==Cn){if(Cn!==bn&&(wr=Bn,"/"!==Cn))continue}else jn.fragment="",wr=Ir;else jn.query="",wr=tr;break;case Bn:if(Cn===bn||"/"===Cn||"\\"===Cn&&jn.isSpecial()||!Wn&&("?"===Cn||"#"===Cn)){if(zr(di)?(jn.shortenPath(),"/"!==Cn&&!("\\"===Cn&&jn.isSpecial())&&ue(jn.path,"")):or(di)?"/"!==Cn&&!("\\"===Cn&&jn.isSpecial())&&ue(jn.path,""):("file"===jn.scheme&&!jn.path.length&&Jr(di)&&(jn.host&&(jn.host=""),di=W(di,0)+":"),ue(jn.path,di)),di="","file"===jn.scheme&&(Cn===bn||"?"===Cn||"#"===Cn))for(;jn.path.length>1&&""===jn.path[0];)ce(jn.path);"?"===Cn?(jn.query="",wr=tr):"#"===Cn&&(jn.fragment="",wr=Ir)}else di+=Nr(Cn,Fr);break;case mr:"?"===Cn?(jn.query="",wr=tr):"#"===Cn?(jn.fragment="",wr=Ir):Cn!==bn&&(jn.path[0]+=Nr(Cn,Mr));break;case tr:Wn||"#"!==Cn?Cn!==bn&&("'"===Cn&&jn.isSpecial()?jn.query+="%27":jn.query+="#"===Cn?"%23":Nr(Cn,Mr)):(jn.fragment="",wr=Ir);break;case Ir:Cn!==bn&&(jn.fragment+=Nr(Cn,Vr))}mi++}},parseHost:function(Ht){var Wn,$n,jn;if("["===W(Ht,0)){if("]"!==W(Ht,Ht.length-1)||(Wn=function(Ht){var mi,di,Mi,Qt,_n,Ln,Cn,Wn=[0,0,0,0,0,0,0,0],$n=0,jn=null,wr=0,kr=function(){return W(Ht,wr)};if(":"===kr()){if(":"!==W(Ht,1))return;wr+=2,jn=++$n}for(;kr();){if(8===$n)return;if(":"!==kr()){for(mi=di=0;di<4&&We(dt,kr());)mi=16*mi+j(kr(),16),wr++,di++;if("."===kr()){if(0===di||(wr-=di,$n>6))return;for(Mi=0;kr();){if(Qt=null,Mi>0){if(!("."===kr()&&Mi<4))return;wr++}if(!We(pt,kr()))return;for(;We(pt,kr());){if(_n=j(kr(),10),null===Qt)Qt=_n;else{if(0===Qt)return;Qt=10*Qt+_n}if(Qt>255)return;wr++}Wn[$n]=256*Wn[$n]+Qt,(2==++Mi||4===Mi)&&$n++}if(4!==Mi)return;break}if(":"===kr()){if(wr++,!kr())return}else if(kr())return;Wn[$n++]=mi}else{if(null!==jn)return;wr++,jn=++$n}}if(null!==jn)for(Ln=$n-jn,$n=7;0!==$n&&Ln>0;)Cn=Wn[$n],Wn[$n--]=Wn[jn+Ln-1],Wn[jn+--Ln]=Cn;else if(8!==$n)return;return Wn}(_e(Ht,1,-1)),!Wn))return Dt;this.host=Wn}else if(this.isSpecial()){if(Ht=Q(Ht),We(lt,Ht)||(Wn=function(Ht){var $n,jn,wr,mi,di,Mi,Qt,Wn=K(Ht,".");if(Wn.length&&""===Wn[Wn.length-1]&&Wn.length--,($n=Wn.length)>4)return Ht;for(jn=[],wr=0;wr<$n;wr++){if(""===(mi=Wn[wr]))return Ht;if(di=10,mi.length>1&&"0"===W(mi,0)&&(di=We(rn,mi)?16:8,mi=_e(mi,8===di?1:2)),""===mi)Mi=0;else{if(!We(10===di?mn:8===di?cn:dt,mi))return Ht;Mi=j(mi,di)}ue(jn,Mi)}for(wr=0;wr<$n;wr++)if(Mi=jn[wr],wr===$n-1){if(Mi>=Le(256,5-$n))return null}else if(Mi>255)return null;for(Qt=it(jn),wr=0;wr<jn.length;wr++)Qt+=jn[wr]*Le(256,3-wr);return Qt}(Ht),null===Wn))return Dt;this.host=Wn}else{if(We(rt,Ht))return Dt;for(Wn="",$n=ee(Ht),jn=0;jn<$n.length;jn++)Wn+=Nr($n[jn],Mr);this.host=Wn}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return x(Kr,this.scheme)},shortenPath:function(){var Ht=this.path,Wn=Ht.length;Wn&&("file"!==this.scheme||1!==Wn||!Jr(Ht[0],!0))&&Ht.length--},serialize:function(){var Ht=this,Wn=Ht.scheme,$n=Ht.username,jn=Ht.password,wr=Ht.host,mi=Ht.port,di=Ht.path,Mi=Ht.query,Qt=Ht.fragment,_n=Wn+":";
1return null!==wr?(_n+="//",Ht.includesCredentials()&&(_n+=$n+(jn?":"+jn:"")+"@"),_n+=gr(wr),null!==mi&&(_n+=":"+mi)):"file"===Wn&&(_n+="//"),_n+=Ht.cannotBeABaseURL?di[0]:di.length?"/"+At(di,"/"):"",null!==Mi&&(_n+="?"+Mi),null!==Qt&&(_n+="#"+Qt),_n},setHref:function(Ht){var Wn=this.parse(Ht);if(Wn)throw new H(Wn);this.searchParams.update()},getOrigin:function(){var Ht=this.scheme,Wn=this.port;if("blob"===Ht)try{return new Er(Ht.path[0]).origin}catch{return"null"}return"file"!==Ht&&this.isSpecial()?Ht+"://"+gr(this.host)+(null!==Wn?":"+Wn:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(Ht){this.parse(we(Ht)+":",sn)},getUsername:function(){return this.username},setUsername:function(Ht){var Wn=ee(we(Ht));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var $n=0;$n<Wn.length;$n++)this.username+=Nr(Wn[$n],ti)}},getPassword:function(){return this.password},setPassword:function(Ht){var Wn=ee(we(Ht));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var $n=0;$n<Wn.length;$n++)this.password+=Nr(Wn[$n],ti)}},getHost:function(){var Ht=this.host,Wn=this.port;return null===Ht?"":null===Wn?gr(Ht):gr(Ht)+":"+Wn},setHost:function(Ht){this.cannotBeABaseURL||this.parse(Ht,Ze)},getHostname:function(){var Ht=this.host;return null===Ht?"":gr(Ht)},setHostname:function(Ht){this.cannotBeABaseURL||this.parse(Ht,et)},getPort:function(){var Ht=this.port;return null===Ht?"":we(Ht)},setPort:function(Ht){this.cannotHaveUsernamePasswordPort()||(""===(Ht=we(Ht))?this.port=null:this.parse(Ht,Zt))},getPathname:function(){var Ht=this.path;return this.cannotBeABaseURL?Ht[0]:Ht.length?"/"+At(Ht,"/"):""},setPathname:function(Ht){this.cannotBeABaseURL||(this.path=[],this.parse(Ht,Tn))},getSearch:function(){var Ht=this.query;return Ht?"?"+Ht:""},setSearch:function(Ht){""===(Ht=we(Ht))?this.query=null:("?"===W(Ht,0)&&(Ht=_e(Ht,1)),this.query="",this.parse(Ht,tr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var Ht=this.fragment;return Ht?"#"+Ht:""},setHash:function(Ht){""!==(Ht=we(Ht))?("#"===W(Ht,0)&&(Ht=_e(Ht,1)),this.fragment="",this.parse(Ht,Ir)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Er=function(Wn){var $n=k(this,Ai),jn=Y(arguments.length,1)>1?arguments[1]:void 0,wr=pe($n,new ur(Wn,!1,jn));v||($n.href=wr.serialize(),$n.origin=wr.getOrigin(),$n.protocol=wr.getProtocol(),$n.username=wr.getUsername(),$n.password=wr.getPassword(),$n.host=wr.getHost(),$n.hostname=wr.getHostname(),$n.port=wr.getPort(),$n.pathname=wr.getPathname(),$n.search=wr.getSearch(),$n.searchParams=wr.getSearchParams(),$n.hash=wr.getHash())},Ai=Er.prototype,Di=function(Ht,Wn){return{get:function(){return ae(this)[Ht]()},set:Wn&&function($n){return ae(this)[Wn]($n)},configurable:!0,enumerable:!0}};if(v&&(R(Ai,"href",Di("serialize","setHref")),R(Ai,"origin",Di("getOrigin")),R(Ai,"protocol",Di("getProtocol","setProtocol")),R(Ai,"username",Di("getUsername","setUsername")),R(Ai,"password",Di("getPassword","setPassword")),R(Ai,"host",Di("getHost","setHost")),R(Ai,"hostname",Di("getHostname","setHostname")),R(Ai,"port",Di("getPort","setPort")),R(Ai,"pathname",Di("getPathname","setPathname")),R(Ai,"search",Di("getSearch","setSearch")),R(Ai,"searchParams",Di("getSearchParams")),R(Ai,"hash",Di("getHash","setHash"))),S(Ai,"toJSON",function(){return ae(this).serialize()},{enumerable:!0}),S(Ai,"toString",function(){return ae(this).serialize()},{enumerable:!0}),Ie){var Pi=Ie.createObjectURL,nr=Ie.revokeObjectURL;Pi&&S(Er,"createObjectURL",C(Pi,Ie)),nr&&S(Er,"revokeObjectURL",C(nr,Ie))}de(Er,"URL"),i({global:!0,constructor:!0,forced:!b,sham:!v},{URL:Er})},544:(B,G,a)=>{"use strict";a(57332)},73448:(B,G,a)=>{"use strict";function i(b,_,C,P,S,R,k){try{var x=b[R](k),D=x.value}catch(ee){return void C(ee)}x.done?_(D):Promise.resolve(D).then(P,S)}function v(b){return function(){var _=this,C=arguments;return new Promise(function(P,S){var R=b.apply(_,C);function k(D){i(R,P,S,k,x,"next",D)}function x(D){i(R,P,S,k,x,"throw",D)}k(void 0)})}}a.d(G,{c:()=>v})},29684:(B,G,a)=>{"use strict";a.d(G,{AN:()=>v,Cs:()=>_,K2:()=>R,Wq:()=>Ie,aK:()=>x,aM:()=>H,gV:()=>b,iC:()=>P,kP:()=>Ne,m0:()=>i,wb:()=>S});var i=function(j){return j[j.State=0]="State",j[j.Transition=1]="Transition",j[j.Sequence=2]="Sequence",j[j.Group=3]="Group",j[j.Animate=4]="Animate",j[j.Keyframes=5]="Keyframes",j[j.Style=6]="Style",j[j.Trigger=7]="Trigger",j[j.Reference=8]="Reference",j[j.AnimateChild=9]="AnimateChild",j[j.AnimateRef=10]="AnimateRef",j[j.Query=11]="Query",j[j.Stagger=12]="Stagger",j}(i||{});const v="*";function b(j,ye){return{type:i.Trigger,name:j,definitions:ye,options:{}}}function _(j,ye=null){return{type:i.Animate,styles:ye,timings:j}}function P(j,ye=null){return{type:i.Sequence,steps:j,options:ye}}function S(j){return{type:i.Style,styles:j,offset:null}}function R(j,ye,Le){return{type:i.State,name:j,styles:ye,options:Le}}function x(j,ye,Le=null){return{type:i.Transition,expr:j,animation:ye,options:Le}}class Ne{constructor(ye=0,Le=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=ye+Le}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(ye=>ye()),this._onDoneFns=[])}onStart(ye){this._originalOnStartFns.push(ye),this._onStartFns.push(ye)}onDone(ye){this._originalOnDoneFns.push(ye),this._onDoneFns.push(ye)}onDestroy(ye){this._onDestroyFns.push(ye)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(ye=>ye()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(ye=>ye()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(ye){this._position=this.totalTime?ye*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(ye){const Le="start"==ye?this._onStartFns:this._onDoneFns;Le.forEach(W=>W()),Le.length=0}}class Ie{constructor(ye){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=ye;let Le=0,W=0,We=0;const At=this.players.length;0==At?queueMicrotask(()=>
1this._onFinish()):this.players.forEach(Ut=>{Ut.onDone(()=>{++Le==At&&this._onFinish()}),Ut.onDestroy(()=>{++W==At&&this._onDestroy()}),Ut.onStart(()=>{++We==At&&this._onStart()})}),this.totalTime=this.players.reduce((Ut,it)=>Math.max(Ut,it.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(ye=>ye()),this._onDoneFns=[])}init(){this.players.forEach(ye=>ye.init())}onStart(ye){this._onStartFns.push(ye)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(ye=>ye()),this._onStartFns=[])}onDone(ye){this._onDoneFns.push(ye)}onDestroy(ye){this._onDestroyFns.push(ye)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(ye=>ye.play())}pause(){this.players.forEach(ye=>ye.pause())}restart(){this.players.forEach(ye=>ye.restart())}finish(){this._onFinish(),this.players.forEach(ye=>ye.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(ye=>ye.destroy()),this._onDestroyFns.forEach(ye=>ye()),this._onDestroyFns=[])}reset(){this.players.forEach(ye=>ye.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(ye){const Le=ye*this.totalTime;this.players.forEach(W=>{const We=W.totalTime?Math.min(1,Le/W.totalTime):1;W.setPosition(We)})}getPosition(){const ye=this.players.reduce((Le,W)=>null===Le||W.totalTime>Le.totalTime?W:Le,null);return null!=ye?ye.getPosition():0}beforeDestroy(){this.players.forEach(ye=>{ye.beforeDestroy&&ye.beforeDestroy()})}triggerCallback(ye){const Le="start"==ye?this._onStartFns:this._onDoneFns;Le.forEach(W=>W()),Le.length=0}}const H="!"},91368:(B,G,a)=>{"use strict";a.d(G,{Ko:()=>br,MD:()=>rr,MP:()=>de,OM:()=>Je,QF:()=>si,Qd:()=>J,Qt:()=>Nn,Sg:()=>Ln,Ud:()=>S,Wm:()=>Br,XV:()=>ir,YZ:()=>Ci,_k:()=>fr,_m:()=>Mr,a:()=>zt,ay:()=>on,c0:()=>Oi,cf:()=>ne,hl:()=>ie,mQ:()=>k,mg:()=>C,oB:()=>Y,oL:()=>It,od:()=>Vt,qq:()=>Wt,uC:()=>we,u_:()=>Re,uf:()=>bs,ug:()=>_,uy:()=>b,y:()=>Z});var i=a(32116);let v=null;function b(){return v}function _(X){v??=X}class C{}const S=new i.UbH("");let R=(()=>{class X{historyGo(Ae){throw new Error("")}static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275prov=i.wxM({token:X,factory:()=>(0,i.uUt)(x),providedIn:"platform"})}return X})();const k=new i.UbH("");let x=(()=>{class X extends R{constructor(){super(),this._doc=(0,i.uUt)(S),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return b().getBaseHref(this._doc)}onPopState(Ae){const yt=b().getGlobalEventTarget(this._doc,"window");return yt.addEventListener("popstate",Ae,!1),()=>yt.removeEventListener("popstate",Ae)}onHashChange(Ae){const yt=b().getGlobalEventTarget(this._doc,"window");return yt.addEventListener("hashchange",Ae,!1),()=>yt.removeEventListener("hashchange",Ae)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(Ae){this._location.pathname=Ae}pushState(Ae,yt,xn){this._history.pushState(Ae,yt,xn)}replaceState(Ae,yt,xn){this._history.replaceState(Ae,yt,xn)}forward(){this._history.forward()}back(){this._history.back()}historyGo(Ae=0){this._history.go(Ae)}getState(){return this._history.state}static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275prov=i.wxM({token:X,factory:()=>new X,providedIn:"platform"})}return X})();function D(X,ot){if(0==X.length)return ot;if(0==ot.length)return X;let Ae=0;return X.endsWith("/")&&Ae++,ot.startsWith("/")&&Ae++,2==Ae?X+ot.substring(1):1==Ae?X+ot:X+"/"+ot}function ee(X){const ot=X.match(/#|\?|$/),Ae=ot&&ot.index||X.length;return X.slice(0,Ae-("/"===X[Ae-1]?1:0))+X.slice(Ae)}function te(X){return X&&"?"!==X[0]?"?"+X:X}let J=(()=>{class X{historyGo(Ae){throw new Error("")}static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275prov=i.wxM({token:X,factory:()=>(0,i.uUt)(we),providedIn:"root"})}return X})();const Q=new i.UbH("");let we=(()=>{class X extends J{constructor(Ae,yt){super(),this._platformLocation=Ae,this._removeListenerFns=[],this._baseHref=yt??this._platformLocation.getBaseHrefFromDOM()??(0,i.uUt)(S).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(Ae){this._removeListenerFns.push(this._platformLocation.onPopState(Ae),this._platformLocation.on
1HashChange(Ae))}getBaseHref(){return this._baseHref}prepareExternalUrl(Ae){return D(this._baseHref,Ae)}path(Ae=!1){const yt=this._platformLocation.pathname+te(this._platformLocation.search),xn=this._platformLocation.hash;return xn&&Ae?`${yt}${xn}`:yt}pushState(Ae,yt,xn,qn){const Pr=this.prepareExternalUrl(xn+te(qn));this._platformLocation.pushState(Ae,yt,Pr)}replaceState(Ae,yt,xn,qn){const Pr=this.prepareExternalUrl(xn+te(qn));this._platformLocation.replaceState(Ae,yt,Pr)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(Ae=0){this._platformLocation.historyGo?.(Ae)}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.CoB(R),i.CoB(Q,8))};static#t=this.\u0275prov=i.wxM({token:X,factory:X.\u0275fac,providedIn:"root"})}return X})(),de=(()=>{class X extends J{constructor(Ae,yt){super(),this._platformLocation=Ae,this._baseHref="",this._removeListenerFns=[],null!=yt&&(this._baseHref=yt)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(Ae){this._removeListenerFns.push(this._platformLocation.onPopState(Ae),this._platformLocation.onHashChange(Ae))}getBaseHref(){return this._baseHref}path(Ae=!1){const yt=this._platformLocation.hash??"#";return yt.length>0?yt.substring(1):yt}prepareExternalUrl(Ae){const yt=D(this._baseHref,Ae);return yt.length>0?"#"+yt:yt}pushState(Ae,yt,xn,qn){let Pr=this.prepareExternalUrl(xn+te(qn));0==Pr.length&&(Pr=this._platformLocation.pathname),this._platformLocation.pushState(Ae,yt,Pr)}replaceState(Ae,yt,xn,qn){let Pr=this.prepareExternalUrl(xn+te(qn));0==Pr.length&&(Pr=this._platformLocation.pathname),this._platformLocation.replaceState(Ae,yt,Pr)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(Ae=0){this._platformLocation.historyGo?.(Ae)}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.CoB(R),i.CoB(Q,8))};static#t=this.\u0275prov=i.wxM({token:X,factory:X.\u0275fac})}return X})(),Y=(()=>{class X{constructor(Ae){this._subject=new i._w7,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=Ae;const yt=this._locationStrategy.getBaseHref();this._basePath=function ae(X){if(new RegExp("^(https?:)?//").test(X)){const[,Ae]=X.split(/\/\/[^\/]+/);return Ae}return X}(ee(pe(yt))),this._locationStrategy.onPopState(xn=>{this._subject.emit({url:this.path(!0),pop:!0,state:xn.state,type:xn.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(Ae=!1){return this.normalize(this._locationStrategy.path(Ae))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(Ae,yt=""){return this.path()==this.normalize(Ae+te(yt))}normalize(Ae){return X.stripTrailingSlash(function Ye(X,ot){if(!X||!ot.startsWith(X))return ot;const Ae=ot.substring(X.length);return""===Ae||["/",";","?","#"].includes(Ae[0])?Ae:ot}(this._basePath,pe(Ae)))}prepareExternalUrl(Ae){return Ae&&"/"!==Ae[0]&&(Ae="/"+Ae),this._locationStrategy.prepareExternalUrl(Ae)}go(Ae,yt="",xn=null){this._locationStrategy.pushState(xn,"",Ae,yt),this._notifyUrlChangeListeners(this.prepareExternalUrl(Ae+te(yt)),xn)}replaceState(Ae,yt="",xn=null){this._locationStrategy.replaceState(xn,"",Ae,yt),this._notifyUrlChangeListeners(this.prepareExternalUrl(Ae+te(yt)),xn)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(Ae=0){this._locationStrategy.historyGo?.(Ae)}onUrlChange(Ae){return this._urlChangeListeners.push(Ae),this._urlChangeSubscription??=this.subscribe(yt=>{this._notifyUrlChangeListeners(yt.url,yt.state)}),()=>{const yt=this._urlChangeListeners.indexOf(Ae);this._urlChangeListeners.splice(yt,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(Ae="",yt){this._urlChangeListeners.forEach(xn=>xn(Ae,yt))}subscribe(Ae,yt,xn){return this._subject.subscribe({next:Ae,error:yt,complete:xn})}static#e=this.normalizeQueryParams=te;static#t=this.joinWithSlash=D;static#n=this.stripTrailingSlash=ee;static#r=this.\u0275fac=function(yt){return new(yt||X)(i.CoB(J))};static#i=this.\u0275prov=i.wxM({token:X,factory:()=>function Se(){return new Y((0,i.CoB)(J))}(),providedIn:"root"})}return X})();function pe(X){return X.replace(/\/index.html$/,"")}const Ve={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var Ne=function(X){return X[X.Decimal=0]="Decimal",X[X.Percent=1]="Percent",X[X.Currency=2]="Currency",X[X.Scientific=3]="Scientific",X}(Ne||{}),Ie=function(X){return X[X.Zero=0]="Zero",X[X.One=1]="One",X[X.Two=2]="Two",X[X.Few=3]="Few",X[X.Many=4]="Many",X[X.Other=5]="Other",X}(Ie||{}),H=function(X){return X[X.Format=0]="Format",X[X.Standalone=1]="Standalone",X}(H||{}),j=function(X){return X[X.Narrow=0]="Narrow",X[X.Abbreviated=1]="Abbreviated",X[X.Wide=2]="Wide",X[X.Short=3]="Short",X}(j||{}),ye=function(X){return X[X.Short=0]="Short",X[X.Medium=1]="Medium",X[X.Long=2]="Long",X[X.Full=3]="Full",X}(ye||{}),Le=function(X){return X[X.Decimal=0]="Decimal",X[X.Group=1]="Group",X[X.List=2]="List",X[X.PercentSign=3]="PercentSign",X[X.PlusSign=4]="PlusSign",X[X.MinusSign=5]="MinusSign",X[X.Exponential=6]="Exponential",X[X.SuperscriptingExponent=7]="SuperscriptingExponent",X[X.PerMille=8]="PerMille",X[X.Infinity=9]="Infinity",X[X.NaN=10]="NaN",X[X.TimeSeparator=11]="TimeSeparator",X[X.CurrencyDecimal=12]="CurrencyDecimal",X[X.CurrencyGroup=13]="CurrencyGroup",X}(Le||{});function K(X,ot){return dt((0,i.iMv)(X)[i.GUM.DateFormat],ot)}function _e(X,ot){return dt((0,i.iMv)(X)[i.GUM.TimeFormat],ot)}function Pe(X,ot){return dt((0,i.iMv)(X)[i.GUM.DateTimeFormat],ot)}
vendor: 4,433 bytes, line 1
1function De(X,ot){const Ae=(0,i.iMv)(X),yt=Ae[i.GUM.NumberSymbols][ot];if(typeof yt>"u"){if(ot===Le.CurrencyDecimal)return Ae[i.GUM.NumberSymbols][Le.Decimal];if(ot===Le.CurrencyGroup)return Ae[i.GUM.NumberSymbols][Le.Group]}return yt}function ke(X,ot){return(0,i.iMv)(X)[i.GUM.NumberFormats][ot]}const xt=i.y02;function pt(X){if(!X[i.GUM.ExtraData])throw new Error(`Missing extra locale data for the locale "${X[i.GUM.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function dt(X,ot){for(let Ae=ot;Ae>-1;Ae--)if(typeof X[Ae]<"u")return X[Ae];throw new Error("Locale data API: locale data undefined")}function lt(X){const[ot,Ae]=X.split(":");return{hours:+ot,minutes:+Ae}}const Yn=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,bn={},Hn=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Fn=function(X){return X[X.Short=0]="Short",X[X.ShortGMT=1]="ShortGMT",X[X.Long=2]="Long",X[X.Extended=3]="Extended",X}(Fn||{}),On=function(X){return X[X.FullYear=0]="FullYear",X[X.Month=1]="Month",X[X.Date=2]="Date",X[X.Hours=3]="Hours",X[X.Minutes=4]="Minutes",X[X.Seconds=5]="Seconds",X[X.FractionalSeconds=6]="FractionalSeconds",X[X.Day=7]="Day",X}(On||{}),gr=function(X){return X[X.DayPeriods=0]="DayPeriods",X[X.Days=1]="Days",X[X.Months=2]="Months",X[X.Eras=3]="Eras",X}(gr||{});function Mr(X,ot,Ae,yt){let xn=function Zt(X){if(ft(X))return X;if("number"==typeof X&&!isNaN(X))return new Date(X);if("string"==typeof X){if(X=X.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(X)){const[xn,qn=1,Pr=1]=X.split("-").map(ji=>+ji);return Vr(xn,qn-1,Pr)}const Ae=parseFloat(X);if(!isNaN(X-Ae))return new Date(Ae);let yt;if(yt=X.match(Yn))return function Fe(X){const ot=new Date(0);let Ae=0,yt=0;const xn=X[8]?ot.setUTCFullYear:ot.setFullYear,qn=X[8]?ot.setUTCHours:ot.setHours;X[9]&&(Ae=Number(X[9]+X[10]),yt=Number(X[9]+X[11])),xn.call(ot,Number(X[1]),Number(X[2])-1,Number(X[3]));const Pr=Number(X[4]||0)-Ae,ji=Number(X[5]||0)-yt,pi=Number(X[6]||0),Ar=Math.floor(1e3*parseFloat("0."+(X[7]||0)));return qn.call(ot,Pr,ji,pi,Ar),ot}(yt)}const ot=new Date(X);if(!ft(ot))throw new Error(`Unable to convert "${X}" into a date`);return ot}(X);ot=Fr(Ae,ot)||ot;let ji,Pr=[];for(;ot;){if(ji=Hn.exec(ot),!ji){Pr.push(ot);break}{Pr=Pr.concat(ji.slice(1));const Xr=Pr.pop();if(!Xr)break;ot=Xr}}let pi=xn.getTimezoneOffset();yt&&(pi=Mt(yt,pi),xn=function et(X,ot,Ae){const yt=Ae?-1:1,xn=X.getTimezoneOffset();return function Ze(X,ot){return(X=new Date(X.getTime())).setMinutes(X.getMinutes()+ot),X}(X,yt*(Mt(ot,xn)-xn))}(xn,yt,!0));let Ar="";return Pr.forEach(Xr=>{const Qi=function Ct(X){if(jt[X])return jt[X];let ot;switch(X){case"G":case"GG":case"GGG":ot=or(gr.Eras,j.Abbreviated);break;case"GGGG":ot=or(gr.Eras,j.Wide);break;case"GGGGG":ot=or(gr.Eras,j.Narrow);break;case"y":ot=Jr(On.FullYear,1,0,!1,!0);break;case"yy":ot=Jr(On.FullYear,2,0,!0,!0);break;case"yyy":ot=Jr(On.FullYear,3,0,!1,!0);break;case"yyyy":ot=Jr(On.FullYear,4,0,!1,!0);break;case"Y":ot=vn(1);break;case"YY":ot=vn(2,!0);break;case"YYY":ot=vn(3);break;case"YYYY":ot=vn(4);break;case"M":case"L":ot=Jr(On.Month,1,1);break;case"MM":case"LL":ot=Jr(On.Month,2,1);break;case"MMM":ot=or(gr.Months,j.Abbreviated);break;case"MMMM":ot=or(gr.Months,j.Wide);break;case"MMMMM":ot=or(gr.Months,j.Narrow);break;case"LLL":ot=or(gr.Months,j.Abbreviated,H.Standalone);break;case"LLLL":ot=or(gr.Months,j.Wide,H.Standalone);break;case"LLLLL":ot=or(gr.Months,j.Narrow,H.Standalone);break;case"w":ot=dr(1);break;case"ww":ot=dr(2);break;case"W":ot=dr(1,!0);break;case"d":ot=Jr(On.Date,1);break;case"dd":ot=Jr(On.Date,2);break;case"c":case"cc":ot=Jr(On.Day,1);break;case"ccc":ot=or(gr.Days,j.Abbreviated,H.Standalone);break;case"cccc":ot=or(gr.Days,j.Wide,H.Standalone);break;case"ccccc":ot=or(gr.Days,j.Narrow,H.Standalone);break;case"cccccc":ot=or(gr.Days,j.Short,H.Standalone);break;case"E":case"EE":case"EEE":ot=or(gr.Days,j.Abbreviated);break;case"EEEE":ot=or(gr.Days,j.Wide);break;case"EEEEE":ot=or(gr.Days,j.Narrow);break;case"EEEEEE":ot=or(gr.Days,j.Short);break;case"a":case"aa":case"aaa":ot=or(gr.DayPeriods,j.Abbreviated);break;case"aaaa":ot=or(gr.DayPeriods,j.Wide);break;case"aaaaa":ot=or(gr.DayPeriods,j.Narrow);break;
1case"b":case"bb":case"bbb":ot=or(gr.DayPeriods,j.Abbreviated,H.Standalone,!0);break;case"bbbb":ot=or(gr.DayPeriods,j.Wide,H.Standalone,!0);break;case"bbbbb":ot=or(gr.DayPeriods,j.Narrow,H.Standalone,!0);break;case"B":case"BB":case"BBB":ot=or(gr.DayPeriods,j.Abbreviated,H.Format,!0);break;case"BBBB":ot=or(gr.DayPeriods,j.Wide,H.Format,!0);break;case"BBBBB":ot=or(gr.DayPeriods,j.Narrow,H.Format,!0);break;case"h":ot=Jr(On.Hours,1,-12);break;case"hh":ot=Jr(On.Hours,2,-12);break;case"H":ot=Jr(On.Hours,1);break;case"HH":ot=Jr(On.Hours,2);break;case"m":ot=Jr(On.Minutes,1);break;case"mm":ot=Jr(On.Minutes,2);break;case"s":ot=Jr(On.Seconds,1);break;case"ss":ot=Jr(On.Seconds,2);break;case"S":ot=Jr(On.FractionalSeconds,1);break;case"SS":ot=Jr(On.FractionalSeconds,2);break;case"SSS":ot=Jr(On.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":ot=sn(Fn.Short);break;case"ZZZZZ":ot=sn(Fn.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":ot=sn(Fn.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":ot=sn(Fn.Long);break;default:return null}return jt[X]=ot,ot}(Xr);Ar+=Qi?Qi(xn,Ae,pi):"''"===Xr?"'":Xr.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),Ar}function Vr(X,ot,Ae){const yt=new Date(0);return yt.setFullYear(X,ot,Ae),yt.setHours(0,0,0),yt}function Fr(X,ot){const Ae=function We(X){return(0,i.iMv)(X)[i.GUM.LocaleId]}(X);if(bn[Ae]??={},bn[Ae][ot])return bn[Ae][ot];let yt="";switch(ot){case"shortDate":yt=K(X,ye.Short);break;case"mediumDate":yt=K(X,ye.Medium);break;case"longDate":yt=K(X,ye.Long);break;case"fullDate":yt=K(X,ye.Full);break;case"shortTime":yt=_e(X,ye.Short);break;case"mediumTime":yt=_e(X,ye.Medium);break;case"longTime":yt=_e(X,ye.Long);break;case"fullTime":yt=_e(X,ye.Full);break;case"short":const xn=Fr(X,"shortTime"),qn=Fr(X,"shortDate");yt=ti(Pe(X,ye.Short),[xn,qn]);break;case"medium":const Pr=Fr(X,"mediumTime"),ji=Fr(X,"mediumDate");yt=ti(Pe(X,ye.Medium),[Pr,ji]);break;case"long":const pi=Fr(X,"longTime"),Ar=Fr(X,"longDate");yt=ti(Pe(X,ye.Long),[pi,Ar]);break;case"full":const Xr=Fr(X,"fullTime"),Qi=Fr(X,"fullDate");yt=ti(Pe(X,ye.Full),[Xr,Qi])}return yt&&(bn[Ae][ot]=yt),yt}function ti(X,ot){return ot&&(X=X.replace(/\{([^}]+)}/g,function(Ae,yt){return null!=ot&&yt in ot?ot[yt]:Ae})),X}function Nr(X,ot,Ae="-",yt,xn){let qn="";(X<0||xn&&X<=0)&&(xn?X=1-X:(X=-X,qn=Ae));let Pr=String(X);for(;Pr.length<ot;)Pr="0"+Pr;return yt&&(Pr=Pr.slice(Pr.length-ot)),qn+Pr}function Jr(X,ot,Ae=0,yt=!1,xn=!1){return function(qn,Pr){let ji=function sr(X,ot){switch(X){case On.FullYear:return ot.getFullYear();case On.Month:return ot.getMonth();case On.Date:return ot.getDate();case On.Hours:return ot.getHours();case On.Minutes:return ot.getMinutes();case On.Seconds:return ot.getSeconds();case On.FractionalSeconds:return ot.getMilliseconds();case On.Day:return ot.getDay();default:throw new Error(`Unknown DateType value "${X}".`)}}(X,qn);if((Ae>0||ji>-Ae)&&(ji+=Ae),X===On.Hours)0===ji&&-12===Ae&&(ji=12);else if(X===On.FractionalSeconds)return function Kr(X,ot){return Nr(X,3).substring(0,ot)}(ji,ot);const pi=De(Pr,Le.MinusSign);return Nr(ji,ot,pi,yt,xn)}}function or(X,ot,Ae=H.Format,yt=!1){return function(xn,qn){return function zr(X,ot,Ae,yt,xn,qn){switch(Ae){case gr.Months:return function it(X,ot,Ae){const yt=(0,i.iMv)(X),qn=dt([yt[i.GUM.MonthsFormat],yt[i.GUM.MonthsStandalone]],ot);return dt(qn,Ae)}(ot,xn,yt)[X.getMonth()];case gr.Days:return function Ut(X,ot,Ae){const yt=(0,i.iMv)(X),qn=dt([yt[i.GUM.DaysFormat],yt[i.GUM.DaysStandalone]],ot);return dt(qn,Ae)}(ot,xn,yt)[X.getDay()];case gr.DayPeriods:const Pr=X.getHours(),ji=X.getMinutes();if(qn){const Ar=function rn(X){const ot=(0,i.iMv)(X);return pt(ot),(ot[i.GUM.ExtraData][2]||[]).map(yt=>"string"==typeof yt?lt(yt):[lt(yt[0]),lt(yt[1])])}(ot),Xr=function cn(X,ot,Ae){const yt=(0,i.iMv)(X);pt(yt);const qn=dt([yt[i.GUM.ExtraData][0],yt[i.GUM.ExtraData][1]],ot)||[];return dt(qn,Ae)||[]}(ot,xn,yt),Qi=Ar.findIndex(no=>{if(Array.isArray(no)){const[Qs,uo]=no,sa=Pr>=Qs.hours&&ji>=Qs.minutes,ro=Pr<uo.hours||Pr===uo.hours&&ji<uo.minutes;if(Qs.hours<uo.hours){if(sa&&ro)return!0}else if(sa||ro)return!0}else if(no.hours===Pr&&no.minutes===ji)return!0;return!1});if(-1!==Qi)return Xr[Qi]}return function At(X,ot,Ae){const yt=(0,i.iMv)(X),qn=dt([yt[i.GUM.DayPeriodsFormat],yt[i.GUM.DayPeriodsStandalone]],ot);return dt(qn,Ae)}(ot,xn,yt)[Pr<12?0:1];case gr.Eras:return function ue(X,ot){return dt((0,i.iMv)(X)[i.GUM.Eras],ot)}(ot,yt)[X.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${Ae}`)}}(xn,qn,X,ot,Ae,yt)}}function sn(X){return function(ot,Ae,yt){const xn=-1*yt,qn=De(Ae,Le.MinusSign),Pr=xn>0?Math.floor(xn/60):Math.ceil(xn/60);switch(X){case Fn.Short:return(xn>=0?"+":"")+Nr(Pr,2,qn)+Nr(Math.abs(xn%60),2,qn);case Fn.ShortGMT:return"GMT"+(xn>=0?"+":"")+Nr(Pr,1,qn);case Fn.Long:return"GMT"+(xn>=0?"+":"")+Nr(Pr,2,qn)+":"+Nr(Math.abs(xn%60),2,qn);case Fn.Extended:return 0===yt?"Z":(xn>=0?"+":"")+Nr(Pr,2,qn)+":"+Nr(Math.abs(xn%60),2,qn);default:throw new Error(`Unknown zone width "${X}"`)}}}const Qe=0,ut=4;function wn(X){const ot=X.getDay(),Ae=0===ot?-3:ut-ot;return Vr(X.getFullYear(),X.getMonth(),X.getDate()+Ae)}function dr(X,ot=!1){return function(Ae,yt){let xn;
vendor: 10,414 bytes, line 1
1if(ot){const qn=new Date(Ae.getFullYear(),Ae.getMonth(),1).getDay()-1,Pr=Ae.getDate();xn=1+Math.floor((Pr+qn)/7)}else{const qn=wn(Ae),Pr=function Xt(X){const ot=Vr(X,Qe,1).getDay();return Vr(X,0,1+(ot<=ut?ut:ut+7)-ot)}(qn.getFullYear()),ji=qn.getTime()-Pr.getTime();xn=1+Math.round(ji/6048e5)}return Nr(xn,X,De(yt,Le.MinusSign))}}function vn(X,ot=!1){return function(Ae,yt){return Nr(wn(Ae).getFullYear(),X,De(yt,Le.MinusSign),ot)}}const jt={};function Mt(X,ot){X=X.replace(/:/g,"");const Ae=Date.parse("Jan 01, 1970 00:00:00 "+X)/6e4;return isNaN(Ae)?ot:Ae}function ft(X){return X instanceof Date&&!isNaN(X.valueOf())}const dn=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Tn=22,Bn=".",mr="0",tr=";",Ir=",",ur="#";function Di(X,ot,Ae,yt,xn,qn,Pr=!1){let ji="",pi=!1;if(isFinite(X)){let Ar=function jn(X){let yt,xn,qn,Pr,ji,ot=Math.abs(X)+"",Ae=0;for((xn=ot.indexOf(Bn))>-1&&(ot=ot.replace(Bn,"")),(qn=ot.search(/e/i))>0?(xn<0&&(xn=qn),xn+=+ot.slice(qn+1),ot=ot.substring(0,qn)):xn<0&&(xn=ot.length),qn=0;ot.charAt(qn)===mr;qn++);if(qn===(ji=ot.length))yt=[0],xn=1;else{for(ji--;ot.charAt(ji)===mr;)ji--;for(xn-=qn,yt=[],Pr=0;qn<=ji;qn++,Pr++)yt[Pr]=Number(ot.charAt(qn))}return xn>Tn&&(yt=yt.splice(0,Tn-1),Ae=xn-1,xn=1),{digits:yt,exponent:Ae,integerLen:xn}}(X);Pr&&(Ar=function $n(X){if(0===X.digits[0])return X;const ot=X.digits.length-X.integerLen;return X.exponent?X.exponent+=2:(0===ot?X.digits.push(0,0):1===ot&&X.digits.push(0),X.integerLen+=2),X}(Ar));let Xr=ot.minInt,Qi=ot.minFrac,no=ot.maxFrac;if(qn){const _a=qn.match(dn);if(null===_a)throw new Error(`${qn} is not a valid digit info`);const Zi=_a[1],Eo=_a[3],Is=_a[5];null!=Zi&&(Xr=mi(Zi)),null!=Eo&&(Qi=mi(Eo)),null!=Is?no=mi(Is):null!=Eo&&Qi>no&&(no=Qi)}!function wr(X,ot,Ae){if(ot>Ae)throw new Error(`The minimum number of digits after fraction (${ot}) is higher than the maximum (${Ae}).`);let yt=X.digits,xn=yt.length-X.integerLen;const qn=Math.min(Math.max(ot,xn),Ae);let Pr=qn+X.integerLen,ji=yt[Pr];if(Pr>0){yt.splice(Math.max(X.integerLen,Pr));for(let Qi=Pr;Qi<yt.length;Qi++)yt[Qi]=0}else{xn=Math.max(0,xn),X.integerLen=1,yt.length=Math.max(1,Pr=qn+1),yt[0]=0;for(let Qi=1;Qi<Pr;Qi++)yt[Qi]=0}if(ji>=5)if(Pr-1<0){for(let Qi=0;Qi>Pr;Qi--)yt.unshift(0),X.integerLen++;yt.unshift(1),X.integerLen++}else yt[Pr-1]++;for(;xn<Math.max(0,qn);xn++)yt.push(0);let pi=0!==qn;const Ar=ot+X.integerLen,Xr=yt.reduceRight(function(Qi,no,Qs,uo){return uo[Qs]=(no+=Qi)<10?no:no-10,pi&&(0===uo[Qs]&&Qs>=Ar?uo.pop():pi=!1),no>=10?1:0},0);Xr&&(yt.unshift(Xr),X.integerLen++)}(Ar,Qi,no);let Qs=Ar.digits,uo=Ar.integerLen;const sa=Ar.exponent;let ro=[];for(pi=Qs.every(_a=>!_a);uo<Xr;uo++)Qs.unshift(0);for(;uo<0;uo++)Qs.unshift(0);uo>0?ro=Qs.splice(uo,Qs.length):(ro=Qs,Qs=[0]);const ya=[];for(Qs.length>=ot.lgSize&&ya.unshift(Qs.splice(-ot.lgSize,Qs.length).join(""));Qs.length>ot.gSize;)ya.unshift(Qs.splice(-ot.gSize,Qs.length).join(""));Qs.length&&ya.unshift(Qs.join("")),ji=ya.join(De(Ae,yt)),ro.length&&(ji+=De(Ae,xn)+ro.join("")),sa&&(ji+=De(Ae,Le.Exponential)+"+"+sa)}else ji=De(Ae,Le.Infinity);return ji=X<0&&!pi?ot.negPre+ji+ot.negSuf:ot.posPre+ji+ot.posSuf,ji}function Wn(X,ot="-"){const Ae={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},yt=X.split(tr),xn=yt[0],qn=yt[1],Pr=-1!==xn.indexOf(Bn)?xn.split(Bn):[xn.substring(0,xn.lastIndexOf(mr)+1),xn.substring(xn.lastIndexOf(mr)+1)],ji=Pr[0],pi=Pr[1]||"";Ae.posPre=ji.substring(0,ji.indexOf(ur));for(let Xr=0;Xr<pi.length;Xr++){const Qi=pi.charAt(Xr);Qi===mr?Ae.minFrac=Ae.maxFrac=Xr+1:Qi===ur?Ae.maxFrac=Xr+1:Ae.posSuf+=Qi}const Ar=ji.split(Ir);if(Ae.gSize=Ar[1]?Ar[1].length:0,Ae.lgSize=Ar[2]||Ar[1]?(Ar[2]||Ar[1]).length:0,qn){const Xr=xn.length-Ae.posPre.length-Ae.posSuf.length,Qi=qn.indexOf(ur);Ae.negPre=qn.substring(0,Qi).replace(/'/g,""),Ae.negSuf=qn.slice(Qi+Xr).replace(/'/g,"")}else Ae.negPre=ot+Ae.posPre,Ae.negSuf=Ae.posSuf;return Ae}function mi(X){const ot=parseInt(X);if(isNaN(ot))throw new Error("Invalid integer literal when parsing "+X);return ot}let di=(()=>{class X{static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275prov=i.wxM({token:X,factory:function(yt){let xn=null;return yt?xn=new yt:(qn=i.CoB(i.KYU),xn=new Qt(qn)),xn;var qn},providedIn:"root"})}return X})();let Qt=(()=>{class X extends di{constructor(Ae){super(),this.locale=Ae}getPluralCategory(Ae,yt){switch(xt(yt||this.locale)(Ae)){case Ie.Zero:return"zero";case Ie.One:return"one";case Ie.Two:return"two";case Ie.Few:return"few";case Ie.Many:return"many";default:return"other"}}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.CoB(i.KYU))};static#t=this.\u0275prov=i.wxM({token:X,factory:X.\u0275fac})}return X})();function Ln(X,ot){ot=encodeURIComponent(ot);for(const Ae of X.split(";")){const yt=Ae.indexOf("="),[xn,qn]=-1==yt?[Ae,""]:[Ae.slice(0,yt),Ae.slice(yt+1)];if(xn.trim()===ot)return decodeURIComponent(qn)}return null}const Cn=/\s+/,kr=[];let si=(()=>{class X{constructor(Ae,yt){this._ngEl=Ae,this._renderer=yt,this.initialClasses=kr,this.stateMap=new Map}set klass(Ae){this.initialClasses=null!=Ae?Ae.trim().split(Cn):kr}set ngClass(Ae){this.rawClass="string"==typeof Ae?Ae.trim().split(Cn):Ae}ngDoCheck(){for(const yt of this.initialClasses)this._updateState(yt,!0);const Ae=this.rawClass;if(Array.isArray(Ae)||Ae instanceof Set)for(const yt of Ae)this._updateState(yt,!0);else if(null!=Ae)for(const yt of Object.keys(Ae))this._updateState(yt,!!Ae[yt]);this._applyStateDiff()}_updateState(Ae,yt){const xn=this.stateMap.get(Ae);void 0!==xn?(xn.enabled!==yt&&(xn.changed=!0,xn.enabled=yt),xn.touched=!0):this.stateMap.set(Ae,{enabled:yt,changed:!0,touched:!0})}_applyStateDiff(){for(const Ae of this.stateMap){const yt=Ae[0],xn=Ae[1];xn.changed?(this._toggleClass(yt,xn.enabled),xn.changed=!1):xn.touched||(xn.enabled&&this._toggleClass(yt,!1),this.stateMap.delete(yt)),xn.touched=!1}}_toggleClass(Ae,yt){(Ae=Ae.trim()).length>0&&Ae.split(Cn).forEach(xn=>{yt?this._renderer.addClass(this._ngEl.nativeElement,xn):this._renderer.removeClass(this._ngEl.nativeElement,xn)})}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.GMv),i.GI1(i.q87))};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngClass",""]],inputs:{klass:[i.Wk5.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}return X})();class yi{constructor(ot,Ae,yt,xn){this.$implicit=ot,this.ngForOf=Ae,this.index=yt,this.count=xn}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let on=(()=>{class X{set ngForOf(Ae){this._ngForOf=Ae,this._ngForOfDirty=!0}set ngForTrackBy(Ae){this._trackByFn=Ae}get ngForTrackBy(){return this._trackByFn}constructor(Ae,yt,xn){this._viewContainer=Ae,this._template=yt,this._differs=xn,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(Ae){Ae&&(this._template=Ae)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const Ae=this._ngForOf;!this._differ&&Ae&&(this._differ=this._differs.find(Ae).create(this.ngForTrackBy))}if(this._differ){const Ae=this._differ.diff(this._ngForOf);Ae&&this._applyChanges(Ae)}}_applyChanges(Ae){const yt=this._viewContainer;Ae.forEachOperation((xn,qn,Pr)=>{if(null==xn.previousIndex)yt.createEmbeddedView(this._template,new yi(xn.item,this._ngForOf,-1,-1),null===Pr?void 0:Pr);else if(null==Pr)yt.remove(null===qn?void 0:qn);else if(null!==qn){const ji=yt.get(qn);yt.move(ji,Pr),le(ji,xn)}});for(let xn=0,qn=yt.length;xn<qn;xn++){const ji=yt.get(xn).context;ji.index=xn,ji.count=qn,ji.ngForOf=this._ngForOf}Ae.forEachIdentityChange(xn=>{le(yt.get(xn.currentIndex),xn)})}static ngTemplateContextGuard(Ae,yt){return!0}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.y8U),i.GI1(i.Yw2),i.GI1(i.Uj7))};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return X})();function le(X,ot){X.context.$implicit=ot.item}let Re=(()=>{class X{constructor(Ae,yt){this._viewContainer=Ae,this._context=new Pt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=yt}set ngIf(Ae){this._context.$implicit=this._context.ngIf=Ae,this._updateView()}set ngIfThen(Ae){ln("ngIfThen",Ae),this._thenTemplateRef=Ae,this._thenViewRef=null,this._updateView()}set ngIfElse(Ae){ln("ngIfElse",Ae),this._elseTemplateRef=Ae,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(Ae,yt){return!0}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.y8U),i.GI1(i.Yw2))};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return X})();class Pt{constructor(){this.$implicit=null,this.ngIf=null}}function ln(X,ot){if(ot&&!ot.createEmbeddedView)throw new Error(`${X} must be a TemplateRef, but received '${(0,i.GEN)(ot)}'.`)}class Mn{constructor(ot,Ae){this._viewContainerRef=ot,this._templateRef=Ae,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(ot){ot&&!this._created?this.create():!ot&&this._created&&this.destroy()}}let br=(()=>{class X{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(Ae){this._ngSwitch=Ae,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(Ae){this._defaultViews.push(Ae)}_matchCase(Ae){const yt=Ae===this._ngSwitch;return this._lastCasesMatched||=yt,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),yt}_updateDefaultCases(Ae){if(this._defaultViews.length>0&&Ae!==this._defaultUsed){this._defaultUsed=Ae;for(const yt of this._defaultViews)yt.enforceState(Ae)}
1}static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}return X})(),Br=(()=>{class X{constructor(Ae,yt,xn){this.ngSwitch=xn,xn._addCase(),this._view=new Mn(Ae,yt)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.y8U),i.GI1(i.Yw2),i.GI1(br,9))};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}return X})(),Nn=(()=>{class X{constructor(Ae,yt,xn){this._ngEl=Ae,this._differs=yt,this._renderer=xn,this._ngStyle=null,this._differ=null}set ngStyle(Ae){this._ngStyle=Ae,!this._differ&&Ae&&(this._differ=this._differs.find(Ae).create())}ngDoCheck(){if(this._differ){const Ae=this._differ.diff(this._ngStyle);Ae&&this._applyChanges(Ae)}}_setStyle(Ae,yt){const[xn,qn]=Ae.split("."),Pr=-1===xn.indexOf("-")?void 0:i.yzm.DashCase;null!=yt?this._renderer.setStyle(this._ngEl.nativeElement,xn,qn?`${yt}${qn}`:yt,Pr):this._renderer.removeStyle(this._ngEl.nativeElement,xn,Pr)}_applyChanges(Ae){Ae.forEachRemovedItem(yt=>this._setStyle(yt.key,null)),Ae.forEachAddedItem(yt=>this._setStyle(yt.key,yt.currentValue)),Ae.forEachChangedItem(yt=>this._setStyle(yt.key,yt.currentValue))}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.GMv),i.GI1(i.YNh),i.GI1(i.q87))};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}return X})(),ir=(()=>{class X{constructor(Ae){this._viewContainerRef=Ae,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(Ae){if(this._shouldRecreateView(Ae)){const yt=this._viewContainerRef;if(this._viewRef&&yt.remove(yt.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const xn=this._createContextForwardProxy();this._viewRef=yt.createEmbeddedView(this.ngTemplateOutlet,xn,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(Ae){return!!Ae.ngTemplateOutlet||!!Ae.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(Ae,yt,xn)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,yt,xn),get:(Ae,yt,xn)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,yt,xn)}})}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.y8U))};static#t=this.\u0275dir=i.Sc5({type:X,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[i.SYr]})}return X})();function Tr(X,ot){return new i.OBp(2100,!1)}class Gr{createSubscription(ot,Ae){return(0,i.sRj)(()=>ot.subscribe({next:Ae,error:yt=>{throw yt}}))}dispose(ot){(0,i.sRj)(()=>ot.unsubscribe())}}class qr{createSubscription(ot,Ae){return ot.then(Ae,yt=>{throw yt})}dispose(ot){}}const ri=new qr,Hr=new Gr;let zt=(()=>{class X{constructor(Ae){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=Ae}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(Ae){if(!this._obj){if(Ae)try{this.markForCheckOnValueUpdate=!1,this._subscribe(Ae)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return Ae!==this._obj?(this._dispose(),this.transform(Ae)):this._latestValue}_subscribe(Ae){this._obj=Ae,this._strategy=this._selectStrategy(Ae),this._subscription=this._strategy.createSubscription(Ae,yt=>this._updateLatestValue(Ae,yt))}_selectStrategy(Ae){if((0,i.w5$)(Ae))return ri;if((0,i.gX2)(Ae))return Hr;throw Tr()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(Ae,yt){Ae===this._obj&&(this._latestValue=yt,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.kD9,16))};static#t=this.\u0275pipe=i.UTH({name:"async",type:X,pure:!1,standalone:!0})}return X})();const bt=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
10EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;let It=(()=>{class X{transform(Ae){if(null==Ae)return null;if("string"!=typeof Ae)throw Tr();return Ae.replace(bt,yt=>yt[0].toUpperCase()+yt.slice(1).toLowerCase())}static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275pipe=i.UTH({name:"titlecase",type:X,pure:!0,standalone:!0})}return X})();const T=new i.UbH(""),st=new i.UbH("");let Z=(()=>{class X{constructor(Ae,yt,xn){this.locale=Ae,this.defaultTimezone=yt,this.defaultOptions=xn}transform(Ae,yt,xn,qn){if(null==Ae||""===Ae||Ae!=Ae)return null;try{return Mr(Ae,yt??this.defaultOptions?.dateFormat??"mediumDate",qn||this.locale,xn??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(Pr){throw Tr()}}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.KYU,16),i.GI1(T,24),i.GI1(st,24))};static#t=this.\u0275pipe=i.UTH({name:"date",type:X,pure:!0,standalone:!0})}return X})();const wt=/#/g;let Vt=(()=>{class X{constructor(Ae){this._localization=Ae}transform(Ae,yt,xn){if(null==Ae)return"";if("object"!=typeof yt||null===yt)throw Tr();return yt[function Mi(X,ot,Ae,yt){let xn=`=${X}`;if(ot.indexOf(xn)>
1-1||(xn=Ae.getPluralCategory(X,yt),ot.indexOf(xn)>-1))return xn;if(ot.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${X}"`)}(Ae,Object.keys(yt),this._localization,xn)].replace(wt,Ae.toString())}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(di,16))};static#t=this.\u0275pipe=i.UTH({name:"i18nPlural",type:X,pure:!0,standalone:!0})}return X})(),ie=(()=>{class X{constructor(Ae){this._locale=Ae}transform(Ae,yt,xn){if(!je(Ae))return null;xn||=this._locale;try{return function Ht(X,ot,Ae){return Di(X,Wn(ke(ot,Ne.Decimal),De(ot,Le.MinusSign)),ot,Le.Group,Le.Decimal,Ae)}($e(Ae),xn,yt)}catch(qn){throw Tr()}}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.KYU,16))};static#t=this.\u0275pipe=i.UTH({name:"number",type:X,pure:!0,standalone:!0})}return X})(),ne=(()=>{class X{constructor(Ae,yt="USD"){this._locale=Ae,this._defaultCurrencyCode=yt}transform(Ae,yt=this._defaultCurrencyCode,xn="symbol",qn,Pr){if(!je(Ae))return null;Pr||=this._locale,"boolean"==typeof xn&&(xn=xn?"symbol":"code");let ji=yt||this._defaultCurrencyCode;"code"!==xn&&(ji="symbol"===xn||"symbol-narrow"===xn?function rt(X,ot,Ae="en"){const yt=function ge(X){return(0,i.iMv)(X)[i.GUM.Currencies]}(Ae)[X]||Ve[X]||[],xn=yt[1];return"narrow"===ot&&"string"==typeof xn?xn:yt[0]||X}(ji,"symbol"===xn?"wide":"narrow",Pr):xn);try{return function Pi(X,ot,Ae,yt,xn){const Pr=Wn(ke(ot,Ne.Currency),De(ot,Le.MinusSign));return Pr.minFrac=function an(X){let ot;const Ae=Ve[X];return Ae&&(ot=Ae[2]),"number"==typeof ot?ot:2}(yt),Pr.maxFrac=Pr.minFrac,Di(X,Pr,ot,Le.CurrencyGroup,Le.CurrencyDecimal,xn).replace("\xa4",Ae).replace("\xa4","").trim()}($e(Ae),Pr,ji,yt,qn)}catch(pi){throw Tr()}}static#e=this.\u0275fac=function(yt){return new(yt||X)(i.GI1(i.KYU,16),i.GI1(i.ayF,16))};static#t=this.\u0275pipe=i.UTH({name:"currency",type:X,pure:!0,standalone:!0})}return X})();function je(X){return!(null==X||""===X||X!=X)}function $e(X){if("string"==typeof X&&!isNaN(Number(X)-parseFloat(X)))return Number(X);if("number"!=typeof X)throw new Error(`${X} is not a number`);return X}let Wt=(()=>{class X{transform(Ae,yt,xn){if(null==Ae)return null;if(!this.supports(Ae))throw Tr();return Ae.slice(yt,xn)}supports(Ae){return"string"==typeof Ae||Array.isArray(Ae)}static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275pipe=i.UTH({name:"slice",type:X,pure:!1,standalone:!0})}return X})(),rr=(()=>{class X{static#e=this.\u0275fac=function(yt){return new(yt||X)};static#t=this.\u0275mod=i.a4G({type:X});static#n=this.\u0275inj=i.s3X({})}return X})();const fr="browser",Xn="server";function Oi(X){return X===fr}function bs(X){return X===Xn}let Ci=(()=>{class X{static#e=this.\u0275prov=(0,i.wxM)({token:X,providedIn:"root",factory:()=>Oi((0,i.uUt)(i.AHE))?new Js((0,i.uUt)(S),window):new $t})}return X})();class Js{constructor(ot,Ae){this.document=ot,this.window=Ae,this.offset=()=>[0,0]}setOffset(ot){this.offset=Array.isArray(ot)?()=>ot:ot}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(ot){this.window.scrollTo(ot[0],ot[1])}scrollToAnchor(ot){const Ae=function Nt(X,ot){const Ae=X.getElementById(ot)||X.getElementsByName(ot)[0];if(Ae)return Ae;if("function"==typeof X.createTreeWalker&&X.body&&"function"==typeof X.body.attachShadow){const yt=X.createTreeWalker(X.body,NodeFilter.SHOW_ELEMENT);let xn=yt.currentNode;for(;xn;){const qn=xn.shadowRoot;if(qn){const Pr=qn.getElementById(ot)||qn.querySelector(`[name="${ot}"]`);if(Pr)return Pr}xn=yt.nextNode()}}return null}(this.document,ot);Ae&&(this.scrollToElement(Ae),Ae.focus())}setHistoryScrollRestoration(ot){this.window.history.scrollRestoration=ot}scrollToElement(ot){const Ae=ot.getBoundingClientRect(),yt=Ae.left+this.window.pageXOffset,xn=Ae.top+this.window.pageYOffset,qn=this.offset();this.window.scrollTo(yt-qn[0],xn-qn[1])}}class $t{setOffset(ot){}getScrollPosition(){return[0,0]}scrollToPosition(ot){}scrollToAnchor(ot){}setHistoryScrollRestoration(ot){}}class Je{}},97048:(B,G,a)=>{"use strict";a.d(G,{KK:()=>K,SU:()=>tr,UD:()=>J,i:()=>W,i4:()=>ae}),a(73448);var v=a(32116),b=a(82700),_=a(53252),C=a(19900),P=a(26020),S=a(66684),R=a(54704),k=a(68824),x=a(17368),D=a(91368);class ee{}class te{}class J{constructor(_n){this.normalizedNames=new Map,this.lazyUpdate=null,_n?"string"==typeof _n?this.lazyInit=()=>{this.headers=new Map,_n.split("\n").forEach(Ln=>{const Cn=Ln.indexOf(":");if(Cn>0){const kr=Ln.slice(0,Cn),si=kr.toLowerCase(),oi=Ln.slice(Cn+1).trim();this.maybeSetNormalizedName(kr,si),this.headers.has(si)?this.headers.get(si).push(oi):this.headers.set(si,[oi])}})}:typeof Headers<"u"&&_n instanceof Headers?(this.headers=new Map,_n.forEac
vendor: 5,728 bytes, line 1
1h((Ln,Cn)=>{this.setHeaderEntries(Cn,Ln)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(_n).forEach(([Ln,Cn])=>{this.setHeaderEntries(Ln,Cn)})}:this.headers=new Map}has(_n){return this.init(),this.headers.has(_n.toLowerCase())}get(_n){this.init();const Ln=this.headers.get(_n.toLowerCase());return Ln&&Ln.length>0?Ln[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(_n){return this.init(),this.headers.get(_n.toLowerCase())||null}append(_n,Ln){return this.clone({name:_n,value:Ln,op:"a"})}set(_n,Ln){return this.clone({name:_n,value:Ln,op:"s"})}delete(_n,Ln){return this.clone({name:_n,value:Ln,op:"d"})}maybeSetNormalizedName(_n,Ln){this.normalizedNames.has(Ln)||this.normalizedNames.set(Ln,_n)}init(){this.lazyInit&&(this.lazyInit instanceof J?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(_n=>this.applyUpdate(_n)),this.lazyUpdate=null))}copyFrom(_n){_n.init(),Array.from(_n.headers.keys()).forEach(Ln=>{this.headers.set(Ln,_n.headers.get(Ln)),this.normalizedNames.set(Ln,_n.normalizedNames.get(Ln))})}clone(_n){const Ln=new J;return Ln.lazyInit=this.lazyInit&&this.lazyInit instanceof J?this.lazyInit:this,Ln.lazyUpdate=(this.lazyUpdate||[]).concat([_n]),Ln}applyUpdate(_n){const Ln=_n.name.toLowerCase();switch(_n.op){case"a":case"s":let Cn=_n.value;if("string"==typeof Cn&&(Cn=[Cn]),0===Cn.length)return;this.maybeSetNormalizedName(_n.name,Ln);const kr=("a"===_n.op?this.headers.get(Ln):void 0)||[];kr.push(...Cn),this.headers.set(Ln,kr);break;case"d":const si=_n.value;if(si){let oi=this.headers.get(Ln);if(!oi)return;oi=oi.filter(Ii=>-1===si.indexOf(Ii)),0===oi.length?(this.headers.delete(Ln),this.normalizedNames.delete(Ln)):this.headers.set(Ln,oi)}else this.headers.delete(Ln),this.normalizedNames.delete(Ln)}}setHeaderEntries(_n,Ln){const Cn=(Array.isArray(Ln)?Ln:[Ln]).map(si=>si.toString()),kr=_n.toLowerCase();this.headers.set(kr,Cn),this.maybeSetNormalizedName(_n,kr)}forEach(_n){this.init(),Array.from(this.normalizedNames.keys()).forEach(Ln=>_n(this.normalizedNames.get(Ln),this.headers.get(Ln)))}}class we{encodeKey(_n){return Ye(_n)}encodeValue(_n){return Ye(_n)}decodeKey(_n){return decodeURIComponent(_n)}decodeValue(_n){return decodeURIComponent(_n)}}const Y=/%(\d[a-f0-9])/gi,Se={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ye(Qt){return encodeURIComponent(Qt).replace(Y,(_n,Ln)=>Se[Ln]??_n)}function pe(Qt){return`${Qt}`}class ae{constructor(_n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=_n.encoder||new we,_n.fromString){if(_n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function de(Qt,_n){const Ln=new Map;return Qt.length>0&&Qt.replace(/^\?/,"").split("&").forEach(kr=>{const si=kr.indexOf("="),[oi,Ii]=-1==si?[_n.decodeKey(kr),""]:[_n.decodeKey(kr.slice(0,si)),_n.decodeValue(kr.slice(si+1))],yi=Ln.get(oi)||[];yi.push(Ii),Ln.set(oi,yi)}),Ln}(_n.fromString,this.encoder)}else _n.fromObject?(this.map=new Map,Object.keys(_n.fromObject).forEach(Ln=>{const Cn=_n.fromObject[Ln],kr=Array.isArray(Cn)?Cn.map(pe):[pe(Cn)];this.map.set(Ln,kr)})):this.map=null}has(_n){return this.init(),this.map.has(_n)}get(_n){this.init();const Ln=this.map.get(_n);return Ln?Ln[0]:null}getAll(_n){return this.init(),this.map.get(_n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(_n,Ln){return this.clone({param:_n,value:Ln,op:"a"})}appendAll(_n){const Ln=[];return Object.keys(_n).forEach(Cn=>{const kr=_n[Cn];Array.isArray(kr)?kr.forEach(si=>{Ln.push({param:Cn,value:si,op:"a"})}):Ln.push({param:Cn,value:kr,op:"a"})}),this.clone(Ln)}set(_n,Ln){return this.clone({param:_n,value:Ln,op:"s"})}delete(_n,Ln){return this.clone({param:_n,value:Ln,op:"d"})}toString(){return this.init(),this.keys().map(_n=>{const Ln=this.encoder.encodeKey(_n);return this.map.get(_n).map(Cn=>Ln+"="+this.encoder.encodeValue(Cn)).join("&")}).filter(_n=>""!==_n).join("&")}clone(_n){const Ln=new ae({encoder:this.encoder});return Ln.cloneFrom=this.cloneFrom||this,Ln.updates=(this.updates||[]).concat(_n),Ln}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(_n=>this.map.set(_n,this.cloneFrom.map.get(_n))),this.updates.forEach(_n=>{switch(_n.op){case"a":case"s":const Ln=("a"===_n.op?this.map.get(_n.param):void 0)||[];Ln.push(pe(_n.value)),this.map.set(_n.param,Ln);break;case"d":if(void 0===_n.value){this.map.delete(_n.param);break}{let Cn=this.map.get(_n.param)||[];const kr=Cn.indexOf(pe(_n.value));-1!==kr&&Cn.splice(kr,1),Cn.length>0?this.map.set(_n.param,Cn):this.map.delete(_n.param)}}}),this.cloneFrom=this.updates=null)}}class Ne{constructor(){this.map=new Map}set(_n,Ln){return this.map.set(_n,Ln),this}get(_n){return this.map.has(_n)||this.map.set(_n,_n.defaultValue()),this.map.get(_n)}delete(_n){return this.map.delete(_n),this}has(_n){return this.map.has(_n)}keys(){return this.map.keys()}}function H(Qt){return typeof ArrayBuffer<"u"&&Qt instanceof ArrayBuffer}function j(Qt){return typeof Blob<"u"&&Qt instanceof Blob}function ye(Qt){return typeof FormData<"u"&&Qt instanceof FormData}class W{constructor(_n,Ln,Cn,kr){let si;if(this.url=Ln,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=_n.toUpperCase(),function Ie(Qt){switch(Qt){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||kr?(this.body=void 0!==Cn?Cn:null,si=kr):si=Cn,si&&(this.reportProgress=!!si.reportProgress,this.withCredentials=!!si.withCredentials,si.responseType&&(this.responseType=si.responseType),si.headers&&(this.headers=si.headers),si.context&&(this.context=si.
1context),si.params&&(this.params=si.params),this.transferCache=si.transferCache),this.headers??=new J,this.context??=new Ne,this.params){const oi=this.params.toString();if(0===oi.length)this.urlWithParams=Ln;else{const Ii=Ln.indexOf("?");this.urlWithParams=Ln+(-1===Ii?"?":Ii<Ln.length-1?"&":"")+oi}}else this.params=new ae,this.urlWithParams=Ln}serializeBody(){return null===this.body?null:H(this.body)||j(this.body)||ye(this.body)||function Le(Qt){return typeof URLSearchParams<"u"&&Qt instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof ae?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||ye(this.body)?null:j(this.body)?this.body.type||null:H(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof ae?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(_n={}){const Ln=_n.method||this.method,Cn=_n.url||this.url,kr=_n.responseType||this.responseType,si=void 0!==_n.body?_n.body:this.body,oi=void 0!==_n.withCredentials?_n.withCredentials:this.withCredentials,Ii=void 0!==_n.reportProgress?_n.reportProgress:this.reportProgress;let yi=_n.headers||this.headers,on=_n.params||this.params;const le=_n.context??this.context;return void 0!==_n.setHeaders&&(yi=Object.keys(_n.setHeaders).reduce((me,Re)=>me.set(Re,_n.setHeaders[Re]),yi)),_n.setParams&&(on=Object.keys(_n.setParams).reduce((me,Re)=>me.set(Re,_n.setParams[Re]),on)),new W(Ln,Cn,si,{params:on,headers:yi,context:le,reportProgress:Ii,responseType:kr,withCredentials:oi})}}var We=function(Qt){return Qt[Qt.Sent=0]="Sent",Qt[Qt.UploadProgress=1]="UploadProgress",Qt[Qt.ResponseHeader=2]="ResponseHeader",Qt[Qt.DownloadProgress=3]="DownloadProgress",Qt[Qt.Response=4]="Response",Qt[Qt.User=5]="User",Qt}(We||{});class At{constructor(_n,Ln=se.Ok,Cn="OK"){this.headers=_n.headers||new J,this.status=void 0!==_n.status?_n.status:Ln,this.statusText=_n.statusText||Cn,this.url=_n.url||null,this.ok=this.status>=200&&this.status<300}}class Ut extends At{constructor(_n={}){super(_n),this.type=We.ResponseHeader}clone(_n={}){return new Ut({headers:_n.headers||this.headers,status:void 0!==_n.status?_n.status:this.status,statusText:_n.statusText||this.statusText,url:_n.url||this.url||void 0})}}class it extends At{constructor(_n={}){super(_n),this.type=We.Response,this.body=void 0!==_n.body?_n.body:null}clone(_n={}){return new it({body:void 0!==_n.body?_n.body:this.body,headers:_n.headers||this.headers,status:void 0!==_n.status?_n.status:this.status,statusText:_n.statusText||this.statusText,url:_n.url||this.url||void 0})}}class ue extends At{constructor(_n){super(_n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${_n.url||"(unknown url)"}`:`Http failure response for ${_n.url||"(unknown url)"}: ${_n.status} ${_n.statusText}`,this.error=_n.error||null}}var se=function(Qt){return Qt[Qt.Continue=100]="Continue",Qt[Qt.SwitchingProtocols=101]="SwitchingProtocols",Qt[Qt.Processing=102]="Processing",Qt[Qt.EarlyHints=103]="EarlyHints",Qt[Qt.Ok=200]="Ok",Qt[Qt.Created=201]="Created",Qt[Qt.Accepted=202]="Accepted",Qt[Qt.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",Qt[Qt.NoContent=204]="NoContent",Qt[Qt.ResetContent=205]="ResetContent",Qt[Qt.PartialContent=206]="PartialContent",Qt[Qt.MultiStatus=207]="MultiStatus",Qt[Qt.AlreadyReported=208]="AlreadyReported",Qt[Qt.ImUsed=226]="ImUsed",Qt[Qt.MultipleChoices=300]="MultipleChoices",Qt[Qt.MovedPermanently=301]="MovedPermanently",Qt[Qt.Found=302]="Found",Qt[Qt.SeeOther=303]="SeeOther",Qt[Qt.NotModified=304]="NotModified",Qt[Qt.UseProxy=305]="UseProxy",Qt[Qt.Unused=306]="Unused",Qt[Qt.TemporaryRedirect=307]="TemporaryRedirect",Qt[Qt.PermanentRedirect=308]="PermanentRedirect",Qt[Qt.BadRequest=400]="BadRequest",Qt[Qt.Unauthorized=401]="Unauthorized",Qt[Qt.PaymentRequired=402]="PaymentRequired",Qt[Qt.Forbidden=403]="Forbidden",Qt[Qt.NotFound=404]="NotFound",Qt[Qt.MethodNotAllowed=405]="MethodNotAllowed",Qt[Qt.NotAcceptable=406]="NotAcceptable",Qt[Qt.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Qt[Qt.RequestTimeout=408]="RequestTimeout",Qt[Qt.Conflict=409]="Conflict",Qt[Qt.Gone=410]="Gone",Qt[Qt.LengthRequired=411]="LengthRequired",Qt[Qt.PreconditionFailed=412]="PreconditionFailed",Qt[Qt.PayloadTooLarge=413]="PayloadTooLarge",Qt[Qt.UriTooLong=414]="UriTooLong",Qt[Qt.UnsupportedMediaType=415]="UnsupportedMediaType",Qt[Qt.RangeNotSatisfiable=416]="RangeNotSatisfiable",Qt[Qt.ExpectationFailed=417]="ExpectationFailed",Qt[Qt.ImATeapot=418]="ImATeapot",Qt[Qt.MisdirectedRequest=421]="MisdirectedRequest",Qt[Qt.UnprocessableEntity=422]="UnprocessableEntity",Qt[Qt.Locked=423]="Locked",Qt[Qt.FailedDependency=424]="FailedDependency",Qt[Qt.TooEarly=425]="TooEarly",Qt[Qt.UpgradeRequired=426]="UpgradeRequired",Qt[Qt.PreconditionRequired=428]="PreconditionRequired",Qt[Qt.TooManyRequests=429]="TooManyRequests",Qt[Qt.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",Qt[Qt.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",Qt[Qt.InternalServerError=500]="InternalServerError",Qt[Qt.NotImplemented=501]="NotImplemented",Qt[Qt.BadGateway=502]="BadGateway",Qt[Qt.ServiceUnavailable=503]="ServiceUnavailable",Qt[Qt.GatewayTimeout=504]="GatewayTimeout",Qt[Qt.HttpVersionNotSupported=505]="HttpVersionNotSupported",Qt[Qt.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",Qt[Qt.InsufficientStorage=507]="InsufficientStorage",Qt[Qt.LoopDetected=508]="LoopDetected",Qt[Qt.NotExtended=510]="NotExtended",Qt[Qt.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",Qt}(se||{});function ce(Qt,_n){return{body:_n,headers:Qt.headers,context:Qt.context,observe:Qt.observe,params:Qt.params,reportProgress:Qt.reportProgress,responseType:Qt.responseType,withCredentials:Qt.withCredentials,transferCache:Qt.transferCache}}let K=(()=>{class Qt{constructor(Ln){this.handler=Ln}request(Ln,Cn,kr={}){let si;if(Ln instanceof W)si=Ln;else{let yi,on;yi=kr.headers instanceof J?kr.headers:new J(kr.headers),kr.params&&(on=kr.params instanceof ae?kr.params:new ae({fromObject:kr.params})),si=new W(Ln,Cn,void 0!==kr.body?kr.body:null,{headers:yi,context:kr.context,params:on,reportProgress:kr.reportProgress,responseType:kr.responseType||"json",withCredentials:kr.withCredentials,transferCache:kr.transferCache})}const oi=(0,b.of)(si).pipe((0,P.m)(yi=>this.handler.handle(yi)));if(Ln instanceof W||"events"===kr.observe)return oi;const Ii=oi.pipe((0,S.I)(yi=>yi instanceof it));switch(kr.observe||"body"){case"body":switch(si.responseType){case"arraybuffer":return Ii.pipe((0,R.k)(yi=>{if(null!==yi.body&&!(yi.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return yi.body}));case"blob":return Ii.pipe((0,R.k)(yi=>{if(null!==yi.body&&!(yi.body instanceof Blob))throw new Error("Response is not a Blob.");return yi.body}));case"text":return Ii.pipe((0,R.k)(yi=>{if(null!==yi.body&&"string"!=typeof yi.body)throw new Error("Response is not a string.");return yi.body}));default:return Ii.pipe((0,R.k)(yi=>yi.body))}case"response":return Ii;default:throw new Error(`Unreachable: unhandled observe type ${kr.observe}}`)}}delete(Ln,Cn={}){return this.request("DELETE",Ln,Cn)}get(Ln,Cn={}){return this.request("GET",Ln,Cn)}head(Ln,Cn={}){return this.request("HEAD",Ln,Cn)}jsonp(Ln,Cn){return this.request("JSONP",Ln,{params:(new ae).append(Cn,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(Ln,Cn={}){return this.request("OPTIONS",Ln,Cn)}patch(Ln,Cn,kr={}){return this.request("PATCH",Ln,ce(kr,Cn))}post(Ln,Cn,kr={}){return this.request("POST",Ln,ce(kr,Cn))}put(Ln,Cn,kr={}){return this.request("PUT",Ln,ce(kr,Cn))}static#e=this.\u0275fac=function(Cn){return new(Cn||Qt)(v.CoB(ee))};static#t=this.\u0275prov=v.wxM({token:Qt,factory:Qt.\u0275fac})}return Qt})();function ge(Qt,_n){return _n(Qt)}function xt(Qt,_n){return(Ln,Cn)=>_n.intercept(Ln,{handle:kr=>Qt(kr,Cn)})}const rn=new v.UbH(""),cn=new v.UbH(""),mn=new v.UbH(""),dt=new v.UbH("");function lt(){let Qt=null;return(_n,Ln)=>{null===Qt&&(Qt=((0,v.uUt)(rn,{optional:!0})??[]).reduceRight(xt,ge));const Cn=(0,v.uUt)(v.g9Y),kr=Cn.add();return Qt(_n,Ln).pipe((0,k.U)(()=>Cn.remove(kr)))}}let an=(()=>{class Qt extends ee{constructor(Ln,Cn){super(),this.backend=Ln,this.injector=Cn,this.chain=null,this.pendingTasks=(0,v.uUt)(v.g9Y);const kr=(0,v.uUt)(dt,{optional:!0});this.backend=kr??Ln}handle(Ln){if(null===this.chain){const kr=Array.from(new Set([...this.injector.get(cn),...this.injector.get(mn,[])]));this.chain=kr.reduceRight((si,oi)=>function pt(Qt,_n,Ln){return(Cn,kr)=>(0,v.SMS)(Ln,()=>_n(Cn,si=>Qt(si,kr)))}(si,oi,this.injector),ge)}const Cn=this.pendingTasks.add();return this.chain(Ln,kr=>this.backend.handle(kr)).pipe((0,k.U)(()=>this.pendingTasks.remove(Cn)))}static#e=this.\u0275fac=function(Cn){return new(Cn||Qt)(v.CoB(te),v.CoB(v.SIe))};static#t=this.\u0275prov=v.wxM({token:Qt,factory:Qt.\u0275fac})}return Qt})();const Kr=/^\)\]\}',?\n/;let sr=(()=>{class Qt{constructor(Ln){this.xhrFactory=Ln}handle(Ln){if("JSONP"===Ln.method)throw new v.OBp(-2800,!1);const Cn=this.xhrFactory;return(Cn.\u0275loadImpl?(0,C.Q)(Cn.\u0275loadImpl()):(0,b.of)(null)).pipe((0,x.G)(()=>new _._(si=>{const oi=Cn.build();if(oi.open(Ln.method,Ln.urlWithParams),Ln.withCredentials&&(oi.withCredentials=!0),Ln.headers.forEac
1h((En,Mn)=>oi.setRequestHeader(En,Mn.join(","))),Ln.headers.has("Accept")||oi.setRequestHeader("Accept","application/json, text/plain, */*"),!Ln.headers.has("Content-Type")){const En=Ln.detectContentTypeHeader();null!==En&&oi.setRequestHeader("Content-Type",En)}if(Ln.responseType){const En=Ln.responseType.toLowerCase();oi.responseType="json"!==En?En:"text"}const Ii=Ln.serializeBody();let yi=null;const on=()=>{if(null!==yi)return yi;const En=oi.statusText||"OK",Mn=new J(oi.getAllResponseHeaders()),br=function Jr(Qt){return"responseURL"in Qt&&Qt.responseURL?Qt.responseURL:/^X-Request-URL:/m.test(Qt.getAllResponseHeaders())?Qt.getResponseHeader("X-Request-URL"):null}(oi)||Ln.url;return yi=new Ut({headers:Mn,status:oi.status,statusText:En,url:br}),yi},le=()=>{let{headers:En,status:Mn,statusText:br,url:Br}=on(),jr=null;Mn!==se.NoContent&&(jr=typeof oi.response>"u"?oi.responseText:oi.response),0===Mn&&(Mn=jr?se.Ok:0);let gn=Mn>=200&&Mn<300;if("json"===Ln.responseType&&"string"==typeof jr){const Xe=jr;jr=jr.replace(Kr,"");try{jr=""!==jr?JSON.parse(jr):null}catch(Tt){jr=Xe,gn&&(gn=!1,jr={error:Tt,text:jr})}}gn?(si.next(new it({body:jr,headers:En,status:Mn,statusText:br,url:Br||void 0})),si.complete()):si.error(new ue({error:jr,headers:En,status:Mn,statusText:br,url:Br||void 0}))},me=En=>{const{url:Mn}=on(),br=new ue({error:En,status:oi.status||0,statusText:oi.statusText||"Unknown Error",url:Mn||void 0});si.error(br)};let Re=!1;const Pt=En=>{Re||(si.next(on()),Re=!0);let Mn={type:We.DownloadProgress,loaded:En.loaded};En.lengthComputable&&(Mn.total=En.total),"text"===Ln.responseType&&oi.responseText&&(Mn.partialText=oi.responseText),si.next(Mn)},ln=En=>{let Mn={type:We.UploadProgress,loaded:En.loaded};En.lengthComputable&&(Mn.total=En.total),si.next(Mn)};return oi.addEventListener("load",le),oi.addEventListener("error",me),oi.addEventListener("timeout",me),oi.addEventListener("abort",me),Ln.reportProgress&&(oi.addEventListener("progress",Pt),null!==Ii&&oi.upload&&oi.upload.addEventListener("progress",ln)),oi.send(Ii),si.next({type:We.Sent}),()=>{oi.removeEventListener("error",me),oi.removeEventListener("abort",me),oi.removeEventListener("load",le),oi.removeEventListener("timeout",me),Ln.reportProgress&&(oi.removeEventListener("progress",Pt),null!==Ii&&oi.upload&&oi.upload.removeEventListener("progress",ln)),oi.readyState!==oi.DONE&&oi.abort()}})))}static#e=this.\u0275fac=function(Cn){return new(Cn||Qt)(v.CoB(D.OM))};static#t=this.\u0275prov=v.wxM({token:Qt,factory:Qt.\u0275fac})}return Qt})();const or=new v.UbH(""),sn=new v.UbH("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),ut=new v.UbH("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Xt{}let wn=(()=>{class Qt{constructor(Ln,Cn,kr){this.doc=Ln,this.platform=Cn,this.cookieName=kr,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const Ln=this.doc.cookie||"";return Ln!==this.lastCookieString&&(this.parseCount++,this.lastToken=(0,D.Sg)(Ln,this.cookieName),this.lastCookieString=Ln),this.lastToken}static#e=this.\u0275fac=function(Cn){return new(Cn||Qt)(v.CoB(D.Ud),v.CoB(v.AHE),v.CoB(sn))};static#t=this.\u0275prov=v.wxM({token:Qt,factory:Qt.\u0275fac})}return Qt})();function dr(Qt,_n){const Ln=Qt.url.toLowerCase();if(!(0,v.uUt)(or)||"GET"===Qt.method||"HEAD"===Qt.method||Ln.startsWith("http://")||Ln.startsWith("https://"))return _n(Qt);const Cn=(0,v.uUt)(Xt).getToken(),kr=(0,v.uUt)(ut);return null!=Cn&&!Qt.headers.has(kr)&&(Qt=Qt.clone({headers:Qt.headers.set(kr,Cn)})),_n(Qt)}var jt=function(Qt){return Qt[Qt.Interceptors=0]="Interceptors",Qt[Qt.LegacyInterceptors=1]="LegacyInterceptors",Qt[Qt.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Qt[Qt.NoXsrfProtection=3]="NoXsrfProtection",Qt[Qt.JsonpSupport=4]="JsonpSupport",Qt[Qt.RequestsMadeViaParent=5]="RequestsMadeViaParent",Qt[Qt.Fetch=6]="Fetch",Qt}(jt||{});function Mt(...Qt){const _n=[K,sr,an,{provide:ee,useExisting:an},{provide:te,useExisting:sr},{provide:cn,useValue:dr,multi:!0},{provide:or,useValue:!0},{provide:Xt,useClass:wn}];for(const Ln of Qt)_n.push(...Ln.\u0275providers);return(0,v.AFj)(_n)}const et=new v.UbH("");function Zt(){return function Ct(Qt,_n){return{\u0275kind:Qt,\u0275providers:_n}}(jt.LegacyInterceptors,[{provide:et,useFactory:lt},{provide:cn,useExisting:et,multi:!0}])}let tr=(()=>{class Qt{static#e=this.\u0275fac=function(Cn){return new(Cn||Qt)};static#t=this.\u0275mod=v.a4G({type:Qt});static#n=this.\u0275inj=v.s3X({providers:[Mt(Zt())]})}return Qt})()},32116:(B,G,a)=>{"use strict";a.d(G,{qwP:()=>Wl,qid:()=>Uw,QHP:()=>Ur,kZF:()=>BT,Ev2:()=>CP,Swk:()=>Cf,YND:()=>zl,kD9:()=>qT,ESV:()=>Q1,ce5:()=>Pp,ayF:()=>iP,syz:()=>hi,GMv:()=>
1Vi,SIe:()=>$s,eAe:()=>gc,_w7:()=>Mr,_6O:()=>Kr,_qm:()=>f0,UbH:()=>Cr,zZn:()=>gl,Uj7:()=>Hw,YNh:()=>Kw,KYU:()=>r0,obV:()=>Cb,oF$:()=>yh,WW2:()=>ca,T7N:()=>Pn,AHE:()=>Ps,crf:()=>Ss,q87:()=>Rp,O8F:()=>Xc,yzm:()=>yc,Qfh:()=>kn,Yw2:()=>ic,G4X:()=>z1,eOv:()=>UT,j1C:()=>E1,a8Z:()=>RT,y8U:()=>Nm,K6R:()=>Ir,I44:()=>ly,cZD:()=>qP,kdu:()=>aR,SIz:()=>$E,Gk1:()=>GC,grM:()=>XT,agy:()=>cP,wd:()=>vu,uUt:()=>xs,sPQ:()=>uP,_Ap:()=>bt,AFj:()=>Qr,m4O:()=>TP,o9M:()=>lR,SMS:()=>Ku,sRj:()=>tR,yai:()=>Tm,oPY:()=>MT,i4S:()=>Ys,GUM:()=>rg,g9Y:()=>Up,OBp:()=>rt,aS5:()=>LT,Mn9:()=>FT,iMv:()=>pw,G58:()=>kt,y02:()=>PI,IHs:()=>Er,K_M:()=>aa,Guz:()=>Qc,w5$:()=>Lw,gX2:()=>VT,auf:()=>pu,GEN:()=>Jr,eg9:()=>Ia,Wk5:()=>_n,QJr:()=>Tb,SYr:()=>fd,M5G:()=>BS,UHJ:()=>$S,yG2:()=>Lv,e48:()=>ZE,qJJ:()=>qE,m8U:()=>dI,eAK:()=>ow,C0Y:()=>bI,szK:()=>gS,In1:()=>Nn,Sc5:()=>qr,wxM:()=>Ds,s3X:()=>Ka,a4G:()=>Tr,UTH:()=>ri,GI1:()=>Wc,wR5:()=>fw,C_f:()=>hw,k70:()=>zy,SAx:()=>Wy,C$Y:()=>Gy,I0R:()=>jy,KQA:()=>_I,otF:()=>Mu,CoB:()=>Lo,gJ8:()=>Ol,KEo:()=>Kg,qCj:()=>vw,Gqi:()=>yS,S2Z:()=>xa,GaO:()=>sS,wVc:()=>cT,kDX:()=>dT,g7$:()=>fT,I7O:()=>hT,_Xx:()=>aS,kPM:()=>oS,E7m:()=>rw,_6D:()=>Ew,CI5:()=>Qy,u6R:()=>ww,q4q:()=>QS,S45:()=>JS,IBC:()=>ZS,uAc:()=>qS,WuN:()=>eT,SY1:()=>tT,Gyg:()=>nT,gzV:()=>rT,gFU:()=>iT,wto:()=>vS,Gew:()=>ES,oho:()=>SI,c53:()=>II,CGJ:()=>cu,usT:()=>ol,E3n:()=>hv,K6U:()=>Vf,YFg:()=>Gh,m4B:()=>sw,yuY:()=>Vp,gJz:()=>pT,OEk:()=>PS,cNF:()=>bw,oRS:()=>Jy,CAO:()=>Iw,kNx:()=>US,iHE:()=>Tw,OKB:()=>Sw,CC$:()=>mS}),a(73448);let b=null,C=1;const P=Symbol("SIGNAL");function S(t){const n=b;return b=t,n}function J(t){if((!Ne(t)||t.dirty)&&(t.dirty||t.lastCleanEpoch!==C)){if(!t.producerMustRecompute(t)&&!Ye(t))return t.dirty=!1,void(t.lastCleanEpoch=C);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=C}}function Ye(t){Ie(t);for(let n=0;n<t.producerNode.length;n++){const s=t.producerNode[n],c=t.producerLastReadVersion[n];if(c!==s.version||(J(s),c!==s.version))return!0}return!1}function Ve(t,n){if(function H(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}(t),Ie(t),1===t.liveConsumerNode.length)for(let c=0;c<t.producerNode.length;c++)Ve(t.producerNode[c],t.producerIndexOfThis[c]);const s=t.liveConsumerNode.length-1;if(t.liveConsumerNode[n]=t.liveConsumerNode[s],t.liveConsumerIndexOfThis[n]=t.liveConsumerIndexOfThis[s],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,n<t.liveConsumerNode.length){const c=t.liveConsumerIndexOfThis[n],f=t.liveConsumerNode[n];Ie(f),f.producerIndexOfThis[c]=n}}function Ne(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function Ie(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}let Ut=null;var pt=a(95657),rn=a(46928),cn=a(46700),mn=a(54704);const lt="https://g.co/ng/security#xss";class rt extends Error{constructor(n,s){super(kt(n,s)),this.code=n}}function kt(t,n){return`NG0${Math.abs(t)}${n?": "+n:""}`}function gr(t){return n=>{setTimeout(t,void 0,n)}}const Mr=class On extends pt.E{constructor(n=!1){super(),this.__isAsync=n}emit(n){const s=S(null);try{super.next(n)}finally{S(s)}}subscribe(n,s,c){let f=n,g=s||(()=>null),A=c;if(n&&"object"==typeof n){const q=n;f=q.next?.bind(q),g=q.error?.bind(q),A=q.complete?.bind(q)}this.__isAsync&&(g=gr(g),f&&(f=gr(f)),A&&(A=gr(A)));const N=super.subscribe({next:f,error:g,complete:A});return n instanceof rn.wH&&n.add(N),N}};var Kr=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(Kr||{});function Jr(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Jr).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const s=n.indexOf("\n");return-1===s?n:n.substring(0,s)}function sr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}var tr=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(tr||{}),Ir=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(Ir||{});function ur(t){return{toString:t}.toString()}const Er=globalThis,Pi={},nr=[];function Ht(t){for(let n in t)if(t[n]===Ht)return n;throw Error("Could not find renamed property on target object.")}function Wn(t,n){for(const s in n)n.hasOwnProperty(s)&&!t.hasOwnProperty(s)&&(t[s]=n[s])}const $n=Ht({\u0275cmp:Ht}),jn=Ht({\u0275dir:Ht}),wr=Ht({\u0275pipe:Ht}),mi=Ht({\u0275mod:Ht}),di=Ht({\u0275fac:Ht}),Mi=Ht({__NG_ELEMENT_ID__:Ht}),Qt=Ht({__NG_ENV_ID__:Ht});var _n=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(_n||{});function Ln(t,n,s){let c=t.length;for(;;){const f=t.indexOf(n,s);if(-1===f)return f;if(0===f||t.charCodeAt(f-1)<=32){const g=n.length;if(f+g===c||t.charCodeAt(f+g)<=32)return f}s=f+1}}function Cn(t,n,s){let c=0;for(;c<s.length;){const f=s[c];if("number"==typeof f){if(0!==f)break;c++;const g=s[c++],A=s[c++],N=s[c++];t.setAttribute(n,A,N,g)}else{const g=f,A=s[++c];si(g)?t.setProperty(n,g,A):t.setAttribute(n,g,A),c++}}return c}function kr(t){return 3===t||4===t||6===t}function si(t){return 64===t.charCodeAt(0)}function oi(t,n){if(null!==n&&0!==n.length)if(null===t||0===t.length)t=n.slice();else{let s=-1;for(let c=0;c<n.length;c++){const f=n[c];"number"==typeof f?s=f:0===s||Ii(t,s,f,null,-1===s||2===s?n[++c]:null)}}return t}function Ii(t,n,s,c,f){let g=0,A=t.length;if(-1===n)A=-1;else for(;g<t.length;){const N=t[g++];
vendor: 5,592 bytes, line 1
1if("number"==typeof N){if(N===n){A=-1;break}if(N>n){A=g-1;break}}}for(;g<t.length;){const N=t[g];if("number"==typeof N)break;if(N===s){if(null===c)return void(null!==f&&(t[g+1]=f));if(c===t[g+1])return void(t[g+2]=f)}g++,null!==c&&g++,null!==f&&g++}-1!==A&&(t.splice(A,0,n),g=A+1),t.splice(g++,0,s),null!==c&&t.splice(g++,0,c),null!==f&&t.splice(g++,0,f)}const yi="ng-template";function on(t,n,s){let c=0,f=!0;for(;c<t.length;){let g=t[c++];if("string"==typeof g&&f){const A=t[c++];if(s&&"class"===g&&-1!==Ln(A.toLowerCase(),n,0))return!0}else{if(1===g){for(;c<t.length&&"string"==typeof(g=t[c++]);)if(g.toLowerCase()===n)return!0;return!1}"number"==typeof g&&(f=!1)}}return!1}function le(t){return 4===t.type&&t.value!==yi}function me(t,n,s){return n===(4!==t.type||s?t.value:yi)}function Re(t,n,s){let c=4;const f=t.attrs||[],g=function br(t){for(let n=0;n<t.length;n++)if(kr(t[n]))return n;return t.length}(f);let A=!1;for(let N=0;N<n.length;N++){const q=n[N];if("number"!=typeof q){if(!A)if(4&c){if(c=2|1&c,""!==q&&!me(t,q,s)||""===q&&1===n.length){if(Pt(c))return!1;A=!0}}else{const nt=8&c?q:n[++N];if(8&c&&null!==t.attrs){if(!on(t.attrs,nt,s)){if(Pt(c))return!1;A=!0}continue}const pn=ln(8&c?"class":q,f,le(t),s);if(-1===pn){if(Pt(c))return!1;A=!0;continue}if(""!==nt){let er;er=pn>g?"":f[pn+1].toLowerCase();const hr=8&c?er:null;if(hr&&-1!==Ln(hr,nt,0)||2&c&&nt!==er){if(Pt(c))return!1;A=!0}}}}else{if(!A&&!Pt(c)&&!Pt(q))return!1;if(A&&Pt(q))continue;A=!1,c=q|1&c}}return Pt(c)||A}function Pt(t){return 0==(1&t)}function ln(t,n,s,c){if(null===n)return-1;let f=0;if(c||!s){let g=!1;for(;f<n.length;){const A=n[f];if(A===t)return f;if(3===A||6===A)g=!0;else{if(1===A||2===A){let N=n[++f];for(;"string"==typeof N;)N=n[++f];continue}if(4===A)break;if(0===A){f+=4;continue}}f+=g?1:2}return-1}return function Br(t,n){let s=t.indexOf(4);if(s>-1)for(s++;s<t.length;){const c=t[s];if("number"==typeof c)return-1;if(c===n)return s;s++}return-1}(n,t)}function En(t,n,s=!1){for(let c=0;c<n.length;c++)if(Re(t,n[c],s))return!0;return!1}function jr(t,n){e:for(let s=0;s<n.length;s++){const c=n[s];if(t.length===c.length){for(let f=0;f<t.length;f++)if(t[f]!==c[f])continue e;return!0}}return!1}function gn(t,n){return t?":not("+n.trim()+")":n}function Xe(t){let n=t[0],s=1,c=2,f="",g=!1;for(;s<t.length;){let A=t[s];if("string"==typeof A)if(2&c){const N=t[++s];f+="["+A+(N.length>0?'="'+N+'"':"")+"]"}else 8&c?f+="."+A:4&c&&(f+=" "+A);else""!==f&&!Pt(A)&&(n+=gn(g,f),f=""),c=A,g=g||!Pt(c);s++}return""!==f&&(n+=gn(g,f)),n}function Nn(t){return ur(()=>{const n=_t(t),s={...n,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===tr.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Ir.Emulated,styles:t.styles||nr,_:null,schemas:t.schemas||null,tView:null,id:""};hn(s);const c=t.dependencies;return s.directiveDefs=T(c,!1),s.pipeDefs=T(c,!0),s.id=function Z(t){let n=0;const s=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(const f of s)n=Math.imul(31,n)+f.charCodeAt(0)<<0;return n+=2147483648,"c"+n}(s),s})}function ir(t){return Hr(t)||zt(t)}function pr(t){return null!==t}function Tr(t){return ur(()=>({type:t.type,bootstrap:t.bootstrap||nr,declarations:t.declarations||nr,imports:t.imports||nr,exports:t.exports||nr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function Gr(t,n){if(null==t)return Pi;const s={};for(const c in t)if(t.hasOwnProperty(c)){const f=t[c];let g,A,N=_n.None;Array.isArray(f)?(N=f[0],g=f[1],A=f[2]??g):(g=f,A=f),n?(s[g]=N!==_n.None?[c,N]:c,n[g]=A):s[g]=c}return s}function qr(t){return ur(()=>{const n=_t(t);return hn(n),n})}function ri(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Hr(t){return t[$n]||null}function zt(t){return t[jn]||null}function en(t){return t[wr]||null}function bt(t){const n=Hr(t)||zt(t)||en(t);return null!==n&&n.standalone}function It(t,n){const s=t[mi]||null;if(!s&&!0===n)throw new Error(`Type ${Jr(t)} does not have '\u0275mod' property.`);return s}function _t(t){const n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,inputTransforms:null,inputConfig:t.inputs||Pi,exportAs:t.exportAs||null,standalone:!0===t.standalone,signals:!0===t.signals,selectors:t.selectors||nr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Gr(t.inputs,n),outputs:Gr(t.outputs),debugInfo:null}}function hn(t){t.features?.forEach(n=>n(t))}function T(t,n){if(!t)return null;const s=n?en:ir;return()=>("function"==typeof t?t():t).map(c=>s(c)).filter(pr)}const wt=0,Vt=1,Sr=2,St=3,Rt=4,Ee=5,U=6,ie=7,V=8,ne=9,je=10,$e=11,Wt=12,In=13,rr=14,fr=15,Xn=16,Rr=17,xi=18,Oi=19,bs=20,fs=21,Gs=22,Ns=23,Ci=25,Js=1,$t=7,be=9,oe=10;var qe=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(qe||{});function Me(t){return Array.isArray(t)&&"object"==typeof t[Js]}function Ce(t){return Array.isArray(t)&&!0===t[Js]}function Ke(t){return 0!=(4&t.flags)}
1function tt(t){return t.componentOffset>-1}function Et(t){return 1==(1&t.flags)}function Vn(t){return!!t.template}function Gn(t){return 0!=(512&t[Sr])}const Ti="svg";let Ms=!1;function as(t){for(;Array.isArray(t);)t=t[wt];return t}function No(t,n){return as(n[t])}function ss(t,n){return as(n[t.index])}function qo(t,n){return t.data[n]}function fo(t,n){return t[n]}function Uo(t,n){const s=n[t];return Me(s)?s:s[wt]}function bo(t){return 128==(128&t[Sr])}function Co(t,n){return null==n?null:t[n]}function Sa(t){t[Rr]=0}function Ll(t){1024&t[Sr]||(t[Sr]|=1024,bo(t)&&rl(t))}function Ta(t){return!!(9216&t[Sr]||t[Ns]?.dirty)}function Vs(t){Ta(t)?rl(t):64&t[Sr]&&(function ks(){return Ms}()?(t[Sr]|=1024,rl(t)):t[je].changeDetectionScheduler?.notify())}function rl(t){t[je].changeDetectionScheduler?.notify();let n=Qo(t);for(;null!==n&&!(8192&n[Sr])&&(n[Sr]|=8192,bo(n));)n=Qo(n)}function Ua(t,n){if(256==(256&t[Sr]))throw new rt(911,!1);null===t[fs]&&(t[fs]=[]),t[fs].push(n)}function Qo(t){const n=t[St];return Ce(n)?n[St]:n}const os={lFrame:uo(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function ko(){return os.bindingsEnabled}function Ba(){return null!==os.skipHydrationRootTNode}function li(){return os.lFrame.lView}function Cs(){return os.lFrame.tView}function ol(t){return os.lFrame.contextLView=t,t[V]}function cu(t){return os.lFrame.contextLView=null,t}function Ws(){let t=Tl();for(;null!==t&&64===t.type;)t=t.parent;return t}function Tl(){return os.lFrame.currentTNode}function ea(t,n){const s=os.lFrame;s.currentTNode=t,s.isParent=n}function Ca(){return os.lFrame.isParent}function yo(){os.lFrame.isParent=!1}function lo(){const t=os.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function X(){return os.lFrame.bindingIndex++}function ot(t){const n=os.lFrame,s=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,s}function xn(t,n){const s=os.lFrame;s.bindingIndex=s.bindingRootIndex=t,Pr(n)}function Pr(t){os.lFrame.currentDirectiveIndex=t}function pi(){return os.lFrame.currentQueryIndex}function Ar(t){os.lFrame.currentQueryIndex=t}function Xr(t){const n=t[Vt];return 2===n.type?n.declTNode:1===n.type?t[Ee]:null}function Qi(t,n,s){if(s&Kr.SkipSelf){let f=n,g=t;for(;!(f=f.parent,null!==f||s&Kr.Host||(f=Xr(g),null===f||(g=g[rr],10&f.type))););if(null===f)return!1;n=f,t=g}const c=os.lFrame=Qs();return c.currentTNode=n,c.lView=t,!0}function no(t){const n=Qs(),s=t[Vt];os.lFrame=n,n.currentTNode=s.firstChild,n.lView=t,n.tView=s,n.contextLView=t,n.bindingIndex=s.bindingStartIndex,n.inI18n=!1}function Qs(){const t=os.lFrame,n=null===t?null:t.child;return null===n?uo(t):n}function uo(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function sa(){const t=os.lFrame;return os.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const ro=sa;function ya(){const t=sa();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Zi(){return os.lFrame.selectedIndex}function Eo(t){os.lFrame.selectedIndex=t}function Is(){const t=os.lFrame;return qo(t.tView,t.selectedIndex)}function xa(){os.lFrame.currentNamespace=Ti}let ts=!0;function ja(){return ts}function Es(t){ts=t}function Aa(){return zs(Ws(),li())}function zs(t,n){return new Vi(ss(t,n))}let Al,Vi=(()=>{class t{constructor(s){this.nativeElement=s}static#e=this.__NG_ELEMENT_ID__=Aa}return t})();function Cl(t){return t instanceof Vi?t.nativeElement:t}function vl(t,n){t.forEach(s=>Array.isArray(s)?vl(s,n):n(s))}function fa(t,n,s){n>=t.length?t.push(s):t.splice(n,0,s)}function du(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Bo(t,n){const s=[];for(let c=0;c<t;c++)s.push(n);return s}function Ks(t,n,s){let c=oa(t,n);return c>=0?t[1|c]=s:(c=~c,function Wo(t,n,s,c){let f=t.length;if(f==n)t.push(s,c);else if(1===f)t.push(c,t[0]),t[0]=s;else{for(f--,t.push(t[f-1],t[f]);f>n;)t[f]=t[f-2],f--;t[n]=s,t[n+1]=c}}(t,c,n,s)),c}function fu(t,n){const s=oa(t,n);if(s>=0)return t[1|s]}
1function oa(t,n){return function Lr(t,n,s){let c=0,f=t.length>>s;for(;f!==c;){const g=c+(f-c>>1),A=t[g<<s];if(n===A)return g<<s;A>n?f=g:c=g+1}return~(f<<s)}(t,n,1)}function jl(){return this._results[Symbol.iterator]()}class ha{static#e=Symbol.iterator;get changes(){return this._changes??=new Mr}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const s=ha.prototype;s[Symbol.iterator]||(s[Symbol.iterator]=jl)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,s){return this._results.reduce(n,s)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,s){this.dirty=!1;const c=function Do(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function Uu(t,n,s){if(t.length!==n.length)return!1;for(let c=0;c<t.length;c++){let f=t[c],g=n[c];if(s&&(f=s(f),g=s(g)),g!==f)return!1}return!0}(this._results,c,s))&&(this._results=c,this.length=c.length,this.last=c[this.length-1],this.first=c[0])}notifyOnChanges(){void 0!==this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(n){this._onDirty=n}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){void 0!==this._changes&&(this._changes.complete(),this._changes.unsubscribe())}}function pa(t){return 128==(128&t.flags)}function pu(t){Al=t}function ll(){if(void 0!==Al)return Al;if(typeof document<"u")return document;throw new rt(210,!1)}function Ds(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ka(t){return{providers:t.providers||[],imports:t.imports||[]}}function Dl(t){return F(t,ve)||F(t,qt)}function aa(t){return null!==Dl(t)}function F(t,n){return t.hasOwnProperty(n)?t[n]:null}function $(t){return t&&(t.hasOwnProperty(ht)||t.hasOwnProperty(zn))?t[ht]:null}const ve=Ht({\u0275prov:Ht}),ht=Ht({\u0275inj:Ht}),qt=Ht({ngInjectableDef:Ht}),zn=Ht({ngInjectorDef:Ht});class Cr{constructor(n,s){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof s?this.__NG_ELEMENT_ID__=s:void 0!==s&&(this.\u0275prov=Ds({token:this,providedIn:s.providedIn||"root",factory:s.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const Ur=new Cr("",{providedIn:"root",factory:()=>Hi}),Hi="ng",Ss=new Cr(""),Ps=new Cr("",{providedIn:"platform",factory:()=>"unknown"}),Wl=new Cr(""),zl=new Cr("",{providedIn:"root",factory:()=>ll().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),Ya=Ht({__forward_ref__:Ht});function vu(t){return t.__forward_ref__=vu,t.toString=function(){return Jr(this())},t}function ys(t){return Bu(t)?t():t}function Bu(t){return"function"==typeof t&&t.hasOwnProperty(Ya)&&t.__forward_ref__===vu}function Zs(t){return t&&!!t.\u0275providers}function cs(t){return"string"==typeof t?t:null==t?"":String(t)}function eu(t,n){throw new rt(-201,!1)}let $o;function ul(){return $o}function Po(t){const n=$o;return $o=t,n}function Ro(t,n,s){const c=Dl(t);return c&&"root"==c.providedIn?void 0===c.value?c.value=c.factory():c.value:s&Kr.Optional?null:void 0!==n?n:void eu()}const cl={},El="__NG_DI_FLAG__",Wu="ngTempTokenPath",Xa=/\n/gm,dl="__source";let la;function ta(t){const n=la;return la=t,n}function zu(t,n=Kr.Default){if(void 0===la)throw new rt(-203,!1);return null===la?Ro(t,void 0,n):la.get(t,n&Kr.Optional?null:void 0,n)}function Lo(t,n=Kr.Default){return(ul()||zu)(ys(t),n)}function xs(t,n=Kr.Default){return Lo(t,nn(n))}function nn(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function _r(t){const n=[];for(let s=0;s<t.length;s++){const c=ys(t[s]);if(Array.isArray(c)){if(0===c.length)throw new rt(900,!1);let f,g=Kr.Default;for(let A=0;A<c.length;A++){const N=c[A],q=Li(N);"number"==typeof q?-1===q?f=N.token:g|=q:f=N}n.push(Lo(f,g))}else n.push(Lo(c))}return n}function Wr(t,n){return t[El]=n,t.prototype[El]=n,t}function Li(t){return t[El]}let Tc=()=>null;function fc(t,n,s=!1){return Tc(t,n,s)}const xe="__annotations__",mt="__parameters__",gt="__prop__metadata__";function vt(t,n,s,c,f){return ur(()=>{const g=Gt(n);function A(...N){if(this instanceof A)return g.call(this,...N),this;const q=new A(...N);return function(Ot){return f&&f(Ot,...N),(Ot.hasOwnProperty(xe)?Ot[xe]:Object.defineProperty(Ot,xe,{value:[]})[xe]).push(q),c&&c(Ot),Ot}}return s&&(A.prototype=Object.create(s.prototype)),A.prototype.ngMetadataName=t,A.annotationCls=A,A})}function Gt(t){return function(...s){if(t){const c=t(...s);for(const f in c)this[f]=c[f]}}}function un(t,n,s){return ur(()=>{const c=Gt(n);function f(...g){if(this instanceof f)return c.apply(this,g),this;const A=new f(...g);return N.annotation=A,N;function N(q,nt,Ot){const pn=q.hasOwnProperty(mt)?q[mt]:Object.defineProperty(q,mt,{value:[]})[mt];for(;pn.length<=Ot;)pn.push(null);return(pn[Ot]=pn[Ot]||[]).push(A),q}}return s&&(f.prototype=Object.create(s.prototype)),f.prototype.ngMetadataName=t,f.annotationCls=f,f})}const Sn=Wr(un("Inject",t=>({token:t})),-1),Pn=Wr(un("Optional"),8),tn=Wr(un("Self"),2),kn=Wr(un("SkipSelf"),4),Rn=Wr(un("Host"),1);function vr(t,n){return t.hasOwnProperty(di)?t[di]:null}const hi=new Cr(""),ui=new Cr("",-1),Ri=new Cr("");class ni{get(n,s=cl){if(s===cl){const c=new Error(`NullInjectorError: No provider for ${Jr(n)}!`);throw c.name="NullInjectorError",c}return s}}function Qr(t){return{\u0275providers:t}}function Zr(...t){return{\u0275providers:Si(0,t),\u0275fromNgModule:!0}}function Si(t,...n){const s=[],c=new Set;let f;const g=A=>{s.push(A)};return vl(n,A=>{const N=A;Kn(N,g,[],c)&&(f||=[],f.push(N))}),void 0!==f&&$r(f,g),s}function $r(t,n){for(let s=0;s<t.length;s++){const{ngModule:c,providers:f}=t[s];gi(f,g=>{n(g,c)})}}function Kn(t,n,s,c){if(!(t=ys(t)))return!1;let f=null,g=$(t);const A=!g&&Hr(t);if(g||A){if(A&&!A.standalone)return!1;f=t}else{const q=t.ngModule;if(g=$(q),!g)return!1;f=q}const N=c.has(f);if(A){if(N)return!1;if(c.add(f),A.dependencies){const q="function"==typeof A.dependencies?A.dependencies():A.dependencies;for(const nt of q)Kn(nt,n,s,c)}}else{if(!g)return!1;{if(null!=g.imports&&!N){let nt;c.add(f);try{vl(g.imports,Ot=>{Kn(Ot,n,s,c)&&(nt||=[],nt.push(Ot))})}finally{}void 0!==nt&&$r(nt,n)}if(!N){const nt=vr(f)||(()=>new f);n({provide:f,useFactory:nt,deps:nr},f),n({provide:Ri,useValue:f,multi:!0},f),n({provide:hi,useValue:()=>Lo(f),multi:!0},f)}const q=g.providers;if(null!=q&&!N){const nt=t;gi(q,Ot=>{n(Ot,nt)})}}}return f!==t&&void 0!==t.providers}function gi(t,n){for(let s of t)Zs(s)&&(s=s.\u0275providers),Array.isArray(s)?gi(s,n):n(s)}const ci=Ht({provide:String,useValue:Ht});function Ui(t){return null!==t&&"object"==typeof t&&ci in t}function Ei(t){return"function"==typeof t}const Ys=new Cr(""),rs={},gs={};let Ko;function Pl(){return void 0===Ko&&(Ko=new ni),Ko}class $s{}class Yo extends $s{get destroyed(){return this._destroyed}constructor(n,s,c,f){super(),this.parent=s,this.source=c,this.scopes=f,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Su(n,A=>this.processProvider(A)),this.records.set(ui,Rl(void 0,this)),f.has("environment")&&this.records.set($s,Rl(void 0,this));const g=this.records.get(Ys);null!=g&&"string"==typeof g.value&&this.scopes.add(g.value),this.injectorDefTypes=new Set(this.get(Ri,nr,Kr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const n=S(null);try{for(const c of this._ngOnDestroyHooks)c.ngOnDestroy();const s=this._onDestroyHooks;this._onDestroyHooks=[];for(const c of s)c()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),S(n)}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const s=ta(this),c=Po(void 0);try{return n()}finally{ta(s),Po(c)}}get(n,s=cl,c=Kr.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(Qt))return n[Qt](this);c=nn(c);const g=ta(this),A=Po(void 0);try{if(!(c&Kr.SkipSelf)){let q=this.records.get(n);if(void 0===q){const nt=function ru(t){return"function"==typeof t||"object"==typeof t&&t instanceof Cr}(n)&&Dl(n);q=nt&&this.injectableDefInScope(nt)?Rl(wa(n),rs):null,this.records.set(n,q)}if(null!=q)return this.hydrate(n,q)}return(c&Kr.Self?Pl():this.parent).get(n,s=c&Kr.Optional&&s===cl?null:s)}catch(N){if("NullInjectorError"===N.name){if((N[Wu]=N[Wu]||[]).unshift(Jr(n)),g)throw N;return function $i(t,n,s,c){const f=t[Wu];throw n[dl]&&f.unshift(n[dl]),t.message=function _s(t,n,s,c=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.slice(2):t;let f=Jr(n);if(Array.isArray(n))f=n.map(Jr).join(" -> ");else if("object"==typeof n){let g=[];for(let A in n)if(n.hasOwnProperty(A)){let N=n[A];
1g.push(A+":"+("string"==typeof N?JSON.stringify(N):Jr(N)))}f=`{${g.join(", ")}}`}return`${s}${c?"("+c+")":""}[${f}]: ${t.replace(Xa,"\n ")}`}("\n"+t.message,f,s,c),t.ngTokenPath=f,t[Wu]=null,t}(N,n,"R3InjectorError",this.source)}throw N}finally{Po(A),ta(g)}}resolveInjectorInitializers(){const n=S(null),s=ta(this),c=Po(void 0);try{const g=this.get(hi,nr,Kr.Self);for(const A of g)A()}finally{ta(s),Po(c),S(n)}}toString(){const n=[],s=this.records;for(const c of s.keys())n.push(Jr(c));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new rt(205,!1)}processProvider(n){let s=Ei(n=ys(n))?n:ys(n&&n.provide);const c=function Qa(t){return Ui(t)?Rl(void 0,t.useValue):Rl(Xl(t),rs)}(n);if(!Ei(n)&&!0===n.multi){let f=this.records.get(s);f||(f=Rl(void 0,rs,!0),f.factory=()=>_r(f.multi),this.records.set(s,f)),s=n,f.multi.push(n)}this.records.set(s,c)}hydrate(n,s){const c=S(null);try{return s.value===rs&&(s.value=gs,s.value=s.factory()),"object"==typeof s.value&&s.value&&function _c(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(s.value)&&this._ngOnDestroyHooks.add(s.value),s.value}finally{S(c)}}injectableDefInScope(n){if(!n.providedIn)return!1;const s=ys(n.providedIn);return"string"==typeof s?"any"===s||this.scopes.has(s):this.injectorDefTypes.has(s)}removeOnDestroy(n){const s=this._onDestroyHooks.indexOf(n);-1!==s&&this._onDestroyHooks.splice(s,1)}}function wa(t){const n=Dl(t),s=null!==n?n.factory:vr(t);if(null!==s)return s;if(t instanceof Cr)throw new rt(204,!1);if(t instanceof Function)return function nu(t){if(t.length>0)throw new rt(204,!1);const s=function fe(t){return t&&(t[ve]||t[qt])||null}(t);return null!==s?()=>s.factory(t):()=>new t}(t);throw new rt(204,!1)}function Xl(t,n,s){let c;if(Ei(t)){const f=ys(t);return vr(f)||wa(f)}if(Ui(t))c=()=>ys(t.useValue);else if(function ai(t){return!(!t||!t.useFactory)}(t))c=()=>t.useFactory(..._r(t.deps||[]));else if(function Dr(t){return!(!t||!t.useExisting)}(t))c=()=>Lo(ys(t.useExisting));else{const f=ys(t&&(t.useClass||t.provide));if(!function Ml(t){return!!t.deps}(t))return vr(f)||wa(f);c=()=>new f(..._r(t.deps))}return c}function Rl(t,n,s=!1){return{factory:t,value:n,multi:s?[]:void 0}}function Su(t,n){for(const s of t)Array.isArray(s)?Su(s,n):s&&Zs(s)?Su(s.\u0275providers,n):n(s)}function Ku(t,n){t instanceof Yo&&t.assertNotDestroyed();const c=ta(t),f=Po(void 0);try{return n()}finally{ta(c),Po(f)}}function na(t){const n=Er.ng;if(n&&n.\u0275compilerFacade)return n.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}const ad={\u0275\u0275defineInjectable:Ds,\u0275\u0275defineInjector:Ka,\u0275\u0275inject:Lo,\u0275\u0275invalidFactoryDep:function wu(t){throw new rt(202,!1)},resolveForwardRef:ys},ld=Function;function ud(t){return"function"==typeof t}const cd=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/,lg=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Pf=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,Ac=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/;class Ch{constructor(n){this._reflect=n||Er.Reflect}factory(n){return(...s)=>new n(...s)}_zipTypesAndAnnotations(n,s){let c;c=Bo(typeof n>"u"?s.length:n.length);for(let f=0;f<c.length;f++)c[f]=typeof n>"u"?[]:n[f]&&n[f]!=Object?[n[f]]:[],s&&null!=s[f]&&(c[f]=c[f].concat(s[f]));return c}_ownParameters(n,s){if(function _u(t){return cd.test(t)||Ac.test(t)||lg.test(t)&&!Pf.test(t)}(n.toString()))return null;if(n.parameters&&n.parameters!==s.parameters)return n.parameters;const f=n.ctorParameters;if(f&&f!==s.ctorParameters){const N="function"==typeof f?f():f,q=N.map(Ot=>Ot&&Ot.type),nt=N.map(Ot=>Ot&&Gd(Ot.decorators));return this._zipTypesAndAnnotations(q,nt)}const g=n.hasOwnProperty(mt)&&n[mt],A=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",n);return A||g?this._zipTypesAndAnnotations(A,g):Bo(n.length)}parameters(n){if(!ud(n))return[];const s=Au(n);let c=this._ownParameters(n,s);return!c&&s!==Object&&(c=this.parameters(s)),c||[]}_ownAnnotations(n,s){if(n.annotations&&n.annotations!==s.annotations){let c=n.annotations;return"function"==typeof c&&c.annotations&&(c=c.annotations),c}return n.decorators&&n.decorators!==s.decorators?Gd(n.decorators):n.hasOwnProperty(xe)?n[xe]:null}annotations(n){if(!ud(n))return[];const s=Au(n),c=this._ownAnnotations(n,s)||[];return(s!==Object?this.annotations(s):[]).concat(c)}_ownPropMetadata(n,s){if(n.propMetadata&&n.propMetadata!==s.propMetadata){let c=n.propMetadata;return"function"==typeof c&&c.propMetadata&&(c=c.propMetadata),c}if(n.propDecorators&&n.propDecorators!==s.propDecorators){const c=n.propDecorators,f={};
1return Object.keys(c).forEach(g=>{f[g]=Gd(c[g])}),f}return n.hasOwnProperty(gt)?n[gt]:null}propMetadata(n){if(!ud(n))return{};const s=Au(n),c={};if(s!==Object){const g=this.propMetadata(s);Object.keys(g).forEach(A=>{c[A]=g[A]})}const f=this._ownPropMetadata(n,s);return f&&Object.keys(f).forEach(g=>{const A=[];c.hasOwnProperty(g)&&A.push(...c[g]),A.push(...f[g]),c[g]=A}),c}ownPropMetadata(n){return ud(n)&&this._ownPropMetadata(n,Au(n))||{}}hasLifecycleHook(n,s){return n instanceof ld&&s in n.prototype}}function Gd(t){return t?t.map(n=>new(0,n.type.annotationCls)(...n.args?n.args:[])):[]}function Au(t){const n=t.prototype?Object.getPrototypeOf(t.prototype):null;return(n?n.constructor:null)||Object}class Dc{constructor(n,s,c){this.previousValue=n,this.currentValue=s,this.firstChange=c}isFirstChange(){return this.firstChange}}function dd(t,n,s,c){null!==n?n.applyValueToInputSignal(n,c):t[s]=c}function fd(){return Wd}function Wd(t){return t.type.prototype.ngOnChanges&&(t.setInput=ug),Rf}function Rf(){const t=Zo(this),n=t?.current;if(n){const s=t.previous;if(s===Pi)t.previous=n;else for(let c in n)s[c]=n[c];t.current=null,this.ngOnChanges(n)}}function ug(t,n,s,c,f){const g=this.declaredInputs[c],A=Zo(t)||function eo(t,n){return t[Mf]=n}(t,{previous:Pi,current:null}),N=A.current||(A.current={}),q=A.previous,nt=q[g];N[g]=new Dc(nt&&nt.currentValue,s,q===Pi),dd(t,n,f,s)}fd.ngInherit=!0;const Mf="__ngSimpleChanges__";function Zo(t){return t[Mf]||null}const Ja=function(t,n,s){};function Wa(t,n){for(let s=n.directiveStart,c=n.directiveEnd;s<c;s++){const g=t.data[s].type.prototype,{ngAfterContentInit:A,ngAfterContentChecked:N,ngAfterViewInit:q,ngAfterViewChecked:nt,ngOnDestroy:Ot}=g;A&&(t.contentHooks??=[]).push(-s,A),N&&((t.contentHooks??=[]).push(s,N),(t.contentCheckHooks??=[]).push(s,N)),q&&(t.viewHooks??=[]).push(-s,q),nt&&((t.viewHooks??=[]).push(s,nt),(t.viewCheckHooks??=[]).push(s,nt)),null!=Ot&&(t.destroyHooks??=[]).push(s,Ot)}}function Du(t,n,s){Yu(t,n,3,s)}function Pc(t,n,s,c){(3&t[Sr])===s&&Yu(t,n,s,c)}function pd(t,n){let s=t[Sr];(3&s)===n&&(s&=16383,s+=1,t[Sr]=s)}function Yu(t,n,s,c){const g=c??-1,A=n.length-1;let N=0;for(let q=void 0!==c?65535&t[Rr]:0;q<A;q++)if("number"==typeof n[q+1]){if(N=n[q],null!=c&&N>=c)break}else n[q]<0&&(t[Rr]+=65536),(N<g||-1==g)&&(gd(t,s,n,q),t[Rr]=(4294901760&t[Rr])+q+2),q++}function Xu(t,n){Ja(4,t,n);const s=S(null);try{n.call(t)}finally{S(s),Ja(5,t,n)}}function gd(t,n,s,c){const f=s[c]<0,g=s[c+1],N=t[f?-s[c]:s[c]];f?t[Sr]>>14<t[Rr]>>16&&(3&t[Sr])===n&&(t[Sr]+=16384,Xu(N,g)):Xu(N,g)}const iu=-1;class Rc{constructor(n,s,c){this.factory=n,this.resolving=!1,this.canSeeViewProviders=s,this.injectImpl=c}}function vd(t){return t!==iu}function hc(t){return 32767&t}function Pa(t,n){let s=function xf(t){return t>>16}(t),c=n;for(;s>0;)c=c[rr],s--;return c}let Qu=!0;function yd(t){const n=Qu;return Qu=t,n}const zd=255,Mc=5;let Rh=0;const pl={};function Ed(t,n){const s=m(t,n);if(-1!==s)return s;const c=n[Vt];c.firstCreatePass&&(t.injectorIndex=n.length,M(c.data,t),M(n,null),M(c.blueprint,null));const f=E(t,n),g=t.injectorIndex;if(vd(f)){const A=hc(f),N=Pa(f,n),q=N[Vt].data;for(let nt=0;nt<8;nt++)n[g+nt]=N[A+nt]|q[A+nt]}return n[g+8]=f,g}function M(t,n){t.push(0,0,0,0,0,0,0,0,n)}function m(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function E(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let s=0,c=null,f=n;for(;null!==f;){if(c=bd(f),null===c)return iu;if(s++,f=f[rr],-1!==c.injectorIndex)return c.injectorIndex|s<<16}return iu}function L(t,n,s){!function su(t,n,s){let c;"string"==typeof s?c=s.charCodeAt(0)||0:s.hasOwnProperty(Mi)&&(c=s[Mi]),null==c&&(c=s[Mi]=Rh++);const f=c&zd;n.data[t+(f>>Mc)]|=1<<f}(t,n,s)}function Yt(t,n,s){if(s&Kr.Optional||void 0!==t)return t;eu()}function Zn(t,n,s,c){if(s&Kr.Optional&&void 0===c&&(c=null),!(s&(Kr.Self|Kr.Host))){const f=t[ne],g=Po(void 0);try{return f?f.get(n,c,s&Kr.Optional):Ro(n,c,s&Kr.Optional)}finally{Po(g)}}return Yt(c,0,s)}function xr(t,n,s,c=Kr.Default,f){if(null!==t){if(2048&n[Sr]&&!(c&Kr.Self)){const A=function Mh(t,n,s,c,f){let g=t,A=n;for(;null!==g&&null!==A&&2048&A[Sr]&&!(512&A[Sr]);){const N=vi(g,A,s,c|Kr.Self,pl);if(N!==pl)return N;let q=g.parent;if(!q){const nt=A[bs];if(nt){const Ot=nt.get(s,pl,c);if(Ot!==pl)return Ot}q=bd(A),A=A[rr]}g=q}return f}(t,n,s,c,pl);if(A!==pl)return A}const g=vi(t,n,s,c,pl);if(g!==pl)return g}return Zn(n,s,c,f)}function vi(t,n,s,c,f){const g=function Xo(t){if("string"==typeof t)return t.charCodeAt(0)||0;const n=t.hasOwnProperty(Mi)?t[Mi]:void 0;return"number"==typeof n?n>=0?n&zd:Ru:n}(s);if("function"==typeof g){if(!Qi(n,t,c))return c&Kr.Host?Yt(f,0,c):Zn(n,s,c,f);try{let A;if(A=g(c),null!=A||c&Kr.Optional)return A;eu()}finally{ro()}}else if("number"==typeof g){let A=null,N=m(t,n),q=iu,nt=c&Kr.Host?n[fr][Ee]:null;
1for((-1===N||c&Kr.SkipSelf)&&(q=-1===N?E(t,n):n[N+8],q!==iu&&xc(c,!1)?(A=n[Vt],N=hc(q),n=Pa(q,n)):N=-1);-1!==N;){const Ot=n[Vt];if(xl(g,N,Ot.data)){const pn=Yi(N,n,s,A,c,nt);if(pn!==pl)return pn}q=n[N+8],q!==iu&&xc(c,n[Vt].data[N+8]===nt)&&xl(g,N,n)?(A=Ot,N=hc(q),n=Pa(q,n)):N=-1}}return f}function Yi(t,n,s,c,f,g){const A=n[Vt],N=A.data[t+8],Ot=Ji(N,A,s,null==c?tt(N)&&Qu:c!=A&&0!=(3&N.type),f&Kr.Host&&g===N);return null!==Ot?Xi(n,A,Ot,N):pl}function Ji(t,n,s,c,f){const g=t.providerIndexes,A=n.data,N=1048575&g,q=t.directiveStart,Ot=g>>20,er=f?N+Ot:t.directiveEnd;for(let hr=c?N:N+Ot;hr<er;hr++){const ei=A[hr];if(hr<q&&s===ei||hr>=q&&ei.type===s)return hr}if(f){const hr=A[q];if(hr&&Vn(hr)&&hr.type===s)return q}return null}function Xi(t,n,s,c){let f=t[s];const g=n.data;if(function Pu(t){return t instanceof Rc}(f)){const A=f;A.resolving&&function ql(t,n){throw n&&n.join(" > "),new rt(-200,t)}(function ls(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():cs(t)}(g[s]));const N=yd(A.canSeeViewProviders);A.resolving=!0;const nt=A.injectImpl?Po(A.injectImpl):null;Qi(t,c,Kr.Default);try{f=t[s]=A.factory(void 0,g,t,c),n.firstCreatePass&&s>=c.directiveStart&&function Ah(t,n,s){const{ngOnChanges:c,ngOnInit:f,ngDoCheck:g}=n.type.prototype;if(c){const A=Wd(n);(s.preOrderHooks??=[]).push(t,A),(s.preOrderCheckHooks??=[]).push(t,A)}f&&(s.preOrderHooks??=[]).push(0-t,f),g&&((s.preOrderHooks??=[]).push(t,g),(s.preOrderCheckHooks??=[]).push(t,g))}(s,g[s],n)}finally{null!==nt&&Po(nt),yd(N),A.resolving=!1,ro()}}return f}function xl(t,n,s){return!!(s[n+(t>>Mc)]&1<<t)}function xc(t,n){return!(t&Kr.Self||t&Kr.Host&&n)}class ga{constructor(n,s){this._tNode=n,this._lView=s}get(n,s,c){return xr(this._tNode,this._lView,n,nn(c),s)}}function Ru(){return new ga(Ws(),li())}function Mu(t){return ur(()=>{const n=t.prototype.constructor,s=n[di]||wd(n),c=Object.prototype;let f=Object.getPrototypeOf(t.prototype).constructor;for(;f&&f!==c;){const g=f[di]||wd(f);if(g&&g!==s)return g;f=Object.getPrototypeOf(f)}return g=>new g})}function wd(t){return Bu(t)?()=>{const n=wd(ys(t));return n&&n()}:vr(t)}function bd(t){const n=t[Vt],s=n.type;return 2===s?n.declTNode:1===s?t[Ee]:null}function Ol(t){return function at(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const s=t.attrs;if(s){const c=s.length;let f=0;for(;f<c;){const g=s[f];if(kr(g))break;if(0===g)f+=2;else if("number"==typeof g)for(f++;f<c&&"string"==typeof s[f];)f++;else{if(g===n)return s[f+1];f+=2}}}return null}(Ws(),t)}const xh=un("Attribute",t=>({attributeName:t,__NG_ELEMENT_ID__:()=>Ol(t)}));let Hd=null;function Id(t){return Oc(function Kd(){return Hd=Hd||new Ch}().parameters(t))}function Oc(t){return t.map(n=>function Sd(t){const n={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let s=0;s<t.length;s++){const c=t[s];if(void 0===c)continue;const f=Object.getPrototypeOf(c);if(c instanceof Pn||"Optional"===f.ngMetadataName)n.optional=!0;else if(c instanceof kn||"SkipSelf"===f.ngMetadataName)n.skipSelf=!0;else if(c instanceof tn||"Self"===f.ngMetadataName)n.self=!0;else if(c instanceof Rn||"Host"===f.ngMetadataName)n.host=!0;else if(c instanceof Sn)n.token=c.token;else if(c instanceof xh){if(void 0===c.attributeName)throw new rt(204,!1);n.attribute=c.attributeName}else n.token=c}else n.token=void 0===t||Array.isArray(t)&&0===t.length?null:t;return n}(n))}const Of=Ht({provide:String,useValue:Ht});function fg(t){return void 0!==t.useClass}function Oh(t){return void 0!==t.useFactory}const f0=vt("Injectable",void 0,void 0,void 0,(t,n)=>function Td(t,n){let s=null,c=null;t.hasOwnProperty(ve)||Object.defineProperty(t,ve,{get:()=>(null===s&&(s=na().compileInjectable(ad,`ng:///${t.name}/\u0275prov.js`,function iv(t,n){const s=n||{providedIn:null},c={name:t.name,type:t,typeArgumentCount:0,providedIn:s.providedIn};return(fg(s)||Oh(s))&&void 0!==s.deps&&(c.deps=Oc(s.deps)),fg(s)?c.useClass=s.useClass:function hg(t){return Of in t}(s)?c.useValue=s.useValue:Oh(s)?c.useFactory=s.useFactory:function rv(t){return void 0!==t.useExisting}
1(s)&&(c.useExisting=s.useExisting),c}(t,n))),s)}),t.hasOwnProperty(di)||Object.defineProperty(t,di,{get:()=>{if(null===c){const f=na();c=f.compileFactory(ad,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:Id(t),target:f.FactoryTarget.Injectable})}return c},configurable:!0})}(t,n));function pg(t,n=null,s=null,c){const f=gg(t,n,s,c);return f.resolveInjectorInitializers(),f}function gg(t,n=null,s=null,c,f=new Set){const g=[s||nr,Zr(t)];return c=c||("object"==typeof t?void 0:Jr(t)),new Yo(g,n||Pl(),c||null,f)}let gl=(()=>{class t{static#e=this.THROW_IF_NOT_FOUND=cl;static#t=this.NULL=new ni;static create(s,c){if(Array.isArray(s))return pg({name:""},c,s,"");{const f=s.name??"";return pg({name:f},s.parent,s.providers,f)}}static#n=this.\u0275prov=Ds({token:t,providedIn:"any",factory:()=>Lo(ui)});static#r=this.__NG_ELEMENT_ID__=-1}return t})();function mg(t){return t.ngOriginalError}class gc{constructor(){this._console=console}handleError(n){const s=this._findOriginalError(n);this._console.error("ERROR",n),s&&this._console.error("ORIGINAL ERROR",s)}_findOriginalError(n){let s=n&&mg(n);for(;s&&mg(s);)s=mg(s);return s||null}}const sv=new Cr("",{providedIn:"root",factory:()=>xs(gc).handleError.bind(void 0)}),Qd=new Cr("",{providedIn:"root",factory:()=>!1});let Zu,Jd;function Cd(t){return function qu(){if(void 0===Zu&&(Zu=null,Er.trustedTypes))try{Zu=Er.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Zu}()?.createHTML(t)||t}function Nf(){if(void 0===Jd&&(Jd=null,Er.trustedTypes))try{Jd=Er.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Jd}function vg(t){return Nf()?.createHTML(t)||t}function Lh(t){return Nf()?.createScriptURL(t)||t}class yg{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${lt})`}}function mc(t){return t instanceof yg?t.changingThisBreaksApplicationSecurity:t}function ec(t,n){const s=function kf(t){return t instanceof yg&&t.getTypeName()||null}(t);if(null!=s&&s!==n){if("ResourceURL"===s&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${s} (see ${lt})`)}return s===n}class Vh{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n="<body><remove></remove>"+n;try{const s=(new window.DOMParser).parseFromString(Cd(n),"text/html").body;return null===s?this.inertDocumentHelper.getInertBodyElement(n):(s.removeChild(s.firstChild),s)}catch{return null}}}class uv{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const s=this.inertDocument.createElement("template");return s.innerHTML=Cd(n),s}}const Zd=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Bh(t){return(t=String(t)).match(Zd)?t:"unsafe:"+t}function Il(t){const n={};for(const s of t.split(","))n[s]=!0;return n}function Uf(...t){const n={};for(const s of t)for(const c in s)s.hasOwnProperty(c)&&(n[c]=!0);return n}const _d=Il("area,br,col,hr,img,wbr"),wg=Il("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),vc=Il("rp,rt"),bg=Uf(_d,Uf(wg,Il("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Uf(vc,Il("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Uf(vc,wg)),$h=Il("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Sg=Uf($h,Il("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Il("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),w0=Il("script,style,template");class cv{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let s=n.firstChild,c=!0;for(;s;)if(s.nodeType===Node.ELEMENT_NODE?c=this.startElement(s):s.nodeType===Node.TEXT_NODE?this.chars(s.nodeValue):this.sanitizedSomething=!0,c&&s.firstChild)s=s.firstChild;else for(;s;){s.nodeType===Node.ELEMENT_NODE&&this.endElement(s);let f=this.checkClobberedElement(s,s.nextSibling);if(f){s=f;break}s=this.checkClobberedElement(s,s.parentNode)}return this.buf.join("")}startElement(n){const s=n.nodeName.toLowerCase();if(!bg.hasOwnProperty(s))return this.sanitizedSomething=!0,!w0.hasOwnProperty(s);this.buf.push("<"),this.buf.push(s);const c=n.attributes;for(let f=0;f<c.length;f++){const g=c.item(f),A=g.name,N=A.toLowerCase();if(!Sg.hasOwnProperty(N)){this.sanitizedSomething=!0;continue}let q=g.value;$h[N]&&(q=Bh(q)),this.buf.push(" ",A,'="',kc(q),'"')}return this.buf.push(">"),!0}endElement(n){const s=n.nodeName.toLowerCase();bg.hasOwnProperty(s)&&!_d.hasOwnProperty(s)&&(this.buf.push("</"),this.buf.push(s),this.buf.push(">"))}chars(n){this.buf.push(kc(n))}
1checkClobberedElement(n,s){if(s&&(n.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return s}}const b0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,dv=/([^\#-~ |!])/g;function kc(t){return t.replace(/&/g,"&").replace(b0,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(dv,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}let Lc;function jh(t){return"content"in t&&function I0(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Ad=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(Ad||{});function hv(t){const n=Fc();return n?vg(n.sanitize(Ad.HTML,t)||""):ec(t,"HTML")?vg(mc(t)):function fv(t,n){let s=null;try{Lc=Lc||function Ff(t){const n=new uv(t);return function Nc(){try{return!!(new window.DOMParser).parseFromString(Cd(""),"text/html")}catch{return!1}}()?new Vh(n):n}(t);let c=n?String(n):"";s=Lc.getInertBodyElement(c);let f=5,g=c;do{if(0===f)throw new Error("Failed to sanitize html because the input is unstable");f--,c=g,g=s.innerHTML,s=Lc.getInertBodyElement(c)}while(c!==g);return Cd((new cv).sanitizeChildren(jh(s)||s))}finally{if(s){const c=jh(s)||s;for(;c.firstChild;)c.removeChild(c.firstChild)}}}(ll(),cs(t))}function Vf(t){const n=Fc();return n?n.sanitize(Ad.URL,t)||"":ec(t,"URL")?mc(t):Bh(cs(t))}function Na(t){const n=Fc();if(n)return Lh(n.sanitize(Ad.RESOURCE_URL,t)||"");if(ec(t,"ResourceURL"))return Lh(mc(t));throw new rt(904,!1)}function Gh(t,n,s){return function A0(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?Na:Vf}(n,s)(t)}function Fc(){const t=li();return t&&t[je].sanitizer}const D0=/^>|^->|<!--|-->|--!>|<!-$/g,pv=/(<|>)/g,Cg="\u200b$1\u200b";const Dg=new Map;let gv=0;const Og="__ngContext__";function ba(t,n){Me(n)?(t[Og]=n[Oi],function mv(t){Dg.set(t[Oi],t)}(n)):t[Og]=n}function Nl(t){return t instanceof Function?t():t}var yc=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(yc||{});let Gf;function rf(t,n){return Gf(t,n)}function Bc(t,n,s,c,f){if(null!=c){let g,A=!1;Ce(c)?g=c:Me(c)&&(A=!0,c=c[wt]);const N=as(c);
vendor: 14,299 bytes, line 1
10===t&&null!==s?null==f?Gg(n,s,N):jc(n,s,N,f||null,!0):1===t&&null!==s?jc(n,s,N,f||null,!0):2===t?function df(t,n,s){const c=uf(t,n);c&&function Wg(t,n,s,c){t.removeChild(n,s,c)}(t,c,n,s)}(n,N,A):3===t&&n.destroyNode(N),null!=g&&function U0(t,n,s,c,f){const g=s[$t];g!==as(s)&&Bc(n,t,c,g,f);for(let N=oe;N<s.length;N++){const q=s[N];Hf(q[Vt],q,t,n,c,g)}}(n,t,g,s,f)}}function zf(t,n){return t.createComment(function Wh(t){return t.replace(D0,n=>n.replace(pv,Cg))}(n))}function xu(t,n,s){return t.createElement(n,s)}function Zh(t,n){Hf(t,n,n[$e],2,null,null)}function qh(t,n){const s=t[be],c=s.indexOf(n);s.splice(c,1)}function $c(t,n){if(t.length<=oe)return;const s=oe+n,c=t[s];if(c){const f=c[Xn];null!==f&&f!==t&&qh(f,c),n>0&&(t[s-1][Rt]=c[Rt]);const g=du(t,oe+n);!function Mv(t,n){Zh(t,n),n[wt]=null,n[Ee]=null}(c[Vt],c);const A=g[xi];null!==A&&A.detachView(g[Vt]),c[St]=null,c[Rt]=null,c[Sr]&=-129}return c}function af(t,n){if(!(256&n[Sr])){const s=n[$e];s.destroyNode&&Hf(t,n,s,3,null,null),function k0(t){let n=t[Wt];if(!n)return ep(t[Vt],t);for(;n;){let s=null;if(Me(n))s=n[Wt];else{const c=n[oe];c&&(s=c)}if(!s){for(;n&&!n[Rt]&&n!==t;)Me(n)&&ep(n[Vt],n),n=n[St];null===n&&(n=t),Me(n)&&ep(n[Vt],n),s=n&&n[Rt]}n=s}}(n)}}function ep(t,n){if(256&n[Sr])return;const s=S(null);try{n[Sr]&=-129,n[Sr]|=256,n[Ns]&&function pe(t){if(Ie(t),Ne(t))for(let n=0;n<t.producerNode.length;n++)Ve(t.producerNode[n],t.producerIndexOfThis[n]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}(n[Ns]),function $g(t,n){let s;if(null!=t&&null!=(s=t.destroyHooks))for(let c=0;c<s.length;c+=2){const f=n[s[c]];if(!(f instanceof Rc)){const g=s[c+1];if(Array.isArray(g))for(let A=0;A<g.length;A+=2){const N=f[g[A]],q=g[A+1];Ja(4,N,q);try{q.call(N)}finally{Ja(5,N,q)}}else{Ja(4,f,g);try{g.call(f)}finally{Ja(5,f,g)}}}}}(t,n),function lf(t,n){const s=t.cleanup,c=n[ie];if(null!==s)for(let g=0;g<s.length-1;g+=2)if("string"==typeof s[g]){const A=s[g+3];A>=0?c[A]():c[-A].unsubscribe(),g+=2}else s[g].call(c[s[g+1]]);null!==c&&(n[ie]=null);const f=n[fs];if(null!==f){n[fs]=null;for(let g=0;g<f.length;g++)(0,f[g])()}}(t,n),1===n[Vt].type&&n[$e].destroy();const c=n[Xn];if(null!==c&&Ce(n[St])){c!==n[St]&&qh(c,n);const f=n[xi];null!==f&&f.detachView(t)}!function Rg(t){Dg.delete(t[Oi])}(n)}finally{S(s)}}function jg(t,n,s){return function xv(t,n,s){let c=n;for(;null!==c&&40&c.type;)c=(n=c).parent;if(null===c)return s[wt];{const{componentOffset:f}=c;if(f>-1){const{encapsulation:g}=t.data[c.directiveStart+f];if(g===Ir.None||g===Ir.Emulated)return null}return ss(c,s)}}(t,n.parent,s)}function jc(t,n,s,c,f){t.insertBefore(n,s,c,f)}function Gg(t,n,s){t.appendChild(n,s)}function Ov(t,n,s,c,f){null!==c?jc(t,n,s,c,f):Gg(t,n,s)}function uf(t,n){return t.parentNode(n)}function tp(t,n,s){return np(t,n,s)}let rp,np=function Nv(t,n,s){return 40&t.type?ss(t,s):null};function cf(t,n,s,c){const f=jg(t,c,n),g=n[$e],N=tp(c.parent||n[Ee],c,n);if(null!=f)if(Array.isArray(s))for(let q=0;q<s.length;q++)Ov(g,f,s[q],N,!1);else Ov(g,f,s,N,!1);void 0!==rp&&rp(g,c,n,s,f)}function Dd(t,n){if(null!==n){const s=n.type;if(3&s)return ss(n,t);if(4&s)return nc(-1,t[n.index]);if(8&s){const c=n.child;if(null!==c)return Dd(t,c);{const f=t[n.index];return Ce(f)?nc(-1,f):as(f)}}if(32&s)return rf(n,t)()||as(t[n.index]);{const c=Pd(t,n);return null!==c?Array.isArray(c)?c[0]:Dd(Qo(t[fr]),c):Dd(t,n.next)}}return null}function Pd(t,n){return null!==n?t[fr][Ee].projection[n.projection]:null}function nc(t,n){const s=oe+t+1;if(s<n.length){const c=n[s],f=c[Vt].firstChild;if(null!==f)return Dd(c,f)}return n[$t]}function Gc(t,n,s,c,f,g,A){for(;null!=s;){const N=c[s.index],q=s.type;if(A&&0===n&&(N&&ba(as(N),c),s.flags|=2),32!=(32&s.flags))if(8&q)Gc(t,n,s.child,c,f,g,!1),Bc(n,t,f,N,g);else if(32&q){const nt=rf(s,c);let Ot;for(;Ot=nt();)Bc(n,t,f,Ot,g);Bc(n,t,f,N,g)}else 16&q?kv(t,n,c,s,f,g):Bc(n,t,f,N,g);s=A?s.projectionNext:s.next}}function Hf(t,n,s,c,f,g){Gc(s,c,t.firstChild,n,f,g,!1)}function kv(t,n,s,c,f,g){const A=s[fr],q=A[Ee].projection[c.projection];if(Array.isArray(q))for(let nt=0;nt<q.length;nt++)Bc(n,t,f,q[nt],g);else{let nt=q;const Ot=A[St];pa(c)&&(nt.flags|=128),Gc(t,n,nt,Ot,f,g,!0)}}function sp(t,n,s){""===s?t.removeAttribute(n,"class"):t.setAttribute(n,"class",s)}function op(t,n,s){const{mergedAttrs:c,classes:f,styles:g}=s;null!==c&&Cn(t,n,c),null!==f&&sp(t,n,f),null!==g&&function Hg(t,n,s){t.setAttribute(n,"style",s)}(t,n,g)}const Fs={};function Lv(t=1){ap(Cs(),li(),Zi()+t,!1)}function ap(t,n,s,c){if(!c)if(3==(3&n[Sr])){const g=t.preOrderCheckHooks;null!==g&&Du(n,g,s)}else{const g=t.preOrderHooks;null!==g&&Pc(n,g,0,s)}Eo(s)}function Wc(t,n=Kr.Default){const s=li();return null===s?Lo(t,n):xr(Ws(),s,ys(t),n)}function Kg(){throw new Error("invalid")}function lp(t,n,s,c,f,g){const A=S(null);try{let N=null;f&_n.SignalBased&&(N=n[c][P]),null!==N&&void 0!==N.transformFn&&(g=N.transformFn(g)),f&_n.HasDecoratorInputTransform&&(g=t.inputTransforms[c].call(n,g)),null!==t.setInput?t.setInput(n,N,g,s,c):dd(n,N,c,g)}finally{S(A)}}function Kf(t,n,s,c,f,g,A,N,q,nt,Ot){const pn=n.blueprint.slice();return pn[wt]=f,pn[Sr]=204|c,(null!==nt||t&&2048&t[Sr])&&(pn[Sr]|=2048),Sa(pn),pn[St]=pn[rr]=t,pn[V]=s,pn[je]=A||t&&t[je],pn[$e]=N||t&&t[$e],pn[ne]=q||t&&t[ne]||null,pn[Ee]=g,pn[Oi]=function P0(){return gv++}(),pn[U]=Ot,pn[bs]=nt,pn[fr]=2==n.type?t[fr]:pn,pn}function hf(t,n,s,c,f){let g=t.data[n];if(null===g)g=function up(t,n,s,c,f){const g=Tl(),A=Ca(),q=t.data[n]=function $0(t,n,s,c,f,g){let A=n?n.injectorIndex:-1,N=0;return Ba()&&(N|=128),{type:s,index:c,insertBeforeIndex:null,injectorIndex:A,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:N,providerIndexes:0,value:f,attrs:g,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,A?g:g&&g.parent,s,n,c,f);return null===t.firstChild&&(t.firstChild=q),null!==g&&(A?null==g.child&&null!==q.parent&&(g.child=q):null===g.next&&(g.next=q,q.prev=g)),q}(t,n,s,c,f),function Ae(){return os.lFrame.inI18n}()&&(g.flags|=32);else if(64&g.type){g.type=s,g.value=c,g.attrs=f;const A=function $a(){const t=os.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}();g.injectorIndex=null===A?-1:A.injectorIndex}return ea(g,!0),g}function pf(t,n,s,c){if(0===s)return-1;const f=n.length;for(let g=0;g<s;g++)n.push(c),t.blueprint.push(c),t.data.push(null);return f}function Yg(t,n,s,c,f){const g=Zi(),A=2&c;try{Eo(-1),A&&n.length>Ci&&ap(t,n,Ci,!1),Ja(A?2:0,f),s(c,f)}finally{Eo(g),Ja(A?3:1,f)}}function cp(t,n,s){if(Ke(n)){const c=S(null);try{const g=n.directiveEnd;for(let A=n.directiveStart;A<g;A++){const N=t.data[A];N.contentQueries&&N.contentQueries(1,s[A],A)}}finally{S(c)}}}function Xg(t,n,s){ko()&&(function z0(t,n,s,c){const f=s.directiveStart,g=s.directiveEnd;tt(s)&&function K0(t,n,s){const c=ss(n,t),f=Fv(s);let A=16;s.signals?A=4096:s.onPush&&(A=64);const N=gp(t,Kf(t,f,null,A,c,n,null,t[je].rendererFactory.createRenderer(c,s),null,null,null));t[n.index]=N}(n,s,t.data[f+s.componentOffset]),t.firstCreatePass||Ed(s,n),ba(c,n);const A=s.initialInputs;for(let N=f;N<g;N++){const q=t.data[N],nt=Xi(n,t,N,s);ba(nt,n),null!==A&&dm(0,N-f,nt,q,0,A),Vn(q)&&(Uo(s.index,n)[V]=Xi(n,t,N,s))}}(t,n,s,ss(s,n)),64==(64&s.flags)&&hp(t,n,s))}function Qg(t,n,s=ss){const c=n.localNames;if(null!==c){let f=n.index+1;for(let g=0;g<c.length;g+=2){const A=c[g+1],N=-1===A?s(n,t):t[A];t[f++]=N}}}function Fv(t){const n=t.tView;return null===n||n.incompleteFirstPass?t.tView=Jg(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):n}function Jg(t,n,s,c,f,g,A,N,q,nt,Ot){const pn=Ci+c,er=pn+f,hr=function Zg(t,n){const s=[];for(let c=0;c<n;c++)s.push(c<t?null:Fs);return s}(pn,er),ei="function"==typeof nt?nt():nt;return hr[Vt]={type:t,blueprint:hr,template:s,queries:null,viewQuery:N,declTNode:n,data:hr.slice().fill(null,pn),bindingStartIndex:pn,expandoStartIndex:er,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof g?g():g,pipeRegistry:"function"==typeof A?A():A,firstChild:null,schemas:q,consts:ei,incompleteFirstPass:!1,ssrId:Ot}}let em=()=>null;function dp(t,n,s,c,f){for(let g in n){if(!n.hasOwnProperty(g))continue;const A=n[g];if(void 0===A)continue;c??={};let N,q=_n.None;Array.isArray(A)?(N=A[0],q=A[1]):N=A;let nt=g;if(null!==f){if(!f.hasOwnProperty(g))continue;nt=f[g]}0===t?Uv(c,s,nt,N,q):Uv(c,s,nt,N)}return c}function Uv(t,n,s,c,f){let g;t.hasOwnProperty(s)?(g=t[s]).push(n,c):g=t[s]=[n,c],void 0!==f&&g.push(f)}function ml(t,n,s,c,f,g,A,N){const q=ss(n,s);let Ot,nt=n.inputs;!N&&null!=nt&&(Ot=nt[c])?(Qf(t,s,Ot,c,f),tt(n)&&function Vv(t,n){const s=Uo(n,t);16&s[Sr]||(s[Sr]|=64)}(s,n.index)):3&n.type&&(c=function j0(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(c),f=null!=A?A(f,n.value||"",c):f,g.setProperty(q,c,f))}function om(t,n,s,c){if(ko()){const f=null===c?null:{"":-1},g=function lm(t,n){const s=t.directiveRegistry;let c=null,f=null;if(s)for(let g=0;g<s.length;g++){const A=s[g];if(En(n,A.selectors,!1))if(c||(c=[]),Vn(A))if(null!==A.findHostDirectiveDefs){const N=[];f=f||new Map,A.findHostDirectiveDefs(A,N,f),c.unshift(...N,A),Yf(t,n,N.length)}else c.unshift(A),Yf(t,n,0);else f=f||new Map,A.findHostDirectiveDefs?.(A,c,f),c.push(A)}return null===c?null:[c,f]}(t,s);let A,N;null===g?A=N=null:[A,N]=g,null!==A&&fp(t,n,s,A,f,N),f&&function um(t,n,s){if(n){const c=t.localNames=[];for(let f=0;f<n.length;f+=2){const g=s[n[f+1]];if(null==g)throw new rt(-301,!1);c.push(n[f],g)}}}(s,c,f)}s.mergedAttrs=oi(s.mergedAttrs,s.attrs)}function fp(t,n,s,c,f,g){for(let nt=0;nt<c.length;nt++)L(Ed(s,n),t,c[nt].type);!function Bv(t,n,s){t.flags|=1,t.directiveStart=n,t.directiveEnd=n+s,t.providerIndexes=n}(s,t.data.length,c.length);for(let nt=0;nt<c.length;nt++){const Ot=c[nt];Ot.providersResolver&&Ot.providersResolver(Ot)}let A=!1,N=!1,q=pf(t,n,c.length,null);for(let nt=0;nt<c.length;nt++){const Ot=c[nt];s.mergedAttrs=oi(s.mergedAttrs,Ot.hostAttrs),cm(t,s,n,q,Ot),gf(q,Ot,f),null!==Ot.contentQueries&&(s.flags|=4),(null!==Ot.hostBindings||null!==Ot.hostAttrs||0!==Ot.hostVars)&&(s.flags|=64);const pn=Ot.type.prototype;!A&&(pn.ngOnChanges||pn.ngOnInit||pn.ngDoCheck)&&((t.preOrderHooks??=[]).push(s.index),A=!0),!N&&(pn.ngOnChanges||pn.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(s.index),N=!0),q++}!function im(t,n,s){const f=n.directiveEnd,g=t.data,A=n.attrs,N=[];let q=null,nt=null;for(let Ot=n.directiveStart;Ot<f;Ot++){const pn=g[Ot],er=s?s.get(pn):null,ei=er?er.outputs:null;q=dp(0,pn.inputs,Ot,q,er?er.inputs:null),nt=dp(1,pn.outputs,Ot,nt,ei);const wi=null===q||null===A||le(n)?null:Y0(q,Ot,A);N.push(wi)}null!==q&&(q.hasOwnProperty("class")&&(n.flags|=8),q.hasOwnProperty("style")&&(n.flags|=16)),n.initialInputs=N,n.inputs=q,n.outputs=nt}(t,s,g)}function hp(t,n,s){const c=s.directiveStart,f=s.directiveEnd,g=s.index,A=function qn(){return os.lFrame.currentDirectiveIndex}();try{Eo(g);for(let N=c;N<f;N++){const q=t.data[N],nt=n[N];Pr(N),(null!==q.hostBindings||0!==q.hostVars||null!==q.hostAttrs)&&H0(q,nt)}}finally{Eo(-1),Pr(A)}}function H0(t,n){null!==t.hostBindings&&t.hostBindings(1,n)}function Yf(t,n,s){n.componentOffset=s,(t.components??=[]).push(n.index)}function gf(t,n,s){if(s){if(n.exportAs)for(let c=0;c<n.exportAs.length;c++)s[n.exportAs[c]]=t;Vn(n)&&(s[""]=t)}}function cm(t,n,s,c,f){t.data[c]=f;const g=f.factory||(f.factory=vr(f.type)),A=new Rc(g,Vn(f),Wc);t.blueprint[c]=A,s[c]=A,function W0(t,n,s,c,f){const g=f.hostBindings;if(g){let A=t.hostBindingOpCodes;null===A&&(A=t.hostBindingOpCodes=[]);const N=~n.index;(function am(t){let n=t.length;for(;n>0;){const s=t[--n];if("number"==typeof s&&s<0)return s}return 0})(A)!=N&&A.push(N),A.push(s,c,g)}}(t,n,c,pf(t,s,f.hostVars,Fs),f)}function ou(t,n,s,c,f,g){const A=ss(t,n);!function Ou(t,n,s,c,f,g,A){if(null==g)t.removeAttribute(n,f,s);else{const N=null==A?cs(g):A(g,c||"",f);t.setAttribute(n,f,N,s)}}(n[$e],A,g,t.value,s,c,f)}function dm(t,n,s,c,f,g){const A=g[n];if(null!==A)for(let N=0;N<A.length;)lp(c,s,A[N++],A[N++],A[N++],A[N++])}function Y0(t,n,s){let c=null,f=0;for(;f<s.length;){const g=s[f];if(0!==g)if(5!==g){if("number"==typeof g)break;if(t.hasOwnProperty(g)){null===c&&(c=[]);const A=t[g];for(let N=0;N<A.length;N+=3)if(A[N]===n){c.push(g,A[N+1],A[N+2],s[f+1]);break}}f+=2}else f+=2;else f+=4}return c}function pp(t,n,s,c){return[t,!0,0,n,null,c,null,s,null,null]}function $v(t,n){const s=t.contentQueries;if(null!==s){const c=S(null);try{for(let f=0;f<s.length;f+=2){const A=s[f+1];if(-1!==A){const N=t.data[A];Ar(s[f]),N.contentQueries(2,n[A],A)}}}finally{S(c)}}}function gp(t,n){return t[Wt]?t[In][Rt]=n:t[Wt]=n,t[In]=n,n}function Xf(t,n,s){Ar(0);const c=S(null);try{n(t,s)}finally{S(c)}}function mp(t){return t[ie]||(t[ie]=[])}function jv(t){return t.cleanup||(t.cleanup=[])}function yp(t,n){const s=t[ne],c=s?s.get(gc,null):null;c&&c.handleError(n)}function Qf(t,n,s,c,f){for(let g=0;g<s.length;){const A=s[g++],N=s[g++],q=s[g++];lp(t.data[A],n[A],c,N,q,f)}}function rc(t,n,s){const c=No(n,t);!function Jh(t,n,s){t.setValue(n,s)}(t[$e],c,s)}function fm(t,n){const s=Uo(n,t),c=s[Vt];!function Gv(t,n){for(let s=n.length;s<t.blueprint.length;s++)n.push(t.blueprint[s])}(c,s);const f=s[wt];null!==f&&null===s[U]&&(s[U]=fc(f,s[ne])),hm(c,s,s[V])}function hm(t,n,s){no(n);try{const c=t.viewQuery;null!==c&&Xf(1,c,s);const f=t.template;null!==f&&Yg(t,n,f,1,s),t.firstCreatePass&&(t.firstCreatePass=!1),n[xi]?.finishViewCreation(t),t.staticContentQueries&&$v(t,n),t.staticViewQueries&&Xf(2,t.viewQuery,s);const g=t.components;null!==g&&function X0(t,n){for(let s=0;s<n.length;s++)fm(t,n[s])}(n,g)}
1catch(c){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),c}finally{n[Sr]&=-5,ya()}}function Md(t,n,s,c){const f=S(null);try{const g=n.tView,q=Kf(t,g,s,4096&t[Sr]?4096:16,null,n,null,null,null,c?.injector??null,c?.dehydratedView??null);q[Xn]=t[n.index];const Ot=t[xi];return null!==Ot&&(q[xi]=Ot.createEmbeddedView(g)),hm(g,q,s),q}finally{S(f)}}function Wv(t,n){const s=oe+n;if(s<t.length)return t[s]}function zc(t,n){return!n||null===n.firstChild||pa(t)}function Hc(t,n,s,c=!0){const f=n[Vt];if(function Bg(t,n,s,c){const f=oe+c,g=s.length;c>0&&(s[f-1][Rt]=n),c<g-oe?(n[Rt]=s[f],fa(s,oe+c,n)):(s.push(n),n[Rt]=null),n[St]=s;const A=n[Xn];null!==A&&s!==A&&function L0(t,n){const s=t[be];n[fr]!==n[St][St][fr]&&(t[Sr]|=qe.HasTransplantedViews),null===s?t[be]=[n]:s.push(n)}(A,n);const N=n[xi];null!==N&&N.insertView(t),Vs(n),n[Sr]|=128}(f,n,t,s),c){const A=nc(s,t),N=n[$e],q=uf(N,t[$t]);null!==q&&function N0(t,n,s,c,f,g){c[wt]=f,c[Ee]=n,Hf(t,c,s,1,f,g)}(f,t[Ee],N,n,q,A)}const g=n[U];null!==g&&null!==g.firstChild&&(g.firstChild=null)}function Jf(t,n){const s=$c(t,n);return void 0!==s&&af(s[Vt],s),s}function Zf(t,n,s,c,f=!1){for(;null!==s;){const g=n[s.index];null!==g&&c.push(as(g)),Ce(g)&&xd(g,c);const A=s.type;if(8&A)Zf(t,n,s.child,c);else if(32&A){const N=rf(s,n);let q;for(;q=N();)c.push(q)}else if(16&A){const N=Pd(n,s);if(Array.isArray(N))c.push(...N);else{const q=Qo(n[fr]);Zf(q[Vt],q,N,c,!0)}}s=f?s.projectionNext:s.next}return c}function xd(t,n){for(let s=oe;s<t.length;s++){const c=t[s],f=c[Vt].firstChild;null!==f&&Zf(c[Vt],c,f,n)}t[$t]!==t[wt]&&n.push(t[$t])}let zv=[];const Kv={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{},consumerIsAlwaysLive:!0,consumerMarkedDirty:t=>{rl(t.lView)},consumerOnSignalRead(){this.lView[Ns]=this}};function Yv(t){return Qv(t[Wt])}function Xv(t){return Qv(t[Rt])}function Qv(t){for(;null!==t&&!Ce(t);)t=t[Rt];return t}function vf(t,n=!0,s=0){const c=t[je],f=c.rendererFactory;f.begin?.();try{!function gm(t,n){Kc(t,n);let s=0;for(;Ta(t);){if(100===s)throw new rt(103,!1);s++,Kc(t,1)}}(t,s)}catch(A){throw n&&yp(t,A),A}finally{f.end?.(),c.inlineEffectRunner?.flush()}}function Zv(t,n,s,c){const f=n[Sr];if(256==(256&f))return;n[je].inlineEffectRunner?.flush(),no(n);let A=null,N=null;(function mm(t){return 2!==t.type})(t)&&(N=function pm(t){return t[Ns]??function Hv(t){const n=zv.pop()??Object.create(Kv);return n.lView=t,n}(t)}(n),A=function Y(t){return t&&(t.nextProducerIndex=0),S(t)}(N));try{Sa(n),function Vo(t){return os.lFrame.bindingIndex=t}(t.bindingStartIndex),null!==s&&Yg(t,n,s,2,c);const q=3==(3&f);if(q){const pn=t.preOrderCheckHooks;null!==pn&&Du(n,pn,null)}else{const pn=t.preOrderHooks;null!==pn&&Pc(n,pn,0,null),pd(n,0)}if(function bp(t){for(let n=Yv(t);null!==n;n=Xv(n)){if(!(n[Sr]&qe.HasTransplantedViews))continue;const s=n[be];for(let c=0;c<s.length;c++){Ll(s[c])}}}(n),wp(n,0),null!==t.contentQueries&&$v(t,n),q){const pn=t.contentCheckHooks;null!==pn&&Du(n,pn)}else{const pn=t.contentHooks;null!==pn&&Pc(n,pn,1),pd(n,1)}!function V0(t,n){const s=t.hostBindingOpCodes;if(null!==s)try{for(let c=0;c<s.length;c++){const f=s[c];if(f<0)Eo(~f);else{const g=f,A=s[++c],N=s[++c];xn(A,g),N(2,n[g])}}}finally{Eo(-1)}}(t,n);const nt=t.components;null!==nt&&Em(n,nt,0);const Ot=t.viewQuery;if(null!==Ot&&Xf(2,Ot,c),q){const pn=t.viewCheckHooks;null!==pn&&Du(n,pn)}else{const pn=t.viewHooks;null!==pn&&Pc(n,pn,2),pd(n,2)}if(!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),n[Gs]){for(const pn of n[Gs])pn();n[Gs]=null}n[Sr]&=-73}catch(q){throw rl(n),q}finally{null!==N&&(function Se(t,n){if(S(n),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(Ne(t))for(let s=t.nextProducerIndex;s<t.producerNode.length;s++)Ve(t.producerNode[s],t.producerIndexOfThis[s]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}(N,A),function mf(t){t.lView[Ns]!==t&&(t.lView=null,zv.push(t))}(N)),ya()}}function wp(t,n){for(let s=Yv(t);null!==s;s=Xv(s))for(let c=oe;c<s.length;c++)ym(s[c],n)}function vm(t,n,s){ym(Uo(n,t),s)}function ym(t,n){bo(t)&&Kc(t,n)}function Kc(t,n){const c=t[Vt],f=t[Sr],g=t[Ns];let A=!!(0===n&&16&f);if(A||=!!(64&f&&0===n),A||=!!(1024&f),A||=!(!g?.dirty||!Ye(g)),g&&(g.dirty=!1),t[Sr]&=-9217,A)Zv(c,t,c.template,t[V]);else if(8192&f){wp(t,1);const N=c.components;null!==N&&Em(t,N,1)}}function Em(t,n,s){for(let c=0;c<n.length;c++)vm(t,n[c],s)}function Od(t){for(t[je].changeDetectionScheduler?.notify();t;){t[Sr]|=64;const n=Qo(t);if(Gn(t)&&!n)return t;t=n}return null}class yf{get rootNodes(){const n=this._lView,s=n[Vt];return Zf(s,n,s.firstChild,[])}constructor(n,s,c=!0){this._lView=n,this._cdRefInjectingView=s,this.notifyErrorHandler=c,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[V]}set context(n){this._lView[V]=n}get destroyed(){return 256==(256&this._lView[Sr])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const n=this._lView[St];if(Ce(n)){const s=n[8],c=s?s.indexOf(this):-1;c>
1-1&&($c(n,c),du(s,c))}this._attachedToViewContainer=!1}af(this._lView[Vt],this._lView)}onDestroy(n){Ua(this._lView,n)}markForCheck(){Od(this._cdRefInjectingView||this._lView)}detach(){this._lView[Sr]&=-129}reattach(){Vs(this._lView),this._lView[Sr]|=128}detectChanges(){this._lView[Sr]|=1024,vf(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new rt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,Zh(this._lView[Vt],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new rt(902,!1);this._appRef=n,Vs(this._lView)}}let ic=(()=>{class t{static#e=this.__NG_ELEMENT_ID__=Z0}return t})();const wm=ic,J0=class extends wm{constructor(n,s,c){super(),this._declarationLView=n,this._declarationTContainer=s,this.elementRef=c}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,s){return this.createEmbeddedViewImpl(n,s)}createEmbeddedViewImpl(n,s,c){const f=Md(this._declarationLView,this._declarationTContainer,n,{injector:s,dehydratedView:c});return new yf(f)}};function Z0(){return Ip(Ws(),li())}function Ip(t,n){return 4&t.type?new J0(n,t,zs(t,n)):null}let iy=()=>null;function rh(t,n){return iy(t,n)}class Tm{}class dE{}class Cm{}class Yc{resolveComponentFactory(n){throw function ih(t){const n=Error(`No component factory found for ${Jr(t)}.`);return n.ngComponent=t,n}(n)}}let Pp=(()=>{class t{static#e=this.NULL=new Yc}return t})();class Xc{}let Rp=(()=>{class t{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function fE(){const t=li(),s=Uo(Ws().index,t);return(Me(s)?s:t)[$e]}()}return t})(),hE=(()=>{class t{static#e=this.\u0275prov=Ds({token:t,providedIn:"root",factory:()=>null})}return t})();const Mp={};let sh=(()=>{class t{static#e=this.__NG_ELEMENT_ID__=pE;static#t=this.__NG_ENV_ID__=s=>s}return t})();class xp extends sh{constructor(n){super(),this._lView=n}onDestroy(n){return Ua(this._lView,n),()=>function ia(t,n){if(null===t[fs])return;const s=t[fs].indexOf(n);-1!==s&&t[fs].splice(s,1)}(this._lView,n)}}function pE(){return new xp(li())}const oh=new Set;function kl(t){oh.has(t)||(oh.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}function _m(...t){}class ca{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:s=!1,shouldCoalesceRunChangeDetection:c=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Mr(!1),this.onMicrotaskEmpty=new Mr(!1),this.onStable=new Mr(!1),this.onError=new Mr(!1),typeof Zone>"u")throw new rt(908,!1);Zone.assertZonePatched();const f=this;f._nesting=0,f._outer=f._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(f._inner=f._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(f._inner=f._inner.fork(Zone.longStackTraceZoneSpec)),f.shouldCoalesceEventChangeDetection=!c&&s,f.shouldCoalesceRunChangeDetection=c,f.lastRequestAnimationFrameId=-1,f.nativeRequestAnimationFrame=function Am(){const t="function"==typeof Er.requestAnimationFrame;let n=Er[t?"requestAnimationFrame":"setTimeout"],s=Er[t?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&n&&s){const c=n[Zone.__symbol__("OriginalDelegate")];c&&(n=c);const f=s[Zone.__symbol__("OriginalDelegate")];f&&(s=f)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:s}}().nativeRequestAnimationFrame,function ay(t){const n=()=>{!function Pm(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Er,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Ec(t),t.isCheckStableRunning=!0,ah(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Ec(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(s,c,f,g,A,N)=>{if(function lh(t){return!(!Array.isArray(t)||1!==t.length)&&!0===t[0].data?.__ignore_ng_zone__}(N))return s.invokeTask(f,g,A,N);try{return Rm(t),s.invokeTask(f,g,A,N)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===g.type||t.shouldCoalesceRunChangeDetection)&&n(),Mm(t)}},onInvoke:(s,c,f,g,A,N,q)=>{try{return Rm(t),s.invoke(f,g,A,N,q)}finally{t.shouldCoalesceRunChangeDetection&&n(),Mm(t)}},onHasTask:(s,c,f,g)=>{s.hasTask(f,g),c===f&&("microTask"==g.change?(t._hasPendingMicrotasks=g.microTask,Ec(t),ah(t)):"macroTask"==g.change&&(t.hasPendingMacrotasks=g.macroTask))},onHandleError:(s,c,f,g)=>(s.handleError(f,g),t.runOutsideAngular(()=>t.onError.emit(g)),!1)})}(f)}
1static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ca.isInAngularZone())throw new rt(909,!1)}static assertNotInAngularZone(){if(ca.isInAngularZone())throw new rt(909,!1)}run(n,s,c){return this._inner.run(n,s,c)}runTask(n,s,c,f){const g=this._inner,A=g.scheduleEventTask("NgZoneEvent: "+f,n,Dm,_m,_m);try{return g.runTask(A,s,c)}finally{g.cancelTask(A)}}runGuarded(n,s,c){return this._inner.runGuarded(n,s,c)}runOutsideAngular(n){return this._outer.run(n)}}const Dm={};function ah(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Ec(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function Rm(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Mm(t){t._nesting--,ah(t)}class Op{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Mr,this.onMicrotaskEmpty=new Mr,this.onStable=new Mr,this.onError=new Mr}run(n,s,c){return n.apply(s,c)}runGuarded(n,s,c){return n.apply(s,c)}runOutsideAngular(n){return n()}runTask(n,s,c,f){return n.apply(s,c)}}var sc=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(sc||{});const uh={destroy(){}};function ly(t,n){!n&&function hl(t){if(!ul()&&!function Yl(){return la}())throw new rt(-203,!1)}();const s=n?.injector??xs(gl);if(!function Vc(t){return"browser"===(t??xs(gl)).get(Ps)}(s))return uh;kl("NgAfterNextRender");const c=s.get(Ld),f=c.handler??=new xm,g=n?.phase??sc.MixedReadWrite,A=()=>{f.unregister(q),N()},N=s.get(sh).onDestroy(A),q=new dh(s,g,()=>{A(),t()});return f.register(q),{destroy:A}}class dh{constructor(n,s,c){this.phase=s,this.callbackFn=c,this.zone=n.get(ca),this.errorHandler=n.get(gc,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(n){this.errorHandler?.handleError(n)}}}class xm{constructor(){this.executingCallbacks=!1,this.buckets={[sc.EarlyRead]:new Set,[sc.Write]:new Set,[sc.MixedReadWrite]:new Set,[sc.Read]:new Set},this.deferredCallbacks=new Set}register(n){(this.executingCallbacks?this.deferredCallbacks:this.buckets[n.phase]).add(n)}unregister(n){this.buckets[n.phase].delete(n),this.deferredCallbacks.delete(n)}execute(){this.executingCallbacks=!0;for(const n of Object.values(this.buckets))for(const s of n)s.invoke();this.executingCallbacks=!1;for(const n of this.deferredCallbacks)this.buckets[n.phase].add(n);this.deferredCallbacks.clear()}destroy(){for(const n of Object.values(this.buckets))n.clear();this.deferredCallbacks.clear()}}let Ld=(()=>{class t{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const s=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const c of s)c()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=Ds({token:t,providedIn:"root",factory:()=>new t})}return t})();function Qc(t){return!!It(t)}function Ud(t,n,s){let c=s?t.styles:null,f=s?t.classes:null,g=0;if(null!==n)for(let A=0;A<n.length;A++){const N=n[A];"number"==typeof N?g=N:1==g?f=sr(f,N):2==g&&(c=sr(c,N+": "+n[++A]+";"))}s?t.styles=c:t.stylesWithoutHost=c,s?t.classes=f:t.classesWithoutHost=f}class dy extends Pp{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const s=Hr(n);return new ph(s,this.ngModule)}}function fy(t){const n=[];for(const s in t){if(!t.hasOwnProperty(s))continue;const c=t[s];void 0!==c&&n.push({propName:Array.isArray(c)?c[0]:c,templateName:s})}return n}class mE{constructor(n,s){this.injector=n,this.parentInjector=s}
vendor: 4,212 bytes, line 1
1get(n,s,c){c=nn(c);const f=this.injector.get(n,Mp,c);return f!==Mp||s===Mp?f:this.parentInjector.get(n,s,c)}}class ph extends Cm{get inputs(){const n=this.componentDef,s=n.inputTransforms,c=fy(n.inputs);if(null!==s)for(const f of c)s.hasOwnProperty(f.propName)&&(f.transform=s[f.propName]);return c}get outputs(){return fy(this.componentDef.outputs)}constructor(n,s){super(),this.componentDef=n,this.ngModule=s,this.componentType=n.type,this.selector=function Tt(t){return t.map(Xe).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!s}create(n,s,c,f){const g=S(null);try{let A=(f=f||this.ngModule)instanceof $s?f:f?.injector;A&&null!==this.componentDef.getStandaloneInjector&&(A=this.componentDef.getStandaloneInjector(A)||A);const N=A?new mE(n,A):n,q=N.get(Xc,null);if(null===q)throw new rt(407,!1);const nt=N.get(hE,null),er={rendererFactory:q,sanitizer:nt,inlineEffectRunner:null,afterRenderEventManager:N.get(Ld,null),changeDetectionScheduler:N.get(Tm,null)},hr=q.createRenderer(null,this.componentDef),ei=this.componentDef.selectors[0][0]||"div",wi=c?function B0(t,n,s,c){const g=c.get(Qd,!1)||s===Ir.ShadowDom,A=t.selectRootElement(n,g);return function qg(t){em(t)}(A),A}(hr,c,this.componentDef.encapsulation,N):xu(hr,ei,function kp(t){const n=t.toLowerCase();return"svg"===n?Ti:"math"===n?"math":null}(ei));let ki=512;this.componentDef.signals?ki|=4096:this.componentDef.onPush||(ki|=16);let ns=null;null!==wi&&(ns=fc(wi,N,!0));const _i=Jg(0,null,null,1,0,null,null,null,null,null,null),Ts=Kf(null,_i,null,ki,null,null,er,hr,N,null,ns);let mo,Ao;no(Ts);try{const tl=this.componentDef;let Bd,Qw=null;tl.findHostDirectiveDefs?(Bd=[],Qw=new Map,tl.findHostDirectiveDefs(tl,Bd,Qw),Bd.push(tl)):Bd=[tl];const uR=function py(t,n){const s=t[Vt],c=Ci;return t[c]=n,hf(s,c,2,"#host",null)}(Ts,wi),cR=function gy(t,n,s,c,f,g,A){const N=f[Vt];!function my(t,n,s,c){for(const f of t)n.mergedAttrs=oi(n.mergedAttrs,f.hostAttrs);null!==n.mergedAttrs&&(Ud(n,n.mergedAttrs,!0),null!==s&&op(c,s,n))}(c,t,n,A);let q=null;null!==n&&(q=fc(n,f[ne]));const nt=g.rendererFactory.createRenderer(n,s);let Ot=16;s.signals?Ot=4096:s.onPush&&(Ot=64);const pn=Kf(f,Fv(s),null,Ot,f[t.index],t,g,nt,null,null,q);return N.firstCreatePass&&Yf(N,t,c.length-1),gp(f,pn),f[t.index]=pn}(uR,wi,tl,Bd,Ts,er,hr);Ao=qo(_i,Ci),wi&&function Om(t,n,s,c){if(c)Cn(t,s,["ng-version","17.2.4"]);else{const{attrs:f,classes:g}=function An(t){const n=[],s=[];let c=1,f=2;for(;c<t.length;){let g=t[c];if("string"==typeof g)2===f?""!==g&&n.push(g,t[++c]):8===f&&s.push(g);else{if(!Pt(f))break;f=g}c++}return{attrs:n,classes:s}}(n.selectors[0]);f&&Cn(t,s,f),g&&g.length>0&&sp(t,s,g.join(" "))}}(hr,tl,wi,c),void 0!==s&&function Lp(t,n,s){const c=t.projection=[];for(let f=0;f<n.length;f++){const g=s[f];c.push(null!=g?Array.from(g):null)}}(Ao,this.ngContentSelectors,s),mo=function vy(t,n,s,c,f,g){const A=Ws(),N=f[Vt],q=ss(A,f);fp(N,f,A,s,null,c);for(let Ot=0;Ot<s.length;Ot++)ba(Xi(f,N,A.directiveStart+Ot,A),f);hp(N,f,A),q&&ba(q,f);const nt=Xi(f,N,A.directiveStart+A.componentOffset,A);if(t[V]=f[V]=nt,null!==g)for(const Ot of g)Ot(nt,n);return cp(N,A,f),nt}(cR,tl,Bd,Qw,Ts,[vE]),hm(_i,Ts,null)}finally{ya()}return new hy(this.componentType,mo,zs(Ao,Ts),Ts,Ao)}finally{S(g)}}}class hy extends dE{constructor(n,s,c,f,g){super(),this.location=c,this._rootLView=f,this._tNode=g,this.previousInputValues=null,this.instance=s,this.hostView=this.changeDetectorRef=new yf(f,void 0,!1),this.componentType=n}setInput(n,s){const c=this._tNode.inputs;let f;if(null!==c&&(f=c[n])){if(this.previousInputValues??=new Map,this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),s))return;const g=this._rootLView;Qf(g[Vt],g,f,n,s),this.previousInputValues.set(n,s),Od(Uo(this._tNode.index,g))}}get injector(){return new ga(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}}function vE(){const t=Ws();Wa(li()[Vt],t)}let Nm=(()=>{class t{static#e=this.__NG_ELEMENT_ID__=hb}return t})();function hb(){return Zc(Ws(),li())}const yE=Nm,EE=class extends yE{constructor(n,s,c){super(),this._lContainer=n,this._hostTNode=s,this._hostLView=c}
1get element(){return zs(this._hostTNode,this._hostLView)}get injector(){return new ga(this._hostTNode,this._hostLView)}get parentInjector(){const n=E(this._hostTNode,this._hostLView);if(vd(n)){const s=Pa(n,this._hostLView),c=hc(n);return new ga(s[Vt].data[c+8],s)}return new ga(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const s=wE(this._lContainer);return null!==s&&s[n]||null}get length(){return this._lContainer.length-oe}createEmbeddedView(n,s,c){let f,g;"number"==typeof c?f=c:null!=c&&(f=c.index,g=c.injector);const A=rh(this._lContainer,n.ssrId),N=n.createEmbeddedViewImpl(s||{},g,A);return this.insertImpl(N,f,zc(this._hostTNode,A)),N}createComponent(n,s,c,f,g){const A=n&&!ud(n);let N;if(A)N=s;else{const ei=s||{};N=ei.index,c=ei.injector,f=ei.projectableNodes,g=ei.environmentInjector||ei.ngModuleRef}const q=A?n:new ph(Hr(n)),nt=c||this.parentInjector;if(!g&&null==q.ngModule){const wi=(A?nt:this.parentInjector).get($s,null);wi&&(g=wi)}const Ot=Hr(q.componentType??{}),pn=rh(this._lContainer,Ot?.id??null),hr=q.create(nt,f,pn?.firstChild??null,g);return this.insertImpl(hr.hostView,N,zc(this._hostTNode,pn)),hr}insert(n,s){return this.insertImpl(n,s,!0)}insertImpl(n,s,c){const f=n._lView;if(function nl(t){return Ce(t[St])}(f)){const N=this.indexOf(n);if(-1!==N)this.detach(N);else{const q=f[St],nt=new EE(q,q[Ee],q[St]);nt.detach(nt.indexOf(n))}}const g=this._adjustIndex(s),A=this._lContainer;return Hc(A,f,g,c),n.attachToViewContainerRef(),fa(wc(A),g,n),n}move(n,s){return this.insert(n,s)}indexOf(n){const s=wE(this._lContainer);return null!==s?s.indexOf(n):-1}remove(n){const s=this._adjustIndex(n,-1),c=$c(this._lContainer,s);c&&(du(wc(this._lContainer),s),af(c[Vt],c))}detach(n){const s=this._adjustIndex(n,-1),c=$c(this._lContainer,s);return c&&null!=du(wc(this._lContainer),s)?new yf(c):null}_adjustIndex(n,s=0){return n??this.length+s}};function wE(t){return t[8]}function wc(t){return t[8]||(t[8]=[])}function Zc(t,n){let s;const c=n[t.index];return Ce(c)?s=c:(s=pp(c,n,null,t),n[t.index]=s,gp(n,s)),qc(s,n,t,c),new EE(s,t,n)}let qc=function Ey(t,n,s,c){if(t[$t])return;let f;f=8&s.type?as(c):function gh(t,n){const s=t[$e],c=s.createComment(""),f=ss(n,t);return jc(s,uf(s,f),c,function F0(t,n){return t.nextSibling(n)}(s,f),!1),c}(n,s),t[$t]=f},km=()=>!1;class Lm{constructor(n){this.queryList=n,this.matches=null}clone(){return new Lm(this.queryList)}setDirty(){this.queryList.setDirty()}}class Fm{constructor(n=[]){this.queries=n}createEmbeddedView(n){const s=n.queries;if(null!==s){const c=null!==n.contentQueries?n.contentQueries[0]:s.length,f=[];for(let g=0;g<c;g++){const A=s.getByIndex(g);f.push(this.queries[A.indexInDeclarationView].clone())}return new Fm(f)}return null}insertView(n){this.dirtyQueriesWithMatches(n)}detachView(n){this.dirtyQueriesWithMatches(n)}finishViewCreation(n){this.dirtyQueriesWithMatches(n)}dirtyQueriesWithMatches(n){for(let s=0;s<this.queries.length;s++)null!==_y(n,s).matches&&this.queries[s].setDirty()}}class wy{constructor(n,s,c=null){this.flags=s,this.read=c,this.predicate="string"==typeof n?function AE(t){return t.split(",").map(n=>n.trim())}(n):n}}class Um{constructor(n=[]){this.queries=n}elementStart(n,s){for(let c=0;c<this.queries.length;c++)this.queries[c].elementStart(n,s)}elementEnd(n){for(let s=0;s<this.queries.length;s++)this.queries[s].elementEnd(n)}embeddedTView(n){let s=null;for(let c=0;c<this.length;c++){const f=null!==s?s.length:0,g=this.getByIndex(c).embeddedTView(n,f);g&&(g.indexInDeclarationView=c,null!==s?s.push(g):s=[g])}return null!==s?new Um(s):null}template(n,s){for(let c=0;c<this.queries.length;c++)this.queries[c].template(n,s)}getByIndex(n){return this.queries[n]}get length(){return this.queries.length}track(n){this.queries.push(n)}}class Vm{constructor(n,s=-1){this.metadata=n,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=s}elementStart(n,s){this.isApplyingToNode(s)&&this.matchTNode(n,s)}elementEnd(n){this._declarationNodeIndex===n.index&&(this._appliesToNextNode=!1)}template(n,s){this.elementStart(n,s)}embeddedTView(n,s){return this.isApplyingToNode(n)?(this.crossesNgTemplate=!0,this.addMatch(-n.index,s),new Vm(this.metadata)):null}isApplyingToNode(n){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const s=this._declarationNodeIndex;let c=n.parent;for(;null!==c&&8&c.type&&c.index!==s;)c=c.parent;return s===(null!==c?c.index:-1)}return this._appliesToNextNode}
1matchTNode(n,s){const c=this.metadata.predicate;if(Array.isArray(c))for(let f=0;f<c.length;f++){const g=c[f];this.matchTNodeWithReadOption(n,s,SE(s,g)),this.matchTNodeWithReadOption(n,s,Ji(s,n,g,!1,!1))}else c===ic?4&s.type&&this.matchTNodeWithReadOption(n,s,-1):this.matchTNodeWithReadOption(n,s,Ji(s,n,c,!1,!1))}matchTNodeWithReadOption(n,s,c){if(null!==c){const f=this.metadata.read;if(null!==f)if(f===Vi||f===Nm||f===ic&&4&s.type)this.addMatch(s.index,-2);else{const g=Ji(s,n,f,!1,!1);null!==g&&this.addMatch(s.index,g)}else this.addMatch(s.index,c)}}addMatch(n,s){null===this.matches?this.matches=[n,s]:this.matches.push(n,s)}}function SE(t,n){const s=t.localNames;if(null!==s)for(let c=0;c<s.length;c+=2)if(s[c]===n)return s[c+1];return null}function CE(t,n,s,c){return-1===s?function TE(t,n){return 11&t.type?zs(t,n):4&t.type?Ip(t,n):null}(n,t):-2===s?function _E(t,n,s){return s===Vi?zs(n,t):s===ic?Ip(n,t):s===Nm?Zc(n,t):void 0}(t,n,c):Xi(t,t[Vt],s,n)}function Vd(t,n,s,c){const f=n[xi].queries[c];if(null===f.matches){const g=t.data,A=s.matches,N=[];for(let q=0;null!==A&&q<A.length;q+=2){const nt=A[q];N.push(nt<0?null:CE(n,g[nt],A[q+1],s.metadata.read))}f.matches=N}return f.matches}function mh(t,n,s,c){const f=t.queries.getByIndex(s),g=f.matches;if(null!==g){const A=Vd(t,n,f,s);for(let N=0;N<g.length;N+=2){const q=g[N];if(q>0)c.push(A[N/2]);else{const nt=g[N+1],Ot=n[-q];for(let pn=oe;pn<Ot.length;pn++){const er=Ot[pn];er[Xn]===er[St]&&mh(er[Vt],er,nt,c)}if(null!==Ot[be]){const pn=Ot[be];for(let er=0;er<pn.length;er++){const hr=pn[er];mh(hr[Vt],hr,nt,c)}}}}}return c}function Iy(t,n,s){const c=new ha(4==(4&s));return function rm(t,n,s,c){const f=mp(n);f.push(s),t.firstCreatePass&&jv(t).push(c,f.length-1)}(t,n,c,c.destroy),(n[xi]??=new Fm).queries.push(new Lm(c))-1}function Cy(t,n,s){null===t.queries&&(t.queries=new Um),t.queries.track(new Vm(n,s))}function _y(t,n){return t.queries.getByIndex(n)}function DE(t,n){const s=t[Vt],c=_y(s,n);return c.crossesNgTemplate?mh(s,t,n,[]):Vd(s,t,c,n)}function Ay(t){return function PE(t){return"function"==typeof t&&void 0!==t[P]}(t)&&"function"==typeof t.set}function Ia(t){let n=function _o(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),s=!0;const c=[t];for(;n;){let f;if(Vn(t))f=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new rt(903,!1);f=n.\u0275dir}if(f){if(s){c.push(f);const A=t;A.inputs=vh(t.inputs),A.inputTransforms=vh(t.inputTransforms),A.declaredInputs=vh(t.declaredInputs),A.outputs=vh(t.outputs);const N=f.hostBindings;N&&FC(t,N);const q=f.viewQuery,nt=f.contentQueries;if(q&&kC(t,q),nt&&LC(t,nt),au(t,f),Wn(t.outputs,f.outputs),Vn(f)&&f.data.animation){const Ot=t.data;Ot.animation=(Ot.animation||[]).concat(f.data.animation)}}const g=f.features;if(g)for(let A=0;A<g.length;A++){const N=g[A];N&&N.ngInherit&&N(t),N===Ia&&(s=!1)}}n=Object.getPrototypeOf(n)}!function UE(t){let n=0,s=null;for(let c=t.length-1;c>=0;c--){const f=t[c];f.hostVars=n+=f.hostVars,f.hostAttrs=oi(f.hostAttrs,s=oi(s,f.hostAttrs))}}(c)}function au(t,n){for(const s in n.inputs){if(!n.inputs.hasOwnProperty(s)||t.inputs.hasOwnProperty(s))continue;const c=n.inputs[s];if(void 0!==c&&(t.inputs[s]=c,t.declaredInputs[s]=n.declaredInputs[s],null!==n.inputTransforms)){const f=Array.isArray(c)?c[0]:c;if(!n.inputTransforms.hasOwnProperty(f))continue;t.inputTransforms??={},t.inputTransforms[f]=n.inputTransforms[f]}}}function vh(t){return t===Pi?{}:t===nr?[]:t}function kC(t,n){const s=t.viewQuery;t.viewQuery=s?(c,f)=>{n(c,f),s(c,f)}:n}function LC(t,n){const s=t.contentQueries;t.contentQueries=s?(c,f,g)=>{n(c,f,g),s(c,f,g)}:n}function FC(t,n){const s=t.hostBindings;t.hostBindings=s?(c,f)=>{n(c,f),s(c,f)}:n}function Tb(t){const n=t.inputConfig,s={};for(const c in n)if(n.hasOwnProperty(c)){const f=n[c];Array.isArray(f)&&f[3]&&(s[c]=f[3])}t.inputTransforms=s}class yh{}class Cb{}function GC(t,n){return new VE(t,n??null,[])}class VE extends yh{constructor(n,s,c){super(),this._parent=s,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new dy(this);const f=It(n);this._bootstrapComponents=Nl(f.bootstrap),this._r3Injector=gg(n,s,[{provide:yh,useValue:this},{provide:Pp,useValue:this.componentFactoryResolver},...c],Jr(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializer
vendor: 7,252 bytes, line 1
1s(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(s=>s()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class BE extends Cb{constructor(n){super(),this.moduleType=n}create(n){return new VE(this.moduleType,n,[])}}class _b extends yh{constructor(n){super(),this.componentFactoryResolver=new dy(this),this.instance=null;const s=new Yo([...n.providers,{provide:yh,useValue:this},{provide:Pp,useValue:this.componentFactoryResolver}],n.parent||Pl(),n.debugName,new Set(["environment"]));this.injector=s,n.runEnvironmentInitializers&&s.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function $E(t,n,s=null){return new _b({providers:t,parent:n,debugName:s,runEnvironmentInitializers:!0}).injector}let Up=(()=>{class t{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new cn.g(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const s=this.taskId++;return this.pendingTasks.add(s),s}remove(s){this.pendingTasks.delete(s),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Oy(t){return!!jE(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function jE(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function td(t,n,s){return t[n]=s}function $m(t,n){return t[n]}function ka(t,n,s){return!Object.is(t[n],s)&&(t[n]=s,!0)}function Eh(t,n,s,c){const f=ka(t,n,s);return ka(t,n+1,c)||f}function Ny(t,n,s,c,f){const g=Eh(t,n,s,c);return ka(t,n+2,f)||g}function ac(t,n,s,c,f,g){const A=Eh(t,n,s,c);return Eh(t,n+2,f,g)||A}function Vp(t,n,s,c,f,g,A,N){const q=li(),nt=Cs(),Ot=t+Ci,pn=nt.firstCreatePass?function QC(t,n,s,c,f,g,A,N,q){const nt=n.consts,Ot=hf(n,t,4,A||null,Co(nt,N));om(n,s,Ot,Co(nt,q)),Wa(n,Ot);const pn=Ot.tView=Jg(2,Ot,c,f,g,n.directiveRegistry,n.pipeRegistry,null,n.schemas,nt,null);return null!==n.queries&&(n.queries.template(n,Ot),pn.queries=n.queries.embeddedTView(Ot)),Ot}(Ot,nt,q,n,s,c,f,g,A):nt.data[Ot];ea(pn,!1);const er=Ab(nt,q,pn,t);ja()&&cf(nt,q,er,pn),ba(er,q);const hr=pp(er,q,er,pn);return q[Ot]=hr,gp(q,hr),function yy(t,n,s){return km(t,n,s)}(hr,pn,q),Et(pn)&&Xg(nt,q,pn),null!=A&&Qg(q,pn,N),Vp}let Ab=function Db(t,n,s,c){return Es(!0),n[$e].createComment("")};function ZE(t,n,s,c){const f=li();return ka(f,X(),n)&&(Cs(),ou(Is(),f,t,n,s,c)),ZE}function Kp(t,n,s,c){return ka(t,X(),s)?n+cs(s)+c:Fs}function Yp(t,n,s,c,f,g){const N=Eh(t,function po(){return os.lFrame.bindingIndex}(),s,f);return ot(2),N?n+cs(s)+c+cs(f)+g:Fs}function qE(t,n,s,c,f,g,A,N){const q=li(),nt=Yp(q,n,s,c,f,g);return nt!==Fs&&ou(Is(),q,t,nt,A,N),qE}function By(t,n){return t<<17|n<<2}function Tf(t){return t>>17&32767}function ew(t){return 2|t}function bh(t){return(131068&t)>>2}function tw(t,n){return-131069&t|n<<2}function nw(t){return 1|t}function iI(t,n,s,c){const f=t[s+1],g=null===n;let A=c?Tf(f):bh(f),N=!1;for(;0!==A&&(!1===N||g);){const nt=t[A+1];N_(t[A],n)&&(N=!0,t[A+1]=c?nw(nt):ew(nt)),A=c?Tf(nt):bh(nt)}N&&(t[s+1]=c?ew(f):nw(f))}function N_(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&oa(t,n)>=0}const qa={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function sI(t){return t.substring(qa.key,qa.keyEnd)}function oI(t,n){const s=qa.textEnd;return s===n?-1:(n=qa.keyEnd=function U_(t,n,s){for(;n<s&&t.charCodeAt(n)>32;)n++;return n}(t,qa.key=n,s),tg(t,n,s))}function tg(t,n,s){for(;n<s&&t.charCodeAt(n)<=32;)n++;return n}function rw(t,n,s){const c=li();return ka(c,X(),n)&&ml(Cs(),Is(),c,t,n,c[$e],s,!1),rw}function iw(t,n,s,c,f){const A=f?"class":"style";Qf(t,s,n.inputs[A],A,c)}function sw(t,n,s){return Ic(t,n,s,!1),sw}function ow(t,n){return Ic(t,n,null,!0),ow}function dI(t){!function Sc(t,n,s,c){const f=Cs(),g=ot(2);f.firstUpdatePass&&hI(f,null,g,c);const A=li();if(s!==Fs&&ka(A,g,s)){const N=f.data[Zi()];if(vI(N,c)&&!fI(f,g)){let q=c?N.classesWithoutHost:N.stylesWithoutHost;null!==q&&(s=sr(q,s||"")),iw(f,N,A,s,c)}else!function Y_(t,n,s,c,f,g,A,N){f===Fs&&(f=nr);let q=0,nt=0,Ot=0<f.length?f[0]:null,pn=0<g.length?g[0]:null;for(;null!==Ot||null!==pn;){const er=q<f.length?f[q+1]:void 0,hr=nt<g.length?g[nt+1]:void 0;let wi,ei=null;Ot===pn?(q+=2,nt+=2,er!==hr&&(ei=pn,wi=hr)):null===pn||null!==Ot&&Ot<pn?(q+=2,ei=Ot):(nt+=2,ei=pn,wi=hr),null!==ei&&gI(t,n,s,c,ei,wi,A,N),Ot=q<f.length?f[q]:null,pn=nt<g.length?g[nt]:null}}(f,N,A,A[$e],A[g+1],A[g+1]=function H_(t,n,s){if(null==s||""===s)return nr;const c=[],f=mc(s);if(Array.isArray(f))for(let g=0;g<f.length;g++)t(c,f[g],!0);else if("object"==typeof f)for(const g in f)f.hasOwnProperty(g)&&t(c,g,f[g]);else"string"==typeof f&&n(c,f);return c}(t,n,s),c,g)}}(K_,rd,t,!0)}function rd(t,n){for(let s=function L_(t){return function lI(t){qa.key=0,qa.keyEnd=0,qa.value=0,qa.valueEnd=0,qa.textEnd=t.length}(t),oI(t,tg(t,0,qa.textEnd))}(n);s>=0;s=oI(n,s))Ks(t,sI(n),!0)}function Ic(t,n,s,c){const f=li(),g=Cs(),A=ot(2);g.firstUpdatePass&&hI(g,t,A,c),n!==Fs&&ka(f,A,n)&&gI(g,g.data[Zi()],f,f[$e],t,f[A+1]=function X_(t,n){return null==t||""===t||("string"==typeof n?t+=n:"object"==typeof t&&(t=Jr(mc(t)))),t}(n,s),c,A)}function fI(t,n){return n>=t.expandoStartIndex}function hI(t,n,s,c){const f=t.data;if(null===f[s+1]){const g=f[Zi()],A=fI(t,s);vI(g,c)&&null===n&&!A&&(n=!1),n=function j_(t,n,s,c){const f=function ji(t){const n=os.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let g=c?n.residualClasses:n.residualStyles;if(null===f)0===(c?n.classBindings:n.styleBindings)&&(s=zm(s=aw(null,t,n,s,c),n.attrs,c),g=null);else{const A=n.directiveStylingLast;if(-1===A||t[A]!==f)if(s=aw(f,t,n,s,c),null===g){let q=function G_(t,n,s){const c=s?n.classBindings:n.styleBindings;if(0!==bh(c))return t[Tf(c)]}(t,n,c);void 0!==q&&Array.isArray(q)&&(q=aw(null,t,n,q[1],c),q=zm(q,n.attrs,c),function W_(t,n,s,c){t[Tf(s?n.classBindings:n.styleBindings)]=c}(t,n,c,q))}else g=function z_(t,n,s){let c;const f=n.directiveEnd;for(let g=1+n.directiveStylingLast;g<f;g++)c=zm(c,t[g].hostAttrs,s);return zm(c,n.attrs,s)}(t,n,c)}return void 0!==g&&(c?n.residualClasses=g:n.residualStyles=g),s}(f,g,n,c),function x_(t,n,s,c,f,g){let A=g?n.classBindings:n.styleBindings,N=Tf(A),q=bh(A);t[c]=s;let Ot,nt=!1;if(Array.isArray(s)?(Ot=s[1],(null===Ot||oa(s,Ot)>0)&&(nt=!0)):Ot=s,f)if(0!==q){const er=Tf(t[N+1]);t[c+1]=By(er,N),0!==er&&(t[er+1]=tw(t[er+1],c)),t[N+1]=function R_(t,n){return 131071&t|n<<17}(t[N+1],c)}else t[c+1]=By(N,0),0!==N&&(t[N+1]=tw(t[N+1],c)),N=c;else t[c+1]=By(q,0),0===N?N=c:t[q+1]=tw(t[q+1],c),q=c;nt&&(t[c+1]=ew(t[c+1])),iI(t,Ot,c,!0),iI(t,Ot,c,!1),function O_(t,n,s,c,f){const g=f?t.residualClasses:t.residualStyles;null!=g&&"string"==typeof n&&oa(g,n)>=0&&(s[c+1]=nw(s[c+1]))}(n,Ot,t,c,g),A=By(N,q),g?n.classBindings=A:n.styleBindings=A}(f,g,n,s,A,c)}}function aw(t,n,s,c,f){let g=null;const A=s.directiveEnd;let N=s.directiveStylingLast;
1for(-1===N?N=s.directiveStart:N++;N<A&&(g=n[N],c=zm(c,g.hostAttrs,f),g!==t);)N++;return null!==t&&(s.directiveStylingLast=N),c}function zm(t,n,s){const c=s?1:2;let f=-1;if(null!==n)for(let g=0;g<n.length;g++){const A=n[g];"number"==typeof A?f=A:f===c&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),Ks(t,A,!!s||n[++g]))}return void 0===t?null:t}function K_(t,n,s){const c=String(n);""!==c&&!c.includes(" ")&&Ks(t,c,s)}function gI(t,n,s,c,f,g,A,N){if(!(3&n.type))return;const q=t.data,nt=q[N+1],Ot=function M_(t){return 1==(1&t)}(nt)?mI(q,n,s,f,bh(nt),A):void 0;$y(Ot)||($y(g)||function P_(t){return 2==(2&t)}(nt)&&(g=mI(q,null,s,f,N,A)),function zg(t,n,s,c,f){if(n)f?t.addClass(s,c):t.removeClass(s,c);else{let g=-1===c.indexOf("-")?void 0:yc.DashCase;null==f?t.removeStyle(s,c,g):("string"==typeof f&&f.endsWith("!important")&&(f=f.slice(0,-10),g|=yc.Important),t.setStyle(s,c,f,g))}}(c,A,No(Zi(),s),f,g))}function mI(t,n,s,c,f,g){const A=null===n;let N;for(;f>0;){const q=t[f],nt=Array.isArray(q),Ot=nt?q[1]:q,pn=null===Ot;let er=s[f+1];er===Fs&&(er=pn?nr:void 0);let hr=pn?fu(er,c):Ot===c?er:void 0;if(nt&&!$y(hr)&&(hr=fu(q,c)),$y(hr)&&(N=hr,A))return N;const ei=t[f+1];f=A?Tf(ei):bh(ei)}if(null!==n){let q=g?n.residualClasses:n.residualStyles;null!=q&&(N=fu(q,c))}return N}function $y(t){return void 0!==t}function vI(t,n){return 0!=(t.flags&(n?8:16))}class oA{destroy(n){}updateValue(n,s){}swap(n,s){const c=Math.min(n,s),f=Math.max(n,s),g=this.detach(f);if(f-c>1){const A=this.detach(c);this.attach(c,g),this.attach(f,A)}else this.attach(c,g)}move(n,s){this.attach(s,this.detach(n))}}function lw(t,n,s,c,f){return t===s&&Object.is(n,c)?1:Object.is(f(t,n),f(s,c))?-1:0}function uw(t,n,s,c){return!(void 0===n||!n.has(c)||(t.attach(s,n.get(c)),n.delete(c),0))}function yI(t,n,s,c,f){if(uw(t,n,c,s(c,f)))t.updateValue(c,f);else{const g=t.create(c,f);t.attach(c,g)}}function EI(t,n,s,c){const f=new Set;for(let g=n;g<=s;g++)f.add(c(g,t.at(g)));return f}class wI{constructor(){this.kvMap=new Map,this._vMap=void 0}has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;const s=this.kvMap.get(n);return void 0!==this._vMap&&this._vMap.has(s)?(this.kvMap.set(n,this._vMap.get(s)),this._vMap.delete(s)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,s){if(this.kvMap.has(n)){let c=this.kvMap.get(n);void 0===this._vMap&&(this._vMap=new Map);const f=this._vMap;for(;f.has(c);)c=f.get(c);f.set(c,s)}else this.kvMap.set(n,s)}forEach(n){for(let[s,c]of this.kvMap)if(n(c,s),void 0!==this._vMap){const f=this._vMap;for(;f.has(c);)c=f.get(c),n(c,s)}}}function bI(t,n,s){kl("NgControlFlow");const c=li(),f=X(),g=cw(c,Ci+t);if(ka(c,f,n)){const N=S(null);try{if(Jf(g,0),-1!==n){const q=dw(c[Vt],Ci+n),nt=rh(g,q.tView.ssrId);Hc(g,Md(c,q,s,{dehydratedView:nt}),0,zc(q,nt))}}finally{S(N)}}else{const N=Wv(g,0);void 0!==N&&(N[V]=s)}}class lA{constructor(n,s,c){this.lContainer=n,this.$implicit=s,this.$index=c}get $count(){return this.lContainer.length-oe}}class dA{constructor(n,s,c){this.hasEmptyBlock=n,this.trackByFn=s,this.liveCollection=c}}function II(t,n,s,c,f,g,A,N,q,nt,Ot,pn,er){kl("NgControlFlow");const hr=void 0!==q,ei=li(),wi=N?A.bind(ei[fr][V]):A,ki=new dA(hr,wi);ei[Ci+t]=ki,Vp(t+1,n,s,c,f,g),hr&&Vp(t+2,q,nt,Ot,pn,er)}class fA extends oA{constructor(n,s,c){super(),this.lContainer=n,this.hostLView=s,this.templateTNode=c,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-oe}at(n){return this.getLView(n)[V].$implicit}attach(n,s){const c=s[U];this.needsIndexUpdate||=n!==this.length,Hc(this.lContainer,s,n,zc(this.templateTNode,c))}detach(n){return this.needsIndexUpdate||=n!==this.length-1,function hA(t,n){return $c(t,n)}(this.lContainer,n)}create(n,s){const c=rh(this.lContainer,this.templateTNode.tView.ssrId);return Md(this.hostLView,this.templateTNode,new lA(this.lContainer,s,n),{dehydratedView:c})}destroy(n){af(n[Vt],n)}updateValue(n,s){this.getLView(n)[V].$implicit=s}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n<this.length;n++)this.getLView(n)[V].$index=n}getLView(n){return function pA(t,n){return Wv(t,n)}(this.lContainer,n)}}function SI(t){const n=S(null),s=Zi();try{const c=li(),f=c[Vt],g=c[s];if(void 0===g.liveCollection){const N=s+1,q=cw(c,N),nt=dw(f,N);g.liveCollection=new fA(q,c,nt)}else g.liveCollection.reset();const A=g.liveCollection;if(function aA(t,n,s){let c,f,g=0,A=t.length-1;if(Array.isArray(n)){let N=n.length-1;for(;g<=A&&g<=N;){const q=t.at(g),nt=n[g],Ot=lw(g,q,g,nt,s);if(0!==Ot){Ot<0&&t.updateValue(g,nt),g++;continue}const pn=t.at(A),er=n[N],hr=lw(A,pn,N,er,s);if(0!==hr){hr<0&&t.updateValue(A,er),A--,N--;continue}const ei=s(g,q),wi=s(A,pn),ki=s(g,nt);if(Object.is(ki,wi)){const ns=s(N,er);Object.is(ns,ei)?(t.swap(g,A),t.updateValue(A,er),N--,A--):t.move(A,g),t.updateValue(g,nt),g++}else if(c??=new wI,f??=EI(t,g,A,s),uw(t,c,g,ki))t.updateValue(g,nt),g++,A++;else if(f.has(ki))c.set(ei,t.detach(g)),A--;else{const ns=t.create(g,n[g]);t.attach(g,ns),g++,A++}}for(;g<=N;)yI(t,c,s,g,n[g]),g++}else if(null!=n){const N=n[Symbol.iterator]();let q=N.next();for(;!q.done&&g<=A;){const nt=t.at(g),Ot=q.value,pn=lw(g,nt,g,Ot,s);if(0!==pn)pn<0&&t.updateValue(g,Ot),g++,q=N.next();else{c??=new wI,f??=EI(t,g,A,s);const er=s(g,Ot);if(uw(t,c,g,er))t.updateValue(g,Ot),g++,A++,q=N.next();else if(f.has(er)){const hr=s(g,nt);c.set(hr,t.detach(g)),A--}else t.attach(g,t.create(g,Ot)),g++,A++,q=N.next()}}for(;!q.done;)yI(t,c,s,t.length,q.value),q=N.next()}for(;g<=A;)t.destroy(t.detach(A--));c?.forEach(N=>{t.destroy(N)})}(A,t,g.trackByFn),A.updateIndexes(),g.hasEmptyBlock){const N=X(),q=0===A.length;if(ka(c,N,q)){const nt=s+2,Ot=cw(c,nt);if(q){const pn=dw(f,nt),er=rh(Ot,pn.tView.ssrId);Hc(Ot,Md(c,pn,void 0,{dehydratedView:er}),0,zc(pn,er))}else Jf(Ot,0)}}}finally{S(n)}}function cw(t,n){return t[n]}function dw(t,n){return qo(t,n)}function jy(t,n,s,c){const f=li(),g=Cs(),A=Ci+t,N=f[$e],q=g.firstCreatePass?function gA(t,n,s,c,f,g){const A=n.consts,q=hf(n,t,2,c,Co(A,f));return om(n,s,q,Co(A,g)),null!==q.attrs&&Ud(q,q.attrs,!1),null!==q.mergedAttrs&&Ud(q,q.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,q),q}(A,g,f,n,s,c):g.data[A],nt=TI(g,f,q,N,n,t);f[A]=nt;const Ot=Et(q);return ea(q,!0),op(N,nt,q),32!=(32&q.flags)&&ja()&&cf(g,f,nt,q),0===function Fl(){return os.lFrame.elementDepthCount}()&&ba(nt,f),function Ra(){os.lFrame.elementDepthCount++}(),Ot&&(Xg(g,f,q),cp(g,q,f)),null!==c&&Qg(f,q),jy}function Gy(){let t=Ws();Ca()?yo():(t=t.parent,ea(t,!1));const n=t;(function Ha(t){return os.skipHydrationRootTNode===t})(n)&&function sl(){os.skipHydrationRootTNode=null}(),function Jo(){os.lFrame.elementDepthCount--}();const s=Cs();return s.firstCreatePass&&(Wa(s,t),Ke(t)&&s.queries.elementEnd(t)),null!=n.classesWithoutHost&&function Dh(t){return 0!=(8&t.flags)}(n)&&iw(s,n,li(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function Ph(t){return 0!=(16&t.flags)}(n)&&iw(s,n,li(),n.stylesWithoutHost,!1),Gy}function fw(t,n,s,c){return jy(t,n,s,c),Gy(),fw}let TI=(t,n,s,c,f,g)=>(Es(!0),xu(c,f,function io(){return os.lFrame.currentNamespace}()));function Wy(t,n,s){const c=li(),f=Cs(),g=t+Ci,A=f.firstCreatePass?function yA(t,n,s,c,f){const g=n.consts,A=Co(g,c),N=hf(n,t,8,"ng-container",A);return null!==A&&Ud(N,A,!0),om(n,s,N,Co(g,f)),null!==n.queries&&n.queries.elementStart(n,N),N}(g,f,c,n,s):f.data[g];ea(A,!0);const N=CI(f,c,A,t);return c[g]=N,ja()&&cf(f,c,N,A),ba(N,c),Et(A)&&(Xg(f,c,A),cp(f,A,c)),null!=s&&Qg(c,A),Wy}function zy(){let t=Ws();const n=Cs();return Ca()?yo():(t=t.parent,ea(t,!1)),n.firstCreatePass&&(Wa(n,t),Ke(t)&&n.queries.elementEnd(t)),zy}function hw(t,n,s){return Wy(t,n,s),zy(),hw}let CI=(t,n,s,c)=>(Es(!0),zf(n[$e],""));function _I(){return li()}const Ih=void 0;var IA=["en",[["a","p"],["AM","PM"],Ih],[["AM","PM"],Ih,Ih],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Ih,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Ih,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Ih,"{1} 'at' {0}",Ih],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function bA(t){const s=Math.floor(Math.abs(t)),c=t.toString().replace(/^[^.]*\.?/,"").length;return 1===s&&0===c?1:5}];let ng={};function pw(t){const n=function SA(t){return t.toLowerCase().replace(/_/g,"-")}(t);let s=RI(n);if(s)return s;const c=n.split("-")[0];if(s=RI(c),s)return s;if("en"===c)return IA;throw new rt(701,!1)}function PI(t){return pw(t)[rg.PluralCase]}function RI(t){return t in ng||(ng[t]=Er.ng&&Er.ng.common&&Er.ng.common.locales&&Er.ng.common.locales[t]),ng[t]}var rg=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(rg||{});const ig="en-US";let MI=ig;function vw(t,n,s,c){const f=li(),g=Cs(),A=Ws();return yw(g,f,f[$e],A,t,n,c),vw}function yw(t,n,s,c,f,g,A){const N=Et(c),nt=t.firstCreatePass&&jv(t),Ot=n[V],pn=mp(n);let er=!0;if(3&c.type||A){const wi=ss(c,n),ki=A?A(wi):wi,ns=pn.length,_i=A?mo=>A(as(mo[c.index])):c.index;let Ts=null;if(!A&&N&&(Ts=function vD(t,n,s,c){const f=t.cleanup;if(null!=f)for(let g=0;g<f.length-1;g+=2){const A=f[g];if(A===s&&f[g+1]===c){const N=n[ie],q=f[g+2];return N.length>q?N[q]:null}"string"==typeof A&&(g+=2)}return null}(t,n,f,c.index)),null!==Ts)(Ts.__ngLastListenerFn__||Ts).__ngNextListenerFn__=g,Ts.__ngLastListenerFn__=g,er=!1;else{g=iS(c,n,Ot,g,!1);const mo=s.listen(ki,f,g);pn.push(g,mo),nt&&nt.push(f,_i,ns,ns+1)}}else g=iS(c,n,Ot,g,!1);const hr=c.outputs;let ei;if(er&&null!==hr&&(ei=hr[f])){const wi=ei.length;if(wi)for(let ki=0;ki<wi;ki+=2){const Ao=n[ei[ki]][ei[ki+1]].subscribe(g),tl=pn.length;pn.push(g,Ao),nt&&nt.push(f,c.index,tl,"function"==typeof Ao?tl+1:-(tl+1))}}}function rS(t,n,s,c){const f=S(null);try{return Ja(6,n,s),!1!==s(c)}catch(g){return yp(t,g),!1}finally{Ja(7,n,s),S(f)}}function iS(t,n,s,c,f){return function g(A){if(A===Function)return c;Od(t.componentOffset>-1?Uo(t.index,n):n);let q=rS(n,s,c,A),nt=g.__ngNextListenerFn__;for(;nt;)q=rS(n,s,nt,A)&&q,nt=nt.__ngNextListenerFn__;return f&&!1===q&&A.preventDefault(),q}}function sS(t=1){return function _a(t){return(os.lFrame.contextLView=function Go(t,n){for(;t>0;)n=n[rr],t--;return n}(t,os.lFrame.contextLView))[V]}(t)}function yD(t,n){let s=null;const c=function Mn(t){const n=t.attrs;if(null!=n){const s=n.indexOf(5);if(!(1&s))return n[s+1]}return null}(t);for(let f=0;f<n.length;f++){const g=n[f];if("*"!==g){if(null===c?En(t,g,!0):jr(c,g))return f}else s=f}return s}function oS(t){const n=li()[fr][Ee];if(!n.projection){const c=n.projection=Bo(t?t.length:1,null),f=c.slice();let g=n.child;for(;null!==g;){const A=t?yD(g,t):0;null!==A&&(f[A]?f[A].projectionNext=g:c[A]=g,f[A]=g),g=g.next}}}function aS(t,n=0,s){const c=li(),f=Cs(),g=hf(f,Ci+t,16,null,s||null);null===g.projection&&(g.projection=n),yo(),(!c[U]||Ba())&&32!=(32&g.flags)&&function ff(t,n,s){kv(n[$e],0,n,s,jg(t,s,n),tp(s.parent||n[Ee],s,n))}(f,c,g)}function Ew(t,n,s){return Qy(t,"",n,"",s),Ew}function Qy(t,n,s,c,f){const g=li(),A=Kp(g,n,s,c);return A!==Fs&&ml(Cs(),Is(),g,t,A,g[$e],f,!1),Qy}function ww(t,n,s,c,f,g,A){const N=li(),q=Yp(N,n,s,c,f,g);return q!==Fs&&ml(Cs(),Is(),N,t,q,N[$e],A,!1),ww}function gS(t,n,s,c){!function Ty(t,n,s,c){const f=Cs();if(f.firstCreatePass){const g=Ws();Cy(f,new wy(n,s,c),g.index),function pb(t,n){const s=t.contentQueries||(t.contentQueries=[]);n!==(s.length?s[s.length-1]:-1)&&s.push(t.queries.length-1,n)}(f,t),2==(2&s)&&(f.staticContentQueries=!0)}return Iy(f,li(),s)}(t,n,s,c)}function mS(t,n,s){!function Sy(t,n,s){const c=Cs();return c.firstCreatePass&&(Cy(c,new wy(t,n,s),-1),2==(2&n)&&(c.staticViewQueries=!0)),Iy(c,li(),n)}(t,n,s)}function vS(t){const n=li(),s=Cs(),c=pi();Ar(c+1);const f=_y(s,c);if(t.dirty&&function da(t){return 4==(4&t[Sr])}(n)===(2==(2&f.metadata.flags))){if(null===f.matches)t.reset([]);else{const g=DE(n,c);t.reset(g,Cl),t.notifyOnChanges()}return!0}return!1}function yS(){return function by(t,n){return t[xi].queries[n].queryList}(li(),pi())}function ES(t){return fo(function Ma(){return os.lFrame.contextLView}(),Ci+t)}function PS(t,n=""){const s=li(),c=Cs(),f=t+Ci,g=c.firstCreatePass?hf(c,f,1,n,null):c.data[f],A=RS(c,s,g,n,t);s[f]=A,ja()&&cf(c,s,A,g),ea(g,!1)}let RS=(t,n,s,c,f)=>(Es(!0),function Wf(t,n){return t.createText(n)}(n[$e],c));function bw(t){return Jy("",t,""),bw}function Jy(t,n,s){const c=li(),f=Kp(c,t,n,s);return f!==Fs&&rc(c,Zi(),f),Jy}function Iw(t,n,s,c,f){const g=li(),A=Yp(g,t,n,s,c,f);return A!==Fs&&rc(g,Zi(),A),Iw}function Sw(t,n,s){Ay(n)&&(n=n());const c=li();return ka(c,X(),n)&&ml(Cs(),Is(),c,t,n,c[$e],s,!1),Sw}function US(t,n){const s=Ay(t);return s&&t.set(n),s}function Tw(t,n){const s=li(),c=Cs(),f=Ws();return yw(c,s,s[$e],f,t,n),Tw}function Cw(t,n,s,c,f){if(t=ys(t),Array.isArray(t))for(let g=0;g<t.length;g++)Cw(t[g],n,s,c,f);else{const g=Cs(),A=li(),N=Ws();let q=Ei(t)?t:ys(t.provide);const nt=Xl(t),Ot=1048575&N.providerIndexes,pn=N.directiveStart,er=N.providerIndexes>>20;
vendor: 5,250 bytes, line 1
1if(Ei(t)||!t.multi){const hr=new Rc(nt,f,Wc),ei=Aw(q,n,f?Ot:Ot+er,pn);-1===ei?(L(Ed(N,A),g,q),_w(g,t,n.length),n.push(q),N.directiveStart++,N.directiveEnd++,f&&(N.providerIndexes+=1048576),s.push(hr),A.push(hr)):(s[ei]=hr,A[ei]=hr)}else{const hr=Aw(q,n,Ot+er,pn),ei=Aw(q,n,Ot,Ot+er),ki=ei>=0&&s[ei];if(f&&!ki||!f&&!(hr>=0&&s[hr])){L(Ed(N,A),g,q);const ns=function FD(t,n,s,c,f){const g=new Rc(t,s,Wc);return g.multi=[],g.index=n,g.componentProviders=0,VS(g,f,c&&!s),g}(f?LD:kD,s.length,f,c,nt);!f&&ki&&(s[ei].providerFactory=ns),_w(g,t,n.length,0),n.push(q),N.directiveStart++,N.directiveEnd++,f&&(N.providerIndexes+=1048576),s.push(ns),A.push(ns)}else _w(g,t,hr>-1?hr:ei,VS(s[f?ei:hr],nt,!f&&c));!f&&c&&ki&&s[ei].componentProviders++}}}function _w(t,n,s,c){const f=Ei(n),g=function Bi(t){return!!t.useClass}(n);if(f||g){const q=(g?ys(n.useClass):n).prototype.ngOnDestroy;if(q){const nt=t.destroyHooks||(t.destroyHooks=[]);if(!f&&n.multi){const Ot=nt.indexOf(s);-1===Ot?nt.push(s,[c,q]):nt[Ot+1].push(c,q)}else nt.push(s,q)}}}function VS(t,n,s){return s&&t.componentProviders++,t.multi.push(n)-1}function Aw(t,n,s,c){for(let f=s;f<c;f++)if(n[f]===t)return f;return-1}function kD(t,n,s,c){return Dw(this.multi,[])}function LD(t,n,s,c){const f=this.multi;let g;if(this.providerFactory){const A=this.providerFactory.componentProviders,N=Xi(s,s[Vt],this.providerFactory.index,c);g=N.slice(0,A),Dw(f,g);for(let q=A;q<N.length;q++)g.push(N[q])}else g=[],Dw(f,g);return g}function Dw(t,n){for(let s=0;s<t.length;s++)n.push((0,t[s])());return n}function BS(t,n=[]){return s=>{s.providersResolver=(c,f)=>function ND(t,n,s){const c=Cs();if(c.firstCreatePass){const f=Vn(t);Cw(s,c.data,c.blueprint,f,!0),Cw(n,c.data,c.blueprint,f,!1)}}(c,f?f(t):t,n)}}let UD=(()=>{class t{constructor(s){this._injector=s,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(s){if(!s.standalone)return null;if(!this.cachedInjectors.has(s)){const c=Si(0,s.type),f=c.length>0?$E([c],this._injector,`Standalone[${s.type.name}]`):null;this.cachedInjectors.set(s,f)}return this.cachedInjectors.get(s)}ngOnDestroy(){try{for(const s of this.cachedInjectors.values())null!==s&&s.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=Ds({token:t,providedIn:"environment",factory:()=>new t(Lo($s))})}return t})();function $S(t){kl("NgStandalone"),t.getStandaloneInjector=n=>n.get(UD).getOrCreateStandaloneInjector(t)}function QS(t,n,s){const c=lo()+t,f=li();return f[c]===Fs?td(f,c,s?n.call(s):n()):$m(f,c)}function JS(t,n,s,c){return sT(li(),lo(),t,n,s,c)}function ZS(t,n,s,c,f){return oT(li(),lo(),t,n,s,c,f)}function qS(t,n,s,c,f,g){return aT(li(),lo(),t,n,s,c,f,g)}function eT(t,n,s,c,f,g,A){return function lT(t,n,s,c,f,g,A,N,q){const nt=n+s;return ac(t,nt,f,g,A,N)?td(t,nt+4,q?c.call(q,f,g,A,N):c(f,g,A,N)):Jm(t,nt+4)}(li(),lo(),t,n,s,c,f,g,A)}function tT(t,n,s,c,f,g,A,N){const q=lo()+t,nt=li(),Ot=ac(nt,q,s,c,f,g);return ka(nt,q+4,A)||Ot?td(nt,q+5,N?n.call(N,s,c,f,g,A):n(s,c,f,g,A)):$m(nt,q+5)}function nT(t,n,s,c,f,g,A,N,q){const nt=lo()+t,Ot=li(),pn=ac(Ot,nt,s,c,f,g);return Eh(Ot,nt+4,A,N)||pn?td(Ot,nt+6,q?n.call(q,s,c,f,g,A,N):n(s,c,f,g,A,N)):$m(Ot,nt+6)}function rT(t,n,s,c,f,g,A,N,q,nt){const Ot=lo()+t,pn=li();let er=ac(pn,Ot,s,c,f,g);return Ny(pn,Ot+4,A,N,q)||er?td(pn,Ot+7,nt?n.call(nt,s,c,f,g,A,N,q):n(s,c,f,g,A,N,q)):$m(pn,Ot+7)}function iT(t,n,s,c){return function uT(t,n,s,c,f,g){let A=n+s,N=!1;for(let q=0;q<f.length;q++)ka(t,A++,f[q])&&(N=!0);return N?td(t,A,c.apply(g,f)):Jm(t,A)}(li(),lo(),t,n,s,c)}function Jm(t,n){const s=t[n];return s===Fs?void 0:s}function sT(t,n,s,c,f,g){const A=n+s;return ka(t,A,f)?td(t,A+1,g?c.call(g,f):c(f)):Jm(t,A+1)}function oT(t,n,s,c,f,g,A){const N=n+s;return Eh(t,N,f,g)?td(t,N+2,A?c.call(A,f,g):c(f,g)):Jm(t,N+2)}function aT(t,n,s,c,f,g,A,N){const q=n+s;return Ny(t,q,f,g,A)?td(t,q+3,N?c.call(N,f,g,A):c(f,g,A)):Jm(t,q+3)}function cT(t,n){const s=Cs();let c;const f=t+Ci;s.firstCreatePass?(c=function XD(t,n){if(n)for(let s=n.length-1;s>=0;s--){const c=n[s];if(t===c.name)return c}}(n,s.pipeRegistry),s.data[f]=c,c.onDestroy&&(s.destroyHooks??=[]).push(f,c.onDestroy)):c=s.data[f];const g=c.factory||(c.factory=vr(c.type)),N=Po(Wc);try{const q=yd(!1),nt=g();return yd(q),function ID(t,n,s,c){s>=t.data.length&&(t.data[s]=null,t.blueprint[s]=null),n[s]=c}(s,li(),f,nt),nt}finally{Po(N)}}function dT(t,n,s){const c=t+Ci,f=li(),g=fo(f,c);return Zm(f,c)?sT(f,lo(),n,g.transform,s,g):g.transform(s)}function fT(t,n,s,c){const f=t+Ci,g=li(),A=fo(g,f);return Zm(g,f)?oT(g,lo(),n,A.transform,s,c,A):A.transform(s,c)}function hT(t,n,s,c,f){const g=t+Ci,A=li(),N=fo(A,g);return Zm(A,g)?aT(A,lo(),n,N.transform,s,c,f,N):N.transform(s,c,f)}function Zm(t,n){return t[Vt].data[n].pure}function pT(t,n){return Ip(t,n)}class RT{constructor(n){this.full=n;const s=n.split(".");this.major=s[0],this.minor=s[1],this.patch=s.slice(2).join(".")}}const E1=new RT("17.2.4");let MT=(()=>{class t{log(s){console.log(s)}warn(s){console.warn(s)}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();const LT=new Cr(""),FT=new Cr("");let kw,z1=(()=>{class t{constructor(s,c,f){this._ngZone=s,this.registry=c,this._pendingCount=0,this._isZ
1oneStable=!0,this._callbacks=[],this.taskTrackingZone=null,kw||(function H1(t){kw=t}(f),f.addToWindow(c)),this._watchAngularEvents(),s.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ca.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let s=this._callbacks.pop();clearTimeout(s.timeoutId),s.doneCb()}});else{let s=this.getPendingTasks();this._callbacks=this._callbacks.filter(c=>!c.updateCb||!c.updateCb(s)||(clearTimeout(c.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(s=>({source:s.source,creationLocation:s.creationLocation,data:s.data})):[]}addCallback(s,c,f){let g=-1;c&&c>0&&(g=setTimeout(()=>{this._callbacks=this._callbacks.filter(A=>A.timeoutId!==g),s()},c)),this._callbacks.push({doneCb:s,timeoutId:g,updateCb:f})}whenStable(s,c,f){if(f&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(s,c,f),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(s){this.registry.registerApplication(s,this)}unregisterApplication(s){this.registry.unregisterApplication(s)}findProviders(s,c,f){return[]}static#e=this.\u0275fac=function(c){return new(c||t)(Lo(ca),Lo(UT),Lo(FT))};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac})}return t})(),UT=(()=>{class t{constructor(){this._applications=new Map}registerApplication(s,c){this._applications.set(s,c)}unregisterApplication(s){this._applications.delete(s)}unregisterAllApplications(){this._applications.clear()}getTestability(s){return this._applications.get(s)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(s,c=!0){return kw?.findTestabilityInTree(this,s,c)??null}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function Lw(t){return!!t&&"function"==typeof t.then}function VT(t){return!!t&&"function"==typeof t.subscribe}const BT=new Cr("");let Fw=(()=>{class t{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((s,c)=>{this.resolve=s,this.reject=c}),this.appInits=xs(BT,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const s=[];for(const f of this.appInits){const g=f();if(Lw(g))s.push(g);else if(VT(g)){const A=new Promise((N,q)=>{g.subscribe({complete:N,error:q})});s.push(A)}}const c=()=>{this.done=!0,this.resolve()};Promise.all(s).then(()=>{c()}).catch(f=>{this.reject(f)}),0===s.length&&c(),this.initialized=!0}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Uw=new Cr("");function GT(t,n){return Array.isArray(n)?n.reduce(GT,t):{...t,...n}}let Cf=(()=>{class t{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=xs(sv),this.afterRenderEffectManager=xs(Ld),this.componentTypes=[],this.components=[],this.isStable=xs(Up).hasPendingTasks.pipe((0,mn.k)(s=>!s)),this._injector=xs($s)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(s,c){const f=s instanceof Cm;if(!this._injector.get(Fw).done)throw!f&&bt(s),new rt(405,!1);let A;A=f?s:this._injector.get(Pp).resolveComponentFactory(s),this.componentTypes.push(A.componentType);const N=function K1(t){return t.isBoundToModule}(A)?void 0:this._injector.get(yh),nt=A.create(gl.NULL,[],c||A.selector,N),Ot=nt.location.nativeElement,pn=nt.injector.get(LT,null);return pn?.registerApplication(Ot),nt.onDestroy(()=>{this.detachView(nt.hostView),t0(this.components,nt),pn?.unregisterApplication(Ot)}),this._loadComponent(nt),nt}tick(){if(this._runningTick)throw new rt(101,!1);const s=S(null);try{this._runningTick=!0,this.detectChangesInAttachedViews()}catch(c){this.internalErrorHandler(c)}finally{this._runningTick=!1,S(s)}}detectChangesInAttachedViews(){let s=0;const c=this.afterRenderEffectManager;for(;;){if(100===s)throw new rt(103,!1);const f=0===s;for(let{_lView:g,notifyErrorHandler:A}of this._views)!f&&!Vw(g)||this.detectChangesInView(g,A,f);if(s++,c.executeInternalCallbacks(),!this._views.some(({_lView:g})=>Vw(g))&&(c.execute(),!this._views.some(({_lView:g})=>Vw(g))))break}}detectChangesInView(s,c,f){let g;f?(g=0,s[Sr]|=1024):g=64&s[Sr]?0:1,vf(s,c,g)}attachView(s){const c=s;this._views.push(c),c.attachToAppRef(this)}detachView(s){const c=s;t0(this._views,c),c.detachFromAppRef()}_loadComponent(s){this.attachView(s.hostView),this.tick(),this.components.push(s);const c=this._injector.get(Uw,[]);
1[...this._bootstrapListeners,...c].forEach(f=>f(s))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(s=>s()),this._views.slice().forEach(s=>s.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(s){return this._destroyListeners.push(s),()=>t0(this._destroyListeners,s)}destroy(){if(this._destroyed)throw new rt(406,!1);const s=this._injector;s.destroy&&!s.destroyed&&s.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function t0(t,n){const s=t.indexOf(n);s>-1&&t.splice(s,1)}function Vw(t){return Ta(t)}class X1{constructor(n,s){this.ngModuleFactory=n,this.componentFactories=s}}let Q1=(()=>{class t{compileModuleSync(s){return new BE(s)}compileModuleAsync(s){return Promise.resolve(this.compileModuleSync(s))}compileModuleAndAllComponentsSync(s){const c=this.compileModuleSync(s),g=Nl(It(s).declarations).reduce((A,N)=>{const q=Hr(N);return q&&A.push(new ph(q)),A},[]);return new X1(c,g)}compileModuleAndAllComponentsAsync(s){return Promise.resolve(this.compileModuleAndAllComponentsSync(s))}clearCache(){}clearCacheFor(s){}getModuleId(s){}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),q1=(()=>{class t{constructor(){this.zone=xs(ca),this.applicationRef=xs(Cf)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function eP(){const t=xs(ca),n=xs(gc);return s=>t.runOutsideAngular(()=>n.handleError(s))}let nP=(()=>{class t{constructor(){this.subscription=new rn.wH,this.initialized=!1,this.zone=xs(ca),this.pendingTasks=xs(Up)}initialize(){if(this.initialized)return;this.initialized=!0;let s=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(s=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ca.assertNotInAngularZone(),queueMicrotask(()=>{null!==s&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(s),s=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ca.assertInAngularZone(),s??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#e=this.\u0275fac=function(c){return new(c||t)};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const r0=new Cr("",{providedIn:"root",factory:()=>xs(r0,Kr.Optional|Kr.SkipSelf)||function rP(){return typeof $localize<"u"&&$localize.locale||ig}()}),iP=new Cr("",{providedIn:"root",factory:()=>"USD"}),Bw=new Cr("");let KT=(()=>{class t{constructor(s){this._injector=s,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(s,c){const f=function gE(t="zone.js",n){return"noop"===t?new Op:"zone.js"===t?new ca(n):t}(c?.ngZone,function HT(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}({eventCoalescing:c?.ngZoneEventCoalescing,runCoalescing:c?.ngZoneRunCoalescing}));return f.run(()=>{const g=function WC(t,n,s){return new VE(t,n,s)}(s.moduleType,this.injector,function zT(t){return[{provide:ca,useFactory:t},{provide:hi,multi:!0,useFactory:()=>{const n=xs(q1,{optional:!0});return()=>n.initialize()}},{provide:hi,multi:!0,useFactory:()=>{const n=xs(nP);return()=>{n.initialize()}}},{provide:sv,useFactory:eP}]}(()=>f)),A=g.injector.get(gc,null);return f.runOutsideAngular(()=>{const N=f.onError.subscribe({next:q=>{A.handleError(q)}});g.onDestroy(()=>{t0(this._modules,g),N.unsubscribe()})}),function jT(t,n,s){try{const c=s();return Lw(c)?c.catch(f=>{throw n.runOutsideAngular(()=>t.handleError(f)),f}):c}catch(c){throw n.runOutsideAngular(()=>t.handleError(c)),c}}(A,f,()=>{const N=g.injector.get(Fw);
1return N.runInitializers(),N.donePromise.then(()=>(function xI(t){"string"==typeof t&&(MI=t.toLowerCase().replace(/_/g,"-"))}(g.injector.get(r0,ig)||ig),this._moduleDoBootstrap(g),g))})})}bootstrapModule(s,c=[]){const f=GT({},c);return function Z1(t,n,s){const c=new BE(s);return Promise.resolve(c)}(0,0,s).then(g=>this.bootstrapModuleFactory(g,f))}_moduleDoBootstrap(s){const c=s.injector.get(Cf);if(s._bootstrapComponents.length>0)s._bootstrapComponents.forEach(f=>c.bootstrap(f));else{if(!s.instance.ngDoBootstrap)throw new rt(-403,!1);s.instance.ngDoBootstrap(c)}this._modules.push(s)}onDestroy(s){this._destroyListeners.push(s)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new rt(404,!1);this._modules.slice().forEach(c=>c.destroy()),this._destroyListeners.forEach(c=>c());const s=this._injector.get(Bw,null);s&&(s.forEach(c=>c()),s.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(c){return new(c||t)(Lo(gl))};static#t=this.\u0275prov=Ds({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),_f=null;const YT=new Cr("");function XT(t,n,s=[]){const c=`Platform: ${n}`,f=new Cr(c);return(g=[])=>{let A=$w();if(!A||A.injector.get(YT,!1)){const N=[...s,...g,{provide:f,useValue:!0}];t?t(N):function oP(t){if(_f&&!_f.get(YT,!1))throw new rt(400,!1);(function $T(){!function ue(t){Ut=t}(()=>{throw new rt(600,!1)})})(),_f=t;const n=t.get(KT);(function JT(t){t.get(Ss,null)?.forEach(s=>s())})(t)}(function QT(t=[],n){return gl.create({name:n,providers:[{provide:Ys,useValue:"platform"},{provide:Bw,useValue:new Set([()=>_f=null])},...t]})}(N,c))}return function aP(t){const n=$w();if(!n)throw new rt(401,!1);return n}()}}function $w(){return _f?.get(KT)??null}function uP(){return!1}function cP(){}let qT=(()=>{class t{static#e=this.__NG_ELEMENT_ID__=dP}return t})();function dP(t){return function fP(t,n,s){if(tt(t)&&!s){const c=Uo(t.index,n);return new yf(c,c)}return 47&t.type?new yf(n[fr],n):null}(Ws(),li(),16==(16&t))}class rC{constructor(){}supports(n){return Oy(n)}create(n){return new vP(n)}}const mP=(t,n)=>n;class vP{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||mP}forEachItem(n){let s;for(s=this._itHead;null!==s;s=s._next)n(s)}forEachOperation(n){let s=this._itHead,c=this._removalsHead,f=0,g=null;for(;s||c;){const A=!c||s&&s.currentIndex<sC(c,f,g)?s:c,N=sC(A,f,g),q=A.currentIndex;if(A===c)f--,c=c._nextRemoved;else if(s=s._next,null==A.previousIndex)f++;else{g||(g=[]);const nt=N-f,Ot=q-f;if(nt!=Ot){for(let er=0;er<nt;er++){const hr=er<g.length?g[er]:g[er]=0,ei=hr+er;Ot<=ei&&ei<nt&&(g[er]=hr+1)}g[A.previousIndex]=Ot-nt}}N!==q&&n(A,N,q)}}forEachPreviousItem(n){let s;for(s=this._previousItHead;null!==s;s=s._nextPrevious)n(s)}forEachAddedItem(n){let s;for(s=this._additionsHead;null!==s;s=s._nextAdded)n(s)}forEachMovedItem(n){let s;for(s=this._movesHead;null!==s;s=s._nextMoved)n(s)}forEachRemovedItem(n){let s;for(s=this._removalsHead;null!==s;s=s._nextRemoved)n(s)}forEachIdentityChange(n){let s;for(s=this._identityChangesHead;null!==s;s=s._nextIdentityChange)n(s)}diff(n){if(null==n&&(n=[]),!Oy(n))throw new rt(900,!1);return this.check(n)?this:null}onDestroy(){}check(n){this._reset();let f,g,A,s=this._itHead,c=!1;if(Array.isArray(n)){this.length=n.length;for(let N=0;N<this.length;N++)g=n[N],A=this._trackByFn(N,g),null!==s&&Object.is(s.trackById,A)?(c&&(s=this._verifyReinsertion(s,g,A,N)),Object.is(s.item,g)||this._addIdentityChange(s,g)):(s=this._mismatch(s,g,A,N),c=!0),s=s._next}else f=0,function YC(t,n){if(Array.isArray(t))for(let s=0;s<t.length;s++)n(t[s]);else{const s=t[Symbol.iterator]();let c;for(;!(c=s.next()).done;)n(c.value)}}(n,N=>{A=this._trackByFn(f,N),null!==s&&Object.is(s.trackById,A)?(c&&(s=this._verifyReinsertion(s,N,A,f)),Object.is(s.item,N)||this._addIdentityChange(s,N)):(s=this._mismatch(s,N,A,f),c=!0),s=s._next,f++}),this.length=f;return this._truncate(s),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,s,c,f){let g;return null===n?g=this._itTail:(g=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(c,null))?(Object.is(n.item,s)||this._addIdentityChange(n,s),this._reinsertAfter(n,g,f)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(c,f))?(Object.is(n.item,s)||this._addIdentityChange(n,s),this._moveAfter(n,g,f)):n=this._addAfter(new yP(s,c),g,f),n}_verifyReinsertion(n,s,c,f){let g=null===this._unlinkedRecords?null:this._unlinkedRecords.get(c,null);return null!==g?n=this._reinsertAfter(g,n._prev,f):n.currentIndex!=f&&(n.currentIndex=f,this._addToMoves(n,f)),n}_truncate(n){for(;null!==n;){const s=n._next;this._addToRemovals(this._unlink(n)),n=s}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,s,c){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const f=n._prevRemoved,g=n._nextRemoved;return null===f?this._removalsHead=g:f._nextRemoved=g,null===g?this._removalsTail=f:g._prevRemoved=f,this._insertAfter(n,s,c),this._addToMoves(n,c),n}_moveAfter(n,s,c){return this._unlink(n),this._insertAfter(n,s,c),this._addToMoves(n,c),n}_addAfter(n,s,c){return this._insertAfter(n,s,c),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,s,c){const f=null===s?this._itHead:s._next;return n._next=f,n._prev=s,null===f?this._itTail=n:f._prev=n,null===s?this._itHead=n:s._next=n,null===this._linkedRecords&&(this._linkedRecords=new iC),this._linkedRecords.put(n),n.currentIndex=c,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const s=n._prev,c=n._next;return null===s?this._itHead=c:s._next=c,null===c?this._itTail=s:c._prev=s,n}_addToMoves(n,s){return n.previousIndex===s||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new iC),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,s){return n.item=s,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class yP{constructor(n,s){this.item=n,this.trackById=s,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class EP{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,s){let c;for(c=this._head;null!==c;c=c._nextDup)if((null===s||s<=c.currentIndex)&&Object.is(c.trackById,n))return c;return null}remove(n){const s=n._prevDup,c=n._nextDup;return null===s?this._head=c:s._nextDup=c,null===c?this._tail=s:c._prevDup=s,null===this._head}}class iC{constructor(){this.map=new Map}put(n){const s=n.trackById;let c=this.map.get(s);c||(c=new EP,this.map.set(s,c)),c.add(n)}get(n,s){const f=this.map.get(n);return f?f.get(n,s):null}remove(n){const s=n.trackById;return this.map.get(s).remove(n)&&this.map.delete(s),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function sC(t,n,s){const c=t.previousIndex;if(null===c)return c;let f=0;return s&&c<s.length&&(f=s[c]),c+n+f}class oC{constructor(){}supports(n){return n instanceof Map||jE(n)}create(){return new wP}}class wP{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(n){let s;for(s=this._mapHead;null!==s;s=s._next)n(s)}forEachPreviousItem(n){let s;for(s=this._previousMapHead;null!==s;s=s._nextPrevious)n(s)}forEachChangedItem(n){let s;for(s=this._changesHead;null!==s;s=s._nextChanged)n(s)}forEachAddedItem(n){let s;for(s=this._additionsHead;null!==s;s=s._nextAdded)n(s)}forEachRemovedItem(n){let s;for(s=this._removalsHead;null!==s;s=s._nextRemoved)n(s)}diff(n){if(n){if(!(n instanceof Map||jE(n)))throw new rt(900,!1)}else n=new Map;return this.check(n)?this:null}onDestroy(){}check(n){this._reset();let s=this._mapHead;
1if(this._appendAfter=null,this._forEach(n,(c,f)=>{if(s&&s.key===f)this._maybeAddToChanges(s,c),this._appendAfter=s,s=s._next;else{const g=this._getOrCreateRecordForKey(f,c);s=this._insertBeforeOrAppend(s,g)}}),s){s._prev&&(s._prev._next=null),this._removalsHead=s;for(let c=s;null!==c;c=c._nextRemoved)c===this._mapHead&&(this._mapHead=null),this._records.delete(c.key),c._nextRemoved=c._next,c.previousValue=c.currentValue,c.currentValue=null,c._prev=null,c._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,s){if(n){const c=n._prev;return s._next=n,s._prev=c,n._prev=s,c&&(c._next=s),n===this._mapHead&&(this._mapHead=s),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=s,s._prev=this._appendAfter):this._mapHead=s,this._appendAfter=s,null}_getOrCreateRecordForKey(n,s){if(this._records.has(n)){const f=this._records.get(n);this._maybeAddToChanges(f,s);const g=f._prev,A=f._next;return g&&(g._next=A),A&&(A._prev=g),f._next=null,f._prev=null,f}const c=new bP(n);return this._records.set(n,c),c.currentValue=s,this._addToAdditions(c),c}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,s){Object.is(s,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=s,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,s){n instanceof Map?n.forEach(s):Object.keys(n).forEach(c=>s(n[c],c))}}class bP{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function aC(){return new Hw([new rC])}let Hw=(()=>{class t{static#e=this.\u0275prov=Ds({token:t,providedIn:"root",factory:aC});constructor(s){this.factories=s}static create(s,c){if(null!=c){const f=c.factories.slice();s=s.concat(f)}return new t(s)}static extend(s){return{provide:t,useFactory:c=>t.create(s,c||aC()),deps:[[t,new kn,new Pn]]}}find(s){const c=this.factories.find(f=>f.supports(s));if(null!=c)return c;throw new rt(901,!1)}}return t})();function lC(){return new Kw([new oC])}let Kw=(()=>{class t{static#e=this.\u0275prov=Ds({token:t,providedIn:"root",factory:lC});constructor(s){this.factories=s}static create(s,c){if(c){const f=c.factories.slice();s=s.concat(f)}return new t(s)}static extend(s){return{provide:t,useFactory:c=>t.create(s,c||lC()),deps:[[t,new kn,new Pn]]}}find(s){const c=this.factories.find(f=>f.supports(s));if(c)return c;throw new rt(901,!1)}}return t})();const TP=XT(null,"core",[]);let CP=(()=>{class t{constructor(s){}static#e=this.\u0275fac=function(c){return new(c||t)(Lo(Cf))};static#t=this.\u0275mod=Tr({type:t});static#n=this.\u0275inj=Ka({})}return t})();function qP(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}function tR(t){const n=S(null);try{return t()}finally{S(n)}}function aR(t,n){const s=Hr(t),c=n.elementInjector||Pl();return new ph(s).create(c,n.projectableNodes,n.hostElement,n.environmentInjector)}function lR(t){const n=Hr(t);if(!n)return null;const s=new ph(n);return{get selector(){return s.selector},get type(){return s.componentType},get inputs(){return s.inputs},get outputs(){return s.outputs},get ngContentSelectors(){return s.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}},60331:(B,G,a)=>{"use strict";a.d(G,{CU:()=>j,Ev:()=>H,GW:()=>pe,Q$:()=>Le,_8:()=>Ie,_o:()=>ye,cd:()=>Ne,mq:()=>ae,ox:()=>Ve}),a(44860);var v=a(91368),b=a(32116),_=a(17900),C=a(56e3),P=a(95657),S=a(82700),R=a(53252),k=a(19900),x=a(33412),D=a(93920),ee=a(17368),te=a(54704),J=a(8716),Q=a(75084),we=a(90320),de=a(92924),Y=a(66684),Se=a(49252);const pe=new b.UbH("angularfire2.auth.use-emulator"),ae=new b.UbH("angularfire2.auth.settings"),Ve=new b.UbH("angularfire2.auth.tenant-id"),Ne=new b.UbH("angularfire2.auth.langugage-code"),Ie=new b.UbH("angularfire2.auth.use-device-language"),H=new b.UbH("angularfire.auth.persistence"),j=(W,We,At,Ut,it,ue,se,ce)=>(0,C.PQ)(`${W.name}.auth`,"AngularFireAuth",W.name,()=>{const K=We.runOutsideAngular(()=>W.auth());if(At&&K.useEmulator(...At),Ut&&(K.tenantId=Ut),K.languageCode=it,ue&&K.useDeviceLanguage(),se)for(const[_e,Pe]of Object.entries(se))K.settings[_e]=Pe;return ce&&K.setPersistence(ce),K},[At,Ut,it,ue,se,ce]);let ye=(()=>{class W{authState;idToken;user;idTokenResult;credential;constructor(At,Ut,it,ue,se,ce,K,_e,Pe,De,ke,Lt){const Dt=new P.E,He=(0,S.of)(void 0).pipe((0,D.y)(se.outsideAngular),(0,ee.G)(()=>ue.runOutsideAngular(()=>Promise.resolve().then(a.bind(a,44860)))),(0,te.k)(()=>(0,C._G)(At,ue,Ut)),(0,te.k)(ge=>j(ge,ue,ce,_e,Pe,De,K,ke)),(0,J.C)({bufferSize:1,refCount:!1}));if((0,v.uf)(it))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=(0,S.of)(null);else{He.pipe((0,Q.K)()).subscribe();const ge=He.pipe((0,ee.G)(rn=>rn.getRedirectResult().then(cn=>cn,()=>null)),_.wH,(0,J.C)({bufferSize:1,refCount:!1})),xt=He.pipe((0,ee.G)(rn=>new R._(cn=>({unsubscribe:ue.runOutsideAngular(()=>rn.onAuthStateChanged(mn=>cn.next(mn),mn=>cn.error(mn),()=>cn.complete()))})))),pt=He.pipe((0,ee.G)(rn=>new R._(cn=>({unsubscribe:ue.runOutsideAngular(()=>rn.onIdTokenChanged(mn=>cn.next(mn),mn=>cn.error(mn),()=>cn.complete()))}))));this.authState=ge.pipe((0,we.i)(xt),(0,de.y)(se.outsideAngular),(0,D.y)(se.insideAngular)),this.user=ge.pipe((0,we.i)(pt),(0,de.y)(se.outsideAngular),(0,D.y)(se.insideAngular)),this.idToken=this.user.pipe((0,ee.G)(rn=>rn?(0,k.Q)(rn.getIdToken()):(0,S.of)(null))),this.idTokenResult=this.user.pipe((0,ee.G)(rn=>rn?(0,k.Q)(rn.getIdTokenResult()):(0,S.of)(null))),this.credential=(0,x.U)(ge,Dt,this.authState.pipe((0,Y.I)(rn=>!rn))).pipe((0,te.k)(rn=>rn?.user?rn:null),(0,de.y)(se.outsideAngular),(0,D.y)(se.insideAngular))}return(0,C._w)(this,He,ue,{spy:{apply:(ge,xt,pt)=>{(ge.startsWith("signIn")||ge.startsWith("createUser"))&&pt.then(rn=>Dt.next(rn))}}})}static \u0275fac=function(Ut){return new(Ut||W)(b.CoB(C.E9),b.CoB(C.Ml,8),b.CoB(b.AHE),b.CoB(b.WW2),b.CoB(_.u),b.CoB(pe,8),b.CoB(ae,8),b.CoB(Ve,8),b.CoB(Ne,8),b.CoB(Ie,8),b.CoB(H,8),b.CoB(_.gJ,8))};static \u0275prov=b.wxM({token:W,factory:W.\u0275fac,providedIn:"any"})}return W})(),Le=(()=>{class W{constructor(){Se.c.registerVersion("angularfire",_.j1.full,"auth-compat")}static \u0275fac=function(Ut){return new(Ut||W)};static \u0275mod=b.a4G({type:W});static \u0275inj=b.s3X({providers:[ye]})}return W})()},51676:(B,G,a)=>{"use strict";a.d(G,{i4:()=>
1or,Se:()=>zr});var i=a(91368),v=a(32116),b=a(17900),_=a(56e3),C=a(60331),P=a(112),S=a(53252),R=a(19900),k=a(82700),x=a(75568),D=a(37036),ee=a(54704),te=a(21112),J=a(74e3),Q=a(66684),de=(a(44860),a(98368)),Y=a(25718),Se=a(27144),Ye=a(12540);function Ve(sn,Qe){if(void 0===Qe)return{merge:!1};if(void 0!==Qe.mergeFields&&void 0!==Qe.merge)throw new Y.Mm("invalid-argument",`Invalid options passed to function ${sn}(): You cannot specify both "merge" and "mergeFields".`);return Qe}function Ne(){if(typeof Uint8Array>"u")throw new Y.Mm("unimplemented","Uint8Arrays are not available in this environment.")}function Ie(){if(!(0,Y.Qj)())throw new Y.Mm("unimplemented","Blobs are unavailable in Firestore in this environment.")}class H{constructor(Qe){this._delegate=Qe}static fromBase64String(Qe){return Ie(),new H(Y.Km.fromBase64String(Qe))}static fromUint8Array(Qe){return Ne(),new H(Y.Km.fromUint8Array(Qe))}toBase64(){return Ie(),this._delegate.toBase64()}toUint8Array(){return Ne(),this._delegate.toUint8Array()}isEqual(Qe){return this._delegate.isEqual(Qe._delegate)}toString(){return"Blob(base64: "+this.toBase64()+")"}}function j(sn){return function ye(sn,Qe){if("object"!=typeof sn||null===sn)return!1;const ut=sn;for(const Xt of Qe)if(Xt in ut&&"function"==typeof ut[Xt])return!0;return!1}(sn,["next","error","complete"])}class Le{enableIndexedDbPersistence(Qe,ut){return(0,Y._Q)(Qe._delegate,{forceOwnership:ut})}enableMultiTabIndexedDbPersistence(Qe){return(0,Y.Ej)(Qe._delegate)}clearIndexedDbPersistence(Qe){return(0,Y.y0)(Qe._delegate)}}class W{constructor(Qe,ut,Xt){this._delegate=ut,this._persistenceProvider=Xt,this.INTERNAL={delete:()=>this.terminate()},Qe instanceof Y.K2||(this._appCompat=Qe)}get _databaseId(){return this._delegate._databaseId}settings(Qe){const ut=this._delegate._getSettings();!Qe.merge&&ut.host!==Qe.host&&(0,Y.ss)("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),Qe.merge&&delete(Qe=Object.assign(Object.assign({},ut),Qe)).merge,this._delegate._setSettings(Qe)}useEmulator(Qe,ut,Xt={}){(0,Y.Cw)(this._delegate,Qe,ut,Xt)}enableNetwork(){return(0,Y.If)(this._delegate)}disableNetwork(){return(0,Y.Mp)(this._delegate)}enablePersistence(Qe){let ut=!1,Xt=!1;return Qe&&(ut=!!Qe.synchronizeTabs,Xt=!!Qe.experimentalForceOwningTab,(0,Y.k1)("synchronizeTabs",ut,"experimentalForceOwningTab",Xt)),ut?this._persistenceProvider.enableMultiTabIndexedDbPersistence(this):this._persistenceProvider.enableIndexedDbPersistence(this,Xt)}clearPersistence(){return this._persistenceProvider.clearIndexedDbPersistence(this)}terminate(){return this._appCompat&&(this._appCompat._removeServiceInstance("firestore-compat"),this._appCompat._removeServiceInstance("firestore")),this._delegate._delete()}waitForPendingWrites(){return(0,Y.cl)(this._delegate)}onSnapshotsInSync(Qe){return(0,Y.oX)(this._delegate,Qe)}get app(){if(!this._appCompat)throw new Y.Mm("failed-precondition","Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._appCompat}collection(Qe){try{return new He(this,(0,Y.oV)(this._delegate,Qe))}catch(ut){throw ce(ut,"collection()","Firestore.collection()")}}doc(Qe){try{return new se(this,(0,Y.UN)(this._delegate,Qe))}catch(ut){throw ce(ut,"doc()","Firestore.doc()")}}collectionGroup(Qe){try{return new ke(this,(0,Y.c7)(this._delegate,Qe))}catch(ut){throw ce(ut,"collectionGroup()","Firestore.collectionGroup()")}}runTransaction(Qe){return(0,Y.k9)(this._delegate,ut=>Qe(new Ut(this,ut)))}batch(){return(0,Y.Ws)(this._delegate),new it(new Y.k5(this._delegate,Qe=>(0,Y._M)(this._delegate,Qe)))}loadBundle(Qe){return(0,Y.uG)(this._delegate,Qe)}namedQuery(Qe){return(0,Y.ee)(this._delegate,Qe).then(ut=>ut?new ke(this,ut):null)}}class We extends Y.wP{constructor(Qe){super(),this.firestore=Qe}convertBytes(Qe){return new H(new Y.Km(Qe))}convertReference(Qe){const ut=this.convertDocumentKey(Qe,this.firestore._databaseId);return se.forKey(ut,this.firestore,null)}}class Ut{constructor(Qe,ut){this._firestore=Qe,this._delegate=ut,this._userDataWriter=new We(Qe)}get(Qe){const ut=ge(Qe);return this._delegate.get(ut).then(Xt=>
1new Pe(this._firestore,new Y.E3(this._firestore._delegate,this._userDataWriter,Xt._key,Xt._document,Xt.metadata,ut.converter)))}set(Qe,ut,Xt){const wn=ge(Qe);return Xt?(Ve("Transaction.set",Xt),this._delegate.set(wn,ut,Xt)):this._delegate.set(wn,ut),this}update(Qe,ut,Xt,...wn){const dr=ge(Qe);return 2===arguments.length?this._delegate.update(dr,ut):this._delegate.update(dr,ut,Xt,...wn),this}delete(Qe){const ut=ge(Qe);return this._delegate.delete(ut),this}}class it{constructor(Qe){this._delegate=Qe}set(Qe,ut,Xt){const wn=ge(Qe);return Xt?(Ve("WriteBatch.set",Xt),this._delegate.set(wn,ut,Xt)):this._delegate.set(wn,ut),this}update(Qe,ut,Xt,...wn){const dr=ge(Qe);return 2===arguments.length?this._delegate.update(dr,ut):this._delegate.update(dr,ut,Xt,...wn),this}delete(Qe){const ut=ge(Qe);return this._delegate.delete(ut),this}commit(){return this._delegate.commit()}}class ue{constructor(Qe,ut,Xt){this._firestore=Qe,this._userDataWriter=ut,this._delegate=Xt}fromFirestore(Qe,ut){const Xt=new Y.EL(this._firestore._delegate,this._userDataWriter,Qe._key,Qe._document,Qe.metadata,null);return this._delegate.fromFirestore(new De(this._firestore,Xt),ut??{})}toFirestore(Qe,ut){return ut?this._delegate.toFirestore(Qe,ut):this._delegate.toFirestore(Qe)}static getInstance(Qe,ut){const Xt=ue.INSTANCES;let wn=Xt.get(Qe);wn||(wn=new WeakMap,Xt.set(Qe,wn));let dr=wn.get(ut);return dr||(dr=new ue(Qe,new We(Qe),ut),wn.set(ut,dr)),dr}}ue.INSTANCES=new WeakMap;class se{constructor(Qe,ut){this.firestore=Qe,this._delegate=ut,this._userDataWriter=new We(Qe)}static forPath(Qe,ut,Xt){if(Qe.length%2!=0)throw new Y.Mm("invalid-argument",`Invalid document reference. Document references must have an even number of segments, but ${Qe.canonicalString()} has ${Qe.length}`);return new se(ut,new Y.YD(ut._delegate,Xt,new Y.o1(Qe)))}static forKey(Qe,ut,Xt){return new se(ut,new Y.YD(ut._delegate,Xt,Qe))}get id(){return this._delegate.id}get parent(){return new He(this.firestore,this._delegate.parent)}get path(){return this._delegate.path}collection(Qe){try{return new He(this.firestore,(0,Y.oV)(this._delegate,Qe))}catch(ut){throw ce(ut,"collection()","DocumentReference.collection()")}}isEqual(Qe){return(Qe=(0,Se.Yj)(Qe))instanceof Y.YD&&(0,Y.G6)(this._delegate,Qe)}set(Qe,ut){ut=Ve("DocumentReference.set",ut);try{return ut?(0,Y.Sm)(this._delegate,Qe,ut):(0,Y.Sm)(this._delegate,Qe)}catch(Xt){throw ce(Xt,"setDoc()","DocumentReference.set()")}}update(Qe,ut,...Xt){try{return 1===arguments.length?(0,Y.gD)(this._delegate,Qe):(0,Y.gD)(this._delegate,Qe,ut,...Xt)}catch(wn){throw ce(wn,"updateDoc()","DocumentReference.update()")}}delete(){return(0,Y.oh)(this._delegate)}onSnapshot(...Qe){const ut=K(Qe),Xt=_e(Qe,wn=>new Pe(this.firestore,new Y.E3(this.firestore._delegate,this._userDataWriter,wn._key,wn._document,wn.metadata,this._delegate.converter)));return(0,Y.ag)(this._delegate,ut,Xt)}get(Qe){let ut;return ut="cache"===Qe?.source?(0,Y.yS)(this._delegate):"server"===Qe?.source?(0,Y.cb)(this._delegate):(0,Y.i4)(this._delegate),ut.then(Xt=>new Pe(this.firestore,new Y.E3(this.firestore._delegate,this._userDataWriter,Xt._key,Xt._document,Xt.metadata,this._delegate.converter)))}withConverter(Qe){return new se(this.firestore,this._delegate.withConverter(Qe?ue.getInstance(this.firestore,Qe):null))}}function ce(sn,Qe,ut){return sn.message=sn.message.replace(Qe,ut),sn}function K(sn){for(const Qe of sn)if("object"==typeof Qe&&!j(Qe))return Qe;return{}}function _e(sn,Qe){var ut,Xt;let wn;return wn=j(sn[0])?sn[0]:j(sn[1])?sn[1]:"function"==typeof sn[0]?{next:sn[0],error:sn[1],complete:sn[2]}:{next:sn[1],error:sn[2],complete:sn[3]},{next:dr=>
1{wn.next&&wn.next(Qe(dr))},error:null===(ut=wn.error)||void 0===ut?void 0:ut.bind(wn),complete:null===(Xt=wn.complete)||void 0===Xt?void 0:Xt.bind(wn)}}class Pe{constructor(Qe,ut){this._firestore=Qe,this._delegate=ut}get ref(){return new se(this._firestore,this._delegate.ref)}get id(){return this._delegate.id}get metadata(){return this._delegate.metadata}get exists(){return this._delegate.exists()}data(Qe){return this._delegate.data(Qe)}get(Qe,ut){return this._delegate.get(Qe,ut)}isEqual(Qe){return(0,Y.iW)(this._delegate,Qe._delegate)}}class De extends Pe{data(Qe){const ut=this._delegate.data(Qe);return this._delegate._converter||(0,Y.K4)(void 0!==ut,"Document in a QueryDocumentSnapshot should exist"),ut}}class ke{constructor(Qe,ut){this.firestore=Qe,this._delegate=ut,this._userDataWriter=new We(Qe)}where(Qe,ut,Xt){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.A9)(Qe,ut,Xt)))}catch(wn){throw ce(wn,/(orderBy|where)\(\)/,"Query.$1()")}}orderBy(Qe,ut){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.k$)(Qe,ut)))}catch(Xt){throw ce(Xt,/(orderBy|where)\(\)/,"Query.$1()")}}limit(Qe){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.Yf)(Qe)))}catch(ut){throw ce(ut,"limit()","Query.limit()")}}limitToLast(Qe){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y._6)(Qe)))}catch(ut){throw ce(ut,"limitToLast()","Query.limitToLast()")}}startAt(...Qe){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.kf)(...Qe)))}catch(ut){throw ce(ut,"startAt()","Query.startAt()")}}startAfter(...Qe){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.SQ)(...Qe)))}catch(ut){throw ce(ut,"startAfter()","Query.startAfter()")}}endBefore(...Qe){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.Ar)(...Qe)))}catch(ut){throw ce(ut,"endBefore()","Query.endBefore()")}}endAt(...Qe){try{return new ke(this.firestore,(0,Y.kt)(this._delegate,(0,Y.eg)(...Qe)))}catch(ut){throw ce(ut,"endAt()","Query.endAt()")}}isEqual(Qe){return(0,Y.C)(this._delegate,Qe._delegate)}get(Qe){let ut;return ut="cache"===Qe?.source?(0,Y.MP)(this._delegate):"server"===Qe?.source?(0,Y.aC)(this._delegate):(0,Y.uY)(this._delegate),ut.then(Xt=>new Dt(this.firestore,new Y.uI(this.firestore._delegate,this._userDataWriter,this._delegate,Xt._snapshot)))}onSnapshot(...Qe){const ut=K(Qe),Xt=_e(Qe,wn=>new Dt(this.firestore,new Y.uI(this.firestore._delegate,this._userDataWriter,this._delegate,wn._snapshot)));return(0,Y.ag)(this._delegate,ut,Xt)}withConverter(Qe){return new ke(this.firestore,this._delegate.withConverter(Qe?ue.getInstance(this.firestore,Qe):null))}}class Lt{constructor(Qe,ut){this._firestore=Qe,this._delegate=ut}get type(){return this._delegate.type}get doc(){return new De(this._firestore,this._delegate.doc)}get oldIndex(){return this._delegate.oldIndex}get newIndex(){return this._delegate.newIndex}}class Dt{constructor(Qe,ut){this._firestore=Qe,this._delegate=ut}get query(){return new ke(this._firestore,this._delegate.query)}get metadata(){return this._delegate.metadata}get size(){return this._delegate.size}get empty(){return this._delegate.empty}get docs(){return this._delegate.docs.map(Qe=>new De(this._firestore,Qe))}docChanges(Qe){return this._delegate.docChanges(Qe).map(ut=>new Lt(this._firestore,ut))}forEach(Qe,ut){this._delegate.forEach(Xt=>{Qe.call(ut,new De(this._firestore,Xt))})}isEqual(Qe){return(0,Y.iW)(this._delegate,Qe._delegate)}}class He extends ke{constructor(Qe,ut){super(Qe,ut),this.firestore=Qe,this._delegate=ut}get id(){return this._delegate.id}get path(){return this._delegate.path}get parent(){const Qe=this._delegate.parent;return Qe?new se(this.firestore,Qe):null}doc(Qe){try{return new se(this.firestore,void 0===Qe?(0,Y.UN)(this._delegate):(0,Y.UN)(this._delegate,Qe))}catch(ut){throw ce(ut,"doc()","CollectionReference.doc()")}}add(Qe){return(0,Y.sB)(this._delegate,Qe).then(ut=>new se(this.firestore,ut))}isEqual(Qe){return(0,Y.G6)(this._delegate,Qe._delegate)}withConverter(Qe){return new He(this.firestore,this._delegate.withConverter(Qe?ue.getInstance(this.firestore,Qe):null))}}function ge(sn){return(0,Y.YX)(sn,Y.YD)}class xt{constructor(...Qe){this._delegate=new Y.UD(...Qe)}static documentId(){return new xt(Y.gH.keyField().canonicalString())}isEqual(Qe){return(Qe=(0,Se.Yj)(Qe))instanceof Y.UD&&this._delegate._internalPath.isEqual(Qe._internalPath)}}class pt{constructor(Qe){this._delegate=Qe}static serverTimestamp(){const Qe=(0,Y.S)();return Qe._methodName="FieldValue.serverTimestamp",new pt(Qe)}static delete(){const Qe=(0,Y.cr)();return Qe._methodName="FieldValue.delete",new pt(Qe)}static arrayUnion(...Qe){const ut=(0,Y.cT)(...Qe);return ut._methodName="FieldValue.arrayUnion",new pt(ut)}static arrayRemove(...Qe){const ut=(0,Y.AX)(...Qe);return ut._methodName="FieldValue.arrayRemove",new pt(ut)}static increment(Qe){const ut=(0,Y.AF)(Qe);return ut._methodName="FieldValue.increment",new pt(ut)}isEqual(Qe){return this._delegate.isEqual(Qe._delegate)}}const rn={Firestore:W,GeoPoint:Y.Ez,Timestamp:Y.kR,Blob:H,Transaction:Ut,WriteBatch:it,DocumentReference:se,DocumentSnapshot:Pe,Query:ke,QueryDocumentSnapshot:De,QuerySnapsh
1ot:Dt,CollectionReference:He,FieldPath:xt,FieldValue:pt,setLogLevel:function At(sn){(0,Y.QN)(sn)},CACHE_SIZE_UNLIMITED:Y.Om};!function mn(sn){(function cn(sn,Qe){sn.INTERNAL.registerComponent(new Ye.Yl("firestore-compat",ut=>{const Xt=ut.getProvider("app-compat").getImmediate(),wn=ut.getProvider("firestore").getImmediate();return Qe(Xt,wn)},"PUBLIC").setServiceProps(Object.assign({},rn)))})(sn,(Qe,ut)=>new W(Qe,ut,new Le)),sn.registerVersion("@firebase/firestore-compat","0.3.27")}(de.c);var dt=a(49252);function rt(sn,Qe){return function lt(sn,Qe=P.M){return new S._(ut=>{let Xt;return null!=Qe?Qe.schedule(()=>{Xt=sn.onSnapshot({includeMetadataChanges:!0},ut)}):Xt=sn.onSnapshot({includeMetadataChanges:!0},ut),()=>{Xt?.()}})}(sn,Qe)}function an(sn,Qe){return rt(sn,Qe).pipe((0,ee.k)(ut=>({payload:ut,type:"query"})))}class Yn{ref;afs;constructor(Qe,ut){this.ref=Qe,this.afs=ut}set(Qe,ut){return this.ref.set(Qe,ut)}update(Qe){return this.ref.update(Qe)}delete(){return this.ref.delete()}collection(Qe,ut){const Xt=this.ref.collection(Qe),{ref:wn,query:dr}=sr(Xt,ut);return new Vr(wn,dr,this.afs)}snapshotChanges(){return function kt(sn,Qe){return rt(sn,Qe).pipe((0,x.W)(void 0),(0,D.c)(),(0,ee.k)(ut=>{const[Xt,wn]=ut;return wn.exists?Xt?.exists?{payload:wn,type:"modified"}:{payload:wn,type:"added"}:{payload:wn,type:"removed"}}))}(this.ref,this.afs.schedulers.outsideAngular).pipe(b.wH)}valueChanges(Qe={}){return this.snapshotChanges().pipe((0,ee.k)(({payload:ut})=>Qe.idField?{...ut.data(),[Qe.idField]:ut.id}:ut.data()))}get(Qe){return(0,R.Q)(this.ref.get(Qe)).pipe(b.wH)}}function bn(sn,Qe){return an(sn,Qe).pipe((0,x.W)(void 0),(0,D.c)(),(0,ee.k)(ut=>{const[Xt,wn]=ut,dr=wn.payload.docChanges(),vn=dr.map(jt=>({type:jt.type,payload:jt}));return Xt&&JSON.stringify(Xt.payload.metadata)!==JSON.stringify(wn.payload.metadata)&&wn.payload.docs.forEach((jt,Ct)=>{const Mt=dr.find(et=>et.doc.ref.isEqual(jt.ref)),Ze=Xt?.payload.docs.find(et=>et.ref.isEqual(jt.ref));Mt&&JSON.stringify(Mt.doc.metadata)===JSON.stringify(jt.metadata)||!Mt&&Ze&&JSON.stringify(Ze.metadata)===JSON.stringify(jt.metadata)||vn.push({type:"modified",payload:{oldIndex:Ct,newIndex:Ct,type:"modified",doc:jt}})}),vn}))}function Hn(sn,Qe,ut){return bn(sn,ut).pipe((0,te.K)((Xt,wn)=>function Fn(sn,Qe,ut){return Qe.forEach(Xt=>{ut.indexOf(Xt.type)>-1&&(sn=function gr(sn,Qe){switch(Qe.type){case"added":if(!sn[Qe.newIndex]||!sn[Qe.newIndex].doc.ref.isEqual(Qe.doc.ref))return On(sn,Qe.newIndex,0,Qe);break;case"modified":if(null==sn[Qe.oldIndex]||sn[Qe.oldIndex].doc.ref.isEqual(Qe.doc.ref)){if(Qe.oldIndex!==Qe.newIndex){const ut=sn.slice();return ut.splice(Qe.oldIndex,1),ut.splice(Qe.newIndex,0,Qe),ut}return On(sn,Qe.newIndex,1,Qe)}break;case"removed":if(sn[Qe.oldIndex]&&sn[Qe.oldIndex].doc.ref.isEqual(Qe.doc.ref))return On(sn,Qe.oldIndex,1)}return sn}(sn,Xt))}),sn}(Xt,wn.map(dr=>dr.payload),Qe),[]),(0,J.a)(),(0,ee.k)(Xt=>Xt.map(wn=>({type:wn.type,payload:wn}))))}function On(sn,Qe,ut,...Xt){const wn=sn.slice();return wn.splice(Qe,ut,...Xt),wn}function Mr(sn){return(!sn||0===sn.length)&&(sn=["added","removed","modified"]),sn}class Vr{ref;query;afs;constructor(Qe,ut,Xt){this.ref=Qe,this.query=ut,this.afs=Xt}stateChanges(Qe){let ut=bn(this.query,this.afs.schedulers.outsideAngular);return Qe&&Qe.length>0&&(ut=ut.pipe((0,ee.k)(Xt=>Xt.filter(wn=>Qe.indexOf(wn.type)>-1)))),ut.pipe((0,x.W)(void 0),(0,D.c)(),(0,Q.I)(([Xt,wn])=>wn.length>0||!Xt),(0,ee.k)(([,Xt])=>Xt),b.wH)}auditTrail(Qe){return this.stateChanges(Qe).pipe((0,te.K)((ut,Xt)=>[...ut,...Xt],[]))}snapshotChanges(Qe){const ut=Mr(Qe);return Hn(this.query,ut,this.afs.schedulers.outsideAngular).pipe(b.wH)}valueChanges(Qe={}){return an(this.query,this.afs.schedulers.outsideAngular).pipe((0,ee.k)(ut=>ut.payload.docs.map(Xt=>Qe.idField?{...Xt.data(),[Qe.idField]:Xt.id}:Xt.data())),b.wH)}get(Qe){return(0,R.Q)(this.query.get(Qe)).pipe(b.wH)}add(Qe){return this.ref.add(Qe)}doc(Qe){return new Yn(this.ref.doc(Qe),this.afs)}}class Fr{query;afs;constructor(Qe,ut){this.query=Qe,this.afs=ut}stateChanges(Qe){return Qe&&0!==Qe.length?bn(this.query,this.afs.schedulers.outsideAngular).pipe((0,ee.k)(ut=>ut.filter(Xt=>Qe.indexOf(Xt.type)>-1)),(0,Q.I)(ut=>ut.length>0),b.wH):bn(this.query,this.afs.schedulers.outsideAngular).pipe(b.wH)}
1auditTrail(Qe){return this.stateChanges(Qe).pipe((0,te.K)((ut,Xt)=>[...ut,...Xt],[]))}snapshotChanges(Qe){const ut=Mr(Qe);return Hn(this.query,ut,this.afs.schedulers.outsideAngular).pipe(b.wH)}valueChanges(Qe={}){return an(this.query,this.afs.schedulers.outsideAngular).pipe((0,ee.k)(Xt=>Xt.payload.docs.map(wn=>Qe.idField?{[Qe.idField]:wn.id,...wn.data()}:wn.data())),b.wH)}get(Qe){return(0,R.Q)(this.query.get(Qe)).pipe(b.wH)}}const ti=new v.UbH("angularfire2.enableFirestorePersistence"),Nr=new v.UbH("angularfire2.firestore.persistenceSettings"),Kr=new v.UbH("angularfire2.firestore.settings"),Jr=new v.UbH("angularfire2.firestore.use-emulator");function sr(sn,Qe=(ut=>ut)){return{query:Qe(sn),ref:sn}}let or=(()=>{class sn{schedulers;firestore;persistenceEnabled$;constructor(ut,Xt,wn,dr,vn,jt,Ct,Mt,Ze,et,Zt,Fe,ft,dn,Tn,Bn,mr){this.schedulers=Ct;const tr=(0,_._G)(ut,jt,Xt),Ir=Ze;et&&(0,C.CU)(tr,jt,Zt,ft,dn,Tn,Fe,Bn),[this.firestore,this.persistenceEnabled$]=(0,_.PQ)(`${tr.name}.firestore`,"AngularFirestore",tr.name,()=>{const ur=jt.runOutsideAngular(()=>tr.firestore());if(dr&&ur.settings(dr),Ir&&ur.useEmulator(...Ir),wn&&!(0,i.uf)(vn)){const Er=()=>{try{return(0,R.Q)(ur.enablePersistence(Mt||void 0).then(()=>!0,()=>!1))}catch(Ai){return typeof console<"u"&&console.warn(Ai),(0,k.of)(!1)}};return[ur,jt.runOutsideAngular(Er)]}return[ur,(0,k.of)(!1)]},[dr,Ir,wn])}collection(ut,Xt){let wn;wn="string"==typeof ut?this.firestore.collection(ut):ut;const{ref:dr,query:vn}=sr(wn,Xt),jt=this.schedulers.ngZone.run(()=>dr);return new Vr(jt,vn,this)}collectionGroup(ut,Xt){const wn=Xt||(vn=>vn),dr=this.firestore.collectionGroup(ut);return new Fr(wn(dr),this)}doc(ut){let Xt;Xt="string"==typeof ut?this.firestore.doc(ut):ut;const wn=this.schedulers.ngZone.run(()=>Xt);return new Yn(wn,this)}createId(){return this.firestore.collection("_").doc().id}static \u0275fac=function(Xt){return new(Xt||sn)(v.CoB(_.E9),v.CoB(_.Ml,8),v.CoB(ti,8),v.CoB(Kr,8),v.CoB(v.AHE),v.CoB(v.WW2),v.CoB(b.u),v.CoB(Nr,8),v.CoB(Jr,8),v.CoB(C._o,8),v.CoB(C.GW,8),v.CoB(C.mq,8),v.CoB(C.ox,8),v.CoB(C.cd,8),v.CoB(C._8,8),v.CoB(C.Ev,8),v.CoB(b.gJ,8))};static \u0275prov=v.wxM({token:sn,factory:sn.\u0275fac,providedIn:"any"})}return sn})(),zr=(()=>{class sn{constructor(){dt.c.registerVersion("angularfire",b.j1.full,"fst-compat")}static enablePersistence(ut){return{ngModule:sn,providers:[{provide:ti,useValue:!0},{provide:Nr,useValue:ut}]}}static \u0275fac=function(Xt){return new(Xt||sn)};static \u0275mod=v.a4G({type:sn});static \u0275inj=v.s3X({providers:[or]})}return sn})()},56e3:(B,G,a)=>{"use strict";a.d(G,{E9:()=>R,Ml:()=>k,PQ:()=>J,UN:()=>te,_G:()=>x,_w:()=>C,rh:()=>P});var i=a(32116),v=a(17900),b=a(49252);const _=["ngOnDestroy"],C=(Y,Se,Ye,pe={})=>new Proxy(Y,{get:(ae,Ve)=>Ye.runOutsideAngular(()=>{if(Y[Ve])return pe?.spy?.get&&pe.spy.get(Ve,Y[Ve]),Y[Ve];if(_.indexOf(Ve)>-1)return()=>{};const Ne=Se.toPromise().then(Ie=>{const H=Ie?.[Ve];return"function"==typeof H?H.bind(Ie):H?.then?H.then(j=>Ye.run(()=>j)):Ye.run(()=>H)});return new Proxy(()=>{},{get:(Ie,H)=>Ne[H],apply:(Ie,H,j)=>Ne.then(ye=>{const Le=ye?.(...j);return pe?.spy?.apply&&pe.spy.apply(Ve,j,Le),Le})})})}),P=(Y,Se)=>{Se.forEach(Ye=>{Object.getOwnPropertyNames(Ye.prototype||Ye).forEach(pe=>{Object.defineProperty(Y.prototype,pe,Object.getOwnPropertyDescriptor(Ye.prototype||Ye,pe))})})};class S{constructor(Se){return Se}}const R=new i.UbH("angularfire2.app.options"),k=new i.UbH("angularfire2.app.name");function x(Y,Se,Ye){const ae="object"==typeof Ye&&Ye||{};ae.name=ae.name||"string"==typeof Ye&&Ye||"[DEFAULT]";const Ne=b.c.apps.filter(Ie=>Ie&&Ie.name===ae.name)[0]||Se.runOutsideAngular(()=>b.c.initializeApp(Y,ae));try{if(JSON.stringify(Y)!==JSON.stringify(Ne.options)){const Ie=!!module.hot;D("error",`${Ne.name} Firebase App already initialized with different options${Ie?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new S(Ne)}const D=(Y,...Se)=>{(0,i.sPQ)()&&typeof console<"u"&&console[Y](...Se)},ee={provide:S,useFactory:x,deps:[R,i.WW2,[new i.T7N,k]]};let te=(()=>{class Y{static initializeApp(Ye,pe){return{ngModule:Y,providers:[{provide:R,useValue:Ye},{provide:k,useValue:pe}]}}constructor(Ye){b.c.registerVersion("angularfire",v.j1.full,"core"),b.c.registerVersion("angularfire",v.j1.full,"app-compat"),b.c.registerVersion("angular",i.j1C.full,Ye.toString())}static \u0275fac=function(pe){return new(pe||Y)(i.CoB(i.AHE))};static \u0275mod=i.a4G({type:Y});static \u0275inj=i.s3X({providers:[ee]})}return Y})();function J(Y,Se,Ye,pe,ae){const[,Ve,Ne]=globalThis.\u0275AngularfireInstanceCache.find(Ie=>Ie[0]===Y)||[];if(Ve)return function Q(Y,Se){try{return Y.toString()===Se.toString()}catch{return Y===Se}}(ae,Ne)||(de("error",`${Se} was already initialized on the ${Ye} Firebase App with different settings.${we?" You may need to reload as Firebase is not HMR aware.":""}`),de("warn",{is:ae,was:Ne})),Ve;{const Ie=pe();return globalThis.\u0275AngularfireInstanceCache.push([Y,Ie,ae]),Ie}}const we=typeof module<"u"&&!!module.hot,de=(Y,...Se)=>{(0,i.sPQ)()&&typeof console<"u"&&console[Y](...Se)};globalThis.\u0275AngularfireInstanceCache||=[]},17900:(B,G,a)=>{"use strict";a.d(G,{j1:()=>Q,wH:()=>W,u:()=>Ne,gJ:()=>Se});var i=a(32116),v=a(99360);(0,v.registerVersion)("firebase","10.9.0","app");var C=a(1364),S=a(9816);const k=new class R extends S.k{}(class P extends C.m{constructor(ue,se){super(ue,se),this.scheduler
1=ue,this.work=se}schedule(ue,se=0){return se>0?super.schedule(ue,se):(this.delay=se,this.state=ue,this.scheduler.flush(this),this)}execute(ue,se){return se>0||this.closed?super.execute(ue,se):this._execute(ue,se)}requestAsyncId(ue,se,ce=0){return null!=ce&&ce>0||null==ce&&this.delay>0?super.requestAsyncId(ue,se,ce):(ue.flush(this),0)}});var D=a(112),ee=a(19212),te=a(92924),J=a(93920);const Q=new i.a8Z("ANGULARFIRE2_VERSION");class Se{constructor(){return((it,ue)=>{const se=(0,v.getApps)(),ce=[];return se.forEach(K=>{K.container.getProvider(it).instances.forEach(Pe=>{ce.includes(Pe)||ce.push(Pe)})}),ce})(Ye)}}const Ye="app-check";function pe(){}class ae{zone;delegate;constructor(ue,se=k){this.zone=ue,this.delegate=se}now(){return this.delegate.now()}schedule(ue,se,ce){const K=this.zone;return this.delegate.schedule(function(Pe){K.runGuarded(()=>{ue.apply(this,[Pe])})},se,ce)}}class Ve{zone;task=null;constructor(ue){this.zone=ue}call(ue,se){const ce=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",pe,{},pe,pe)),se.pipe((0,ee.y)({next:ce,complete:ce,error:ce})).subscribe(ue).add(ce)}unscheduleTask(){setTimeout(()=>{null!=this.task&&"scheduled"===this.task.state&&(this.task.invoke(),this.task=null)},10)}}let Ne=(()=>{class it{ngZone;outsideAngular;insideAngular;constructor(se){this.ngZone=se,this.outsideAngular=se.runOutsideAngular(()=>new ae(Zone.current)),this.insideAngular=se.run(()=>new ae(Zone.current,D.M)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(ce){return new(ce||it)(i.CoB(i.WW2))};static \u0275prov=i.wxM({token:it,factory:it.\u0275fac,providedIn:"root"})}return it})();function W(it){return function We(it){return function(se){return(se=se.lift(new Ve(it.ngZone))).pipe((0,te.y)(it.outsideAngular),(0,J.y)(it.insideAngular))}}(function Ie(){const it=globalThis.\u0275AngularFireScheduler;if(!it)throw new Error("Either AngularFireModule has not been provided in your Ap
1pModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).");return it}())(it)}},44716:(B,G,a)=>{"use strict";a.d(G,{ot:()=>pe,Gc:()=>Et,im:()=>Qn,Wo:()=>Wt,uW:()=>Ee,y:()=>fi,Mj:()=>ar,_t:()=>Je,El:()=>Gn,Gu:()=>oe,WM:()=>Ne,Y6:()=>Q,eq:()=>an,ue:()=>Fn,u:()=>On,SC:()=>br,_G:()=>zt,wd:()=>Rr,E1:()=>zi,sl:()=>Fi,eJ:()=>Ce,GC:()=>Xn,AQ:()=>j,sz:()=>en,GO:()=>Ns});var i=a(32116),v=a(91368),b=a(19900),_=a(53252),C=a(64300),P=a(50560),S=a(46624),R=a(87773),k=a(74187),x=a(67904),ee=a(54704);let te=(()=>{class Ge{constructor(he,Ft){this._renderer=he,this._elementRef=Ft,this.onChange=Un=>{},this.onTouched=()=>{}}setProperty(he,Ft){this._renderer.setProperty(this._elementRef.nativeElement,he,Ft)}registerOnTouched(he){this.onTouched=he}registerOnChange(he){this.onChange=he}setDisabledState(he){this.setProperty("disabled",he)}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(i.q87),i.GI1(i.GMv))};static#t=this.\u0275dir=i.Sc5({type:Ge})}return Ge})(),J=(()=>{class Ge extends te{static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,features:[i.eg9]})}return Ge})();const Q=new i.UbH(""),Y={provide:Q,useExisting:(0,i.wd)(()=>pe),multi:!0},Ye=new i.UbH("");let pe=(()=>{class Ge extends te{constructor(he,Ft,Un){super(he,Ft),this._compositionMode=Un,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Se(){const Ge=(0,v.uy)()?(0,v.uy)().getUserAgent():"";return/android (\d+)/.test(Ge.toLowerCase())}())}writeValue(he){this.setProperty("value",he??"")}_handleInput(he){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(he)}_compositionStart(){this._composing=!0}_compositionEnd(he){this._composing=!1,this._compositionMode&&this.onChange(he)}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(i.q87),i.GI1(i.GMv),i.GI1(Ye,8))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(Ft,Un){1&Ft&&i.qCj("input",function(Ti){return Un._handleInput(Ti.target.value)})("blur",function(){return Un.onTouched()})("compositionstart",function(){return Un._compositionStart()})("compositionend",function(Ti){return Un._compositionEnd(Ti.target.value)})},features:[i.M5G([Y]),i.eg9]})}return Ge})();function ae(Ge){return null==Ge||("string"==typeof Ge||Array.isArray(Ge))&&0===Ge.length}function Ve(Ge){return null!=Ge&&"number"==typeof Ge.length}const Ne=new i.UbH(""),Ie=new i.UbH(""),H=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class j{static min(ze){return ye(ze)}static max(ze){return Le(ze)}static required(ze){return W(ze)}static requiredTrue(ze){return function We(Ge){return!0===Ge.value?null:{required:!0}}(ze)}static email(ze){return At(ze)}static minLength(ze){return Ut(ze)}static maxLength(ze){return it(ze)}static pattern(ze){return ue(ze)}static nullValidator(ze){return null}static compose(ze){return Lt(ze)}static composeAsync(ze){return He(ze)}}function ye(Ge){return ze=>{if(ae(ze.value)||ae(Ge))return null;const he=parseFloat(ze.value);return!isNaN(he)&&he<Ge?{min:{min:Ge,actual:ze.value}}:null}}function Le(Ge){return ze=>{if(ae(ze.value)||ae(Ge))return null;const he=parseFloat(ze.value);return!isNaN(he)&&he>Ge?{max:{max:Ge,actual:ze.value}}:null}}function W(Ge){return ae(Ge.value)?{required:!0}:null}function At(Ge){return ae(Ge.value)||H.test(Ge.value)?null:{email:!0}}function Ut(Ge){return ze=>ae(ze.value)||!Ve(ze.value)?null:ze.value.length<Ge?{minlength:{requiredLength:Ge,actualLength:ze.value.length}}:null}function it(Ge){return ze=>Ve(ze.value)&&ze.value.length>Ge?{maxlength:{requiredLength:Ge,actualLength:ze.value.length}}:null}function ue(Ge){if(!Ge)return se;let ze,he;return"string"==typeof Ge?(he="","^"!==Ge.charAt(0)&&(he+="^"),he+=Ge,"$"!==Ge.charAt(Ge.length-1)&&(he+="$"),ze=new RegExp(he)):(he=Ge.toString(),ze=Ge),Ft=>{if(ae(Ft.value))return null;const Un=Ft.value;return ze.test(Un)?null:{pattern:{requiredPattern:he,actualValue:Un}}}}function se(Ge){return null}function ce(Ge){return null!=Ge}function K(Ge){return(0,i.w5$)(Ge)?(0,b.Q)(Ge):Ge}function _e(Ge){let ze={};return Ge.forEach(he=>{ze=null!=he?{...ze,...he}:ze}),0===Object.keys(ze).length?null:ze}function Pe(Ge,ze){return ze.map(he=>he(Ge))}function ke(Ge){return Ge.map(ze=>function De(Ge){return!Ge.validate}(ze)?ze:he=>ze.validate(he))}function Lt(Ge){if(!Ge)return null;const ze=Ge.filter(ce);return 0==ze.length?null:function(he){return _e(Pe(he,ze))}}function Dt(Ge){return null!=Ge?Lt(ke(Ge)):null}function He(Ge){if(!Ge)return null;const ze=Ge.filter(ce);return 0==ze.length?null:function(he){return function D(...Ge){const ze=(0,S.yu)(Ge),{args:he,ke
1ys:Ft}=(0,C.Q)(Ge),Un=new _._(bi=>{const{length:Ti}=he;if(!Ti)return void bi.complete();const us=new Array(Ti);let Ms=Ti,ks=Ti;for(let Us=0;Us<Ti;Us++){let as=!1;(0,P.Uv)(he[Us]).subscribe((0,R.e)(bi,vo=>{as||(as=!0,ks--),us[Us]=vo},()=>Ms--,void 0,()=>{(!Ms||!as)&&(ks||bi.next(Ft?(0,x.q)(Ft,us):us),bi.complete())}))}});return ze?Un.pipe((0,k.j)(ze)):Un}(Pe(he,ze).map(K)).pipe((0,ee.k)(_e))}}function ge(Ge){return null!=Ge?He(ke(Ge)):null}function xt(Ge,ze){return null===Ge?[ze]:Array.isArray(Ge)?[...Ge,ze]:[Ge,ze]}function pt(Ge){return Ge._rawValidators}function rn(Ge){return Ge._rawAsyncValidators}function cn(Ge){return Ge?Array.isArray(Ge)?Ge:[Ge]:[]}function mn(Ge,ze){return Array.isArray(Ge)?Ge.includes(ze):Ge===ze}function dt(Ge,ze){const he=cn(ze);return cn(Ge).forEach(Un=>{mn(he,Un)||he.push(Un)}),he}function lt(Ge,ze){return cn(ze).filter(he=>!mn(Ge,he))}class rt{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(ze){this._rawValidators=ze||[],this._composedValidatorFn=Dt(this._rawValidators)}_setAsyncValidators(ze){this._rawAsyncValidators=ze||[],this._composedAsyncValidatorFn=ge(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(ze){this._onDestroyCallbacks.push(ze)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(ze=>ze()),this._onDestroyCallbacks=[]}reset(ze=void 0){this.control&&this.control.reset(ze)}hasError(ze,he){return!!this.control&&this.control.hasError(ze,he)}getError(ze,he){return this.control?this.control.getError(ze,he):null}}class kt extends rt{get formDirective(){return null}get path(){return null}}class an extends rt{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Yn{constructor(ze){this._cd=ze}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Fn=(()=>{class Ge extends Yn{constructor(he){super(he)}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(an,2))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(Ft,Un){2&Ft&&i.eAK("ng-untouched",Un.isUntouched)("ng-touched",Un.isTouched)("ng-pristine",Un.isPristine)("ng-dirty",Un.isDirty)("ng-valid",Un.isValid)("ng-invalid",Un.isInvalid)("ng-pending",Un.isPending)},features:[i.eg9]})}return Ge})(),On=(()=>{class Ge extends Yn{constructor(he){super(he)}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(kt,10))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(Ft,Un){2&Ft&&i.eAK("ng-untouched",Un.isUntouched)("ng-touched",Un.isTouched)("ng-pristine",Un.isPristine)("ng-dirty",Un.isDirty)("ng-valid",Un.isValid)("ng-invalid",Un.isInvalid)("ng-pending",Un.isPending)("ng-submitted",Un.isSubmitted)},features:[i.eg9]})}return Ge})();const vn="VALID",jt="INVALID",Ct="PENDING",Mt="DISABLED";function Ze(Ge){return(ft(Ge)?Ge.validators:Ge)||null}function Zt(Ge,ze){return(ft(ze)?ze.asyncValidators:Ge)||null}function ft(Ge){return null!=Ge&&!Array.isArray(Ge)&&"object"==typeof Ge}function dn(Ge,ze,he){const Ft=Ge.controls;if(!(ze?Object.keys(Ft):Ft).length)throw new i.OBp(1e3,"");if(!Ft[he])throw new i.OBp(1001,"")}function Tn(Ge,ze,he){Ge._forEachChild((Ft,Un)=>
vendor: 5,895 bytes, line 1
1{if(void 0===he[Un])throw new i.OBp(1002,"")})}class Bn{constructor(ze,he){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(ze),this._assignAsyncValidators(he)}get validator(){return this._composedValidatorFn}set validator(ze){this._rawValidators=this._composedValidatorFn=ze}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(ze){this._rawAsyncValidators=this._composedAsyncValidatorFn=ze}get parent(){return this._parent}get valid(){return this.status===vn}get invalid(){return this.status===jt}get pending(){return this.status==Ct}get disabled(){return this.status===Mt}get enabled(){return this.status!==Mt}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(ze){this._assignValidators(ze)}setAsyncValidators(ze){this._assignAsyncValidators(ze)}addValidators(ze){this.setValidators(dt(ze,this._rawValidators))}addAsyncValidators(ze){this.setAsyncValidators(dt(ze,this._rawAsyncValidators))}removeValidators(ze){this.setValidators(lt(ze,this._rawValidators))}removeAsyncValidators(ze){this.setAsyncValidators(lt(ze,this._rawAsyncValidators))}hasValidator(ze){return mn(this._rawValidators,ze)}hasAsyncValidator(ze){return mn(this._rawAsyncValidators,ze)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(ze={}){this.touched=!0,this._parent&&!ze.onlySelf&&this._parent.markAsTouched(ze)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(ze=>ze.markAllAsTouched())}markAsUntouched(ze={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(he=>{he.markAsUntouched({onlySelf:!0})}),this._parent&&!ze.onlySelf&&this._parent._updateTouched(ze)}markAsDirty(ze={}){this.pristine=!1,this._parent&&!ze.onlySelf&&this._parent.markAsDirty(ze)}markAsPristine(ze={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(he=>{he.markAsPristine({onlySelf:!0})}),this._parent&&!ze.onlySelf&&this._parent._updatePristine(ze)}markAsPending(ze={}){this.status=Ct,!1!==ze.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!ze.onlySelf&&this._parent.markAsPending(ze)}disable(ze={}){const he=this._parentMarkedDirty(ze.onlySelf);this.status=Mt,this.errors=null,this._forEachChild(Ft=>{Ft.disable({...ze,onlySelf:!0})}),this._updateValue(),!1!==ze.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...ze,skipPristineCheck:he}),this._onDisabledChange.forEach(Ft=>Ft(!0))}enable(ze={}){const he=this._parentMarkedDirty(ze.onlySelf);this.status=vn,this._forEachChild(Ft=>{Ft.enable({...ze,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:ze.emitEvent}),this._updateAncestors({...ze,skipPristineCheck:he}),this._onDisabledChange.forEach(Ft=>Ft(!1))}_updateAncestors(ze){this._parent&&!ze.onlySelf&&(this._parent.updateValueAndValidity(ze),ze.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(ze){this._parent=ze}getRawValue(){return this.value}updateValueAndValidity(ze={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===vn||this.status===Ct)&&this._runAsyncValidator(ze.emitEvent)),!1!==ze.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!ze.onlySelf&&this._parent.updateValueAndValidity(ze)}_updateTreeValidity(ze={emitEvent:!0}){this._forEachChild(he=>he._updateTreeValidity(ze)),this.updateValueAndValidity({onlySelf:!0,emitEvent:ze.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Mt:vn}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(ze){if(this.asyncValidator){this.status=Ct,this._hasOwnPendingAsyncValidator=!0;const he=K(this.asyncValidator(this));this._asyncValidationSubscription=he.subscribe(Ft=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(Ft,{emitEvent:ze})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(ze,he={}){this.errors=ze,this._updateControlsErrors(!1!==he.emitEvent)}get(ze){let he=ze;return null==he||(Array.isArray(he)||(he=he.split(".")),0===he.length)?null:he.reduce((Ft,Un)=>Ft&&Ft._find(Un),this)}getError(ze,he){const Ft=he?this.get(he):this;return Ft&&Ft.errors?Ft.errors[ze]:null}hasError(ze,he){return!!this.getError(ze,he)}get root(){let ze=this;for(;ze._parent;)ze=ze._parent;return ze}_updateControlsErrors(ze){this.status=this._calculateStatus(),ze&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(ze)}_initObservables(){this.valueChanges=new i._w7,this.statusChanges=new i._w7}_calculateStatus(){return this._allControlsDisabled()?Mt:this.errors?jt:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ct)?Ct:this._anyControlsHaveStatus(jt)?jt:vn}_anyControlsHaveStatus(ze){return this._anyControls(he=>he.status===ze)}_anyControlsDirty(){return this._anyControls(ze=>ze.dirty)}_anyControlsTouched(){return this._anyControls(ze=>ze.touched)}_updatePristine(ze={}){this.pristine=!this._anyControlsDirty(),this._parent&&!ze.onlySelf&&this._parent._updatePristine(ze)}_updateTouched(ze={}){this.touched=this._anyControlsTouched(),this._parent&&!ze.onlySelf&&this._parent._updateTouched(ze)}_registerOnCollectionChange(ze){this._onCollectionChange=ze}_setUpdateStrategy(ze){ft(ze)&&null!=ze.updateOn&&(this._updateOn=ze.updateOn)}_parentMarkedDirty(ze){return!ze&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}
vendor: 6,763 bytes, line 1
1_find(ze){return null}_assignValidators(ze){this._rawValidators=Array.isArray(ze)?ze.slice():ze,this._composedValidatorFn=function et(Ge){return Array.isArray(Ge)?Dt(Ge):Ge||null}(this._rawValidators)}_assignAsyncValidators(ze){this._rawAsyncValidators=Array.isArray(ze)?ze.slice():ze,this._composedAsyncValidatorFn=function Fe(Ge){return Array.isArray(Ge)?ge(Ge):Ge||null}(this._rawAsyncValidators)}}class mr extends Bn{constructor(ze,he,Ft){super(Ze(he),Zt(Ft,he)),this.controls=ze,this._initObservables(),this._setUpdateStrategy(he),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(ze,he){return this.controls[ze]?this.controls[ze]:(this.controls[ze]=he,he.setParent(this),he._registerOnCollectionChange(this._onCollectionChange),he)}addControl(ze,he,Ft={}){this.registerControl(ze,he),this.updateValueAndValidity({emitEvent:Ft.emitEvent}),this._onCollectionChange()}removeControl(ze,he={}){this.controls[ze]&&this.controls[ze]._registerOnCollectionChange(()=>{}),delete this.controls[ze],this.updateValueAndValidity({emitEvent:he.emitEvent}),this._onCollectionChange()}setControl(ze,he,Ft={}){this.controls[ze]&&this.controls[ze]._registerOnCollectionChange(()=>{}),delete this.controls[ze],he&&this.registerControl(ze,he),this.updateValueAndValidity({emitEvent:Ft.emitEvent}),this._onCollectionChange()}contains(ze){return this.controls.hasOwnProperty(ze)&&this.controls[ze].enabled}setValue(ze,he={}){Tn(this,0,ze),Object.keys(ze).forEach(Ft=>{dn(this,!0,Ft),this.controls[Ft].setValue(ze[Ft],{onlySelf:!0,emitEvent:he.emitEvent})}),this.updateValueAndValidity(he)}patchValue(ze,he={}){null!=ze&&(Object.keys(ze).forEach(Ft=>{const Un=this.controls[Ft];Un&&Un.patchValue(ze[Ft],{onlySelf:!0,emitEvent:he.emitEvent})}),this.updateValueAndValidity(he))}reset(ze={},he={}){this._forEachChild((Ft,Un)=>{Ft.reset(ze?ze[Un]:null,{onlySelf:!0,emitEvent:he.emitEvent})}),this._updatePristine(he),this._updateTouched(he),this.updateValueAndValidity(he)}getRawValue(){return this._reduceChildren({},(ze,he,Ft)=>(ze[Ft]=he.getRawValue(),ze))}_syncPendingControls(){let ze=this._reduceChildren(!1,(he,Ft)=>!!Ft._syncPendingControls()||he);return ze&&this.updateValueAndValidity({onlySelf:!0}),ze}_forEachChild(ze){Object.keys(this.controls).forEach(he=>{const Ft=this.controls[he];Ft&&ze(Ft,he)})}_setUpControls(){this._forEachChild(ze=>{ze.setParent(this),ze._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(ze){for(const[he,Ft]of Object.entries(this.controls))if(this.contains(he)&&ze(Ft))return!0;return!1}_reduceValue(){return this._reduceChildren({},(he,Ft,Un)=>((Ft.enabled||this.disabled)&&(he[Un]=Ft.value),he))}_reduceChildren(ze,he){let Ft=ze;return this._forEachChild((Un,bi)=>{Ft=he(Ft,Un,bi)}),Ft}_allControlsDisabled(){for(const ze of Object.keys(this.controls))if(this.controls[ze].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(ze){return this.controls.hasOwnProperty(ze)?this.controls[ze]:null}}class Er extends mr{}const Di=new i.UbH("CallSetDisabledState",{providedIn:"root",factory:()=>Pi}),Pi="always";function nr(Ge,ze){return[...ze.path,Ge]}function Ht(Ge,ze,he=Pi){wr(Ge,ze),ze.valueAccessor.writeValue(Ge.value),(Ge.disabled||"always"===he)&&ze.valueAccessor.setDisabledState?.(Ge.disabled),function di(Ge,ze){ze.valueAccessor.registerOnChange(he=>{Ge._pendingValue=he,Ge._pendingChange=!0,Ge._pendingDirty=!0,"change"===Ge.updateOn&&Qt(Ge,ze)})}(Ge,ze),function _n(Ge,ze){const he=(Ft,Un)=>{ze.valueAccessor.writeValue(Ft),Un&&ze.viewToModelUpdate(Ft)};Ge.registerOnChange(he),ze._registerOnDestroy(()=>{Ge._unregisterOnChange(he)})}(Ge,ze),function Mi(Ge,ze){ze.valueAccessor.registerOnTouched(()=>{Ge._pendingTouched=!0,"blur"===Ge.updateOn&&Ge._pendingChange&&Qt(Ge,ze),"submit"!==Ge.updateOn&&Ge.markAsTouched()})}(Ge,ze),function jn(Ge,ze){if(ze.valueAccessor.setDisabledState){const he=Ft=>{ze.valueAccessor.setDisabledState(Ft)};Ge.registerOnDisabledChange(he),ze._registerOnDestroy(()=>{Ge._unregisterOnDisabledChange(he)})}}(Ge,ze)}function Wn(Ge,ze,he=!0){const Ft=()=>{};ze.valueAccessor&&(ze.valueAccessor.registerOnChange(Ft),ze.valueAccessor.registerOnTouched(Ft)),mi(Ge,ze),Ge&&(ze._invokeOnDestroyCallbacks(),Ge._registerOnCollectionChange(()=>{}))}function $n(Ge,ze){Ge.forEach(he=>{he.registerOnValidatorChange&&he.registerOnValidatorChange(ze)})}function wr(Ge,ze){const he=pt(Ge);null!==ze.validator?Ge.setValidators(xt(he,ze.validator)):"function"==typeof he&&Ge.setValidators([he]);const Ft=rn(Ge);null!==ze.asyncValidator?Ge.setAsyncValidators(xt(Ft,ze.asyncValidator)):"function"==typeof Ft&&Ge.setAsyncValidators([Ft]);const Un=()=>Ge.updateValueAndValidity();$n(ze._rawValidators,Un),$n(ze._rawAsyncValidators,Un)}function mi(Ge,ze){let he=!1;if(null!==Ge){if(null!==ze.validator){const Un=pt(Ge);if(Array.isArray(Un)&&Un.length>0){const bi=Un.filter(Ti=>Ti!==ze.validator);bi.length!==Un.length&&(he=!0,Ge.setValidators(bi))}}if(null!==ze.asyncValidator){const Un=rn(Ge);if(Array.isArray(Un)&&Un.length>0){const bi=Un.filter(Ti=>Ti!==ze.asyncValidator);bi.length!==Un.length&&(he=!0,Ge.setAsyncValidators(bi))}}}const Ft=()=>{};return $n(ze._rawValidators,Ft),$n(ze._rawAsyncValidators,Ft),he}function Qt(Ge,ze){Ge._pendingDirty&&Ge.markAsDirty(),Ge.setValue(Ge._pendingValue,{emitModelToViewChange:!1}),ze.viewToModelUpdate(Ge._pendingValue),Ge._pendingChange=!1}function Ln(Ge,ze){wr(Ge,ze)}function on(Ge,ze){if(!Ge.hasOwnProperty("model"))return!1;const he=Ge.model;return!!he.isFirstChange()||!Object.is(ze,he.currentValue)}function me(Ge,ze){Ge._syncPendingControls(),ze.forEach(he=>{const Ft=he.control;"submit"===Ft.updateOn&&Ft._pendingChange&&(he.viewToModelUpdate(Ft._pendingValue),Ft._pendingChange=!1)})}function Re(Ge,ze){if(!ze)return null;let he,Ft,Un;return Array.isArray(ze),ze.forEach(bi=>{bi.constructor===pe?he=bi:function le(Ge){return Object.getPrototypeOf(Ge.constructor)===J}(bi)?Ft=bi:Un=bi}),Un||Ft||he||null}const En={provide:kt,useExisting:(0,i.wd)(()=>br)},Mn=Promise.resolve();let br=(()=>{class Ge extends kt{constructor(he,Ft,Un){super(),this.callSetDisabledState=Un,this.submitted=!1,this._directives=new Set,this.ngSubmit=new i._w7,this.form=new mr({},Dt(he),ge(Ft))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(he){Mn.then(()=>{const Ft=this._findContainer(he.path);he.control=Ft.registerControl(he.name,he.control),Ht(he.control,he,this.callSetDisabledState),he.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(he)})}getControl(he){return this.form.get(he.path)}
1removeControl(he){Mn.then(()=>{const Ft=this._findContainer(he.path);Ft&&Ft.removeControl(he.name),this._directives.delete(he)})}addFormGroup(he){Mn.then(()=>{const Ft=this._findContainer(he.path),Un=new mr({});Ln(Un,he),Ft.registerControl(he.name,Un),Un.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(he){Mn.then(()=>{const Ft=this._findContainer(he.path);Ft&&Ft.removeControl(he.name)})}getFormGroup(he){return this.form.get(he.path)}updateModel(he,Ft){Mn.then(()=>{this.form.get(he.path).setValue(Ft)})}setValue(he){this.control.setValue(he)}onSubmit(he){return this.submitted=!0,me(this.form,this._directives),this.ngSubmit.emit(he),"dialog"===he?.target?.method}onReset(){this.resetForm()}resetForm(he=void 0){this.form.reset(he),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(he){return he.pop(),he.length?this.form.get(he):this.form}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(Ne,10),i.GI1(Ie,10),i.GI1(Di,8))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(Ft,Un){1&Ft&&i.qCj("submit",function(Ti){return Un.onSubmit(Ti)})("reset",function(){return Un.onReset()})},inputs:{options:[i.Wk5.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.M5G([En]),i.eg9]})}return Ge})();function Br(Ge,ze){const he=Ge.indexOf(ze);he>-1&&Ge.splice(he,1)}function jr(Ge){return"object"==typeof Ge&&null!==Ge&&2===Object.keys(Ge).length&&"value"in Ge&&"disabled"in Ge}const gn=class extends Bn{constructor(ze=null,he,Ft){super(Ze(he),Zt(Ft,he)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(ze),this._setUpdateStrategy(he),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ft(he)&&(he.nonNullable||he.initialValueIsDefault)&&(this.defaultValue=jr(ze)?ze.value:ze)}setValue(ze,he={}){this.value=this._pendingValue=ze,this._onChange.length&&!1!==he.emitModelToViewChange&&this._onChange.forEach(Ft=>Ft(this.value,!1!==he.emitViewToModelChange)),this.updateValueAndValidity(he)}patchValue(ze,he={}){this.setValue(ze,he)}reset(ze=this.defaultValue,he={}){this._applyFormState(ze),this.markAsPristine(he),this.markAsUntouched(he),this.setValue(this.value,he),this._pendingChange=!1}_updateValue(){}_anyControls(ze){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(ze){this._onChange.push(ze)}_unregisterOnChange(ze){Br(this._onChange,ze)}registerOnDisabledChange(ze){this._onDisabledChange.push(ze)}_unregisterOnDisabledChange(ze){Br(this._onDisabledChange,ze)}_forEachChild(ze){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(ze){jr(ze)?(this.value=this._pendingValue=ze.value,ze.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=ze}},ri={provide:an,useExisting:(0,i.wd)(()=>zt)},Hr=Promise.resolve();let zt=(()=>{class Ge extends an{constructor(he,Ft,Un,bi,Ti,us){super(),this._changeDetectorRef=Ti,this.callSetDisabledState=us,this.control=new gn,this._registered=!1,this.name="",this.update=new i._w7,this._parent=he,this._setValidators(Ft),this._setAsyncValidators(Un),this.valueAccessor=Re(0,bi)}ngOnChanges(he){if(this._checkForErrors(),!this._registered||"name"in he){if(this._registered&&(this._checkName(),this.formDirective)){const Ft=he.name.previousValue;this.formDirective.removeControl({name:Ft,path:this._getPath(Ft)})}this._setUpControl()}"isDisabled"in he&&this._updateDisabled(he),on(he,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(he){this.viewModel=he,this.update.emit(he)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Ht(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(he){Hr.then(()=>{this.control.setValue(he,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(he){const Ft=he.isDisabled.currentValue,Un=0!==Ft&&(0,i.cZD)(Ft);Hr.then(()=>{Un&&!this.control.disabled?this.control.disable():!Un&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(he){return this._parent?nr(he,this._parent):[he]}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(kt,9),i.GI1(Ne,10),i.GI1(Ie,10),i.GI1(Q,10),i.GI1(i.kD9,8),i.GI1(Di,8))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[i.Wk5.None,"disabled","isDisabled"],model:[i.Wk5.None,"ngModel","model"],options:[i.Wk5.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[i.M5G([ri]),i.eg9,i.SYr]})}return Ge})(),en=(()=>{class Ge{static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}return Ge})();const Vt=new i.UbH(""),Rt={provide:kt,useExisting:(0,i.wd)(()=>Ee)};let Ee=(()=>{class Ge extends kt{constructor(he,Ft,Un){super(),this.callSetDisabledState=Un,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new i._w7,this._setValidators(he),this._setAsyncValidators(Ft)}ngOnChanges(he){this._checkFormPresent(),he.hasOwnProperty("form")&&(this._updateV
1alidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(mi(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(he){const Ft=this.form.get(he.path);return Ht(Ft,he,this.callSetDisabledState),Ft.updateValueAndValidity({emitEvent:!1}),this.directives.push(he),Ft}getControl(he){return this.form.get(he.path)}removeControl(he){Wn(he.control||null,he,!1),function Pt(Ge,ze){const he=Ge.indexOf(ze);he>-1&&Ge.splice(he,1)}(this.directives,he)}addFormGroup(he){this._setUpFormContainer(he)}removeFormGroup(he){this._cleanUpFormContainer(he)}getFormGroup(he){return this.form.get(he.path)}addFormArray(he){this._setUpFormContainer(he)}removeFormArray(he){this._cleanUpFormContainer(he)}getFormArray(he){return this.form.get(he.path)}updateModel(he,Ft){this.form.get(he.path).setValue(Ft)}onSubmit(he){return this.submitted=!0,me(this.form,this.directives),this.ngSubmit.emit(he),"dialog"===he?.target?.method}onReset(){this.resetForm()}resetForm(he=void 0){this.form.reset(he),this.submitted=!1}_updateDomValue(){this.directives.forEach(he=>{const Ft=he.control,Un=this.form.get(he.path);Ft!==Un&&(Wn(Ft||null,he),(Ge=>Ge instanceof gn)(Un)&&(Ht(Un,he,this.callSetDisabledState),he.control=Un))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(he){const Ft=this.form.get(he.path);Ln(Ft,he),Ft.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(he){if(this.form){const Ft=this.form.get(he.path);Ft&&function Cn(Ge,ze){return mi(Ge,ze)}(Ft,he)&&Ft.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){wr(this.form,this),this._oldForm&&mi(this._oldForm,this)}_checkFormPresent(){}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(Ne,10),i.GI1(Ie,10),i.GI1(Di,8))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","formGroup",""]],hostBindings:function(Ft,Un){1&Ft&&i.qCj("submit",function(Ti){return Un.onSubmit(Ti)})("reset",function(){return Un.onReset()})},inputs:{form:[i.Wk5.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.M5G([Rt]),i.eg9,i.SYr]})}return Ge})();const $e={provide:an,useExisting:(0,i.wd)(()=>Wt)};let Wt=(()=>{class Ge extends an{set isDisabled(he){}static#e=this._ngModelWarningSentOnce=!1;constructor(he,Ft,Un,bi,Ti){super(),this._ngModelWarningConfig=Ti,this._added=!1,this.name=null,this.update=new i._w7,this._ngModelWarningSent=!1,this._parent=he,this._setValidators(Ft),this._setAsyncValidators(Un),this.valueAccessor=Re(0,bi)}ngOnChanges(he){this._added||this._setUpControl(),on(he,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(he){this.viewModel=he,this.update.emit(he)}get path(){return nr(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static#t=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(kt,13),i.GI1(Ne,10),i.GI1(Ie,10),i.GI1(Q,10),i.GI1(Vt,8))};static#n=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","formControlName",""]],inputs:{name:[i.Wk5.None,"formControlName","name"],isDisabled:[i.Wk5.None,"disabled","isDisabled"],model:[i.Wk5.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[i.M5G([$e]),i.eg9,i.SYr]})}return Ge})();const In={provide:Q,useExisting:(0,i.wd)(()=>Xn),multi:!0};function rr(Ge,ze){return null==Ge?`${ze}`:(ze&&"object"==typeof ze&&(ze="Object"),`${Ge}: ${ze}`.slice(0,50))}let Xn=(()=>{class Ge extends J{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(he){this._compareWith=he}writeValue(he){this.value=he;const Un=rr(this._getOptionId(he),he);this.setProperty("value",Un)}registerOnChange(he){this.onChange=Ft=>{this.value=this._getOptionValue(Ft),he(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(he){for(const Ft of this._optionMap.keys())if(this._compareWith(this._optionMap.get(Ft),he))return Ft;return null}_getOptionValue(he){const Ft=function fr(Ge){return Ge.split(":")[0]}(he);return this._optionMap.has(Ft)?this._optionMap.get(Ft):he}static#e=this.\u0275fac=(()=>{let he;
1return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(Ft,Un){1&Ft&&i.qCj("change",function(Ti){return Un.onChange(Ti.target.value)})("blur",function(){return Un.onTouched()})},inputs:{compareWith:"compareWith"},features:[i.M5G([In]),i.eg9]})}return Ge})(),Rr=(()=>{class Ge{constructor(he,Ft,Un){this._element=he,this._renderer=Ft,this._select=Un,this._select&&(this.id=this._select._registerOption())}set ngValue(he){null!=this._select&&(this._select._optionMap.set(this.id,he),this._setElementValue(rr(this.id,he)),this._select.writeValue(this._select.value))}set value(he){this._setElementValue(he),this._select&&this._select.writeValue(this._select.value)}_setElementValue(he){this._renderer.setProperty(this._element.nativeElement,"value",he)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(i.GMv),i.GI1(i.q87),i.GI1(Xn,9))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}return Ge})();const xi={provide:Q,useExisting:(0,i.wd)(()=>Gs),multi:!0};function Oi(Ge,ze){return null==Ge?`${ze}`:("string"==typeof ze&&(ze=`'${ze}'`),ze&&"object"==typeof ze&&(ze="Object"),`${Ge}: ${ze}`.slice(0,50))}let Gs=(()=>{class Ge extends J{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(he){this._compareWith=he}writeValue(he){let Ft;if(this.value=he,Array.isArray(he)){const Un=he.map(bi=>this._getOptionId(bi));Ft=(bi,Ti)=>{bi._setSelected(Un.indexOf(Ti.toString())>-1)}}else Ft=(Un,bi)=>{Un._setSelected(!1)};this._optionMap.forEach(Ft)}registerOnChange(he){this.onChange=Ft=>{const Un=[],bi=Ft.selectedOptions;if(void 0!==bi){const Ti=bi;for(let us=0;us<Ti.length;us++){const ks=this._getOptionValue(Ti[us].value);Un.push(ks)}}else{const Ti=Ft.options;for(let us=0;us<Ti.length;us++){const Ms=Ti[us];if(Ms.selected){const ks=this._getOptionValue(Ms.value);Un.push(ks)}}}this.value=Un,he(Un)}}_registerOption(he){const Ft=(this._idCounter++).toString();return this._optionMap.set(Ft,he),Ft}_getOptionId(he){for(const Ft of this._optionMap.keys())if(this._compareWith(this._optionMap.get(Ft)._value,he))return Ft;return null}_getOptionValue(he){const Ft=function bs(Ge){return Ge.split(":")[0]}(he);return this._optionMap.has(Ft)?this._optionMap.get(Ft)._value:he}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(Ft,Un){1&Ft&&i.qCj("change",function(Ti){return Un.onChange(Ti.target)})("blur",function(){return Un.onTouched()})},inputs:{compareWith:"compareWith"},features:[i.M5G([xi]),i.eg9]})}return Ge})(),Ns=(()=>{class Ge{constructor(he,Ft,Un){this._element=he,this._renderer=Ft,this._select=Un,this._select&&(this.id=this._select._registerOption(this))}set ngValue(he){null!=this._select&&(this._value=he,this._setElementValue(Oi(this.id,he)),this._select.writeValue(this._select.value))}set value(he){this._select?(this._value=he,this._setElementValue(Oi(this.id,he)),this._select.writeValue(this._select.value)):this._setElementValue(he)}_setElementValue(he){this._renderer.setProperty(this._element.nativeElement,"value",he)}_setSelected(he){this._renderer.setProperty(this._element.nativeElement,"selected",he)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)(i.GI1(i.GMv),i.GI1(i.q87),i.GI1(Gs,9))};static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}return Ge})();function Ci(Ge){return"number"==typeof Ge?Ge:parseInt(Ge,10)}function Js(Ge){return"number"==typeof Ge?Ge:parseFloat(Ge)}let Nt=(()=>
1{class Ge{constructor(){this._validator=se}ngOnChanges(he){if(this.inputName in he){const Ft=this.normalizeInput(he[this.inputName].currentValue);this._enabled=this.enabled(Ft),this._validator=this._enabled?this.createValidator(Ft):se,this._onChange&&this._onChange()}}validate(he){return this._validator(he)}registerOnValidatorChange(he){this._onChange=he}enabled(he){return null!=he}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)};static#t=this.\u0275dir=i.Sc5({type:Ge,features:[i.SYr]})}return Ge})();const $t={provide:Ne,useExisting:(0,i.wd)(()=>Je),multi:!0};let Je=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=he=>Js(he),this.createValidator=he=>Le(he)}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(Ft,Un){2&Ft&&i.e48("max",Un._enabled?Un.max:null)},inputs:{max:"max"},features:[i.M5G([$t]),i.eg9]})}return Ge})();const be={provide:Ne,useExisting:(0,i.wd)(()=>oe),multi:!0};let oe=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=he=>Js(he),this.createValidator=he=>ye(he)}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(Ft,Un){2&Ft&&i.e48("min",Un._enabled?Un.min:null)},inputs:{min:"min"},features:[i.M5G([be]),i.eg9]})}return Ge})();const qe={provide:Ne,useExisting:(0,i.wd)(()=>Ce),multi:!0};let Ce=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=i.cZD,this.createValidator=he=>W}enabled(he){return he}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(Ft,Un){2&Ft&&i.e48("required",Un._enabled?"":null)},inputs:{required:"required"},features:[i.M5G([qe]),i.eg9]})}return Ge})();const tt={provide:Ne,useExisting:(0,i.wd)(()=>Et),multi:!0};let Et=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=i.cZD,this.createValidator=he=>At}enabled(he){return he}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[i.M5G([tt]),i.eg9]})}return Ge})();const Vn={provide:Ne,useExisting:(0,i.wd)(()=>Gn),multi:!0};let Gn=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=he=>Ci(he),this.createValidator=he=>Ut(he)}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(Ft,Un){2&Ft&&i.e48("minlength",Un._enabled?Un.minlength:null)},inputs:{minlength:"minlength"},features:[i.M5G([Vn]),i.eg9]})}return Ge})();const Jn={provide:Ne,useExisting:(0,i.wd)(()=>ar),multi:!0};let ar=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=he=>Ci(he),this.createValidator=he=>it(he)}static#e=this.\u0275fac=(()=>{let he;return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(Ft,Un){2&Ft&&i.e48("maxlength",Un._enabled?Un.maxlength:null)},inputs:{maxlength:"maxlength"},features:[i.M5G([Jn]),i.eg9]})}return Ge})();const Gi={provide:Ne,useExisting:(0,i.wd)(()=>zi),multi:!0};let zi=(()=>{class Ge extends Nt{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=he=>he,this.createValidator=he=>ue(he)}static#e=this.\u0275fac=(()=>{let he;
1return function(Un){return(he||(he=i.otF(Ge)))(Un||Ge)}})();static#t=this.\u0275dir=i.Sc5({type:Ge,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(Ft,Un){2&Ft&&i.e48("pattern",Un._enabled?Un.pattern:null)},inputs:{pattern:"pattern"},features:[i.M5G([Gi]),i.eg9]})}return Ge})(),hs=(()=>{class Ge{static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)};static#t=this.\u0275mod=i.a4G({type:Ge});static#n=this.\u0275inj=i.s3X({})}return Ge})();class Ue extends Bn{constructor(ze,he,Ft){super(Ze(he),Zt(Ft,he)),this.controls=ze,this._initObservables(),this._setUpdateStrategy(he),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(ze){return this.controls[this._adjustIndex(ze)]}push(ze,he={}){this.controls.push(ze),this._registerControl(ze),this.updateValueAndValidity({emitEvent:he.emitEvent}),this._onCollectionChange()}insert(ze,he,Ft={}){this.controls.splice(ze,0,he),this._registerControl(he),this.updateValueAndValidity({emitEvent:Ft.emitEvent})}removeAt(ze,he={}){let Ft=this._adjustIndex(ze);Ft<0&&(Ft=0),this.controls[Ft]&&this.controls[Ft]._registerOnCollectionChange(()=>{}),this.controls.splice(Ft,1),this.updateValueAndValidity({emitEvent:he.emitEvent})}setControl(ze,he,Ft={}){let Un=this._adjustIndex(ze);Un<0&&(Un=0),this.controls[Un]&&this.controls[Un]._registerOnCollectionChange(()=>{}),this.controls.splice(Un,1),he&&(this.controls.splice(Un,0,he),this._registerControl(he)),this.updateValueAndValidity({emitEvent:Ft.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(ze,he={}){Tn(this,0,ze),ze.forEach((Ft,Un)=>{dn(this,!1,Un),this.at(Un).setValue(Ft,{onlySelf:!0,emitEvent:he.emitEvent})}),this.updateValueAndValidity(he)}patchValue(ze,he={}){null!=ze&&(ze.forEach((Ft,Un)=>{this.at(Un)&&this.at(Un).patchValue(Ft,{onlySelf:!0,emitEvent:he.emitEvent})}),this.updateValueAndValidity(he))}reset(ze=[],he={}){this._forEachChild((Ft,Un)=>{Ft.reset(ze[Un],{onlySelf:!0,emitEvent:he.emitEvent})}),this._updatePristine(he),this._updateTouched(he),this.updateValueAndValidity(he)}getRawValue(){return this.controls.map(ze=>ze.getRawValue())}clear(ze={}){this.controls.length<1||(this._forEachChild(he=>he._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:ze.emitEvent}))}_adjustIndex(ze){return ze<0?ze+this.length:ze}_syncPendingControls(){let ze=this.controls.reduce((he,Ft)=>!!Ft._syncPendingControls()||he,!1);return ze&&this.updateValueAndValidity({onlySelf:!0}),ze}_forEachChild(ze){this.controls.forEach((he,Ft)=>{ze(he,Ft)})}_updateValue(){this.value=this.controls.filter(ze=>ze.enabled||this.disabled).map(ze=>ze.value)}_anyControls(ze){return this.controls.some(he=>he.enabled&&ze(he))}_setUpControls(){this._forEachChild(ze=>this._registerControl(ze))}_allControlsDisabled(){for(const ze of this.controls)if(ze.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(ze){ze.setParent(this),ze._registerOnCollectionChange(this._onCollectionChange)}_find(ze){return this.at(ze)??null}}function Bt(Ge){return!!Ge&&(void 0!==Ge.asyncValidators||void 0!==Ge.validators||void 0!==Ge.updateOn)}let Qn=(()=>{class Ge{constructor(){this.useNonNullable=!1}get nonNullable(){const he=new Ge;return he.useNonNullable=!0,he}group(he,Ft=null){const Un=this._reduceControls(he);let bi={};return Bt(Ft)?bi=Ft:null!==Ft&&(bi.validators=Ft.validator,bi.asyncValidators=Ft.asyncValidator),new mr(Un,bi)}record(he,Ft=null){const Un=this._reduceControls(he);return new Er(Un,Ft)}control(he,Ft,Un){let bi={};return this.useNonNullable?(Bt(Ft)?bi=Ft:(bi.validators=Ft,bi.asyncValidators=Un),new gn(he,{...bi,nonNullable:!0})):new gn(he,Ft,Un)}array(he,Ft,Un){const bi=he.map(Ti=>this._createControl(Ti));return new Ue(bi,Ft,Un)}_reduceControls(he){const Ft={};return Object.keys(he).forEach(Un=>{Ft[Un]=this._createControl(he[Un])}),Ft}_createControl(he){return he instanceof gn||he instanceof Bn?he:Array.isArray(he)?this.control(he[0],he.length>1?he[1]:null,he.length>2?he[2]:null):this.control(he)}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)};static#t=this.\u0275prov=i.wxM({token:Ge,factory:Ge.\u0275fac,providedIn:"root"})}return Ge})(),fi=(()=>{class Ge{static withConfig(he){return{ngModule:Ge,providers:[{provide:Di,useValue:he.callSetDisabledState??Pi}]}}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)};static#t=this.\u0275mod=i.a4G({type:Ge});static#n=this.\u0275inj=i.s3X({imports:[hs]})}return Ge})(),Fi=(()=>{class Ge{static withConfig(he){return{ngModule:Ge,providers:[{provide:Vt,useValue:he.warnOnNgModelWithFormControl??"always"},{provide:Di,useValue:he.callSetDisabledState??Pi}]}}static#e=this.\u0275fac=function(Ft){return new(Ft||Ge)};static#t=this.\u0275mod=i.a4G({type:Ge});static#n=this.\u0275inj=i.s3X({imports:[hs]})}return Ge})()},14476:(B,G,a)=>{"use strict";a.d(G,{OY:()=>lt,iE:()=>cn,o_:()=>ge,q:()=>Ie});var i=a(32116),v=a(91368);
1class b extends v.mg{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class _ extends b{static makeCurrent(){(0,v.ug)(new _)}onAndCancel(jt,Ct,Mt){return jt.addEventListener(Ct,Mt),()=>{jt.removeEventListener(Ct,Mt)}}dispatchEvent(jt,Ct){jt.dispatchEvent(Ct)}remove(jt){jt.parentNode&&jt.parentNode.removeChild(jt)}createElement(jt,Ct){return(Ct=Ct||this.getDefaultDocument()).createElement(jt)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(jt){return jt.nodeType===Node.ELEMENT_NODE}isShadowRoot(jt){return jt instanceof DocumentFragment}getGlobalEventTarget(jt,Ct){return"window"===Ct?window:"document"===Ct?jt:"body"===Ct?jt.body:null}getBaseHref(jt){const Ct=function P(){return C=C||document.querySelector("base"),C?C.getAttribute("href"):null}();return null==Ct?null:function S(vn){return new URL(vn,document.baseURI).pathname}(Ct)}resetBaseElement(){C=null}getUserAgent(){return window.navigator.userAgent}getCookie(jt){return(0,v.Sg)(document.cookie,jt)}}let C=null,k=(()=>{class vn{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac})}return vn})();const x=new i.UbH("");let D=(()=>{class vn{constructor(Ct,Mt){this._zone=Mt,this._eventNameToPlugin=new Map,Ct.forEach(Ze=>{Ze.manager=this}),this._plugins=Ct.slice().reverse()}addEventListener(Ct,Mt,Ze){return this._findPluginFor(Mt).addEventListener(Ct,Mt,Ze)}getZone(){return this._zone}_findPluginFor(Ct){let Mt=this._eventNameToPlugin.get(Ct);if(Mt)return Mt;if(Mt=this._plugins.find(et=>et.supports(Ct)),!Mt)throw new i.OBp(5101,!1);return this._eventNameToPlugin.set(Ct,Mt),Mt}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(x),i.CoB(i.WW2))};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac})}return vn})();class ee{constructor(jt){this._doc=jt}}const te="ng-app-id";let J=(()=>{class vn{constructor(Ct,Mt,Ze,et={}){this.doc=Ct,this.appId=Mt,this.nonce=Ze,this.platformId=et,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=(0,v.uf)(et),this.resetHostNodes()}addStyles(Ct){for(const Mt of Ct)1===this.changeUsageCount(Mt,1)&&this.onStyleAdded(Mt)}removeStyles(Ct){for(const Mt of Ct)this.changeUsageCount(Mt,-1)<=0&&this.onStyleRemoved(Mt)}ngOnDestroy(){const Ct=this.styleNodesInDOM;Ct&&(Ct.forEach(Mt=>Mt.remove()),Ct.clear());for(const Mt of this.getAllStyles())this.onStyleRemoved(Mt);this.resetHostNodes()}addHost(Ct){this.hostNodes.add(Ct);for(const Mt of this.getAllStyles())this.addStyleToHost(Ct,Mt)}removeHost(Ct){this.hostNodes.delete(Ct)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(Ct){for(const Mt of this.hostNodes)this.addStyleToHost(Mt,Ct)}onStyleRemoved(Ct){const Mt=this.styleRef;Mt.get(Ct)?.elements?.forEach(Ze=>Ze.remove()),Mt.delete(Ct)}collectServerRenderedStyles(){const Ct=this.doc.head?.querySelectorAll(`style[${te}="${this.appId}"]`);if(Ct?.length){const Mt=new Map;return Ct.forEach(Ze=>{null!=Ze.textContent&&Mt.set(Ze.textContent,Ze)}),Mt}return null}changeUsageCount(Ct,Mt){const Ze=this.styleRef;if(Ze.has(Ct)){const et=Ze.get(Ct);return et.usage+=Mt,et.usage}return Ze.set(Ct,{usage:Mt,elements:[]}),Mt}getStyleElement(Ct,Mt){const Ze=this.styleNodesInDOM,et=Ze?.get(Mt);if(et?.parentNode===Ct)return Ze.delete(Mt),et.removeAttribute(te),et;{const Zt=this.doc.createElement("style");return this.nonce&&Zt.setAttribute("nonce",this.nonce),Zt.textContent=Mt,this.platformIsServer&&Zt.setAttribute(te,this.appId),Ct.appendChild(Zt),Zt}}addStyleToHost(Ct,Mt){const Ze=this.getStyleElement(Ct,Mt),et=this.styleRef,Zt=et.get(Mt)?.elements;Zt?Zt.push(Ze):et.set(Mt,{elements:[Ze],usage:1})}resetHostNodes(){const Ct=this.hostNodes;Ct.clear(),Ct.add(this.doc.head)}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(v.Ud),i.CoB(i.QHP),i.CoB(i.YND,8),i.CoB(i.AHE))};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac})}return vn})();const Q={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},we=/%COMP%/g,pe=new i.UbH("",{providedIn:"root",factory:()=>!0});function Ne(vn,jt){return jt.map(Ct=>Ct.replace(we,vn))}let Ie=(()=>{class vn{constructor(Ct,Mt,Ze,et,Zt,Fe,ft,dn=null){this.eventManager=Ct,this.sharedStylesHost=Mt,this.appId=Ze,this.removeStylesOnCompDestroy=et,this.doc=Zt,this.platformId=Fe,this.ngZone=ft,this.nonce=dn,this.rendererByCompId=new Map,this.platformIsServer=(0,v.uf)(Fe),this.defaultRenderer=new H(Ct,Zt,ft,this.platformIsServer)}createRenderer(Ct,Mt){if(!Ct||!Mt)return this.defaultRenderer;this.platformIsServer&&Mt.encapsulation===i.K6R.ShadowDom&&(Mt={...Mt,encapsulation:i.K6R.Emulated});const Ze=this.getOrCreateRenderer(Ct,Mt);return Ze instanceof At?Ze.applyToHost(Ct):Ze instanceof We&&Ze.applyStyles(),Ze}getOrCreateRenderer(Ct,Mt){const Ze=this.rendererByCompId;let et=Ze.get(Mt.id);if(!et){const Zt=this.doc,Fe=this.ngZone,ft=this.eventManager,dn=this.sharedStylesHost,Tn=this.removeStylesOnCompDestroy,Bn=this.platformIsServer;switch(Mt.encapsulation){case i.K6R.Emulated:et=new At(ft,dn,Mt,this.appId,Tn,Zt,Fe,Bn);break;case i.K6R.ShadowDom:return new W(ft,dn,Ct,Mt,Zt,Fe,this.nonce,Bn);default:et=new We(ft,dn,Mt,Tn,Zt,Fe,Bn)}Ze.set(Mt.id,et)}return et}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(D),i.CoB(J),i.CoB(i.QHP),i.CoB(pe),i.CoB(v.Ud),i.CoB(i.AHE),i.CoB(i.WW2),i.CoB(i.YND))};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac})}return vn})();class H{constructor(jt,Ct,Mt,Ze){this.eventManager=jt,this.doc=Ct,this.ngZone=Mt,this.platformIsServer=Ze,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(jt,Ct){return Ct?this.doc.createElementNS(Q[Ct]||Ct,jt):this.doc.createElement(jt)}createComment(jt){return this.doc.createComment(jt)}createText(jt){return this.doc.createTextNode(jt)}appendChild(jt,Ct){(Le(jt)?jt.content:jt).appendChild(Ct)}insertBefore(jt,Ct,Mt){jt&&(Le(jt)?jt.content:jt).insertBefore(Ct,Mt)}removeChild(jt,Ct){jt&&jt.removeChild(Ct)}selectRootElement(jt,Ct){let Mt="string"==typeof jt?this.doc.querySelector(jt):jt;if(!Mt)throw new i.OBp(-5104,!1);return Ct||(Mt.textContent=""),Mt}parentNode(jt){return jt.parentNode}nextSibling(jt){return jt.nextSibling}setAttribute(jt,Ct,Mt,Ze){if(Ze){Ct=Ze+":"+Ct;const et=Q[Ze];et?jt.setAttributeNS(et,Ct,Mt):jt.setAttribute(Ct,Mt)}else jt.setAttribute(Ct,Mt)}removeAttribute(jt,Ct,Mt){if(Mt){const Ze=Q[Mt];Ze?jt.removeAttributeNS(Ze,Ct):jt.removeAttribute(`${Mt}:${Ct}`)}else jt.removeAttribute(Ct)}addClass(jt,Ct){jt.classList.add(Ct)}removeClass(jt,Ct){jt.classList.remove(Ct)}setStyle(jt,Ct,Mt,Ze){Ze&(i.yzm.DashCase|i.yzm.Important)?jt.style.setProperty(Ct,Mt,Ze&i.yzm.Important?"important":""):jt.style[Ct]=Mt}removeStyle(jt,Ct,Mt){Mt&i.yzm.DashCase?jt.style.removeProperty(Ct):jt.style[Ct]=""}setProperty(jt,Ct,Mt){null!=jt&&(jt[Ct]=Mt)}setValue(jt,Ct){jt.nodeValue=Ct}listen(jt,Ct,Mt){if("string"==typeof jt&&!(jt=(0,v.uy)().getGlobalEventTarget(this.doc,jt)))throw new Error(`Unsupported event target ${jt} for event ${Ct}`);return this.eventManager.addEventListener(jt,Ct,this.decoratePreventDefault(Mt))}decoratePreventDefault(jt){return Ct=>{if("__ngUnwrap__"===Ct)return jt;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>jt(Ct)):jt(Ct))&&Ct.preventDefault()}}}function Le(vn){return"TEMPLATE"===vn.tagName&&void 0!==vn.content}class W extends H{constructor(jt,Ct,Mt,Ze,et,Zt,Fe,ft){super(jt,et,Zt,ft),this.sharedStylesHost=Ct,this.hostEl=Mt,this.shadowRoot=Mt.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const dn=Ne(Ze.id,Ze.styles);for(const Tn of dn){const Bn=document.createElement("style");Fe&&Bn.setAttribute("nonce",Fe),Bn.textContent=Tn,this.shadowRoot.appendChild(Bn)}}nodeOrShadowRoot(jt){return jt===this.hostEl?this.shadowRoot:jt}appendChild(jt,Ct){return super.appendChild(this.nodeOrShadowRoot(jt),Ct)}insertBefore(jt,Ct,Mt){return super.insertBefore(this.nodeOrShadowRoot(jt),Ct,Mt)}removeChild(jt,Ct){return super.removeChild(this.nodeOrShadowRoot(jt),Ct)}parentNode(jt){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(jt)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class We extends H{constructor(jt,Ct,Mt,Ze,et,Zt,Fe,ft){super(jt,et,Zt,Fe),this.sharedStylesHost=Ct,this.removeStylesOnCompDestroy=Ze,this.styles=ft?Ne(ft,Mt.styles):Mt.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class At extends We{constructor(jt,Ct,Mt,Ze,et,Zt,Fe,ft){const dn=Ze+"-"+Mt.id;super(jt,Ct,Mt,et,Zt,Fe,ft,dn),this.contentAttr=function ae(vn){return"_ngcontent-%COMP%".replace(we,vn)}(dn),this.hostAttr=function Ve(vn){return"_nghost-%COMP%".replace(we,vn)}(dn)}applyToHost(jt){this.applyStyles(),this.setAttribute(jt,this.hostAttr,"")}createElement(jt,Ct){const Mt=super.createElement(jt,Ct);return super.setAttribute(Mt,this.contentAttr,""),Mt}}let Ut=(()=>{class vn extends ee{constructor(Ct){super(Ct)}supports(Ct){return!0}addEventListener(Ct,Mt,Ze){return Ct.addEventListener(Mt,Ze,!1),()=>this.removeEventListener(Ct,Mt,Ze)}removeEventListener(Ct,Mt,Ze){return Ct.removeEventListener(Mt,Ze)}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(v.Ud))};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac})}return vn})();const it=["alt","control","meta","shift"],ue={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},se={alt:vn=>vn.altKey,control:vn=>vn.ctrlKey,meta:vn=>vn.metaKey,shift:vn=>
1vn.shiftKey};let ce=(()=>{class vn extends ee{constructor(Ct){super(Ct)}supports(Ct){return null!=vn.parseEventName(Ct)}addEventListener(Ct,Mt,Ze){const et=vn.parseEventName(Mt),Zt=vn.eventCallback(et.fullKey,Ze,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,v.uy)().onAndCancel(Ct,et.domEventName,Zt))}static parseEventName(Ct){const Mt=Ct.toLowerCase().split("."),Ze=Mt.shift();if(0===Mt.length||"keydown"!==Ze&&"keyup"!==Ze)return null;const et=vn._normalizeKey(Mt.pop());let Zt="",Fe=Mt.indexOf("code");if(Fe>-1&&(Mt.splice(Fe,1),Zt="code."),it.forEach(dn=>{const Tn=Mt.indexOf(dn);Tn>-1&&(Mt.splice(Tn,1),Zt+=dn+".")}),Zt+=et,0!=Mt.length||0===et.length)return null;const ft={};return ft.domEventName=Ze,ft.fullKey=Zt,ft}static matchEventFullKeyCode(Ct,Mt){let Ze=ue[Ct.key]||Ct.key,et="";return Mt.indexOf("code.")>-1&&(Ze=Ct.code,et="code."),!(null==Ze||!Ze)&&(Ze=Ze.toLowerCase()," "===Ze?Ze="space":"."===Ze&&(Ze="dot"),it.forEach(Zt=>{Zt!==Ze&&(0,se[Zt])(Ct)&&(et+=Zt+".")}),et+=Ze,et===Mt)}static eventCallback(Ct,Mt,Ze){return et=>{vn.matchEventFullKeyCode(et,Ct)&&Ze.runGuarded(()=>Mt(et))}}static _normalizeKey(Ct){return"esc"===Ct?"escape":Ct}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(v.Ud))};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac})}return vn})();const ge=(0,i.grM)(i.m4O,"browser",[{provide:i.AHE,useValue:v._k},{provide:i.crf,useValue:function ke(){_.makeCurrent()},multi:!0},{provide:v.Ud,useFactory:function Dt(){return(0,i.auf)(document),document},deps:[]}]),xt=new i.UbH(""),pt=[{provide:i.Mn9,useClass:class R{addToWindow(jt){i.IHs.getAngularTestability=(Mt,Ze=!0)=>{const et=jt.findTestabilityInTree(Mt,Ze);if(null==et)throw new i.OBp(5103,!1);return et},i.IHs.getAllAngularTestabilities=()=>jt.getAllTestabilities(),i.IHs.getAllAngularRootElements=()=>jt.getAllRootElements(),i.IHs.frameworkStabilizers||(i.IHs.frameworkStabilizers=[]),i.IHs.frameworkStabilizers.push(Mt=>{const Ze=i.IHs.getAllAngularTestabilities();let et=Ze.length;const Zt=function(){et--,0==et&&Mt()};Ze.forEach(Fe=>{Fe.whenStable(Zt)})})}findTestabilityInTree(jt,Ct,Mt){return null==Ct?null:jt.getTestability(Ct)??(Mt?(0,v.uy)().isShadowRoot(Ct)?this.findTestabilityInTree(jt,Ct.host,!0):this.findTestabilityInTree(jt,Ct.parentElement,!0):null)}},deps:[]},{provide:i.aS5,useClass:i.G4X,deps:[i.WW2,i.eOv,i.Mn9]},{provide:i.G4X,useClass:i.G4X,deps:[i.WW2,i.eOv,i.Mn9]}],rn=[{provide:i.i4S,useValue:"root"},{provide:i.eAe,useFactory:function Lt(){return new i.eAe},deps:[]},{provide:x,useClass:Ut,multi:!0,deps:[v.Ud,i.WW2,i.AHE]},{provide:x,useClass:ce,multi:!0,deps:[v.Ud]},Ie,J,D,{provide:i.O8F,useExisting:Ie},{provide:v.OM,useClass:k,deps:[]},[]];let cn=(()=>{class vn{constructor(Ct){}static withServerTransition(Ct){return{ngModule:vn,providers:[{provide:i.QHP,useValue:Ct.appId}]}}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(xt,12))};static#t=this.\u0275mod=i.a4G({type:vn});static#n=this.\u0275inj=i.s3X({providers:[...rn,...pt],imports:[v.MD,i.Ev2]})}return vn})(),lt=(()=>{class vn{constructor(Ct){this._doc=Ct}getTitle(){return this._doc.title}setTitle(Ct){this._doc.title=Ct||""}static#e=this.\u0275fac=function(Mt){return new(Mt||vn)(i.CoB(v.Ud))};static#t=this.\u0275prov=i.wxM({token:vn,factory:vn.\u0275fac,providedIn:"root"})}return vn})()},89192:(B,G,a)=>{"use strict";a.d(G,{gV:()=>St,O4:()=>It,Qx:()=>Re,gf:()=>Dt,E5:()=>ro,ER:()=>Zi,LC:()=>Eo,qQ:()=>_l,qd:()=>sr});var i=a(32116),v=a(53252),b=a(38880),C=a(19900),P=a(82700),S=a(46700),R=a(56040),k=a(37696),x=a(37228),D=a(41424),ee=a(83928);function te(F,fe){const $=(0,b.m)(F)?F:()=>F,ve=ht=>ht.error($());return new v._(fe?ht=>fe.schedule(ve,0,ht):ve)}var J=a(28960),Q=a(46928),we=a(95448),de=a(87773);function Y(){return(0,we.i)((F,fe)=>{let $=null;F._refCount++;const ve=(0,de.e)(fe,void 0,void 0,void 0,()=>{if(!F||F._refCount<=0||0<--F._refCount)return void($=null);const ht=F._connection,qt=$;$=null,ht&&(!qt||ht===qt)&&ht.unsubscribe(),fe.unsubscribe()});F.subscribe(ve),ve.closed||($=F.connect())})}class Se extends v._{constructor(fe,$){super(),this.source=fe,this.subjectFactory=$,this._subject=null,this._refCount=0,this._connection=null,(0,we.e)(fe)&&(this.lift=fe.lift)}
1_subscribe(fe){return this.getSubject().subscribe(fe)}getSubject(){const fe=this._subject;return(!fe||fe.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:fe}=this;this._subject=this._connection=null,fe?.unsubscribe()}connect(){let fe=this._connection;if(!fe){fe=this._connection=new Q.wH;const $=this.getSubject();fe.add(this.source.subscribe((0,de.e)($,void 0,()=>{this._teardown(),$.complete()},ve=>{this._teardown(),$.error(ve)},()=>this._teardown()))),fe.closed&&(this._connection=null,fe=Q.wH.EMPTY)}return fe}refCount(){return Y()(this)}}var Ye=a(95657),pe=a(91368),ae=a(54704),Ve=a(17368),Ne=a(3992),Ie=a(75568),H=a(66684),j=a(7400),ye=a(75084),Le=a(26020),W=a(19212),We=a(50560);function At(F){return(0,we.i)((fe,$)=>{let qt,ve=null,ht=!1;ve=fe.subscribe((0,de.e)($,void 0,void 0,zn=>{qt=(0,We.Uv)(F(zn,At(F)(fe))),ve?(ve.unsubscribe(),ve=null,qt.subscribe($)):ht=!0})),ht&&(ve.unsubscribe(),ve=null,qt.subscribe($))})}var Ut=a(21112),it=a(22156),ue=a(63492),se=a(98124),ce=a(528),_e=a(32700),Pe=a(68824),De=a(53616),ke=a(80267),Lt=a(14476);const Dt="primary",He=Symbol("RouteTitle");class ge{constructor(fe){this.params=fe||{}}has(fe){return Object.prototype.hasOwnProperty.call(this.params,fe)}get(fe){if(this.has(fe)){const $=this.params[fe];return Array.isArray($)?$[0]:$}return null}getAll(fe){if(this.has(fe)){const $=this.params[fe];return Array.isArray($)?$:[$]}return[]}get keys(){return Object.keys(this.params)}}function xt(F){return new ge(F)}function pt(F,fe,$){const ve=$.path.split("/");if(ve.length>F.length||"full"===$.pathMatch&&(fe.hasChildren()||ve.length<F.length))return null;const ht={};for(let qt=0;qt<ve.length;qt++){const zn=ve[qt],Cr=F[qt];if(zn.startsWith(":"))ht[zn.substring(1)]=Cr;else if(zn!==Cr.path)return null}return{consumed:F.slice(0,ve.length),posParams:ht}}function cn(F,fe){const $=F?mn(F):void 0,ve=fe?mn(fe):void 0;if(!$||!ve||$.length!=ve.length)return!1;let ht;for(let qt=0;qt<$.length;qt++)if(ht=$[qt],!dt(F[ht],fe[ht]))return!1;return!0}function mn(F){return[...Object.keys(F),...Object.getOwnPropertySymbols(F)]}function dt(F,fe){if(Array.isArray(F)&&Array.isArray(fe)){if(F.length!==fe.length)return!1;const $=[...F].sort(),ve=[...fe].sort();return $.every((ht,qt)=>ve[qt]===ht)}return F===fe}function lt(F){return F.length>0?F[F.length-1]:null}function rt(F){return function _(F){return!!F&&(F instanceof v._||(0,b.m)(F.lift)&&(0,b.m)(F.subscribe))}(F)?F:(0,i.w5$)(F)?(0,C.Q)(Promise.resolve(F)):(0,P.of)(F)}const kt={exact:function Hn(F,fe,$){if(!Kr(F.segments,fe.segments)||!Mr(F.segments,fe.segments,$)||F.numberOfChildren!==fe.numberOfChildren)return!1;for(const ve in fe.children)if(!F.children[ve]||!Hn(F.children[ve],fe.children[ve],$))return!1;return!0},subset:On},an={exact:function bn(F,fe){return cn(F,fe)},subset:function Fn(F,fe){return Object.keys(fe).length<=Object.keys(F).length&&Object.keys(fe).every($=>dt(F[$],fe[$]))},ignored:()=>!0};function Yn(F,fe,$){return kt[$.paths](F.root,fe.root,$.matrixParams)&&an[$.queryParams](F.queryParams,fe.queryParams)&&!("exact"===$.fragment&&F.fragment!==fe.fragment)}function On(F,fe,$){return gr(F,fe,fe.segments,$)}function gr(F,fe,$,ve){if(F.segments.length>$.length){const ht=F.segments.slice(0,$.length);return!(!Kr(ht,$)||fe.hasChildren()||!Mr(ht,$,ve))}if(F.segments.length===$.length){if(!Kr(F.segments,$)||!Mr(F.segments,$,ve))return!1;for(const ht in fe.children)if(!F.children[ht]||!On(F.children[ht],fe.children[ht],ve))return!1;return!0}{const ht=$.slice(0,F.segments.length),qt=$.slice(F.segments.length);return!!(Kr(F.segments,ht)&&Mr(F.segments,ht,ve)&&F.children[Dt])&&gr(F.children[Dt],fe,qt,ve)}}function Mr(F,fe,$){return fe.every((ve,ht)=>an[$](F[ht].parameters,ve.parameters))}class Vr{constructor(fe=new Fr([],{}),$={},ve=null){this.root=fe,this.queryParams=$,this.fragment=ve}get queryParamMap(){return this._queryParamMap??=xt(this.queryParams),this._queryParamMap}toString(){return zr.serialize(this)}}class Fr{constructor(fe,$){this.segments=fe,this.children=$,this.parent=null,Object.values($).forEach(ve=>ve.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return sn(this)}}class ti{constructor(fe,$){this.path=fe,this.parameters=$}get parameterMap(){return this._parameterMap??=xt(this.parameters),this._parameterMap}toString(){return Ct(this)}}function Kr(F,fe){return F.length===fe.length&&F.every(($,ve)=>$.path===fe[ve].path)}let sr=(()=>{class F{static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:()=>new or,providedIn:"root"})}return F})();class or{parse(fe){const $=new tr(fe);return new Vr($.parseRootSegment(),$.parseQueryParams(),$.parseFragment())}serialize(fe){const $=`/${Qe(fe.root,!0)}`,ve=function Ze(F){const fe=Object.entries(F).map(([$,ve])=>Array.isArray(ve)?ve.map(ht=>`${Xt($)}=${Xt(ht)}`).join("&"):`${Xt($)}=${Xt(ve)}`).filter($=>$);return fe.length?`?${fe.join("&")}`:""}(fe.queryParams);return`${$}${ve}${"string"==typeof fe.fragment?`#${function wn(F){return encodeURI(F)}(fe.fragment)}`:""}`}}const zr=new or;function sn(F){return F.segments.map(fe=>Ct(fe)).join("/")}function Qe(F,fe){if(!F.hasChildren())return sn(F);if(fe){const $=F.children[Dt]?Qe(F.children[Dt],!1):"",ve=[];
1return Object.entries(F.children).forEach(([ht,qt])=>{ht!==Dt&&ve.push(`${ht}:${Qe(qt,!1)}`)}),ve.length>0?`${$}(${ve.join("//")})`:$}{const $=function Jr(F,fe){let $=[];return Object.entries(F.children).forEach(([ve,ht])=>{ve===Dt&&($=$.concat(fe(ht,ve)))}),Object.entries(F.children).forEach(([ve,ht])=>{ve!==Dt&&($=$.concat(fe(ht,ve)))}),$}(F,(ve,ht)=>ht===Dt?[Qe(F.children[Dt],!1)]:[`${ht}:${Qe(ve,!1)}`]);return 1===Object.keys(F.children).length&&null!=F.children[Dt]?`${sn(F)}/${$[0]}`:`${sn(F)}/(${$.join("//")})`}}function ut(F){return encodeURIComponent(F).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Xt(F){return ut(F).replace(/%3B/gi,";")}function dr(F){return ut(F).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function vn(F){return decodeURIComponent(F)}function jt(F){return vn(F.replace(/\+/g,"%20"))}function Ct(F){return`${dr(F.path)}${function Mt(F){return Object.entries(F).map(([fe,$])=>`;${dr(fe)}=${dr($)}`).join("")}(F.parameters)}`}const et=/^[^\/()?;#]+/;function Zt(F){const fe=F.match(et);return fe?fe[0]:""}const Fe=/^[^\/()?;=#]+/,dn=/^[^=?&#]+/,Bn=/^[^&#]+/;class tr{constructor(fe){this.url=fe,this.remaining=fe}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Fr([],{}):new Fr([],this.parseChildren())}parseQueryParams(){const fe={};if(this.consumeOptional("?"))do{this.parseQueryParam(fe)}while(this.consumeOptional("&"));return fe}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const fe=[];for(this.peekStartsWith("(")||fe.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),fe.push(this.parseSegment());let $={};this.peekStartsWith("/(")&&(this.capture("/"),$=this.parseParens(!0));let ve={};return this.peekStartsWith("(")&&(ve=this.parseParens(!1)),(fe.length>0||Object.keys($).length>0)&&(ve[Dt]=new Fr(fe,$)),ve}parseSegment(){const fe=Zt(this.remaining);if(""===fe&&this.peekStartsWith(";"))throw new i.OBp(4009,!1);return this.capture(fe),new ti(vn(fe),this.parseMatrixParams())}parseMatrixParams(){const fe={};for(;this.consumeOptional(";");)this.parseParam(fe);return fe}parseParam(fe){const $=function ft(F){const fe=F.match(Fe);return fe?fe[0]:""}(this.remaining);if(!$)return;this.capture($);let ve="";if(this.consumeOptional("=")){const ht=Zt(this.remaining);ht&&(ve=ht,this.capture(ve))}fe[vn($)]=vn(ve)}parseQueryParam(fe){const $=function Tn(F){const fe=F.match(dn);return fe?fe[0]:""}(this.remaining);if(!$)return;this.capture($);let ve="";if(this.consumeOptional("=")){const zn=function mr(F){const fe=F.match(Bn);return fe?fe[0]:""}(this.remaining);zn&&(ve=zn,this.capture(ve))}const ht=jt($),qt=jt(ve);if(fe.hasOwnProperty(ht)){let zn=fe[ht];Array.isArray(zn)||(zn=[zn],fe[ht]=zn),zn.push(qt)}else fe[ht]=qt}parseParens(fe){const $={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const ve=Zt(this.remaining),ht=this.remaining[ve.length];if("/"!==ht&&")"!==ht&&";"!==ht)throw new i.OBp(4010,!1);let qt;ve.indexOf(":")>-1?(qt=ve.slice(0,ve.indexOf(":")),this.capture(qt),this.capture(":")):fe&&(qt=Dt);const zn=this.parseChildren();$[qt]=1===Object.keys(zn).length?zn[Dt]:new Fr([],zn),this.consumeOptional("//")}return $}peekStartsWith(fe){return this.remaining.startsWith(fe)}consumeOptional(fe){return!!this.peekStartsWith(fe)&&(this.remaining=this.remaining.substring(fe.length),!0)}capture(fe){if(!this.consumeOptional(fe))throw new i.OBp(4011,!1)}}function Ir(F){return F.segments.length>0?new Fr([],{[Dt]:F}):F}function ur(F){const fe={};for(const[ve,ht]of Object.entries(F.children)){const qt=ur(ht);if(ve===Dt&&0===qt.segments.length&&qt.hasChildren())for(const[zn,Cr]of Object.entries(qt.children))fe[zn]=Cr;else(qt.segments.length>0||qt.hasChildren())&&(fe[ve]=qt)}return function Er(F){if(1===F.numberOfChildren&&F.children[Dt]){const fe=F.children[Dt];return new Fr(F.segments.concat(fe.segments),fe.children)}return F}(new Fr(F.segments,fe))}function Ai(F){return F instanceof Vr}function Pi(F){let fe;const ht=Ir(function $(qt){const zn={};for(const Ur of qt.children){const Hi=$(Ur);zn[Ur.outlet]=Hi}const Cr=new Fr(qt.url,zn);return qt===F&&(fe=Cr),Cr}(F.root));return fe??ht}function nr(F,fe,$,ve){let ht=F;for(;ht.parent;)ht=ht.parent;if(0===fe.length)return $n(ht,ht,ht,$,ve);const qt=function mi(F){if("string"==typeof F[0]&&1===F.length&&"/"===F[0])return new wr(!0,0,F);let fe=0,$=!1;const ve=F.reduce((ht,qt,zn)=>{if("object"==typeof qt&&null!=qt){if(qt.outlets){const Cr={};
1return Object.entries(qt.outlets).forEach(([Ur,Hi])=>{Cr[Ur]="string"==typeof Hi?Hi.split("/"):Hi}),[...ht,{outlets:Cr}]}if(qt.segmentPath)return[...ht,qt.segmentPath]}return"string"!=typeof qt?[...ht,qt]:0===zn?(qt.split("/").forEach((Cr,Ur)=>{0==Ur&&"."===Cr||(0==Ur&&""===Cr?$=!0:".."===Cr?fe++:""!=Cr&&ht.push(Cr))}),ht):[...ht,qt]},[]);return new wr($,fe,ve)}(fe);if(qt.toRoot())return $n(ht,ht,new Fr([],{}),$,ve);const zn=function Mi(F,fe,$){if(F.isAbsolute)return new di(fe,!0,0);if(!$)return new di(fe,!1,NaN);if(null===$.parent)return new di($,!0,0);const ve=Ht(F.commands[0])?0:1;return function Qt(F,fe,$){let ve=F,ht=fe,qt=$;for(;qt>ht;){if(qt-=ht,ve=ve.parent,!ve)throw new i.OBp(4005,!1);ht=ve.segments.length}return new di(ve,!1,ht-qt)}($,$.segments.length-1+ve,F.numberOfDoubleDots)}(qt,ht,F),Cr=zn.processChildren?Cn(zn.segmentGroup,zn.index,qt.commands):Ln(zn.segmentGroup,zn.index,qt.commands);return $n(ht,zn.segmentGroup,Cr,$,ve)}function Ht(F){return"object"==typeof F&&null!=F&&!F.outlets&&!F.segmentPath}function Wn(F){return"object"==typeof F&&null!=F&&F.outlets}function $n(F,fe,$,ve,ht){let zn,qt={};ve&&Object.entries(ve).forEach(([Ur,Hi])=>{qt[Ur]=Array.isArray(Hi)?Hi.map(Ss=>`${Ss}`):`${Hi}`}),zn=F===fe?$:jn(F,fe,$);const Cr=Ir(ur(zn));return new Vr(Cr,qt,ht)}function jn(F,fe,$){const ve={};return Object.entries(F.children).forEach(([ht,qt])=>{ve[ht]=qt===fe?$:jn(qt,fe,$)}),new Fr(F.segments,ve)}class wr{constructor(fe,$,ve){if(this.isAbsolute=fe,this.numberOfDoubleDots=$,this.commands=ve,fe&&ve.length>0&&Ht(ve[0]))throw new i.OBp(4003,!1);const ht=ve.find(Wn);if(ht&&ht!==lt(ve))throw new i.OBp(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class di{constructor(fe,$,ve){this.segmentGroup=fe,this.processChildren=$,this.index=ve}}function Ln(F,fe,$){if(F??=new Fr([],{}),0===F.segments.length&&F.hasChildren())return Cn(F,fe,$);const ve=function kr(F,fe,$){let ve=0,ht=fe;const qt={match:!1,pathIndex:0,commandIndex:0};for(;ht<F.segments.length;){if(ve>=$.length)return qt;const zn=F.segments[ht],Cr=$[ve];if(Wn(Cr))break;const Ur=`${Cr}`,Hi=ve<$.length-1?$[ve+1]:null;if(ht>0&&void 0===Ur)break;
1if(Ur&&Hi&&"object"==typeof Hi&&void 0===Hi.outlets){if(!yi(Ur,Hi,zn))return qt;ve+=2}else{if(!yi(Ur,{},zn))return qt;ve++}ht++}return{match:!0,pathIndex:ht,commandIndex:ve}}(F,fe,$),ht=$.slice(ve.commandIndex);if(ve.match&&ve.pathIndex<F.segments.length){const qt=new Fr(F.segments.slice(0,ve.pathIndex),{});return qt.children[Dt]=new Fr(F.segments.slice(ve.pathIndex),F.children),Cn(qt,0,ht)}return ve.match&&0===ht.length?new Fr(F.segments,{}):ve.match&&!F.hasChildren()?si(F,fe,$):ve.match?Cn(F,0,ht):si(F,fe,$)}function Cn(F,fe,$){if(0===$.length)return new Fr(F.segments,{});{const ve=function _n(F){return Wn(F[0])?F[0].outlets:{[Dt]:F}}($),ht={};if(Object.keys(ve).some(qt=>qt!==Dt)&&F.children[Dt]&&1===F.numberOfChildren&&0===F.children[Dt].segments.length){const qt=Cn(F.children[Dt],fe,$);return new Fr(F.segments,qt.children)}return Object.entries(ve).forEach(([qt,zn])=>{"string"==typeof zn&&(zn=[zn]),null!==zn&&(ht[qt]=Ln(F.children[qt],fe,zn))}),Object.entries(F.children).forEach(([qt,zn])=>{void 0===ve[qt]&&(ht[qt]=zn)}),new Fr(F.segments,ht)}}function si(F,fe,$){const ve=F.segments.slice(0,fe);let ht=0;for(;ht<$.length;){const qt=$[ht];if(Wn(qt)){const Ur=oi(qt.outlets);return new Fr(ve,Ur)}if(0===ht&&Ht($[0])){ve.push(new ti(F.segments[fe].path,Ii($[0]))),ht++;continue}const zn=Wn(qt)?qt.outlets[Dt]:`${qt}`,Cr=ht<$.length-1?$[ht+1]:null;zn&&Cr&&Ht(Cr)?(ve.push(new ti(zn,Ii(Cr))),ht+=2):(ve.push(new ti(zn,{})),ht++)}return new Fr(ve,{})}function oi(F){const fe={};return Object.entries(F).forEach(([$,ve])=>{"string"==typeof ve&&(ve=[ve]),null!==ve&&(fe[$]=si(new Fr([],{}),0,ve))}),fe}function Ii(F){const fe={};return Object.entries(F).forEach(([$,ve])=>fe[$]=`${ve}`),fe}function yi(F,fe,$){return F==$.path&&cn(fe,$.parameters)}const on="imperative";var le=function(F){return F[F.NavigationStart=0]="NavigationStart",F[F.NavigationEnd=1]="NavigationEnd",F[F.NavigationCancel=2]="NavigationCancel",F[F.NavigationError=3]="NavigationError",F[F.RoutesRecognized=4]="RoutesRecognized",F[F.ResolveStart=5]="ResolveStart",F[F.ResolveEnd=6]="ResolveEnd",F[F.GuardsCheckStart=7]="GuardsCheckStart",F[F.GuardsCheckEnd=8]="GuardsCheckEnd",F[F.RouteConfigLoadStart=9]="RouteConfigLoadStart",F[F.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",F[F.ChildActivationStart=11]="ChildActivationStart",F[F.ChildActivationEnd=12]="ChildActivationEnd",F[F.ActivationStart=13]="ActivationStart",F[F.ActivationEnd=14]="ActivationEnd",F[F.Scroll=15]="Scroll",F[F.NavigationSkipped=16]="NavigationSkipped",F}(le||{});class me{constructor(fe,$){this.id=fe,this.url=$}}class Re extends me{constructor(fe,$,ve="imperative",ht=null){super(fe,$),this.type=le.NavigationStart,this.navigationTrigger=ve,this.restoredState=ht}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Pt extends me{constructor(fe,$,ve){super(fe,$),this.urlAfterRedirects=ve,this.type=le.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var ln=function(F){return F[F.Redirect=0]="Redirect",F[F.SupersededByNewNavigation=1]="SupersededByNewNavigation",F[F.NoDataFromResolver=2]="NoDataFromResolver",F[F.GuardRejected=3]="GuardRejected",F}(ln||{}),En=function(F){return F[F.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",F[F.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",F}(En||{});class Mn extends me{constructor(fe,$,ve,ht){super(fe,$),this.reason=ve,this.code=ht,this.type=le.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class br extends me{constructor(fe,$,ve,ht){super(fe,$),this.reason=ve,this.code=ht,this.type=le.NavigationSkipped}}class Br extends me{constructor(fe,$,ve,ht){super(fe,$),this.error=ve,this.target=ht,this.type=le.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jr extends me{constructor(fe,$,ve,ht){super(fe,$),this.urlAfterRedirects=ve,this.state=ht,this.type=le.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class gn extends me{constructor(fe,$,ve,ht){super(fe,$),this.urlAfterRedirects=ve,this.state=ht,this.type=le.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Xe extends me{constructor(fe,$,ve,ht,qt){super(fe,$),this.urlAfterRedirects=ve,this.state=ht,this.shouldActivate=qt,this.type=le.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Tt extends me{constructor(fe,$,ve,ht){super(fe,$),this.urlAfterRedirects=ve,this.state=ht,this.type=le.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class An extends me{constructor(fe,$,ve,ht){super(fe,$),this.urlAfterRedirects=ve,this.state=ht,this.type=le.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Nn{constructor(fe){this.route=fe,this.type=le.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class ir{constructor(fe){this.route=fe,this.type=le.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class pr{constructor(fe){this.snapshot=fe,this.type=le.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Tr{constructor(fe){this.snapshot=fe,this.type=le.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Gr{constructor(fe){this.snapshot=fe,this.type=le.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qr{constructor(fe){this.snapshot=fe,this.type=le.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ri{constructor(fe,$,ve){this.routerEvent=fe,this.position=$,this.anchor=ve,this.type=le.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Hr{}class zt{constructor(fe){this.url=fe}}class bt{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new It,this.attachRef=null}}let It=(()=>{class F{constructor(){this.contexts=new Map}onChildOutletCreated($,ve){const ht=this.getOrCreateContext($);ht.outlet=ve,this.contexts.set($,ht)}onChildOutletDestroyed($){const ve=this.getContext($);ve&&(ve.outlet=null,ve.attachRef=null)}onOutletDeactivated(){const $=this.contexts;return this.contexts=new Map,$}onOutletReAttached($){this.contexts=$}getOrCreateContext($){let ve=this.getContext($);return ve||(ve=new bt,this.contexts.set($,ve)),ve}getContext($){return this.contexts.get($)||null}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();class _t{constructor(fe){this._root=fe}get root(){return this._root.value}
1parent(fe){const $=this.pathFromRoot(fe);return $.length>1?$[$.length-2]:null}children(fe){const $=hn(fe,this._root);return $?$.children.map(ve=>ve.value):[]}firstChild(fe){const $=hn(fe,this._root);return $&&$.children.length>0?$.children[0].value:null}siblings(fe){const $=T(fe,this._root);return $.length<2?[]:$[$.length-2].children.map(ht=>ht.value).filter(ht=>ht!==fe)}pathFromRoot(fe){return T(fe,this._root).map($=>$.value)}}function hn(F,fe){if(F===fe.value)return fe;for(const $ of fe.children){const ve=hn(F,$);if(ve)return ve}return null}function T(F,fe){if(F===fe.value)return[fe];for(const $ of fe.children){const ve=T(F,$);if(ve.length)return ve.unshift(fe),ve}return[]}class st{constructor(fe,$){this.value=fe,this.children=$}toString(){return`TreeNode(${this.value})`}}function Z(F){const fe={};return F&&F.children.forEach($=>fe[$.value.outlet]=$),fe}class wt extends _t{constructor(fe,$){super(fe),this.snapshot=$,ie(this,fe)}toString(){return this.snapshot.toString()}}function Vt(F){const fe=function Sr(F){const qt=new Ee([],{},{},"",{},Dt,F,null,{});return new U("",new st(qt,[]))}(F),$=new S.g([new ti("",{})]),ve=new S.g({}),ht=new S.g({}),qt=new S.g({}),zn=new S.g(""),Cr=new St($,ve,qt,zn,ht,Dt,F,fe.root);return Cr.snapshot=fe.root,new wt(new st(Cr,[]),fe)}class St{constructor(fe,$,ve,ht,qt,zn,Cr,Ur){this.urlSubject=fe,this.paramsSubject=$,this.queryParamsSubject=ve,this.fragmentSubject=ht,this.dataSubject=qt,this.outlet=zn,this.component=Cr,this._futureSnapshot=Ur,this.title=this.dataSubject?.pipe((0,ae.k)(Hi=>Hi[He]))??(0,P.of)(void 0),this.url=fe,this.params=$,this.queryParams=ve,this.fragment=ht,this.data=qt}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe((0,ae.k)(fe=>xt(fe))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe((0,ae.k)(fe=>xt(fe))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Rt(F,fe,$="emptyOnly"){let ve;const{routeConfig:ht}=F;return ve=null===fe||"always"!==$&&""!==ht?.path&&(fe.component||fe.routeConfig?.loadComponent)?{params:{...F.params},data:{...F.data},resolve:{...F.data,...F._resolvedData??{}}}:{params:{...fe.params,...F.params},data:{...fe.data,...F.data},resolve:{...F.data,...fe.data,...ht?.data,...F._resolvedData}},ht&&$e(ht)&&(ve.resolve[He]=ht.title),ve}class Ee{get title(){return this.data?.[He]}constructor(fe,$,ve,ht,qt,zn,Cr,Ur,Hi){this.url=fe,this.params=$,this.queryParams=ve,this.fragment=ht,this.data=qt,this.outlet=zn,this.component=Cr,this.routeConfig=Ur,this._resolve=Hi}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=xt(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=xt(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(ve=>ve.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class U extends _t{constructor(fe,$){super($),this.url=fe,ie(this,$)}toString(){return V(this._root)}}function ie(F,fe){fe.value._routerState=F,fe.children.forEach($=>ie(F,$))}function V(F){const fe=F.children.length>0?` { ${F.children.map(V).join(", ")} } `:"";return`${F.value}${fe}`}function ne(F){if(F.snapshot){const fe=F.snapshot,$=F._futureSnapshot;F.snapshot=$,cn(fe.queryParams,$.queryParams)||F.queryParamsSubject.next($.queryParams),fe.fragment!==$.fragment&&F.fragmentSubject.next($.fragment),cn(fe.params,$.params)||F.paramsSubject.next($.params),function rn(F,fe){if(F.length!==fe.length)return!1;for(let $=0;$<F.length;++$)if(!cn(F[$],fe[$]))return!1;return!0}(fe.url,$.url)||F.urlSubject.next($.url),cn(fe.data,$.data)||F.dataSubject.next($.data)}else F.snapshot=F._futureSnapshot,F.dataSubject.next(F._futureSnapshot.data)}function je(F,fe){const $=cn(F.params,fe.params)&&function Nr(F,fe){return Kr(F,fe)&&F.every(($,ve)=>cn($.parameters,fe[ve].parameters))}(F.url,fe.url);return $&&!(!F.parent!=!fe.parent)&&(!F.parent||je(F.parent,fe.parent))}function $e(F){return"string"==typeof F.title||null===F.title}let Wt=(()=>{class F{constructor(){this.activated=null,this._activatedRoute=null,this.name=Dt,this.activateEvents=new i._w7,this.deactivateEvents=new i._w7,this.attachEvents=new i._w7,this.detachEvents=new i._w7,this.parentContexts=(0,i.uUt)(It),this.location=(0,i.uUt)(i.y8U),this.changeDetector=(0,i.uUt)(i.kD9),this.environmentInjector=(0,i.uUt)(i.SIe),this.inputBinder=(0,i.uUt)(rr,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges($){if($.name){const{firstChange:ve,previousValue:ht}=$.name;if(ve)return;this.isTrackedInParentContexts(ht)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(ht)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts($){return this.parentContexts.getContext($)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const $=this.parentContexts.getContext(this.name);$?.route&&($.attachRef?this.attach($.attachRef,$.route):this.activateWith($.route,$.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new i.OBp(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new i.OBp(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new i.OBp(4012,!1);this.location.detach();const $=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit($.instance),$}attach($,ve){this.activated=$,this._activatedRoute=ve,this.location.insert($.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit($.instance)}deactivate(){if(this.activated){const $=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit($)}}activateWith($,ve){if(this.isActivated)throw new i.OBp(4013,!1);this._activatedRoute=$;
1const ht=this.location,zn=$.snapshot.component,Cr=this.parentContexts.getOrCreateContext(this.name).children,Ur=new In($,Cr,ht.injector);this.activated=ht.createComponent(zn,{index:ht.length,injector:Ur,environmentInjector:ve??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275dir=i.Sc5({type:F,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[i.SYr]})}return F})();class In{constructor(fe,$,ve){this.route=fe,this.childContexts=$,this.parent=ve}get(fe,$){return fe===St?this.route:fe===It?this.childContexts:this.parent.get(fe,$)}}const rr=new i.UbH("");let fr=(()=>{class F{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent($){this.unsubscribeFromRouteData($),this.subscribeToRouteData($)}unsubscribeFromRouteData($){this.outletDataSubscriptions.get($)?.unsubscribe(),this.outletDataSubscriptions.delete($)}subscribeToRouteData($){const{activatedRoute:ve}=$,ht=(0,R.E)([ve.queryParams,ve.params,ve.data]).pipe((0,Ve.G)(([qt,zn,Cr],Ur)=>(Cr={...qt,...zn,...Cr},0===Ur?(0,P.of)(Cr):Promise.resolve(Cr)))).subscribe(qt=>{if(!$.isActivated||!$.activatedComponentRef||$.activatedRoute!==ve||null===ve.component)return void this.unsubscribeFromRouteData($);const zn=(0,i.o9M)(ve.component);if(zn)for(const{templateName:Cr}of zn.inputs)$.activatedComponentRef.setInput(Cr,qt[Cr]);else this.unsubscribeFromRouteData($)});this.outletDataSubscriptions.set($,ht)}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac})}return F})();function Rr(F,fe,$){if($&&F.shouldReuseRoute(fe.value,$.value.snapshot)){const ve=$.value;ve._futureSnapshot=fe.value;const ht=function xi(F,fe,$){return fe.children.map(ve=>{for(const ht of $.children)if(F.shouldReuseRoute(ve.value,ht.value.snapshot))return Rr(F,ve,ht);return Rr(F,ve)})}(F,fe,$);return new st(ve,ht)}{if(F.shouldAttach(fe.value)){const qt=F.retrieve(fe.value);if(null!==qt){const zn=qt.route;return zn.value._futureSnapshot=fe.value,zn.children=fe.children.map(Cr=>Rr(F,Cr)),zn}}const ve=function Oi(F){return new St(new S.g(F.url),new S.g(F.params),new S.g(F.queryParams),new S.g(F.fragment),new S.g(F.data),F.outlet,F.component,F)}(fe.value),ht=fe.children.map(qt=>Rr(F,qt));return new st(ve,ht)}}const bs="ngNavigationCancelingError";function fs(F,fe){const{redirectTo:$,navigationBehaviorOptions:ve}=Ai(fe)?{redirectTo:fe,navigationBehaviorOptions:void 0}:fe,ht=Gs(!1,ln.Redirect);return ht.url=$,ht.navigationBehaviorOptions=ve,ht}function Gs(F,fe){const $=new Error(`NavigationCancelingError: ${F||""}`);return $[bs]=!0,$.cancellationCode=fe,$}function Ci(F){return!!F&&F[bs]}let Js=(()=>{class F{static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275cmp=i.In1({type:F,selectors:[["ng-component"]],standalone:!0,features:[i.UHJ],decls:1,vars:0,template:function(ve,ht){1&ve&&i.wR5(0,"router-outlet")},dependencies:[Wt],encapsulation:2})}return F})();function tt(F){const fe=F.children&&F.children.map(tt),$=fe?{...F,children:fe}:{...F};return!$.component&&!$.loadComponent&&(fe||$.loadChildren)&&$.outlet&&$.outlet!==Dt&&($.component=Js),$}function Et(F){return F.outlet||Dt}function Gn(F){if(!F)return null;if(F.routeConfig?._injector)return F.routeConfig._injector;for(let fe=F.parent;fe;fe=fe.parent){const $=fe.routeConfig;if($?._loadedInjector)return $._loadedInjector;if($?._injector)return $._injector}return null}class Gi{constructor(fe,$,ve,ht,qt){this.routeReuseStrategy=fe,this.futureState=$,this.currState=ve,this.forwardEvent=ht,this.inputBindingEnabled=qt}activate(fe){const $=this.futureState._root,ve=this.currState?this.currState._root:null;this.deactivateChildRoutes($,ve,fe),ne(this.futureState.root),this.activateChildRoutes($,ve,fe)}deactivateChildRoutes(fe,$,ve){const ht=Z($);
1fe.children.forEach(qt=>{const zn=qt.value.outlet;this.deactivateRoutes(qt,ht[zn],ve),delete ht[zn]}),Object.values(ht).forEach(qt=>{this.deactivateRouteAndItsChildren(qt,ve)})}deactivateRoutes(fe,$,ve){const ht=fe.value,qt=$?$.value:null;if(ht===qt)if(ht.component){const zn=ve.getContext(ht.outlet);zn&&this.deactivateChildRoutes(fe,$,zn.children)}else this.deactivateChildRoutes(fe,$,ve);else qt&&this.deactivateRouteAndItsChildren($,ve)}deactivateRouteAndItsChildren(fe,$){fe.value.component&&this.routeReuseStrategy.shouldDetach(fe.value.snapshot)?this.detachAndStoreRouteSubtree(fe,$):this.deactivateRouteAndOutlet(fe,$)}detachAndStoreRouteSubtree(fe,$){const ve=$.getContext(fe.value.outlet),ht=ve&&fe.value.component?ve.children:$,qt=Z(fe);for(const zn of Object.values(qt))this.deactivateRouteAndItsChildren(zn,ht);if(ve&&ve.outlet){const zn=ve.outlet.detach(),Cr=ve.children.onOutletDeactivated();this.routeReuseStrategy.store(fe.value.snapshot,{componentRef:zn,route:fe,contexts:Cr})}}deactivateRouteAndOutlet(fe,$){const ve=$.getContext(fe.value.outlet),ht=ve&&fe.value.component?ve.children:$,qt=Z(fe);for(const zn of Object.values(qt))this.deactivateRouteAndItsChildren(zn,ht);ve&&(ve.outlet&&(ve.outlet.deactivate(),ve.children.onOutletDeactivated()),ve.attachRef=null,ve.route=null)}activateChildRoutes(fe,$,ve){const ht=Z($);fe.children.forEach(qt=>{this.activateRoutes(qt,ht[qt.value.outlet],ve),this.forwardEvent(new qr(qt.value.snapshot))}),fe.children.length&&this.forwardEvent(new Tr(fe.value.snapshot))}activateRoutes(fe,$,ve){const ht=fe.value,qt=$?$.value:null;if(ne(ht),ht===qt)if(ht.component){const zn=ve.getOrCreateContext(ht.outlet);this.activateChildRoutes(fe,$,zn.children)}else this.activateChildRoutes(fe,$,ve);else if(ht.component){const zn=ve.getOrCreateContext(ht.outlet);if(this.routeReuseStrategy.shouldAttach(ht.snapshot)){const Cr=this.routeReuseStrategy.retrieve(ht.snapshot);this.routeReuseStrategy.store(ht.snapshot,null),zn.children.onOutletReAttached(Cr.contexts),zn.attachRef=Cr.componentRef,zn.route=Cr.route.value,zn.outlet&&zn.outlet.attach(Cr.componentRef,Cr.route.value),ne(Cr.route.value),this.activateChildRoutes(fe,null,zn.children)}else{const Cr=Gn(ht.snapshot);zn.attachRef=null,zn.route=ht,zn.injector=Cr,zn.outlet&&zn.outlet.activateWith(ht,zn.injector),this.activateChildRoutes(fe,null,zn.children)}}else this.activateChildRoutes(fe,null,ve)}}class zi{constructor(fe){this.path=fe,this.route=this.path[this.path.length-1]}}class is{constructor(fe,$){this.component=fe,this.route=$}}function es(F,fe,$){const ve=F._root;return Ue(ve,fe?fe._root:null,$,[ve.value])}function hs(F,fe){const $=Symbol(),ve=fe.get(F,$);return ve===$?"function"!=typeof F||(0,i.K_M)(F)?fe.get(F):F:ve}function Ue(F,fe,$,ve,ht={canDeactivateChecks:[],canActivateChecks:[]}){const qt=Z(fe);return F.children.forEach(zn=>{(function yn(F,fe,$,ve,ht={canDeactivateChecks:[],canActivateChecks:[]}){const qt=F.value,zn=fe?fe.value:null,Cr=$?$.getContext(F.value.outlet):null;if(zn&&qt.routeConfig===zn.routeConfig){const Ur=function Kt(F,fe,$){if("function"==typeof $)return $(F,fe);switch($){case"pathParamsChange":return!Kr(F.url,fe.url);case"pathParamsOrQueryParamsChange":return!Kr(F.url,fe.url)||!cn(F.queryParams,fe.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!je(F,fe)||!cn(F.queryParams,fe.queryParams);default:return!je(F,fe)}}(zn,qt,qt.routeConfig.runGuardsAndResolvers);Ur?ht.canActivateChecks.push(new zi(ve)):(qt.data=zn.data,qt._resolvedData=zn._resolvedData),Ue(F,fe,qt.component?Cr?Cr.children:null:$,ve,ht),Ur&&Cr&&Cr.outlet&&Cr.outlet.isActivated&&ht.canDeactivateChecks.push(new is(Cr.outlet.component,zn))}else zn&&Bt(fe,Cr,ht),ht.canActivateChecks.push(new zi(ve)),Ue(F,null,qt.component?Cr?Cr.children:null:$,ve,ht)})(zn,qt[zn.value.outlet],$,ve.concat([zn.value]),ht),delete qt[zn.value.outlet]}),Object.entries(qt).forEach(([zn,Cr])=>Bt(Cr,$.getContext(zn),ht)),ht}function Bt(F,fe,$){const ve=Z(F),ht=F.value;Object.entries(ve).forEach(([qt,zn])=>{Bt(zn,ht.component?fe?fe.children.getContext(qt):null:fe,$)}),$.canDeactivateChecks.push(new is(ht.component&&fe&&fe.outlet&&fe.outlet.isActivated?fe.outlet.component:null,ht))}function Qn(F){return"function"==typeof F}function ze(F){return F instanceof k.G||"EmptyError"===F?.name}const he=Symbol("INITIAL_VALUE");function Ft(){return(0,Ve.G)(F=>(0,R.E)(F.map(fe=>fe.pipe((0,Ne.U)(1),(0,Ie.W)(he)))).pipe((0,ae.k)(fe=>{for(const $ of fe)if(!0!==$){if($===he)return he;if(!1===$||$ instanceof Vr)return $}return!0}),(0,H.I)(fe=>fe!==he),(0,Ne.U)(1)))}function No(F){return(0,ee.W)((0,W.y)(fe=>{if(Ai(fe))throw fs(0,fe)}),(0,ae.k)(fe=>!0===fe))}class ra{constructor(fe){this.segmentGroup=fe||null}}
1class qo extends Error{constructor(fe){super(),this.urlTree=fe}}function fo(F){return te(new ra(F))}class nl{constructor(fe,$){this.urlSerializer=fe,this.urlTree=$}lineralizeSegments(fe,$){let ve=[],ht=$.root;for(;;){if(ve=ve.concat(ht.segments),0===ht.numberOfChildren)return(0,P.of)(ve);if(ht.numberOfChildren>1||!ht.children[Dt])return te(new i.OBp(4e3,!1));ht=ht.children[Dt]}}applyRedirectCommands(fe,$,ve){const ht=this.applyRedirectCreateUrlTree($,this.urlSerializer.parse($),fe,ve);if($.startsWith("/"))throw new qo(ht);return ht}applyRedirectCreateUrlTree(fe,$,ve,ht){const qt=this.createSegmentGroup(fe,$.root,ve,ht);return new Vr(qt,this.createQueryParams($.queryParams,this.urlTree.queryParams),$.fragment)}createQueryParams(fe,$){const ve={};return Object.entries(fe).forEach(([ht,qt])=>{if("string"==typeof qt&&qt.startsWith(":")){const Cr=qt.substring(1);ve[ht]=$[Cr]}else ve[ht]=qt}),ve}createSegmentGroup(fe,$,ve,ht){const qt=this.createSegments(fe,$.segments,ve,ht);let zn={};return Object.entries($.children).forEach(([Cr,Ur])=>{zn[Cr]=this.createSegmentGroup(fe,Ur,ve,ht)}),new Fr(qt,zn)}createSegments(fe,$,ve,ht){return $.map(qt=>qt.path.startsWith(":")?this.findPosParam(fe,qt,ht):this.findOrReturn(qt,ve))}findPosParam(fe,$,ve){const ht=ve[$.path.substring(1)];if(!ht)throw new i.OBp(4001,!1);return ht}findOrReturn(fe,$){let ve=0;for(const ht of $){if(ht.path===fe.path)return $.splice(ve),ht;ve++}return fe}}const Co={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Sa(F,fe,$,ve,ht){const qt=Ll(F,fe,$);return qt.matched?(ve=function Nt(F,fe){return F.providers&&!F._injector&&(F._injector=(0,i.SIz)(F.providers,fe,`Route: ${F.path}`)),F._injector??fe}(fe,ve),function ss(F,fe,$,ve){const ht=fe.canMatch;if(!ht||0===ht.length)return(0,P.of)(!0);const qt=ht.map(zn=>{const Cr=hs(zn,F);return rt(function Ge(F){return F&&Qn(F.canMatch)}(Cr)?Cr.canMatch(fe,$):(0,i.SMS)(F,()=>Cr(fe,$)))});return(0,P.of)(qt).pipe(Ft(),No())}(ve,fe,$).pipe((0,ae.k)(zn=>!0===zn?qt:{...Co}))):(0,P.of)(qt)}function Ll(F,fe,$){if("**"===fe.path)return function Go(F){return{matched:!0,parameters:F.length>0?lt(F).parameters:{},consumedSegments:F,remainingSegments:[],positionalParamSegments:{}}}($);if(""===fe.path)return"full"===fe.pathMatch&&(F.hasChildren()||$.length>0)?{...Co}:{matched:!0,consumedSegments:[],remainingSegments:$,parameters:{},positionalParamSegments:{}};const ht=(fe.matcher||pt)($,F,fe);if(!ht)return{...Co};const qt={};Object.entries(ht.posParams??{}).forEach(([Cr,Ur])=>{qt[Cr]=Ur.path});const zn=ht.consumed.length>0?{...qt,...ht.consumed[ht.consumed.length-1].parameters}:qt;return{matched:!0,consumedSegments:ht.consumed,remainingSegments:$.slice(ht.consumed.length),parameters:zn,positionalParamSegments:ht.posParams??{}}}function Ta(F,fe,$,ve){return $.length>0&&function Ua(F,fe,$){return $.some(ve=>Qo(F,fe,ve)&&Et(ve)!==Dt)}(F,$,ve)?{segmentGroup:new Fr(fe,rl(ve,new Fr($,F.children))),slicedSegments:[]}:0===$.length&&function ia(F,fe,$){return $.some(ve=>Qo(F,fe,ve))}(F,$,ve)?{segmentGroup:new Fr(F.segments,Vs(F,$,ve,F.children)),slicedSegments:$}:{segmentGroup:new Fr(F.segments,F.children),slicedSegments:$}}function Vs(F,fe,$,ve){const ht={};for(const qt of $)if(Qo(F,fe,qt)&&!ve[Et(qt)]){const zn=new Fr([],{});ht[Et(qt)]=zn}return{...ve,...ht}}function rl(F,fe){const $={};$[Dt]=fe;for(const ve of F)if(""===ve.path&&Et(ve)!==Dt){const ht=new Fr([],{});$[Et(ve)]=ht}return $}function Qo(F,fe,$){return(!(F.hasChildren()||fe.length>0)||"full"!==$.pathMatch)&&""===$.path}class uu{}class Jo{constructor(fe,$,ve,ht,qt,zn,Cr){this.injector=fe,this.configLoader=$,this.rootComponentType=ve,this.config=ht,this.urlTree=qt,this.paramsInheritanceStrategy=zn,this.urlSerializer=Cr,this.applyRedirects=new nl(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(fe){return new i.OBp(4002,`'${fe.segmentGroup}'`)}recognize(){const fe=Ta(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(fe).pipe((0,ae.k)($=>{const ve=new Ee([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Dt,this.rootComponentType,null,{}),ht=new st(ve,$),qt=new U("",ht),zn=function Di(F,fe,$=null,ve=null){return nr(Pi(F),fe,$,ve)}(ve,[],this.urlTree.queryParams,this.urlTree.fragment);return zn.queryParams=this.urlTree.queryParams,qt.url=this.urlSerializer.serialize(zn),this.inheritParamsAndData(qt._root,null),{state:qt,tree:zn}}))}match(fe){return this.processSegmentGroup(this.injector,this.config,fe,Dt).pipe(At(ve=>{if(ve instanceof qo)return this.urlTree=ve.urlTree,this.match(ve.urlTree.root);throw ve instanceof ra?this.noMatchError(ve):ve}))}inheritParamsAndData(fe,$){const ve=fe.value,ht=Rt(ve,$,this.paramsInheritanceStrategy);ve.params=Object.freeze(ht.params),ve.data=Object.freeze(ht.data),fe.children.forEac
1h(qt=>this.inheritParamsAndData(qt,ve))}processSegmentGroup(fe,$,ve,ht){return 0===ve.segments.length&&ve.hasChildren()?this.processChildren(fe,$,ve):this.processSegment(fe,$,ve,ve.segments,ht,!0).pipe((0,ae.k)(qt=>qt instanceof st?[qt]:[]))}processChildren(fe,$,ve){const ht=[];for(const qt of Object.keys(ve.children))"primary"===qt?ht.unshift(qt):ht.push(qt);return(0,C.Q)(ht).pipe((0,Le.m)(qt=>{const zn=ve.children[qt],Cr=function Vn(F,fe){const $=F.filter(ve=>Et(ve)===fe);return $.push(...F.filter(ve=>Et(ve)!==fe)),$}($,qt);return this.processSegmentGroup(fe,Cr,zn,qt)}),(0,Ut.K)((qt,zn)=>(qt.push(...zn),qt)),(0,it.G)(null),function K(F,fe){const $=arguments.length>=2;return ve=>ve.pipe(F?(0,H.I)((ht,qt)=>F(ht,qt,ve)):ce.Z,(0,ue.s)(1),$?(0,it.G)(fe):(0,se._)(()=>new k.G))}(),(0,j.O)(qt=>{if(null===qt)return fo(ve);const zn=Ha(qt);return function ko(F){F.sort((fe,$)=>fe.value.outlet===Dt?-1:$.value.outlet===Dt?1:fe.value.outlet.localeCompare($.value.outlet))}(zn),(0,P.of)(zn)}))}processSegment(fe,$,ve,ht,qt,zn){return(0,C.Q)($).pipe((0,Le.m)(Cr=>this.processSegmentAgainstRoute(Cr._injector??fe,$,Cr,ve,ht,qt,zn).pipe(At(Ur=>{if(Ur instanceof ra)return(0,P.of)(null);throw Ur}))),(0,ye.K)(Cr=>!!Cr),At(Cr=>{if(ze(Cr))return function Va(F,fe,$){return 0===fe.length&&!F.children[$]}(ve,ht,qt)?(0,P.of)(new uu):fo(ve);throw Cr}))}processSegmentAgainstRoute(fe,$,ve,ht,qt,zn,Cr){return function os(F,fe,$,ve){return!!(Et(F)===ve||ve!==Dt&&Qo(fe,$,F))&&Ll(fe,F,$).matched}(ve,ht,qt,zn)?void 0===ve.redirectTo?this.matchSegmentAgainstRoute(fe,ht,ve,qt,zn):this.allowRedirects&&Cr?this.expandSegmentAgainstRouteUsingRedirect(fe,ht,$,ve,qt,zn):fo(ht):fo(ht)}expandSegmentAgainstRouteUsingRedirect(fe,$,ve,ht,qt,zn){const{matched:Cr,consumedSegments:Ur,positionalParamSegments:Hi,remainingSegments:Ss}=Ll($,ht,qt);if(!Cr)return fo($);ht.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const Ps=this.applyRedirects.applyRedirectCommands(Ur,ht.redirectTo,Hi);return this.applyRedirects.lineralizeSegments(ht,Ps).pipe((0,j.O)(So=>this.processSegment(fe,ve,$,So.concat(Ss),zn,!1)))}matchSegmentAgainstRoute(fe,$,ve,ht,qt){const zn=Sa($,ve,ht,fe);return"**"===ve.path&&($.children={}),zn.pipe((0,Ve.G)(Cr=>Cr.matched?this.getChildConfig(fe=ve._injector??fe,ve,ht).pipe((0,Ve.G)(({routes:Ur})=>{const Hi=ve._loadedInjector??fe,{consumedSegments:Ss,remainingSegments:Ps,parameters:So}=Cr,Wl=new Ee(Ss,So,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function Vl(F){return F.data||{}}(ve),Et(ve),ve.component??ve._loadedComponent??null,ve,function il(F){return F.resolve||{}}(ve)),{segmentGroup:zl,slicedSegments:Hl}=Ta($,Ss,Ps,Ur);if(0===Hl.length&&zl.hasChildren())return this.processChildren(Hi,Ur,zl).pipe((0,ae.k)(Ya=>null===Ya?null:new st(Wl,Ya)));if(0===Ur.length&&0===Hl.length)return(0,P.of)(new st(Wl,[]));const mu=Et(ve)===qt;return this.processSegment(Hi,Ur,zl,Hl,mu?Dt:qt,!0).pipe((0,ae.k)(Ya=>new st(Wl,Ya instanceof st?[Ya]:[])))})):fo($)))}getChildConfig(fe,$,ve){return $.children?(0,P.of)({routes:$.children,injector:fe}):$.loadChildren?void 0!==$._loadedRoutes?(0,P.of)({routes:$._loadedRoutes,injector:$._loadedInjector}):function vo(F,fe,$,ve){const ht=fe.canLoad;if(void 0===ht||0===ht.length)return(0,P.of)(!0);const qt=ht.map(zn=>{const Cr=hs(zn,F);return rt(function Or(F){return F&&Qn(F.canLoad)}(Cr)?Cr.canLoad(fe,$):(0,i.SMS)(F,()=>Cr(fe,$)))});return(0,P.of)(qt).pipe(Ft(),No())}(fe,$,ve).pipe((0,j.O)(ht=>ht?this.configLoader.loadChildren(fe,$).pipe((0,W.y)(qt=>{$._loadedRoutes=qt.routes,$._loadedInjector=qt.injector})):function bo(F){return te(Gs(!1,ln.GuardRejected))}())):(0,P.of)({routes:[],injector:fe})}}function Ba(F){const fe=F.value.routeConfig;return fe&&""===fe.path}function Ha(F){const fe=[],$=new Set;for(const ve of F){if(!Ba(ve)){fe.push(ve);continue}const ht=fe.find(qt=>ve.value.routeConfig===qt.value.routeConfig);void 0!==ht?(ht.children.push(...ve.children),$.add(ht)):fe.push(ve)}for(const ve of $){const ht=Ha(ve.children);fe.push(new st(ve.value,ht))}return fe.filter(ve=>!$.has(ve))}function Cs(F){const fe=F.children.map($=>Cs($)).flat();return[F,...fe]}function Tl(F){return(0,Ve.G)(fe=>{const $=F(fe);return $?(0,C.Q)($).pipe((0,ae.k)(()=>fe)):(0,P.of)(fe)})}let $a=(()=>{class F{buildTitle($){let ve,ht=$.root;for(;void 0!==ht;)ve=this.getResolvedTitleForRoute(ht)??ve,ht=ht.children.find(qt=>qt.outlet===Dt);return ve}getResolvedTitleForRoute($){return $.data[He]}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:()=>(0,i.uUt)(ea),providedIn:"root"})}return F})(),ea=(()=>{class F extends $a{constructor($){super(),this.title=$}updateTitle($){const ve=this.buildTitle($);void 0!==ve&&this.title.setTitle(ve)}static#e=this.\u0275fac=function(ve){return new(ve||F)(i.CoB(Lt.OY))};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();const Ca=new i.UbH("",{providedIn:"root",factory:()=>({})}),yo=new i.UbH("");let Ma=(()=>{class F{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=(0,i.uUt)(i.ESV)}loadComponent($){if(this.componentLoaders.get($))return this.componentLoaders.get($);if($._loadedComponent)return(0,P.of)($._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener($);const ve=rt($.loadComponent()).pipe((0,ae.k)(lo),(0,W.y)(qt=>{this.onLoadEndListener&&this.onLoadEndListener($),$._loadedComponent=qt}),(0,Pe.U)(()=>{this.componentLoaders.delete($)})),ht=new Se(ve,()=>new Ye.E).pipe(Y());return this.componentLoaders.set($,ht),ht}loadChildren($,ve){if(this.childrenLoaders.get(ve))return this.childrenLoaders.get(ve);if(ve._loadedRoutes)return(0,P.of)({routes:ve._loadedRoutes,injector:ve._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(ve);const qt=function Io(F,fe,$,ve){return rt(F.loadChildren()).pipe((0,ae.k)(lo),(0,j.O)(ht=>ht instanceof i.obV||Array.isArray(ht)?(0,P.of)(ht):(0,C.Q)(fe.compileModuleAsync(ht))),(0,ae.k)(ht=>{ve&&ve(F);let qt,zn,Cr=!1;return Array.isArray(ht)?(zn=ht,!0):(qt=ht.create($).injector,zn=qt.get(yo,[],{optional:!0,self:!0}).flat()),{routes:zn.map(tt),injector:qt}}))}(ve,this.compiler,$,this.onLoadEndListener).pipe((0,Pe.U)(()=>{this.childrenLoaders.delete(ve)})),zn=new Se(qt,()=>new Ye.E).pipe(Y());return this.childrenLoaders.set(ve,zn),zn}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();function lo(F){return function ho(F){return F&&"object"==typeof F&&"default"in F}(F)?F.default:F}let po=(()=>{class F{static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:()=>(0,i.uUt)(Vo),providedIn:"root"})}return F})(),Vo=(()=>{class F{shouldProcessUrl($){return!0}extract($){return $}merge($,ve){return $}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();const X=new i.UbH(""),ot=new i.UbH("");function Ae(F,fe,$){const ve=F.get(ot),ht=F.get(pe.Ud);return F.get(i.WW2).runOutsideAngular(()=>{if(!ht.startViewTransition||ve.skipNextTransition)return ve.skipNextTransition=!1,Promise.resolve();let qt;const zn=new Promise(Hi=>{qt=Hi}
1),Cr=ht.startViewTransition(()=>(qt(),function yt(F){return new Promise(fe=>{(0,i.I44)(fe,{injector:F})})}(F))),{onViewTransitionCreated:Ur}=ve;return Ur&&(0,i.SMS)(F,()=>Ur({transition:Cr,from:fe,to:$})),zn})}let xn=(()=>{class F{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Ye.E,this.transitionAbortSubject=new Ye.E,this.configLoader=(0,i.uUt)(Ma),this.environmentInjector=(0,i.uUt)(i.SIe),this.urlSerializer=(0,i.uUt)(sr),this.rootContexts=(0,i.uUt)(It),this.location=(0,i.uUt)(pe.oB),this.inputBindingEnabled=null!==(0,i.uUt)(rr,{optional:!0}),this.titleStrategy=(0,i.uUt)($a),this.options=(0,i.uUt)(Ca,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=(0,i.uUt)(po),this.createViewTransition=(0,i.uUt)(X,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>(0,P.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=ht=>this.events.next(new ir(ht)),this.configLoader.onLoadStartListener=ht=>this.events.next(new Nn(ht))}complete(){this.transitions?.complete()}handleNavigationRequest($){const ve=++this.navigationId;this.transitions?.next({...this.transitions.value,...$,id:ve})}setupNavigations($,ve,ht){return this.transitions=new S.g({id:0,currentUrlTree:ve,currentRawUrl:ve,extractedUrl:this.urlHandlingStrategy.extract(ve),urlAfterRedirects:this.urlHandlingStrategy.extract(ve),rawUrl:ve,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:on,restoredState:null,currentSnapshot:ht.snapshot,targetSnapshot:null,currentRouterState:ht,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,H.I)(qt=>0!==qt.id),(0,ae.k)(qt=>({...qt,extractedUrl:this.urlHandlingStrategy.extract(qt.rawUrl)})),(0,Ve.G)(qt=>{this.currentTransition=qt;let zn=!1,Cr=!1;return(0,P.of)(qt).pipe((0,W.y)(Ur=>{this.currentNavigation={id:Ur.id,initialUrl:Ur.rawUrl,extractedUrl:Ur.extractedUrl,trigger:Ur.source,extras:Ur.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,Ve.G)(Ur=>{const Hi=!$.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!Hi&&"reload"!==(Ur.extras.onSameUrlNavigation??$.onSameUrlNavigation)){const Ps="";return this.events.next(new br(Ur.id,this.urlSerializer.serialize(Ur.rawUrl),Ps,En.IgnoredSameUrlNavigation)),Ur.resolve(null),J.k}if(this.urlHandlingStrategy.shouldProcessUrl(Ur.rawUrl))return(0,P.of)(Ur).pipe((0,Ve.G)(Ps=>{const So=this.transitions?.getValue();return this.events.next(new Re(Ps.id,this.urlSerializer.serialize(Ps.extractedUrl),Ps.source,Ps.restoredState)),So!==this.transitions?.getValue()?J.k:Promise.resolve(Ps)}),function sl(F,fe,$,ve,ht,qt){return(0,j.O)(zn=>function Fl(F,fe,$,ve,ht,qt,zn="emptyOnly"){return new Jo(F,fe,$,ve,ht,zn,qt).recognize()}(F,fe,$,ve,zn.extractedUrl,ht,qt).pipe((0,ae.k)(({state:Cr,tree:Ur})=>({...zn,targetSnapshot:Cr,urlAfterRedirects:Ur}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,$.config,this.urlSerializer,this.paramsInheritanceStrategy),(0,W.y)(Ps=>{qt.targetSnapshot=Ps.targetSnapshot,qt.urlAfterRedirects=Ps.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:Ps.urlAfterRedirects};const So=new jr(Ps.id,this.urlSerializer.serialize(Ps.extractedUrl),this.urlSerializer.serialize(Ps.urlAfterRedirects),Ps.targetSnapshot);this.events.next(So)}));if(Hi&&this.urlHandlingStrategy.shouldProcessUrl(Ur.currentRawUrl)){const{id:Ps,extractedUrl:So,source:Wl,restoredState:zl,extras:Hl}=Ur,mu=new Re(Ps,this.urlSerializer.serialize(So),Wl,zl);this.events.next(mu);const Ya=Vt(this.rootComponentType).snapshot;return this.currentTransition=qt={...Ur,targetSnapshot:Ya,urlAfterRedirects:So,extras:{...Hl,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=So,(0,P.of)(qt)}{const Ps="";return this.events.next(new br(Ur.id,this.urlSerializer.serialize(Ur.extractedUrl),Ps,En.IgnoredByUrlHandlingStrategy)),Ur.resolve(null),J.k}}),(0,W.y)(Ur=>{const Hi=new gn(Ur.id,this.urlSerializer.serialize(Ur.extractedUrl),this.urlSerializer.serialize(Ur.urlAfterRedirects),Ur.targetSnapshot);this.events.next(Hi)}),(0,ae.k)(Ur=>(this.currentTransition=qt={...Ur,guards:es(Ur.targetSnapshot,Ur.currentSnapshot,this.rootContexts)},qt)),function Un(F,fe){return(0,j.O)($=>{const{targetSnapshot:ve,currentSnapshot:ht,guards:{canActivateChecks:qt,canDeactivateChecks:zn}}=$;return 0===zn.length&&0===qt.length?(0,P.of)({...$,guardsResult:!0}):function bi(F,fe,$,ve){return(0,C.Q)(F).pipe((0,j.O)(ht=>function as(F,fe,$,ve,ht){const qt=fe&&fe.routeConfig?fe.routeConfig.canDeactivate:null;if(!qt||0===qt.length)return(0,P.of)(!0);const zn=qt.map(Cr=>{const Ur=Gn(fe)??ht,Hi=hs(Cr,Ur);return rt(function Fi(F){return F&&Qn(F.canDeactivate)}(Hi)?Hi.canDeactivate(F,fe,$,ve):(0,i.SMS)(Ur,()=>Hi(F,fe,$,ve))).pipe((0,ye.K)())});return(0,P.of)(zn).pipe(Ft())}(ht.component,ht.route,$,fe,ve)),(0,ye.K)(ht=>!0!==ht,!0))}(zn,ve,ht,F).pipe((0,j.O)(Cr=>Cr&&function cr(F){return"boolean"==typeof F}(Cr)?function Ti(F,fe,$,ve){return(0,C.Q)(fe).pipe((0,Le.m)(ht=>
1(0,x.W)(function Ms(F,fe){return null!==F&&fe&&fe(new pr(F)),(0,P.of)(!0)}(ht.route.parent,ve),function us(F,fe){return null!==F&&fe&&fe(new Gr(F)),(0,P.of)(!0)}(ht.route,ve),function Us(F,fe,$){const ve=fe[fe.length-1],qt=fe.slice(0,fe.length-1).reverse().map(zn=>function go(F){const fe=F.routeConfig?F.routeConfig.canActivateChild:null;return fe&&0!==fe.length?{node:F,guards:fe}:null}(zn)).filter(zn=>null!==zn).map(zn=>(0,D.Q)(()=>{const Cr=zn.guards.map(Ur=>{const Hi=Gn(zn.node)??$,Ss=hs(Ur,Hi);return rt(function fi(F){return F&&Qn(F.canActivateChild)}(Ss)?Ss.canActivateChild(ve,F):(0,i.SMS)(Hi,()=>Ss(ve,F))).pipe((0,ye.K)())});return(0,P.of)(Cr).pipe(Ft())}));return(0,P.of)(qt).pipe(Ft())}(F,ht.path,$),function ks(F,fe,$){const ve=fe.routeConfig?fe.routeConfig.canActivate:null;if(!ve||0===ve.length)return(0,P.of)(!0);const ht=ve.map(qt=>(0,D.Q)(()=>{const zn=Gn(fe)??$,Cr=hs(qt,zn);return rt(function ii(F){return F&&Qn(F.canActivate)}(Cr)?Cr.canActivate(fe,F):(0,i.SMS)(zn,()=>Cr(fe,F))).pipe((0,ye.K)())}));return(0,P.of)(ht).pipe(Ft())}(F,ht.route,$))),(0,ye.K)(ht=>!0!==ht,!0))}(ve,qt,F,fe):(0,P.of)(Cr)),(0,ae.k)(Cr=>({...$,guardsResult:Cr})))})}(this.environmentInjector,Ur=>this.events.next(Ur)),(0,W.y)(Ur=>{if(qt.guardsResult=Ur.guardsResult,Ai(Ur.guardsResult))throw fs(0,Ur.guardsResult);const Hi=new Xe(Ur.id,this.urlSerializer.serialize(Ur.extractedUrl),this.urlSerializer.serialize(Ur.urlAfterRedirects),Ur.targetSnapshot,!!Ur.guardsResult);this.events.next(Hi)}),(0,H.I)(Ur=>!!Ur.guardsResult||(this.cancelNavigationTransition(Ur,"",ln.GuardRejected),!1)),Tl(Ur=>{if(Ur.guards.canActivateChecks.length)return(0,P.of)(Ur).pipe((0,W.y)(Hi=>{const Ss=new Tt(Hi.id,this.urlSerializer.serialize(Hi.extractedUrl),this.urlSerializer.serialize(Hi.urlAfterRedirects),Hi.targetSnapshot);this.events.next(Ss)}),(0,Ve.G)(Hi=>{let Ss=!1;return(0,P.of)(Hi).pipe(function li(F,fe){return(0,j.O)($=>{const{targetSnapshot:ve,guards:{canActivateChecks:ht}}=$;if(!ht.length)return(0,P.of)($);const qt=new Set(ht.map(Ur=>Ur.route)),zn=new Set;for(const Ur of qt)if(!zn.has(Ur))for(const Hi of Cs(Ur))zn.add(Hi);let Cr=0;return(0,C.Q)(zn).pipe((0,Le.m)(Ur=>qt.has(Ur)?function ol(F,fe,$,ve){const ht=F.routeConfig,qt=F._resolve;return void 0!==ht?.title&&!$e(ht)&&(qt[He]=ht.title),function cu(F,fe,$,ve){const ht=mn(F);if(0===ht.length)return(0,P.of)({});const qt={};return(0,C.Q)(ht).pipe((0,j.O)(zn=>function Ws(F,fe,$,ve){const ht=Gn(fe)??ve,qt=hs(F,ht);return rt(qt.resolve?qt.resolve(fe,$):(0,i.SMS)(ht,()=>qt(fe,$)))}(F[zn],fe,$,ve).pipe((0,ye.K)(),(0,W.y)(Cr=>{qt[zn]=Cr}))),(0,ue.s)(1),(0,_e.e)(qt),At(zn=>ze(zn)?J.k:te(zn)))}(qt,F,fe,ve).pipe((0,ae.k)(zn=>(F._resolvedData=zn,F.data=Rt(F,F.parent,$).resolve,null)))}(Ur,ve,F,fe):(Ur.data=Rt(Ur,Ur.parent,F).resolve,(0,P.of)(void 0))),(0,W.y)(()=>Cr++),(0,ue.s)(1),(0,j.O)(Ur=>Cr===zn.size?(0,P.of)($):J.k))})}(this.paramsInheritanceStrategy,this.environmentInjector),(0,W.y)({next:()=>Ss=!0,complete:()=>{Ss||this.cancelNavigationTransition(Hi,"",ln.NoDataFromResolver)}}))}),(0,W.y)(Hi=>{const Ss=new An(Hi.id,this.urlSerializer.serialize(Hi.extractedUrl),this.urlSerializer.serialize(Hi.urlAfterRedirects),Hi.targetSnapshot);this.events.next(Ss)}))}),Tl(Ur=>{const Hi=Ss=>{const Ps=[];Ss.routeConfig?.loadComponent&&!Ss.routeConfig._loadedComponent&&Ps.push(this.configLoader.loadComponent(Ss.routeConfig).pipe((0,W.y)(So=>{Ss.component=So}),(0,ae.k)(()=>{})));for(const So of Ss.children)Ps.push(...Hi(So));return Ps};return(0,R.E)(Hi(Ur.targetSnapshot.root)).pipe((0,it.G)(null),(0,Ne.U)(1))}),Tl(()=>this.afterPreactivation()),(0,Ve.G)(()=>{const{currentSnapshot:Ur,targetSnapshot:Hi}=qt,Ss=this.createViewTransition?.(this.environmentInjector,Ur.root,Hi.root);return Ss?(0,C.Q)(Ss).pipe((0,ae.k)(()=>qt)):(0,P.of)(qt)}),(0,ae.k)(Ur=>{const Hi=function Xn(F,fe,$){const ve=Rr(F,fe._root,$?$._root:void 0);return new wt(ve,fe)}($.routeReuseStrategy,Ur.targetSnapshot,Ur.currentRouterState);return this.currentTransition=qt={...Ur,targetRouterState:Hi},this.currentNavigation.targetRouterState=Hi,qt}),(0,W.y)(()=>{this.events.next(new Hr)}),((F,fe,$,ve)=>(0,ae.k)(ht=>(new Gi(fe,ht.targetRouterState,ht.currentRouterState,$,ve).activate(F),ht)))(this.rootContexts,$.routeReuseStrategy,Ur=>this.events.next(Ur),this.inputBindingEnabled),(0,Ne.U)(1),(0,W.y)({next:Ur=>{zn=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Pt(Ur.id,this.urlSerializer.serialize(Ur.extractedUrl),this.urlSerializer.serialize(Ur.urlAfterRedirects))),this.titleStrategy?.updateTitle(Ur.targetRouterState.snapshot),Ur.resolve(!0)},complete:()=>{zn=!0}}),(0,De.a)(this.transitionAbortSubject.pipe((0,W.y)(Ur=>{throw Ur}))),(0,Pe.U)(()=>
1{!zn&&!Cr&&this.cancelNavigationTransition(qt,"",ln.SupersededByNewNavigation),this.currentTransition?.id===qt.id&&(this.currentNavigation=null,this.currentTransition=null)}),At(Ur=>{if(Cr=!0,Ci(Ur))this.events.next(new Mn(qt.id,this.urlSerializer.serialize(qt.extractedUrl),Ur.message,Ur.cancellationCode)),function Ns(F){return Ci(F)&&Ai(F.url)}(Ur)?this.events.next(new zt(Ur.url)):qt.resolve(!1);else{this.events.next(new Br(qt.id,this.urlSerializer.serialize(qt.extractedUrl),Ur,qt.targetSnapshot??void 0));try{qt.resolve($.errorHandler(Ur))}catch(Hi){this.options.resolveNavigationPromiseOnError?qt.resolve(!1):qt.reject(Hi)}}return J.k}))}))}cancelNavigationTransition($,ve,ht){const qt=new Mn($.id,this.urlSerializer.serialize($.extractedUrl),ve,ht);this.events.next(qt),$.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();function qn(F){return F!==on}let Pr=(()=>{class F{static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:()=>(0,i.uUt)(pi),providedIn:"root"})}return F})();class ji{shouldDetach(fe){return!1}store(fe,$){}shouldAttach(fe){return!1}retrieve(fe){return null}shouldReuseRoute(fe,$){return fe.routeConfig===$.routeConfig}}let pi=(()=>{class F extends ji{static#e=this.\u0275fac=(()=>{let $;return function(ht){return($||($=i.otF(F)))(ht||F)}})();static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})(),Ar=(()=>{class F{static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:()=>(0,i.uUt)(Xr),providedIn:"root"})}return F})(),Xr=(()=>{class F extends Ar{constructor(){super(...arguments),this.location=(0,i.uUt)(pe.oB),this.urlSerializer=(0,i.uUt)(sr),this.options=(0,i.uUt)(Ca,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=(0,i.uUt)(po),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Vr,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Vt(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener($){return this.location.subscribe(ve=>{"popstate"===ve.type&&$(ve.url,ve.state)})}handleRouterEvent($,ve){if($ instanceof Re)this.stateMemento=this.createStateMemento();else if($ instanceof br)this.rawUrlTree=ve.initialUrl;else if($ instanceof jr){if("eager"===this.urlUpdateStrategy&&!ve.extras.skipLocationChange){const ht=this.urlHandlingStrategy.merge(ve.finalUrl,ve.initialUrl);this.setBrowserUrl(ht,ve)}}else $ instanceof Hr?(this.currentUrlTree=ve.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(ve.finalUrl,ve.initialUrl),this.routerState=ve.targetRouterState,"deferred"===this.urlUpdateStrategy&&(ve.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,ve))):$ instanceof Mn&&($.code===ln.GuardRejected||$.code===ln.NoDataFromResolver)?this.restoreHistory(ve):$ instanceof Br?this.restoreHistory(ve,!0):$ instanceof Pt&&(this.lastSuccessfulId=$.id,this.currentPageId=this.browserPageId)}setBrowserUrl($,ve){const ht=this.urlSerializer.serialize($);if(this.location.isCurrentPathEqualTo(ht)||ve.extras.replaceUrl){const zn={...ve.extras.state,...this.generateNgRouterState(ve.id,this.browserPageId)};this.location.replaceState(ht,"",zn)}else{const qt={...ve.extras.state,...this.generateNgRouterState(ve.id,this.browserPageId+1)};this.location.go(ht,"",qt)}}restoreHistory($,ve=!1){if("computed"===this.canceledNavigationResolution){const qt=this.currentPageId-this.browserPageId;0!==qt?this.location.historyGo(qt):this.currentUrlTree===$.finalUrl&&0===qt&&(this.resetState($),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(ve&&this.resetState($),this.resetUrlToCurrentUrlTree())}resetState($){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,$.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState($,ve){return"computed"===this.canceledNavigationResolution?{navigationId:$,\u0275routerPageId:ve}:{navigationId:$}}static#e=this.\u0275fac=(()=>{let $;return function(ht){return($||($=i.otF(F)))(ht||F)}})();static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();var Qi=function(F){return F[F.COMPLETE=0]="COMPLETE",F[F.FAILED=1]="FAILED",F[F.REDIRECTING=2]="REDIRECTING",F}(Qi||{});function no(F,fe){F.events.pipe((0,H.I)($=>$ instanceof Pt||$ instanceof Mn||$ instanceof Br||$ instanceof br),(0,ae.k)($=>$ instanceof Pt||$ instanceof br?Qi.COMPLETE:$ instanceof Mn&&($.code===ln.Redirect||$.code===ln.SupersededByNewNavigation)?Qi.REDIRECTING:Qi.FAILED),(0,H.I)($=>$!==Qi.REDIRECTING),(0,Ne.U)(1)).subscribe(()=>{fe()})}function Qs(F){throw F}const uo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},sa={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let ro=(()=>{class F{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=(0,i.uUt)(i.oPY),this.stateManager=(0,i.uUt)(Ar),this.options=(0,i.uUt)(Ca,{optional:!0})||{},this.pendingTasks=(0,i.uUt)(i.g9Y),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=(0,i.uUt)(xn),this.urlSerializer
1=(0,i.uUt)(sr),this.location=(0,i.uUt)(pe.oB),this.urlHandlingStrategy=(0,i.uUt)(po),this._events=new Ye.E,this.errorHandler=this.options.errorHandler||Qs,this.navigated=!1,this.routeReuseStrategy=(0,i.uUt)(Pr),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=(0,i.uUt)(yo,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!(0,i.uUt)(rr,{optional:!0}),this.eventsSubscription=new Q.wH,this.isNgZoneEnabled=(0,i.uUt)(i.WW2)instanceof i.WW2&&i.WW2.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:$=>{this.console.warn($)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const $=this.navigationTransitions.events.subscribe(ve=>{try{const ht=this.navigationTransitions.currentTransition,qt=this.navigationTransitions.currentNavigation;if(null!==ht&&null!==qt)if(this.stateManager.handleRouterEvent(ve,qt),ve instanceof Mn&&ve.code!==ln.Redirect&&ve.code!==ln.SupersededByNewNavigation)this.navigated=!0;else if(ve instanceof Pt)this.navigated=!0;else if(ve instanceof zt){const zn=this.urlHandlingStrategy.merge(ve.url,ht.currentRawUrl),Cr={info:ht.extras.info,skipLocationChange:ht.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||qn(ht.source)};this.scheduleNavigation(zn,on,null,Cr,{resolve:ht.resolve,reject:ht.reject,promise:ht.promise})}(function _a(F){return!(F instanceof Hr||F instanceof zt)})(ve)&&this._events.next(ve)}catch(ht){this.navigationTransitions.transitionAbortSubject.next(ht)}});this.eventsSubscription.add($)}resetRootComponentType($){this.routerState.root.component=$,this.navigationTransitions.rootComponentType=$}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),on,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener(($,ve)=>{setTimeout(()=>{this.navigateToSyncWithBrowser($,"popstate",ve)},0)})}navigateToSyncWithBrowser($,ve,ht){const qt={replaceUrl:!0},zn=ht?.navigationId?ht:null;if(ht){const Ur={...ht};delete Ur.navigationId,delete Ur.\u0275routerPageId,0!==Object.keys(Ur).length&&(qt.state=Ur)}const Cr=this.parseUrl($);this.scheduleNavigation(Cr,ve,zn,qt)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig($){this.config=$.map(tt),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree($,ve={}){const{relativeTo:ht,queryParams:qt,fragment:zn,queryParamsHandling:Cr,preserveFragment:Ur}=ve,Hi=Ur?this.currentUrlTree.fragment:zn;let Ps,Ss=null;switch(Cr){case"merge":Ss={...this.currentUrlTree.queryParams,...qt};break;case"preserve":Ss=this.currentUrlTree.queryParams;break;default:Ss=qt||null}null!==Ss&&(Ss=this.removeEmptyProps(Ss));try{Ps=Pi(ht?ht.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof $[0]||!$[0].startsWith("/"))&&($=[]),Ps=this.currentUrlTree.root}return nr(Ps,$,Ss,Hi??null)}navigateByUrl($,ve={skipLocationChange:!1}){const ht=Ai($)?$:this.parseUrl($),qt=this.urlHandlingStrategy.merge(ht,this.rawUrlTree);return this.scheduleNavigation(qt,on,null,ve)}navigate($,ve={skipLocationChange:!1}){return function ya(F){for(let fe=0;fe<F.length;fe++)if(null==F[fe])throw new i.OBp(4008,!1)}($),this.navigateByUrl(this.createUrlTree($,ve),ve)}serializeUrl($){return this.urlSerializer.serialize($)}parseUrl($){try{return this.urlSerializer.parse($)}catch{return this.urlSerializer.parse("/")}}isActive($,ve){let ht;if(ht=!0===ve?{...uo}:!1===ve?{...sa}:ve,Ai($))return Yn(this.currentUrlTree,$,ht);const qt=this.parseUrl($);return Yn(this.currentUrlTree,qt,ht)}removeEmptyProps($){return Object.entries($).reduce((ve,[ht,qt])=>(null!=qt&&(ve[ht]=qt),ve),{})}scheduleNavigation($,ve,ht,qt,zn){if(this.disposed)return Promise.resolve(!1);let Cr,Ur,Hi;zn?(Cr=zn.resolve,Ur=zn.reject,Hi=zn.promise):Hi=new Promise((Ps,So)=>{Cr=Ps,Ur=So});const Ss=this.pendingTasks.add();return no(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(Ss))}),this.navigationTransitions.handleNavigationRequest({source:ve,restoredState:ht,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:$,extras:qt,resolve:Cr,reject:Ur,promise:Hi,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Hi.catch(Ps=>Promise.reject(Ps))}static#e=this.\u0275fac=function(ve){return new(ve||F)};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})(),Zi=(()=>{class F{constructor($,ve,ht,qt,zn,Cr){this.router=$,this.route=ve,this.tabIndexAttribute=ht,this.renderer=qt,this.el=zn,this.locationStrategy=Cr,this.href=null,this.commands=null,this.onChanges=new Ye.E,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const Ur=zn.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===Ur||"area"===Ur,this.isAnchorElement?this.subscription=$.events.subscribe(Hi=>{Hi instanceof Pt&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl($){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",$)}ngOnChanges($){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink($){null!=$?(this.commands=Array.isArray($)?$:[$],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick($,ve,ht,qt,zn){const Cr=this.urlTree;return!!(null===Cr||this.isAnchorElement&&(0!==$||ve||ht||qt||zn||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(Cr,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){const $=this.urlTree;this.href=null!==$&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl($)):null;const ve=null===this.href?null:(0,i.YFg)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",ve)}applyAttributeValue($,ve){const ht=this.renderer,qt=this.el.nativeElement;null!==ve?ht.setAttribute(qt,$,ve):ht.removeAttribute(qt,$)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(ve){return new(ve||F)(i.GI1(ro),i.GI1(St),i.gJ8("tabindex"),i.GI1(i.q87),i.GI1(i.GMv),i.GI1(pe.Qd))};static#t=this.\u0275dir=i.Sc5({type:F,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(ve,ht){1&ve&&i.qCj("click",function(zn){return ht.onClick(zn.button,zn.ctrlKey,zn.shift
1Key,zn.altKey,zn.metaKey)}),2&ve&&i.e48("target",ht.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[i.Wk5.HasDecoratorInputTransform,"preserveFragment","preserveFragment",i.cZD],skipLocationChange:[i.Wk5.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",i.cZD],replaceUrl:[i.Wk5.HasDecoratorInputTransform,"replaceUrl","replaceUrl",i.cZD],routerLink:"routerLink"},standalone:!0,features:[i.QJr,i.SYr]})}return F})(),Eo=(()=>{class F{get isActive(){return this._isActive}constructor($,ve,ht,qt,zn){this.router=$,this.element=ve,this.renderer=ht,this.cdr=qt,this.link=zn,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new i._w7,this.routerEventsSubscription=$.events.subscribe(Cr=>{Cr instanceof Pt&&this.update()})}ngAfterContentInit(){(0,P.of)(this.links.changes,(0,P.of)(null)).pipe((0,ke.u)()).subscribe($=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const $=[...this.links.toArray(),this.link].filter(ve=>!!ve).map(ve=>ve.onChanges);this.linkInputChangesSubscription=(0,C.Q)($).pipe((0,ke.u)()).subscribe(ve=>{this._isActive!==this.isLinkActive(this.router)(ve)&&this.update()})}set routerLinkActive($){const ve=Array.isArray($)?$:$.split(" ");this.classes=ve.filter(ht=>!!ht)}ngOnChanges($){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{const $=this.hasActiveLinks();this._isActive!==$&&(this._isActive=$,this.cdr.markForCheck(),this.classes.forEach(ve=>{$?this.renderer.addClass(this.element.nativeElement,ve):this.renderer.removeClass(this.element.nativeElement,ve)}),$&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit($))})}isLinkActive($){const ve=function Is(F){return!!F.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return ht=>{const qt=ht.urlTree;return!!qt&&$.isActive(qt,ve)}}hasActiveLinks(){const $=this.isLinkActive(this.router);return this.link&&$(this.link)||this.links.some($)}static#e=this.\u0275fac=function(ve){return new(ve||F)(i.GI1(ro),i.GI1(i.GMv),i.GI1(i.q87),i.GI1(i.kD9),i.GI1(Zi,8))};static#t=this.\u0275dir=i.Sc5({type:F,selectors:[["","routerLinkActive",""]],contentQueries:function(ve,ht,qt){if(1&ve&&i.szK(qt,Zi,5),2&ve){let zn;i.wto(zn=i.Gqi())&&(ht.links=zn)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[i.SYr]})}return F})();class xa{}let Fu=(()=>{class F{constructor($,ve,ht,qt,zn){this.router=$,this.injector=ht,this.preloadingStrategy=qt,this.loader=zn}setUpPreloading(){this.subscription=this.router.events.pipe((0,H.I)($=>$ instanceof Pt),(0,Le.m)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes($,ve){const ht=[];for(const qt of ve){qt.providers&&!qt._injector&&(qt._injector=(0,i.SIz)(qt.providers,$,`Route: ${qt.path}`));const zn=qt._injector??$,Cr=qt._loadedInjector??zn;(qt.loadChildren&&!qt._loadedRoutes&&void 0===qt.canLoad||qt.loadComponent&&!qt._loadedComponent)&&ht.push(this.preloadConfig(zn,qt)),(qt.children||qt._loadedRoutes)&&ht.push(this.processRoutes(Cr,qt.children??qt._loadedRoutes))}return(0,C.Q)(ht).pipe((0,ke.u)())}preloadConfig($,ve){return this.preloadingStrategy.preload(ve,()=>{let ht;ht=ve.loadChildren&&void 0===ve.canLoad?this.loader.loadChildren($,ve):(0,P.of)(null);const qt=ht.pipe((0,j.O)(zn=>null===zn?(0,P.of)(void 0):(ve._loadedRoutes=zn.routes,ve._loadedInjector=zn.injector,this.processRoutes(zn.injector??$,zn.routes))));if(ve.loadComponent&&!ve._loadedComponent){const zn=this.loader.loadComponent(ve);return(0,C.Q)([qt,zn]).pipe((0,ke.u)())}return qt})}static#e=this.\u0275fac=function(ve){return new(ve||F)(i.CoB(ro),i.CoB(i.ESV),i.CoB(i.SIe),i.CoB(xa),i.CoB(Ma))};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac,providedIn:"root"})}return F})();const io=new i.UbH("");let ts=(()=>{class F{constructor($,ve,ht,qt,zn={}
1){this.urlSerializer=$,this.transitions=ve,this.viewportScroller=ht,this.zone=qt,this.options=zn,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},zn.scrollPositionRestoration||="disabled",zn.anchorScrolling||="disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe($=>{$ instanceof Re?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=$.navigationTrigger,this.restoredId=$.restoredState?$.restoredState.navigationId:0):$ instanceof Pt?(this.lastId=$.id,this.scheduleScrollEvent($,this.urlSerializer.parse($.urlAfterRedirects).fragment)):$ instanceof br&&$.code===En.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent($,this.urlSerializer.parse($.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe($=>{$ instanceof ri&&($.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition($.position):$.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor($.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent($,ve){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ri($,"popstate"===this.lastSource?this.store[this.restoredId]:null,ve))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(ve){i.KEo()};static#t=this.\u0275prov=i.wxM({token:F,factory:F.\u0275fac})}return F})();function Aa(F,fe){return{\u0275kind:F,\u0275providers:fe}}function Do(){const F=(0,i.uUt)(i.zZn);return fe=>{const $=F.get(i.Swk);if(fe!==$.components[0])return;const ve=F.get(ro),ht=F.get(vl);1===F.get(fa)&&ve.initialNavigation(),F.get(Jl,null,i._6O.Optional)?.setUpPreloading(),F.get(io,null,i._6O.Optional)?.init(),ve.resetRootComponentType($.componentTypes[0]),ht.closed||(ht.next(),ht.complete(),ht.unsubscribe())}}const vl=new i.UbH("",{factory:()=>new Ye.E}),fa=new i.UbH("",{providedIn:"root",factory:()=>1}),Jl=new i.UbH("");function Wo(F){return Aa(0,[{provide:Jl,useExisting:Fu},{provide:xa,useExisting:F}])}function Vu(F){return Aa(9,[{provide:X,useValue:Ae},{provide:ot,useValue:{skipNextTransition:!!F?.skipInitialTransition,...F}}])}const jl=new i.UbH("ROUTER_FORROOT_GUARD"),ha=[pe.oB,{provide:sr,useClass:or},ro,It,{provide:St,useFactory:function Es(F){return F.routerState.root},deps:[ro]},Ma,[]];let _l=(()=>{class F{constructor($){}static forRoot($,ve){return{ngModule:F,providers:[ha,[],{provide:yo,multi:!0,useValue:$},{provide:jl,useFactory:pa,deps:[[ro,new i.T7N,new i.Qfh]]},{provide:Ca,useValue:ve||{}},ve?.useHash?{provide:pe.Qd,useClass:pe.MP}:{provide:pe.Qd,useClass:pe.uC},{provide:io,useFactory:()=>{const F=(0,i.uUt)(pe.YZ),fe=(0,i.uUt)(i.WW2),$=(0,i.uUt)(Ca),ve=(0,i.uUt)(xn),ht=(0,i.uUt)(sr);return $.scrollOffset&&F.setOffset($.scrollOffset),new ts(ht,ve,F,fe,$)}},ve?.preloadingStrategy?Wo(ve.preloadingStrategy).\u0275providers:[],ve?.initialNavigation?al(ve):[],ve?.bindToComponentInputs?Aa(8,[fr,{provide:rr,useExisting:fr}]).\u0275providers:[],ve?.enableViewTransitions?Vu().\u0275providers:[],[{provide:Al,useFactory:Do},{provide:i.qid,multi:!0,useExisting:Al}]]}}static forChild($){return{ngModule:F,providers:[{provide:yo,multi:!0,useValue:$}]}}static#e=this.\u0275fac=function(ve){return new(ve||F)(i.CoB(jl,8))};static#t=this.\u0275mod=i.a4G({type:F});static#n=this.\u0275inj=i.s3X({})}return F})();function pa(F){return"guarded"}function al(F){return["disabled"===F.initialNavigation?Aa(3,[{provide:i.kZF,multi:!0,useFactory:()=>{const fe=(0,i.uUt)(ro);return()=>{fe.setUpLocationChangeListener()}}},{provide:fa,useValue:2}]).\u0275providers:[],"enabledBlocking"===F.initialNavigation?Aa(2,[{provide:fa,useValue:0},{provide:i.kZF,multi:!0,deps:[i.zZn],useFactory:fe=>{const $=fe.get(pe.mQ,Promise.resolve());return()=>$.then(()=>new Promise(ve=>{const ht=fe.get(ro),qt=fe.get(vl);no(ht,()=>{ve(!0)}),fe.get(xn).afterPreactivation=()=>(ve(!0),qt.closed?(0,P.of)(void 0):qt),ht.initialNavigation()}))}}]).\u0275providers:[]]}const Al=new i.UbH("")},98368:(B,G,a)=>{"use strict";a.d(G,{c:()=>Q});var i=a(27144),v=a(12540),b=a(99360),_=a(95976);class C{constructor(de,Y){this._delegate=de,this.firebase=Y,(0,b._addComponent)(de,new v.Yl("app-compat",()=>this,"PUBLIC")),this.container=de.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(de){this._delegate.automaticDataCollectionEnabled=de}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(de=>{this._delegate.checkDestroyed(),de()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),(0,b.deleteApp)(this._delegate)))}_getService(de,Y=b._DEFAULT_ENTRY_NAME){var Se;this._delegate.checkDestroyed();const Ye=this._delegate.container.getProvider(de);return!Ye.isInitialized()&&"EXPLICIT"===(null===(Se=Ye.getComponent())||void 0===Se?void 0:Se.instantiationMode)&&Ye.initialize(),Ye.getImmediate({identifier:Y})}_removeServiceInstance(de,Y=b._DEFAULT_ENTRY_NAME){this._delegate.container.getProvider(de).clearInstance(Y)}_addComponent(de){(0,b._addComponent)(this._delegate,de)}_addOrOverwriteComponent(de){(0,b._addOrOverwriteComponent)(this._delegate,de)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const S=new i.UR("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}
1' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."}),x=function k(){const we=function R(we){const de={},Y={__esModule:!0,initializeApp:function pe(Ie,H={}){const j=b.initializeApp(Ie,H);if((0,i.Y7)(de,j.name))return de[j.name];const ye=new we(j,Y);return de[j.name]=ye,ye},app:Ye,registerVersion:b.registerVersion,setLogLevel:b.setLogLevel,onLog:b.onLog,apps:null,SDK_VERSION:b.SDK_VERSION,INTERNAL:{registerComponent:function Ve(Ie){const H=Ie.name,j=H.replace("-compat","");if(b._registerComponent(Ie)&&"PUBLIC"===Ie.type){const ye=(Le=Ye())=>{if("function"!=typeof Le[j])throw S.create("invalid-app-argument",{appName:H});return Le[j]()};void 0!==Ie.serviceProps&&(0,i.Ww)(ye,Ie.serviceProps),Y[j]=ye,we.prototype[j]=function(...Le){return this._getService.bind(this,H).apply(this,Ie.multipleInstances?Le:[])}}return"PUBLIC"===Ie.type?Y[j]:null},removeApp:function Se(Ie){delete de[Ie]},useAsService:function Ne(Ie,H){return"serverAuth"===H?null:H},modularAPIs:b}};function Ye(Ie){if(!(0,i.Y7)(de,Ie=Ie||b._DEFAULT_ENTRY_NAME))throw S.create("no-app",{appName:Ie});return de[Ie]}return Y.default=Y,Object.defineProperty(Y,"apps",{get:function ae(){return Object.keys(de).map(Ie=>de[Ie])}}),Ye.App=we,Y}(C);return we.INTERNAL=Object.assign(Object.assign({},we.INTERNAL),{createFirebaseNamespace:k,extendNamespace:function de(Y){(0,i.Ww)(we,Y)},createSubscribe:i.my,ErrorFactory:i.UR,deepExtend:i.Ww}),we}(),D=new _.YJ("@firebase/app-compat");if((0,i.uH)()&&void 0!==self.firebase){D.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");const we=self.firebase.SDK_VERSION;we&&we.indexOf("LITE")>=0&&D.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}const Q=x;!function J(we){(0,b.registerVersion)("@firebase/app-compat","0.2.29",we)}()},99360:(B,G,a)=>{"use strict";a.r(G),a.d(G,{FirebaseError:()=>_.kx,SDK_VERSION:()=>zr,_DEFAULT_ENTRY_NAME:()=>Hn,_addComponent:()=>Mr,_addOrOverwriteComponent:()=>Vr,_apps:()=>On,_clearComponents:()=>Kr,_components:()=>gr,_getProvider:()=>ti,_registerComponent:()=>Fr,_removeServiceInstance:()=>Nr,deleteApp:()=>Xt,getApp:()=>Qe,getApps:()=>ut,initializeApp:()=>sn,onLog:()=>vn,registerVersion:()=>dr,setLogLevel:()=>jt});var i=a(73448),v=a(12540),b=a(95976),_=a(27144);const C=(nr,Ht)=>Ht.some(Wn=>nr instanceof Wn);let P,S;const x=new WeakMap,D=new WeakMap,ee=new WeakMap,te=new WeakMap,J=new WeakMap;let de={get(nr,Ht,Wn){if(nr instanceof IDBTransaction){if("done"===Ht)return D.get(nr);if("objectStoreNames"===Ht)return nr.objectStoreNames||ee.get(nr);
1if("store"===Ht)return Wn.objectStoreNames[1]?void 0:Wn.objectStore(Wn.objectStoreNames[0])}return pe(nr[Ht])},set:(nr,Ht,Wn)=>(nr[Ht]=Wn,!0),has:(nr,Ht)=>nr instanceof IDBTransaction&&("done"===Ht||"store"===Ht)||Ht in nr};function Ye(nr){return"function"==typeof nr?function Se(nr){return nr!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function k(){return S||(S=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(nr)?function(...Ht){return nr.apply(ae(this),Ht),pe(x.get(this))}:function(...Ht){return pe(nr.apply(ae(this),Ht))}:function(Ht,...Wn){const $n=nr.call(ae(this),Ht,...Wn);return ee.set($n,Ht.sort?Ht.sort():[Ht]),pe($n)}}(nr):(nr instanceof IDBTransaction&&function we(nr){if(D.has(nr))return;const Ht=new Promise((Wn,$n)=>{const jn=()=>{nr.removeEventListener("complete",wr),nr.removeEventListener("error",mi),nr.removeEventListener("abort",mi)},wr=()=>{Wn(),jn()},mi=()=>{$n(nr.error||new DOMException("AbortError","AbortError")),jn()};nr.addEventListener("complete",wr),nr.addEventListener("error",mi),nr.addEventListener("abort",mi)});D.set(nr,Ht)}(nr),C(nr,function R(){return P||(P=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(nr,de):nr)}function pe(nr){if(nr instanceof IDBRequest)return function Q(nr){const Ht=new Promise((Wn,$n)=>{const jn=()=>{nr.removeEventListener("success",wr),nr.removeEventListener("error",mi)},wr=()=>{Wn(pe(nr.result)),jn()},mi=()=>{$n(nr.error),jn()};nr.addEventListener("success",wr),nr.addEventListener("error",mi)});return Ht.then(Wn=>{Wn instanceof IDBCursor&&x.set(Wn,nr)}).catch(()=>{}),J.set(Ht,nr),Ht}(nr);if(te.has(nr))return te.get(nr);const Ht=Ye(nr);return Ht!==nr&&(te.set(nr,Ht),J.set(Ht,nr)),Ht}const ae=nr=>J.get(nr),Ie=["get","getKey","getAll","getAllKeys","count"],H=["put","add","delete","clear"],j=new Map;function ye(nr,Ht){if(!(nr instanceof IDBDatabase)||Ht in nr||"string"!=typeof Ht)return;if(j.get(Ht))return j.get(Ht);const Wn=Ht.replace(/FromIndex$/,""),$n=Ht!==Wn,jn=H.includes(Wn);if(!(Wn in($n?IDBIndex:IDBObjectStore).prototype)||!jn&&!Ie.includes(Wn))return;const wr=function(){var mi=(0,i.c)(function*(di,...Mi){const Qt=this.transaction(di,jn?"readwrite":"readonly");let _n=Qt.store;return $n&&(_n=_n.index(Mi.shift())),(yield Promise.all([_n[Wn](...Mi),jn&&Qt.done]))[0]});return function(Mi){return mi.apply(this,arguments)}}();return j.set(Ht,wr),wr}!function Y(nr){de=nr(de)}(nr=>({...nr,get:(Ht,Wn,$n)=>ye(Ht,Wn)||nr.get(Ht,Wn,$n),has:(Ht,Wn)=>!!ye(Ht,Wn)||nr.has(Ht,Wn)}));class Le{constructor(Ht){this.container=Ht}getPlatformInfoString(){return this.container.getProviders().map(Wn=>{if(function W(nr){const Ht=nr.getComponent();return"VERSION"===Ht?.type}(Wn)){const $n=Wn.getImmediate();return`${$n.library}/${$n.version}`}return null}).filter(Wn=>Wn).join(" ")}}const We="@firebase/app",Ut=new b.YJ("@firebase/app"),Hn="[DEFAULT]",Fn={[We]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},On=new Map,gr=new Map;function Mr(nr,Ht){try{nr.container.addComponent(Ht)}catch(Wn){Ut.debug(`Component ${Ht.name} failed to register with FirebaseApp ${nr.name}`,Wn)}}function Vr(nr,Ht){nr.container.addOrOverwriteComponent(Ht)}function Fr(nr){const Ht=nr.name;if(gr.has(Ht))return Ut.debug(`There were multiple attempts to register component ${Ht}.`),!1;gr.set(Ht,nr);for(const Wn of On.values())Mr(Wn,nr);return!0}function ti(nr,Ht){const Wn=nr.container.getProvider("heartbeat").getImmediate({optional:!0});return Wn&&Wn.triggerHeartbeat(),nr.container.getProvider(Ht)}function Nr(nr,Ht,Wn=Hn){ti(nr,Ht).clearInstance(Wn)}function Kr(){gr.clear()}const sr=new _.UR("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invali
1d-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}."});class or{constructor(Ht,Wn,$n){this._isDeleted=!1,this._options=Object.assign({},Ht),this._config=Object.assign({},Wn),this._name=Wn.name,this._automaticDataCollectionEnabled=Wn.automaticDataCollectionEnabled,this._container=$n,this.container.addComponent(new v.Yl("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(Ht){this.checkDestroyed(),this._automaticDataCollectionEnabled=Ht}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(Ht){this._isDeleted=Ht}checkDestroyed(){if(this.isDeleted)throw sr.create("app-deleted",{appName:this._name})}}const zr="10.9.0";function sn(nr,Ht={}){let Wn=nr;"object"!=typeof Ht&&(Ht={name:Ht});const $n=Object.assign({name:Hn,automaticDataCollectionEnabled:!1},Ht),jn=$n.name;if("string"!=typeof jn||!jn)throw sr.create("bad-app-name",{appName:String(jn)});if(Wn||(Wn=(0,_.Yd)()),!Wn)throw sr.create("no-options");const wr=On.get(jn);if(wr){if((0,_.IN)(Wn,wr.options)&&(0,_.IN)($n,wr.config))return wr;throw sr.create("duplicate-app",{appName:jn})}const mi=new v.op(jn);for(const Mi of gr.values())mi.addComponent(Mi);const di=new or(Wn,$n,mi);return On.set(jn,di),di}function Qe(nr=Hn){const Ht=On.get(nr);if(!Ht&&nr===Hn&&(0,_.Yd)())return sn();if(!Ht)throw sr.create("no-app",{appName:nr});return Ht}function ut(){return Array.from(On.values())}function Xt(nr){return wn.apply(this,arguments)}function wn(){return(wn=(0,i.c)(function*(nr){const Ht=nr.name;On.has(Ht)&&(On.delete(Ht),yield Promise.all(nr.container.getProviders().map(Wn=>Wn.delete())),nr.isDeleted=!0)})).apply(this,arguments)}function dr(nr,Ht,Wn){var $n;let jn=null!==($n=Fn[nr])&&void 0!==$n?$n:nr;Wn&&(jn+=`-${Wn}`);const wr=jn.match(/\s|\//),mi=Ht.match(/\s|\//);if(wr||mi){const di=[`Unable to register library "${jn}" with version "${Ht}":`];return wr&&di.push(`library name "${jn}" contains illegal characters (whitespace or "/")`),wr&&mi&&di.push("and"),mi&&di.push(`version name "${Ht}" contains illegal characters (whitespace or "/")`),void Ut.warn(di.join(" "))}Fr(new v.Yl(`${jn}-version`,()=>({library:jn,version:Ht}),"VERSION"))}function vn(nr,Ht){if(null!==nr&&"function"!=typeof nr)throw sr.create("invalid-log-argument");(0,b.S2)(nr,Ht)}function jt(nr){(0,b.QN)(nr)}const Ct="firebase-heartbeat-database",Mt=1,Ze="firebase-heartbeat-store";let et=null;function Zt(){return et||(et=function Ve(nr,Ht,{blocked:Wn,upgrade:$n,blocking:jn,terminated:wr}={}){const mi=indexedDB.open(nr,Ht),di=pe(mi);return $n&&mi.addEventListener("upgradeneeded",Mi=>{$n(pe(mi.result),Mi.oldVersion,Mi.newVersion,pe(mi.transaction),Mi)}),Wn&&mi.addEventListener("blocked",Mi=>Wn(Mi.oldVersion,Mi.newVersion,Mi)),di.then(Mi=>{wr&&Mi.addEventListener("close",()=>wr()),jn&&Mi.addEventListener("versionchange",Qt=>jn(Qt.oldVersion,Qt.newVersion,Qt))}).catch(()=>{}),di}(Ct,Mt,{upgrade:(nr,Ht)=>{if(0===Ht)try{nr.createObjectStore(Ze)}catch(Wn){console.warn(Wn)}}}).catch(nr=>{throw sr.create("idb-open",{originalErrorMessage:nr.message})})),et}function ft(){return(ft=(0,i.c)(function*(nr){try{const Wn=(yield Zt()).transaction(Ze),$n=yield Wn.objectStore(Ze).get(Bn(nr));return yield Wn.done,$n}catch(Ht){if(Ht instanceof _.kx)Ut.warn(Ht.message);else{const Wn=sr.create("idb-get",{originalErrorMessage:Ht?.message});Ut.warn(Wn.message)}}})).apply(this,arguments)}function dn(nr,Ht){return Tn.apply(this,arguments)}function Tn(){return(Tn=(0,i.c)(function*(nr,Ht){try{const $n=(yield Zt()).transaction(Ze,"readwrite");yield $n.objectStore(Ze).put(Ht,Bn(nr)),yield $n.done}
1catch(Wn){if(Wn instanceof _.kx)Ut.warn(Wn.message);else{const $n=sr.create("idb-set",{originalErrorMessage:Wn?.message});Ut.warn($n.message)}}})).apply(this,arguments)}function Bn(nr){return`${nr.name}!${nr.options.appId}`}class Ir{constructor(Ht){this.container=Ht,this._heartbeatsCache=null;const Wn=this.container.getProvider("app").getImmediate();this._storage=new Ai(Wn),this._heartbeatsCachePromise=this._storage.read().then($n=>(this._heartbeatsCache=$n,$n))}triggerHeartbeat(){var Ht=this;return(0,i.c)(function*(){var Wn,$n;const wr=Ht.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),mi=ur();if((null!=(null===(Wn=Ht._heartbeatsCache)||void 0===Wn?void 0:Wn.heartbeats)||(Ht._heartbeatsCache=yield Ht._heartbeatsCachePromise,null!=(null===($n=Ht._heartbeatsCache)||void 0===$n?void 0:$n.heartbeats)))&&Ht._heartbeatsCache.lastSentHeartbeatDate!==mi&&!Ht._heartbeatsCache.heartbeats.some(di=>di.date===mi))return Ht._heartbeatsCache.heartbeats.push({date:mi,agent:wr}),Ht._heartbeatsCache.heartbeats=Ht._heartbeatsCache.heartbeats.filter(di=>{const Mi=new Date(di.date).valueOf();return Date.now()-Mi<=2592e6}),Ht._storage.overwrite(Ht._heartbeatsCache)})()}getHeartbeatsHeader(){var Ht=this;return(0,i.c)(function*(){var Wn;if(null===Ht._heartbeatsCache&&(yield Ht._heartbeatsCachePromise),null==(null===(Wn=Ht._heartbeatsCache)||void 0===Wn?void 0:Wn.heartbeats)||0===Ht._heartbeatsCache.heartbeats.length)return"";const $n=ur(),{heartbeatsToSend:jn,unsentEntries:wr}=function Er(nr,Ht=1024){const Wn=[];let $n=nr.slice();for(const jn of nr){const wr=Wn.find(mi=>mi.agent===jn.agent);if(wr){if(wr.dates.push(jn.date),Di(Wn)>Ht){wr.dates.pop();break}}else if(Wn.push({agent:jn.agent,dates:[jn.date]}),Di(Wn)>Ht){Wn.pop();break}$n=$n.slice(1)}return{heartbeatsToSend:Wn,unsentEntries:$n}}(Ht._heartbeatsCache.heartbeats),mi=(0,_.Wg)(JSON.stringify({version:2,heartbeats:jn}));return Ht._heartbeatsCache.lastSentHeartbeatDate=$n,wr.length>0?(Ht._heartbeatsCache.heartbeats=wr,yield Ht._storage.overwrite(Ht._heartbeatsCache)):(Ht._heartbeatsCache.heartbeats=[],Ht._storage.overwrite(Ht._heartbeatsCache)),mi})()}}function ur(){return(new Date).toISOString().substring(0,10)}class Ai{constructor(Ht){this.app=Ht,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return(0,i.c)(function*(){return!!(0,_.yy)()&&(0,_.A3)().then(()=>!0).catch(()=>!1)})()}read(){var Ht=this;return(0,i.c)(function*(){if(yield Ht._canUseIndexedDBPromise){const $n=yield function Fe(nr){return ft.apply(this,arguments)}(Ht.app);return $n?.heartbeats?$n:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(Ht){var Wn=this;return(0,i.c)(function*(){var $n;if(yield Wn._canUseIndexedDBPromise){const wr=yield Wn.read();return dn(Wn.app,{lastSentHeartbeatDate:null!==($n=Ht.lastSentHeartbeatDate)&&void 0!==$n?$n:wr.lastSentHeartbeatDate,heartbeats:Ht.heartbeats})}})()}add(Ht){var Wn=this;return(0,i.c)(function*(){var $n;if(yield Wn._canUseIndexedDBPromise){const wr=yield Wn.read();return dn(Wn.app,{lastSentHeartbeatDate:null!==($n=Ht.lastSentHeartbeatDate)&&void 0!==$n?$n:wr.lastSentHeartbeatDate,heartbeats:[...wr.heartbeats,...Ht.heartbeats]})}})()}}function Di(nr){return(0,_.Wg)(JSON.stringify({version:2,heartbeats:nr})).length}!function Pi(nr){Fr(new v.Yl("platform-logger",Ht=>new Le(Ht),"PRIVATE")),Fr(new v.Yl("heartbeat",Ht=>new Ir(Ht),"PRIVATE")),dr(We,"0.9.29",nr),dr(We,"0.9.29","esm2017"),dr("fire-js","")}("")},12540:(B,G,a)=>{"use strict";a.d(G,{Yl:()=>b,op:()=>R});var i=a(73448),v=a(27144);class b{constructor(x,D,ee){this.name=x,this.instanceFactory=D,this.type=ee,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(x){return this.instantiationMode=x,this}setMultipleInstances(x){return this.multipleInstances=x,this}setServiceProps(x){return this.serviceProps=x,this}setInstanceCreatedCallback(x){return this.onInstanceCreated=x,this}}const _="[DEFAULT]";class C{constructor(x,D){this.name=x,this.container=D,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(x){const D=this.normalizeInstanceIdentifier(x);if(!this.instancesDeferred.has(D)){const ee=new v.o9;if(this.instancesDeferred.set(D,ee),this.isInitialized(D)||this.shouldAutoInitialize())try{const te=this.getOrInitializeService({instanceIdentifier:D});te&&ee.resolve(te)}catch{}}return this.instancesDeferred.get(D).promise}getImmediate(x){var D;const ee=this.normalizeInstanceIdentifier(x?.identifier),te=null!==(D=x?.optional)&&void 0!==D&&D;if(!this.isInitialized(ee)&&!this.shouldAutoInitialize()){if(te)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:ee})}catch(J){if(te)return null;throw J}}getComponent(){return this.component}setComponent(x){if(x.name!==this.name)throw Error(`Mismatching Component ${x.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=x,this.shouldAutoInitialize()){if(function S(k){return"EAGER"===k.instantiationMode}(x))try{this.getOrInitializeService({instanceIdentifier:_})}catch{}for(const[D,ee]of this.instancesDeferred.entries()){const te=this.normalizeInstanceIdentifier(D);try{const J=this.getOrInitializeService({instanceIdentifier:te});ee.resolve(J)}catch{}}}}clearInstance(x=_){this.instancesDeferred.delete(x),this.instancesOptions.delete(x),this.instances.delete(x)}delete(){var x=this;return(0,i.c)(function*(){const D=Array.from(x.instances.values());yield Promise.all([...D.filter(ee=>"INTERNAL"in ee).map(ee=>ee.INTERNAL.delete()),...D.filter(ee=>"_delete"in ee).map(ee=>ee._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(x=_){return this.instances.has(x)}getOptions(x=_){return this.instancesOptions.get(x)||{}}initialize(x={}){const{options:D={}}=x,ee=this.normalizeInstanceIdentifier(x.instanceIdentifier);if(this.isInitialized(ee))throw Error(`${this.name}(${ee}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const te=this.getOrInitializeService({instanceIdentifier:ee,options:D});for(const[J,Q]of this.instancesDeferred.entries())ee===this.normalizeInstanceIdentifier(J)&&Q.resolve(te);return te}onInit(x,D){var ee;const te=this.normalizeInstanceIdentifier(D),J=null!==(ee=this.onInitCallbacks.get(te))&&void 0!==ee?ee:new Set;J.add(x),this.onInitCallbacks.set(te,J);const Q=this.instances.get(te);return Q&&x(Q,te),()=>{J.delete(x)}}invokeOnInitCallbacks(x,D){const ee=this.onInitCallbacks.get(D);if(ee)for(const te of ee)try{te(x,D)}catch{}}getOrInitializeService({instanceIdentifier:x,options:D={}}){let ee=this.instances.get(x);if(!ee&&this.component&&(ee=this.component.instanceFactory(this.container,{instanceIdentifier:(k=x,k===_?void 0:k),options:D}),this.instances.set(x,ee),this.instancesOptions.set(x,D),this.invokeOnInitCallbacks(ee,x),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,x,ee)}catch{}var k;return ee||null}normalizeInstanceIdentifier(x=_){return this.component?this.component.multipleInstances?x:_:x}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}
1class R{constructor(x){this.name=x,this.providers=new Map}addComponent(x){const D=this.getProvider(x.name);if(D.isComponentSet())throw new Error(`Component ${x.name} has already been registered with ${this.name}`);D.setComponent(x)}addOrOverwriteComponent(x){this.getProvider(x.name).isComponentSet()&&this.providers.delete(x.name),this.addComponent(x)}getProvider(x){if(this.providers.has(x))return this.providers.get(x);const D=new C(x,this);return this.providers.set(x,D),D}getProviders(){return Array.from(this.providers.values())}}},95976:(B,G,a)=>{"use strict";a.d(G,{Ge:()=>v,QN:()=>R,S2:()=>k,YJ:()=>S});const i=[];var v=function(x){return x[x.DEBUG=0]="DEBUG",x[x.VERBOSE=1]="VERBOSE",x[x.INFO=2]="INFO",x[x.WARN=3]="WARN",x[x.ERROR=4]="ERROR",x[x.SILENT=5]="SILENT",x}(v||{});const b={debug:v.DEBUG,verbose:v.VERBOSE,info:v.INFO,warn:v.WARN,error:v.ERROR,silent:v.SILENT},_=v.INFO,C={[v.DEBUG]:"log",[v.VERBOSE]:"log",[v.INFO]:"info",[v.WARN]:"warn",[v.ERROR]:"error"},P=(x,D,...ee)=>{if(D<x.logLevel)return;const te=(new Date).toISOString(),J=C[D];if(!J)throw new Error(`Attempted to log a message with an invalid logType (value: ${D})`);console[J](`[${te}] ${x.name}:`,...ee)};class S{constructor(D){this.name=D,this._logLevel=_,this._logHandler=P,this._userLogHandler=null,i.push(this)}get logLevel(){return this._logLevel}set logLevel(D){if(!(D in v))throw new TypeError(`Invalid value "${D}" assigned to \`logLevel\``);this._logLevel=D}setLogLevel(D){this._logLevel="string"==typeof D?b[D]:D}get logHandler(){return this._logHandler}set logHandler(D){if("function"!=typeof D)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=D}get userLogHandler(){return this._userLogHandler}set userLogHandler(D){this._userLogHandler=D}debug(...D){this._userLogHandler&&this._userLogHandler(this,v.DEBUG,...D),this._logHandler(this,v.DEBUG,...D)}log(...D){this._userLogHandler&&this._userLogHandler(this,v.VERBOSE,...D),this._logHandler(this,v.VERBOSE,...D)}info(...D){this._userLogHandler&&this._userLogHandler(this,v.INFO,...D),this._logHandler(this,v.INFO,...D)}warn(...D){this._userLogHandler&&this._userLogHandler(this,v.WARN,...D),this._logHandler(this,v.WARN,...D)}error(...D){this._userLogHandler&&this._userLogHandler(this,v.ERROR,...D),this._logHandler(this,v.ERROR,...D)}}function R(x){i.forEach(D=>{D.setLogLevel(x)})}function k(x,D){for(const ee of i){let te=null;D&&D.level&&(te=b[D.level]),ee.userLogHandler=null===x?null:(J,Q,...we)=>{const de=we.map(Y=>{if(null==Y)return null;if("string"==typeof Y)return Y;if("number"==typeof Y||"boolean"==typeof Y)return Y.toString();if(Y instanceof Error)return Y.message;try{return JSON.stringify(Y)}catch{return null}}).filter(Y=>Y).join(" ");Q>=(te??J.logLevel)&&x({level:v[Q].toLowerCase(),message:de,args:we,type:J.name})}}}},90304:(B,G,a)=>{"use strict";a.d(G,{kh:()=>Fr,_U:()=>On,m2:()=>gr,Im:()=>$n,Qz:()=>Mt,Ej:()=>Mi,sW:()=>vn,Cg:()=>Er,CE:()=>Qt,yX:()=>mn,wX:()=>Yn,gk:()=>yi,WU:()=>rt,g5:()=>jn,GY:()=>wr,uU:()=>Ln,Al:()=>nr,cl:()=>_n,ag:()=>Cn});var i=a(73448),v=a(32116),b=a(89192),_=a(91368);class C{constructor(){this.m=new Map}reset(le){this.m=new Map(Object.entries(le))}get(le,me){const Re=this.m.get(le);return void 0!==Re?Re:me}getBoolean(le,me=!1){const Re=this.m.get(le);return void 0===Re?me:"string"==typeof Re?"true"===Re:!!Re}getNumber(le,me){const Re=parseFloat(this.m.get(le));return isNaN(Re)?void 0!==me?me:NaN:Re}set(le,me){this.m.set(le,me)}}const P=new C,te=on=>Q(on),Q=(on=window)=>{if(typeof on>"u")return[];on.Ionic=on.Ionic||{};let le=on.Ionic.platforms;return null==le&&(le=on.Ionic.platforms=we(on),le.forEach(me=>on.document.documentElement.classList.add(`plt-${me}`))),le},we=on=>{const le=P.get("platform");return Object.keys(it).filter(me=>{const Re=le?.[me];return"function"==typeof Re?Re(on):it[me](on)})},Y=on=>!!(At(on,/iPad/i)||At(on,/Macintosh/i)&&Ie(on)),pe=on=>At(on,/android|sink/i),Ie=on=>Ut(on,"(any-pointer:coarse)"),j=on=>ye(on)||Le(on),ye=on=>!!(on.cordova||on.phonegap||on.PhoneGap),Le=on=>{const le=on.Capacitor;return!!le?.isNative},At=(on,le)=>le.test(on.navigator.userAgent),Ut=(on,le)=>{var me;return null===(me=on.matchMedia)||void 0===me?void 0:me.call(on,le).matches},it={ipad:Y,iphone:on=>At(on,/iPhone/i),ios:on=>At(on,/iPhone|iPod/i)||Y(on),android:pe,phablet:on=>{const le=on.innerWidth,me=on.innerHeight,Re=Math.min(le,me),Pt=Math.max(le,me);return Re>390&&Re<520&&Pt>620&&Pt<800},tablet:on=>{const le=on.innerWidth,me=on.innerHeight,Re=Math.min(le,me),Pt=Math.max(le,me);return Y(on)||(on=>pe(on)&&!At(on,/mobile/i))(on)||Re>460&&Re<820&&Pt>780&&Pt<1400},cordova:ye,capacitor:Le,electron:on=>At(on,/electron/i),pwa:on=>{var le;return!!(null!==(le=on.matchMedia)&&void 0!==le&&le.call(on,"(display-mode: standalone)").matches||on.navigator.standalone)},mobile:Ie,mobileweb:on=>Ie(on)&&!j(on),desktop:on=>!Ie(on),hybrid:j};var K=a(51896),_e=a(19248),Pe=a(95657),De=a(70800),ke=a(46700),Lt=a(56040),Dt=a(82700),He=a(81316),ge=a(66684),xt=a(17368),pt=a(74e3),rn=a(44716);const cn=["tabsInner"];class mn{constructor(le){this.menuController=le}open(le){return this.menuController.open(le)}close(le){return this.menuController.close(le)}
1toggle(le){return this.menuController.toggle(le)}enable(le,me){return this.menuController.enable(le,me)}swipeGesture(le,me){return this.menuController.swipeGesture(le,me)}isOpen(le){return this.menuController.isOpen(le)}isEnabled(le){return this.menuController.isEnabled(le)}get(le){return this.menuController.get(le)}getOpen(){return this.menuController.getOpen()}getMenus(){return this.menuController.getMenus()}registerAnimation(le,me){return this.menuController.registerAnimation(le,me)}isAnimating(){return this.menuController.isAnimating()}_getOpenSync(){return this.menuController._getOpenSync()}_createAnimation(le,me){return this.menuController._createAnimation(le,me)}_register(le){return this.menuController._register(le)}_unregister(le){return this.menuController._unregister(le)}_setOpen(le,me,Re){return this.menuController._setOpen(le,me,Re)}}let rt=(()=>{class on{constructor(me,Re){this.doc=me,this.backButton=new Pe.E,this.keyboardDidShow=new Pe.E,this.keyboardDidHide=new Pe.E,this.pause=new Pe.E,this.resume=new Pe.E,this.resize=new Pe.E,Re.run(()=>{let Pt;this.win=me.defaultView,this.backButton.subscribeWithPriority=function(ln,En){return this.subscribe(Mn=>Mn.register(ln,br=>Re.run(()=>En(br))))},an(this.pause,me,"pause",Re),an(this.resume,me,"resume",Re),an(this.backButton,me,"ionBackButton",Re),an(this.resize,this.win,"resize",Re),an(this.keyboardDidShow,this.win,"ionKeyboardDidShow",Re),an(this.keyboardDidHide,this.win,"ionKeyboardDidHide",Re),this._readyPromise=new Promise(ln=>{Pt=ln}),this.win?.cordova?me.addEventListener("deviceready",()=>{Pt("cordova")},{once:!0}):Pt("dom")})}is(me){return((on,le)=>("string"==typeof on&&(le=on,on=void 0),te(on).includes(le)))(this.win,me)}platforms(){return te(this.win)}ready(){return this._readyPromise}get isRTL(){return"rtl"===this.doc.dir}getQueryParam(me){return kt(this.win.location.href,me)}isLandscape(){return!this.isPortrait()}isPortrait(){return this.win.matchMedia?.("(orientation: portrait)").matches}testUserAgent(me){const Re=this.win.navigator;return!!(Re?.userAgent&&Re.userAgent.indexOf(me)>=0)}url(){return this.win.location.href}width(){return this.win.innerWidth}height(){return this.win.innerHeight}}return on.\u0275fac=function(me){return new(me||on)(v.CoB(_.Ud),v.CoB(v.WW2))},on.\u0275prov=v.wxM({token:on,factory:on.\u0275fac,providedIn:"root"}),on})();const kt=(on,le)=>{le=le.replace(/[[\]\\]/g,"\\$&");const Re=new RegExp("[\\?&]"+le+"=([^&#]*)").exec(on);return Re?decodeURIComponent(Re[1].replace(/\+/g," ")):null},an=(on,le,me,Re)=>{le&&le.addEventListener(me,Pt=>{Re.run(()=>{const ln=Pt?.detail;on.next(ln)})})};let Yn=(()=>{class on{constructor(me,Re,Pt,ln){this.location=Re,this.serializer=Pt,this.router=ln,this.direction=Hn,this.animated=Fn,this.guessDirection="forward",this.lastNavId=-1,ln&&ln.events.subscribe(En=>{if(En instanceof b.Qx){const Mn=En.restoredState?En.restoredState.navigationId:En.id;this.guessDirection=Mn<this.lastNavId?"back":"forward",this.guessAnimation=En.restoredState?void 0:this.guessDirection,this.lastNavId="forward"===this.guessDirection?En.id:Mn}}),me.backButton.subscribeWithPriority(0,En=>{this.pop(),En()})}navigateForward(me,Re={}){return this.setDirection("forward",Re.animated,Re.animationDirection,Re.animation),this.navigate(me,Re)}navigateBack(me,Re={}){return this.setDirection("back",Re.animated,Re.animationDirection,Re.animation),this.navigate(me,Re)}navigateRoot(me,Re={}){return this.setDirection("root",Re.animated,Re.animationDirection,Re.animation),this.navigate(me,Re)}back(me={animated:!0,animationDirection:"back"}){return this.setDirection("back",me.animated,me.animationDirection,me.animation),this.location.back()}pop(){var me=this;return(0,i.c)(function*(){let Re=me.topOutlet;for(;Re;){if(yield Re.pop())return!0;Re=Re.parentOutlet}return!1})()}setDirection(me,Re,Pt,ln){this.direction=me,this.animated=bn(me,Re,Pt),this.animationBuilder=ln}setTopOutlet(me){this.topOutlet=me}consumeTransition(){let Re,me="root";const Pt=this.animationBuilder;return"auto"===this.direction?(me=this.guessDirection,Re=this.guessAnimation):(Re=this.animated,me=this.direction),this.direction=Hn,this.animated=Fn,this.animationBuilder=void 0,{direction:me,animation:Re,animationBuilder:Pt}}navigate(me,Re){if(Array.isArray(me))return this.router.navigate(me,Re);{const Pt=this.serializer.parse(me.toString());return void 0!==Re.queryParams&&(Pt.queryParams={...Re.queryParams}),void 0!==Re.fragment&&(Pt.fragment=Re.fragment),this.router.navigateByUrl(Pt,Re)}}}return on.\u0275fac=function(me){return new(me||on)(v.CoB(rt),v.CoB(_.oB),v.CoB(b.qd),v.CoB(b.E5,8))}
1,on.\u0275prov=v.wxM({token:on,factory:on.\u0275fac,providedIn:"root"}),on})();const bn=(on,le,me)=>{if(!1!==le){if(void 0!==me)return me;if("forward"===on||"back"===on)return on;if("root"===on&&!0===le)return"forward"}},Hn="auto",Fn=void 0;let On=(()=>{class on{get(me,Re){const Pt=Mr();return Pt?Pt.get(me,Re):null}getBoolean(me,Re){const Pt=Mr();return!!Pt&&Pt.getBoolean(me,Re)}getNumber(me,Re){const Pt=Mr();return Pt?Pt.getNumber(me,Re):0}}return on.\u0275fac=function(me){return new(me||on)},on.\u0275prov=v.wxM({token:on,factory:on.\u0275fac,providedIn:"root"}),on})();const gr=new v.UbH("USERCONFIG"),Mr=()=>{if(typeof window<"u"){const on=window.Ionic;if(on?.config)return on.config}return null};class Vr{constructor(le={}){this.data=le}get(le){return this.data[le]}}let Fr=(()=>{class on{constructor(){this.zone=(0,v.uUt)(v.WW2),this.applicationRef=(0,v.uUt)(v.Swk)}create(me,Re,Pt){return new ti(me,Re,this.applicationRef,this.zone,Pt)}}return on.\u0275fac=function(me){return new(me||on)},on.\u0275prov=v.wxM({token:on,factory:on.\u0275fac}),on})();class ti{constructor(le,me,Re,Pt,ln){this.environmentInjector=le,this.injector=me,this.applicationRef=Re,this.zone=Pt,this.elementReferenceKey=ln,this.elRefMap=new WeakMap,this.elEventsMap=new WeakMap}attachViewToDom(le,me,Re,Pt){return this.zone.run(()=>new Promise(ln=>{const En={...Re};void 0!==this.elementReferenceKey&&(En[this.elementReferenceKey]=le),ln(Nr(this.zone,this.environmentInjector,this.injector,this.applicationRef,this.elRefMap,this.elEventsMap,le,me,En,Pt,this.elementReferenceKey))}))}removeViewFromDom(le,me){return this.zone.run(()=>new Promise(Re=>{const Pt=this.elRefMap.get(me);if(Pt){Pt.destroy(),this.elRefMap.delete(me);const ln=this.elEventsMap.get(me);ln&&(ln(),this.elEventsMap.delete(me))}Re()}))}}const Nr=(on,le,me,Re,Pt,ln,En,Mn,br,Br,jr)=>{const gn=v.zZn.create({providers:or(br),parent:me}),Xe=(0,v.kdu)(Mn,{environmentInjector:le,elementInjector:gn}),Tt=Xe.instance,An=Xe.location.nativeElement;if(br&&(jr&&void 0!==Tt[jr]&&console.error(`[Ionic Error]: ${jr} is a reserved property when using ${En.tagName.toLowerCase()}. Rename or remove the "${jr}" property from ${Mn.name}.`),Object.assign(Tt,br)),Br)for(const ir of Br)An.classList.add(ir);const Nn=Jr(on,Tt,An);return En.appendChild(An),Re.attachView(Xe.hostView),Pt.set(An,Xe),ln.set(An,Nn),An},Kr=[K.L,K.a,K.b,K.c,K.d],Jr=(on,le,me)=>on.run(()=>{const Re=Kr.filter(Pt=>"function"==typeof le[Pt]).map(Pt=>{const ln=En=>le[Pt](En.detail);return me.addEventListener(Pt,ln),()=>me.removeEventListener(Pt,ln)});return()=>Re.forEach(Pt=>Pt())}),sr=new v.UbH("NavParamsToken"),or=on=>[{provide:sr,useValue:on},{provide:Vr,useFactory:zr,deps:[sr]}],zr=on=>new Vr(on),sn=(on,le)=>{const me=on.prototype;le.forEach(Re=>{Object.defineProperty(me,Re,{get(){return this.el[Re]},set(Pt){this.z.runOutsideAngular(()=>this.el[Re]=Pt)}})})},Qe=(on,le)=>{const me=on.prototype;le.forEach(Re=>{me[Re]=function(){const Pt=arguments;return this.z.runOutsideAngular(()=>this.el[Re].apply(this.el,Pt))}})},ut=(on,le,me)=>{me.forEach(Re=>on[Re]=(0,De.w)(le,Re))};function Xt(on){return function(me){const{defineCustomElementFn:Re,inputs:Pt,methods:ln}=on;return void 0!==Re&&Re(),Pt&&sn(me,Pt),ln&&Qe(me,ln),me}}const wn=["alignment","animated","arrow","keepContentsMounted","backdropDismiss","cssClass","dismissOnSelect","enterAnimation","event","isOpen","keyboardClose","leaveAnimation","mode","showBackdrop","translucent","trigger","triggerAction","reference","size","side"],dr=["present","dismiss","onDidDismiss","onWillDismiss"];let vn=(()=>{let on=class{constructor(me,Re,Pt){this.z=Pt,this.isCmpOpen=!1,this.el=Re.nativeElement,this.el.addEventListener("ionMount",()=>{this.isCmpOpen=!0,me.detectChanges()}),this.el.addEventListener("didDismiss",()=>{this.isCmpOpen=!1,me.detectChanges()}),ut(this,this.el,["ionPopoverDidPresent","ionPopoverWillPresent","ionPopoverWillDismiss","ionPopoverDidDismiss","didPresent","willPresent","willDismiss","didDismiss"])}};return on.\u0275fac=function(me){return new(me||on)(v.GI1(v.kD9),v.GI1(v.GMv),v.GI1(v.WW2))},on.\u0275dir=v.Sc5({type:on,selectors:[["ion-popover"]],contentQueries:function(me,Re,Pt){if(1&me&&v.szK(Pt,v.Yw2,5),2&me){let ln;v.wto(ln=v.Gqi())&&(Re.template=ln.first)}},inputs:{alignment:"alignment",animated:"animated",arrow:"arrow",keepContentsMounted:"keepContentsMounted",backdropDismiss:"backdropDismiss",cssClass:"cssClass",dismissOnSelect:"dismissOnSelect",enterAnimation:"enterAnimation",event:"event",isOpen:"isOpen",keyboardClose:"keyboardClose",leaveAnimation:"leaveAnimation",mode:"mode",showBackdrop:"showBackdrop",translucent:"translucent",trigger:"trigger",triggerAction:"triggerAction",reference:"reference",size:"size",side:"side"}}),on=(0,He.UN)([Xt({inputs:wn,methods:dr})],on),on})();const jt=["animated","keepContentsMounted","backdropBreakpoint","backdropDismiss","breakpoints","canDismiss","cssClass","enterAnimation","event","handle","handleBehavior","initialBreakp
1oint","isOpen","keyboardClose","leaveAnimation","mode","presentingElement","showBackdrop","translucent","trigger"],Ct=["present","dismiss","onDidDismiss","onWillDismiss","setCurrentBreakpoint","getCurrentBreakpoint"];let Mt=(()=>{let on=class{constructor(me,Re,Pt){this.z=Pt,this.isCmpOpen=!1,this.el=Re.nativeElement,this.el.addEventListener("ionMount",()=>{this.isCmpOpen=!0,me.detectChanges()}),this.el.addEventListener("didDismiss",()=>{this.isCmpOpen=!1,me.detectChanges()}),ut(this,this.el,["ionModalDidPresent","ionModalWillPresent","ionModalWillDismiss","ionModalDidDismiss","ionBreakpointDidChange","didPresent","willPresent","willDismiss","didDismiss"])}};return on.\u0275fac=function(me){return new(me||on)(v.GI1(v.kD9),v.GI1(v.GMv),v.GI1(v.WW2))},on.\u0275dir=v.Sc5({type:on,selectors:[["ion-modal"]],contentQueries:function(me,Re,Pt){if(1&me&&v.szK(Pt,v.Yw2,5),2&me){let ln;v.wto(ln=v.Gqi())&&(Re.template=ln.first)}},inputs:{animated:"animated",keepContentsMounted:"keepContentsMounted",backdropBreakpoint:"backdropBreakpoint",backdropDismiss:"backdropDismiss",breakpoints:"breakpoints",canDismiss:"canDismiss",cssClass:"cssClass",enterAnimation:"enterAnimation",event:"event",handle:"handle",handleBehavior:"handleBehavior",initialBreakpoint:"initialBreakpoint",isOpen:"isOpen",keyboardClose:"keyboardClose",leaveAnimation:"leaveAnimation",mode:"mode",presentingElement:"presentingElement",showBackdrop:"showBackdrop",translucent:"translucent",trigger:"trigger"}}),on=(0,He.UN)([Xt({inputs:jt,methods:Ct})],on),on})();const et=(on,le)=>((on=on.filter(me=>me.stackId!==le.stackId)).push(le),on),ft=(on,le)=>{const me=on.createUrlTree(["."],{relativeTo:le});return on.serializeUrl(me)},dn=(on,le)=>!le||on.stackId!==le.stackId,Tn=(on,le)=>{if(!on)return;const me=Bn(le);for(let Re=0;Re<me.length;Re++){if(Re>=on.length)return me[Re];if(me[Re]!==on[Re])return}},Bn=on=>on.split("/").map(le=>le.trim()).filter(le=>""!==le),mr=on=>{on&&(on.ref.destroy(),on.unlistenEvents())};class tr{constructor(le,me,Re,Pt,ln,En){this.containerEl=me,this.router=Re,this.navCtrl=Pt,this.zone=ln,this.location=En,this.views=[],this.skipTransition=!1,this.nextId=0,this.tabsPrefix=void 0!==le?Bn(le):void 0}createView(le,me){const Re=ft(this.router,me),Pt=le?.location?.nativeElement,ln=Jr(this.zone,le.instance,Pt);return{id:this.nextId++,stackId:Tn(this.tabsPrefix,Re),unlistenEvents:ln,element:Pt,ref:le,url:Re}}getExistingView(le){const me=ft(this.router,le),Re=this.views.find(Pt=>Pt.url===me);return Re&&Re.ref.changeDetectorRef.reattach(),Re}setActive(le){const me=this.navCtrl.consumeTransition();let{direction:Re,animation:Pt,animationBuilder:ln}=me;const En=this.activeView,Mn=dn(le,En);Mn&&(Re="back",Pt=void 0);const br=this.views.slice();let Br;const jr=this.router;jr.getCurrentNavigation?Br=jr.getCurrentNavigation():jr.navigations?.value&&(Br=jr.navigations.value),Br?.extras?.replaceUrl&&this.views.length>0&&this.views.splice(-1,1);const gn=this.views.includes(le),Xe=this.insertView(le,Re);gn||le.ref.changeDetectorRef.detectChanges();const Tt=le.animationBuilder;return void 0===ln&&"back"===Re&&!Mn&&void 0!==Tt&&(ln=Tt),En&&(En.animationBuilder=ln),this.zone.runOutsideAngular(()=>this.wait(()=>(En&&En.ref.changeDetectorRef.detach(),le.ref.changeDetectorRef.reattach(),this.transition(le,En,Pt,this.canGoBack(1),!1,ln).then(()=>Ir(le,Xe,br,this.location,this.zone)).then(()=>({enteringView:le,direction:Re,animation:Pt,tabSwitch:Mn})))))}canGoBack(le,me=this.getActiveStackId()){return this.getStack(me).length>le}pop(le,me=this.getActiveStackId()){return this.zone.run(()=>{const Re=this.getStack(me);if(Re.length<=le)return Promise.resolve(!1);const Pt=Re[Re.length-le-1];let ln=Pt.url;const En=Pt.savedData;if(En){const br=En.get("primary");br?.route?._routerState?.snapshot.url&&(ln=br.route._routerState.snapshot.url)}const{animationBuilder:Mn}=this.navCtrl.consumeTransition();return this.navCtrl.navigateBack(ln,{...Pt.savedExtras,animation:Mn}).then(()=>!0)})}startBackTransition(){const le=this.activeView;if(le){const me=this.getStack(le.stackId),Re=me[me.length-2],Pt=Re.animationBuilder;return this.wait(()=>this.transition(Re,le,"back",this.canGoBack(2),!0,Pt))}return Promise.resolve()}endBackTransition(le){le?(this.skipTransition=!0,this.pop(1)):this.activeView&&ur(this.activeView,this.views,this.views,this.location,this.zone)}getLastUrl(le){const me=this.getStack(le);return me.length>0?me[me.length-1]:void 0}getRootUrl(le){const me=this.getStack(le);return me.length>0?me[0]:void 0}getActiveStackId(){return this.activeView?this.activeView.stackId:void 0}getActiveView(){return this.activeView}hasRunningTask(){return void 0!==this.runningTask}destroy(){this.containerEl=void 0,this.views.forEach(mr),this.activeView=void 0,this.views=[]}getStack(le){return this.views.filter(me=>me.stackId===le)}insertView(le,me){return this.activeView=le,this.views=((on,le,me)=>"root"===me?et(on,le):"forward"===me?((on,le)=>(on.indexOf(le)>=0?on=on.filter(Re=>
1Re.stackId!==le.stackId||Re.id<=le.id):on.push(le),on))(on,le):((on,le)=>on.indexOf(le)>=0?on.filter(Re=>Re.stackId!==le.stackId||Re.id<=le.id):et(on,le))(on,le))(this.views,le,me),this.views.slice()}transition(le,me,Re,Pt,ln,En){if(this.skipTransition)return this.skipTransition=!1,Promise.resolve(!1);if(me===le)return Promise.resolve(!1);const Mn=le?le.element:void 0,br=me?me.element:void 0,Br=this.containerEl;return Mn&&Mn!==br&&(Mn.classList.add("ion-page"),Mn.classList.add("ion-page-invisible"),Mn.parentElement!==Br&&Br.appendChild(Mn),Br.commit)?Br.commit(Mn,br,{duration:void 0===Re?0:void 0,direction:Re,showGoBack:Pt,progressAnimation:ln,animationBuilder:En}):Promise.resolve(!1)}wait(le){var me=this;return(0,i.c)(function*(){void 0!==me.runningTask&&(yield me.runningTask,me.runningTask=void 0);const Re=me.runningTask=le();return Re.finally(()=>me.runningTask=void 0),Re})()}}const Ir=(on,le,me,Re,Pt)=>"function"==typeof requestAnimationFrame?new Promise(ln=>{requestAnimationFrame(()=>{ur(on,le,me,Re,Pt),ln()})}):Promise.resolve(),ur=(on,le,me,Re,Pt)=>{Pt.run(()=>me.filter(ln=>!le.includes(ln)).forEach(mr)),le.forEach(ln=>{const Mn=Re.path().split("?")[0].split("#")[0];if(ln!==on&&ln.url!==Mn){const br=ln.element;br.setAttribute("aria-hidden","true"),br.classList.add("ion-page-hidden"),ln.ref.changeDetectorRef.detach()}})};let Er=(()=>{class on{constructor(me,Re,Pt,ln,En,Mn,br,Br){this.parentOutlet=Br,this.activatedView=null,this.proxyMap=new WeakMap,this.currentActivatedRoute$=new ke.g(null),this.activated=null,this._activatedRoute=null,this.name=b.gf,this.stackWillChange=new v._w7,this.stackDidChange=new v._w7,this.activateEvents=new v._w7,this.deactivateEvents=new v._w7,this.parentContexts=(0,v.uUt)(b.O4),this.location=(0,v.uUt)(v.y8U),this.environmentInjector=(0,v.uUt)(v.SIe),this.inputBinder=(0,v.uUt)(Di,{optional:!0}),this.supportsBindingToComponentInputs=!0,this.config=(0,v.uUt)(On),this.navCtrl=(0,v.uUt)(Yn),this.nativeEl=ln.nativeElement,this.name=me||b.gf,this.tabsPrefix="true"===Re?ft(En,br):void 0,this.stackCtrl=new tr(this.tabsPrefix,this.nativeEl,En,this.navCtrl,Mn,Pt),this.parentContexts.onChildOutletCreated(this.name,this)}get activatedComponentRef(){return this.activated}set animation(me){this.nativeEl.animation=me}set animated(me){this.nativeEl.animated=me}set swipeGesture(me){this._swipeGesture=me,this.nativeEl.swipeHandler=me?{canStart:()=>this.stackCtrl.canGoBack(1)&&!this.stackCtrl.hasRunningTask(),onStart:()=>this.stackCtrl.startBackTransition(),onEnd:Re=>this.stackCtrl.endBackTransition(Re)}:void 0}ngOnDestroy(){this.stackCtrl.destroy(),this.inputBinder?.unsubscribeFromRouteData(this)}getContext(){return this.parentContexts.getContext(this.name)}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(!this.activated){const me=this.getContext();me?.route&&this.activateWith(me.route,me.injector)}new Promise(me=>(0,_e.c)(this.nativeEl,me)).then(()=>{void 0===this._swipeGesture&&(this.swipeGesture=this.config.getBoolean("swipeBackEnabled","ios"===this.nativeEl.mode))})}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){throw new Error("incompatible reuse strategy")}attach(me,Re){throw new Error("incompatible reuse strategy")}deactivate(){if(this.activated){if(this.activatedView){const Re=this.getContext();this.activatedView.savedData=new Map(Re.children.contexts);const Pt=this.activatedView.savedData.get("primary");if(Pt&&Re.route&&(Pt.route={...Re.route}),this.activatedView.savedExtras={},Re.route){const ln=Re.route.snapshot;this.activatedView.savedExtras.queryParams=ln.queryParams,this.activatedView.savedExtras.fragment=ln.fragment}}const me=this.component;this.activatedView=null,this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(me)}}activateWith(me,Re){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=me;let Pt,ln=this.stackCtrl.getExistingView(me);if(ln){Pt=this.activated=ln.ref;const Mn=ln.savedData;Mn&&(this.getContext().children.contexts=Mn),this.updateActivatedRouteProxy(Pt.instance,me)}else{const Mn=me._futureSnapshot,br=this.parentContexts.getOrCreateContext(this.name).children,Br=new ke.g(null),jr=this.createActivatedRouteProxy(Br,me),gn=new Ai(jr,br,this.location.injector);Pt=this.activated=this.location.createComponent(Mn.routeConfig.component??Mn.component,{index:this.location.length,injector:gn,environmentInjector:Re??this.environmentInjector}),Br.next(Pt.instance),ln=this.stackCtrl.createView(this.activated,me),this.proxyMap.set(Pt.instance,jr),this.currentActivatedRoute$.next({component:Pt.instance,activatedRoute:me})}this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activatedView=ln,this.navCtrl.setTopOutlet(this);const En=this.stackCtrl.getActiveView();this.stackWillChange.emit({enteringView:ln,tabSwitch:dn(ln,En)}),this.stackCtrl.setActive(ln).then(Mn=>{this.activateEvents.emit(Pt.instance),this.stackDidChange.emit(Mn)})}canGoBack(me=1,Re){return this.stackCtrl.canGoBack(me,Re)}pop(me=1,Re){return this.stackCtrl.pop(me,Re)}getLastUrl(me){const Re=this.stackCtrl.getLastUrl(me);return Re?Re.url:void 0}getLastRouteView(me){return this.stackCtrl.getLastUrl(me)}getRootView(me){return this.stackCtrl.getRootUrl(me)}getActiveStackId(){return this.stackCtrl.getActiveStackId()}createActivatedRouteProxy(me,Re){const Pt=new b.gV;return Pt._futureSnapshot=Re._futureSnapshot,Pt._routerState=Re._routerState,Pt.snapshot=Re.snapshot,Pt.outlet=Re.outlet,Pt.component=Re.component,Pt._paramMap=this.proxyObservable(me,"paramMap"),Pt._queryParamMap=this.proxyObservable(me,"queryParamMap"),Pt.url=this.proxyObservable(me,"url"),Pt.params=this.proxyObservable(me,"params"),Pt.queryParams=this.proxyObservable(me,"queryParams"),Pt.fragment=this.proxyObservable(me,"fragment"),Pt.data=this.proxyObservable(me,"data"),Pt}proxyObservable(me,Re){return me.pipe((0,ge.I)(Pt=>!!Pt),(0,xt.G)(Pt=>this.currentActivatedRoute$.pipe((0,ge.I)(ln=>null!==ln&&ln.component===Pt),(0,xt.G)(ln=>
1ln&&ln.activatedRoute[Re]),(0,pt.a)())))}updateActivatedRouteProxy(me,Re){const Pt=this.proxyMap.get(me);if(!Pt)throw new Error("Could not find activated route proxy for view");Pt._futureSnapshot=Re._futureSnapshot,Pt._routerState=Re._routerState,Pt.snapshot=Re.snapshot,Pt.outlet=Re.outlet,Pt.component=Re.component,this.currentActivatedRoute$.next({component:me,activatedRoute:Re})}}return on.\u0275fac=function(me){return new(me||on)(v.gJ8("name"),v.gJ8("tabs"),v.GI1(_.oB),v.GI1(v.GMv),v.GI1(b.E5),v.GI1(v.WW2),v.GI1(b.gV),v.GI1(on,12))},on.\u0275dir=v.Sc5({type:on,selectors:[["ion-router-outlet"]],inputs:{animated:"animated",animation:"animation",mode:"mode",swipeGesture:"swipeGesture",name:"name"},outputs:{stackWillChange:"stackWillChange",stackDidChange:"stackDidChange",activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),on})();class Ai{constructor(le,me,Re){this.route=le,this.childContexts=me,this.parent=Re}get(le,me){return le===b.gV?this.route:le===b.O4?this.childContexts:this.parent.get(le,me)}}const Di=new v.UbH("");let Pi=(()=>{class on{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(me){this.unsubscribeFromRouteData(me),this.subscribeToRouteData(me)}unsubscribeFromRouteData(me){this.outletDataSubscriptions.get(me)?.unsubscribe(),this.outletDataSubscriptions.delete(me)}subscribeToRouteData(me){const{activatedRoute:Re}=me,Pt=(0,Lt.E)([Re.queryParams,Re.params,Re.data]).pipe((0,xt.G)(([ln,En,Mn],br)=>(Mn={...ln,...En,...Mn},0===br?(0,Dt.of)(Mn):Promise.resolve(Mn)))).subscribe(ln=>{if(!me.isActivated||!me.activatedComponentRef||me.activatedRoute!==Re||null===Re.component)return void this.unsubscribeFromRouteData(me);const En=(0,v.o9M)(Re.component);if(En)for(const{templateName:Mn}of En.inputs)me.activatedComponentRef.setInput(Mn,ln[Mn]);else this.unsubscribeFromRouteData(me)});this.outletDataSubscriptions.set(me,Pt)}}return on.\u0275fac=function(me){return new(me||on)},on.\u0275prov=v.wxM({token:on,factory:on.\u0275fac}),on})();const nr=()=>({provide:Di,useFactory:Ht,deps:[b.E5]});function Ht(on){return on?.componentInputBindingEnabled?new Pi:null}const Wn=["color","defaultHref","disabled","icon","mode","routerAnimation","text","type"];let $n=(()=>{let on=class{constructor(me,Re,Pt,ln,En,Mn){this.routerOutlet=me,this.navCtrl=Re,this.config=Pt,this.r=ln,this.z=En,Mn.detach(),this.el=this.r.nativeElement}onClick(me){const Re=this.defaultHref||this.config.get("backButtonDefaultHref");this.routerOutlet?.canGoBack()?(this.navCtrl.setDirection("back",void 0,void 0,this.routerAnimation),this.routerOutlet.pop(),me.preventDefault()):null!=Re&&(this.navCtrl.navigateBack(Re,{animation:this.routerAnimation}),me.preventDefault())}};return on.\u0275fac=function(me){return new(me||on)(v.GI1(Er,8),v.GI1(Yn),v.GI1(On),v.GI1(v.GMv),v.GI1(v.WW2),v.GI1(v.kD9))},on.\u0275dir=v.Sc5({type:on,hostBindings:function(me,Re){1&me&&v.qCj("click",function(ln){return Re.onClick(ln)})},inputs:{color:"color",defaultHref:"defaultHref",disabled:"disabled",icon:"icon",mode:"mode",routerAnimation:"routerAnimation",text:"text",type:"type"}}),on=(0,He.UN)([Xt({inputs:Wn})],on),on})(),jn=(()=>{class on{constructor(me,Re,Pt,ln,En){this.locationStrategy=me,this.navCtrl=Re,this.elementRef=Pt,this.router=ln,this.routerLink=En,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}updateTargetUrlAndHref(){if(this.routerLink?.urlTree){const me=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=me}}onClick(me){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation),me.preventDefault()}}return on.\u0275fac=function(me){return new(me||on)(v.GI1(_.Qd),v.GI1(Yn),v.GI1(v.GMv),v.GI1(b.E5),v.GI1(b.ER,8))},on.\u0275dir=v.Sc5({type:on,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(me,Re){1&me&&v.qCj("click",function(ln){return Re.onClick(ln)})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[v.SYr]}),on})(),wr=(()=>{class on{constructor(me,Re,Pt,ln,En){this.locationStrategy=me,this.navCtrl=Re,this.elementRef=Pt,this.router=ln,this.routerLink=En,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}
1updateTargetUrlAndHref(){if(this.routerLink?.urlTree){const me=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=me}}onClick(){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation)}}return on.\u0275fac=function(me){return new(me||on)(v.GI1(_.Qd),v.GI1(Yn),v.GI1(v.GMv),v.GI1(b.E5),v.GI1(b.ER,8))},on.\u0275dir=v.Sc5({type:on,selectors:[["a","routerLink",""],["area","routerLink",""]],hostBindings:function(me,Re){1&me&&v.qCj("click",function(){return Re.onClick()})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[v.SYr]}),on})();const mi=["animated","animation","root","rootParams","swipeGesture"],di=["push","insert","insertPages","pop","popTo","popToRoot","removeIndex","setRoot","setPages","getActive","getByIndex","canGoBack","getPrevious"];let Mi=(()=>{let on=class{constructor(me,Re,Pt,ln,En,Mn){this.z=En,Mn.detach(),this.el=me.nativeElement,me.nativeElement.delegate=ln.create(Re,Pt),ut(this,this.el,["ionNavDidChange","ionNavWillChange"])}};return on.\u0275fac=function(me){return new(me||on)(v.GI1(v.GMv),v.GI1(v.SIe),v.GI1(v.zZn),v.GI1(Fr),v.GI1(v.WW2),v.GI1(v.kD9))},on.\u0275dir=v.Sc5({type:on,inputs:{animated:"animated",animation:"animation",root:"root",rootParams:"rootParams",swipeGesture:"swipeGesture"}}),on=(0,He.UN)([Xt({inputs:mi,methods:di})],on),on})(),Qt=(()=>{class on{constructor(me){this.navCtrl=me,this.ionTabsWillChange=new v._w7,this.ionTabsDidChange=new v._w7,this.tabBarSlot="bottom"}ngAfterContentInit(){this.detectSlotChanges()}ngAfterContentChecked(){this.detectSlotChanges()}onStackWillChange({enteringView:me,tabSwitch:Re}){const Pt=me.stackId;Re&&void 0!==Pt&&this.ionTabsWillChange.emit({tab:Pt})}onStackDidChange({enteringView:me,tabSwitch:Re}){const Pt=me.stackId;Re&&void 0!==Pt&&(this.tabBar&&(this.tabBar.selectedTab=Pt),this.ionTabsDidChange.emit({tab:Pt}))}select(me){const Re="string"==typeof me,Pt=Re?me:me.detail.tab,ln=this.outlet.getActiveStackId()===Pt,En=`${this.outlet.tabsPrefix}/${Pt}`;if(Re||me.stopPropagation(),ln){const Mn=this.outlet.getActiveStackId();if(this.outlet.getLastRouteView(Mn)?.url===En)return;const Br=this.outlet.getRootView(Pt);return this.navCtrl.navigateRoot(En,{...Br&&En===Br.url&&Br.savedExtras,animated:!0,animationDirection:"back"})}{const Mn=this.outlet.getLastRouteView(Pt),br=Mn?.url||En,Br=Mn?.savedExtras;return this.navCtrl.navigateRoot(br,{...Br,animated:!0,animationDirection:"back"})}}getSelected(){return this.outlet.getActiveStackId()}detectSlotChanges(){this.tabBars.forEach(me=>{const Re=me.el.getAttribute("slot");Re!==this.tabBarSlot&&(this.tabBarSlot=Re,this.relocateTabBar())})}relocateTabBar(){const me=this.tabBar.el;"top"===this.tabBarSlot?this.tabsInner.nativeElement.before(me):this.tabsInner.nativeElement.after(me)}}return on.\u0275fac=function(me){return new(me||on)(v.GI1(Yn))},on.\u0275dir=v.Sc5({type:on,selectors:[["ion-tabs"]],viewQuery:function(me,Re){if(1&me&&v.CC$(cn,7,v.GMv),2&me){let Pt;v.wto(Pt=v.Gqi())&&(Re.tabsInner=Pt.first)}},hostBindings:function(me,Re){1&me&&v.qCj("ionTabButtonClick",function(ln){return Re.select(ln)})},outputs:{ionTabsWillChange:"ionTabsWillChange",ionTabsDidChange:"ionTabsDidChange"}}),on})();const _n=on=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(on):"function"==typeof requestAnimationFrame?requestAnimationFrame(on):setTimeout(on);let Ln=(()=>{class on{constructor(me,Re){this.injector=me,this.elementRef=Re,this.onChange=()=>{},this.onTouched=()=>{}}writeValue(me){this.elementRef.nativeElement.value=this.lastValue=me,Cn(this.elementRef)}handleValueChange(me,Re){me===this.elementRef.nativeElement&&(Re!==this.lastValue&&(this.lastValue=Re,this.onChange(Re)),Cn(this.elementRef))}_handleBlurEvent(me){me===this.elementRef.nativeElement&&(this.onTouched(),Cn(this.elementRef))}registerOnChange(me){this.onChange=me}registerOnTouched(me){this.onTouched=me}setDisabledState(me){this.elementRef.nativeElement.disabled=me}ngOnDestroy(){this.statusChanges&&this.statusChanges.unsubscribe()}ngAfterViewInit(){let me;try{me=this.injector.get(rn.eq)}catch{}if(!me)return;me.statusChanges&&(this.statusChanges=me.statusChanges.subscribe(()=>Cn(this.elementRef)));const Re=me.control;Re&&["markAsTouched","markAllAsTouched","markAsUntouched","markAsDirty","markAsPristine"].forEach(ln=>{if(typeof Re[ln]<"u"){const En=Re[ln].bind(Re);Re[ln]=(...Mn)=>{En(...Mn),Cn(this.elementRef)}}})}}return on.\u0275fac=function(me){return new(me||on)(v.GI1(v.zZn),v.GI1(v.GMv))},on.\u0275dir=v.Sc5({type:on,hostBindings:function(me,Re){1&me&&v.qCj("ionBlur",function(ln){return Re._handleBlurEvent(ln.target)})}}),on})();const Cn=on=>{_n(()=>{const le=on.nativeElement,me=null!=le.value&&le.value.toString().length>0,Re=kr(le);si(le,Re);const Pt=le.closest("ion-item");Pt&&si(Pt,me?[...Re,"item-has-value"]:Re)})},kr=on=>{const le=on.classList,me=[];for(let Re=0;Re<le.length;Re++){const Pt=le.item(Re);null!==Pt&&oi(Pt,"ng-")&&me.push(`ion-${Pt.substring(3)}`)}return me},si=(on,le)=>{const me=on.classList;me.remove("ion-valid","ion-invalid","ion-touched","ion-untouched","ion-dirty","ion-pristine"),me.add(...le)},oi=(on,le)=>on.substring(0,le.length)===le;class yi{constructor(le){this.ctrl=le}create(le){return this.ctrl.create(le||{})}dismiss(le,me,Re){return this.ctrl.dismiss(le,me,Re)}getTop(){return this.ctrl.getTop()}}},83068:(B,G,a)=>{"use strict";a.d(G,{iW:()=>Nn,WV:()=>ir,UJ:()=>Ut,cm:()=>Lt,qU:()=>Dt,qk:()=>xt,sn:()=>lt,ew:()=>Fn,Kk:()=>gr,_i:()=>Mr,YP:()=>sr,Ko:()=>zr,A5:()=>Xt,Yb:()=>wn,QR:()=>Ze,yc:()=>Br,sW:()=>jr,WU:()=>Ir,EH:()=>Ai,Cg:()=>Re,qo:()=>$n,KQ:()=>jn,Cy:()=>di,gd:()=>Mi,YA:()=>_n,gP:()=>oi,E$:()=>le,wZ:()=>hn,yX:()=>qr,qS:()=>ri,mY:()=>Mn,IT:()=>se,qG:()=>ce,Gq:()=>en});var i=a(32116),v=a(44716),b=a(90304),_=a(81316),C=a(70800),P=a(91368),S=a(89192),R=a(30388),ee=(a(34536),a(42408),a(6200),a(86944)),J=(a(62528),a(12072)),Q=a(59637),we=a(68091),de=a(82808),Se=(a(14829),a(96040));a(66560),a(95440);var Ne=a(73448);const Ie=J.i,H=function(){var T=(0,Ne.c)(function*(st,Z){if(!(typeof window>"u"))return yield Ie(),(0,Se.b)(JSON.parse('[["ion-menu_3",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]],{"type":["typeChanged"],"disabled":["disabledChanged"],"side":["sideChanged"],"swipeGesture":["swipeGestureChanged"]}],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["ion-fab_3",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]},null,{"activated":["activatedChanged"]}],[1,"ion-fab-list",{"activated":[4],"side":[1]},null,{"activated":["activatedChanged"]}]]],["ion-refresher_2",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]},null,{"disabled":["disabledChanged"]}]]],["ion-back-button",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["ion-toast",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"positionAnchor":[1,"position-anchor"],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"swipeGesture":[1,"swipe-gesture"],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"swipeGesture":["swipeGestureChanged"],"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["ion-card_5",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[32,"ion-card-content"],[33,"ion-card-header",{"color":[513],"translucent":[4]}],[33,"ion-card-subtitle",{"color":[513]}],[33,"ion-card-title",{"color":[513]}]]],["ion-item-option_3",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]},null,{"disabled":["disabledChanged"]}]]],["ion-accordion_2",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]},null,{"value":["valueChanged"]}],[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]}
1,[[0,"keydown","onKeydown"]],{"value":["valueChanged"],"disabled":["disabledChanged"],"readonly":["readonlyChanged"]}]]],["ion-infinite-scroll_2",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]},null,{"threshold":["thresholdChanged"],"disabled":["disabledChanged"]}]]],["ion-reorder_2",[[33,"ion-reorder",null,[[2,"click","onClick"]]],[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]},null,{"disabled":["disabledChanged"]}]]],["ion-segment_2",[[33,"ion-segment-button",{"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]},null,{"value":["valueChanged"]}],[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]],{"color":["colorChanged"],"swipeGesture":["swipeGestureChanged"],"value":["valueChanged"],"disabled":["disabledChanged"]}]]],["ion-tab-bar_2",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},null,{"selectedTab":["selectedTabChanged"]}]]],["ion-chip",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["ion-datetime-button",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["ion-input",[[38,"ion-input",{"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[
11],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},null,{"debounce":["debounceChanged"],"disabled":["disabledChanged"],"placeholder":["placeholderChanged"],"value":["valueChanged"]}]]],["ion-searchbar",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]},null,{"lang":["onLangChanged"],"dir":["onDirChanged"],"debounce":["debounceChanged"],"value":["valueChanged"],"showCancelButton":["showCancelButtonChanged"]}]]],["ion-toggle",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"legacy":[4],"justify":[1],"alignment":[1],"activated":[32]},null,{"disabled":["disabledChanged"]}]]],["ion-nav_2",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]},null,{"swipeGesture":["swipeGestureChanged"],"root":["rootChanged"]}],[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["ion-textarea",[[38,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[514],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"shape":[1],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},null,{"debounce":["debounceChanged"],"disabled":["disabledChanged"],"value":["valueChanged"]}]]],["ion-backdrop",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["ion-loading",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["ion-breadcrumb_2",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}],[33,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]}
1,[[0,"collapsedClick","onCollapsedClick"]],{"maxItems":["maxItemsChanged"],"itemsBeforeCollapse":["maxItemsChanged"],"itemsAfterCollapse":["maxItemsChanged"]}]]],["ion-modal",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["ion-route_4",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]},null,{"url":["onUpdate"],"component":["onUpdate"],"componentProps":["onComponentProps"]}],[0,"ion-route-redirect",{"from":[1],"to":[1]},null,{"from":["propDidChange"],"to":["propDidChange"]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["ion-avatar_3",[[33,"ion-avatar"],[33,"ion-badge",{"color":[513]}],[1,"ion-thumbnail"]]],["ion-col_3",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["ion-tab_2",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]},null,{"active":["changeActive"]}],[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["ion-img",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]},null,{"src":["srcChanged"]}]]],["ion-progress-bar",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["ion-range",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"legacy":[4],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]},null,{"debounce":["debounceChanged"],"min":["minChanged"],"max":["maxChanged"],"activeBarStart":["activeBarStartChanged"],"disabled":["disabledChanged"],"value":["valueChanged"]}]]],["ion-split-pane",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]},null,{"visible":["visibleChanged"],"disabled":["updateState"],"when":["updateState"]}]]],["ion-text",[[1,"ion-text",{"color":[513]}]]],["ion-item_8",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[32,"ion-item-group"],[1,"ion-skeleton-text",{"animated":[4]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focu
1sable":[32],"counterString":[32]},[[0,"ionInput","handleIonInput"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]],{"button":["buttonChanged"],"counterFormatter":["counterFormatterChanged"]}],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]},null,{"color":["colorChanged"],"position":["positionChanged"]}],[33,"ion-note",{"color":[513]}]]],["ion-select_3",[[33,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"legacy":[4],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"isExpanded":[32],"open":[64]},null,{"disabled":["styleChanged"],"isExpanded":["styleChanged"],"placeholder":["styleChanged"],"value":["styleChanged"]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}]]],["ion-picker-internal",[[33,"ion-picker-internal",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]],["ion-datetime_3",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"formatOptions":[16],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16],"multiple":[4],"highlightedDates":[16],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isTimePopoverOpen":[32],"forceRenderDate":[32],"confirm":[64],"reset":[64],"cancel":[64]},null,{"formatOptions":["formatOptionsChanged"],"disabled":["disabledChanged"],"min":["minChanged"],"max":["maxChanged"],"presentation":["presentationChanged"],"yearValues":["yearValuesChanged"],"monthValues":["monthValuesChanged"],"dayValues":["dayValuesChanged"],"hourValues":["hourValuesChanged"],"minuteValues":["minuteValuesChanged"],"value":["valueChanged"]}],[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}],[32,"ion-picker-column",{"col":[16]},null,{"col":["colChanged"]}]]],["ion-radio_2",[[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"legacy":[4],"justify":[1],"alignment":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]},null,{"value":["valueChanged"],"checked":["styleChanged"],"color":["styleChanged"],"disabled":["styleChanged"]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"compareWith":[1,"compare-with"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]],{"value":["valueChanged"]}]]],["ion-ripple-effect",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["ion-button_2",[[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1]},null,{"disabled":["disabledChanged"]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"],"ios":["loadIcon"],"md":["loadIcon"]}]]],["ion-action-sheet",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["ion-alert",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"],"buttons":["buttonsChanged"],"input
1s":["inputsChanged"]}]]],["ion-app_8",[[0,"ion-app",{"setFocus":[64]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[9,"resize","onResize"]]],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]},null,{"swipeHandler":["swipeHandlerChanged"]}],[33,"ion-title",{"color":[513],"size":[1]},null,{"size":["sizeChanged"]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}]]],["ion-picker-column-internal",[[33,"ion-picker-column-internal",{"disabled":[4],"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]},null,{"value":["valueChange"]}]]],["ion-popover",[[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"isOpen":["onIsOpenChange"]}]]],["ion-checkbox",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"legacy":[4]},null,{"checked":["styleChanged"],"disabled":["styleChanged"]}]]],["ion-spinner",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]]]'),Z)});return function(Z,wt){return T.apply(this,arguments)}}(),j=["*"];function We(T,st){if(1&T&&(i.I0R(0,"div",1),i.C_f(1,2),i.C$Y()),2&T){const Z=i.GaO();i.yG2(),i.E7m("ngTemplateOutlet",Z.template)}}function At(T,st){if(1&T&&i.C_f(0,1),2&T){const Z=i.GaO();i.E7m("ngTemplateOutlet",Z.template)}}let Ut=(()=>{class T extends b.uU{constructor(Z,wt){super(Z,wt)}writeValue(Z){this.elementRef.nativeElement.checked=this.lastValue=Z,(0,b.ag)(this.elementRef)}_handleIonChange(Z){this.handleValueChange(Z,Z.checked)}}return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.zZn),i.GI1(i.GMv))},T.\u0275dir=i.Sc5({type:T,selectors:[["ion-checkbox"],["ion-toggle"]],hostBindings:function(Z,wt){1&Z&&i.qCj("ionChange",function(Sr){return wt._handleIonChange(Sr.target)})},features:[i.M5G([{provide:v.Y6,useExisting:T,multi:!0}]),i.eg9]}),T})(),se=(()=>{class T extends b.uU{constructor(Z,wt){super(Z,wt)}_handleChangeEvent(Z){this.handleValueChange(Z,Z.value)}}return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.zZn),i.GI1(i.GMv))},T.\u0275dir=i.Sc5({type:T,selectors:[["ion-select"],["ion-radio-group"],["ion-segment"],["ion-datetime"]],hostBindings:function(Z,wt){1&Z&&i.qCj("ionChange",function(Sr){return wt._handleChangeEvent(Sr.target)})},features:[i.M5G([{provide:v.Y6,useExisting:T,multi:!0}]),i.eg9]}),T})(),ce=(()=>{class T extends b.uU{constructor(Z,wt){super(Z,wt)}_handleInputEvent(Z){this.handleValueChange(Z,Z.value)}}return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.zZn),i.GI1(i.GMv))},T.\u0275dir=i.Sc5({type:T,selectors:[["ion-input",3,"type","number"],["ion-textarea"],["ion-searchbar"],["ion-range"]],hostBindings:function(Z,wt){1&Z&&i.qCj("ionInput",function(Sr){return wt._handleInputEvent(Sr.target)})},features:[i.M5G([{provide:v.Y6,useExisting:T,multi:!0}]),i.eg9]}),T})();const K=(T,st)=>{const Z=T.prototype;st.forEach(wt=>{Object.defineProperty(Z,wt,{get(){return this.el[wt]},set(Vt){this.z.runOutsideAngular(()=>this.el[wt]=Vt)},configurable:!0})})},_e=(T,st)=>{const Z=T.prototype;st.forEach(wt=>{Z[wt]=function(){const Vt=arguments;return this.z.runOutsideAngular(()=>this.el[wt].apply(this.el,Vt))}})},Pe=(T,st,Z)=>{Z.forEach(wt=>T[wt]=(0,C.w)(st,wt))};function ke(T){return function(Z){const{defineCustomElementFn:wt,inputs:Vt,methods:Sr}=T;return void 0!==wt&&wt(),Vt&&K(Z,Vt),Sr&&_e(Z,Sr),Z}}let Lt=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-accordion"]],inputs:{disabled:"disabled",mode:"mode",readonly:"readonly",toggleIcon:"toggleIcon",toggleIconSlot:"toggleIconSlot",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["disabled","mode","readonly","toggleIcon","toggleIconSlot","value"]})],T),T})(),Dt=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionChange"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-accordion-group"]],inputs:{animated:"animated",disabled:"disabled",expand:"expand",mode:"mode",multiple:"multiple",readonly:"readonly",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["animated","disabled","expand","mode","multiple","readonly","value"]})],T),T})(),xt=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-app"]],ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({})],T),T})(),lt=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionFocus","ionBlur"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-button"]],inputs:{buttonType:"buttonType",color:"color",disabled:"disabled",download:"download",expand:"expand",fill:"fill",form:"form",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",size:"size",strong:"strong",target:"target",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["buttonType","color","disabled","download","expand","fill","form","href","mode","rel","routerAnimation","routerDirection","shape","size","strong","target","type"]})],T),T})(),Fn=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionChange","ionFocus","ionBlur"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-checkbox"]],inputs:{alignment:"alignment",checked:"checked",color:"color",disabled:"disabled",indeterminate:"indeterminate",justify:"justify",labelPlacement:"labelPlacement",legacy:"legacy",mode:"mode",name:"name",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["alignment","checked","color","disabled","indeterminate","justify","labelPlacement","legacy","mode","name","value"]})],T),T})(),gr=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-col"]],inputs:{offset:"offset",offsetLg:"offsetLg",offsetMd:"offsetMd",offsetSm:"offsetSm",offsetXl:"offsetXl",offsetXs:"offsetXs",pull:"pull",pullLg:"pullLg",pullMd:"pullMd",pullSm:"pullSm",pullXl:"pullXl",pullXs:"pullXs",push:"push",pushLg:"pushLg",pushMd:"pushMd",pushSm:"pushSm",pushXl:"pushXl",pu
1shXs:"pushXs",size:"size",sizeLg:"sizeLg",sizeMd:"sizeMd",sizeSm:"sizeSm",sizeXl:"sizeXl",sizeXs:"sizeXs"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["offset","offsetLg","offsetMd","offsetSm","offsetXl","offsetXs","pull","pullLg","pullMd","pullSm","pullXl","pullXs","push","pushLg","pushMd","pushSm","pushXl","pushXs","size","sizeLg","sizeMd","sizeSm","sizeXl","sizeXs"]})],T),T})(),Mr=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionScrollStart","ionScroll","ionScrollEnd"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-content"]],inputs:{color:"color",forceOverscroll:"forceOverscroll",fullscreen:"fullscreen",scrollEvents:"scrollEvents",scrollX:"scrollX",scrollY:"scrollY"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["color","forceOverscroll","fullscreen","scrollEvents","scrollX","scrollY"],methods:["getScrollElement","scrollToTop","scrollToBottom","scrollByPoint","scrollToPoint"]})],T),T})(),sr=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-grid"]],inputs:{fixed:"fixed"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["fixed"]})],T),T})(),zr=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-icon"]],inputs:{color:"color",flipRtl:"flipRtl",icon:"icon",ios:"ios",lazy:"lazy",md:"md",mode:"mode",name:"name",sanitize:"sanitize",size:"size",src:"src"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["color","flipRtl","icon","ios","lazy","md","mode","name","sanitize","size","src"]})],T),T})(),Xt=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionInput","ionChange","ionBlur","ionFocus"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-input"]],inputs:{accept:"accept",autocapitalize:"autocapitalize",autocomplete:"autocomplete",autocorrect:"autocorrect",autofocus:"autofocus",clearInput:"clearInput",clearOnEdit:"clearOnEdit",color:"color",counter:"counter",counterFormatter:"counterFormatter",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",errorText:"errorText",fill:"fill",helperText:"helperText",inputmode:"inputmode",label:"label",labelPlacement:"labelPlacement",legacy:"legacy",max:"max",maxlength:"maxlength",min:"min",minlength:"minlength",mode:"mode",multiple:"multiple",name:"name",pattern:"pattern",placeholder:"placeholder",readonly:"readonly",required:"required",shape:"shape",size:"size",spellcheck:"spellcheck",step:"step",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["accept","autocapitalize","autocomplete","autocorrect","autofocus","clearInput","clearOnEdit","color","counter","counterFormatter","debounce","disabled","enterkeyhint","errorText","fill","helperText","inputmode","label","labelPlacement","legacy","max","maxlength","min","minlength","mode","multiple","name","pattern","placeholder","readonly","required","shape","size","spellcheck","step","type","value"],methods:["setFocus","getInputElement"]})],T),T})(),wn=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-item"]],inputs:{button:"button",color:"color",counter:"counter",counterFormatter:"counterFormatter",detail:"detail",detailIcon:"detailIcon",disabled:"disabled",download:"download",fill:"fill",href:"href",lines:"lines",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",target:"target",type:"type"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["button","color","counter","counterFormatter","detail","detailIcon","disabled","download","fill","href","lines","mode","rel","routerAnimation","routerDirection","shape","target","type"]})],T),T})(),Ze=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-label"]],inputs:{color:"color",mode:"mode",position:"position"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["color","mode","position"]})],T),T})(),Ir=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-progress-bar"]],inputs:{buffer:"buffer",color:"color",mode:"mode",reversed:"reversed",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["buffer","color","mode","reversed","type","value"]})],T),T})(),Ai=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionChange","ionInput","ionFocus","ionBlur","ionKnobMoveStart","ionKnobMoveEnd"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-range"]],inputs:{activeBarStart:"activeBarStart",color:"color",debounce:"debounce",disabled:"disabled",dualKnobs:"dualKnobs",label:"label",labelPlacement:"labelPlacement",legacy:"legacy",max:"max",min:"min",mode:"mode",name:"name",pin:"pin",pinFormatter:"pinFormatter",snaps:"snaps",step:"step",ticks:"ticks",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["activeBarStart","color","debounce","disabled","dualKnobs","label","labelPlacement","legacy","max","min","mode","name","pin","pinFormatter","snaps","step","ticks","value"]})],T),T})(),$n=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-row"]],ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({})],T),T})(),jn=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionInput","ionChange","ionCancel","ionClear","
1ionBlur","ionFocus"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-searchbar"]],inputs:{animated:"animated",autocapitalize:"autocapitalize",autocomplete:"autocomplete",autocorrect:"autocorrect",cancelButtonIcon:"cancelButtonIcon",cancelButtonText:"cancelButtonText",clearIcon:"clearIcon",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",maxlength:"maxlength",minlength:"minlength",mode:"mode",name:"name",placeholder:"placeholder",searchIcon:"searchIcon",showCancelButton:"showCancelButton",showClearButton:"showClearButton",spellcheck:"spellcheck",type:"type",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["animated","autocapitalize","autocomplete","autocorrect","cancelButtonIcon","cancelButtonText","clearIcon","color","debounce","disabled","enterkeyhint","inputmode","maxlength","minlength","mode","name","placeholder","searchIcon","showCancelButton","showClearButton","spellcheck","type","value"],methods:["setFocus","getInputElement"]})],T),T})(),di=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionChange","ionCancel","ionDismiss","ionFocus","ionBlur"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-select"]],inputs:{cancelText:"cancelText",color:"color",compareWith:"compareWith",disabled:"disabled",expandedIcon:"expandedIcon",fill:"fill",interface:"interface",interfaceOptions:"interfaceOptions",justify:"justify",label:"label",labelPlacement:"labelPlacement",legacy:"legacy",mode:"mode",multiple:"multiple",name:"name",okText:"okText",placeholder:"placeholder",selectedText:"selectedText",shape:"shape",toggleIcon:"toggleIcon",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["cancelText","color","compareWith","disabled","expandedIcon","fill","interface","interfaceOptions","justify","label","labelPlacement","legacy","mode","multiple","name","okText","placeholder","selectedText","shape","toggleIcon","value"],methods:["open"]})],T),T})(),Mi=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-select-option"]],inputs:{disabled:"disabled",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["disabled","value"]})],T),T})(),_n=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-spinner"]],inputs:{color:"color",duration:"duration",name:"name",paused:"paused"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["color","duration","name","paused"]})],T),T})(),oi=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionChange","ionInput","ionBlur","ionFocus"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-textarea"]],inputs:{autoGrow:"autoGrow",autocapitalize:"autocapitalize",autofocus:"autofocus",clearOnEdit:"clearOnEdit",color:"color",cols:"cols",counter:"counter",counterFormatter:"counterFormatter",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",errorText:"errorText",fill:"fill",helperText:"helperText",inputmode:"inputmode",label:"label",labelPlacement:"labelPlacement",legacy:"legacy",maxlength:"maxlength",minlength:"minlength",mode:"mode",name:"name",placeholder:"placeholder",readonly:"readonly",required:"required",rows:"rows",shape:"shape",spellcheck:"spellcheck",value:"value",wrap:"wrap"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["autoGrow","autocapitalize","autofocus","clearOnEdit","color","cols","counter","counterFormatter","debounce","disabled","enterkeyhint","errorText","fill","helperText","inputmode","label","labelPlacement","legacy","maxlength","minlength","mode","name","placeholder","readonly","required","rows","shape","spellcheck","value","wrap"],methods:["setFocus","getIn
1putElement"]})],T),T})(),le=(()=>{let T=class{constructor(Z,wt,Vt){this.z=Vt,Z.detach(),this.el=wt.nativeElement,Pe(this,this.el,["ionChange","ionFocus","ionBlur"])}};return T.\u0275fac=function(Z){return new(Z||T)(i.GI1(i.kD9),i.GI1(i.GMv),i.GI1(i.WW2))},T.\u0275cmp=i.In1({type:T,selectors:[["ion-toggle"]],inputs:{alignment:"alignment",checked:"checked",color:"color",disabled:"disabled",enableOnOffLabels:"enableOnOffLabels",justify:"justify",labelPlacement:"labelPlacement",legacy:"legacy",mode:"mode",name:"name",value:"value"},ngContentSelectors:j,decls:1,vars:0,template:function(Z,wt){1&Z&&(i.kPM(),i._Xx(0))},encapsulation:2,changeDetection:0}),T=(0,_.UN)([ke({inputs:["alignment","checked","color","disabled","enableOnOffLabels","justify","labelPlacement","legacy","mode","name","value"]})],T),T})(),Re=(()=>{class T extends b.Cg{constructor(Z,wt,Vt,Sr,St,Rt,Ee,U){super(Z,wt,Vt,Sr,St,Rt,Ee,U),this.parentOutlet=U}}return T.\u0275fac=function(Z){return new(Z||T)(i.gJ8("name"),i.gJ8("tabs"),i.GI1(P.oB),i.GI1(i.GMv),i.GI1(S.E5),i.GI1(i.WW2),i.GI1(S.gV),i.GI1(T,12))},T.\u0275dir=i.Sc5({type:T,selectors:[["ion-router-outlet"]],features:[i.eg9]}),T})(),Mn=(()=>{class T extends b.g5{}return T.\u0275fac=(()=>{let st;return function(wt){return(st||(st=i.otF(T)))(wt||T)}})(),T.\u0275dir=i.Sc5({type:T,selectors:[["","routerLink","",5,"a",5,"area"]],features:[i.eg9]}),T})(),Br=(()=>{class T extends b.Qz{}return T.\u0275fac=(()=>{let st;return function(wt){return(st||(st=i.otF(T)))(wt||T)}})(),T.\u0275cmp=i.In1({type:T,selectors:[["ion-modal"]],features:[i.eg9],decls:1,vars:1,consts:[["class","ion-delegate-host ion-page",4,"ngIf"],[1,"ion-delegate-host","ion-page"],[3,"ngTemplateOutlet"]],template:function(Z,wt){1&Z&&i.yuY(0,We,2,1,"div",0),2&Z&&i.E7m("ngIf",wt.isCmpOpen||wt.keepContentsMounted)},dependencies:[P.u_,P.XV],encapsulation:2,changeDetection:0}),T})(),jr=(()=>{class T extends b.sW{}return T.\u0275fac=(()=>{let st;return function(wt){return(st||(st=i.otF(T)))(wt||T)}})(),T.\u0275cmp=i.In1({type:T,selectors:[["ion-popover"]],features:[i.eg9],decls:1,vars:1,consts:[[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(Z,wt){1&Z&&i.yuY(0,At,1,1,"ng-container",0),2&Z&&i.E7m("ngIf",wt.isCmpOpen||wt.keepContentsMounted)},dependencies:[P.u_,P.XV],encapsulation:2,changeDetection:0}),T})();const gn={provide:v.WM,useExisting:(0,i.wd)(()=>Xe),multi:!0};let Xe=(()=>{class T extends v._t{}return T.\u0275fac=(()=>{let st;return function(wt){return(st||(st=i.otF(T)))(wt||T)}})(),T.\u0275dir=i.Sc5({type:T,selectors:[["ion-input","type","number","max","","formControlName",""],["ion-input","type","number","max","","formControl",""],["ion-input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(Z,wt){2&Z&&i.e48("max",wt._enabled?wt.max:null)},features:[i.M5G([gn]),i.eg9]}),T})();const Tt={provide:v.WM,useExisting:(0,i.wd)(()=>An),multi:!0};let An=(()=>{class T extends v.Gu{}return T.\u0275fac=(()=>{let st;return function(wt){return(st||(st=i.otF(T)))(wt||T)}})(),T.\u0275dir=i.Sc5({type:T,selectors:[["ion-input","type","number","min","","formControlName",""],["ion-input","type","number","min","","formControl",""],["ion-input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(Z,wt){2&Z&&i.e48("min",wt._enabled?wt.min:null)},features:[i.M5G([Tt]),i.eg9]}),T})(),Nn=(()=>{class T extends b.gk{constructor(){super(de.a)}}return T.\u0275fac=function(Z){return new(Z||T)},T.\u0275prov=i.wxM({token:T,factory:T.\u0275fac,providedIn:"root"}),T})(),ir=(()=>{class T{create(Z){return(0,R.c)(Z)}easingTime(Z,wt,Vt,Sr,St){return(0,ee.g)(Z,wt,Vt,Sr,St)}}return T.\u0275fac=function(Z){return new(Z||T)},T.\u0275prov=i.wxM({token:T,factory:T.\u0275fac,providedIn:"root"}),T})(),qr=(()=>{class T extends b.yX{constructor(){super(we.m)}}return T.\u0275fac=function(Z){return new(Z||T)},T.\u0275prov=i.wxM({token:T,factory:T.\u0275fac,providedIn:"root"}),T})(),ri=(()=>{class T extends b.gk{constructor(){super(de.m),this.angularDelegate=(0,i.uUt)(b.kh),this.injector=(0,i.uUt)(i.zZn),this.environmentInjector=(0,i.uUt)(i.SIe)}create(Z){return super.create({...Z,delegate:this.angularDelegate.create(this.environmentInjector,this.injector,"modal")})}}return T.\u0275fac=function(Z){return new(Z||T)},T.\u0275prov=i.wxM({token:T,factory:T.\u0275fac}),T})();class zt extends b.gk{constructor(){super(de.c),this.angularDelegate=(0,i.uUt)(b.kh),this.injector=(0,i.uUt)(i.zZn),this.environmentInjector=(0,i.uUt)(i.SIe)}create(st){return super.create({...st,delegate:this.angularDelegate.create(this.environmentInjector,this.injector,"popover")})}}let en=(()=>{class T extends b.gk{constructor(){super(de.t)}}return T.\u0275fac=function(Z){return new(Z||T)},T.\u0275prov=i.wxM({token:T,factory:T.\u0275fac,providedIn:"root"}),T})();const bt=(T,st,Z)=>()=>{const wt=st.defaultView;if(wt&&typeof window<"u"){(0,Q.s)({...T,_zoneGate:Sr=>Z.run(Sr)});const Vt="__zone_symbol__addEventListener"in st.body?"__zone_symbol__addEventListener":"addEventListener";return function Ve(){var T=[];
1if(typeof window<"u"){var st=window;(!st.customElements||st.Element&&(!st.Element.prototype.closest||!st.Element.prototype.matches||!st.Element.prototype.remove||!st.Element.prototype.getRootNode))&&T.push(a.e(4448).then(a.t.bind(a,70812,23))),("function"!=typeof Object.assign||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||st.NodeList&&!st.NodeList.prototype.forEach||!st.fetch||!function(){try{var wt=new URL("b","http://a");return wt.pathname="c%20d","http://a/c%20d"===wt.href&&wt.searchParams}catch{return!1}}()||typeof WeakMap>"u")&&T.push(a.e(488).then(a.t.bind(a,36304,23)))}return Promise.all(T)}().then(()=>H(wt,{exclude:["ion-tabs","ion-tab"],syncQueue:!0,raf:b.cl,jmp:Sr=>Z.runOutsideAngular(Sr),ael(Sr,St,Rt,Ee){Sr[Vt](St,Rt,Ee)},rel(Sr,St,Rt,Ee){Sr.removeEventListener(St,Rt,Ee)}}))}};let hn=(()=>{class T{static forRoot(Z){return{ngModule:T,providers:[{provide:b.m2,useValue:Z},{provide:i.kZF,useFactory:bt,multi:!0,deps:[b.m2,P.Ud,i.WW2]},(0,b.Al)()]}}}return T.\u0275fac=function(Z){return new(Z||T)},T.\u0275mod=i.a4G({type:T}),T.\u0275inj=i.s3X({providers:[b.kh,ri,zt],imports:[P.MD]}),T})()},49252:(B,G,a)=>{"use strict";a.d(G,{c:()=>i.c});var i=a(98368);i.c.registerVersion("firebase","10.9.0","app-compat")},44860:(B,G,a)=>{"use strict";a.r(G);var i=a(73448),v=a(98368),b=a(27144),_=a(99360),C=a(95976),P=a(81316),S=a(12540);const k={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"};const Q=function te(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
1ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not regist
vendor: 9,511 bytes, line 1
1ed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is incorrect, malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-password":"A non-empty password must be provided","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.","missing-recaptcha-token":"The reCAPTCHA token is missing when sending request to the backend.","invalid-recaptcha-token":"The reCAPTCHA token is invalid when sending request to the backend.","invalid-recaptcha-action":"The reCAPTCHA action is invalid when sending request to the backend.","recaptcha-not-enabled":"reCAPTCHA Enterprise integration is not enabled for this project.","missing-client-type":"The reCAPTCHA client type is missing when sending request to the backend.","missing-recaptcha-version":"The reCAPTCHA version is missing when sending request to the backend.","invalid-req-type":"Invalid request parameters.","invalid-recaptcha-version":"The reCAPTCHA version is invalid when sending request to the backend.","unsupported-password-policy-schema-version":"The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.","password-does-not-meet-requirements":"The password does not meet the requirements."
1}},we=function J(){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."}},de=new b.UR("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),Se=new C.YJ("@firebase/auth");function pe(M,...m){Se.logLevel<=C.Ge.ERROR&&Se.error(`Auth (${_.SDK_VERSION}): ${M}`,...m)}function ae(M,...m){throw H(M,...m)}function Ve(M,...m){return H(M,...m)}function Ne(M,m,E){const L=Object.assign(Object.assign({},we()),{[m]:E});return new b.UR("auth","Firebase",L).create(m,{appName:M.name})}function Ie(M,m,E){if(!(m instanceof E))throw E.name!==m.constructor.name&&ae(M,"argument-error"),Ne(M,"argument-error",`Type of ${m.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function H(M,...m){if("string"!=typeof M){const E=m[0],L=[...m.slice(1)];return L[0]&&(L[0].appName=M.name),M._errorFactory.create(E,...L)}return de.create(M,...m)}function j(M,m,...E){if(!M)throw H(m,...E)}function ye(M){const m="INTERNAL ASSERTION FAILED: "+M;throw pe(m),new Error(m)}function Le(M,m){M||ye(m)}function W(){var M;return typeof self<"u"&&(null===(M=self.location)||void 0===M?void 0:M.href)||""}function We(){return"http:"===At()||"https:"===At()}function At(){var M;return typeof self<"u"&&(null===(M=self.location)||void 0===M?void 0:M.protocol)||null}class ue{constructor(m,E){this.shortDelay=m,this.longDelay=E,Le(E>m,"Short delay should be less than long delay!"),this.isMobile=(0,b.AV)()||(0,b.AL)()}get(){return function Ut(){return!(typeof navigator<"u"&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(We()||(0,b.Cc)()||"connection"in navigator))||navigator.onLine}()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function se(M,m){Le(M.emulator,"Emulator should always be set here");const{url:E}=M.emulator;return m?`${E}${m.startsWith("/")?m.slice(1):m}`:E}class ce{static initialize(m,E,L){this.fetchImpl=m,E&&(this.headersImpl=E),L&&(this.responseImpl=L)}static fetch(){return this.fetchImpl?this.fetchImpl:typeof self<"u"&&"fetch"in self?self.fetch:typeof globalThis<"u"&&globalThis.fetch?globalThis.fetch:typeof fetch<"u"?fetch:void ye("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:typeof self<"u"&&"Headers"in self?self.Headers:typeof globalThis<"u"&&globalThis.Headers?globalThis.Headers:typeof Headers<"u"?Headers:void ye("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:typeof self<"u"&&"Response"in self?self.Response:typeof globalThis<"u"&&globalThis.Response?globalThis.Response:typeof Response<"u"?Response:void ye("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const K={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",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-rec
1aptcha-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"},_e=new ue(3e4,6e4);function Pe(M,m){return M.tenantId&&!m.tenantId?Object.assign(Object.assign({},m),{tenantId:M.tenantId}):m}function De(M,m,E,L){return ke.apply(this,arguments)}function ke(){return(ke=(0,i.c)(function*(M,m,E,L,at={}){return Lt(M,at,(0,i.c)(function*(){let Yt={},Zn={};L&&("GET"===m?Zn=L:Yt={body:JSON.stringify(L)});const xr=(0,b.ik)(Object.assign({key:M.config.apiKey},Zn)).slice(1),vi=yield M._getAdditionalHeaders();return vi["Content-Type"]="application/json",M.languageCode&&(vi["X-Firebase-Locale"]=M.languageCode),ce.fetch()(xt(M,M.config.apiHost,E,xr),Object.assign({method:m,headers:vi,referrerPolicy:"no-referrer"},Yt))}))})).apply(this,arguments)}function Lt(M,m,E){return Dt.apply(this,arguments)}function Dt(){return(Dt=(0,i.c)(function*(M,m,E){M._canInitEmulator=!1;const L=Object.assign(Object.assign({},K),m);try{const at=new rn(M),Yt=yield Promise.race([E(),at.promise]);at.clearNetworkTimeout();const Zn=yield Yt.json();if("needConfirmation"in Zn)throw cn(M,"account-exists-with-different-credential",Zn);if(Yt.ok&&!("errorMessage"in Zn))return Zn;{const xr=Yt.ok?Zn.errorMessage:Zn.error.message,[vi,Yi]=xr.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===vi)throw cn(M,"credential-already-in-use",Zn);if("EMAIL_EXISTS"===vi)throw cn(M,"email-already-in-use",Zn);if("USER_DISABLED"===vi)throw cn(M,"user-disabled",Zn);const Ji=L[vi]||vi.toLowerCase().replace(/[_\s]+/g,"-");if(Yi)throw Ne(M,Ji,Yi);ae(M,Ji)}}catch(at){if(at instanceof b.kx)throw at;ae(M,"network-request-failed",{message:String(at)})}})).apply(this,arguments)}function He(M,m,E,L){return ge.apply(this,arguments)}function ge(){return(ge=(0,i.c)(function*(M,m,E,L,at={}){const Yt=yield De(M,m,E,L,at);return"mfaPendingCredential"in Yt&&ae(M,"multi-factor-auth-required",{_serverResponse:Yt}),Yt})).apply(this,arguments)}function xt(M,m,E,L){const at=`${m}${E}?${L}`;return M.config.emulator?se(M.config,at):`${M.config.apiScheme}://${at}`}function pt(M){switch(M){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class rn{constructor(m){this.auth=m,this.timer=null,this.promise=new Promise((E,L)=>{this.timer=setTimeout(()=>L(Ve(this.auth,"network-request-failed")),_e.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function cn(M,m,E){const L={appName:M.name};E.email&&(L.email=E.email),E.phoneNumber&&(L.phoneNumber=E.phoneNumber);const at=Ve(M,m,L);return at.customData._tokenResponse=E,at}function mn(M){return void 0!==M&&void 0!==M.getResponse}function dt(M){return void 0!==M&&void 0!==M.enterprise}class lt{constructor(m){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===m.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=m.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=m.recaptchaEnforcementState}getProviderEnforcementState(m){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const E of this.recaptchaEnforcementState)if(E.provider&&E.provider===m)return pt(E.enforcementState);return null}isProviderEnabled(m){return"ENFORCE"===this.getProviderEnforcementState(m)||"AUDIT"===this.getProviderEnforcementState(m)}}function kt(){return(kt=(0,i.c)(function*(M){return(yield De(M,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""})).apply(this,arguments)}function an(M,m){return Yn.apply(this,arguments)}function Yn(){return(Yn=(0,i.c)(function*(M,m){return De(M,"GET","/v2/recaptchaConfig",Pe(M,m))})).apply(this,arguments)}function Hn(){return(Hn=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:delete",m)})).apply(this,arguments)}function On(){return(On=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:update",m)})).apply(this,arguments)}function Mr(){return(Mr=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:lookup",m)})).apply(this,arguments)}function Vr(M){if(M)try{const m=new Date(Number(M));if(!isNaN(m.getTime()))return m.toUTCString()}catch{}}function Nr(){return(Nr=(0,i.c)(function*(M,m=!1){const E=(0,b.Yj)(M),L=yield E.getIdToken(m),at=Jr(L);j(at&&at.exp&&at.auth_time&&at.iat,E.auth,"internal-error");const Yt="object"==typeof at.firebase?at.firebase:void 0,Zn=Yt?.sign_in_provider;return{claims:at,token:L,authTime:Vr(Kr(at.auth_time)),issuedAtTime:Vr(Kr(at.iat)),expirationTime:Vr(Kr(at.exp)),signInProvider:Zn||null,signInSecondFactor:Yt?.sign_in_second_factor||null}})).apply(this,arguments)}function Kr(M){return 1e3*Number(M)}function Jr(M){const[m,E,L]=M.split(".");if(void 0===m||void 0===E||void 0===L)return pe("JWT malformed, contained fewer than 3 sections"),null;try{const at=(0,b.WW)(E);return at?JSON.parse(at):(pe("Failed to decode base64 JWT payload"),null)}catch(at){return pe("Caught error parsing JWT payload as JSON",at?.toString()),null}}function or(M,m){return zr.apply(this,arguments)}function zr(){return(zr=(0,i.c)(function*(M,m,E=!1){if(E)return m;try{return yield m}catch(L){throw L instanceof b.kx&&function sn({code:M}){return"auth/user-disabled"===M||"auth/user-token-expired"===M}(L)&&M.auth.currentUser===M&&(yield M.auth.signOut()),L}})).apply(this,arguments)}class Qe{constructor(m){this.user=m,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(m){var E;if(m){const L=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),L}{this.errorBackoff=3e4;const at=(null!==(E=this.user.stsTokenManager.expirationTime)&&void 0!==E?E:0)-Date.now()-3e5;return Math.max(0,at)}}schedule(m=!1){var E=this;if(!this.isRunning)return;const L=this.getInterval(m);this.timerId=setTimeout((0,i.c)(function*(){yield E.iteration()}),L)}iteration(){var m=this;return(0,i.c)(function*(){try{yield m.user.getIdToken(!0)}catch(E){return void("auth/network-request-failed"===E?.code&&m.schedule(!0))}m.schedule()})()}}class ut{constructor(m,E){this.createdAt=m,this.lastLoginAt=E,this._initializeTime()}_initializeTime(){this.lastSignInTime=Vr(this.lastLoginAt),this.creationTime=Vr(this.createdAt)}_copy(m){this.createdAt=m.createdAt,this.lastLoginAt=m.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}function Xt(M){return wn.apply(this,arguments)}function wn(){return wn=(0,i.c)(function*(M){var m;const E=M.auth,L=yield M.getIdToken(),at=yield or(M,function gr(M,m){return Mr.apply(this,arguments)}(E,{idToken:L}));j(at?.users.length,E,"internal-error");const Yt=at.users[0];M._notifyReloadListener(Yt);const Zn=null!==(m=Yt.providerUserInfo)&&void 0!==m&&m.length?function Ct(M){return M.map(m=>{var{providerId:E}=m,L=(0,P.sX)(m,["providerId"]);
1return{providerId:E,uid:L.rawId||"",displayName:L.displayName||null,email:L.email||null,phoneNumber:L.phoneNumber||null,photoURL:L.photoUrl||null}})}(Yt.providerUserInfo):[],xr=function jt(M,m){return[...M.filter(L=>!m.some(at=>at.providerId===L.providerId)),...m]}(M.providerData,Zn),Ji=!!M.isAnonymous&&!(M.email&&Yt.passwordHash||xr?.length),Xi={uid:Yt.localId,displayName:Yt.displayName||null,photoURL:Yt.photoUrl||null,email:Yt.email||null,emailVerified:Yt.emailVerified||!1,phoneNumber:Yt.phoneNumber||null,tenantId:Yt.tenantId||null,providerData:xr,metadata:new ut(Yt.createdAt,Yt.lastLoginAt),isAnonymous:Ji};Object.assign(M,Xi)}),wn.apply(this,arguments)}function vn(){return(vn=(0,i.c)(function*(M){const m=(0,b.Yj)(M);yield Xt(m),yield m.auth._persistUserIfCurrent(m),m.auth._notifyListenersIfCurrent(m)})).apply(this,arguments)}function Ze(){return(Ze=(0,i.c)(function*(M,m){const E=yield Lt(M,{},(0,i.c)(function*(){const L=(0,b.ik)({grant_type:"refresh_token",refresh_token:m}).slice(1),{tokenApiHost:at,apiKey:Yt}=M.config,Zn=xt(M,at,"/v1/token",`key=${Yt}`),xr=yield M._getAdditionalHeaders();return xr["Content-Type"]="application/x-www-form-urlencoded",ce.fetch()(Zn,{method:"POST",headers:xr,body:L})}));return{accessToken:E.access_token,expiresIn:E.expires_in,refreshToken:E.refresh_token}})).apply(this,arguments)}function Zt(){return(Zt=(0,i.c)(function*(M,m){return De(M,"POST","/v2/accounts:revokeToken",Pe(M,m))})).apply(this,arguments)}class Fe{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(m){j(m.idToken,"internal-error"),j(typeof m.idToken<"u","internal-error"),j(typeof m.refreshToken<"u","internal-error");const E="expiresIn"in m&&typeof m.expiresIn<"u"?Number(m.expiresIn):function sr(M){const m=Jr(M);return j(m,"internal-error"),j(typeof m.exp<"u","internal-error"),j(typeof m.iat<"u","internal-error"),Number(m.exp)-Number(m.iat)}(m.idToken);this.updateTokensAndExpiration(m.idToken,m.refreshToken,E)}getToken(m,E=!1){var L=this;return(0,i.c)(function*(){return j(!L.accessToken||L.refreshToken,m,"user-token-expired"),E||!L.accessToken||L.isExpired?L.refreshToken?(yield L.refresh(m,L.refreshToken),L.accessToken):null:L.accessToken})()}clearRefreshToken(){this.refreshToken=null}refresh(m,E){var L=this;return(0,i.c)(function*(){const{accessToken:at,refreshToken:Yt,expiresIn:Zn}=yield function Mt(M,m){return Ze.apply(this,arguments)}(m,E);L.updateTokensAndExpiration(at,Yt,Number(Zn))})()}updateTokensAndExpiration(m,E,L){this.refreshToken=E||null,this.accessToken=m||null,this.expirationTime=Date.now()+1e3*L}static fromJSON(m,E){const{refreshToken:L,accessToken:at,expirationTime:Yt}=E,Zn=new Fe;return L&&(j("string"==typeof L,"internal-error",{appName:m}),Zn.refreshToken=L),at&&(j("string"==typeof at,"internal-error",{appName:m}),Zn.accessToken=at),Yt&&(j("number"==typeof Yt,"internal-error",{appName:m}),Zn.expirationTime=Yt),Zn}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(m){this.accessToken=m.accessToken,this.refreshToken=m.refreshToken,this.expirationTime=m.expirationTime}_clone(){return Object.assign(new Fe,this.toJSON())}_performRefresh(){return ye("not implemented")}}
1function ft(M,m){j("string"==typeof M||typeof M>"u","internal-error",{appName:m})}class dn{constructor(m){var{uid:E,auth:L,stsTokenManager:at}=m,Yt=(0,P.sX)(m,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Qe(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=E,this.auth=L,this.stsTokenManager=at,this.accessToken=at.accessToken,this.displayName=Yt.displayName||null,this.email=Yt.email||null,this.emailVerified=Yt.emailVerified||!1,this.phoneNumber=Yt.phoneNumber||null,this.photoURL=Yt.photoURL||null,this.isAnonymous=Yt.isAnonymous||!1,this.tenantId=Yt.tenantId||null,this.providerData=Yt.providerData?[...Yt.providerData]:[],this.metadata=new ut(Yt.createdAt||void 0,Yt.lastLoginAt||void 0)}getIdToken(m){var E=this;return(0,i.c)(function*(){const L=yield or(E,E.stsTokenManager.getToken(E.auth,m));return j(L,E.auth,"internal-error"),E.accessToken!==L&&(E.accessToken=L,yield E.auth._persistUserIfCurrent(E),E.auth._notifyListenersIfCurrent(E)),L})()}getIdTokenResult(m){return function ti(M){return Nr.apply(this,arguments)}(this,m)}reload(){return function dr(M){return vn.apply(this,arguments)}(this)}_assign(m){this!==m&&(j(this.uid===m.uid,this.auth,"internal-error"),this.displayName=m.displayName,this.photoURL=m.photoURL,this.email=m.email,this.emailVerified=m.emailVerified,this.phoneNumber=m.phoneNumber,this.isAnonymous=m.isAnonymous,this.tenantId=m.tenantId,this.providerData=m.providerData.map(E=>Object.assign({},E)),this.metadata._copy(m.metadata),this.stsTokenManager._assign(m.stsTokenManager))}_clone(m){const E=new dn(Object.assign(Object.assign({},this),{auth:m,stsTokenManager:this.stsTokenManager._clone()}));return E.metadata._copy(this.metadata),E}_onReload(m){j(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=m,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(m){this.reloadListener?this.reloadListener(m):this.reloadUserInfo=m}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(m,E=!1){var L=this;return(0,i.c)(function*(){let at=!1;m.idToken&&m.idToken!==L.stsTokenManager.accessToken&&(L.stsTokenManager.updateFromServerResponse(m),at=!0),E&&(yield Xt(L)),yield L.auth._persistUserIfCurrent(L),at&&L.auth._notifyListenersIfCurrent(L)})()}delete(){var m=this;return(0,i.c)(function*(){const E=yield m.getIdToken();return yield or(m,function bn(M,m){return Hn.apply(this,arguments)}(m.auth,{idToken:E})),m.stsTokenManager.clearRefreshToken(),m.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(m=>Object.assign({},m)),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(m,E){var L,at,Yt,Zn,xr,vi,Yi,Ji;const Xi=null!==(L=E.displayName)&&void 0!==L?L:void 0,Xo=null!==(at=E.email)&&void 0!==at?at:void 0,xl=null!==(Yt=E.phoneNumber)&&void 0!==Yt?Yt:void 0,xc=null!==(Zn=E.photoURL)&&void 0!==Zn?Zn:void 0,pc=null!==(xr=E.tenantId)&&void 0!==xr?xr:void 0,Ju=null!==(vi=E._redirectEventId)&&void 0!==vi?vi:void 0,ga=null!==(Yi=E.createdAt)&&void 0!==Yi?Yi:void 0,Ru=null!==(Ji=E.lastLoginAt)&&void 0!==Ji?Ji:void 0,{uid:Mu,emailVerified:wd,isAnonymous:Mh,providerData:bd,stsTokenManager:Ol}=E;j(Mu&&Ol,m,"internal-error");const xh=Fe.fromJSON(this.name,Ol);j("string"==typeof Mu,m,"internal-error"),ft(Xi,m.name),ft(Xo,m.name),j("boolean"==typeof wd,m,"internal-error"),j("boolean"==typeof Mh,m,"internal-error"),ft(xl,m.name),ft(xc,m.name),ft(pc,m.name),ft(Ju,m.name),ft(ga,m.name),ft(Ru,m.name);const Hd=new dn({uid:Mu,auth:m,email:Xo,emailVerified:wd,displayName:Xi,isAnonymous:Mh,p
1hotoURL:xc,phoneNumber:xl,tenantId:pc,stsTokenManager:xh,createdAt:ga,lastLoginAt:Ru});return bd&&Array.isArray(bd)&&(Hd.providerData=bd.map(Kd=>Object.assign({},Kd))),Ju&&(Hd._redirectEventId=Ju),Hd}static _fromIdTokenResponse(m,E,L=!1){return(0,i.c)(function*(){const at=new Fe;at.updateFromServerResponse(E);const Yt=new dn({uid:E.localId,auth:m,stsTokenManager:at,isAnonymous:L});return yield Xt(Yt),Yt})()}}const Tn=new Map;function Bn(M){Le(M instanceof Function,"Expected a class definition");let m=Tn.get(M);return m?(Le(m instanceof M,"Instance stored in cache mismatched with class"),m):(m=new M,Tn.set(M,m),m)}const tr=(()=>{class M{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return(0,i.c)(function*(){return!0})()}_set(E,L){var at=this;return(0,i.c)(function*(){at.storage[E]=L})()}_get(E){var L=this;return(0,i.c)(function*(){const at=L.storage[E];return void 0===at?null:at})()}_remove(E){var L=this;return(0,i.c)(function*(){delete L.storage[E]})()}_addListener(E,L){}_removeListener(E,L){}}return M.type="NONE",M})();function Ir(M,m,E){return`firebase:${M}:${m}:${E}`}class ur{constructor(m,E,L){this.persistence=m,this.auth=E,this.userKey=L;const{config:at,name:Yt}=this.auth;this.fullUserKey=Ir(this.userKey,at.apiKey,Yt),this.fullPersistenceKey=Ir("persistence",at.apiKey,Yt),this.boundEventHandler=E._onStorageEvent.bind(E),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(m){return this.persistence._set(this.fullUserKey,m.toJSON())}getCurrentUser(){var m=this;return(0,i.c)(function*(){const E=yield m.persistence._get(m.fullUserKey);return E?dn._fromJSON(m.auth,E):null})()}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(m){var E=this;return(0,i.c)(function*(){if(E.persistence===m)return;const L=yield E.getCurrentUser();return yield E.removeCurrentUser(),E.persistence=m,L?E.setCurrentUser(L):void 0})()}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(m,E,L="authUser"){return(0,i.c)(function*(){if(!E.length)return new ur(Bn(tr),m,L);const at=(yield Promise.all(E.map(function(){var Yi=(0,i.c)(function*(Ji){if(yield Ji._isAvailable())return Ji});return function(Ji){return Yi.apply(this,arguments)}}()))).filter(Yi=>Yi);let Yt=at[0]||Bn(tr);const Zn=Ir(L,m.config.apiKey,m.name);let xr=null;for(const Yi of E)try{const Ji=yield Yi._get(Zn);if(Ji){const Xi=dn._fromJSON(m,Ji);Yi!==Yt&&(xr=Xi),Yt=Yi;break}}catch{}const vi=at.filter(Yi=>Yi._shouldAllowMigration);return Yt._shouldAllowMigration&&vi.length?(Yt=vi[0],xr&&(yield Yt._set(Zn,xr.toJSON())),yield Promise.all(E.map(function(){var Yi=(0,i.c)(function*(Ji){if(Ji!==Yt)try{yield Ji._remove(Zn)}catch{}});return function(Ji){return Yi.apply(this,arguments)}}())),new ur(Yt,m,L)):new ur(Yt,m,L)})()}}function Er(M){const m=M.toLowerCase();if(m.includes("opera/")||m.includes("opr/")||m.includes("opios/"))return"Opera";if(nr(m))return"IEMobile";if(m.includes("msie")||m.includes("trident/"))return"IE";if(m.includes("edge/"))return"Edge";if(Ai(m))return"Firefox";if(m.includes("silk/"))return"Silk";if(Wn(m))return"Blackberry";if($n(m))return"Webos";if(Di(m))return"Safari";if((m.includes("chrome/")||Pi(m))&&!m.includes("edge/"))return"Chrome";if(Ht(m))return"Android";{const L=M.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(2===L?.length)return L[1]}return"Other"}function Ai(M=(0,b.Su)()){return/firefox\//i.test(M)}function Di(M=(0,b.Su)()){const m=M.toLowerCase();return m.includes("safari/")&&!m.includes("chrome/")&&!m.includes("crios/")&&!m.includes("android")}function Pi(M=(0,b.Su)()){return/crios\//i.test(M)}function nr(M=(0,b.Su)()){return/iemobile/i.test(M)}function Ht(M=(0,b.Su)()){return/android/i.test(M)}function Wn(M=(0,b.Su)()){return/blackberry/i.test(M)}function $n(M=(0,b.Su)()){return/webos/i.test(M)}function jn(M=(0,b.Su)()){return/iphone|ipad|ipod/i.test(M)||/macintosh/i.test(M)&&/mobile/i.test(M)}function Mi(M=(0,b.Su)()){return jn(M)||Ht(M)||$n(M)||Wn(M)||/windows phone/i.test(M)||nr(M)}function _n(M,m=[]){let E;switch(M){case"Browser":E=Er((0,b.Su)());break;case"Worker":E=`${Er((0,b.Su)())}-${M}`;break;default:E=M}const L=m.length?m.join(","):"FirebaseCore-web";return`${E}/JsCore/${_.SDK_VERSION}/${L}`}class Ln{constructor(m){this.auth=m,this.queue=[]}pushCallback(m,E){const L=Yt=>new Promise((Zn,xr)=>{try{Zn(m(Yt))}catch(vi){xr(vi)}});L.onAbort=E,this.queue.push(L);const at=this.queue.length-1;return()=>{this.queue[at]=()=>Promise.resolve()}}runMiddleware(m){var E=this;return(0,i.c)(function*(){if(E.auth.currentUser===m)return;const L=[];try{for(const at of E.queue)yield at(m),at.onAbort&&L.push(at.onAbort)}catch(at){L.reverse();for(const Yt of L)try{Yt()}catch{}throw E.auth._errorFactory.create("login-blocked",{originalMessage:at?.message})}})()}}function kr(){return(kr=(0,i.c)(function*(M,m={}){return De(M,"GET","/v2/passwordPolicy",Pe(M,m))})).apply(this,arguments)}class oi{constructor(m){var E,L,at,Yt;const Zn=m.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(E=Zn.minPasswordLength)&&void 0!==E?E:6,Zn.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=Zn.maxPasswordLength),void 0!==Zn.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=Zn.containsLowercaseCharacter),void 0!==Zn.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=Zn.containsUppercaseCharacter),void 0!==Zn.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=Zn.containsNumericCharacter),void 0!==Zn.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=Zn.containsNonAlphanumericCharacter),this.enforcementState=m.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(at=null===(L=m.allowedNonAlphanumericCharacters)||void 0===L?void 0:L.join(""))&&void 0!==at?at:"",this.forceUpgradeOnSignin=null!==(Yt=m.forceUpgradeOnSignin)&&void 0!==Yt&&Yt,this.schemaVersion=m.schemaVersion}validatePassword(m){var E,L,at,Yt,Zn,xr;const vi={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(m,vi),this.validatePasswordCharacterOptions(m,vi),vi.isValid&&
1(vi.isValid=null===(E=vi.meetsMinPasswordLength)||void 0===E||E),vi.isValid&&(vi.isValid=null===(L=vi.meetsMaxPasswordLength)||void 0===L||L),vi.isValid&&(vi.isValid=null===(at=vi.containsLowercaseLetter)||void 0===at||at),vi.isValid&&(vi.isValid=null===(Yt=vi.containsUppercaseLetter)||void 0===Yt||Yt),vi.isValid&&(vi.isValid=null===(Zn=vi.containsNumericCharacter)||void 0===Zn||Zn),vi.isValid&&(vi.isValid=null===(xr=vi.containsNonAlphanumericCharacter)||void 0===xr||xr),vi}validatePasswordLengthOptions(m,E){const L=this.customStrengthOptions.minPasswordLength,at=this.customStrengthOptions.maxPasswordLength;L&&(E.meetsMinPasswordLength=m.length>=L),at&&(E.meetsMaxPasswordLength=m.length<=at)}validatePasswordCharacterOptions(m,E){let L;this.updatePasswordCharacterOptionsStatuses(E,!1,!1,!1,!1);for(let at=0;at<m.length;at++)L=m.charAt(at),this.updatePasswordCharacterOptionsStatuses(E,L>="a"&&L<="z",L>="A"&&L<="Z",L>="0"&&L<="9",this.allowedNonAlphanumericCharacters.includes(L))}updatePasswordCharacterOptionsStatuses(m,E,L,at,Yt){this.customStrengthOptions.containsLowercaseLetter&&(m.containsLowercaseLetter||(m.containsLowercaseLetter=E)),this.customStrengthOptions.containsUppercaseLetter&&(m.containsUppercaseLetter||(m.containsUppercaseLetter=L)),this.customStrengthOptions.containsNumericCharacter&&(m.containsNumericCharacter||(m.containsNumericCharacter=at)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(m.containsNonAlphanumericCharacter||(m.containsNonAlphanumericCharacter=Yt))}}class Ii{constructor(m,E,L,at){this.app=m,this.heartbeatServiceProvider=E,this.appCheckServiceProvider=L,this.config=at,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new on(this),this.idTokenSubscription=new on(this),this.beforeStateQueue=new Ln(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=de,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=m.name,this.clientVersion=at.sdkClientVersion}_initializeWithPersistence(m,E){var L=this;return E&&(this._popupRedirectResolver=Bn(E)),this._initializationPromise=this.queue((0,i.c)(function*(){var at,Yt;if(!L._deleted&&(L.persistenceManager=yield ur.create(L,m),!L._deleted)){if(null!==(at=L._popupRedirectResolver)&&void 0!==at&&at._shouldInitProactively)try{yield L._popupRedirectResolver._initialize(L)}catch{}yield L.initializeCurrentUser(E),L.lastNotifiedUid=(null===(Yt=L.currentUser)||void 0===Yt?void 0:Yt.uid)||null,!L._deleted&&(L._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){var m=this;return(0,i.c)(function*(){if(m._deleted)return;const E=yield m.assertedPersistence.getCurrentUser();if(m.currentUser||E){if(m.currentUser&&E&&m.currentUser.uid===E.uid)return m._currentUser._assign(E),void(yield m.currentUser.getIdToken());yield m._updateCurrentUser(E,!0)}})()}initializeCurrentUser(m){var E=this;return(0,i.c)(function*(){var L;const at=yield E.assertedPersistence.getCurrentUser();let Yt=at,Zn=!1;if(m&&E.config.authDomain){yield E.getOrInitRedirectPersistenceManager();const xr=null===(L=E.redirectUser)||void 0===L?void 0:L._redirectEventId,vi=Yt?._redirectEventId,Yi=yield E.tryRedirectSignIn(m);(!xr||xr===vi)&&Yi?.user&&(Yt=Yi.user,Zn=!0)}if(!Yt)return E.directlySetCurrentUser(null);if(!Yt._redirectEventId){if(Zn)try{yield E.beforeStateQueue.runMiddleware(Yt)}catch(xr){Yt=at,E._popupRedirectResolver._overrideRedirectResult(E,()=>Promise.reject(xr))}return Yt?E.reloadAndSetCurrentUserOrClear(Yt):E.directlySetCurrentUser(null)}return j(E._popupRedirectResolver,E,"argument-error"),yield E.getOrInitRedirectPersistenceManager(),E.redirectUser&&E.redirectUser._redirectEventId===Yt._redirectEventId?E.directlySetCurrentUser(Yt):E.reloadAndSetCurrentUserOrClear(Yt)})()}tryRedirectSignIn(m){var E=this;return(0,i.c)(function*(){let L=null;try{L=yield E._popupRedirectResolver._completeRedirectFn(E,m,!0)}catch{yield E._setRedirectUser(null)}return L})()}reloadAndSetCurrentUserOrClear(m){var E=this;return(0,i.c)(function*(){try{yield Xt(m)}catch(L){if("auth/network-request-failed"!==L?.code)return E.directlySetCurrentUser(null)}return E.directlySetCurrentUser(m)})()}useDeviceLanguage(){this.languageCode=function it(){if(typeof navigator>"u")return null;const M=navigator;return M.languages&&M.languages[0]||M.language||null}()}_delete(){var m=this;return(0,i.c)(function*(){m._deleted=!0}
1)()}updateCurrentUser(m){var E=this;return(0,i.c)(function*(){const L=m?(0,b.Yj)(m):null;return L&&j(L.auth.config.apiKey===E.config.apiKey,E,"invalid-user-token"),E._updateCurrentUser(L&&L._clone(E))})()}_updateCurrentUser(m,E=!1){var L=this;return(0,i.c)(function*(){if(!L._deleted)return m&&j(L.tenantId===m.tenantId,L,"tenant-id-mismatch"),E||(yield L.beforeStateQueue.runMiddleware(m)),L.queue((0,i.c)(function*(){yield L.directlySetCurrentUser(m),L.notifyAuthListeners()}))})()}signOut(){var m=this;return(0,i.c)(function*(){return yield m.beforeStateQueue.runMiddleware(null),(m.redirectPersistenceManager||m._popupRedirectResolver)&&(yield m._setRedirectUser(null)),m._updateCurrentUser(null,!0)})()}setPersistence(m){var E=this;return this.queue((0,i.c)(function*(){yield E.assertedPersistence.setPersistence(Bn(m))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(m){var E=this;return(0,i.c)(function*(){E._getPasswordPolicyInternal()||(yield E._updatePasswordPolicy());const L=E._getPasswordPolicyInternal();return L.schemaVersion!==E.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(E._errorFactory.create("unsupported-password-policy-schema-version",{})):L.validatePassword(m)})()}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){var m=this;return(0,i.c)(function*(){const E=yield function Cn(M){return kr.apply(this,arguments)}(m),L=new oi(E);null===m.tenantId?m._projectPasswordPolicy=L:m._tenantPasswordPolicies[m.tenantId]=L})()}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(m){this._errorFactory=new b.UR("auth","Firebase",m())}onAuthStateChanged(m,E,L){return this.registerStateListener(this.authStateSubscription,m,E,L)}beforeAuthStateChanged(m,E){return this.beforeStateQueue.pushCallback(m,E)}onIdTokenChanged(m,E,L){return this.registerStateListener(this.idTokenSubscription,m,E,L)}authStateReady(){return new Promise((m,E)=>{if(this.currentUser)m();else{const L=this.onAuthStateChanged(()=>{L(),m()},E)}})}revokeAccessToken(m){var E=this;return(0,i.c)(function*(){if(E.currentUser){const L=yield E.currentUser.getIdToken(),at={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:m,idToken:L};null!=E.tenantId&&(at.tenantId=E.tenantId),yield function et(M,m){return Zt.apply(this,arguments)}(E,at)}})()}toJSON(){var m;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(m=this._currentUser)||void 0===m?void 0:m.toJSON()}}_setRedirectUser(m,E){var L=this;return(0,i.c)(function*(){const at=yield L.getOrInitRedirectPersistenceManager(E);return null===m?at.removeCurrentUser():at.setCurrentUser(m)})()}getOrInitRedirectPersistenceManager(m){var E=this;return(0,i.c)(function*(){if(!E.redirectPersistenceManager){const L=m&&Bn(m)||E._popupRedirectResolver;j(L,E,"argument-error"),E.redirectPersistenceManager=yield ur.create(E,[Bn(L._redirectPersistence)],"redirectUser"),E.redirectUser=yield E.redirectPersistenceManager.getCurrentUser()}return E.redirectPersistenceManager})()}_redirectUserForId(m){var E=this;return(0,i.c)(function*(){var L,at;return E._isInitialized&&(yield E.queue((0,i.c)(function*(){}))),(null===(L=E._currentUser)||void 0===L?void 0:L._redirectEventId)===m?E._currentUser:(null===(at=E.redirectUser)||void 0===at?void 0:at._redirectEventId)===m?E.redirectUser:null})()}_persistUserIfCurrent(m){var E=this;return(0,i.c)(function*(){if(m===E.currentUser)return E.queue((0,i.c)(function*(){return E.directlySetCurrentUser(m)}))})()}_notifyListenersIfCurrent(m){m===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 m,E;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const L=null!==(E=null===(m=this.currentUser)||void 0===m?void 0:m.uid)&&void 0!==E?E:null;this.lastNotifiedUid!==L&&(this.lastNotifiedUid=L,this.authStateSubscription.next(this.currentUser))}registerStateListener(m,E,L,at){if(this._deleted)return()=>{};const Yt="function"==typeof E?E:E.next.bind(E);let Zn=!1;const xr=this._isInitialized?Promise.resolve():this._initializationPromise;if(j(xr,this,"internal-error"),xr.then(()=>{Zn||Yt(this.currentUser)}),"function"==typeof E){const vi=m.addObserver(E,L,at);return()=>{Zn=!0,vi()}}{const vi=m.addObserver(E);return()=>{Zn=!0,vi()}}}directlySetCurrentUser(m){var E=this;return(0,i.c)(function*(){E.currentUser&&E.currentUser!==m&&E._currentUser._stopProactiveRefresh(),m&&E.isProactiveRefreshEnabled&&m._startProactiveRefresh(),E.currentUser=m,m?yield E.assertedPersistence.setCurrentUser(m):yield E.assertedPersistence.removeCurrentUser()})()}queue(m){return this.operations=this.operations.then(m,m),this.operations}get assertedPersistence(){return j(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(m){!m||this.frameworks.includes(m)||(this.frameworks.push(m),this.frameworks.sort(),this.clientVersion=_n(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){var m=this;return(0,i.c)(function*(){var E;const L={"X-Client-Version":m.clientVersion};m.app.options.appId&&(L["X-Firebase-gmpid"]=m.app.options.appId);const at=yield null===(E=m.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===E?void 0:E.getHeartbeatsHeader();at&&(L["X-Firebase-Client"]=at);const Yt=yield m._getAppCheckToken();return Yt&&(L["X-Firebase-AppCheck"]=Yt),L})()}_getAppCheckToken(){var m=this;return(0,i.c)(function*(){var E;const L=yield null===(E=m.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===E?void 0:E.getToken();return L?.error&&function Ye(M,...m){Se.logLevel<=C.Ge.WARN&&Se.warn(`Auth (${_.SDK_VERSION}): ${M}`,...m)}(`Error while retrieving App Check token: ${L.error}`),L?.token})()}}function yi(M){return(0,b.Yj)(M)}class on{constructor(m){this.auth=m,this.observer=null,this.addObserver=(0,b.my)(E=>this.observer=E)}get next(){return j(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let le={loadJS:()=>(0,i.c)(function*(){throw new Error("Unable to load external scripts")})(),recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Re(M){return le.loadJS(M)}function Mn(M){return`__${M}${Math.floor(1e6*Math.random())}`}class jr{constructor(m){this.type="recaptcha-enterprise",this.auth=yi(m)}verify(m="verify",E=!1){var L=this;return(0,i.c)(function*(){function Yt(){return Yt=(0,i.c)(function*(xr){if(!E){if(null==xr.tenantId&&null!=xr._agentRecaptchaConfig)return xr._agentRecaptchaConfig.siteKey;if(null!=xr.tenantId&&void 0!==xr._tenantRecaptchaConfigs[xr.tenantId])return xr._tenantRecaptchaConfigs[xr.tenantId].siteKey}return new Promise(function(){var vi=(0,i.c)(function*(Yi,Ji){an(xr,{clientType:"CLIENT_TYPE_WEB",ver
1sion:"RECAPTCHA_ENTERPRISE"}).then(Xi=>{if(void 0!==Xi.recaptchaKey){const Xo=new lt(Xi);return null==xr.tenantId?xr._agentRecaptchaConfig=Xo:xr._tenantRecaptchaConfigs[xr.tenantId]=Xo,Yi(Xo.siteKey)}Ji(new Error("recaptcha Enterprise site key undefined"))}).catch(Xi=>{Ji(Xi)})});return function(Yi,Ji){return vi.apply(this,arguments)}}())}),Yt.apply(this,arguments)}function Zn(xr,vi,Yi){const Ji=window.grecaptcha;dt(Ji)?Ji.enterprise.ready(()=>{Ji.enterprise.execute(xr,{action:m}).then(Xi=>{vi(Xi)}).catch(()=>{vi("NO_RECAPTCHA")})}):Yi(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((xr,vi)=>{(function at(xr){return Yt.apply(this,arguments)})(L.auth).then(Yi=>{if(!E&&dt(window.grecaptcha))Zn(Yi,xr,vi);else{if(typeof window>"u")return void vi(new Error("RecaptchaVerifier is only supported in browser"));let Ji=function ln(){return le.recaptchaEnterpriseScript}();0!==Ji.length&&(Ji+=Yi),Re(Ji).then(()=>{Zn(Yi,xr,vi)}).catch(Xi=>{vi(Xi)})}}).catch(Yi=>{vi(Yi)})})})()}}function gn(M,m,E){return Xe.apply(this,arguments)}function Xe(){return(Xe=(0,i.c)(function*(M,m,E,L=!1){const at=new jr(M);let Yt;try{Yt=yield at.verify(E)}catch{Yt=yield at.verify(E,!0)}const Zn=Object.assign({},m);return Object.assign(Zn,L?{captchaResp:Yt}:{captchaResponse:Yt}),Object.assign(Zn,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(Zn,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),Zn})).apply(this,arguments)}function Tt(M,m,E,L){return An.apply(this,arguments)}function An(){return An=(0,i.c)(function*(M,m,E,L){var at;if(null!==(at=M._getRecaptchaConfig())&&void 0!==at&&at.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const Yt=yield gn(M,m,E,"getOobCode"===E);return L(M,Yt)}return L(M,m).catch(function(){var Yt=(0,i.c)(function*(Zn){if("auth/missing-recaptcha-token"===Zn.code){console.log(`${E} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const xr=yield gn(M,m,E,"getOobCode"===E);return L(M,xr)}return Promise.reject(Zn)});return function(Zn){return Yt.apply(this,arguments)}}())}),An.apply(this,arguments)}function qr(M){const m=M.indexOf(":");return m<0?"":M.substr(0,m+1)}function Hr(M){if(!M)return null;const m=Number(M);return isNaN(m)?null:m}class en{constructor(m,E){this.providerId=m,this.signInMethod=E}toJSON(){return ye("not implemented")}_getIdTokenResponse(m){return ye("not implemented")}_linkToIdToken(m,E){return ye("not implemented")}_getReauthenticationResolver(m){return ye("not implemented")}}function bt(M,m){return It.apply(this,arguments)}function It(){return(It=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:resetPassword",Pe(M,m))})).apply(this,arguments)}function hn(){return(hn=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:update",m)})).apply(this,arguments)}function T(M,m){return st.apply(this,arguments)}function st(){return(st=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:signUp",m)})).apply(this,arguments)}function wt(){return(wt=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:update",Pe(M,m))})).apply(this,arguments)}function Vt(M,m){return Sr.apply(this,arguments)}function Sr(){return(Sr=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithPassword",Pe(M,m))})).apply(this,arguments)}function St(M,m){return Rt.apply(this,arguments)}function Rt(){return(Rt=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:sendOobCode",Pe(M,m))})).apply(this,arguments)}function U(){return(U=(0,i.c)(function*(M,m){return St(M,m)})).apply(this,arguments)}function ie(M,m){return V.apply(this,arguments)}function V(){return(V=(0,i.c)(function*(M,m){return St(M,m)})).apply(this,arguments)}function ne(M,m){return je.apply(this,arguments)}function je(){return(je=(0,i.c)(function*(M,m){return St(M,m)})).apply(this,arguments)}function Wt(){return(Wt=(0,i.c)(function*(M,m){return St(M,m)})).apply(this,arguments)}function rr(){return(rr=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithEmailLink",Pe(M,m))})).apply(this,arguments)}function Xn(){return(Xn=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithEmailLink",Pe(M,m))})).apply(this,arguments)}class Rr extends en{constructor(m,E,L,at=null){super("password",L),this._email=m,this._password=E,this._tenantId=at}static _fromEmailAndPassword(m,E){return new Rr(m,E,"password")}static _fromEmailAndCode(m,E,L=null){return new Rr(m,E,"emailLink",L)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(m){const E="string"==typeof m?JSON.parse(m):m;if(E?.email&&E?.password){if("password"===E.signInMethod)return this._fromEmailAndPassword(E.email,E.password);if("emailLink"===E.signInMethod)return this._fromEmailAndCode(E.email,E.password,E.tenantId)}return null}_getIdTokenResponse(m){var E=this;return(0,i.c)(function*(){switch(E.signInMethod){case"password":return Tt(m,{returnSecureToken:!0,email:E._email,password:E._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",Vt);case"emailLink":return function In(M,m){return rr.apply(this,arguments)}(m,{email:E._email,oobCode:E._password});default:ae(m,"internal-error")}})()}_linkToIdToken(m,E){var L=this;return(0,i.c)(function*(){switch(L.signInMethod){case"password":return Tt(m,{idToken:E,returnSecureToken:!0,email:L._email,password:L._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",T);case"emailLink":return function fr(M,m){return Xn.apply(this,arguments)}(m,{idToken:E,email:L._email,oobCode:L._password});default:ae(m,"internal-error")}})()}_getReauthenticationResolver(m){return this._getIdTokenResponse(m)}}function xi(M,m){return Oi.apply(this,arguments)}function Oi(){return(Oi=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithIdp",Pe(M,m))})).apply(this,arguments)}class fs extends en{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(m){const E=new fs(m.providerId,m.signInMethod);return m.idToken||m.accessToken?(m.idToken&&(E.idToken=m.idToken),m.accessToken&&(E.accessToken=m.accessToken),m.nonce&&!m.pendingToken&&
1(E.nonce=m.nonce),m.pendingToken&&(E.pendingToken=m.pendingToken)):m.oauthToken&&m.oauthTokenSecret?(E.accessToken=m.oauthToken,E.secret=m.oauthTokenSecret):ae("argument-error"),E}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(m){const E="string"==typeof m?JSON.parse(m):m,{providerId:L,signInMethod:at}=E,Yt=(0,P.sX)(E,["providerId","signInMethod"]);if(!L||!at)return null;const Zn=new fs(L,at);return Zn.idToken=Yt.idToken||void 0,Zn.accessToken=Yt.accessToken||void 0,Zn.secret=Yt.secret,Zn.nonce=Yt.nonce,Zn.pendingToken=Yt.pendingToken||null,Zn}_getIdTokenResponse(m){return xi(m,this.buildRequest())}_linkToIdToken(m,E){const L=this.buildRequest();return L.idToken=E,xi(m,L)}_getReauthenticationResolver(m){const E=this.buildRequest();return E.autoCreate=!1,xi(m,E)}buildRequest(){const m={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)m.pendingToken=this.pendingToken;else{const E={};this.idToken&&(E.id_token=this.idToken),this.accessToken&&(E.access_token=this.accessToken),this.secret&&(E.oauth_token_secret=this.secret),E.providerId=this.providerId,this.nonce&&!this.pendingToken&&(E.nonce=this.nonce),m.postBody=(0,b.ik)(E)}return m}}function Ns(){return(Ns=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:sendVerificationCode",Pe(M,m))})).apply(this,arguments)}function Js(){return(Js=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithPhoneNumber",Pe(M,m))})).apply(this,arguments)}function $t(){return($t=(0,i.c)(function*(M,m){const E=yield He(M,"POST","/v1/accounts:signInWithPhoneNumber",Pe(M,m));if(E.temporaryProof)throw cn(M,"account-exists-with-different-credential",E);return E})).apply(this,arguments)}const Je={USER_NOT_FOUND:"user-not-found"};function oe(){return(oe=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithPhoneNumber",Pe(M,Object.assign(Object.assign({},m),{operation:"REAUTH"})),Je)})).apply(this,arguments)}class qe extends en{constructor(m){super("phone","phone"),this.params=m}static _fromVerification(m,E){return new qe({verificationId:m,verificationCode:E})}static _fromTokenResponse(m,E){return new qe({phoneNumber:m,temporaryProof:E})}_getIdTokenResponse(m){return function Ci(M,m){return Js.apply(this,arguments)}(m,this._makeVerificationRequest())}_linkToIdToken(m,E){return function Nt(M,m){return $t.apply(this,arguments)}(m,Object.assign({idToken:E},this._makeVerificationRequest()))}_getReauthenticationResolver(m){return function be(M,m){return oe.apply(this,arguments)}(m,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:m,phoneNumber:E,verificationId:L,verificationCode:at}=this.params;return m&&E?{temporaryProof:m,phoneNumber:E}:{sessionInfo:L,code:at}}toJSON(){const m={providerId:this.providerId};return this.params.phoneNumber&&(m.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(m.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(m.verificationCode=this.params.verificationCode),this.params.verificationId&&(m.verificationId=this.params.verificationId),m}static fromJSON(m){"string"==typeof m&&(m=JSON.parse(m));const{verificationId:E,verificationCode:L,phoneNumber:at,temporaryProof:Yt}=m;return L||E||at||Yt?new qe({verificationId:E,verificationCode:L,phoneNumber:at,temporaryProof:Yt}):null}}class Ke{constructor(m){var E,L,at,Yt,Zn,xr;const vi=(0,b.aw)((0,b.kF)(m)),Yi=null!==(E=vi.apiKey)&&void 0!==E?E:null,Ji=null!==(L=vi.oobCode)&&void 0!==L?L:null,Xi=function Me(M){switch(M){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!==(at=vi.mode)&&void 0!==at?at:null);j(Yi&&Ji&&Xi,"argument-error"),this.apiKey=Yi,this.operation=Xi,this.code=Ji,this.continueUrl=null!==(Yt=vi.continueUrl)&&void 0!==Yt?Yt:null,this.languageCode=null!==(Zn=vi.languageCode)&&void 0!==Zn?Zn:null,this.tenantId=null!==(xr=vi.tenantId)&&void 0!==xr?xr:null}static parseLink(m){const E=function Ce(M){const m=(0,b.aw)((0,b.kF)(M)).link,E=m?(0,b.aw)((0,b.kF)(m)).deep_link_id:null,L=(0,b.aw)((0,b.kF)(M)).deep_link_id;return(L?(0,b.aw)((0,b.kF)(L)).link:null)||L||E||m||M}(m);try{return new Ke(E)}catch{return null}}}let Et=(()=>{class M{constructor(){this.providerId=M.PROVIDER_ID}static credential(E,L){return Rr._fromEmailAndPassword(E,L)}static credentialWithLink(E,L){const at=Ke.parseLink(L);return j(at,"argument-error"),Rr._fromEmailAndCode(E,at.code,at.tenantId)}}return M.PROVIDER_ID="password",M.EMAIL_PASSWORD_SIGN_IN_METHOD="password",M.EMAIL_LINK_SIGN_IN_METHOD="emailLink",M})();class Vn{constructor(m){this.providerId=m,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(m){this.defaultLanguageCode=m}setCustomParameters(m){return this.customParameters=m,this}getCustomParameters(){return this.customParameters}}class Gn extends Vn{constructor(){super(...arguments),this.scopes=[]}addScope(m){return this.scopes.includes(m)||this.scopes.push(m),this}getScopes(){return[...this.scopes]}}class Jn extends Gn{static credentialFromJSON(m){const E="string"==typeof m?JSON.parse(m):m;return j("providerId"in E&&"signInMethod"in E,"argument-error"),fs._fromParams(E)}credential(m){return this._credential(Object.assign(Object.assign({},m),{nonce:m.rawNonce}))}_credential(m){return j(m.idToken||m.accessToken,"argument-error"),fs._fromParams(Object.assign(Object.assign({}
1,m),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(m){return Jn.oauthCredentialFromTaggedObject(m)}static credentialFromError(m){return Jn.oauthCredentialFromTaggedObject(m.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:m}){if(!m)return null;const{oauthIdToken:E,oauthAccessToken:L,oauthTokenSecret:at,pendingToken:Yt,nonce:Zn,providerId:xr}=m;if(!L&&!at&&!E&&!Yt||!xr)return null;try{return new Jn(xr)._credential({idToken:E,accessToken:L,nonce:Zn,pendingToken:Yt})}catch{return null}}}let ar=(()=>{class M extends Gn{constructor(){super("facebook.com")}static credential(E){return fs._fromParams({providerId:M.PROVIDER_ID,signInMethod:M.FACEBOOK_SIGN_IN_METHOD,accessToken:E})}static credentialFromResult(E){return M.credentialFromTaggedObject(E)}static credentialFromError(E){return M.credentialFromTaggedObject(E.customData||{})}static credentialFromTaggedObject({_tokenResponse:E}){if(!E||!("oauthAccessToken"in E)||!E.oauthAccessToken)return null;try{return M.credential(E.oauthAccessToken)}catch{return null}}}return M.FACEBOOK_SIGN_IN_METHOD="facebook.com",M.PROVIDER_ID="facebook.com",M})(),Gi=(()=>{class M extends Gn{constructor(){super("google.com"),this.addScope("profile")}static credential(E,L){return fs._fromParams({providerId:M.PROVIDER_ID,signInMethod:M.GOOGLE_SIGN_IN_METHOD,idToken:E,accessToken:L})}static credentialFromResult(E){return M.credentialFromTaggedObject(E)}static credentialFromError(E){return M.credentialFromTaggedObject(E.customData||{})}static credentialFromTaggedObject({_tokenResponse:E}){if(!E)return null;const{oauthIdToken:L,oauthAccessToken:at}=E;if(!L&&!at)return null;try{return M.credential(L,at)}catch{return null}}}return M.GOOGLE_SIGN_IN_METHOD="google.com",M.PROVIDER_ID="google.com",M})(),zi=(()=>{class M extends Gn{constructor(){super("github.com")}static credential(E){return fs._fromParams({providerId:M.PROVIDER_ID,signInMethod:M.GITHUB_SIGN_IN_METHOD,accessToken:E})}static credentialFromResult(E){return M.credentialFromTaggedObject(E)}static credentialFromError(E){return M.credentialFromTaggedObject(E.customData||{})}static credentialFromTaggedObject({_tokenResponse:E}){if(!E||!("oauthAccessToken"in E)||!E.oauthAccessToken)return null;try{return M.credential(E.oauthAccessToken)}catch{return null}}}return M.GITHUB_SIGN_IN_METHOD="github.com",M.PROVIDER_ID="github.com",M})();class es extends en{constructor(m,E){super(m,m),this.pendingToken=E}_getIdTokenResponse(m){return xi(m,this.buildRequest())}_linkToIdToken(m,E){const L=this.buildRequest();return L.idToken=E,xi(m,L)}_getReauthenticationResolver(m){const E=this.buildRequest();return E.autoCreate=!1,xi(m,E)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(m){const E="string"==typeof m?JSON.parse(m):m,{providerId:L,signInMethod:at,pendingToken:Yt}=E;return L&&at&&Yt&&L===at?new es(L,Yt):null}static _create(m,E){return new es(m,E)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class hs extends Vn{constructor(m){j(m.startsWith("saml."),"argument-error"),super(m)}static credentialFromResult(m){return hs.samlCredentialFromTaggedObject(m)}static credentialFromError(m){return hs.samlCredentialFromTaggedObject(m.customData||{})}static credentialFromJSON(m){const E=es.fromJSON(m);return j(E,"argument-error"),E}static samlCredentialFromTaggedObject({_tokenResponse:m}){if(!m)return null;const{pendingToken:E,providerId:L}=m;if(!E||!L)return null;try{return es._create(L,E)}catch{return null}}}let Ue=(()=>{class M extends Gn{constructor(){super("twitter.com")}static credential(E,L){return fs._fromParams({providerId:M.PROVIDER_ID,signInMethod:M.TWITTER_SIGN_IN_METHOD,oauthToken:E,oauthTokenSecret:L})}static credentialFromResult(E){return M.credentialFromTaggedObject(E)}static credentialFromError(E){return M.credentialFromTaggedObject(E.customData||{})}static credentialFromTaggedObject({_tokenResponse:E}){if(!E)return null;const{oauthAccessToken:L,oauthTokenSecret:at}=E;if(!L||!at)return null;try{return M.credential(L,at)}catch{return null}}}return M.TWITTER_SIGN_IN_METHOD="twitter.com",M.PROVIDER_ID="twitter.com",M})();function yn(M,m){return Kt.apply(this,arguments)}function Kt(){return(Kt=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signUp",Pe(M,m))})).apply(this,arguments)}class Bt{constructor(m){this.user=m.user,this.providerId=m.providerId,this._tokenResponse=m._tokenResponse,this.operationType=m.operationType}static _fromIdTokenResponse(m,E,L,at=!1){return(0,i.c)(function*(){const Yt=yield dn._fromIdTokenResponse(m,L,at),Zn=Qn(L);return new Bt({user:Yt,providerId:Zn,_tokenResponse:L,operationType:E})})()}static _forOperation(m,E,L){return(0,i.c)(function*(){yield m._updateTokensIfNecessary(L,!0);const at=Qn(L);
1return new Bt({user:m,providerId:at,_tokenResponse:L,operationType:E})})()}}function Qn(M){return M.providerId?M.providerId:"phoneNumber"in M?"phone":null}function Or(){return(Or=(0,i.c)(function*(M){var m;const E=yi(M);if(yield E._initializationPromise,null!==(m=E.currentUser)&&void 0!==m&&m.isAnonymous)return new Bt({user:E.currentUser,providerId:null,operationType:"signIn"});const L=yield yn(E,{returnSecureToken:!0}),at=yield Bt._fromIdTokenResponse(E,"signIn",L,!0);return yield E._updateCurrentUser(at.user),at})).apply(this,arguments)}class ii extends b.kx{constructor(m,E,L,at){var Yt;super(E.code,E.message),this.operationType=L,this.user=at,Object.setPrototypeOf(this,ii.prototype),this.customData={appName:m.name,tenantId:null!==(Yt=m.tenantId)&&void 0!==Yt?Yt:void 0,_serverResponse:E.customData._serverResponse,operationType:L}}static _fromErrorAndOperation(m,E,L,at){return new ii(m,E,L,at)}}function fi(M,m,E,L){return("reauthenticate"===m?E._getReauthenticationResolver(M):E._getIdTokenResponse(M)).catch(Yt=>{throw"auth/multi-factor-auth-required"===Yt.code?ii._fromErrorAndOperation(M,Yt,m,L):Yt})}function Fi(M){return new Set(M.map(({providerId:m})=>m).filter(m=>!!m))}function ze(){return ze=(0,i.c)(function*(M,m){const E=(0,b.Yj)(M);yield Un(!0,E,m);const{providerUserInfo:L}=yield function Fn(M,m){return On.apply(this,arguments)}(E.auth,{idToken:yield E.getIdToken(),deleteProvider:[m]}),at=Fi(L||[]);return E.providerData=E.providerData.filter(Yt=>at.has(Yt.providerId)),at.has("phone")||(E.phoneNumber=null),yield E.auth._persistUserIfCurrent(E),E}),ze.apply(this,arguments)}function he(M,m){return Ft.apply(this,arguments)}function Ft(){return(Ft=(0,i.c)(function*(M,m,E=!1){const L=yield or(M,m._linkToIdToken(M.auth,yield M.getIdToken()),E);return Bt._forOperation(M,"link",L)})).apply(this,arguments)}function Un(M,m,E){return bi.apply(this,arguments)}function bi(){return(bi=(0,i.c)(function*(M,m,E){yield Xt(m);const at=!1===M?"provider-already-linked":"no-such-provider";j(Fi(m.providerData).has(E)===M,m.auth,at)})).apply(this,arguments)}function Ti(M,m){return us.apply(this,arguments)}function us(){return(us=(0,i.c)(function*(M,m,E=!1){const{auth:L}=M,at="reauthenticate";try{const Yt=yield or(M,fi(L,at,m,M),E);j(Yt.idToken,L,"internal-error");const Zn=Jr(Yt.idToken);j(Zn,L,"internal-error");const{sub:xr}=Zn;return j(M.uid===xr,L,"user-mismatch"),Bt._forOperation(M,at,Yt)}catch(Yt){throw"auth/user-not-found"===Yt?.code&&ae(L,"user-mismatch"),Yt}})).apply(this,arguments)}function Ms(M,m){return ks.apply(this,arguments)}function ks(){return(ks=(0,i.c)(function*(M,m,E=!1){const L="signIn",at=yield fi(M,L,m),Yt=yield Bt._fromIdTokenResponse(M,L,at);return E||(yield M._updateCurrentUser(Yt.user)),Yt})).apply(this,arguments)}function Us(M,m){return as.apply(this,arguments)}function as(){return(as=(0,i.c)(function*(M,m){return Ms(yi(M),m)})).apply(this,arguments)}function vo(M,m){return No.apply(this,arguments)}function No(){return(No=(0,i.c)(function*(M,m){const E=(0,b.Yj)(M);return yield Un(!1,E,m.providerId),he(E,m)})).apply(this,arguments)}function ss(M,m){return ra.apply(this,arguments)}function ra(){return(ra=(0,i.c)(function*(M,m){return Ti((0,b.Yj)(M),m)})).apply(this,arguments)}function fo(){return(fo=(0,i.c)(function*(M,m){return He(M,"POST","/v1/accounts:signInWithCustomToken",Pe(M,m))})).apply(this,arguments)}function da(){return da=(0,i.c)(function*(M,m){const E=yi(M),L=yield function qo(M,m){return fo.apply(this,arguments)}(E,{token:m,returnSecureToken:!0}),at=yield Bt._fromIdTokenResponse(E,"signIn",L);return yield E._updateCurrentUser(at.user),at}),da.apply(this,arguments)}class bo{constructor(m,E){this.factorId=m,this.uid=E.mfaEnrollmentId,this.enrollmentTime=new Date(E.enrolledAt).toUTCString(),this.displayName=E.displayName}static _fromServerResponse(m,E){return"phoneInfo"in E?nl._fromServerResponse(m,E):"totpInfo"in E?Co._fromServerResponse(m,E):ae(m,"internal-error")}}class nl extends bo{constructor(m){super("phone",m),this.phoneNumber=m.phoneInfo}static _fromServerResponse(m,E){return new nl(E)}}class Co extends bo{constructor(m){super("totp",m)}static _fromServerResponse(m,E){return new Co(E)}}function Sa(M,m,E){var L;j((null===(L=E.url)||void 0===L?void 0:L.length)>0,M,"invalid-continue-uri"),j(typeof E.dynamicLinkDomain>"u"||E.dynamicLinkDomain.length>0,M,"invalid-dynamic-link-domain"),m.continueUrl=E.url,m.dynamicLinkDomain=E.dynamicLinkDomain,m.canHandleCodeInApp=E.handleCodeInApp,E.iOS&&(j(E.iOS.bundleId.length>
10,M,"missing-ios-bundle-id"),m.iOSBundleId=E.iOS.bundleId),E.android&&(j(E.android.packageName.length>0,M,"missing-android-pkg-name"),m.androidInstallApp=E.android.installApp,m.androidMinimumVersionCode=E.android.minimumVersion,m.androidPackageName=E.android.packageName)}function Ll(M){return Go.apply(this,arguments)}function Go(){return(Go=(0,i.c)(function*(M){const m=yi(M);m._getPasswordPolicyInternal()&&(yield m._updatePasswordPolicy())})).apply(this,arguments)}function Vs(){return(Vs=(0,i.c)(function*(M,m,E){const L=yi(M),at={requestType:"PASSWORD_RESET",email:m,clientType:"CLIENT_TYPE_WEB"};E&&Sa(L,at,E),yield Tt(L,at,"getOobCode",ie)})).apply(this,arguments)}function Ua(){return Ua=(0,i.c)(function*(M,m,E){yield bt((0,b.Yj)(M),{oobCode:m,newPassword:E}).catch(function(){var L=(0,i.c)(function*(at){throw"auth/password-does-not-meet-requirements"===at.code&&Ll(M),at});return function(at){return L.apply(this,arguments)}}())}),Ua.apply(this,arguments)}function Qo(){return Qo=(0,i.c)(function*(M,m){yield function Z(M,m){return wt.apply(this,arguments)}((0,b.Yj)(M),{oobCode:m})}),Qo.apply(this,arguments)}function os(M,m){return Va.apply(this,arguments)}function Va(){return(Va=(0,i.c)(function*(M,m){const E=(0,b.Yj)(M),L=yield bt(E,{oobCode:m}),at=L.requestType;switch(j(at,E,"internal-error"),at){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":j(L.newEmail,E,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":j(L.mfaInfo,E,"internal-error");default:j(L.email,E,"internal-error")}let Yt=null;return L.mfaInfo&&(Yt=bo._fromServerResponse(yi(E),L.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===L.requestType?L.newEmail:L.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===L.requestType?L.email:L.newEmail)||null,multiFactorInfo:Yt},operation:at}})).apply(this,arguments)}function Fl(){return(Fl=(0,i.c)(function*(M,m){const{data:E}=yield os((0,b.Yj)(M),m);return E.email})).apply(this,arguments)}function Jo(){return(Jo=(0,i.c)(function*(M,m,E){const L=yi(M),Zn=yield Tt(L,{returnSecureToken:!0,email:m,password:E,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",yn).catch(vi=>{throw"auth/password-does-not-meet-requirements"===vi.code&&Ll(M),vi}),xr=yield Bt._fromIdTokenResponse(L,"signIn",Zn);return yield L._updateCurrentUser(xr.user),xr})).apply(this,arguments)}function Ha(){return(Ha=(0,i.c)(function*(M,m,E){const L=yi(M),at={requestType:"EMAIL_SIGNIN",email:m,clientType:"CLIENT_TYPE_WEB"};(function Yt(Zn,xr){j(xr.handleCodeInApp,L,"argument-error"),xr&&Sa(L,Zn,xr)})(at,E),yield Tt(L,at,"getOobCode",ne)})).apply(this,arguments)}function il(){return(il=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M),at=Et.credentialWithLink(m,E||W());return j(at._tenantId===(L.tenantId||null),L,"tenant-id-mismatch"),Us(L,at)})).apply(this,arguments)}function li(){return(li=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:createAuthUri",Pe(M,m))})).apply(this,arguments)}function ol(){return ol=(0,i.c)(function*(M,m){const L={identifier:m,continueUri:We()?W():"http://localhost"},{signinMethods:at}=yield function sl(M,m){return li.apply(this,arguments)}((0,b.Yj)(M),L);return at||[]}),ol.apply(this,arguments)}function Ws(){return Ws=(0,i.c)(function*(M,m){const E=(0,b.Yj)(M),at={requestType:"VERIFY_EMAIL",idToken:yield M.getIdToken()};m&&Sa(E.auth,at,m);const{email:Yt}=yield function Ee(M,m){return U.apply(this,arguments)}(E.auth,at);Yt!==M.email&&(yield M.reload())}),Ws.apply(this,arguments)}function $a(){return $a=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M),Yt={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield M.getIdToken(),newEmail:m};E&&Sa(L.auth,Yt,E);const{email:Zn}=yield function $e(M,m){return Wt.apply(this,arguments)}(L.auth,Yt);Zn!==M.email&&(yield M.reload())}),$a.apply(this,arguments)}function Ca(){return(Ca=(0,i.c)(function*(M,m){return De(M,"POST","/v1/accounts:update",m)})).apply(this,arguments)}
1function Ma(){return Ma=(0,i.c)(function*(M,{displayName:m,photoURL:E}){if(void 0===m&&void 0===E)return;const L=(0,b.Yj)(M),Yt={idToken:yield L.getIdToken(),displayName:m,photoUrl:E,returnSecureToken:!0},Zn=yield or(L,function ea(M,m){return Ca.apply(this,arguments)}(L.auth,Yt));L.displayName=Zn.displayName||null,L.photoURL=Zn.photoUrl||null;const xr=L.providerData.find(({providerId:vi})=>"password"===vi);xr&&(xr.displayName=L.displayName,xr.photoURL=L.photoURL),yield L._updateTokensIfNecessary(Zn)}),Ma.apply(this,arguments)}function lo(M,m,E){return po.apply(this,arguments)}function po(){return po=(0,i.c)(function*(M,m,E){const{auth:L}=M,Yt={idToken:yield M.getIdToken(),returnSecureToken:!0};m&&(Yt.email=m),E&&(Yt.password=E);const Zn=yield or(M,function _t(M,m){return hn.apply(this,arguments)}(L,Yt));yield M._updateTokensIfNecessary(Zn,!0)}),po.apply(this,arguments)}class X{constructor(m,E,L={}){this.isNewUser=m,this.providerId=E,this.profile=L}}class ot extends X{constructor(m,E,L,at){super(m,E,L),this.username=at}}class Ae extends X{constructor(m,E){super(m,"facebook.com",E)}}class yt extends ot{constructor(m,E){super(m,"github.com",E,"string"==typeof E?.login?E?.login:null)}}class xn extends X{constructor(m,E){super(m,"google.com",E)}}class qn extends ot{constructor(m,E,L){super(m,"twitter.com",E,L)}}function Pr(M){const{user:m,_tokenResponse:E}=M;return m.isAnonymous&&!E?{providerId:null,isNewUser:!1,profile:null}:function Vo(M){var m,E;if(!M)return null;const{providerId:L}=M,at=M.rawUserInfo?JSON.parse(M.rawUserInfo):{},Yt=M.isNewUser||"identitytoolkit#SignupNewUserResponse"===M.kind;if(!L&&M?.idToken){const Zn=null===(E=null===(m=Jr(M.idToken))||void 0===m?void 0:m.firebase)||void 0===E?void 0:E.sign_in_provider;if(Zn)return new X(Yt,"anonymous"!==Zn&&"custom"!==Zn?Zn:null)}if(!L)return null;switch(L){case"facebook.com":return new Ae(Yt,at);case"github.com":return new yt(Yt,at);case"google.com":return new xn(Yt,at);case"twitter.com":return new qn(Yt,at,M.screenName||null);case"custom":case"anonymous":return new X(Yt,null);default:return new X(Yt,L,at)}}(E)}class Eo{constructor(m,E,L){this.type=m,this.credential=E,this.user=L}static _fromIdtoken(m,E){return new Eo("enroll",m,E)}static _fromMfaPendingCredential(m){return new Eo("signin",m)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(m){var E,L;if(m?.multiFactorSession){if(null!==(E=m.multiFactorSession)&&void 0!==E&&E.pendingCredential)return Eo._fromMfaPendingCredential(m.multiFactorSession.pendingCredential);if(null!==(L=m.multiFactorSession)&&void 0!==L&&L.idToken)return Eo._fromIdtoken(m.multiFactorSession.idToken)}return null}}class Is{constructor(m,E,L){this.session=m,this.hints=E,this.signInResolver=L}static _fromError(m,E){const L=yi(m),at=E.customData._serverResponse,Yt=(at.mfaInfo||[]).map(xr=>bo._fromServerResponse(L,xr));j(at.mfaPendingCredential,L,"internal-error");const Zn=Eo._fromMfaPendingCredential(at.mfaPendingCredential);return new Is(Zn,Yt,function(){var xr=(0,i.c)(function*(vi){const Yi=yield vi._process(L,Zn);delete at.mfaInfo,delete at.mfaPendingCredential;const Ji=Object.assign(Object.assign({},at),{idToken:Yi.idToken,refreshToken:Yi.refreshToken});switch(E.operationType){case"signIn":const Xi=yield Bt._fromIdTokenResponse(L,E.operationType,Ji);return yield L._updateCurrentUser(Xi.user),Xi;case"reauthenticate":return j(E.user,L,"internal-error"),Bt._forOperation(E.user,E.operationType,Ji);default:ae(L,"internal-error")}});return function(vi){return xr.apply(this,arguments)}}())}resolveSignIn(m){var E=this;return(0,i.c)(function*(){return E.signInResolver(m)})()}}class ja{constructor(m){this.user=m,this.enrolledFactors=[],m._onReload(E=>{E.mfaInfo&&(this.enrolledFactors=E.mfaInfo.map(L=>bo._fromServerResponse(m.auth,L)))})}static _fromUser(m){return new ja(m)}getSession(){var m=this;return(0,i.c)(function*(){return Eo._fromIdtoken(yield m.user.getIdToken(),m.user)})()}enroll(m,E){var L=this;return(0,i.c)(function*(){const at=m,Yt=yield L.getSession(),Zn=yield or(L.user,at._process(L.user.auth,Yt,E));return yield L.user._updateTokensIfNecessary(Zn),L.user.reload()})()}unenroll(m){var E=this;return(0,i.c)(function*(){const L="string"==typeof m?m:m.uid,at=yield E.user.getIdToken();try{const Yt=yield or(E.user,function ts(M,m){return De(M,"POST","/v2/accounts/mfaEnrollment:withdraw",Pe(M,m))}(E.user.auth,{idToken:at,mfaEnrollmentId:L}));E.enrolledFactors=E.enrolledFactors.filter(({uid:Zn})=>Zn!==L),yield E.user._updateTokensIfNecessary(Yt),yield E.user.reload()}catch(Yt){throw Yt}})()}}const Es=new WeakMap,zs="__sak";class Vi{constructor(m,E){this.storageRetriever=m,this.type=E}_isAvailable(){try{return this.storage?(this.storage.setItem(zs,"1"),this.storage.removeItem(zs),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(m,E){return this.storage.setItem(m,JSON.stringify(E)),Promise.resolve()}_get(m){const E=this.storage.getItem(m);return Promise.resolve(E?JSON.parse(E):null)}_remove(m){return this.storage.removeItem(m),Promise.resolve()}get storage(){return this.storageRetriever()}}const fa=(()=>{class M extends Vi{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(E,L)=>this.onStorageEvent(E,L),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function Cl(){const M=(0,b.Su)();return Di(M)||jn(M)}()&&function Qt(){try{return!(!window||window===window.top)}catch{return!1}}(),this.fallbackToPolling=Mi(),this._shouldAllowMigration=!0}forAllChangedKeys(E){for(const L of Object.keys(this.listeners)){const at=this.storage.getItem(L),Yt=this.localCache[L];at!==Yt&&E(L,Yt,at)}}onStorageEvent(E,L=!1){if(!E.key)return void this.forAllChangedKeys((xr,vi,Yi)=>{this.notifyListeners(xr,Yi)});const at=E.key;if(L?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const xr=this.storage.getItem(at);if(E.newValue!==xr)null!==E.newValue?this.storage.setItem(at,E.newValue):this.storage.removeItem(at);else if(this.localCache[at]===E.newValue&&!L)return}const Yt=()=>{const xr=this.storage.getItem(at);!L&&this.localCache[at]===xr||this.notifyListeners(at,xr)},Zn=this.storage.getItem(at);!function di(){return(0,b.Uv)()&&10===document.documentMode}()||Zn===E.newValue||E.newValue===E.oldValue?Yt():setTimeout(Yt,10)}notifyListeners(E,L){this.localCache[E]=L;const at=this.listeners[E];if(at)for(const Yt of Array.from(at))Yt(L&&JSON.parse(L))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((E,L,at)=>{this.onStorageEvent(new StorageEvent("storage",{key:E,oldValue:L,newValue:at}),!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,L){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(L)}_removeListener(E,L){this.listeners[E]&&(this.listeners[E].delete(L),0===this.listeners[E].size&&delete this.listeners[E]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}_set(E,L){var at=()=>super._set,Yt=this;return(0,i.c)(function*(){yield at().call(Yt,E,L),Yt.localCache[E]=JSON.stringify(L)})()}_get(E){var L=()=>super._get,at=this;return(0,i.c)(function*(){const Yt=yield L().call(at,E);return at.localCache[E]=JSON.stringify(Yt),Yt})()}_remove(E){var L=()=>super._remove,at=this;return(0,i.c)(function*(){yield L().call(at,E),delete at.localCache[E]})()}}return M.type="LOCAL",M})(),Bo=(()=>{class M extends Vi{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(E,L){}_removeListener(E,L){}}return M.type="SESSION",M})();let Jl=(()=>{class M{constructor(E){this.eventTarget=E,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(E){const L=this.receivers.find(Yt=>Yt.isListeningto(E));if(L)return L;const at=new M(E);return this.receivers.push(at),at}isListeningto(E){return this.eventTarget===E}handleEvent(E){var L=this;return(0,i.c)(function*(){const at=E,{eventId:Yt,eventType:Zn,data:xr}=at.data,vi=L.handlersMap[Zn];if(!vi?.size)return;at.ports[0].postMessage({status:"ack",eventId:Yt,eventType:Zn});const Yi=Array.from(vi).map(function(){var Xi=(0,i.c)(function*(Xo){return Xo(at.origin,xr)});return function(Xo){return Xi.apply(this,arguments)}}()),Ji=yield function $l(M){return Promise.all(M.map(function(){var m=(0,i.c)(function*(E){try{return{fulfilled:!0,value:yield E}}catch(L){return{fulfilled:!1,reason:L}}});return function(E){return m.apply(this,arguments)}}()))}(Yi);at.ports[0].postMessage({status:"done",eventId:Yt,eventType:Zn,response:Ji})})()}_subscribe(E,L){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[E]||(this.handlersMap[E]=new Set),this.handlersMap[E].add(L)}_unsubscribe(E,L){this.handlersMap[E]&&L&&this.handlersMap[E].delete(L),(!L||0===this.handlersMap[E].size)&&delete this.handlersMap[E],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}return M.receivers=[],M})();function Wo(M="",m=10){let E="";for(let L=0;L<m;L++)E+=Math.floor(10*Math.random());return M+E}class lc{constructor(m){this.target=m,this.handlers=new Set}removeMessageHandler(m){m.messageChannel&&(m.messageChannel.port1.removeEventListener("message",m.onMessage),m.messageChannel.port1.close()),this.handlers.delete(m)}_send(m,E,L=50){var at=this;return(0,i.c)(function*(){const Yt=typeof MessageChannel<"u"?new MessageChannel:null;if(!Yt)throw new Error("connection_unavailable");let Zn,xr;return new Promise((vi,Yi)=>{const Ji=Wo("",20);Yt.port1.start();const Xi=setTimeout(()=>{Yi(new Error("unsupported_event"))},L);xr={messageChannel:Yt,onMessage(Xo){const xl=Xo;if(xl.data.eventId===Ji)switch(xl.data.status){case"ack":clearTimeout(Xi),Zn=setTimeout(()=>{Yi(new Error("timeout"))},3e3);break;case"done":clearTimeout(Zn),vi(xl.data.response);break;default:clearTimeout(Xi),clearTimeout(Zn),Yi(new Error("invalid_response"))}}},at.handlers.add(xr),Yt.port1.addEventListener("message",xr.onMessage),at.target.postMessage({eventType:m,eventId:Ji,data:E},[Yt.port2])}).finally(()=>{xr&&at.removeMessageHandler(xr)})})()}}function Ks(){return window}
1function oa(){return typeof Ks().WorkerGlobalScope<"u"&&"function"==typeof Ks().importScripts}function Lr(){return(Lr=(0,i.c)(function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})).apply(this,arguments)}const _l="firebaseLocalStorageDb",Ea="firebaseLocalStorage",hu="fbase_key";class pa{constructor(m){this.request=m}toPromise(){return new Promise((m,E)=>{this.request.addEventListener("success",()=>{m(this.request.result)}),this.request.addEventListener("error",()=>{E(this.request.error)})})}}function al(M,m){return M.transaction([Ea],m?"readwrite":"readonly").objectStore(Ea)}function pu(){const M=indexedDB.open(_l,1);return new Promise((m,E)=>{M.addEventListener("error",()=>{E(M.error)}),M.addEventListener("upgradeneeded",()=>{const L=M.result;try{L.createObjectStore(Ea,{keyPath:hu})}catch(at){E(at)}}),M.addEventListener("success",(0,i.c)(function*(){const L=M.result;L.objectStoreNames.contains(Ea)?m(L):(L.close(),yield function Al(){const M=indexedDB.deleteDatabase(_l);return new pa(M).toPromise()}(),m(yield pu()))}))})}function ll(M,m,E){return Ds.apply(this,arguments)}function Ds(){return(Ds=(0,i.c)(function*(M,m,E){const L=al(M,!0).put({[hu]:m,value:E});return new pa(L).toPromise()})).apply(this,arguments)}function Ka(){return(Ka=(0,i.c)(function*(M,m){const E=al(M,!1).get(m),L=yield new pa(E).toPromise();return void 0===L?null:L.value})).apply(this,arguments)}function Dl(M,m){const E=al(M,!0).delete(m);return new pa(E).toPromise()}const $=(()=>{class M{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(()=>{},()=>{})}_openDb(){var E=this;return(0,i.c)(function*(){return E.db||(E.db=yield pu()),E.db})()}_withRetries(E){var L=this;return(0,i.c)(function*(){let at=0;for(;;)try{const Yt=yield L._openDb();return yield E(Yt)}catch(Yt){if(at++>3)throw Yt;L.db&&(L.db.close(),L.db=void 0)}})()}initializeServiceWorkerMessaging(){var E=this;return(0,i.c)(function*(){return oa()?E.initializeReceiver():E.initializeSender()})()}initializeReceiver(){var E=this;return(0,i.c)(function*(){E.receiver=Jl._getInstance(function ha(){return oa()?self:null}()),E.receiver._subscribe("keyChanged",function(){var L=(0,i.c)(function*(at,Yt){return{keyProcessed:(yield E._poll()).includes(Yt.key)}});return function(at,Yt){return L.apply(this,arguments)}}()),E.receiver._subscribe("ping",function(){var L=(0,i.c)(function*(at,Yt){return["keyChanged"]});return function(at,Yt){return L.apply(this,arguments)}}())})()}initializeSender(){var E=this;return(0,i.c)(function*(){var L,at;if(E.activeServiceWorker=yield function Vu(){return Lr.apply(this,arguments)}(),!E.activeServiceWorker)return;E.sender=new lc(E.activeServiceWorker);const Yt=yield E.sender._send("ping",{},800);Yt&&null!==(L=Yt[0])&&void 0!==L&&L.fulfilled&&null!==(at=Yt[0])&&void 0!==at&&at.value.includes("keyChanged")&&(E.serviceWorkerReceiverAvailable=!0)})()}notifyServiceWorker(E){var L=this;return(0,i.c)(function*(){if(L.sender&&L.activeServiceWorker&&function jl(){var M;return(null===(M=navigator?.serviceWorker)||void 0===M?void 0:M.controller)||null}()===L.activeServiceWorker)try{yield L.sender._send("keyChanged",{key:E},L.serviceWorkerReceiverAvailable?800:50)}catch{}})()}_isAvailable(){return(0,i.c)(function*(){try{if(!indexedDB)return!1;const E=yield pu();return yield ll(E,zs,"1"),yield Dl(E,zs),!0}catch{}return!1})()}_withPendingWrite(E){var L=this;return(0,i.c)(function*(){L.pendingWrites++;try{yield E()}finally{L.pendingWrites--}})()}_set(E,L){var at=this;return(0,i.c)(function*(){return at._withPendingWrite((0,i.c)(function*(){return yield at._withRetries(Yt=>ll(Yt,E,L)),at.localCache[E]=L,at.notifyServiceWorker(E)}))})()}_get(E){var L=this;return(0,i.c)(function*(){const at=yield L._withRetries(Yt=>function gu(M,m){return Ka.apply(this,arguments)}(Yt,E));return L.localCache[E]=at,at})()}_remove(E){var L=this;return(0,i.c)(function*(){return L._withPendingWrite((0,i.c)(function*(){return yield L._withRetries(at=>Dl(at,E)),delete L.localCache[E],L.notifyServiceWorker(E)}))})()}_poll(){var E=this;return(0,i.c)(function*(){const L=yield E._withRetries(Zn=>{const xr=al(Zn,!1).getAll();
1return new pa(xr).toPromise()});if(!L)return[];if(0!==E.pendingWrites)return[];const at=[],Yt=new Set;if(0!==L.length)for(const{fbase_key:Zn,value:xr}of L)Yt.add(Zn),JSON.stringify(E.localCache[Zn])!==JSON.stringify(xr)&&(E.notifyListeners(Zn,xr),at.push(Zn));for(const Zn of Object.keys(E.localCache))E.localCache[Zn]&&!Yt.has(Zn)&&(E.notifyListeners(Zn,null),at.push(Zn));return at})()}notifyListeners(E,L){this.localCache[E]=L;const at=this.listeners[E];if(at)for(const Yt of Array.from(at))Yt(L)}startPolling(){var E=this;this.stopPolling(),this.pollTimer=setInterval((0,i.c)(function*(){return E._poll()}),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(E,L){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[E]||(this.listeners[E]=new Set,this._get(E)),this.listeners[E].add(L)}_removeListener(E,L){this.listeners[E]&&(this.listeners[E].delete(L),0===this.listeners[E].size&&delete this.listeners[E]),0===Object.keys(this.listeners).length&&this.stopPolling()}}return M.type="LOCAL",M})(),Ur=1e12;class Hi{constructor(m){this.auth=m,this.counter=Ur,this._widgets=new Map}render(m,E){const L=this.counter;return this._widgets.set(L,new Ss(m,this.auth.name,E||{})),this.counter++,L}reset(m){var E;const L=m||Ur;null===(E=this._widgets.get(L))||void 0===E||E.delete(),this._widgets.delete(L)}getResponse(m){var E;return(null===(E=this._widgets.get(m||Ur))||void 0===E?void 0:E.getResponse())||""}execute(m){var E=this;return(0,i.c)(function*(){var L;return null===(L=E._widgets.get(m||Ur))||void 0===L||L.execute(),""})()}}class Ss{constructor(m,E,L){this.params=L,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const at="string"==typeof m?document.getElementById(m):m;j(at,"argument-error",{appName:E}),this.container=at,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=function Ps(M){const m=[],E="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let L=0;L<M;L++)m.push(E.charAt(Math.floor(62*Math.random())));return m.join("")}(50);const{callback:m,"expired-callback":E}=this.params;if(m)try{m(this.responseToken)}catch{}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,E)try{E()}catch{}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const So=Mn("rcb"),Wl=new ue(3e4,6e4);class zl{constructor(){var m;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!(null===(m=Ks().grecaptcha)||void 0===m||!m.render)}load(m,E=""){return j(function Hl(M){return M.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(M)}(E),m,"argument-error"),this.shouldResolveImmediately(E)&&mn(Ks().grecaptcha)?Promise.resolve(Ks().grecaptcha):new Promise((L,at)=>{const Yt=Ks().setTimeout(()=>{at(Ve(m,"network-request-failed"))},Wl.get());Ks()[So]=()=>{Ks().clearTimeout(Yt),delete Ks()[So];const xr=Ks().grecaptcha;if(!xr||!mn(xr))return void at(Ve(m,"internal-error"));const vi=xr.render;xr.render=(Yi,Ji)=>{const Xi=vi(Yi,Ji);return this.counter++,Xi},this.hostLanguage=E,L(xr)},Re(`${function Pt(){return le.recaptchaV2Script}()}?${(0,b.ik)({onload:So,render:"explicit",hl:E})}`).catch(()=>{clearTimeout(Yt),at(Ve(m,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(m){var E;return!(null===(E=Ks().grecaptcha)||void 0===E||!E.render)&&(m===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class mu{load(m){return(0,i.c)(function*(){return new Hi(m)})()}clearedOneInstance(){}}const Ya="recaptcha",vu={theme:"light",type:"image"};class ys{constructor(m,E,L=Object.assign({},vu)){this.parameters=L,this.type=Ya,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=yi(m),this.isInvisible="invisible"===this.parameters.size,j(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");const at="string"==typeof E?document.getElementById(E):E;j(at,this.auth,"argument-error"),this.container=at,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new mu:new zl,this.validateStartingState()}verify(){var m=this;return(0,i.c)(function*(){m.assertNotDestroyed();const E=yield m.render(),L=m.getAssertedRecaptcha();return L.getResponse(E)||new Promise(Yt=>{const Zn=xr=>{xr&&(m.tokenChangeListeners.delete(Zn),Yt(xr))};m.tokenChangeListeners.add(Zn),m.isInvisible&&L.execute(E)})})()}render(){try{this.assertNotDestroyed()}catch(m){return Promise.reject(m)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(m=>{throw this.renderPromise=null,m})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEac
1h(m=>{this.container.removeChild(m)})}validateStartingState(){j(!this.parameters.sitekey,this.auth,"argument-error"),j(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),j(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(m){return E=>{if(this.tokenChangeListeners.forEach(L=>L(E)),"function"==typeof m)m(E);else if("string"==typeof m){const L=Ks()[m];"function"==typeof L&&L(E)}}}assertNotDestroyed(){j(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){var m=this;return(0,i.c)(function*(){if(yield m.init(),!m.widgetId){let E=m.container;if(!m.isInvisible){const L=document.createElement("div");E.appendChild(L),E=L}m.widgetId=m.getAssertedRecaptcha().render(E,m.parameters)}return m.widgetId})()}init(){var m=this;return(0,i.c)(function*(){j(We()&&!oa(),m.auth,"internal-error"),yield function Bu(){let M=null;return new Promise(m=>{"complete"!==document.readyState?(M=()=>m(),window.addEventListener("load",M)):m()}).catch(m=>{throw M&&window.removeEventListener("load",M),m})}(),m.recaptcha=yield m._recaptchaLoader.load(m.auth,m.auth.languageCode||void 0);const E=yield function rt(M){return kt.apply(this,arguments)}(m.auth);j(E,m.auth,"internal-error"),m.parameters.sitekey=E})()}getAssertedRecaptcha(){return j(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}class Kl{constructor(m,E){this.verificationId=m,this.onConfirmation=E}confirm(m){const E=qe._fromVerification(this.verificationId,m);return this.onConfirmation(E)}}function Zl(){return(Zl=(0,i.c)(function*(M,m,E){const L=yi(M),at=yield ju(L,m,(0,b.Yj)(E));return new Kl(at,Yt=>Us(L,Yt))})).apply(this,arguments)}function cc(){return(cc=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M);yield Un(!1,L,"phone");const at=yield ju(L.auth,m,(0,b.Yj)(E));return new Kl(at,Yt=>vo(L,Yt))})).apply(this,arguments)}function zo(){return(zo=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M),at=yield ju(L.auth,m,(0,b.Yj)(E));return new Kl(at,Yt=>ss(L,Yt))})).apply(this,arguments)}function ju(M,m,E){return yl.apply(this,arguments)}function yl(){return yl=(0,i.c)(function*(M,m,E){var L;const at=yield E.verify();try{let Yt;if(j("string"==typeof at,M,"argument-error"),j(E.type===Ya,M,"argument-error"),Yt="string"==typeof m?{phoneNumber:m}:m,"session"in Yt){const Zn=Yt.session;if("phoneNumber"in Yt)return j("enroll"===Zn.type,M,"internal-error"),(yield function vs(M,m){return De(M,"POST","/v2/accounts/mfaEnrollment:start",Pe(M,m))}(M,{idToken:Zn.credential,phoneEnrollmentInfo:{phoneNumber:Yt.phoneNumber,recaptchaToken:at}})).phoneSessionInfo.sessionInfo;{j("signin"===Zn.type,M,"internal-error");const xr=(null===(L=Yt.multiFactorHint)||void 0===L?void 0:L.uid)||Yt.multiFactorUid;return j(xr,M,"missing-multi-factor-info"),(yield function ve(M,m){return De(M,"POST","/v2/accounts/mfaSignIn:start",Pe(M,m))}(M,{mfaPendingCredential:Zn.credential,mfaEnrollmentId:xr,phoneSignInInfo:{recaptchaToken:at}})).phoneResponseInfo.sessionInfo}}{const{sessionInfo:Zn}=yield function Gs(M,m){return Ns.apply(this,arguments)}(M,{phoneNumber:Yt.phoneNumber,recaptchaToken:at});return Zn}}finally{E._reset()}}),yl.apply(this,arguments)}function Zs(){return(Zs=(0,i.c)(function*(M,m){yield he((0,b.Yj)(M),m)})).apply(this,arguments)}let cs=(()=>{class M{constructor(E){this.providerId=M.PROVIDER_ID,this.auth=yi(E)}verifyPhoneNumber(E,L){return ju(this.auth,E,(0,b.Yj)(L))}static credential(E,L){return qe._fromVerification(E,L)}static credentialFromResult(E){return M.credentialFromTaggedObject(E)}static credentialFromError(E){return M.credentialFromTaggedObject(E.customData||{})}static credentialFromTaggedObject({_tokenResponse:E}){if(!E)return null;const{phoneNumber:L,temporaryProof:at}=E;return L&&at?qe._fromTokenResponse(L,at):null}}return M.PROVIDER_ID="phone",M.PHONE_SIGN_IN_METHOD="phone",M})();function ls(M,m){return m?Bn(m):(j(M._popupRedirectResolver,M,"argument-error"),M._popupRedirectResolver)}class so extends en{constructor(m){super("custom","custom"),this.params=m}_getIdTokenResponse(m){return xi(m,this._buildIdpRequest())}_linkToIdToken(m,E){return xi(m,this._buildIdpRequest(E))}_getReauthenticationResolver(m){return xi(m,this._buildIdpRequest())}_buildIdpRequest(m){const E={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 m&&(E.idToken=m),E}}function Da(M){return Ms(M.auth,new so(M),M.bypassAuthState)}function ql(M){const{auth:m,user:E}=M;return j(E,m,"internal-error"),Ti(E,new so(M),M.bypassAuthState)}function Oa(M){return Gu.apply(this,arguments)}function Gu(){return(Gu=(0,i.c)(function*(M){const{auth:m,user:E}=M;return j(E,m,"internal-error"),he(E,new so(M),M.bypassAuthState)})).apply(this,arguments)}class eu{constructor(m,E,L,at,Yt=!1){this.auth=m,this.resolver=L,this.user=at,this.bypassAuthState=Yt,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(E)?E:[E]}execute(){var m=this;return new Promise(function(){var E=(0,i.c)(function*(L,at){m.pendingPromise={resolve:L,reject:at};try{m.eventManager=yield m.resolver._initialize(m.auth),yield m.onExecution(),m.eventManager.registerConsumer(m)}catch(Yt){m.reject(Yt)}});return function(L,at){return E.apply(this,arguments)}}())}onAuthEvent(m){var E=this;return(0,i.c)(function*(){const{urlResponse:L,sessionId:at,postBody:Yt,tenantId:Zn,error:xr,type:vi}=m;if(xr)return void E.reject(xr);const Yi={auth:E.auth,requestUri:L,sessionId:at,tenantId:Zn||void 0,postBody:Yt||void 0,user:E.user,bypassAuthState:E.bypassAuthState};try{E.resolve(yield E.getIdpTask(vi)(Yi))}catch(Ji){E.reject(Ji)}})()}onError(m){this.reject(m)}getIdpTask(m){switch(m){case"signInViaPopup":case"signInViaRedirect":return Da;case"linkViaPopup":case"linkViaRedirect":return Oa;case"reauthViaPopup":case"reauthViaRedirect":return ql;default:ae(this.auth,"internal-error")}}resolve(m){Le(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(m),this.unregisterAndCleanUp()}reject(m){Le(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(m),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const $o=new ue(2e3,1e4);function Po(){return(Po=(0,i.c)(function*(M,m,E){const L=yi(M);Ie(M,m,Vn);const at=ls(L,E);return new El(L,"signInViaPopup",m,at).executeNotNull()})).apply(this,arguments)}function Hs(){return(Hs=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M);Ie(L.auth,m,Vn);const at=ls(L.auth,E);return new El(L.auth,"reauthViaPopup",m,at,L).executeNotNull()})).apply(this,arguments)}function cl(){return(cl=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M);Ie(L.auth,m,Vn);const at=ls(L.auth,E);return new El(L.auth,"linkViaPopup",m,at,L).executeNotNull()})).apply(this,arguments)}let El=(()=>{class M extends eu{constructor(E,L,at,Yt,Zn){super(E,L,Yt,Zn),this.provider=at,this.authWindow=null,this.pollId=null,M.currentPopupAction&&M.currentPopupAction.cancel(),M.currentPopupAction=this}executeNotNull(){var E=this;return(0,i.c)(function*(){const L=yield E.execute();return j(L,E.auth,"internal-error"),L})()}onExecution(){var E=this;return(0,i.c)(function*(){Le(1===E.filter.length,"Popup operations only handle one event");const L=Wo();E.authWindow=yield E.resolver._openPopup(E.auth,E.provider,E.filter[0],L),E.authWindow.associatedEvent=L,E.resolver._originValidation(E.auth).catch(at=>{E.reject(at)}),E.resolver._isIframeWebStorageSupported(E.auth,at=>{at||E.reject(Ve(E.auth,"web-storage-unsupported"))}),E.pollUserCancellation()})()}get eventId(){var E;return(null===(E=this.authWindow)||void 0===E?void 0:E.associatedEvent)||null}cancel(){this.reject(Ve(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,M.currentPopupAction=null}pollUserCancellation(){const E=()=>{var L,at;this.pollId=null!==(at=null===(L=this.authWindow)||void 0===L?void 0:L.window)&&void 0!==at&&at.closed?window.setTimeout(()=>{this.pollId=null,this.reject(Ve(this.auth,"popup-closed-by-user"))},8e3):window.setTimeout(E,$o.get())};E()}}return M.currentPopupAction=null,M})();const Wu="pendingRedirect",Ga=new Map;class Xa extends eu{constructor(m,E,L=!1){super(m,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],E,void 0,L),this.eventId=null}execute(){var m=()=>super.execute,E=this;return(0,i.c)(function*(){let L=Ga.get(E.auth._key());if(!L){try{const Yt=(yield function Eu(M,m){return dl.apply(this,arguments)}(E.resolver,E.auth))?yield m().call(E):null;L=()=>Promise.resolve(Yt)}catch(at){L=()=>Promise.reject(at)}Ga.set(E.auth._key(),L)}
1return E.bypassAuthState||Ga.set(E.auth._key(),()=>Promise.resolve(null)),L()})()}onAuthEvent(m){var E=()=>super.onAuthEvent,L=this;return(0,i.c)(function*(){if("signInViaRedirect"===m.type)return E().call(L,m);if("unknown"!==m.type){if(m.eventId){const at=yield L.auth._redirectUserForId(m.eventId);if(at)return L.user=at,E().call(L,m);L.resolve(null)}}else L.resolve(null)})()}onExecution(){return(0,i.c)(function*(){})()}cleanUp(){}}function dl(){return(dl=(0,i.c)(function*(M,m){const E=wu(m),L=Lo(M);if(!(yield L._isAvailable()))return!1;const at="true"===(yield L._get(E));return yield L._remove(E),at})).apply(this,arguments)}function la(M,m){return Yl.apply(this,arguments)}function Yl(){return(Yl=(0,i.c)(function*(M,m){return Lo(M)._set(wu(m),"true")})).apply(this,arguments)}function zu(M,m){Ga.set(M._key(),m)}function Lo(M){return Bn(M._redirectPersistence)}function wu(M){return Ir(Wu,M.config.apiKey,M.name)}function xs(M,m,E){return function nn(M,m,E){return _r.apply(this,arguments)}(M,m,E)}function _r(){return(_r=(0,i.c)(function*(M,m,E){const L=yi(M);Ie(M,m,Vn),yield L._initializationPromise;const at=ls(L,E);return yield la(at,L),at._openRedirect(L,m,"signInViaRedirect")})).apply(this,arguments)}function Wr(M,m,E){return function Li(M,m,E){return $i.apply(this,arguments)}(M,m,E)}function $i(){return($i=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M);Ie(L.auth,m,Vn),yield L.auth._initializationPromise;const at=ls(L.auth,E);yield la(at,L.auth);const Yt=yield Bs(L);return at._openRedirect(L.auth,m,"reauthViaRedirect",Yt)})).apply(this,arguments)}function _s(M,m,E){return function Ls(M,m,E){return Os.apply(this,arguments)}(M,m,E)}function Os(){return(Os=(0,i.c)(function*(M,m,E){const L=(0,b.Yj)(M);Ie(L.auth,m,Vn),yield L.auth._initializationPromise;const at=ls(L.auth,E);yield Un(!1,L,m.providerId),yield la(at,L.auth);const Yt=yield Bs(L);return at._openRedirect(L.auth,m,"linkViaRedirect",Yt)})).apply(this,arguments)}function wo(){return(wo=(0,i.c)(function*(M,m){return yield yi(M)._initializationPromise,Mo(M,m,!1)})).apply(this,arguments)}function Mo(M,m){return xo.apply(this,arguments)}function xo(){return(xo=(0,i.c)(function*(M,m,E=!1){const L=yi(M),at=ls(L,m),Zn=yield new Xa(L,at,E).execute();return Zn&&!E&&(delete Zn.user._redirectEventId,yield L._persistUserIfCurrent(Zn.user),yield L._setRedirectUser(null,m)),Zn})).apply(this,arguments)}function Bs(M){return To.apply(this,arguments)}function To(){return(To=(0,i.c)(function*(M){const m=Wo(`${M.uid}:::`);return M._redirectEventId=m,yield M.auth._setRedirectUser(M),yield M.auth._persistUserIfCurrent(M),m})).apply(this,arguments)}class Ho{constructor(m){this.auth=m,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(m){this.consumers.add(m),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,m)&&(this.sendToConsumer(this.queuedRedirectEvent,m),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(m){this.consumers.delete(m)}onEvent(m){if(this.hasEventBeenHandled(m))return!1;let E=!1;return this.consumers.forEach(L=>{this.isEventForConsumer(m,L)&&(E=!0,this.sendToConsumer(m,L),this.saveEventToCache(m))}),this.hasHandledPotentialRedirect||!function ws(M){switch(M.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return ao(M);default:return!1}}(m)||(this.hasHandledPotentialRedirect=!0,E||(this.queuedRedirectEvent=m,E=!0)),E}sendToConsumer(m,E){var L;if(m.error&&!ao(m)){const at=(null===(L=m.error.code)||void 0===L?void 0:L.split("auth/")[1])||"internal-error";E.onError(Ve(this.auth,at))}else E.onAuthEvent(m)}isEventForConsumer(m,E){const L=null===E.eventId||!!m.eventId&&m.eventId===E.eventId;return E.filter.includes(m.type)&&L}hasEventBeenHandled(m){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(As(m))}saveEventToCache(m){this.cachedEventUids.add(As(m)),this.lastProcessedEventTime=Date.now()}}function As(M){return[M.type,M.eventId,M.sessionId,M.tenantId].filter(m=>m).join("-")}function ao({type:M,error:m}){return"unknown"===M&&"auth/no-auth-event"===m?.code}function Rs(M){return co.apply(this,arguments)}function co(){return(co=(0,i.c)(function*(M,m={}){return De(M,"GET","/v1/projects",m)})).apply(this,arguments)}const qi=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ps=/^https?/;
1function bu(){return(bu=(0,i.c)(function*(M){if(M.config.emulator)return;const{authorizedDomains:m}=yield Rs(M);for(const E of m)try{if(Tc(E))return}catch{}ae(M,"unauthorized-domain")})).apply(this,arguments)}function Tc(M){const m=W(),{protocol:E,hostname:L}=new URL(m);if(M.startsWith("chrome-extension://")){const Zn=new URL(M);return""===Zn.hostname&&""===L?"chrome-extension:"===E&&M.replace("chrome-extension://","")===m.replace("chrome-extension://",""):"chrome-extension:"===E&&Zn.hostname===L}if(!ps.test(E))return!1;if(qi.test(M))return L===M;const at=M.replace(/\./g,"\\.");return new RegExp("^(.+\\."+at+"|"+at+")$","i").test(L)}const $d=new ue(3e4,6e4);function dc(){const M=Ks().___jsl;if(M?.H)for(const m of Object.keys(M.H))if(M.H[m].r=M.H[m].r||[],M.H[m].L=M.H[m].L||[],M.H[m].r=[...M.H[m].L],M.CP)for(let E=0;E<M.CP.length;E++)M.CP[E]=null}let Iu=null;const Af=new ue(5e3,15e3),Hu="__/auth/iframe",jd="emulator/auth/iframe",Cc={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},od=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Df(M){const m=M.config;j(m.authDomain,M,"auth-domain-config-required");const E=m.emulator?se(m,jd):`https://${M.config.authDomain}/${Hu}`,L={apiKey:m.apiKey,appName:M.name,v:_.SDK_VERSION},at=od.get(M.config.apiHost);at&&(L.eid=at);const Yt=M._getFrameworks();return Yt.length&&(L.fw=Yt.join(",")),`${E}?${(0,b.ik)(L).slice(1)}`}function I(){return I=(0,i.c)(function*(M){const m=yield function sd(M){return Iu=Iu||function fc(M){return new Promise((m,E)=>{var L,at,Yt;function Zn(){dc(),gapi.load("gapi.iframes",{callback:()=>{m(gapi.iframes.getContext())},ontimeout:()=>{dc(),E(Ve(M,"network-request-failed"))},timeout:$d.get()})}if(null!==(at=null===(L=Ks().gapi)||void 0===L?void 0:L.iframes)&&void 0!==at&&at.Iframe)m(gapi.iframes.getContext());else{if(null===(Yt=Ks().gapi)||void 0===Yt||!Yt.load){const xr=Mn("iframefcb");return Ks()[xr]=()=>{gapi.load?Zn():E(Ve(M,"network-request-failed"))},Re(`${function En(){return le.gapiScript}()}?onload=${xr}`).catch(vi=>E(vi))}Zn()}}).catch(m=>{throw Iu=null,m})}(M),Iu}(M),E=Ks().gapi;return j(E,M,"internal-error"),m.open({where:document.body,url:Df(M),messageHandlersFilter:E.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Cc,dontclear:!0},L=>new Promise(function(){var at=(0,i.c)(function*(Yt,Zn){yield L.restyle({setHideOnLeave:!1});const xr=Ve(M,"network-request-failed"),vi=Ks().setTimeout(()=>{Zn(xr)},Af.get());function Yi(){Ks().clearTimeout(vi),Yt(L)}L.ping(Yi).then(Yi,()=>{Zn(xr)})});
1return function(Yt,Zn){return at.apply(this,arguments)}}()))}),I.apply(this,arguments)}const l={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Oe{constructor(m){this.window=m,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}const mt="__/auth/handler",gt="emulator/auth/handler",vt=encodeURIComponent("fac");function Gt(M,m,E,L,at,Yt){return un.apply(this,arguments)}function un(){return(un=(0,i.c)(function*(M,m,E,L,at,Yt){j(M.config.authDomain,M,"auth-domain-config-required"),j(M.config.apiKey,M,"invalid-api-key");const Zn={apiKey:M.config.apiKey,appName:M.name,authType:E,redirectUrl:L,v:_.SDK_VERSION,eventId:at};if(m instanceof Vn){m.setDefaultLanguage(M.languageCode),Zn.providerId=m.providerId||"",(0,b.t7)(m.getCustomParameters())||(Zn.customParameters=JSON.stringify(m.getCustomParameters()));for(const[Ji,Xi]of Object.entries(Yt||{}))Zn[Ji]=Xi}if(m instanceof Gn){const Ji=m.getScopes().filter(Xi=>""!==Xi);Ji.length>0&&(Zn.scopes=Ji.join(","))}M.tenantId&&(Zn.tid=M.tenantId);const xr=Zn;for(const Ji of Object.keys(xr))void 0===xr[Ji]&&delete xr[Ji];const vi=yield M._getAppCheckToken(),Yi=vi?`#${vt}=${encodeURIComponent(vi)}`:"";return`${function fn({config:M}){return M.emulator?se(M,gt):`https://${M.authDomain}/${mt}`}(M)}?${(0,b.ik)(xr).slice(1)}${Yi}`})).apply(this,arguments)}const Sn="webStorageSupport",tn=class Pn{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Bo,this._completeRedirectFn=Mo,this._overrideRedirectResult=zu}_openPopup(m,E,L,at){var Yt=this;return(0,i.c)(function*(){var Zn;Le(null===(Zn=Yt.eventManagers[m._key()])||void 0===Zn?void 0:Zn.manager,"_initialize() not called before _openPopup()");const xr=yield Gt(m,E,L,W(),at);return function Be(M,m,E,L=500,at=600){const Yt=Math.max((window.screen.availHeight-at)/2,0).toString(),Zn=Math.max((window.screen.availWidth-L)/2,0).toString();let xr="";const vi=Object.assign(Object.assign({},l),{width:L.toString(),height:at.toString(),top:Yt,left:Zn}),Yi=(0,b.Su)().toLowerCase();E&&(xr=Pi(Yi)?"_blank":E),Ai(Yi)&&(m=m||"http://localhost",vi.scrollbars="yes");const Ji=Object.entries(vi).reduce((Xo,[xl,xc])=>`${Xo}${xl}=${xc},`,"");if(function mi(M=(0,b.Su)()){var m;return jn(M)&&!(null===(m=window.navigator)||void 0===m||!m.standalone)}(Yi)&&"_self"!==xr)return function xe(M,m){const E=document.createElement("a");E.href=M,E.target=m;const L=document.createEvent("MouseEvent");L.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),E.dispatchEvent(L)}(m||"",xr),new Oe(null);const Xi=window.open(m||"",xr,Ji);j(Xi,M,"popup-blocked");try{Xi.focus()}catch{}return new Oe(Xi)}(m,xr,Wo())})()}_openRedirect(m,E,L,at){var Yt=this;return(0,i.c)(function*(){return yield Yt._originValidation(m),function fu(M){Ks().location.href=M}(yield Gt(m,E,L,W(),at)),new Promise(()=>{})})()}_initialize(m){const E=m._key();if(this.eventManagers[E]){const{manager:at,promise:Yt}=this.eventManagers[E];return at?Promise.resolve(at):(Le(Yt,"If manager is not set, promise should be"),Yt)}const L=this.initAndGetManager(m);return this.eventManagers[E]={promise:L},L.catch(()=>{delete this.eventManagers[E]}),L}initAndGetManager(m){var E=this;return(0,i.c)(function*(){const L=yield function Th(M){return I.apply(this,arguments)}(m),at=new Ho(m);return L.register("authEvent",Yt=>(j(Yt?.authEvent,m,"invalid-auth-event"),{status:at.onEvent(Yt.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),E.eventManagers[m._key()]={manager:at},E.iframes[m._key()]=L,at})()}_isIframeWebStorageSupported(m,E){this.iframes[m._key()].send(Sn,{type:Sn},at=>{var Yt;const Zn=null===(Yt=at?.[0])||void 0===Yt?void 0:Yt[Sn];void 0!==Zn&&E(!!Zn),ae(m,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(m){const E=m._key();return this.originValidationPromises[E]||(this.originValidationPromises[E]=function fl(M){return bu.apply(this,arguments)}(m)),this.originValidationPromises[E]}get _shouldInitProactively(){return Mi()||Di()||jn()}};class kn{constructor(m){this.factorId=m}_process(m,E,L){switch(E.type){case"enroll":return this._finalizeEnroll(m,E.credential,L);case"signin":return this._finalizeSignIn(m,E.credential);default:return ye("unexpected MultiFactorSessionType")}}}class Rn extends kn{constructor(m){super("phone"),this.credential=m}static _fromCredential(m){return new Rn(m)}_finalizeEnroll(m,E,L){return function Bl(M,m){return De(M,"POST","/v2/accounts/mfaEnrollment:finalize",Pe(M,m))}(m,{idToken:E,displayName:L,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(m,E){return function ht(M,m){return De(M,"POST","/v2/accounts/mfaSignIn:finalize",Pe(M,m))}(m,{mfaPendingCredential:E,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}let vr=(()=>{class M{constructor(){}static assertion(E){return Rn._fromCredential(E)}}return M.FACTOR_ID="phone",M})();var Qr="@firebase/auth";class Si{constructor(m){this.auth=m,this.internalListeners=new Map}getUid(){var m;return this.assertAuthConfigured(),(null===(m=this.auth.currentUser)||void 0===m?void 0:m.uid)||null}getToken(m){var E=this;return(0,i.c)(function*(){return E.assertAuthConfigured(),yield E.auth._initializationPromise,E.auth.currentUser?{accessToken:yield E.auth.currentUser.getIdToken(m)}:null})()}addAuthTokenListener(m){if(this.assertAuthConfigured(),this.internalListeners.has(m))return;const E=this.auth.onIdTokenChanged(L=>{m(L?.stsTokenManager.accessToken||null)});this.internalListeners.set(m,E),this.updateProactiveRefresh()}removeAuthTokenListener(m){this.assertAuthConfigured();const E=this.internalListeners.get(m);E&&(this.internalListeners.delete(m),E(),this.updateProactiveRefresh())}assertAuthConfigured(){j(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function Ei(){return window}
1(0,b.sX)("authIdTokenMaxAge"),function me(M){le=M}({loadJS:M=>new Promise((m,E)=>{const L=document.createElement("script");L.setAttribute("src",M),L.onload=m,L.onerror=at=>{const Yt=Ve("internal-error");Yt.customData=at,E(Yt)},L.type="text/javascript",L.charset="UTF-8",function ai(){var M,m;return null!==(m=null===(M=document.getElementsByTagName("head"))||void 0===M?void 0:M[0])&&void 0!==m?m:document}().appendChild(L)}),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="}),function Kn(M){(0,_._registerComponent)(new S.Yl("auth",(m,{options:E})=>{const L=m.getProvider("app").getImmediate(),at=m.getProvider("heartbeat"),Yt=m.getProvider("app-check-internal"),{apiKey:Zn,authDomain:xr}=L.options;j(Zn&&!Zn.includes(":"),"invalid-api-key",{appName:L.name});const vi={apiKey:Zn,authDomain:xr,clientPlatform:M,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:_n(M)},Yi=new Ii(L,at,Yt,vi);return function Tr(M,m){const E=m?.persistence||[],L=(Array.isArray(E)?E:[E]).map(Bn);m?.errorMap&&M._updateErrorMap(m.errorMap),M._initializeWithPersistence(L,m?.popupRedirectResolver)}(Yi,E),Yi},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((m,E,L)=>{m.getProvider("auth-internal").initialize()})),(0,_._registerComponent)(new S.Yl("auth-internal",m=>{const E=yi(m.getProvider("auth").getImmediate());return new Si(E)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,_.registerVersion)(Qr,"1.6.2",function $r(M){switch(M){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(M)),(0,_.registerVersion)(Qr,"1.6.2","esm2017")}("Browser");function rs(){return rs=(0,i.c)(function*(M,m,E){var L;const{BuildInfo:at}=Ei();Le(m.sessionId,"AuthEvent did not contain a session ID");const Yt=yield function nu(M){return Qa.apply(this,arguments)}(m.sessionId),Zn={};return jn()?Zn.ibi=at.packageName:Ht()?Zn.apn=at.packageName:ae(M,"operation-not-supported-in-this-environment"),at.displayName&&(Zn.appDisplayName=at.displayName),Zn.sessionId=Yt,Gt(M,E,m.type,void 0,null!==(L=m.eventId)&&void 0!==L?L:void 0,Zn)}),rs.apply(this,arguments)}function Ko(){return(Ko=(0,i.c)(function*(M){const{BuildInfo:m}=Ei(),E={};jn()?E.iosBundleId=m.packageName:Ht()?E.androidPackageName=m.packageName:ae(M,"operation-not-supported-in-this-environment"),yield Rs(M,E)})).apply(this,arguments)}function Yo(){return(Yo=(0,i.c)(function*(M,m,E){const{cordova:L}=Ei();let at=()=>{};try{yield new Promise((Yt,Zn)=>{let xr=null;function vi(){var Xi;Yt();const Xo=null===(Xi=L.plugins.browsertab)||void 0===Xi?void 0:Xi.close;"function"==typeof Xo&&Xo(),"function"==typeof E?.close&&E.close()}function Yi(){xr||(xr=window.setTimeout(()=>{Zn(Ve(M,"redirect-cancelled-by-user"))},2e3))}function Ji(){"visible"===document?.visibilityState&&Yi()}m.addPassiveListener(vi),document.addEventListener("resume",Yi,!1),Ht()&&document.addEventListener("visibilitychange",Ji,!1),at=()=>{m.removePassiveListener(vi),document.removeEventListener("resume",Yi,!1),document.removeEventListener("visibilitychange",Ji,!1),xr&&window.clearTimeout(xr)}})}finally{at()}})).apply(this,arguments)}function Qa(){return(Qa=(0,i.c)(function*(M){const m=function Xl(M){if(Le(/[0-9a-zA-Z]+/.test(M),"Can only convert alpha-numeric strings"),typeof TextEncoder<"u")return(new TextEncoder).encode(M);const m=new ArrayBuffer(M.length),E=new Uint8Array(m);for(let L=0;L<M.length;L++)E[L]=M.charCodeAt(L);return E}(M),E=yield crypto.subtle.digest("SHA-256",m);return Array.from(new Uint8Array(E)).map(at=>at.toString(16).padStart(2,"0")).join("")})).apply(this,arguments)}class Ml extends Ho{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(m=>{this.resolveInialized=m})}addPassiveListener(m){this.passiveListeners.add(m)}removePassiveListener(m){this.passiveListeners.delete(m)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(m){return this.resolveInialized(),this.passiveListeners.forEac
1h(E=>E(m)),super.onEvent(m)}initialized(){var m=this;return(0,i.c)(function*(){yield m.initPromise})()}}function Su(M){return Ku.apply(this,arguments)}function Ku(){return(Ku=(0,i.c)(function*(M){const m=yield Cu()._get(Fo(M));return m&&(yield Cu()._remove(Fo(M))),m})).apply(this,arguments)}function Tu(){const M=[];for(let E=0;E<20;E++){const L=Math.floor(62*Math.random());M.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(L))}return M.join("")}function Cu(){return Bn(fa)}function Fo(M){return Ir("authEvent",M.config.apiKey,M.name)}function ld(M){if(!M?.includes("?"))return{};const[m,...E]=M.split("?");return(0,b.aw)(E.join("?"))}const lg=class cd{constructor(){this._redirectPersistence=Bo,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=Mo,this._overrideRedirectResult=zu}_initialize(m){var E=this;return(0,i.c)(function*(){const L=m._key();let at=E.eventManagers.get(L);return at||(at=new Ml(m),E.eventManagers.set(L,at),E.attachCallbackListeners(m,at)),at})()}_openPopup(m){ae(m,"operation-not-supported-in-this-environment")}_openRedirect(m,E,L,at){var Yt=this;return(0,i.c)(function*(){!function wa(M){var m,E,L,at,Yt,Zn,xr,vi,Yi,Ji;const Xi=Ei();j("function"==typeof(null===(m=Xi?.universalLinks)||void 0===m?void 0:m.subscribe),M,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),j(typeof(null===(E=Xi?.BuildInfo)||void 0===E?void 0:E.packageName)<"u",M,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),j("function"==typeof(null===(Yt=null===(at=null===(L=Xi?.cordova)||void 0===L?void 0:L.plugins)||void 0===at?void 0:at.browsertab)||void 0===Yt?void 0:Yt.openUrl),M,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),j("function"==typeof(null===(vi=null===(xr=null===(Zn=Xi?.cordova)||void 0===Zn?void 0:Zn.plugins)||void 0===xr?void 0:xr.browsertab)||void 0===vi?void 0:vi.isAvailable),M,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),j("function"==typeof(null===(Ji=null===(Yi=Xi?.cordova)||void 0===Yi?void 0:Yi.InAppBrowser)||void 0===Ji?void 0:Ji.open),M,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}(m);const Zn=yield Yt._initialize(m);yield Zn.initialized(),Zn.resetRedirect(),function ta(){Ga.clear()}(),yield Yt._originValidation(m);const xr=function _c(M,m,E=null){return{type:m,eventId:E,urlResponse:null,sessionId:Tu(),postBody:null,tenantId:M.tenantId,error:Ve(M,"no-auth-event")}}(m,L,at);yield function ru(M,m){return Cu()._set(Fo(M),m)}(m,xr);const vi=yield function Ys(M,m,E){return rs.apply(this,arguments)}(m,xr,E),Yi=yield function Pl(M){const{cordova:m}=Ei();return new Promise(E=>{m.plugins.browsertab.isAvailable(L=>{let at=null;L?m.plugins.browsertab.openUrl(M):at=m.InAppBrowser.open(M,function wr(M=(0,b.Su)()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(M)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(M)}()?"_blank":"_system","location=yes"),E(at)})})}(vi);return function $s(M,m,E){return Yo.apply(this,arguments)}(m,Zn,Yi)})()}_isIframeWebStorageSupported(m,E){throw new Error("Method not implemented.")}_originValidation(m){const E=m._key();return this.originValidationPromises[E]||(this.originValidationPromises[E]=function gs(M){return Ko.apply(this,arguments)}(m)),this.originValidationPromises[E]}attachCallbackListeners(m,E){const{universalLinks:L,handleOpenURL:at,BuildInfo:Yt}=Ei(),Zn=setTimeout((0,i.c)(function*(){yield Su(m),E.onEvent(Pf())}),500),xr=function(){var Ji=(0,i.c)(function*(Xi){clearTimeout(Zn);const Xo=yield Su(m);let xl=null;Xo&&Xi?.url&&(xl=function hl(M,m){var E,L;const at=function ad(M){const m=ld(M),E=m.link?decodeURIComponent(m.link):void 0,L=ld(E).link,at=m.deep_link_id?decodeURIComponent(m.deep_link_id):void 0;return ld(at).link||at||L||E||M}(m);if(at.includes("/__/auth/callback")){const Yt=ld(at),Zn=Yt.firebaseError?function na(M){try{return JSON.parse(M)}catch{return null}}(decodeURIComponent(Yt.firebaseError)):null,xr=null===(L=null===(E=Zn?.code)||void 0===E?void 0:E.split("auth/"))||void 0===L?void 0:L[1],vi=xr?Ve(xr):null;return vi?{type:M.type,eventId:M.eventId,tenantId:M.tenantId,error:vi,urlResponse:null,sessionId:null,postBody:null}:{type:M.type,eventId:M.eventId,tenantId:M.tenantId,sessionId:M.sessionId,urlResponse:at,postBody:null}}return null}(Xo,Xi.url)),E.onEvent(xl||Pf())});return function(Xo){return Ji.apply(this,arguments)}}();typeof L<"u"&&"function"==typeof L.subscribe&&L.subscribe(null,xr);const vi=at,Yi=`${Yt.packageName.toLowerCase()}://`;Ei().handleOpenURL=function(){var Ji=(0,i.c)(function*(Xi){if(Xi.toLowerCase().startsWith(Yi)&&xr({url:Xi}),"function"==typeof vi)try{vi(Xi)}catch(Xo){console.error(Xo)}});return function(Xi){return Ji.apply(this,arguments)}}()}};function Pf(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:Ve("no-auth-event")}}function Au(){var M;return(null===(M=self?.location)||void 0===M?void 0:M.protocol)||null}function dd(M=(0,b.Su)()){return!("file:"!==Au()&&"ionic:"!==Au()&&"capacitor:"!==Au()||!M.toLowerCase().match(/iphone|ipad|ipod|android/))}function Mf(){try{const M=self.localStorage,m=Wo();if(M)return M.setItem(m,"1"),M.removeItem(m),!function ug(M=(0,b.Su)()){return function Wd(){return(0,b.Uv)()&&11===document?.documentMode}()||function Rf(M=(0,b.Su)()){return/Edge\/\d+/.test(M)}(M)}()||(0,b.yy)()}catch{return Zo()&&(0,b.yy)()}return!1}function Zo(){return typeof global<"u"&&"WorkerGlobalScope"in global&&"importScripts"in global}function eo(){return(function Dc(){return"http:"===Au()||"https:"===Au()}()||(0,b.Cc)()||dd())&&!function fd(){return(0,b.AL)()||(0,b.yW)()}()&&Mf()&&!Zo()}function hd(){return dd()&&typeof document<"u"}function Ja(){return(Ja=(0,i.c)(function*(){return!!hd()&&new Promise(M=>{const m=setTimeout(()=>{M(!1)},1e3);document.addEventListener("deviceready",()=>{clearTimeout(m),M(!0)})})})).apply(this,arguments)}const Wa={LOCAL:"local",NONE:"none",SESSION:"session"},Du=j,Pc="persistence";function Yu(M){return Xu.apply(this,arguments)}function Xu(){return(Xu=(0,i.c)(function*(M){yield M._initializationPromise;const m=iu(),E=Ir(Pc,M.config.apiKey,M.name);m&&m.setItem(E,M._getPersistence())})).apply(this,arguments)}function iu(){var M;try{return(null===(M=function Ah(){return typeof window<"u"?window:null}())||void 0===M?void 0:M.sessionStorage)||null}catch{return null}}const Rc=j;class Pu{constructor(){this.browserResolver=Bn(tn),this.cordovaResolver=Bn(lg),this.underlyingResolver=null,this._redirectPersistence=Bo,this._completeRedirectFn=Mo,this._overrideRedirectResult=zu}_initialize(m){var E=this;return(0,i.c)(function*(){return yield E.selectUnderlyingResolver(),E.assertedUnderlyingResolver._initialize(m)})()}_openPopup(m,E,L,at){var Yt=this;return(0,i.c)(function*(){return yield Yt.selectUnderlyingResolver(),Yt.assertedUnderlyingResolver._openPopup(m,E,L,at)})()}_openRedirect(m,E,L,at){var Yt=this;return(0,i.c)(function*(){return yield Yt.selectUnderlyingResolver(),Yt.assertedUnderlyingResolver._openRedirect(m,E,L,at)})()}_isIframeWebStorageSupported(m,E){this.assertedUnderlyingResolver._isIframeWebStorageSupported(m,E)}_originValidation(m){return this.assertedUnderlyingResolver._originValidation(m)}get _shouldInitProactively(){return hd()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return Rc(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){var m=this;return(0,i.c)(function*(){if(m.underlyingResolver)return;const E=yield function _h(){return Ja.apply(this,arguments)}();m.underlyingResolver=E?m.cordovaResolver:m.browserResolver})()}}function md(M){return M.unwrap()}function Dh(M){return dg(M)}function dg(M){const{_tokenResponse:m}=M instanceof b.kx?M.customData:M;if(!m)return null;if(!(M instanceof b.kx)&&"temporaryProof"in m&&"phoneNumber"in m)return cs.credentialFromResult(M);const E=m.providerId;if(!E||E===k.PASSWORD)return null;let L;switch(E){case k.GOOGLE:L=Gi;break;case k.FACEBOOK:L=ar;break;case k.GITHUB:L=zi;break;case k.TWITTER:L=Ue;break;default:const{oauthIdToken:at,oauthAccessToken:Yt,oauthTokenSecret:Zn,pendingToken:xr,nonce:vi}=m;return Yt||Zn||at||xr?xr?E.startsWith("saml.")?es._create(E,xr):fs._fromParams({providerId:E,signInMethod:E,pendingToken:xr,idToken:at,accessToken:Yt}):new Jn(E).credential({idToken:at,accessToken:Yt,rawNonce:vi}):null}
1return M instanceof b.kx?L.credentialFromError(M):L.credentialFromResult(M)}function wl(M,m){return m.catch(E=>{throw E instanceof b.kx&&function Ph(M,m){var E;const L=null===(E=m.customData)||void 0===E?void 0:E._tokenResponse;if("auth/multi-factor-auth-required"===m?.code)m.resolver=new xf(M,function xa(M,m){var E;const L=(0,b.Yj)(M),at=m;return j(m.customData.operationType,L,"argument-error"),j(null===(E=at.customData._serverResponse)||void 0===E?void 0:E.mfaPendingCredential,L,"argument-error"),Is._fromError(L,at)}(M,m));else if(L){const at=dg(m),Yt=m;at&&(Yt.credential=at,Yt.tenantId=L.tenantId||void 0,Yt.email=L.email||void 0,Yt.phoneNumber=L.phoneNumber||void 0)}}(M,E),E}).then(E=>{const at=E.user;return{operationType:E.operationType,credential:Dh(E),additionalUserInfo:Pr(E),user:Pa.getOrCreate(at)}})}function vd(M,m){return hc.apply(this,arguments)}function hc(){return(hc=(0,i.c)(function*(M,m){const E=yield m;return{verificationId:E.verificationId,confirm:L=>wl(M,E.confirm(L))}})).apply(this,arguments)}class xf{constructor(m,E){this.resolver=E,this.auth=function cg(M){return M.wrapped()}(m)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(m){return wl(md(this.auth),this.resolver.resolveSignIn(m))}}class Pa{constructor(m){this._delegate=m,this.multiFactor=function Aa(M){const m=(0,b.Yj)(M);return Es.has(m)||Es.set(m,ja._fromUser(m)),Es.get(m)}(m)}static getOrCreate(m){return Pa.USER_MAP.has(m)||Pa.USER_MAP.set(m,new Pa(m)),Pa.USER_MAP.get(m)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(m){return this._delegate.getIdTokenResult(m)}getIdToken(m){return this._delegate.getIdToken(m)}linkAndRetrieveDataWithCredential(m){return this.linkWithCredential(m)}linkWithCredential(m){var E=this;return(0,i.c)(function*(){return wl(E.auth,vo(E._delegate,m))})()}linkWithPhoneNumber(m,E){var L=this;return(0,i.c)(function*(){return vd(L.auth,function $u(M,m,E){return cc.apply(this,arguments)}(L._delegate,m,E))})()}linkWithPopup(m){var E=this;return(0,i.c)(function*(){return wl(E.auth,function tu(M,m,E){return cl.apply(this,arguments)}(E._delegate,m,Pu))})()}linkWithRedirect(m){var E=this;return(0,i.c)(function*(){return yield Yu(yi(E.auth)),_s(E._delegate,m,Pu)})()}reauthenticateAndRetrieveDataWithCredential(m){return this.reauthenticateWithCredential(m)}reauthenticateWithCredential(m){var E=this;return(0,i.c)(function*(){return wl(E.auth,ss(E._delegate,m))})()}reauthenticateWithPhoneNumber(m,E){return vd(this.auth,function yu(M,m,E){return zo.apply(this,arguments)}(this._delegate,m,E))}reauthenticateWithPopup(m){return wl(this.auth,function Ro(M,m,E){return Hs.apply(this,arguments)}(this._delegate,m,Pu))}reauthenticateWithRedirect(m){var E=this;return(0,i.c)(function*(){return yield Yu(yi(E.auth)),Wr(E._delegate,m,Pu)})()}sendEmailVerification(m){return function cu(M,m){return Ws.apply(this,arguments)}(this._delegate,m)}unlink(m){var E=this;return(0,i.c)(function*(){return yield function Ge(M,m){return ze.apply(this,arguments)}(E._delegate,m),E})()}updateEmail(m){return function Io(M,m){return lo((0,b.Yj)(M),m,null)}(this._delegate,m)}updatePassword(m){return function ho(M,m){return lo((0,b.Yj)(M),null,m)}(this._delegate,m)}updatePhoneNumber(m){return function id(M,m){return Zs.apply(this,arguments)}(this._delegate,m)}updateProfile(m){return function yo(M,m){return Ma.apply(this,arguments)}(this._delegate,m)}verifyBeforeUpdateEmail(m,E){return function Tl(M,m,E){return $a.apply(this,arguments)}(this._delegate,m,E)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}Pa.USER_MAP=new WeakMap;const Qu=j;let yd=(()=>
1{class M{constructor(E,L){if(this.app=E,L.isInitialized())return this._delegate=L.getImmediate(),void this.linkUnderlyingAuth();const{apiKey:at}=E.options;Qu(at,"invalid-api-key",{appName:E.name}),Qu(at,"invalid-api-key",{appName:E.name});const Yt=typeof window<"u"?Pu:void 0;this._delegate=L.initialize({options:{persistence:zd(at,E.name),popupRedirectResolver:Yt}}),this._delegate._updateErrorMap(Q),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Pa.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(E){this._delegate.languageCode=E}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(E){this._delegate.tenantId=E}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(E,L){!function Gr(M,m,E){const L=yi(M);j(L._canInitEmulator,L,"emulator-config-failed"),j(/^https?:\/\//.test(m),L,"invalid-emulator-scheme");const at=!!E?.disableWarnings,Yt=qr(m),{host:Zn,port:xr}=function ri(M){const m=qr(M),E=/(\/\/)?([^?#/]+)/.exec(M.substr(m.length));if(!E)return{host:"",port:null};const L=E[2].split("@").pop()||"",at=/^(\[[^\]]+\])(:|$)/.exec(L);if(at){const Yt=at[1];return{host:Yt,port:Hr(L.substr(Yt.length+1))}}{const[Yt,Zn]=L.split(":");return{host:Yt,port:Hr(Zn)}}}(m);L.config.emulator={url:`${Yt}//${Zn}${null===xr?"":`:${xr}`}/`},L.settings.appVerificationDisabledForTesting=!0,L.emulatorConfig=Object.freeze({host:Zn,port:xr,protocol:Yt.replace(":",""),options:Object.freeze({disableWarnings:at})}),at||function zt(){function M(){const m=document.createElement("p"),E=m.style;m.innerText="Running in emulator mode. Do not use with production credentials.",E.position="fixed",E.width="100%",E.backgroundColor="#ffffff",E.border=".1em solid #000000",E.color="#b50000",E.bottom="0px",E.left="0px",E.margin="0px",E.zIndex="10000",E.textAlign="center",m.classList.add("firebase-emulator-warning"),document.body.appendChild(m)}typeof console<"u"&&"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."),typeof window<"u"&&typeof document<"u"&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",M):M())}()}(this._delegate,E,L)}applyActionCode(E){return function ia(M,m){return Qo.apply(this,arguments)}(this._delegate,E)}checkActionCode(E){return os(this._delegate,E)}confirmPasswordReset(E,L){return function rl(M,m,E){return Ua.apply(this,arguments)}(this._delegate,E,L)}createUserWithEmailAndPassword(E,L){var at=this;return(0,i.c)(function*(){return wl(at._delegate,function Ra(M,m,E){return Jo.apply(this,arguments)}(at._delegate,E,L))})()}fetchProvidersForEmail(E){return this.fetchSignInMethodsForEmail(E)}fetchSignInMethodsForEmail(E){return function Cs(M,m){return ol.apply(this,arguments)}(this._delegate,E)}isSignInWithEmailLink(E){return function Ul(M,m){const E=Ke.parseLink(m);return"EMAIL_SIGNIN"===E?.operation}(0,E)}getRedirectResult(){var E=this;return(0,i.c)(function*(){Qu(eo(),E._delegate,"operation-not-supported-in-this-environment");const L=yield function oo(M,m){return wo.apply(this,arguments)}(E._delegate,Pu);return L?wl(E._delegate,Promise.resolve(L)):{credential:null,user:null}})()}addFrameworkForLogging(E){!function Ac(M,m){yi(M)._logFramework(m)}(this._delegate,E)}onAuthStateChanged(E,L,at){const{next:Yt,error:Zn,complete:xr}=ua(E,L,at);return this._delegate.onAuthStateChanged(Yt,Zn,xr)}onIdTokenChanged(E,L,at){const{next:Yt,error:Zn,complete:xr}=ua(E,L,at);return this._delegate.onIdTokenChanged(Yt,Zn,xr)}sendSignInLinkToEmail(E,L){return function Ba(M,m,E){return Ha.apply(this,arguments)}(this._delegate,E,L)}sendPasswordResetEmail(E,L){return function Ta(M,m,E){return Vs.apply(this,arguments)}(this._delegate,E,L||void 0)}setPersistence(E){var L=this;return(0,i.c)(function*(){let at;switch(function pd(M,m){Du(Object.values(Wa).includes(m),M,"invalid-persistence-type"),(0,b.AL)()?Du(m!==Wa.SESSION,M,"unsupported-persistence-type"):(0,b.yW)()?Du(m===Wa.NONE,M,"unsupported-persistence-type"):Zo()?Du(m===Wa.NONE||m===Wa.LOCAL&&(0,b.yy)(),M,"unsupported-persistence-type"):Du(m===Wa.NONE||Mf(),M,"unsupported-persistence-type")}(L._delegate,E),E){case Wa.SESSION:at=Bo;break;case Wa.LOCAL:at=(yield Bn($)._isAvailable())?$:fa;break;case Wa.NONE:at=tr;break;default:return ae("argument-error",{appName:L._delegate.name})}return L._delegate.setPersistence(at)})()}signInAndRetrieveDataWithCredential(E){return this.signInWithCredential(E)}signInAnonymously(){return wl(this._delegate,function cr(M){return Or.apply(this,arguments)}(this._delegate))}signInWithCredential(E){return wl(this._delegate,Us(this._delegate,E))}signInWithCustomToken(E){return wl(this._delegate,function Uo(M,m){return da.apply(this,arguments)}(this._delegate,E))}signInWithEmailAndPassword(E,L){return wl(this._delegate,function ko(M,m,E){return Us((0,b.Yj)(M),Et.credential(m,E)).catch(function(){var L=(0,i.c)(function*(at){throw"auth/password-does-not-meet-requirements"===at.code&&Ll(M),at});return function(at){return L.apply(this,arguments)}}())}(this._delegate,E,L))}signInWithEmailLink(E,L){return wl(this._delegate,function Vl(M,m,E){return il.apply(this,arguments)}(this._delegate,E,L))}signInWithPhoneNumber(E,L){return vd(this._delegate,function uc(M,m,E){return Zl.apply(this,arguments)}(this._delegate,E,L))}signInWithPopup(E){var L=this;return(0,i.c)(function*(){return Qu(eo(),L._delegate,"operation-not-supported-in-this-environment"),wl(L._delegate,function ul(M,m,E){return Po.apply(this,arguments)}(L._delegate,E,Pu))})()}signInWithRedirect(E){var L=this;return(0,i.c)(function*(){return Qu(eo(),L._delegate,"operation-not-supported-in-this-environment"),yield Yu(L._delegate),xs(L._delegate,E,Pu)})()}updateCurrentUser(E){return this._delegate.updateCurrentUser(E)}verifyPasswordResetCode(E){return function uu(M,m){return Fl.apply(this,arguments)}(this._delegate,E)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}return M.Persistence=Wa,M})();function ua(M,m,E){let L=M;"function"!=typeof M&&({next:L,error:m,complete:E}=M);const at=L;return{next:Zn=>at(Zn&&Pa.getOrCreate(Zn)),error:m,complete:E}}function zd(M,m){const E=function gd(M,m){const E=iu();if(!E)return[];const L=Ir(Pc,M,m);switch(E.getItem(L)){case Wa.NONE:return[tr];case Wa.LOCAL:return[$,Bo];case Wa.SESSION:return[Bo];default:return[]}}(M,m);if(typeof self<"u"&&!E.includes($)&&E.push($),typeof window<"u")for(const L of[fa,Bo])E.includes(L)||E.push(L);return E.includes(tr)||E.push(tr),E}class Mc{constructor(){this.providerId="phone",this._delegate=new cs(md(v.c.auth()))}static credential(m,E){return cs.credential(m,E)}verifyPhoneNumber(m,E){return this._delegate.verifyPhoneNumber(m,E)}unwrap(){return this._delegate}}Mc.PHONE_SIGN_IN_METHOD=cs.PHONE_SIGN_IN_METHOD,Mc.PROVIDER_ID=cs.PROVIDER_ID;const Rh=j;class pl{constructor(m,E,L=v.c.app()){var at;Rh(null===(at=L.options)||void 0===at?void 0:at.apiKey,"invalid-api-key",{appName:L.name}),this._delegate=new ys(L.auth(),m,E),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}}!function Ed(M){M.INTERNAL.registerComponent(new S.Yl("auth-compat",m=>{const E=m.getProvider("app-compat").getImmediate(),L=m.getProvider("auth");return new yd(E,L)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"}},EmailAuthProvider:Et,FacebookAuthProvider:ar,GithubAuthProvider:zi,GoogleAuthProvider:Gi,OAuthProvider:Jn,SAMLAuthProvider:hs,PhoneAuthProvider:Mc,PhoneMultiFactorGenerator:vr,RecaptchaVerifier:pl,TwitterAuthProvider:Ue,Auth:yd,AuthCredential:en,Error:b.kx}).setInstantiationMode("LAZY").setMultipleInstances(!1)),M.registerVersion("@firebase/auth-compat","0.5.4")}(v.c)},20872:(B,G,a)=>{"use strict";a(25718)},5082:(B,G,a)=>{"use strict";a.d(G,{S8:()=>ae,qo:()=>Ve});var i=a(32116),v=a(91368),b=a(83120);function _(Ne,Ie){if(1&Ne&&(i.S2Z(),i.I0R(0,"linearGradient"),i.wR5(1,"stop",5)(2,"stop",6),i.C$Y()),2&Ne){const H=i.GaO(2);i.e48("id",H.svg.outerLinearGradient.id),i.yG2(),i.e48("stop-color",H.svg.outerLinearGradient.colorStop1)("stop-opacity",1),i.yG2(),i.e48("stop-color",H.svg.outerLinearGradient.colorStop2)("stop-opacity",1)}}function C(Ne,Ie){if(1&Ne&&(i.S2Z(),i.I0R(0,"radialGradient"),i.wR5(1,"stop",5)(2,"stop",6),i.C$Y()),2&Ne){const H=i.GaO(2);i.e48("id",H.svg.radialGradient.id),i.yG2(),i.e48("stop-color",H.svg.radialGradient.colorStop1)("stop-opacity",1),i.yG2(),i.e48("stop-color",H.svg.radialGradient.colorStop2)("stop-opacity",1)}}function P(Ne,Ie){if(1&Ne&&(i.S2Z(),i.wR5(0,"circle")),2&Ne){const H=i.GaO(3);i.e48("cx",H.svg.backgroundCircle.cx)("cy",H.svg.backgroundCircle.cy)("r",H.svg.backgroundCircle.r)("fill",H.svg.backgroundCircle.fill)("fill-opacity",H.svg.backgroundCircle.fillOpacity)("stroke",H.svg.backgroundCircle.stroke)("stroke-width",H.svg.backgroundCircle.strokeWidth)}}function S(Ne,Ie){if(1&Ne&&(i.S2Z(),i.wR5(0,"circle")),2&Ne){const H=i.GaO(3);i.qJJ("fill","url(",H.window.location.href,"#",H.svg.radialGradient.id,")"),i.e48("cx",H.svg.backgroundCircle.cx)("cy",H.svg.backgroundCircle.cy)("r",H.svg.backgroundCircle.r)("fill-opacity",H.svg.backgroundCircle.fillOpacity)("stroke",H.svg.backgroundCircle.stroke)("stroke-width",H.svg.backgroundCircle.strokeWidth)}}function R(Ne,Ie){if(1&Ne&&(i.S2Z(),i.SAx(0),i.yuY(1,P,1,7,"circle",2)(2,S,1,8,"circle",2),i.k70()),2&Ne){const H=i.GaO(2);i.yG2(),i.E7m("ngIf",!H.options.backgroundGradient),i.yG2(),i.E7m("ngIf",H.options.backgroundGradient)}}function k(Ne,Ie){if(1&Ne&&(i.S2Z(),i.wR5(0,"circle")),2&Ne){const H=i.GaO(2);i.e48("cx",H.svg.circle.cx)("cy",H.svg.circle.cy)("r",H.svg.circle.r)("fill",H.svg.circle.fill)("stroke",H.svg.circle.stroke)("stroke-width",H.svg.circle.strokeWidth)}}function x(Ne,Ie){if(1&Ne&&(i.S2Z(),i.wR5(0,"path")),2&Ne){const H=i.GaO(3);i.e48("d",H.svg.path.d)("stroke",H.svg.path.stroke)("stroke-width",H.svg.path.strokeWidth)("stroke-linecap",H.svg.path.strokeLinecap)("fill",H.svg.path.fill)}}function D(Ne,Ie){if(1&Ne&&(i.S2Z(),i.wR5(0,"path")),2&Ne){const H=i.GaO(3);i.qJJ("stroke","url(",H.window.location.href,"#",H.svg.outerLinearGradient.id,")"),i.e48("d",H.svg.path.d)("stroke-width",H.svg.path.strokeWidth)("stroke-linecap",H.svg.path.strokeLinecap)("fill",H.svg.path.fill)}}function ee(Ne,Ie){if(1&Ne&&(i.S2Z(),i.SAx(0),i.yuY(1,x,1,5,"path",2)(2,D,1,6,"path",2),i.k70()),2&Ne){const H=i.GaO(2);i.yG2(),i.E7m("ngIf",!H.options.outerStrokeGradient),i.yG2(),i.E7m("ngIf",H.options.outerStrokeGradient)}}function te(Ne,Ie){if(1&Ne&&(i.S2Z(),i.I0R(0,"tspan"),i.OEk(1),i.C$Y()),2&Ne){const H=Ie.$implicit,j=i.GaO(4);i.e48("x",j.svg.title.x)("y",j.svg.title.y)("dy",H.dy)("font-size",j.svg.title.fontSize)("font-weight",j.svg.title.fontWeight)("fill",j.svg.title.color),i.yG2(),i.cNF(H.span)}}function J(Ne,Ie){if(1&Ne&&(i.S2Z(),i.SAx(0),i.yuY(1,te,2,7,"tspan",8),i.k70()),2&Ne){const H=i.GaO(3);i.yG2(),i.E7m("ngForOf",H.svg.title.tspans)}}function Q(Ne,Ie){if(1&Ne&&(i.S2Z(),i.I0R(0,"tspan"),i.OEk(1),i.C$Y()),2&Ne){const H=i.GaO(3);i.e48("font-size",H.svg.units.fontSize)("font-weight",H.svg.units.fontWeight)("fill",H.svg.units.color),i.yG2(),i.cNF(H.svg.units.text)}}function we(Ne,Ie){if(1&Ne&&(i.S2Z(),i.I0R(0,"tspan"),i.OEk(1),i.C$Y()),2&Ne){const H=Ie.$implicit,j=i.GaO(4);
1i.e48("x",j.svg.subtitle.x)("y",j.svg.subtitle.y)("dy",H.dy)("font-size",j.svg.subtitle.fontSize)("font-weight",j.svg.subtitle.fontWeight)("fill",j.svg.subtitle.color),i.yG2(),i.cNF(H.span)}}function de(Ne,Ie){if(1&Ne&&(i.S2Z(),i.SAx(0),i.yuY(1,we,2,7,"tspan",8),i.k70()),2&Ne){const H=i.GaO(3);i.yG2(),i.E7m("ngForOf",H.svg.subtitle.tspans)}}function Y(Ne,Ie){if(1&Ne&&(i.S2Z(),i.I0R(0,"text",7),i.yuY(1,J,2,1,"ng-container",2)(2,Q,2,4,"tspan",2)(3,de,2,1,"ng-container",2),i.C$Y()),2&Ne){const H=i.GaO(2);i.e48("x",H.svg.circle.cx)("y",H.svg.circle.cy)("text-anchor",H.svg.title.textAnchor),i.yG2(),i.E7m("ngIf",H.options.showTitle),i.yG2(),i.E7m("ngIf",H.options.showUnits),i.yG2(),i.E7m("ngIf",H.options.showSubtitle)}}function Se(Ne,Ie){if(1&Ne&&(i.S2Z(),i.wR5(0,"image",9)),2&Ne){const H=i.GaO(2);i.e48("height",H.svg.image.height)("width",H.svg.image.width)("href",H.svg.image.src,null,"xlink")("x",H.svg.image.x)("y",H.svg.image.y)}}function Ye(Ne,Ie){if(1&Ne){const H=i.KQA();i.S2Z(),i.I0R(0,"svg",1),i.qCj("click",function(ye){i.usT(H);const Le=i.GaO();return i.CGJ(Le.emitClickEvent(ye))}),i.I0R(1,"defs"),i.yuY(2,_,3,5,"linearGradient",2)(3,C,3,5,"radialGradient",2),i.C$Y(),i.yuY(4,R,3,2,"ng-container",2)(5,k,1,6,"circle",2)(6,ee,3,2,"ng-container",2)(7,Y,4,6,"text",3)(8,Se,1,5,"image",4),i.C$Y()}if(2&Ne){const H=i.GaO();i.e48("viewBox",H.svg.viewBox)("height",H.svg.height)("width",H.svg.width)("class",H.options.class),i.yG2(2),i.E7m("ngIf",H.options.outerStrokeGradient),i.yG2(),i.E7m("ngIf",H.options.backgroundGradient),i.yG2(),i.E7m("ngIf",H.options.showBackground),i.yG2(),i.E7m("ngIf",H.options.showInnerStroke),i.yG2(),i.E7m("ngIf",0!=+H.options.percent||H.options.showZeroOuterStroke),i.yG2(),i.E7m("ngIf",!H.options.showImage&&(H.options.showTitle||H.options.showUnits||H.options.showSubtitle)),i.yG2(),i.E7m("ngIf",H.options.showImage)}}class pe{constructor(){this.class="",this.backgroundGradient=!1,this.backgroundColor="transparent",this.backgroundGradientStopColor="transparent",this.backgroundOpacity=1,this.backgroundStroke="transparent",this.backgroundStrokeWidth=0,this.backgroundPadding=5,this.percent=0,this.radius=90,this.space=4,this.toFixed=0,this.maxPercent=1e3,this.renderOnClick=!0,this.units="%",this.unitsFontSize="10",this.unitsFontWeight="normal",this.unitsColor="#444444",this.outerStrokeGradient=!1,this.outerStrokeWidth=8,this.outerStrokeColor="#78C000",this.outerStrokeGradientStopColor="transparent",this.outerStrokeLinecap="round",this.innerStrokeColor="#C7E596",this.innerStrokeWidth=4,this.titleFormat=void 0,this.title="auto",this.titleColor="#444444",this.titleFontSize="20",this.titleFontWeight="normal",this.subtitleFormat=void 0,this.subtitle="progress",this.subtitleColor="#A9A9A9",this.subtitleFontSize="10",this.subtitleFontWeight="normal",this.imageSrc=void 0,this.imageHeight=0,this.imageWidth=0,this.animation=!0,this.animateTitle=!0,this.animateSubtitle=!1,this.animationDuration=500,this.showTitle=!0,this.showSubtitle=!0,this.showUnits=!0,this.showImage=!1,this.showBackground=!0,this.showInnerStroke=!0,this.clockwise=!0,this.responsive=!1,this.startFromZero=!0,this.showZeroOuterStroke=!0,this.lazy=!1}}let ae=(()=>{class Ne{constructor(H,j,ye,Le){this.ngZone=j,this.elRef=ye,this.onClick=new i._w7,this.svgElement=null,this.isInViewport=!1,this.onViewportChanged=new i._w7,this._viewportChangedSubscriber=null,this.options=new pe,this.defaultOptions=new pe,this._lastPercent=0,this._gradientUUID=null,this.render=()=>{this.applyOptions(),this.options.lazy?(null===this.svgElement&&this.draw(this._lastPercent),this.isInViewport&&(this.options.animation&&this.options.animationDuration>0?this.animate(this._lastPercent,this.options.percent):this.draw(this.options.percent),this._lastPercent=this.options.percent)):(this.options.animation&&this.options.animationDuration>0?this.animate(this._lastPercent,this.options.percent):this.draw(this.options.percent),this._lastPercent=this.options.percent)},this.polarToCartesian=(W,We,At,Ut)=>{let it=Ut*Math.PI/180;return{x:W+Math.sin(it)*At,y:We-Math.cos(it)*At}},this.draw=W=>{let We=(W=void 0===W?this.options.percent:Math.abs(W))>100?100:W,At=2*this.options.radius+2*this.options.outerStrokeWidth;
1this.options.showBackground&&(At+=2*this.options.backgroundStrokeWidth+this.max(0,2*this.options.backgroundPadding));let se,ce,Ut={x:At/2,y:At/2},it_x=Ut.x,it_y=Ut.y-this.options.radius,ue=this.polarToCartesian(Ut.x,Ut.y,this.options.radius,360*(this.options.clockwise?We:100-We)/100);100===We&&(ue.x=ue.x+(this.options.clockwise?-.01:.01)),[se,ce]=We>50?this.options.clockwise?[1,1]:[1,0]:this.options.clockwise?[0,1]:[0,0];let K=this.options.animateTitle?W:this.options.percent,_e=K>this.options.maxPercent?`${this.options.maxPercent.toFixed(this.options.toFixed)}+`:K.toFixed(this.options.toFixed),Pe=this.options.animateSubtitle?W:this.options.percent,De={x:Ut.x,y:Ut.y,textAnchor:"middle",color:this.options.titleColor,fontSize:this.options.titleFontSize,fontWeight:this.options.titleFontWeight,texts:[],tspans:[]};if(void 0!==this.options.titleFormat&&"Function"===this.options.titleFormat.constructor.name){let ge=this.options.titleFormat(K);ge instanceof Array?De.texts=[...ge]:De.texts.push(ge.toString())}else"auto"===this.options.title?De.texts.push(_e):this.options.title instanceof Array?De.texts=[...this.options.title]:De.texts.push(this.options.title.toString());let ke={x:Ut.x,y:Ut.y,textAnchor:"middle",color:this.options.subtitleColor,fontSize:this.options.subtitleFontSize,fontWeight:this.options.subtitleFontWeight,texts:[],tspans:[]};if(void 0!==this.options.subtitleFormat&&"Function"===this.options.subtitleFormat.constructor.name){let ge=this.options.subtitleFormat(Pe);ge instanceof Array?ke.texts=[...ge]:ke.texts.push(ge.toString())}else this.options.subtitle instanceof Array?ke.texts=[...this.options.subtitle]:ke.texts.push(this.options.subtitle.toString());let Lt={text:`${this.options.units}`,fontSize:this.options.unitsFontSize,fontWeight:this.options.unitsFontWeight,color:this.options.unitsColor},Dt=0,He=1;if(this.options.showTitle&&(Dt+=De.texts.length),this.options.showSubtitle&&(Dt+=ke.texts.length),this.options.showTitle)for(let ge of De.texts)De.tspans.push({span:ge,dy:this.getRelativeY(He,Dt)}),He++;if(this.options.showSubtitle)for(let ge of ke.texts)ke.tspans.push({span:ge,dy:this.getRelativeY(He,Dt)}),He++;null===this._gradientUUID&&(this._gradientUUID=this.uuid()),this.svg={viewBox:`0 0 ${At} ${At}`,width:this.options.responsive?"100%":At,height:this.options.responsive?"100%":At,backgroundCircle:{cx:Ut.x,cy:Ut.y,r:this.options.radius+this.options.outerStrokeWidth/2+this.options.backgroundPadding,fill:this.options.backgroundColor,fillOpacity:this.options.backgroundOpacity,stroke:this.options.backgroundStroke,strokeWidth:this.options.backgroundStrokeWidth},path:{d:`M ${it_x} ${it_y}\n A ${this.options.radius} ${this.options.radius} 0 ${se} ${ce} ${ue.x} ${ue.y}`,stroke:this.options.outerStrokeColor,strokeWidth:this.options.outerStrokeWidth,strokeLinecap:this.options.outerStrokeLinecap,fill:"none"},circle:{cx:Ut.x,cy:Ut.y,r:this.options.radius-this.options.space-this.options.outerStrokeWidth/2-this.options.innerStrokeWidth/2,fill:"none",stroke:this.options.innerStrokeColor,strokeWidth:this.options.innerStrokeWidth},title:De,units:Lt,subtitle:ke,image:{x:Ut.x-this.options.imageWidth/2,y:Ut.y-this.options.imageHeight/2,src:this.options.imageSrc,width:this.options.imageWidth,height:this.options.imageHeight},outerLinearGradient:{id:"outer-linear-"+this._gradientUUID,colorStop1:this.options.outerStrokeColor,colorStop2:"transparent"===this.options.outerStrokeGradientStopColor?"#FFF":this.options.outerStrokeGradientStopColor},radialGradient:{id:"radial-"+this._gradientUUID,colorStop1:this.options.backgroundColor,colorStop2:"transparent"===this.options.backgroundGradientStopColor?"#FFF":this.options.backgroundGradientStopColor}}},this.getAnimationParameters=(W,We)=>{let Ut,it,ue,se=this.options.startFromZero||W<0?0:W,ce=We<0?0:this.min(We,this.options.maxPercent),K=Math.abs(Math.round(ce-se));return K>=100?(Ut=100,it=this.options.animateTitle||this.options.animateSubtitle?Math.round(K/Ut):1):(Ut=K,it=1),ue=Math.round(this.options.animationDuration/Ut),ue<10&&(ue=10,Ut=this.options.animationDuration/ue,it=!this.options.animateTitle&&!this.options.animateSubtitle&&K>100?Math.round(100/Ut):Math.round(K/Ut)),it<1&&(it=1),{times:Ut,step:it,interval:ue}},this.animate=(W,We)=>{this._timerSubscription&&!this._timerSubscription.closed&&this._timerSubscription.unsubscribe();let At=this.options.startFromZero?0:W,Ut=We,{step:it,interval:ue}=this.getAnimationParameters(At,Ut),se=At;this._timerSubscription=At<Ut?(0,b.k)(0,ue).subscribe(()=>{se+=it,se<=Ut?!this.options.animateTitle&&!this.options.animateSubtitle&&se>=100?(this.draw(Ut),this._timerSubscription.unsubscribe()):this.draw(se):(this.draw(Ut),this._timerSubscription.unsubscribe())}):(0,b.k)(0,ue).subscribe(()=>{se-=it,se>=Ut?!this.options.animateTitle&&!this.options.animateSubtitle&&Ut>=100?(this.draw(Ut),this._timerSubscription.unsubscribe()):this.draw(se):(this.draw(Ut),this._timerSubscription.unsubscribe())})},this.applyOptions=()=>{for(let W of Object.keys(this.options))this.hasOwnProperty(W)&&void 0!==this[W]?this.options[W]=this[W]:this.templateOptions&&void 0!==this.templateOptions[W]&&(this.options[W]=this.templateOptions[W]);this.options.radius=Math.abs(+this.options.radius),this.options.space=+this.options.space,this.options.percent=+this.options.percent>0?+this.options.percent:0,this.options.maxPercent=Math.abs(+this.options.maxPercent),this.options.animationDuration=Math.abs(this.options.animationDuration),this.options.outerStrokeWidth=Math.abs(+this.options.outerStrokeWidth),this.options.innerStrokeWidth=Math.abs(+this.options.innerStrokeWidth),this.options.backgroundPadding=+this.options.backgroundPadding},this.getRelativeY=(W,We)=>(1*(W-We/2)-.18).toFixed(2)+"em",this.min=(W,We)=>W<We?W:We,this.max=(W,We)=>W>We?W:We,this.uuid=()=>{var W=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(At){var Ut=(W+16*Math.random())%16|0;return W=Math.floor(W/16),("x"==At?Ut:3&Ut|8).toString(16)})},this.checkViewport=()=>{this.findSvgElement();let W=this.isInViewport;this.isInViewport=this.isElementInViewport(this.svgElement),W!==this.isInViewport&&this.onViewportChanged.observers.length>0&&this.ngZone.run(()=>{this.onViewportChanged.emit({oldValue:W,newValue:this.isInViewport})})},this.onScroll=W=>{this.checkViewport()},this.loadEventsForLazyMode=()=>{if(this.options.lazy){this.ngZone.runOutsideAngular(()=>{this.document.addEventListener("scroll",this.onScroll,!0),this.window.addEventListener("resize",this.onScroll,!0)}),null===this._viewportChangedSubscriber&&(this._viewportChangedSubscriber=this.onViewportChanged.subscribe(({newValue:At})=>{At&&this.render()}));let W=(0,b.k)(0,50).subscribe(()=>{null===this.svgElement?this.checkViewport():W.unsubscribe()})}},this.unloadEventsForLazyMode=()=>{this.document.removeEventListener("scroll",this.onScroll,!0),this.window.removeEventListener("resize",this.onScroll,!0),null!==this._viewportChangedSubscriber&&(this._viewportChangedSubscriber.unsubscribe(),this._viewportChangedSubscriber=null)},this.document=Le.get(v.Ud),this.window=this.document.defaultView,Object.assign(this.options,H),Object.assign(this.defaultOptions,H)}emitClickEvent(H){this.options.renderOnClick&&this.animate(0,this.options.percent),this.onClick.observers.length>0&&this.onClick.emit(H)}isDrawing(){return this._timerSubscription&&!this._timerSubscription.closed}findSvgElement(){if(null===this.svgElement){let H=this.elRef.nativeElement.getElementsByTagName("svg");H.length>0&&(this.svgElement=H[0])}}isElementInViewport(H){if(null==H)return!1;let Le,j=H.getBoundingClientRect(),ye=H.parentNode;do{if(Le=ye.getBoundingClientRect(),j.top>=Le.bottom||j.bottom<=Le.top||j.left>=Le.right||j.right<=Le.left)return!1;ye=ye.parentNode}while(ye!=this.document.body);return!(j.top>=(this.window.innerHeight||this.document.documentElement.clientHeight)||j.bottom<=0||j.left>=(this.window.innerWidth||this.document.documentElement.clientWidth)||j.right<=0)}ngOnInit(){this.loadEventsForLazyMode()}ngOnDestroy(){this.unloadEventsForLazyMode()}ngOnChanges(H){this.render(),"lazy"in H&&(H.lazy.currentValue?this.loadEventsForLazyMode():this.unloadEventsForLazyMode())}}return Ne.\u0275fac=function(H){return new(H||Ne)(i.GI1(pe),i.GI1(i.WW2),i.GI1(i.GMv),i.GI1(i.zZn))},Ne.\u0275cmp=i.In1({type:Ne,selectors:[["circle-progress"]],inputs:{name:"name",class:"class",backgroundGradient:"backgroundGradient",backgroundColor:"backgroundColor",backgroundGradientStopColor:"backgroundGradientStopColor",backgroundOpacity:"backgroundOpacity",backgroundStroke:"backgroundStroke",backgroundStrokeWidth:"backgroundStrokeWidth",backgroundPadding:"backgroundPadding",radius:"radius",space:"space",percent:"percent",toFixed:"toFixed",maxPercent:"maxPercent",renderOnClick:"renderOnClick",units:"units",unitsFontSize:"unitsFontSize",unitsFontWeight:"unitsFontWeight",unitsColor:"unitsColor",outerStrokeGradient:"outerStrokeGradient",outerStrokeWidth:"outerStrokeWidth",outerStrokeColor:"outerStrokeColor",outerStrokeGradientStopColor:"outerStrokeGradientStopColor",outerStrokeLinecap:"outerStrokeLinecap",innerStrokeColor:"innerStrokeColor",innerStrokeWidth:"innerStrokeWidth",titleFormat:"titleFormat",title:"title",titleColor:"titleColor",titleFontSize:"titleFontSize",titleFontWeight:"titleFontWeight",subt
1itleFormat:"subtitleFormat",subtitle:"subtitle",subtitleColor:"subtitleColor",subtitleFontSize:"subtitleFontSize",subtitleFontWeight:"subtitleFontWeight",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",animation:"animation",animateTitle:"animateTitle",animateSubtitle:"animateSubtitle",animationDuration:"animationDuration",showTitle:"showTitle",showSubtitle:"showSubtitle",showUnits:"showUnits",showImage:"showImage",showBackground:"showBackground",showInnerStroke:"showInnerStroke",clockwise:"clockwise",responsive:"responsive",startFromZero:"startFromZero",showZeroOuterStroke:"showZeroOuterStroke",lazy:"lazy",templateOptions:[i.Wk5.None,"options","templateOptions"]},outputs:{onClick:"onClick"},features:[i.SYr],decls:1,vars:1,consts:[["xmlns","http://www.w3.org/2000/svg","preserveAspectRatio","xMidYMid meet",3,"click",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","preserveAspectRatio","xMidYMid meet",3,"click"],[4,"ngIf"],["alignment-baseline","baseline",4,"ngIf"],["preserveAspectRatio","none",4,"ngIf"],["offset","5%"],["offset","95%"],["alignment-baseline","baseline"],[4,"ngFor","ngForOf"],["preserveAspectRatio","none"]],template:function(H,j){1&H&&i.yuY(0,Ye,9,11,"svg",0),2&H&&i.E7m("ngIf",j.svg)},dependencies:[v.ay,v.u_],encapsulation:2}),Ne})(),Ve=(()=>{class Ne{static forRoot(H={}){return{ngModule:Ne,providers:[{provide:pe,useValue:H}]}}}return Ne.\u0275fac=function(H){return new(H||Ne)},Ne.\u0275mod=i.a4G({type:Ne}),Ne.\u0275inj=i.s3X({imports:[v.MD]}),Ne})()},81316:(B,G,a)=>{"use strict";a.d(G,{C3:()=>b,KE:()=>te,Mt:()=>Ye,U1:()=>pe,UN:()=>C,ct:()=>v,kH:()=>ee,mA:()=>Ne,o7:()=>ae,sX:()=>_});var i=function(se,ce){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,_e){K.__proto__=_e}||function(K,_e){for(var Pe in _e)Object.prototype.hasOwnProperty.call(_e,Pe)&&(K[Pe]=_e[Pe])})(se,ce)};function v(se,ce){if("function"!=typeof ce&&null!==ce)throw new TypeError("Class extends value "+String(ce)+" is not a constructor or null");function K(){this.constructor=se}i(se,ce),se.prototype=null===ce?Object.create(ce):(K.prototype=ce.prototype,new K)}var b=function(){return b=Object.assign||function(ce){for(var K,_e=1,Pe=arguments.length;_e<Pe;_e++)for(var De in K=arguments[_e])Object.prototype.hasOwnProperty.call(K,De)&&(ce[De]=K[De]);return ce},b.apply(this,arguments)};function _(se,ce){var K={};for(var _e in se)Object.prototype.hasOwnProperty.call(se,_e)&&ce.indexOf(_e)<0&&(K[_e]=se[_e]);if(null!=se&&"function"==typeof Object.getOwnPropertySymbols){var Pe=0;for(_e=Object.getOwnPropertySymbols(se);Pe<_e.length;Pe++)ce.indexOf(_e[Pe])<0&&Object.prototype.propertyIsEnumerable.call(se,_e[Pe])&&(K[_e[Pe]]=se[_e[Pe]])}return K}function C(se,ce,K,_e){var ke,Pe=arguments.length,De=Pe<3?ce:null===_e?_e=Object.getOwnPropertyDescriptor(ce,K):_e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)De=Reflect.decorate(se,ce,K,_e);else for(var Lt=se.length-1;Lt>=0;Lt--)(ke=se[Lt])&&(De=(Pe<3?ke(De):Pe>3?ke(ce,K,De):ke(ce,K))||De);return Pe>3&&De&&Object.defineProperty(ce,K,De),De}function ee(se,ce,K,_e){return new(K||(K=Promise))(function(De,ke){function Lt(ge){try{He(_e.next(ge))}catch(xt){ke(xt)}}function Dt(ge){try{He(_e.throw(ge))}catch(xt){ke(xt)}}function He(ge){ge.done?De(ge.value):function Pe(De){return De instanceof K?De:new K(function(ke){ke(De)})}(ge.value).then(Lt,Dt)}He((_e=_e.apply(se,ce||[])).next())})}function te(se,ce){var _e,Pe,De,ke,K={label:0,sent:function(){if(1&De[0])throw De[1];return De[1]},trys:[],ops:[]};return ke={next:Lt(0),throw:Lt(1),return:Lt(2)},"function"==typeof Symbol&&(ke[Symbol.iterator]=function(){return this}),ke;function Lt(He){return function(ge){return function Dt(He){if(_e)throw new TypeError("Generator is already executing.");for(;ke&&(ke=0,He[0]&&(K=0)),K;)try{if(_e=1,Pe&&(De=2&He[0]?Pe.return:He[0]?Pe.throw||((De=Pe.return)&&De.call(Pe),0):Pe.next)&&!(De=De.call(Pe,He[1])).done)return De;switch(Pe=0,De&&(He=[2&He[0],De.value]),He[0]){case 0:case 1:De=He;break;case 4:return K.label++,{value:He[1],done:!1};case 5:K.label++,Pe=He[1],He=[0];continue;case 7:He=K.ops.pop(),K.trys.pop();continue;default:if(!(De=(De=K.trys).length>0&&De[De.length-1])&&(6===He[0]||2===He[0])){K=0;continue}if(3===He[0]&&(!De||He[1]>De[0]&&He[1]<De[3])){K.label=He[1];break}if(6===He[0]&&K.label<De[1]){K.label=De[1],De=He;break}if(De&&K.label<De[2]){K.label=De[2],K.ops.push(He);break}De[2]&&K.ops.pop(),K.trys.pop();continue}He=ce.call(se,K)}catch(ge){He=[6,ge],Pe=0}finally{_e=De=0}if(5&He[0])throw He[1];return{value:He[0]?He[1]:void 0,done:!0}}([He,ge])}}}function Ye(se,ce,K){if(K||2===arguments.length)for(var De,_e=0,Pe=ce.length;_e<Pe;_e++)(De||!(_e in ce))&&(De||(De=Array.prototype.slice.call(ce,0,_e)),De[_e]=ce[_e]);return se.concat(De||Array.prototype.slice.call(ce))}
vendor: 1,584 bytes, line 1
1function pe(se){return this instanceof pe?(this.v=se,this):new pe(se)}function ae(se,ce,K){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Pe,_e=K.apply(se,ce||[]),De=[];return Pe={},ke("next"),ke("throw"),ke("return"),Pe[Symbol.asyncIterator]=function(){return this},Pe;function ke(pt){_e[pt]&&(Pe[pt]=function(rn){return new Promise(function(cn,mn){De.push([pt,rn,cn,mn])>1||Lt(pt,rn)})})}function Lt(pt,rn){try{!function Dt(pt){pt.value instanceof pe?Promise.resolve(pt.value.v).then(He,ge):xt(De[0][2],pt)}(_e[pt](rn))}catch(cn){xt(De[0][3],cn)}}function He(pt){Lt("next",pt)}function ge(pt){Lt("throw",pt)}function xt(pt,rn){pt(rn),De.shift(),De.length&&Lt(De[0][0],De[0][1])}}function Ne(se){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var K,ce=se[Symbol.asyncIterator];return ce?ce.call(se):(se=function we(se){var ce="function"==typeof Symbol&&Symbol.iterator,K=ce&&se[ce],_e=0;if(K)return K.call(se);if(se&&"number"==typeof se.length)return{next:function(){return se&&_e>=se.length&&(se=void 0),{value:se&&se[_e++],done:!se}}};throw new TypeError(ce?"Object is not iterable.":"Symbol.iterator is not defined.")}(se),K={},_e("next"),_e("throw"),_e("return"),K[Symbol.asyncIterator]=function(){return this},K);function _e(De){K[De]=se[De]&&function(ke){return new Promise(function(Lt,Dt){!function Pe(De,ke,Lt,Dt){Promise.resolve(Dt).then(function(He){De({value:He,done:Lt})},ke)}(Lt,Dt,(ke=se[De](ke)).done,ke.value)})}}}"function"==typeof SuppressedError&&SuppressedError}},B=>{B(B.s=8440)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.