UNPKG

firebase

Version:

Firebase JavaScript library for web and Node.js

1 lines • 434 kB
import{_registerComponent as e,registerVersion as t,_getProvider,getApp as n,_removeServiceInstance as i,SDK_VERSION as s}from"https://www.gstatic.com/firebasejs/10.7.0/firebase-app.js";const stringToByteArray$1=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=63&s|128):55296==(64512&s)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=63&s|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=63&s|128)}return t},o={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let t=0;t<e.length;t+=3){const s=e[t],o=t+1<e.length,u=o?e[t+1]:0,l=t+2<e.length,_=l?e[t+2]:0,h=s>>2,d=(3&s)<<4|u>>4;let m=(15&u)<<2|_>>6,f=63&_;l||(f=64,o||(m=64)),i.push(n[h],n[d],n[m],n[f])}return i.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(stringToByteArray$1(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,i=0;for(;n<e.length;){const s=e[n++];if(s<128)t[i++]=String.fromCharCode(s);else if(s>191&&s<224){const o=e[n++];t[i++]=String.fromCharCode((31&s)<<6|63&o)}else if(s>239&&s<365){const o=((7&s)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[i++]=String.fromCharCode(55296+(o>>10)),t[i++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],u=e[n++];t[i++]=String.fromCharCode((15&s)<<12|(63&o)<<6|63&u)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let t=0;t<e.length;){const s=n[e.charAt(t++)],o=t<e.length?n[e.charAt(t)]:0;++t;const u=t<e.length?n[e.charAt(t)]:64;++t;const l=t<e.length?n[e.charAt(t)]:64;if(++t,null==s||null==o||null==u||null==l)throw new DecodeBase64StringError;const _=s<<2|o>>4;if(i.push(_),64!==u){const e=o<<4&240|u>>2;if(i.push(e),64!==l){const e=u<<6&192|l;i.push(e)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class DecodeBase64StringError extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const base64urlEncodeWithoutPadding=function(e){return function(e){const t=stringToByteArray$1(e);return o.encodeByteArray(t,!0)}(e).replace(/\./g,"")};const getDefaultsFromGlobal=()=>function getGlobal(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,getDefaultsFromCookie=()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&function(e){try{return o.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}(e[1]);return t&&JSON.parse(t)},getDefaults=()=>{try{return getDefaultsFromGlobal()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||getDefaultsFromCookie()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},getDefaultEmulatorHostnameAndPort=e=>{const t=(e=>{var t,n;return null===(n=null===(t=getDefaults())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]})(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const i=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),i]:[t.substring(0,n),i]};function getUA(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function isSafari(){return!function isNode(){var e;const t=null===(e=getDefaults())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}class FirebaseError extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,FirebaseError.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ErrorFactory.prototype.create)}}class ErrorFactory{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?function replaceTemplate(e,t){return e.replace(u,((e,n)=>{const i=t[n];return null!=i?String(i):`<${n}?>`}))}(s,n):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new FirebaseError(i,l,n)}}const u=/\{\$([^}]+)}/g;function deepEqual(e,t){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);for(const s of n){if(!i.includes(s))return!1;const n=e[s],o=t[s];if(isObject(n)&&isObject(o)){if(!deepEqual(n,o))return!1}else if(n!==o)return!1}for(const e of i)if(!n.includes(e))return!1;return!0}function isObject(e){return null!==e&&"object"==typeof e}function getModularInstance(e){return e&&e._delegate?e._delegate:e}class Component{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}var l;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(l||(l={}));const _={debug:l.DEBUG,verbose:l.VERBOSE,info:l.INFO,warn:l.WARN,error:l.ERROR,silent:l.SILENT},h=l.INFO,d={[l.DEBUG]:"log",[l.VERBOSE]:"log",[l.INFO]:"info",[l.WARN]:"warn",[l.ERROR]:"error"},defaultLogHandler=(e,t,...n)=>{if(t<e.logLevel)return;const i=(new Date).toISOString(),s=d[t];if(!s)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[s](`[${i}] ${e.name}:`,...n)};var m,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},g=g||{},E=f||self;function aa(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function p(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var V="closure_uid_"+(1e9*Math.random()>>>0),b=0;function ea(e,t,n){return e.call.apply(e.bind,arguments)}function fa(e,t,n){if(!e)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,i),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function q$1(e,t,n){return(q$1=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ea:fa).apply(null,arguments)}function ha(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function r(e,t){function c(){}c.prototype=t.prototype,e.$=t.prototype,e.prototype=new c,e.prototype.constructor=e,e.ac=function(e,n,i){for(var s=Array(arguments.length-2),o=2;o<arguments.length;o++)s[o-2]=arguments[o];return t.prototype[n].apply(e,s)}}function v$1(){this.s=this.s,this.o=this.o}v$1.prototype.s=!1,v$1.prototype.sa=function(){!this.s&&(this.s=!0,this.N(),0)&&function ba(e){return Object.prototype.hasOwnProperty.call(e,V)&&e[V]||(e[V]=++b)}(this)},v$1.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const S=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1};function ma(e){const t=e.length;if(0<t){const n=Array(t);for(let i=0;i<t;i++)n[i]=e[i];return n}return[]}function na(e,t){for(let t=1;t<arguments.length;t++){const n=arguments[t];if(aa(n)){const t=e.length||0,i=n.length||0;e.length=t+i;for(let s=0;s<i;s++)e[t+s]=n[s]}else e.push(n)}}function w$1(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}w$1.prototype.h=function(){this.defaultPrevented=!0};var v=function(){if(!E.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{const c=()=>{};E.addEventListener("test",c,t),E.removeEventListener("test",c,t)}catch(e){}return e}();function x$1(e){return/^[\s\xa0]*$/.test(e)}function pa(){var e=E.navigator;return e&&(e=e.userAgent)?e:""}function y(e){return-1!=pa().indexOf(e)}function qa(e){return qa[" "](e),e}qa[" "]=function(){};var w,D,C,F=y("Opera"),x=y("Trident")||y("MSIE"),M=y("Edge"),N=M||x,k=y("Gecko")&&!(-1!=pa().toLowerCase().indexOf("webkit")&&!y("Edge"))&&!(y("Trident")||y("MSIE"))&&!y("Edge"),O=-1!=pa().toLowerCase().indexOf("webkit")&&!y("Edge");function ya(){var e=E.document;return e?e.documentMode:void 0}e:{var L="",B=(D=pa(),k?/rv:([^\);]+)(\)|;)/.exec(D):M?/Edge\/([\d\.]+)/.exec(D):x?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(D):O?/WebKit\/(\S+)/.exec(D):F?/(?:Version)[ \/]?(\S+)/.exec(D):void 0);if(B&&(L=B?B[1]:""),x){var q=ya();if(null!=q&&q>parseFloat(L)){w=String(q);break e}}w=L}if(E.document&&x){var $=ya();C=$||(parseInt(w,10)||void 0)}else C=void 0;var U=C;function A(e,t){if(w$1.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,i=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(k){e:{try{qa(t.nodeName);var s=!0;break e}catch(e){}s=!1}s||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,i?(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:K[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&A.$.h.call(this)}}r(A,w$1);var K={2:"touch",3:"pen",4:"mouse"};A.prototype.h=function(){A.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var Q="closure_listenable_"+(1e6*Math.random()|0),G=0;function Ja(e,t,n,i,s){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!i,this.la=s,this.key=++G,this.fa=this.ia=!1}function Ma(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function Na(e,t,n){for(const i in e)t.call(n,e[i],i,e)}function Pa(e){const t={};for(const n in e)t[n]=e[n];return t}const z="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ra(e,t){let n,i;for(let t=1;t<arguments.length;t++){for(n in i=arguments[t],i)e[n]=i[n];for(let t=0;t<z.length;t++)n=z[t],Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}}function Sa(e){this.src=e,this.g={},this.h=0}function Ua(e,t){var n=t.type;if(n in e.g){var i,s=e.g[n],o=S(s,t);(i=0<=o)&&Array.prototype.splice.call(s,o,1),i&&(Ma(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function Ta(e,t,n,i){for(var s=0;s<e.length;++s){var o=e[s];if(!o.fa&&o.listener==t&&o.capture==!!n&&o.la==i)return s}return-1}Sa.prototype.add=function(e,t,n,i,s){var o=e.toString();(e=this.g[o])||(e=this.g[o]=[],this.h++);var u=Ta(e,t,i,s);return-1<u?(t=e[u],n||(t.ia=!1)):((t=new Ja(t,this.src,o,!!i,s)).ia=n,e.push(t)),t};var W="closure_lm_"+(1e6*Math.random()|0),j={};function Ya(e,t,n,i,s){if(i&&i.once)return Za(e,t,n,i,s);if(Array.isArray(t)){for(var o=0;o<t.length;o++)Ya(e,t[o],n,i,s);return null}return n=$a(n),e&&e[Q]?e.O(t,n,p(i)?!!i.capture:!!i,s):ab(e,t,n,!1,i,s)}function ab(e,t,n,i,s,o){if(!t)throw Error("Invalid event type");var u=p(s)?!!s.capture:!!s,l=bb(e);if(l||(e[W]=l=new Sa(e)),(n=l.add(t,n,i,u,o)).proxy)return n;if(i=function cb(){function a(t){return e.call(a.src,a.listener,t)}const e=eb;return a}(),n.proxy=i,i.src=e,i.listener=n,e.addEventListener)v||(s=u),void 0===s&&(s=!1),e.addEventListener(t.toString(),i,s);else if(e.attachEvent)e.attachEvent(db(t.toString()),i);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(i)}return n}function Za(e,t,n,i,s){if(Array.isArray(t)){for(var o=0;o<t.length;o++)Za(e,t[o],n,i,s);return null}return n=$a(n),e&&e[Q]?e.P(t,n,p(i)?!!i.capture:!!i,s):ab(e,t,n,!0,i,s)}function fb(e,t,n,i,s){if(Array.isArray(t))for(var o=0;o<t.length;o++)fb(e,t[o],n,i,s);else i=p(i)?!!i.capture:!!i,n=$a(n),e&&e[Q]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=Ta(o=e.g[t],n,i,s))&&(Ma(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.g[t],e.h--)))):e&&(e=bb(e))&&(t=e.g[t.toString()],e=-1,t&&(e=Ta(t,n,i,s)),(n=-1<e?t[e]:null)&&gb(n))}function gb(e){if("number"!=typeof e&&e&&!e.fa){var t=e.src;if(t&&t[Q])Ua(t.i,e);else{var n=e.type,i=e.proxy;t.removeEventListener?t.removeEventListener(n,i,e.capture):t.detachEvent?t.detachEvent(db(n),i):t.addListener&&t.removeListener&&t.removeListener(i),(n=bb(t))?(Ua(n,e),0==n.h&&(n.src=null,t[W]=null)):Ma(e)}}}function db(e){return e in j?j[e]:j[e]="on"+e}function eb(e,t){if(e.fa)e=!0;else{t=new A(t,this);var n=e.listener,i=e.la||e.src;e.ia&&gb(e),e=n.call(i,t)}return e}function bb(e){return(e=e[W])instanceof Sa?e:null}var H="__closure_events_fn_"+(1e9*Math.random()>>>0);function $a(e){return"function"==typeof e?e:(e[H]||(e[H]=function(t){return e.handleEvent(t)}),e[H])}function B$1(){v$1.call(this),this.i=new Sa(this),this.S=this,this.J=null}function C$1(e,t){var n,i=e.J;if(i)for(n=[];i;i=i.J)n.push(i);if(e=e.S,i=t.type||t,"string"==typeof t)t=new w$1(t,e);else if(t instanceof w$1)t.target=t.target||e;else{var s=t;Ra(t=new w$1(i,e),s)}if(s=!0,n)for(var o=n.length-1;0<=o;o--){var u=t.g=n[o];s=ib(u,i,!0,t)&&s}if(s=ib(u=t.g=e,i,!0,t)&&s,s=ib(u,i,!1,t)&&s,n)for(o=0;o<n.length;o++)s=ib(u=t.g=n[o],i,!1,t)&&s}function ib(e,t,n,i){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var s=!0,o=0;o<t.length;++o){var u=t[o];if(u&&!u.fa&&u.capture==n){var l=u.listener,_=u.la||u.src;u.ia&&Ua(e.i,u),s=!1!==l.call(_,i)&&s}}return s&&!i.defaultPrevented}r(B$1,v$1),B$1.prototype[Q]=!0,B$1.prototype.removeEventListener=function(e,t,n,i){fb(this,e,t,n,i)},B$1.prototype.N=function(){if(B$1.$.N.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],i=0;i<n.length;i++)Ma(n[i]);delete t.g[e],t.h--}}this.J=null},B$1.prototype.O=function(e,t,n,i){return this.i.add(String(e),t,!1,n,i)},B$1.prototype.P=function(e,t,n,i){return this.i.add(String(e),t,!0,n,i)};var Y=E.JSON.stringify;function lb(){var e=ee;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var J=new class kb{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}((()=>new pb),(e=>e.reset()));class pb{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}function qb(e){var t=1;e=e.split(":");const n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function rb(e){E.setTimeout((()=>{throw e}),0)}let X,Z=!1,ee=new class nb{constructor(){this.h=this.g=null}add(e,t){const n=J.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}},vb=()=>{const e=E.Promise.resolve(void 0);X=()=>{e.then(ub)}};var ub=()=>{for(var e;e=lb();){try{e.h.call(e.g)}catch(e){rb(e)}var t=J;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Z=!1};function wb(e,t){B$1.call(this),this.h=e||1,this.g=t||E,this.j=q$1(this.qb,this),this.l=Date.now()}function xb(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}function yb(e,t,n){if("function"==typeof e)n&&(e=q$1(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=q$1(e.handleEvent,e)}return 2147483647<Number(t)?-1:E.setTimeout(e,t||0)}function zb(e){e.g=yb((()=>{e.g=null,e.i&&(e.i=!1,zb(e))}),e.j);const t=e.h;e.h=null,e.m.apply(null,t)}r(wb,B$1),(m=wb.prototype).ga=!1,m.T=null,m.qb=function(){if(this.ga){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-e):(this.T&&(this.g.clearTimeout(this.T),this.T=null),C$1(this,"tick"),this.ga&&(xb(this),this.start()))}},m.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())},m.N=function(){wb.$.N.call(this),xb(this),delete this.g};class Ab extends v$1{constructor(e,t){super(),this.m=e,this.j=t,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:zb(this)}N(){super.N(),this.g&&(E.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Bb(e){v$1.call(this),this.h=e,this.g={}}r(Bb,v$1);var te=[];function Eb(e,t,n,i){Array.isArray(n)||(n&&(te[0]=n.toString()),n=te);for(var s=0;s<n.length;s++){var o=Ya(t,n[s],i||e.handleEvent,!1,e.h||e);if(!o)break;e.g[o.key]=o}}function Fb(e){Na(e.g,(function(e,t){this.g.hasOwnProperty(t)&&gb(e)}),e),e.g={}}function Gb(){this.g=!0}function D$1(e,t,n,i){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function Jb(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var i=n[e];if(!(2>i.length)){var s=i[1];if(Array.isArray(s)&&!(1>s.length)){var o=s[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var u=1;u<s.length;u++)s[u]=""}}}return Y(n)}catch(e){return t}}(e,n)+(i?" "+i:"")}))}Bb.prototype.N=function(){Bb.$.N.call(this),Fb(this)},Bb.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Gb.prototype.Ea=function(){this.g=!1},Gb.prototype.info=function(){};var ne={},re=null;function Mb(){return re=re||new B$1}function Nb(e){w$1.call(this,ne.Ta,e)}function Ob(e){const t=Mb();C$1(t,new Nb(t))}function Pb(e,t){w$1.call(this,ne.STAT_EVENT,e),this.stat=t}function F$1(e){const t=Mb();C$1(t,new Pb(t,e))}function Qb(e,t){w$1.call(this,ne.Ua,e),this.size=t}function Rb(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return E.setTimeout((function(){e()}),t)}ne.Ta="serverreachability",r(Nb,w$1),ne.STAT_EVENT="statevent",r(Pb,w$1),ne.Ua="timingevent",r(Qb,w$1);var ie={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},se={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function Ub(){}function Vb(e){return e.h||(e.h=e.i())}function Wb(){}Ub.prototype.h=null;var oe,ae={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function Yb(){w$1.call(this,"d")}function Zb(){w$1.call(this,"c")}function ac(){}function bc(e,t,n,i){this.l=e,this.j=t,this.m=n,this.W=i||1,this.U=new Bb(this),this.P=ce,e=N?125:void 0,this.V=new wb(e),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 dc}function dc(){this.i=null,this.g="",this.h=!1}r(Yb,w$1),r(Zb,w$1),r(ac,Ub),ac.prototype.g=function(){return new XMLHttpRequest},ac.prototype.i=function(){return{}},oe=new ac;var ce=45e3,ue={},le={};function gc(e,t,n){e.L=1,e.A=hc(G$1(t)),e.u=n,e.S=!0,ic(e,null)}function ic(e,t){e.G=Date.now(),jc(e),e.B=G$1(e.A);var n=e.B,i=e.W;Array.isArray(i)||(i=[String(i)]),kc(n.i,"t",i),e.o=0,n=e.l.J,e.h=new dc,e.g=lc(e.l,n?t:null,!e.u),0<e.O&&(e.M=new Ab(q$1(e.Pa,e,e.g),e.O)),Eb(e.U,e.g,"readystatechange",e.nb),t=e.I?Pa(e.I):{},e.u?(e.v||(e.v="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ha(e.B,e.v,e.u,t)):(e.v="GET",e.g.ha(e.B,e.v,null,t)),Ob(),function Hb(e,t,n,i,s,o){e.info((function(){if(e.g)if(o)for(var u="",l=o.split("&"),_=0;_<l.length;_++){var h=l[_].split("=");if(1<h.length){var d=h[0];h=h[1];var m=d.split("_");u=2<=m.length&&"type"==m[1]?u+(d+"=")+h+"&":u+(d+"=redacted&")}}else u=null;else u=o;return"XMLHTTP REQ ("+i+") [attempt "+s+"]: "+t+"\n"+n+"\n"+u}))}(e.j,e.v,e.B,e.m,e.W,e.u)}function oc(e){return!!e.g&&("GET"==e.v&&2!=e.L&&e.l.Ha)}function rc(e,t,n){let i,s=!0;for(;!e.J&&e.o<n.length;){if(i=uc(e,n),i==le){4==t&&(e.s=4,F$1(14),s=!1),D$1(e.j,e.m,null,"[Incomplete Response]");break}if(i==ue){e.s=4,F$1(15),D$1(e.j,e.m,n,"[Invalid Chunk]"),s=!1;break}D$1(e.j,e.m,i,null),qc(e,i)}oc(e)&&0!=e.o&&(e.h.g=e.h.g.slice(e.o),e.o=0),4!=t||0!=n.length||e.h.h||(e.s=1,F$1(16),s=!1),e.i=e.i&&s,s?0<n.length&&!e.ba&&(e.ba=!0,(t=e.l).g==e&&t.ca&&!t.M&&(t.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),vc(t),t.M=!0,F$1(11))):(D$1(e.j,e.m,n,"[Invalid Chunked Response]"),I(e),pc(e))}function uc(e,t){var n=e.o,i=t.indexOf("\n",n);return-1==i?le:(n=Number(t.substring(n,i)),isNaN(n)?ue:(i+=1)+n>t.length?le:(t=t.slice(i,i+n),e.o=i+n,t))}function jc(e){e.Y=Date.now()+e.P,wc(e,e.P)}function wc(e,t){if(null!=e.C)throw Error("WatchDog timer not null");e.C=Rb(q$1(e.lb,e),t)}function nc(e){e.C&&(E.clearTimeout(e.C),e.C=null)}function pc(e){0==e.l.H||e.J||sc(e.l,e)}function I(e){nc(e);var t=e.M;t&&"function"==typeof t.sa&&t.sa(),e.M=null,xb(e.V),Fb(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.sa())}function qc(e,t){try{var n=e.l;if(0!=n.H&&(n.g==e||xc(n.i,e)))if(!e.K&&xc(n.i,e)&&3==n.H){try{var i=n.Ja.g.parse(t)}catch(e){i=null}if(Array.isArray(i)&&3==i.length){var s=i;if(0==s[0]){e:if(!n.u){if(n.g){if(!(n.g.G+3e3<e.G))break e;yc(n),zc(n)}Ac(n),F$1(18)}}else n.Fa=s[1],0<n.Fa-n.V&&37500>s[2]&&n.G&&0==n.A&&!n.v&&(n.v=Rb(q$1(n.ib,n),6e3));if(1>=Bc(n.i)&&n.oa){try{n.oa()}catch(e){}n.oa=void 0}}else J$1(n,11)}else if((e.K||n.g==e)&&yc(n),!x$1(t))for(s=n.Ja.g.parse(t),t=0;t<s.length;t++){let h=s[t];if(n.V=h[0],h=h[1],2==n.H)if("c"==h[0]){n.K=h[1],n.pa=h[2];const t=h[3];null!=t&&(n.ra=t,n.l.info("VER="+n.ra));const s=h[4];null!=s&&(n.Ga=s,n.l.info("SVER="+n.Ga));const d=h[5];null!=d&&"number"==typeof d&&0<d&&(i=1.5*d,n.L=i,n.l.info("backChannelRequestTimeoutMs_="+i)),i=n;const m=e.g;if(m){const e=m.g?m.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var o=i.i;o.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(o.j=o.l,o.g=new Set,o.h&&(Cc(o,o.h),o.h=null))}if(i.F){const e=m.g?m.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(i.Da=e,K$1(i.I,i.F,e))}}n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-e.G,n.l.info("Handshake RTT: "+n.S+"ms"));var u=e;if((i=n).wa=Dc(i,i.J?i.pa:null,i.Y),u.K){Ec(i.i,u);var l=u,_=i.L;_&&l.setTimeout(_),l.C&&(nc(l),jc(l)),i.g=u}else Fc(i);0<n.j.length&&Gc(n)}else"stop"!=h[0]&&"close"!=h[0]||J$1(n,7);else 3==n.H&&("stop"==h[0]||"close"==h[0]?"stop"==h[0]?J$1(n,7):Hc(n):"noop"!=h[0]&&n.h&&n.h.Aa(h),n.A=0)}Ob()}catch(e){}}function Kc(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(aa(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function Jc(e){if(e.ta&&"function"==typeof e.ta)return e.ta();if(!e.Z||"function"!=typeof e.Z){if("undefined"!=typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!=typeof Set&&e instanceof Set)){if(aa(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}t=[],n=0;for(const i in e)t[n++]=i;return t}}}(e),i=function Ic(e){if(e.Z&&"function"==typeof e.Z)return e.Z();if("undefined"!=typeof Map&&e instanceof Map||"undefined"!=typeof Set&&e instanceof Set)return Array.from(e.values());if("string"==typeof e)return e.split("");if(aa(e)){for(var t=[],n=e.length,i=0;i<n;i++)t.push(e[i]);return t}for(i in t=[],n=0,e)t[n++]=e[i];return t}(e),s=i.length,o=0;o<s;o++)t.call(void 0,i[o],n&&n[o],e)}(m=bc.prototype).setTimeout=function(e){this.P=e},m.nb=function(e){e=e.target;const t=this.M;t&&3==H$1(e)?t.l():this.Pa(e)},m.Pa=function(e){try{if(e==this.g)e:{const d=H$1(this.g);var t=this.g.Ia();this.g.da();if(!(3>d)&&(3!=d||N||this.g&&(this.h.h||this.g.ja()||mc(this.g)))){this.J||4!=d||7==t||Ob(),nc(this);var n=this.g.da();this.ca=n;t:if(oc(this)){var i=mc(this.g);e="";var s=i.length,o=4==H$1(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){I(this),pc(this);var u="";break t}this.h.i=new E.TextDecoder}for(t=0;t<s;t++)this.h.h=!0,e+=this.h.i.decode(i[t],{stream:o&&t==s-1});i.length=0,this.h.g+=e,this.o=0,u=this.h.g}else u=this.g.ja();if(this.i=200==n,function Ib(e,t,n,i,s,o,u){e.info((function(){return"XMLHTTP RESP ("+i+") [ attempt "+s+"]: "+t+"\n"+n+"\n"+o+" "+u}))}(this.j,this.v,this.B,this.m,this.W,d,n),this.i){if(this.aa&&!this.K){t:{if(this.g){var l,_=this.g;if((l=_.g?_.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!x$1(l)){var h=l;break t}}h=null}if(!(n=h)){this.i=!1,this.s=3,F$1(12),I(this),pc(this);break e}D$1(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,qc(this,n)}this.S?(rc(this,d,u),N&&this.i&&3==d&&(Eb(this.U,this.V,"tick",this.mb),this.V.start())):(D$1(this.j,this.m,u,null),qc(this,u)),4==d&&I(this),this.i&&!this.J&&(4==d?sc(this.l,this):(this.i=!1,jc(this)))}else(function tc(e){const t={};e=(e.g&&2<=H$1(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let i=0;i<e.length;i++){if(x$1(e[i]))continue;var n=qb(e[i]);const s=n[0];if("string"!=typeof(n=n[1]))continue;n=n.trim();const o=t[s]||[];t[s]=o,o.push(n)}!function Oa(e,t){for(const n in e)t.call(void 0,e[n],n,e)}(t,(function(e){return e.join(", ")}))})(this.g),400==n&&0<u.indexOf("Unknown SID")?(this.s=3,F$1(12)):(this.s=0,F$1(13)),I(this),pc(this)}}}catch(e){}},m.mb=function(){if(this.g){var e=H$1(this.g),t=this.g.ja();this.o<t.length&&(nc(this),rc(this,e,t),this.i&&4!=e&&jc(this))}},m.cancel=function(){this.J=!0,I(this)},m.lb=function(){this.C=null;const e=Date.now();0<=e-this.Y?(function Kb(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.B),2!=this.L&&(Ob(),F$1(17)),I(this),this.s=2,pc(this)):wc(this,this.Y-e)};var _e=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function M$1(e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof M$1){this.h=e.h,Nc(this,e.j),this.s=e.s,this.g=e.g,Oc(this,e.m),this.l=e.l;var t=e.i,n=new Pc;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Qc(this,n),this.o=e.o}else e&&(t=String(e).match(_e))?(this.h=!1,Nc(this,t[1]||"",!0),this.s=Rc(t[2]||""),this.g=Rc(t[3]||"",!0),Oc(this,t[4]),this.l=Rc(t[5]||"",!0),Qc(this,t[6]||"",!0),this.o=Rc(t[7]||"")):(this.h=!1,this.i=new Pc(null,this.h))}function G$1(e){return new M$1(e)}function Nc(e,t,n){e.j=n?Rc(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Oc(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function Qc(e,t,n){t instanceof Pc?(e.i=t,function Xc(e,t){t&&!e.j&&(N$1(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&($c(this,t),kc(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=Sc(t,fe)),e.i=new Pc(t,e.h))}function K$1(e,t,n){e.i.set(t,n)}function hc(e){return K$1(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Rc(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Sc(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,Zc),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Zc(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}M$1.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Sc(t,he,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Sc(t,he,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(Sc(n,"/"==n.charAt(0)?me:de,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Sc(n,ge)),e.join("")};var he=/[#\/\?@]/g,de=/[#\?:]/g,me=/[#\?]/g,fe=/[#\?@]/g,ge=/#/g;function Pc(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function N$1(e){e.g||(e.g=new Map,e.h=0,e.i&&function Mc(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var i=e[n].indexOf("="),s=null;if(0<=i){var o=e[n].substring(0,i);s=e[n].substring(i+1)}else o=e[n];t(o,s?decodeURIComponent(s.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function $c(e,t){N$1(e),t=O$1(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function ad(e,t){return N$1(e),t=O$1(e,t),e.g.has(t)}function kc(e,t,n){$c(e,t),0<n.length&&(e.i=null,e.g.set(O$1(e,t),ma(n)),e.h+=n.length)}function O$1(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(m=Pc.prototype).add=function(e,t){N$1(this),this.i=null,e=O$1(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},m.forEach=function(e,t){N$1(this),this.g.forEach((function(n,i){n.forEach((function(n){e.call(t,n,i,this)}),this)}),this)},m.ta=function(){N$1(this);const e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let i=0;i<t.length;i++){const s=e[i];for(let e=0;e<s.length;e++)n.push(t[i])}return n},m.Z=function(e){N$1(this);let t=[];if("string"==typeof e)ad(this,e)&&(t=t.concat(this.g.get(O$1(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t},m.set=function(e,t){return N$1(this),this.i=null,ad(this,e=O$1(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},m.get=function(e,t){return e&&0<(e=this.Z(e)).length?String(e[0]):t},m.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var i=t[n];const o=encodeURIComponent(String(i)),u=this.Z(i);for(i=0;i<u.length;i++){var s=o;""!==u[i]&&(s+="="+encodeURIComponent(String(u[i]))),e.push(s)}}return this.i=e.join("&")};function cd(e){this.l=e||Ie,E.PerformanceNavigationTiming?e=0<(e=E.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(E.g&&E.g.Ka&&E.g.Ka()&&E.g.Ka().dc),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var Ie=10;function ed(e){return!!e.h||!!e.g&&e.g.size>=e.j}function Bc(e){return e.h?1:e.g?e.g.size:0}function xc(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function Cc(e,t){e.g?e.g.add(t):e.h=t}function Ec(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function fd(e){if(null!=e.h)return e.i.concat(e.h.F);if(null!=e.g&&0!==e.g.size){let t=e.i;for(const n of e.g.values())t=t.concat(n.F);return t}return ma(e.i)}cd.prototype.cancel=function(){if(this.i=fd(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const e of this.g.values())e.cancel();this.g.clear()}};function hd(){this.g=new class{stringify(e){return E.JSON.stringify(e,void 0)}parse(e){return E.JSON.parse(e,void 0)}}}function id(e,t,n){const i=n||"";try{Kc(e,(function(e,n){let s=e;p(e)&&(s=Y(e)),t.push(i+n+"="+encodeURIComponent(s))}))}catch(e){throw t.push(i+"type="+encodeURIComponent("_badmap")),e}}function kd(e,t,n,i,s){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,s(i)}catch(e){}}function ld(e){this.l=e.ec||null,this.j=e.ob||!1}function md(e,t){B$1.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=pe,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}r(ld,Ub),ld.prototype.g=function(){return new md(this.l,this.j)},ld.prototype.i=function(e){return function(){return e}}({}),r(md,B$1);var pe=0;function qd(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}function pd(e){e.readyState=4,e.l=null,e.j=null,e.A=null,od(e)}function od(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(m=md.prototype).open=function(e,t){if(this.readyState!=pe)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,od(this)},m.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.F||E).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},m.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,pd(this)),this.readyState=pe},m.$a=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,od(this)),this.g&&(this.readyState=3,od(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(void 0!==E.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;qd(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))},m.Xa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?pd(this):od(this),3==this.readyState&&qd(this)}},m.Za=function(e){this.g&&(this.response=this.responseText=e,pd(this))},m.Ya=function(e){this.g&&(this.response=e,pd(this))},m.ka=function(){this.g&&pd(this)},m.setRequestHeader=function(e,t){this.v.append(e,t)},m.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},m.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(md.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var Te=E.JSON.parse;function P(e){B$1.call(this),this.headers=new Map,this.u=e||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=Ee,this.L=this.M=!1}r(P,B$1);var Ee="",Pe=/^https?$/i,Ae=["POST","PUT"];function vd(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,yd(e),zd(e)}function yd(e){e.F||(e.F=!0,C$1(e,"complete"),C$1(e,"error"))}function Ad(e){if(e.h&&void 0!==g&&(!e.C[1]||4!=H$1(e)||2!=e.da()))if(e.v&&4==H$1(e))yb(e.La,0,e);else if(C$1(e,"readystatechange"),4==H$1(e)){e.h=!1;try{const u=e.da();e:switch(u){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var i;if(i=0===u){var s=String(e.I).match(_e)[1]||null;!s&&E.self&&E.self.location&&(s=E.self.location.protocol.slice(0,-1)),i=!Pe.test(s?s.toLowerCase():"")}n=i}if(n)C$1(e,"complete"),C$1(e,"success");else{e.m=6;try{var o=2<H$1(e)?e.g.statusText:""}catch(e){o=""}e.j=o+" ["+e.da()+"]",yd(e)}}finally{zd(e)}}}function zd(e,t){if(e.g){wd(e);const n=e.g,i=e.C[0]?()=>{}:null;e.g=null,e.C=null,t||C$1(e,"ready");try{n.onreadystatechange=i}catch(e){}}}function wd(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(E.clearTimeout(e.A),e.A=null)}function H$1(e){return e.g?e.g.readyState:0}function mc(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case Ee:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function Bd(e){let t="";return Na(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function Cd(e,t,n){e:{for(i in n){var i=!1;break e}i=!0}i||(n=Bd(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):K$1(e,t,n))}function Dd(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Ed(e){this.Ga=0,this.j=[],this.l=new Gb,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=Dd("failFast",!1,e),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=Dd("baseRetryDelayMs",5e3,e),this.hb=Dd("retryDelaySeedMs",1e4,e),this.eb=Dd("forwardChannelMaxRetries",2,e),this.xa=Dd("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.i=new cd(e&&e.concurrentRequestLimit),this.Ja=new hd,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=e&&e.bc||!1,e&&e.Ea&&this.l.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.qa=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.qa=e.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}function Hc(e){if(Fd(e),3==e.H){var t=e.W++,n=G$1(e.I);if(K$1(n,"SID",e.K),K$1(n,"RID",t),K$1(n,"TYPE","terminate"),Gd(e,n),(t=new bc(e,e.l,t)).L=2,t.A=hc(G$1(n)),n=!1,E.navigator&&E.navigator.sendBeacon)try{n=E.navigator.sendBeacon(t.A.toString(),"")}catch(e){}!n&&E.Image&&((new Image).src=t.A,n=!0),n||(t.g=lc(t.l,null),t.g.ha(t.A)),t.G=Date.now(),jc(t)}Hd(e)}function zc(e){e.g&&(vc(e),e.g.cancel(),e.g=null)}function Fd(e){zc(e),e.u&&(E.clearTimeout(e.u),e.u=null),yc(e),e.i.cancel(),e.m&&("number"==typeof e.m&&E.clearTimeout(e.m),e.m=null)}function Gc(e){if(!ed(e.i)&&!e.m){e.m=!0;var t=e.Na;X||vb(),Z||(X(),Z=!0),ee.add(t,e),e.C=0}}function Ld(e,t){var n;n=t?t.m:e.W++;const i=G$1(e.I);K$1(i,"SID",e.K),K$1(i,"RID",n),K$1(i,"AID",e.V),Gd(e,i),e.o&&e.s&&Cd(i,e.o,e.s),n=new bc(e,e.l,n,e.C+1),null===e.o&&(n.I=e.s),t&&(e.j=t.F.concat(e.j)),t=Kd(e,n,1e3),n.setTimeout(Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),Cc(e.i,n),gc(n,i,t)}function Gd(e,t){e.na&&Na(e.na,(function(e,n){K$1(t,n,e)})),e.h&&Kc({},(function(e,n){K$1(t,n,e)}))}function Kd(e,t,n){n=Math.min(e.j.length,n);var i=e.h?q$1(e.h.Va,e.h,e):null;e:{var s=e.j;let t=-1;for(;;){const e=["count="+n];-1==t?0<n?(t=s[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let o=!0;for(let u=0;u<n;u++){let n=s[u].g;const l=s[u].map;if(n-=t,0>n)t=Math.max(0,s[u].g-100),o=!1;else try{id(l,e,"req"+n+"_")}catch(e){i&&i(l)}}if(o){i=e.join("&");break e}}}return e=e.j.splice(0,n),t.F=e,i}function Fc(e){if(!e.g&&!e.u){e.ba=1;var t=e.Ma;X||vb(),Z||(X(),Z=!0),ee.add(t,e),e.A=0}}function Ac(e){return!(e.g||e.u||3<=e.A)&&(e.ba++,e.u=Rb(q$1(e.Ma,e),Jd(e,e.A)),e.A++,!0)}function vc(e){null!=e.B&&(E.clearTimeout(e.B),e.B=null)}function Md(e){e.g=new bc(e,e.l,"rpc",e.ba),null===e.o&&(e.g.I=e.s),e.g.O=0;var t=G$1(e.wa);K$1(t,"RID","rpc"),K$1(t,"SID",e.K),K$1(t,"AID",e.V),K$1(t,"CI",e.G?"0":"1"),!e.G&&e.qa&&K$1(t,"TO",e.qa),K$1(t,"TYPE","xmlhttp"),Gd(e,t),e.o&&e.s&&Cd(t,e.o,e.s),e.L&&e.g.setTimeout(e.L);var n=e.g;e=e.pa,n.L=1,n.A=hc(G$1(t)),n.u=null,n.S=!0,ic(n,e)}function yc(e){null!=e.v&&(E.clearTimeout(e.v),e.v=null)}function sc(e,t){var n=null;if(e.g==t){yc(e),vc(e),e.g=null;var i=2}else{if(!xc(e.i,t))return;n=t.F,Ec(e.i,t),i=1}if(0!=e.H)if(t.i)if(1==i){n=t.u?t.u.length:0,t=Date.now()-t.G;var s=e.C;C$1(i=Mb(),new Qb(i,n)),Gc(e)}else Fc(e);else if(3==(s=t.s)||0==s&&0<t.ca||!(1==i&&function Id(e,t){return!(Bc(e.i)>=e.i.j-(e.m?1:0)||(e.m?(e.j=t.F.concat(e.j),0):1==e.H||2==e.H||e.C>=(e.cb?0:e.eb)||(e.m=Rb(q$1(e.Na,e,t),Jd(e,e.C)),e.C++,0)))}(e,t)||2==i&&Ac(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),s){case 1:J$1(e,5);break;case 4:J$1(e,10);break;case 3:J$1(e,6);break;default:J$1(e,2)}}function Jd(e,t){let n=e.ab+Math.floor(Math.random()*e.hb);return e.isActive()||(n*=2),n*t}function J$1(e,t){if(e.l.info("Error code "+t),2==t){var n=null;e.h&&(n=null);var i=q$1(e.pb,e);n||(n=new M$1("//www.google.com/images/cleardot.gif"),E.location&&"http"==E.location.protocol||Nc(n,"https"),hc(n)),function jd(e,t){const n=new Gb;if(E.Image){const i=new Image;i.onload=ha(kd,n,i,"TestLoadImage: loaded",!0,t),i.onerror=ha(kd,n,i,"TestLoadImage: error",!1,t),i.onabort=ha(kd,n,i,"TestLoadImage: abort",!1,t),i.ontimeout=ha(kd,n,i,"TestLoadImage: timeout",!1,t),E.setTimeout((function(){i.ontimeout&&i.ontimeout()}),1e4),i.src=e}else t(!1)}(n.toString(),i)}else F$1(2);e.H=0,e.h&&e.h.za(t),Hd(e),Fd(e)}function Hd(e){if(e.H=0,e.ma=[],e.h){const t=fd(e.i);0==t.length&&0==e.j.length||(na(e.ma,t),na(e.ma,e.j),e.i.i.length=0,ma(e.j),e.j.length=0),e.h.ya()}}function Dc(e,t,n){var i=n instanceof M$1?G$1(n):new M$1(n);if(""!=i.g)t&&(i.g=t+"."+i.g),Oc(i,i.m);else{var s=E.location;i=s.protocol,t=t?t+"."+s.hostname:s.hostname,s=+s.port;var o=new M$1(null);i&&Nc(o,i),t&&(o.g=t),s&&Oc(o,s),n&&(o.l=n),i=o}return n=e.F,t=e.Da,n&&t&&K$1(i,n,t),K$1(i,"VER",e.ra),Gd(e,i),i}function lc(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=e.Ha&&!e.va?new P(new ld({ob:n})):new P(e.va)).Oa(e.J),t}function Nd(){}function Od(){if(x&&!(10<=Number(U)))throw Error("Environmental error: no available transport.")}function Q$1(e,t){B$1.call(this),this.g=new Ed(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.Ca&&(e?e["X-WebChannel-Client-Profile"]=t.Ca:e={"X-WebChannel-Client-Profile":t.Ca}),this.g.U=e,(e=t&&t.cc)&&!x$1(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!x$1(t)&&(this.g.F=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new R(this)}function Pd(e){Yb.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function Qd(){Zb.call(this),this.status=1}function R(e){this.g=e}function S$1(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}function Sd(e,t,n){n||(n=0);var i=Array(16);if("string"==typeof t)for(var s=0;16>s;++s)i[s]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(s=0;16>s;++s)i[s]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],s=e.g[2];var o=e.g[3],u=t+(o^n&(s^o))+i[0]+3614090360&4294967295;u=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=(n=(s=(o=(t=n+(u<<7&4294967295|u>>>25))+((u=o+(s^t&(n^s))+i[1]+3905402710&4294967295)<<12&4294967295|u>>>20))+((u=s+(n^o&(t^n))+i[2]+606105819&4294967295)<<17&4294967295|u>>>15))+((u=n+(t^s&(o^t))+i[3]+3250441966&4294967295)<<22&4294967295|u>>>10))+((u=t+(o^n&(s^o))+i[4]+4118548399&4294967295)<<7&4294967295|u>>>25))+((u=o+(s^t&(n^s))+i[5]+1200080426&4294967295)<<12&4294967295|u>>>20))+((u=s+(n^o&(t^n))+i[6]+2821735955&4294967295)<<17&4294967295|u>>>15))+((u=n+(t^s&(o^t))+i[7]+4249261313&4294967295)<<22&4294967295|u>>>10))+((u=t+(o^n&(s^o))+i[8]+1770035416&4294967295)<<7&4294967295|u>>>25))+((u=o+(s^t&(n^s))+i[9]+2336552879&4294967295)<<12&4294967295|u>>>20))+((u=s+(n^o&(t^n))+i[10]+4294925233&4294967295)<<17&4294967295|u>>>15))+((u=n+(t^s&(o^t))+i[11]+2304563134&4294967295)<<22&4294967295|u>>>10))+((u=t+(o^n&(s^o))+i[12]+1804603682&4294967295)<<7&4294967295|u>>>25))+((u=o+(s^t&(n^s))+i[13]+4254626195&4294967295)<<12&4294967295|u>>>20))+((u=s+(n^o&(t^n))+i[14]+2792965006&4294967295)<<17&4294967295|u>>>15))+((u=n+(t^s&(o^t))+i[15]+1236535329&4294967295)<<22&4294967295|u>>>10))+((u=t+(s^o&(n^s))+i[1]+4129170786&4294967295)<<5&4294967295|u>>>27))+((u=o+(n^s&(t^n))+i[6]+3225465664&4294967295)<<9&4294967295|u>>>23))+((u=s+(t^n&(o^t))+i[11]+643717713&4294967295)<<14&4294967295|u>>>18))+((u=n+(o^t&(s^o))+i[0]+3921069994&4294967295)<<20&4294967295|u>>>12))+((u=t+(s^o&(n^s))+i[5]+3593408605&4294967295)<<5&4294967295|u>>>27))+((u=o+(n^s&(t^n))+i[10]+38016083&4294967295)<<9&4294967295|u>>>23))+((u=s+(t^n&(o^t))+i[15]+3634488961&4294967295)<<14&4294967295|u>>>18))+((u=n+(o^t&(s^o))+i[4]+3889429448&4294967295)<<20&4294967295|u>>>12))+((u=t+(s^o&(n^s))+i[9]+568446438&4294967295)<<5&4294967295|u>>>27))+((u=o+(n^s&(t^n))+i[14]+3275163606&4294967295)<<9&4294967295|u>>>23))+((u=s+(t^n&(o^t))+i[3]+4107603335&4294967295)<<14&4294967295|u>>>18))+((u=n+(o^t&(s^o))+i[8]+1163531501&4294967295)<<20&4294967295|u>>>12))+((u=t+(s^o&(n^s))+i[13]+2850285829&4294967295)<<5&4294967295|u>>>27))+((u=o+(n^s&(t^n))+i[2]+4243563512&4294967295)<<9&4294967295|u>>>23))+((u=s+(t^n&(o^t))+i[7]+1735328473&4294967295)<<14&4294967295|u>>>18))+((u=n+(o^t&(s^o))+i[12]+2368359562&4294967295)<<20&4294967295|u>>>12))+((u=t+(n^s^o)+i[5]+4294588738&4294967295)<<4&4294967295|u>>>28))+((u=o+(t^n^s)+i[8]+2272392833&4294967295)<<11&4294967295|u>>>21))+((u=s+(o^t^n)+i[11]+1839030562&4294967295)<<16&4294967295|u>>>16))+((u=n+(s^o^t)+i[14]+4259657740&4294967295)<<23&4294967295|u>>>9))+((u=t+(n^s^o)+i[1]+2763975236&4294967295)<<4&4294967295|u>>>28))+((u=o+(t^n^s)+i[4]+1272893353&4294967295)<<11&4294967295|u>>>21))+((u=s+(o^t^n)+i[7]+4139469664&4294967295)<<16&4294967295|u>>>16))+((u=n+(s^o^t)+i[10]+3200236656&4294967295)<<23&4294967295|u>>>9))+((u=t+(n^s^o)+i[13]+681279174&4294967295)<<4&4294967295|u>>>28))+((u=o+(t^n^s)+i[0]+3936430074&4294967295)<<11&4294967295|u>>>21))+((u=s+(o^t^n)+i[3]+3572445317&4294967295)<<16&4294967295|u>>>16))+((u=n+(s^o^t)+i[6]+76029189&4294967295)<<23&4294967295|u>>>9))+((u=t+(n^s^o)+i[9]+3654602809&4294967295)<<4&4294967295|u>>>28))+((u=o+(t^n^s)+i[12]+3873151461&4294967295)<<11&4294967295|u>>>21))+((u=s+(o^t^n)+i[15]+530742520&4294967295)<<16&4294967295|u>>>16))+((u=n+(s^o^t)+i[2]+3299628645&4294967295)<<23&4294967295|u>>>9))+((u=t+(s^(n|~o))+i[0]+4096336452&4294967295)<<6&4294967295|u>>>26))+((u=o+(n^(t|~s))+i[7]+1126891415&4294967295)<<10&4294967295|u>>>22))+((u=s+(t^(o|~n))+i[14]+2878612391&4294967295)<<15&4294967295|u>>>17))+((u=n+(o^(s|~t))+i[5]+4237533241&4294967295)<<21&4294967295|u>>>11))+((u=t+(s^(n|~o))+i[12]+1700485571&4294967295)<<6&4294967295|u>>>26))+((u=o+(n^(t|~s))+i[3]+2399980690&4294967295)<<10&4294967295|u>>>22))+((u=s+(t^(o|~n))+i[10]+4293915773&4294967295)<<15&4294967295|u>>>17))+((u=n+(o^(s|~t))+i[1]+2240044497&4294967295)<<21&4294967295|u>>>11))+((u=t+(s^(n|~o))+i[8]+1873313359&4294967295)<<6&4294967295|u>>>26))+((u=o+(n^(t|~s))+i[15]+4264355552&4294967295)<<10&4294967295|u>>>22))+((u=s+(t^(o|~n))+i[6]+2734768916&4294967295)<<15&4294967295|u>>>17))+((u=n+(o^(s|~t))+i[13]+1309151649&4294967295)<<21&4294967295|u>>>11))+((o=(t=n+((u=t+(s^(n|~o))+i[4]+4149444226&4294967295)<<6&4294967295|u>>>26))+((u=o+(n^(t|~s))+i[11]+3174756917&4294967295)<<10&4294967295|u>>>22))^((s=o+((u=s+(t^(o|~n))+i[2]+718787259&4294967295)<<15&4294967295|u>>>17))|~t))+i[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(s+(u<<21&4294967295|u>>>11))&4294967295,e.g[2]=e.g[2]+s&4294967295,e.g[3]=e.g[3]+o&4294967295}function T(e,t){this.h=t;for(var n=[],i=!0,s=e.length-1;0<=s;s--){var o=0|e[s];i&&o==t||(n[s]=o,i=!1)}this.g=n}(m=P.prototype).Oa=function(e){this.M=e},m.ha=function(e,t,n,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+e);t=t?t.toUpperCase():"GET",this.I=e,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():oe.g(),this.C=this.u?Vb(this.u):Vb(oe),this.g.onreadystatechange=q$1(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(e){return void vd(this,e)}if(e=n||"",n=new Map(this.headers),i)if(Object.getPrototypeOf(i)===Object.prototype)for(var s in i)n.set(s,i[s]);else{if("function"!=typeof i.keys||"function"!=typeof i.get)throw Error("Unknown input type for opt_headers: "+String(i));for(const e of i.keys())n.set(e,i.get(e))}i=Array.from(n.keys()).find((e=>"content-type"==e.toLowerCase())),s=E.FormData&&e instanceof E.FormData,!(0<=S(Ae,t))||i||s||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[e,t]of n)this.g.setRequestHeader(e,t);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{wd(this),0<this.B&&((this.L=function xd(e){return x&&"number"==typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=q$1(this.ua,this)):this.A=yb(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(e){vd(