1/*! For license information please see 1.e73cd9ec.chunk.js.LICENSE.txt */ 2(this["webpackJsonpchatcast-client"]=this["webpackJsonpchatcast-client"]||[]).push([[1],{1e3:function(t,e,n){var r=n(673),i=n(745),o=n(738);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var u,a=n(t),s=o.f,c=0;a.length>c;)s.call(t,u=a[c++])&&e.push(u);return e}},1001:function(t,e,n){var r=n(653),i=n(700).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(e){return u.slice()}}(t):i(r(t))}},1002:function(t,e,n){"use strict";var r=n(799)(!0);n(807)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},1003:function(t,e,n){"use strict";var r=n(697),i=n(624),o=n(647),u=n(1004),a=n(1005),s=n(651),c=n(811),f=n(1006);i(i.S+i.F*!n(1007)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,h,l=o(t),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,m=f(l);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==m||d==Array&&a(m))for(n=new d(e=s(l.length));e>y;y++)c(n,y,g?v(l[y],y):l[y]);else for(h=m.call(l),n=new d;!(i=h.next()).done;y++)c(n,y,g?u(h,v,[i.value,y],!0):i.value);return n.length=y,n}})},1004:function(t,e,n){var r=n(626);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(u){var o=t.return;throw void 0!==o&&r(o.call(t)),u}}},1005:function(t,e,n){var r=n(672),i=n(621)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},1006:function(t,e,n){var r=n(732),i=n(621)("iterator"),o=n(672);t.exports=n(660).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},1007:function(t,e,n){var r=n(621)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(u){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(u){}return n}},621:function(t,e,n){var r=n(694)("wks"),i=n(669),o=n(627).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},624:function(t,e,n){var r=n(627),i=n(660),o=n(648),u=n(642),a=n(697),s=function t(e,n,s){var c,f,h,l,d=e&t.F,p=e&t.G,v=e&t.P,g=e&t.B,y=p?r:e&t.S?r[n]||(r[n]={}):(r[n]||{}).prototype,m=p?i:i[n]||(i[n]={}),b=m.prototype||(m.prototype={});for(c in p&&(s=n),s)h=((f=!d&&y&&void 0!==y[c])?y:s)[c],l=g&&f?a(h,r):v&&"function"==typeof h?a(Function.call,h):h,y&&u(y,c,h,e&t.U),m[c]!=h&&o(m,c,l),v&&b[c]!=h&&(b[c]=h)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},626:function(t,e,n){var r=n(641);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},627:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},628:function(t,e,n){t.exports=!n(633)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},632:function(t,e,n){var r=n(626),i=n(800),o=n(735),u=Object.defineProperty;e.f=n(628)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},633:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},634:function(t,e,n){"use strict";var r=n(626),i=n(651),o=n(730),u=n(731);n(733)("match",1,(function(t,e,n,a){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),c=String(this);if(!s.global)return u(s,c);var f=s.unicode;s.lastIndex=0;for(var h,l=[],d=0;null!==(h=u(s,c));){var p=String(h[0]);l[d]=p,""===p&&(s.lastIndex=o(c,i(s.lastIndex),f)),d++}return 0===d?null:l}]}))},640:function(t,e,n){"use strict";var r=n(626),i=n(647),o=n(651),u=n(692),a=n(730),s=n(731),c=Math.max,f=Math.min,h=Math.floor,l=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(733)("replace",2,(function(t,e,n,p){return[function(r,i){var o=t(this),u=void 0==r?void 0:r[e];return void 0!==u?u.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var h=r(t),l=String(this),d="function"===typeof e;d||(e=String(e));var g=h.global;if(g){var y=h.unicode;h.lastIndex=0}for(var m=[];;){var b=s(h,l);if(null===b)break;
2if(m.push(b),!g)break;""===String(b[0])&&(h.lastIndex=a(l,o(h.lastIndex),y))}for(var w,_="",E=0,I=0;I<m.length;I++){b=m[I];for(var T=String(b[0]),x=c(f(u(b.index),l.length),0),S=[],A=1;A<b.length;A++)S.push(void 0===(w=b[A])?w:String(w));var N=b.groups;if(d){var k=[T].concat(S,x,l);void 0!==N&&k.push(N);var D=String(e.apply(void 0,k))}else D=v(T,l,x,S,N,e);x>=E&&(_+=l.slice(E,x)+D,E=x+T.length)}return _+l.slice(E)}];function v(t,e,r,o,u,a){var s=r+t.length,c=o.length,f=d;return void 0!==u&&(u=i(u),f=l),n.call(a,f,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":a=u[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>c){var l=h(f/10);return 0===l?n:l<=c?void 0===o[l-1]?i.charAt(1):o[l-1]+i.charAt(1):n}a=o[f-1]}return void 0===a?"":a}))}}))},641:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},642:function(t,e,n){var r=n(627),i=n(648),o=n(652),u=n(669)("src"),a=n(968),s=(""+a).split("toString");n(660).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,u)||i(n,u,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||a.call(this)}))},647:function(t,e,n){var r=n(691);t.exports=function(t){return Object(r(t))}},648:function(t,e,n){var r=n(632),i=n(670);t.exports=n(628)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},651:function(t,e,n){var r=n(692),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},652:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},653:function(t,e,n){var r=n(736),i=n(691);t.exports=function(t){return r(i(t))}},659:function(t,e,n){"use strict";(function(e){var r=n(728),i=n(729),o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function s(t){return(t||"").toString().replace(a,"")}var c=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function h(t){var n,r=("undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{}).location||{},i={},u=typeof(t=t||r);if("blob:"===t.protocol)i=new d(unescape(t.pathname),{});else if("string"===u)for(n in i=new d(t,{}),f)delete i[n];else if("object"===u){for(n in t)n in f||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=o.test(t.href))}return i}function l(t){t=s(t);var e=u.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function d(t,e,n){if(t=s(t),!(this instanceof d))return new d(t,e,n);var o,u,a,f,p,v,g=c.slice(),y=typeof e,m=this,b=0;for("object"!==y&&"string"!==y&&(n=e,e=null),n&&"function"!==typeof n&&(n=i.parse),e=h(e),o=!(u=l(t||"")).protocol&&!u.slashes,m.slashes=u.slashes||o&&e.slashes,m.protocol=u.protocol||e.protocol||"",t=u.rest,u.slashes||(g[3]=[/(.*)/,"pathname"]);b<g.length;b++)"function"!==typeof(f=g[b])?(a=f[0],v=f[1],a!==a?m[v]=t:"string"===typeof a?~(p=t.indexOf(a))&&("number"===typeof f[2]?(m[v]=t.slice(0,p),t=t.slice(p+f[2])):(m[v]=t.slice(p),t=t.slice(0,p))):(p=a.exec(t))&&(m[v]=p[1],t=t.slice(0,p.index)),m[v]=m[v]||o&&f[3]&&e[v]||"",f[4]&&(m[v]=m[v].toLowerCase())):t=f(t);n&&(m.query=n(m.query)),o&&e.slashes&&"/"!==m.pathname.charAt(0)&&(""!==m.pathname||""!==e.pathname)&&(m.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,u=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),u++):u&&(0===r&&(o=!0),n.splice(r,1),u--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(m.pathname,e.pathname)),r(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(f=m.auth.split(":"),m.username=f[0]||"",m.password=f[1]||""),m.origin=m.protocol&&m.host&&"f
2ile:"!==m.protocol?m.protocol+"//"+m.host:"null",m.href=m.toString()}d.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"===typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,/:\d+$/.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var u="pathname"===t?"/":"#";o[t]=e.charAt(0)!==u?u+e:e}else o[t]=e;break;default:o[t]=e}for(var a=0;a<c.length;a++){var s=c[a];s[4]&&(o[s[1]]=o[s[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"===typeof t||(t=i.stringify);var e,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.slashes?"//":"");return n.username&&(o+=n.username,n.password&&(o+=":"+n.password),o+="@"),o+=n.host+n.pathname,(e="object"===typeof n.query?t(n.query):n.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(o+=n.hash),o}},d.extractProtocol=l,d.location=h,d.trimLeft=s,d.qs=i,t.exports=d}).call(this,n(55))},660:function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},661:function(t,e,n){var r=n(627),i=n(970),o=n(632).f,u=n(700).f,a=n(804),s=n(696),c=r.RegExp,f=c,h=c.prototype,l=/a/g,d=/a/g,p=new c(l)!==l;if(n(628)&&(!p||n(633)((function(){return d[n(621)("match")]=!1,c(l)!=l||c(d)==d||"/a/i"!=c(l,"i")})))){c=function(t,e){var n=this instanceof c,r=a(t),o=void 0===e;return!n&&r&&t.constructor===c&&o?t:i(p?new f(r&&!o?t.source:t,e):f((r=t instanceof c)?t.source:t,r&&o?s.call(t):e),n?this:h,c)};for(var v=function(t){t in c||o(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},g=u(f),y=0;g.length>y;)v(g[y++]);h.constructor=c,c.prototype=h,n(642)(r,"RegExp",c)}n(972)("RegExp")},667:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},669:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},670:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},671:function(t,e,n){"use strict";var r=n(633);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},672:function(t,e){t.exports={}},673:function(t,e,n){var r=n(803),i=n(740);t.exports=Object.keys||function(t){return r(t,i)}},691:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},692:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},693:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},694:function(t,e,n){var r=n(660),i=n(627),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(695)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},695:function(t,e){t.exports=!1},696:function(t,e,n){"use strict";var r=n(626);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},697:function(t,e,n){var r=n(698);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},698:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},699:function(t,e,n){"use strict";var r=n(624),i=n(802)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!n(671)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},700:function(t,e,n){var r=n(803),i=n(740).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},701:function(t,e,n){"use strict";var r=n(624),i=n(698),o=n(647),u=n(633),a=[].sort,s=[1,2,3];r(r.P+r.F*(u((function(){s.sort(void 0)}))||!u((function(){s.sort(null)}))||!n(671)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),i(t))}})},727:function(t,e,n){"use strict";n(965)},728:function(t,e,n){"use strict";
2t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},729:function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return null}}e.stringify=function(t,e){e=e||"";var n,i,o=[];for(i in"string"!==typeof e&&(e="?"),t)if(r.call(t,i)){if((n=t[i])||null!==n&&void 0!==n&&!isNaN(n)||(n=""),i=encodeURIComponent(i),n=encodeURIComponent(n),null===i||null===n)continue;o.push(i+"="+n)}return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,n=/([^=?&]+)=?([^&]*)/g,r={};e=n.exec(t);){var o=i(e[1]),u=i(e[2]);null===o||null===u||o in r||(r[o]=u)}return r}},730:function(t,e,n){"use strict";var r=n(799)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},731:function(t,e,n){"use strict";var r=n(732),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},732:function(t,e,n){var r=n(693),i=n(621)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=Object(t),i))?n:o?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},733:function(t,e,n){"use strict";n(967);var r=n(642),i=n(648),o=n(633),u=n(691),a=n(621),s=n(734),c=a("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),h=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var l=a(t),d=!o((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})),p=d?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[l](""),!e})):void 0;if(!d||!p||"replace"===t&&!f||"split"===t&&!h){var v=/./[l],g=n(u,l,""[t],(function(t,e,n,r,i){return e.exec===s?d&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),y=g[0],m=g[1];r(String.prototype,t,y),i(RegExp.prototype,l,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},734:function(t,e,n){"use strict";var r=n(696),i=RegExp.prototype.exec,o=String.prototype.replace,u=i,a=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),s=void 0!==/()??/.exec("")[1];(a||s)&&(u=function(t){var e,n,u,c,f=this;return s&&(n=new RegExp("^"+f.source+"$(?!\\s)",r.call(f))),a&&(e=f.lastIndex),u=i.call(f,t),a&&u&&(f.lastIndex=f.global?u.index+u[0].length:e),s&&u&&u.length>1&&o.call(u[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(u[c]=void 0)})),u}),t.exports=u},735:function(t,e,n){var r=n(641);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},736:function(t,e,n){var r=n(693);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},737:function(t,e,n){var r=n(738),i=n(670),o=n(653),u=n(735),a=n(652),s=n(800),c=Object.getOwnPropertyDescriptor;e.f=n(628)?c:function(t,e){if(t=o(t),e=u(e,!0),s)try{return c(t,e)}catch(n){}if(a(t,e))return i(!r.f.call(t,e),t[e])}},738:function(t,e){e.f={}.propertyIsEnumerable},739:function(t,e,n){var r=n(694)("keys"),i=n(669);t.exports=function(t){return r[t]||(r[t]=i(t))}},740:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleStr
2ing,toString,valueOf".split(",")},741:function(t,e,n){"use strict";var r=n(732),i={};i[n(621)("toStringTag")]="z",i+""!="[object z]"&&n(642)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},742:function(t,e,n){var r=n(693);t.exports=Array.isArray||function(t){return"Array"==r(t)}},743:function(t,e,n){"use strict";var r=n(981),i=n(982),o=n(672),u=n(653);t.exports=n(807)(Array,"Array",(function(t,e){this._t=u(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},744:function(t,e,n){var r=n(632).f,i=n(652),o=n(621)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},745:function(t,e){e.f=Object.getOwnPropertySymbols},746:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=[],i="M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z";e.definition={prefix:"fas",iconName:"trash-alt",icon:[448,512,r,"f2ed",i]},e.faTrashAlt=e.definition,e.prefix="fas",e.iconName="trash-alt",e.width=448,e.height=512,e.ligatures=r,e.unicode="f2ed",e.svgPathData=i},798:function(t,e,n){var r,i,o;i=[e,t],void 0===(o="function"===typeof(r=function(t,e){"use strict";var n=5e3,r="callback";function i(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function o(t){try{delete window[t]}catch(e){window[t]=void 0}}function u(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e)}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=t,s=e.timeout||n,c=e.jsonpCallback||r,f=void 0;return new Promise((function(n,r){var h=e.jsonpCallbackFunction||i(),l=c+"_"+h;window[h]=function(t){n({ok:!0,json:function(){return Promise.resolve(t)}}),f&&clearTimeout(f),u(l),o(h)},a+=-1===a.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+c+"="+h),e.charset&&d.setAttribute("charset",e.charset),d.id=l,document.getElementsByTagName("head")[0].appendChild(d),f=setTimeout((function(){r(new Error("JSONP request to "+t+" timed out")),o(h),u(l),window[h]=function(){o(h)}}),s),d.onerror=function(){r(new Error("JSONP request to "+t+" failed")),o(h),u(l),f&&clearTimeout(f)}}))}})?r.apply(e,i):r)||(t.exports=o)},799:function(t,e,n){var r=n(692),i=n(691);t.exports=function(t){return function(e,n){var o,u,a=String(i(e)),s=r(n),c=a.length;return s<0||s>=c?t?"":void 0:(o=a.charCodeAt(s))<55296||o>56319||s+1===c||(u=a.charCodeAt(s+1))<56320||u>57343?t?a.charAt(s):o:t?a.slice(s,s+2):u-56320+(o-55296<<10)+65536}}},800:function(t,e,n){t.exports=!n(628)&&!n(633)((function(){return 7!=Object.defineProperty(n(801)("div"),"a",{get:function(){return 7}}).a}))},801:function(t,e,n){var r=n(641),i=n(627).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},802:function(t,e,n){var r=n(653),i=n(651),o=n(969);t.exports=function(t){return function(e,n,u){var a,s=r(e),c=i(s.length),f=o(u,c);if(t&&n!=n){for(;c>f;)if((a=s[f++])!=a)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},803:function(t,e,n){var r=n(652),i=n(653),o=n(802)(!1),u=n(739)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),s=0,c=[];for(n in a)n!=u&&r(a,n)&&c.push(n);for(;e.length>s;)r(a,n=e[s++])&&(~o(c,n)||c.push(n));return c}},804:function(t,e,n){var r=n(641),i=n(693),o=n(621)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},805:function(t,e,n){"use strict";var r=n(804),i=n(626),o=n(973),u=n(730),a=n(651),s=n(731),c=n(734),f=n(633),h=Math.min,l=[].push,d="length",p=!f((function(){RegExp(4294967295,"y")}));n(733)("split",2,(function(t,e,n,f){var v;
2return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[d]||2!="ab".split(/(?:ab)*/)[d]||4!=".".split(/(.?)(.?)/)[d]||".".split(/()()/)[d]>1||"".split(/.?/)[d]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,u,a,s=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,p=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,f+"g");(o=c.call(v,i))&&!((u=v.lastIndex)>h&&(s.push(i.slice(h,o.index)),o[d]>1&&o.index<i[d]&&l.apply(s,o.slice(1)),a=o[0][d],h=u,s[d]>=p));)v.lastIndex===o.index&&v.lastIndex++;return h===i[d]?!a&&v.test("")||s.push(""):s.push(i.slice(h)),s[d]>p?s.slice(0,p):s}:"0".split(void 0,0)[d]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,i,r):v.call(String(i),n,r)},function(t,e){var r=f(v,t,this,e,v!==n);if(r.done)return r.value;var c=i(t),l=String(this),d=o(c,RegExp),g=c.unicode,y=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(p?"y":"g"),m=new d(p?c:"^(?:"+c.source+")",y),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===l.length)return null===s(m,l)?[l]:[];for(var w=0,_=0,E=[];_<l.length;){m.lastIndex=p?_:0;var I,T=s(m,p?l:l.slice(_));if(null===T||(I=h(a(m.lastIndex+(p?0:_)),l.length))===w)_=u(l,_,g);else{if(E.push(l.slice(w,_)),E.length===b)return E;for(var x=1;x<=T.length-1;x++)if(E.push(T[x]),E.length===b)return E;_=w=I}}return E.push(l.slice(w)),E}]}))},806:function(t,e,n){for(var r=n(743),i=n(673),o=n(642),u=n(627),a=n(648),s=n(672),c=n(621),f=c("iterator"),h=c("toStringTag"),l=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),v=0;v<p.length;v++){var g,y=p[v],m=d[y],b=u[y],w=b&&b.prototype;if(w&&(w[f]||a(w,f,l),w[h]||a(w,h,y),s[y]=l,m))for(g in r)w[g]||o(w,g,r[g],!0)}},807:function(t,e,n){"use strict";var r=n(695),i=n(624),o=n(642),u=n(648),a=n(672),s=n(983),c=n(744),f=n(985),h=n(621)("iterator"),l=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,v,g,y){s(n,e,p);var m,b,w,_=function(t){if(!l&&t in x)return x[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",I="values"==v,T=!1,x=t.prototype,S=x[h]||x["@@iterator"]||v&&x[v],A=S||_(v),N=v?I?_("entries"):A:void 0,k="Array"==e&&x.entries||S;if(k&&(w=f(k.call(new t)))!==Object.prototype&&w.next&&(c(w,E,!0),r||"function"==typeof w[h]||u(w,h,d)),I&&S&&"values"!==S.name&&(T=!0,A=function(){return S.call(this)}),r&&!y||!l&&!T&&x[h]||u(x,h,A),a[e]=A,a[E]=d,v)if(m={values:I?A:_("values"),keys:g?A:_("keys"),entries:N},y)for(b in m)b in x||o(x,b,m[b]);else i(i.P+i.F*(l||T),e,m);return m}},808:function(t,e,n){var r=n(626),i=n(809),o=n(740),u=n(739)("IE_PROTO"),a=function(){},s=function(){var t,e=n(801)("iframe"),r=o.length;for(e.style.display="none",n(984).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[o[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[u]=t):n=s(),void 0===e?n:i(n,e)}},809:function(t,e,n){var r=n(632),i=n(626),o=n(673);t.exports=n(628)?Object.defineProperties:function(t,e){i(t);for(var n,u=o(e),a=u.length,s=0;a>s;)r.f(t,n=u[s++],e[n]);return t}},810:function(t,e,n){var r=n(647),i=n(673);n(986)("keys",(function(){return function(t){return i(r(t))}}))},811:function(t,e,n){"use strict";var r=n(632),i=n(670);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},812:function(t,e,n){var r=n(697),i=n(736),o=n(647),u=n(651),a=n(994);t.exports=function(t,e){var n=1==t,s=2==t,c=3==t,f=4==t,h=6==t,l=5==t||h,d=e||a;return function(e,a,p){for(var v,g,y=o(e),m=i(y),b=r(a,p,3),w=u(m.length),_=0,E=n?d(e,w):s?d(e,0):void 0;w>_;_++)if((l||_ in m)&&(g=b(v=m[_],_,y),t))if(n)E[_]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:E.push(v)}else if(f)return!1;return h?-1:c||f?f:E}}},813:function(t,e,n){e.f=n(621)},814:function(t,e,n){"use strict";var r=n(251);e.a=function(t,e,n){"__proto__"==e&&r.a?Object(r.a)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},852:function(t,e,n){"use strict";n(640),n(699);
2var r=/[a-z]{1,6}(?:[._][a-z]{1,2})?/i,i=/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$/,o=(n(661),function(t,e,n){return n=n||"","string"!==typeof t&&(t.global&&n.indexOf("g")<0&&(n+="g"),t.ignoreCase&&n.indexOf("i")<0&&(n+="i"),t.multiline&&n.indexOf("m")<0&&(n+="m"),t=t.source),new RegExp(t.replace(/#\{(\w+)\}/g,(function(t,n){var r=e[n]||"";return"string"!==typeof r&&(r=r.source),r})),n)}),u=/\x09-\x0D\x20\x85\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000/,a=o(/[#{spacesGroup}]/,{spacesGroup:u}),s=o("(^|#{spaces})(\\$)(#{cashtag})(?=$|\\s|[#{punct}])",{cashtag:r,spaces:a,punct:i},"gi"),c=function(t){if(!t||-1===t.indexOf("$"))return[];var e=[];return t.replace(s,(function(t,n,r,i,o,u){var a=o+n.length,s=a+i.length+1;e.push({cashtag:i,indices:[a,s]})})),e},f=(n(634),/[#\uff03]/),h=o(/^(?:#{hashSigns}|:\/\/)/,{hashSigns:f}),l=o(RegExp("(?:(?:\ud55c\uad6d|\u9999\u6e2f|\u6fb3\u9580|\u65b0\u52a0\u5761|\u53f0\u7063|\u53f0\u6e7e|\u4e2d\u570b|\u4e2d\u56fd|\u10d2\u10d4|\u0ea5\u0eb2\u0ea7|\u0e44\u0e17\u0e22|\u0dbd\u0d82\u0d9a\u0dcf|\u0d2d\u0d3e\u0d30\u0d24\u0d02|\u0cad\u0cbe\u0cb0\u0ca4|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b2d\u0b3e\u0b30\u0b24|\u0aad\u0abe\u0ab0\u0aa4|\u0a2d\u0a3e\u0a30\u0a24|\u09ad\u09be\u09f0\u09a4|\u09ad\u09be\u09b0\u09a4|\u09ac\u09be\u0982\u09b2\u09be|\u092d\u093e\u0930\u094b\u0924|\u092d\u093e\u0930\u0924\u092e\u094d|\u092d\u093e\u0930\u0924|\u0680\u0627\u0631\u062a|\u067e\u0627\u06a9\u0633\u062a\u0627\u0646|\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627|\u0645\u0644\u064a\u0633\u064a\u0627|\u0645\u0635\u0631|\u0642\u0637\u0631|\u0641\u0644\u0633\u0637\u064a\u0646|\u0639\u0645\u0627\u0646|\u0639\u0631\u0627\u0642|\u0633\u0648\u0631\u064a\u0629|\u0633\u0648\u062f\u0627\u0646|\u062a\u0648\u0646\u0633|\u0628\u06be\u0627\u0631\u062a|\u0628\u0627\u0631\u062a|\u0627\u06cc\u0631\u0627\u0646|\u0627\u0645\u0627\u0631\u0627\u062a|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0628\u062d\u0631\u064a\u0646|\u0627\u0644\u0627\u0631\u062f\u0646|\u0570\u0561\u0575|\u049b\u0430\u0437|\u0443\u043a\u0440|\u0441\u0440\u0431|\u0440\u0444|\u043c\u043e\u043d|\u043c\u043a\u0434|\u0435\u044e|\u0431\u0435\u043b|\u0431\u0433|\u03b5\u03c5|\u03b5\u03bb|zw|zm|za|yt|ye|ws|wf|vu|vn|vi|vg|ve|vc|va|uz|uy|us|um|uk|ug|ua|tz|tw|tv|tt|tr|tp|to|tn|tm|tl|tk|tj|th|tg|tf|td|tc|sz|sy|sx|sv|su|st|ss|sr|so|sn|sm|sl|sk|sj|si|sh|sg|se|sd|sc|sb|sa|rw|ru|rs|ro|re|qa|py|pw|pt|ps|pr|pn|pm|pl|pk|ph|pg|pf|pe|pa|om|nz|nu|nr|np|no|nl|ni|ng|nf|ne|nc|na|mz|my|mx|mw|mv|mu|mt|ms|mr|mq|mp|mo|mn|mm|ml|mk|mh|mg|mf|me|md|mc|ma|ly|lv|lu|lt|ls|lr|lk|li|lc|lb|la|kz|ky|kw|kr|kp|kn|km|ki|kh|kg|ke|jp|jo|jm|je|it|is|ir|iq|io|in|im|il|ie|id|hu|ht|hr|hn|hm|hk|gy|gw|gu|gt|gs|gr|gq|gp|gn|gm|gl|gi|gh|gg|gf|ge|gd|gb|ga|fr|fo|fm|fk|fj|fi|eu|et|es|er|eh|eg|ee|ec|dz|do|dm|dk|dj|de|cz|cy|cx|cw|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|bz|by|bw|bv|bt|bs|br|bq|bo|bn|bm|bl|bj|bi|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ar|aq|ao|an|am|al|ai|ag|af|ae|ad|ac)(?=[^0-9a-zA-Z@+-]|$))")),d=/\u202A-\u202E\u061C\u200E\u200F\u2066\u2067\u2068\u2069/,p=/\uFFFE\uFEFF\uFFFF/,v=function(t,e){return t.replace(/#\{(\w+)\}/g,(function(t,n){return e[n]||""}))},g=v("#{punct}#{spacesGroup}#{invalidCharsGroup}#{directionalMarkersGroup}",{punct:i,spacesGroup:u,invalidCharsGroup:p,directionalMarkersGroup:d}),y=o(/[^#{invalidDomainChars}]/,{invalidDomainChars:g}),m=o(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\.)/,{validDomainChars:y}),b=o(RegExp("(?:(?:\uc0bc\uc131|\ub2f7\ucef4|\ub2f7\ub137|\u9999\u683c\u91cc\u62c9|\u9910\u5385|\u98df\u54c1|\u98de\u5229\u6d66|\u96fb\u8a0a\u76c8\u79d1|\u96c6\u56e2|\u901a\u8ca9|\u8d2d\u7269|\u8c37\u6b4c|\u8bfa\u57fa\u4e9a|\u8054\u901a|\u7f51\u7edc|\u7f51\u7ad9|\u7f51\u5e97|\u7f51\u5740|\u7ec4\u7ec7\u673a\u6784|\u79fb\u52a8|\u73e0\u5b9d|\u70b9\u770b|\u6e38\u620f|\u6de1\u9a6c\u9521|\u673a\u6784|\u66f8\u7c4d|\u65f6\u5c1a|\u65b0\u95fb|\u653f\u5e9c|\u653f\u52a1|\u62db\u8058|\u624b\u8868|\u624b\u673a|\u6211\u7231\u4f60|\u6148\u5584|\u5fae\u535a|\u5e7f\u4e1c|\u5de5\u884c|\u5bb6\u96fb|\u5a31\u4e50|\u5929\u4e3b\u6559|\u5927\u62ff|\u5927\u4f17\u6c7d\u8f66|\u5728\u7ebf|\u5609\u91cc\u5927\u9152\u5e97|\u5609\u91cc|\u5546\u6807|\u5546\u5e97|\u5546\u57ce|\u516c\u76ca|\u516c\u53f8|\u516b\u5366|\u5065\u5eb7|\u4fe1\u606f|\u4f5b\u5c71|\u4f01\u4e1a|\u4e2d\u6587\u7f51|\u4e2d\u4fe1|\u4e16\u754c|\u30dd\u30a4\u30f3\u30c8|\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3|\u30bb\u30fc\u30eb|\u30b9\u30c8\u30a2|\u30b3\u30e0|\u30b0\u30fc\u30b0\u30eb|\u30af\u30e9\u30a6\u30c9|\u307f\u3093\u306a|\u0e04\u0e2d\u0e21|\u0938\u0902\u0917\u0920\u0928|\u0928\u0947\u091f|\u0915\u0949\u092e|\u0647\u0645\u0631\u0627\u0647|\u0645\u0648\u0642\u0639|\u0645\u0648\u0628\u0627\u064a\u0644\u064a|\u0643\u0648\u0645|\u0643\u0627\u062b\u0648\u0644\u064a\u0643|\u0639\u0631\u0628|\u0634\u0628\u0643\u0629|\u0628\u064a\u062a\u0643|\u0628\u0627\u0632\u0627\u0631|\u0627\u0644\u0639\u0644\u064a\u0627\u0646|\u0627\u0631\u0627\u0645\u0643\u0648|\u0627\u062a\u0635\u0627\u0644\u0627\u062a|\u0627\u0628\u0648\u0638\u0628\u064a|\u05e7\u05d5\u05dd|\u0441\u0430\u0439\u0442|\u0440\u0443\u0441|\u043e\u0440\u0433|\u043e\u043d\u043b\u0430\u0439\u043d|\u043c\u043e\u0441\u043a\u0432\u0430|\u043a\u043e\u043c|\u043a\u0430\u0442\u043e\u043b\u0438\u043a|\u0434\u0435\u0442\u0438|zuerich|zone|zippo|zip|zero|zara|zappos|yun|youtube|you|yokohama|yoga|yodobashi|yandex|yamaxun|yahoo|yachts|xyz|xxx|xperia|xin|xihuan|xfinity|xerox|xbox|wtf|wtc|wow|world|works|work|woodside|wolterskluwer|wme|winners|wine|windows|win|williamhill|wiki|wien|whoswho|weir|weibo|wedding|wed|website|weber|webcam|weatherchannel|weather|watches|watch|warman|wanggou|wang|walter|walmart|wales|vuelos|voyage|voto|voting|vote|volvo|volkswagen|vodka|vlaanderen|vivo|viva|vistaprint|vista|vision|visa|virgin|vip|vin|villas|viking|vig|video|viajes|vet|versicherung|verm\xf6gensberatung|verm\xf6gensberater|verisign|ventures|vegas|vanguard|vana|vacations|ups|uol|uno|university|unicom|uconnect|ubs|ubank|tvs|tushu|tunes|tui|tube|trv|trust|travelersinsurance|travelers|travelchannel|travel|training|trading|trade|toys|toyota|town|tours|total|toshiba|toray|top|tools|tokyo|today|tmall|tkmaxx|tjx|tjmaxx|tirol|tires|tips|tiffany|tienda|tickets|tiaa|theatre|theater|thd|teva|tennis|temasek|telefonica|telecity|tel|technology|tech|team|tdk|tci|taxi|tax|tattoo|tatar|tatamotors|target|taobao|talk|taipei|tab|systems|symantec|sydney|swiss|swiftcover|swatch|suzuki|surgery|surf|support|supply|supplies|sucks|style|study|studio|stream|store|storage|stockholm|stcgroup|stc|statoil|statefarm|statebank|starhub|star|staples|stada|srt|srl|spreadbetting|spot|sport|spiegel|space|soy|sony|song|solutions|solar|sohu|softw
2are|softbank|social|soccer|sncf|smile|smart|sling|skype|sky|skin|ski|site|singles|sina|silk|shriram|showtime|show|shouji|shopping|shop|shoes|shiksha|shia|shell|shaw|sharp|shangrila|sfr|sexy|sex|sew|seven|ses|services|sener|select|seek|security|secure|seat|search|scot|scor|scjohnson|science|schwarz|schule|school|scholarships|schmidt|schaeffler|scb|sca|sbs|sbi|saxo|save|sas|sarl|sapo|sap|sanofi|sandvikcoromant|sandvik|samsung|samsclub|salon|sale|sakura|safety|safe|saarland|ryukyu|rwe|run|ruhr|rugby|rsvp|room|rogers|rodeo|rocks|rocher|rmit|rip|rio|ril|rightathome|ricoh|richardli|rich|rexroth|reviews|review|restaurant|rest|republican|report|repair|rentals|rent|ren|reliance|reit|reisen|reise|rehab|redumbrella|redstone|red|recipes|realty|realtor|realestate|read|raid|radio|racing|qvc|quest|quebec|qpon|pwc|pub|prudential|pru|protection|property|properties|promo|progressive|prof|productions|prod|pro|prime|press|praxi|pramerica|post|porn|politie|poker|pohl|pnc|plus|plumbing|playstation|play|place|pizza|pioneer|pink|ping|pin|pid|pictures|pictet|pics|piaget|physio|photos|photography|photo|phone|philips|phd|pharmacy|pfizer|pet|pccw|pay|passagens|party|parts|partners|pars|paris|panerai|panasonic|pamperedchef|page|ovh|ott|otsuka|osaka|origins|orientexpress|organic|org|orange|oracle|open|ooo|onyourside|online|onl|ong|one|omega|ollo|oldnavy|olayangroup|olayan|okinawa|office|off|observer|obi|nyc|ntt|nrw|nra|nowtv|nowruz|now|norton|northwesternmutual|nokia|nissay|nissan|ninja|nikon|nike|nico|nhk|ngo|nfl|nexus|nextdirect|next|news|newholland|new|neustar|network|netflix|netbank|net|nec|nba|navy|natura|nationwide|name|nagoya|nadex|nab|mutuelle|mutual|museum|mtr|mtpc|mtn|msd|movistar|movie|mov|motorcycles|moto|moscow|mortgage|mormon|mopar|montblanc|monster|money|monash|mom|moi|moe|moda|mobily|mobile|mobi|mma|mls|mlb|mitsubishi|mit|mint|mini|mil|microsoft|miami|metlife|merckmsd|meo|menu|men|memorial|meme|melbourne|meet|media|med|mckinsey|mcdonalds|mcd|mba|mattel|maserati|marshalls|marriott|markets|marketing|market|map|mango|management|man|makeup|maison|maif|madrid|macys|luxury|luxe|lupin|lundbeck|ltda|ltd|lplfinancial|lpl|love|lotto|lotte|london|lol|loft|locus|locker|loans|loan|llp|llc|lixil|living|live|lipsy|link|linde|lincoln|limo|limited|lilly|like|lighting|lifestyle|lifeinsurance|life|lidl|liaison|lgbt|lexus|lego|legal|lefrak|leclerc|lease|lds|lawyer|law|latrobe|latino|lat|lasalle|lanxess|landrover|land|lancome|lancia|lancaster|lamer|lamborghini|ladbrokes|lacaixa|kyoto|kuokgroup|kred|krd|kpn|kpmg|kosher|komatsu|koeln|kiwi|kitchen|kindle|kinder|kim|kia|kfh|kerryproperties|kerrylogistics|kerryhotels|kddi|kaufen|juniper|juegos|jprs|jpmorgan|joy|jot|joburg|jobs|jnj|jmp|jll|jlc|jio|jewelry|jetzt|jeep|jcp|jcb|java|jaguar|iwc|iveco|itv|itau|istanbul|ist|ismaili|iselect|irish|ipiranga|investments|intuit|international|intel|int|insure|insurance|institute|ink|ing|info|infiniti|industries|inc|immobilien|immo|imdb|imamat|ikano|iinet|ifm|ieee|icu|ice|icbc|ibm|hyundai|hyatt|hughes|htc|hsbc|how|house|hotmail|hotels|hoteles|hot|hosting|host|hospital|horse|honeywell|honda|homesense|homes|homegoods|homedepot|holiday|holdings|hockey|hkt|hiv|hitachi|hisamitsu|hiphop|hgtv|hermes|here|helsinki|help|healthcare|health|hdfcbank|hdfc|hbo|haus|hangout|hamburg|hair|guru|guitars|guide|guge|gucci|guardian|group|grocery|gripe|green|gratis|graphics|grainger|gov|got|gop|google|goog|goodyear|goodhands|goo|golf|goldpoint|gold|godaddy|gmx|gmo|gmbh|gmail|globo|global|gle|glass|glade|giving|gives|gifts|gift|ggee|george|genting|gent|gea|gdn|gbiz|gay|garden|gap|games|game|gallup|gallo|gallery|gal|fyi|futbol|furniture|fund|fun|fujixerox|fujitsu|ftr|frontier|frontdoor|frogans|frl|fresenius|free|fox|foundation|forum|forsale|forex|ford|football|foodnetwork|food|foo|fly|flsmidth|flowers|florist|flir|flights|flickr|fitness|fit|fishing|fish|firmdale|firestone|fire|financial|finance|final|film|fido|fidelity|fiat|ferrero|ferrari|feedback|fedex|fast|fashion|farmers|farm|fans|fan|family|faith|fairwinds|fail|fage|extraspace|express|exposed|expert|exchange|everbank|events|eus|eurovision|etisalat|esurance|estate|esq|erni|ericsson|equipment|epson|epost|enterprises|engineering|engineer|energy|emerck|email|education|edu|edeka|eco|eat|earth|dvr|dvag|durban|dupont|duns|dunlop|duck|dubai|dtv|drive|download|dot|doosan|domains|doha|dog|dodge|doctor|docs|dnp|diy|dish|discover|discount|directory|direct|digital|diet|diamonds|dhl|dev|design|desi|dentist|dental|democrat|delta|deloitte|dell|delivery|degree|deals|dealer|deal|dds|dclk|day|datsun|dating|date|data|dance|dad|dabur|cyou|cymru|cuisinella|csc|cruises|cruise|crs|crown|cricket|creditunion|creditcard|credit|cpa|courses|coupons|coupon|country|corsica|coop|cool|cookingchannel|cooking|contractors|contact|consulting|construction|condos|comsec|computer|compare|c
2ompany|community|commbank|comcast|com|cologne|college|coffee|codes|coach|clubmed|club|cloud|clothing|clinique|clinic|click|cleaning|claims|cityeats|city|citic|citi|citadel|cisco|circle|cipriani|church|chrysler|chrome|christmas|chloe|chintai|cheap|chat|chase|charity|channel|chanel|cfd|cfa|cern|ceo|center|ceb|cbs|cbre|cbn|cba|catholic|catering|cat|casino|cash|caseih|case|casa|cartier|cars|careers|career|care|cards|caravan|car|capitalone|capital|capetown|canon|cancerresearch|camp|camera|cam|calvinklein|call|cal|cafe|cab|bzh|buzz|buy|business|builders|build|bugatti|budapest|brussels|brother|broker|broadway|bridgestone|bradesco|box|boutique|bot|boston|bostik|bosch|boots|booking|book|boo|bond|bom|bofa|boehringer|boats|bnpparibas|bnl|bmw|bms|blue|bloomberg|blog|blockbuster|blanco|blackfriday|black|biz|bio|bingo|bing|bike|bid|bible|bharti|bet|bestbuy|best|berlin|bentley|beer|beauty|beats|bcn|bcg|bbva|bbt|bbc|bayern|bauhaus|basketball|baseball|bargains|barefoot|barclays|barclaycard|barcelona|bar|bank|band|bananarepublic|banamex|baidu|baby|azure|axa|aws|avianca|autos|auto|author|auspost|audio|audible|audi|auction|attorney|athleta|associates|asia|asda|arte|art|arpa|army|archi|aramco|arab|aquarelle|apple|app|apartments|aol|anz|anquan|android|analytics|amsterdam|amica|amfam|amex|americanfamily|americanexpress|alstom|alsace|ally|allstate|allfinanz|alipay|alibaba|alfaromeo|akdn|airtel|airforce|airbus|aigo|aig|agency|agakhan|africa|afl|afamilycompany|aetna|aero|aeg|adult|ads|adac|actor|active|aco|accountants|accountant|accenture|academy|abudhabi|abogado|able|abc|abbvie|abbott|abb|abarth|aarp|aaa|onion)(?=[^0-9a-zA-Z@+-]|$))")),w=/(?:xn--[\-0-9a-z]+)/,_=o(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\.)/,{validDomainChars:y}),E=o(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/,{validDomainName:m,validSubdomain:_,validGTLD:b,validCCTLD:l,validPunycode:w}),I=/[0-9]+/,T=/\u0400-\u04FF/,x=/\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u024F\u0253\u0254\u0256\u0257\u0259\u025B\u0263\u0268\u026F\u0272\u0289\u028B\u02BB\u0300-\u036F\u1E00-\u1EFF/,S=o(/[a-z#{cyrillicLettersAndMarks}0-9!\*';:=\+,\.\$\/%#\[\]\-\u2013_~@\|&#{latinAccentChars}]/i,{cyrillicLettersAndMarks:T,latinAccentChars:x}),A=o("\\((?:#{validGeneralUrlPathChars}+|(?:#{validGeneralUrlPathChars}*\\(#{validGeneralUrlPathChars}+\\)#{validGeneralUrlPathChars}*))\\)",{validGeneralUrlPathChars:S},"i"),N=o(/[\+\-a-z#{cyrillicLettersAndMarks}0-9=_#\/#{latinAccentChars}]|(?:#{validUrlBalancedParens})/i,{cyrillicLettersAndMarks:T,latinAccentChars:x,validUrlBalancedParens:A}),k=o("(?:(?:#{validGeneralUrlPathChars}*(?:#{validUrlBalancedParens}#{validGeneralUrlPathChars}*)*#{validUrlPathEndingChars})|(?:@#{validGeneralUrlPathChars}+/))",{validGeneralUrlPathChars:S,validUrlBalancedParens:A,validUrlPathEndingChars:N},"i"),D=o(/(?:[^A-Za-z0-9@\uff20$#\uff03#{invalidCharsGroup}]|[#{directionalMarkersGroup}]|^)/,{invalidCharsGroup:p,directionalMarkersGroup:d}),C=/[a-z0-9!?\*'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]/i,O=/[a-z0-9\-_&=#\/]/i,U=o("((#{validUrlPrecedingChars})((https?:\\/\\/)?(#{validDomain})(?::(#{validPortNumber}))?(\\/#{validUrlPath}*)?(\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?))",{validUrlPrecedingChars:D,validDomain:E,validPortNumber:I,validUrlPath:k,validUrlQueryChars:C,validUrlQueryEndingChars:O},"gi"),P=/[-_.\/]$/,L=(n(805),n(974)),R=n.n(L),M=o(/(?:(?:[\-a-z0-9#{latinAccentChars}]+)\.)+(?:#{validGTLD}|#{validCCTLD}|#{validPunycode})/gi,{latinAccentChars:x,validGTLD:b,validCCTLD:l,validPunycode:w}),j={toAscii:function(t){if("xn--"!==t.substring(0,4)||t.match(M)){for(var e=t.split("."),n=0;n<e.length;n++){var r=e[n],i=R.a.toASCII(r);if(i.length<1||i.length>63)return}return e.join(".")}}},F=o(/^https?:\/\/t\.co\/([a-z0-9]+)(?:\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?/,{validUrlQueryChars:C,validUrlQueryEndingChars:O},"i"),V={extractUrlsWithoutProtocol:!0},q=function(t,e,n){var r=t.length,i=j.toAscii(n);return!(!i||!i.length)&&(r=r+i.length-n.length,e.length+r<=4096)},B=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V;if(!t||(e.extractUrlsWithoutProtocol?!t.match(/\./):!t.match(/:/)))return[];
2for(var n=[],r=function(){var t=RegExp.$2,r=RegExp.$3,i=RegExp.$4,o=RegExp.$5,u=RegExp.$7,a=U.lastIndex,s=a-r.length;if(!q(r,i||"https://",o))return"continue";if(i){if(r.match(F)){var c=RegExp.$1;if(c&&c.length>40)return"continue";r=RegExp.lastMatch,a=s+r.length}n.push({url:r,indices:[s,a]})}else{if(!e.extractUrlsWithoutProtocol||t.match(P))return"continue";var f=null,h=0;if(o.replace(M,(function(t){var e=o.indexOf(t,h);h=e+t.length,f={url:t,indices:[s+e,s+h]},n.push(f)})),null==f)return"continue";u&&(f.url=r.replace(o,f.url),f.indices[1]=a)}};U.exec(t);)r();return n},G=(n(701),function(t){t.sort((function(t,e){return t.indices[0]-e.indices[0]}));for(var e=t[0],n=1;n<t.length;n++)e.indices[1]>t[n].indices[0]?(t.splice(n,1),n--):e=t[n]}),z=/\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\uddfd\ude80-\ude9c\udea0-\uded0\udee0\udf00-\udf1f\udf30-\udf40\udf42-\udf49\udf50-\udf7a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc00-\udc9d\udd00-\udd27\udd30-\udd63\ude00-\udf36\udf40-\udf55\udf60-\udf67]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude33\ude38-\ude3a\ude3f\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee6\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48]|\ud804[\udc00-\udc46\udc7f-\udcba\udcd0-\udce8\udd00-\udd34\udd50-\udd73\udd76\udd80-\uddc4\uddda\ude00-\ude11\ude13-\ude37\udeb0-\udeea\udf01-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3c-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf5d-\udf63\udf66-\udf6c\udf70-\udf74]|\ud805[\udc80-\udcc5\udcc7\udd80-\uddb5\uddb8-\uddc0\ude00-\ude40\ude44\ude80-\udeb7]|\ud806[\udca0-\udcdf\udcff\udec0-\udef8]|\ud808[\udc00-\udf98]|\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud81a[\udc00-\ude38\ude40-\ude5e\uded0-\udeed\udef0-\udef4\udf00-\udf36\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\udf00-\udf44\udf50-\udf7e\udf8f-\udf9f]|\ud82c[\udc00\udc01]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9d\udc9e]|\ud834[\udd65-\udd69\udd6d-\udd72\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\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]|\ud83a[\udc00-\udcc4\udcd0-\udcd6]|\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]|\ud840[\udc00-\udfff]|\ud841[\udc00-\udfff]|\ud842[\udc00-\udfff]|\ud843[\udc00-\udfff]|\ud844[\udc00-\udfff]|\ud845[\udc00-\udfff]|\ud846[\udc00-\udfff]|\ud847[\udc00-\udfff]|\ud848[\udc00-\udfff]|\ud849[\udc00-\udfff]|\ud84a[\udc00-\udfff]|\ud84b[\udc00-\udfff]|\ud84c[\udc00-\udfff]|\ud84d[\udc00-\udfff]|\ud84e[\udc00-\udfff]|\ud84f[\udc00-\udfff]|\ud850[\udc00-\udfff]|\ud851[\udc00-\udfff]|\ud852[\udc00-\udfff]|\ud853[\udc00-\udfff]|\ud854[\udc00-\udfff]|\ud855[\udc00-\udfff]|\ud856[\udc00-\udfff]|\ud857[\udc00-\udfff]|\ud858[\udc00-\udfff]|\ud859[\udc00-\udfff]|\ud85a[\udc00-\udfff]|\ud85b[\udc00-\udfff]|\ud85c[\udc00-\udfff]|\ud85d[\udc00-\udfff]|\ud85e[\udc00-\udfff]|\ud85f[\udc00-\udfff]|\ud860[\udc00-\udfff]|\ud861[\udc00-\udfff]|\ud862[\udc00-\udfff]|\ud863[\udc00-\udfff]|\ud864[\udc00-\udfff]|\ud865[\udc00-\udfff]|\ud866[\udc00-\udfff]|\ud867[\udc00-\udfff]|\ud868[\udc00-\udfff]|\ud869[\udc00-\uded6\udf00-\udfff]|\ud86a[\udc00-\udfff]|\ud86b[\udc00-\udfff]|\ud86c[\udc00-\udfff]|\ud86d[\udc00-\udf34\udf40-\udfff]|\ud86e[\udc00-\udc1d]|\ud87e[\udc00-\ude1d]|\udb40[\udd00-\uddef]/,W=/A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02
2c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u052f\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u065f\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06ef\u06fa-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07ca-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0-\u08b2\u08e4-\u0963\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09f0\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a70-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u103f\u1050-\u108f\u109a-\u109d\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\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u180b-\u180d\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f\u1aa7\u1ab0-\u1abe\u1b00-\u1b4b\u1b6b-\u1b73\u1b80-\u1baf\u1bba-\u1bf3\u1c00-\u1c37\u1c4d-\u1c4f\u1c5a-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1cf8\u1cf9\u1d00-\u1df5\u1dfc-\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\u20d0-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2183\u2184\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005\u3006\u302a-\u302f\u3031-\u3035\u303b\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua672\ua674-\ua67d\ua67f-\ua69d\ua69f-\ua6e5\ua6f0\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c4\ua8e0-\ua8f7\ua8fb\ua90a-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf\ua9e0-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabea\uabec\uabed\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf870-\uf87f\uf882\uf884-\uf89f\uf8b8\uf8c1-\uf8d6\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe2d\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc/,Q=/[\uD800-\uDBFF][\uDC00-\uDFFF]/gm,H=o(/(?:[#{bmpLetterAndMarks}
2]|(?=#{nonBmpCodePairs})(?:#{astralLetterAndMarks}))/,{bmpLetterAndMarks:W,nonBmpCodePairs:Q,astralLetterAndMarks:z}),K=/\ud801[\udca0-\udca9]|\ud804[\udc66-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udef0-\udef9]|\ud805[\udcd0-\udcd9\ude50-\ude59\udec0-\udec9]|\ud806[\udce0-\udce9]|\ud81a[\ude60-\ude69\udf50-\udf59]|\ud835[\udfce-\udfff]/,$=/0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0de6-\u0def\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\ua9f0-\ua9f9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19/,Y=/_\u200c\u200d\ua67e\u05be\u05f3\u05f4\uff5e\u301c\u309b\u309c\u30a0\u30fb\u3003\u0f0b\u0f0c\xb7/,X=o(/(?:[#{bmpLetterAndMarks}#{bmpNumerals}#{hashtagSpecialChars}]|(?=#{nonBmpCodePairs})(?:#{astralLetterAndMarks}|#{astralNumerals}))/,{bmpLetterAndMarks:W,bmpNumerals:$,hashtagSpecialChars:Y,nonBmpCodePairs:Q,astralLetterAndMarks:z,astralNumerals:K}),J=/(?:[^\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])/,Z=o(/(?:^|\uFE0E|\uFE0F|$|(?!#{hashtagAlphaNumeric}|&)#{codePoint})/,{codePoint:J,hashtagAlphaNumeric:X}),tt=o(/(#{hashtagBoundary})(#{hashSigns})(?!\uFE0F|\u20E3)(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi,{hashtagBoundary:Z,hashSigns:f,hashtagAlphaNumeric:X,hashtagAlpha:H}),et=function(t,e){if(e||(e={checkUrlOverlap:!0}),!t||!t.match(f))return[];var n=[];if(t.replace(tt,(function(t,e,r,i,o,u){if(!u.slice(o+t.length).match(h)){var a=o+e.length,s=a+i.length+1;n.push({hashtag:i,indices:[a,s]})}})),e.checkUrlOverlap){var r=B(t);if(r.length>0){var i=n.concat(r);G(i),n=[];for(var o=0;o<i.length;o++)i[o].hashtag&&n.push(i[o])}}return n},nt=/[@\uff20]/,rt=o(/^(?:#{atSigns}|[#{latinAccentChars}]|:\/\/)/,{atSigns:nt,latinAccentChars:x}),it=/(?:^|[^a-zA-Z0-9_!#$%&*@\uff20]|(?:^|[^a-zA-Z0-9_+~.-])(?:rt|RT|rT|Rt):?)/,ot=o("(#{validMentionPrecedingChars})(#{atSigns})([a-zA-Z0-9_]{1,20})(/[a-zA-Z][a-zA-Z0-9_-]{0,24})?",{validMentionPrecedingChars:it,atSigns:nt},"g"),ut=function(t){if(!t||!t.match(nt))return[];var e=[];return t.replace(ot,(function(t,n,r,i,o,u,a){if(!a.slice(u+t.length).match(rt)){o=o||"";var s=u+n.length,c=s+i.length+o.length+1;e.push({screenName:i,listSlug:o,indices:[s,c]})}})),e},at=function(t,e){var n=B(t,e).concat(ut(t)).concat(et(t,{checkUrlOverlap:!1})).concat(c(t));return 0==n.length?[]:(G(n),n)},st=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},ct={disabled:!0,readonly:!0,multiple:!0,checked:!0},ft={urlClass:!0,listClass:!0,usernameClass:!0,hashtagClass:!0,cashtagClass:!0,usernameUrlBase:!0,listUrlBase:!0,hashtagUrlBase:!0,cashtagUrlBase:!0,usernameUrlBlock:!0,listUrlBlock:!0,hashtagUrlBlock:!0,linkUrlBlock:!0,usernameIncludeSymbol:!0,suppressLists:!0,suppressNoFollow:!0,targetBlank:!0,suppressDataScreenName:!0,urlEntities:!0,symbolTag:!0,textWithSymbolTag:!0,urlTarget:!0,invisibleTagAttrs:!0,linkAttributeBlock:!0,linkTextBlock:!0,htmlEscapeNonEntities:!0},ht=function(t){var e={};for(var n in t){var r=t[n];ft[n]||(ct[n]&&(r=r?n:null),null!=r&&(e[n]=r))}return e},lt={"&":"&",">":">","<":"<",'"':""","'":"'"},dt=function(t){return t&&t.replace(/[&"'><]/g,(function(t){return lt[t]}))},pt=(n(975),n(977),n(741),{disabled:!0,readonly:!0,multiple:!0,checked:!0}),vt=function(t){var e="";for(var n in t){var r=t[n];pt[n]&&(r=r?n:null),null!=r&&(e+=" ".concat(dt(n),'="').concat(dt(r.toString()),'"'))}return e},gt=function(t,e,n,r){r.suppressNoFollow||(n.rel="nofollow"),r.linkAttributeBlock&&r.linkAttributeBlock(t,n),r.linkTextBlock&&(e=r.linkTextBlock(t,e));var i={text:e,attr:vt(n)};return v("<a#{attr}>#{text}</a>",i)},yt=function(t,e,n,r,i){var o=i.symbolTag?"<".concat(i.symbolTag,">").concat(e,"</").concat(i.symbolTag,">"):e;n=dt(n);var u=i.textWithSymbolTag?"<".concat(i.textWithSymbolTag,">").concat(n,"</").concat(i.textWithSymbolTag,">"):n;return i.usernameIncludeSymbol||!e.match(nt)?gt(t,o+u,r,i):o+gt(t,u,r,i)},mt=function(t,e,n){var r=dt(t.cashtag),i=st(n.htmlAttrs||{});return i.href=n.cashtagUrlBase+r,i.title="$".concat(r),i.class=n.cashtagClass,n.targetBlank&&(i.target="_blank"),yt(t,"$",r,i,n)},bt=/[\u0600-\u06FF]|[\u0750-\u077F]|[\u0590-\u05FF]|[\uFE70-\uFEFF]/gm,wt=function(t,e,n){var r=e.substring(t.indices[
20],t.indices[0]+1),i=dt(t.hashtag),o=st(n.htmlAttrs||{});return o.href=n.hashtagUrlBase+i,o.title="#".concat(i),o.class=n.hashtagClass,i.charAt(0).match(bt)&&(o.class+=" rtl"),n.targetBlank&&(o.target="_blank"),yt(t,r,i,o,n)},_t=function(t,e){var n=t.display_url,r=t.expanded_url,i=n.replace(/\u2026/g,"");if(-1!=r.indexOf(i)){var o=r.indexOf(i),u={displayUrlSansEllipses:i,beforeDisplayUrl:r.substr(0,o),afterDisplayUrl:r.substr(o+i.length),precedingEllipsis:n.match(/^\u2026/)?"\u2026":"",followingEllipsis:n.match(/\u2026$/)?"\u2026":""};for(var a in u)u.hasOwnProperty(a)&&(u[a]=dt(u[a]));return u.invisible=e.invisibleTagAttrs,v("<span class='tco-ellipsis'>#{precedingEllipsis}<span #{invisible}> </span></span><span #{invisible}>#{beforeDisplayUrl}</span><span class='js-display-url'>#{displayUrlSansEllipses}</span><span #{invisible}>#{afterDisplayUrl}</span><span class='tco-ellipsis'><span #{invisible}> </span>#{followingEllipsis}</span>",u)}return n},Et=/^https?:\/\//i,It=function(t,e,n){var r=t.url,i=dt(r),o=n.urlEntities&&n.urlEntities[r]||t;o.display_url&&(i=_t(o,n));var u=st(n.htmlAttrs||{});return r.match(Et)||(r="http://".concat(r)),u.href=r,n.targetBlank&&(u.target="_blank"),n.urlClass&&(u.class=n.urlClass),n.urlTarget&&(u.target=n.urlTarget),!n.title&&o.display_url&&(u.title=o.expanded_url),gt(t,i,u,n)},Tt=function(t,e,n){var r=e.substring(t.indices[0],t.indices[0]+1),i=dt(t.screenName),o=dt(t.listSlug),u=t.listSlug&&!n.suppressLists,a=st(n.htmlAttrs||{});return a.class=u?n.listClass:n.usernameClass,a.href=u?n.listUrlBase+i+o:n.usernameUrlBase+i,u||n.suppressDataScreenName||(a["data-screen-name"]=i),n.targetBlank&&(a.target="_blank"),yt(t,r,u?i+o:i,a,n)},xt=function(t,e,n){var r,i;if((n=st(n||{})).hashtagClass=n.hashtagClass||"tweet-url hashtag",n.hashtagUrlBase=n.hashtagUrlBase||"https://twitter.com/search?q=%23",n.cashtagClass=n.cashtagClass||"tweet-url cashtag",n.cashtagUrlBase=n.cashtagUrlBase||"https://twitter.com/search?q=%24",n.listClass=n.listClass||"tweet-url list-slug",n.usernameClass=n.usernameClass||"tweet-url username",n.usernameUrlBase=n.usernameUrlBase||"https://twitter.com/",n.listUrlBase=n.listUrlBase||"https://twitter.com/",n.htmlAttrs=ht(n),n.invisibleTagAttrs=n.invisibleTagAttrs||"style='position:absolute;left:-9999px;'",n.urlEntities){for(r={},s=0,i=n.urlEntities.length;s<i;s++)r[n.urlEntities[s].url]=n.urlEntities[s];n.urlEntities=r}var o="",u=0;e.sort((function(t,e){return t.indices[0]-e.indices[0]}));for(var a=n.htmlEscapeNonEntities?dt:function(t){return t},s=0;s<e.length;s++){var c=e[s];o+=a(t.substring(u,c.indices[0])),c.url?o+=It(c,0,n):c.hashtag?o+=wt(c,t,n):c.screenName?o+=Tt(c,t,n):c.cashtag&&(o+=mt(c,0,n)),u=c.indices[1]}return o+=a(t.substring(u,t.length))},St=function(t,e,n){if(0!==e.length){var r=0,i=0;e.sort((function(t,e){return t.indices[0]-e.indices[0]}));for(var o=0,u=e[0];r<t.length;){if(u.indices[0]===(n?r:i)){var a=u.indices[1]-u.indices[0];if(u.indices[0]=n?i:r,u.indices[1]=u.indices[0]+a,++o===e.length)break;u=e[o]}var s=t.charCodeAt(r);s>=55296&&s<=56319&&r<t.length-1&&(s=t.charCodeAt(r+1))>=56320&&s<=57343&&r++,i++,r++}}},At=function(t,e){St(t,e,!1)},Nt={version1:{version:1,maxWeightedTweetLength:140,scale:1,defaultWeight:1,transformedURLLength:23,ranges:[]},version2:{version:2,maxWeightedTweetLength:280,scale:100,defaultWeight:200,transformedURLLength:23,ranges:[{start:0,end:4351,weight:100},{start:8192,end:8205,weight:100},{start:8208,end:8223,weight:100},{start:8242,end:8247,weight:100}]},version3:{version:3,maxWeightedTweetLength:280,scale:100,defaultWeight:200,emojiParsingEnabled:!0,transformedURLLength:23,ranges:[{start:0,end:4351,weight:100},{start:8192,end:8205,weight:100},{start:8208,end:8223,weight:100},{start:8242,end:8247,weight:100}]},defaults:{version:3,maxWeightedTweetLength:280,scale:100,defaultWeight:200,emojiParsingEnabled:!0,transformedURLLength:23,ranges:[{start:0,end:4351,weight:100},{start:8192,end:8205,weight:100},{start:8208,end:8223,weight:100},{start:8242,end:8247,weight:100}]}},kt=function(t){for(var e=[],n=et(t),r=0;r<n.length;r++)e.push(n[r].hashtag);return e},Dt=function(t){for(var e,n=[],r=ut(t),i=0;i<r.length;i++)""===(e=r[i]).listSlug&&n.push({screenName:e.screenName,indices:e.indices});return n},Ct=function(t){for(var e=[],n=Dt(t),r=0;r<n.length;r++){var i=n[r].screenName;e.push(i)}return e},Ot=o(/^(?:#{spaces})*#{atSigns}([a-zA-Z0-9_]{1,20})/,{atSigns:nt,spaces:a}),Ut=(n(978),function(t,e){var n=e.defaultWeight,r=e.ranges,i=n,o=t.charCodeAt(0);if(Array.isArray(r))for(var u=0,a=r.length;u<a;u++){var s=r[u];if(o>=s.start&&o<=s.end){i=s.weight;break}}return i}),Pt=(n(979),n(806),n(743),n(810),o(/[#{invalidCharsGroup}]/,{invalidCharsGroup:p})),Lt=function(t){return Pt.test(t)},Rt=n(987),Mt=/^https:\/\//i,jt=function(t){return t.reduce((function(t,e){return t[e.indices[
20]]=e,t}),{})},Ft=function(t,e){if(e<t.length-1){var n=t.charCodeAt(e),r=t.charCodeAt(e+1);return 55296<=n&&n<=56319&&56320<=r&&r<=57343}return!1},Vt=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt.defaults,n=Object.keys(e).length?e:Nt.defaults,r=n.defaultWeight,i=n.emojiParsingEnabled,o=n.scale,u=n.maxWeightedTweetLength,a=n.transformedURLLength,s="function"===typeof String.prototype.normalize?t.normalize():t,c=jt(B(s)),f=i?jt(Object(Rt.parse)(s)):[],h=s.length,l=0,d=0,p=!0,v=0;v<h;v++){if(c[v]){var g=c[v],y=g.url;g.indices;l+=a*o,v+=y.length-1}else if(i&&f[v]){var m=f[v],b=m.text;m.indices;l+=r,v+=b.length-1}else v+=Ft(s,v)?1:0,l+=Ut(s.charAt(v),n);p&&(p=!Lt(s.substring(v,v+1))),p&&l<=u*o&&(d=v)}l/=o,p=p&&l>0&&l<=u;var w=Math.floor(l/u*1e3),_=t.length-s.length;return{weightedLength:l,valid:p,permillage:w,validRangeStart:0,validRangeEnd:d+=_,displayRangeStart:0,displayRangeEnd:t.length>0?t.length-1:0}},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt.defaults;return Vt(t,e).weightedLength},Bt=function(t){return t.replace(Q," ").length},Gt=function(t){for(var e,n,r=t.split("<"),i=[],o=0;o<r.length;o+=1)if(n=r[o]){e=n.split(">");for(var u=0;u<e.length;u+=1)i.push(e[u])}else i.push("");return i},zt=(n(989),n(990),n(991),n(993),n(996),n(997),n(667)),Wt=n.n(zt);function Qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ht(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qt(n,!0).forEach((function(e){Wt()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qt(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Kt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt.defaults;if(!t)return"empty";var n=Ht({},Nt.defaults,{},e),r=n.maxWeightedTweetLength;return qt(t,n)>r?"too_long":!!Lt(t)&&"invalid_characters"},$t=o(/^#{validMentionOrList}$/,{validMentionOrList:ot}),Yt=/[a-z\u0400-\u04FF0-9\-._~]/i,Xt=/(?:%[0-9a-f]{2})/i,Jt=/[!$&'()*+,;=]/i,Zt=o("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}
2|#{validateUrlSubDelims}|:)*",{validateUrlUnreserved:Yt,validateUrlPctEncoded:Xt,validateUrlSubDelims:Jt},"i"),te=/(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?)/i,ee=/(?:[a-z](?:[a-z0-9\-]*[a-z0-9])?)/i,ne=/(?:[a-z0-9](?:[a-z0-9_\-]*[a-z0-9])?)/i,re=o(/(?:(?:#{validateUrlSubDomainSegment}\.)*(?:#{validateUrlDomainSegment}\.)#{validateUrlDomainTld})/i,{validateUrlSubDomainSegment:ne,validateUrlDomainSegment:te,validateUrlDomainTld:ee}),ie=/(?:[0-9]|(?:[1-9][0-9])|(?:1[0-9]{2})|(?:2[0-4][0-9])|(?:25[0-5]))/i,oe=o(/(?:#{validateUrlDecOctet}(?:\.#{validateUrlDecOctet}){3})/i,{validateUrlDecOctet:ie}),ue=/(?:\[[a-f0-9:\.]+\])/i,ae=o("(?:#{validateUrlIpv4}|#{validateUrlIpv6})",{validateUrlIpv4:oe,validateUrlIpv6:ue},"i"),se=o("(?:#{validateUrlIp}|#{validateUrlDomain})",{validateUrlIp:ae,validateUrlDomain:re},"i"),ce=/[0-9]{1,5}/,fe=o("(?:(#{validateUrlUserinfo})@)?(#{validateUrlHost})(?::(#{validateUrlPort}))?",{validateUrlUserinfo:Zt,validateUrlHost:se,validateUrlPort:ce},"i"),he=o("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}
2|#{validateUrlSubDelims}|[:|@])",{validateUrlUnreserved:Yt,validateUrlPctEncoded:Xt,validateUrlSubDelims:Jt},"i"),le=o(/(#{validateUrlPchar}|\/|\?)*/i,{validateUrlPchar:he}),de=o(/(\/#{validateUrlPchar}*)*/i,{validateUrlPchar:he}),pe=o(/(#{validateUrlPchar}|\/|\?)*/i,{validateUrlPchar:he}),ve=/(?:[a-z][a-z0-9+\-.]*)/i,ge=o("^(?:([^:/?#]+):\\/\\/)?([^/?#]*)([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$","i"),ye=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9_\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,me=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,be=/(?:(?:[a-z]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,we=o(/(?:(?:#{validateUrlUnicodeSubDomainSegment}\.)*(?:#{validateUrlUnicodeDomainSegment}\.)#{validateUrlUnicodeDomainTld})/i,{validateUrlUnicodeSubDomainSegment:ye,validateUrlUnicodeDomainSegment:me,validateUrlUnicodeDomainTld:be}),_e=o("(?:#{validateUrlIp}|#{validateUrlUnicodeDomain})",{validateUrlIp:ae,validateUrlUnicodeDomain:we},"i"),Ee=o("(?:(#{validateUrlUserinfo})@)?(#{validateUrlUnicodeHost})(?::(#{validateUrlPort}))?",{validateUrlUserinfo:Zt,validateUrlUnicodeHost:_e,validateUrlPort:ce},"i");function Ie(t,e,n){return n?!t||t.match(e)&&RegExp["$&"]===t:"string"===typeof t&&t.match(e)&&RegExp["$&"]===t}var Te={astralLetterAndMarks:z,astralNumerals:K,atSigns:nt,bmpLetterAndMarks:W,bmpNumerals:$,cashtag:r,codePoint:J,cyrillicLettersAndMarks:T,endHashtagMatch:h,endMentionMatch:rt,extractUrl:U,hashSigns:f,hashtagAlpha:H,hashtagAlphaNumeric:X,hashtagBoundary:Z,hashtagSpecialChars:Y,invalidChars:Pt,invalidCharsGroup:p,invalidDomainChars:g,invalidUrlWithoutProtocolPrecedingChars:P,latinAccentChars:x,nonBmpCodePairs:Q,punct:i,rtlChars:bt,spaces:a,spacesGroup:u,urlHasHttps:Mt,urlHasProtocol:Et,validAsciiDomain:M,validateUrlAuthority:fe,validateUrlDecOctet:ie,validateUrlDomain:re,validateUrlDomainSegment:te,validateUrlDomainTld:ee,validateUrlFragment:le,validateUrlHost:se,validateUrlIp:ae,validateUrlIpv4:oe,validateUrlIpv6:ue,validateUrlPath:de,validateUrlPchar:he,validateUrlPctEncoded:Xt,validateUrlPort:ce,validateUrlQuery:pe,validateUrlScheme:ve,validateUrlSubDelims:Jt,validateUrlSubDomainSegment:ne,validateUrlUnencoded:ge,validateUrlUnicodeAuthority:Ee,validateUrlUnicodeDomain:we,validateUrlUnicodeDomainSegment:me,validateUrlUnicodeDomainTld:be,validateUrlUnicodeHost:_e,validateUrlUnicodeSubDomainSegment:ye,validateUrlUnreserved:Yt,validateUrlUserinfo:Zt,validCashtag:s,validCCTLD:l,validDomain:E,validDomainChars:y,validDomainName:m,validGeneralUrlPathChars:S,validGTLD:b,validHashtag:tt,validMentionOrList:ot,validMentionPrecedingChars:it,validPortNumber:I,validPunycode:w,validReply:Ot,validSubdomain:_,validTcoUrl:F,validUrlBalancedParens:A,validUrlPath:k,validUrlPathEndingChars:N,validUrlPrecedingChars:D,validUrlQueryChars:C,validUrlQueryEndingChars:O};n(1002),n(1003);e.a={autoLink:function(t,e){var n=at(t,{extractUrlsWithoutProtocol:!1});return xt(t,n,e)},autoLinkCashtags:function(t,e){var n=c(t);return xt(t,n,e)},autoLinkEntities:xt,autoLinkHashtags:function(t,e){var n=et(t);return xt(t,n,e)},autoLinkUrlsCustom:function(t,e){var n=B(t,{extractUrlsWithoutProtocol:!1});return xt(t,n,e)},autoLinkUsernamesOrLists:function(t,e){var n=ut(t);return xt(t,n,e)},autoLinkWithJSON:function(t,e,n){if(e.user_mentions)for(var r=0;r<e.user_mentions.length;r++)e.user_mentions[r].screenName=e.user_mentions[r].screen_name;if(e.hashtags)for(r=0;r<e.hashtags.length;r++)e.hashtags[r].hashtag=e.hashtags[r].text;if(e.symbols)for(r=0;r<e.symbols.length;r++)e.symbols[r].cashtag=e.symbols[r].text;var i=[];for(var o in e)i=i.concat(e[o]);return At(t,i),xt(t,i,n)},configs:Nt,convertUnicodeIndices:function(t,e,n){if(0!=e.length){var r=0,i=0;e.sort((function(t,e){return t.indices[0]-e.indices[0]}));for(var o=0,u=e[0];r<t.length;){if(u.indices[0]==(n?r:i)){var a=u.indices[1]-u.indices[0];if(u.indices[0]=n?i:r,u.indices[1]=u.indices[0]+a,++o==e.length)break;u=e[o]}var s=t.charCodeAt(r);s>=55296&&s<=56319&&r<t.length-1&&(s=t.charCodeAt(r+1))>=56320&&s<=57343&&r++,i++,r++}}},extractCashtags:function(t){for(var e=[],n=c(t),r=0;r<n.length;r++)e.push(n[r].cashtag);return e},extractCashtagsWithIndices:c,extractEntitiesWithIndices:at,extractHashtags:kt,extractHashtagsWithIndices:et,extractHtmlAttrsFromOptions:ht,extractMentions:Ct,extractMentionsOrListsWithIndices:ut,extractMentionsWithIndices:Dt,extractReplies:function(t){if(!t)return null;var e=t.match(Ot);return!e||RegExp.rightContext.match(rt)?null:e[1]},extractUrls:function(t,e){for(var n=[],r=B(t,e),i=0;i<r.length;i++)n.push(r[i].url);return n},extractUrlsWithIndices:B,getTweetLength:qt,getUnicodeTextLength:Bt,hasInvalidCharacters:Lt,hitHighlight:function(t,e,n){if(n=n||{},0===(e=e||[]).length)return t;var r,i,o,u,a,s,c,f=n.tag||"em",h=["<".concat(f,">"),"</".concat(f,">")],l=Gt(t),d="",p=0,v=l[0],g=0,y=0,m=!1,b=v,w=[];for(r=0;r<e.length;r+=1)for(i=0;i<e[r].length;i+=1)w.push(e[r][i]);for(o=0;o<w.length;o+=1){for(u=w[o],a=h[o%2],s=!1;null!=v&&u>=g+v.length;)d+=b.slice(y),m&&u===g+b.length&&(d+=a,s=!0),l[p+1]&&(d+="<".concat(l[p+1],">")),g+=b.length,y=0,b=v=l[p+=2],m=!1;s||null==v?s||(s=!0,d+=a):(c=u-g,d+=b.slice(y,c)+a,y=c,m=o%2===0)}if(null!=v)for(y<b.length&&(d+=b.slice(y)),o=p+1;o<l.length;o+=1)d+=o%2===0?l[o]:"<".concat(l[o],">");return d},htmlEscape:dt,isInvalidTweet:Kt,isValidHashtag:function(t){if(!t)return!1;var e=kt(t);return 1===e.length&&e[0]===t.slice(1)},isValidList:function(t){var e=t.match($t);return!(!e||""!=e[1]||!e[4])},isValidTweetText:function(t,e){return!Kt(t,e)},isValidUrl:function(t,e,n){if(null==e&&(e=!0),null==n&&(n=!0),!t)return!1;var r=t.match(ge);if(!r||r[0]!==t)return!1;var i=r[1],o=r[2],u=r[3],a=r[4],s=r[5];return!!((!n||Ie(i,ve)&&i.match(/^https?$/i))&&Ie(u,de)&&Ie(a,pe,!0)&&Ie(s,le,!0))&&(e&&Ie(o,Ee)||!e&&Ie(o,fe))},isValidUsername:function(t){if(!t)return!1;var e=Ct(t);return 1===e.length&&e[0]===t.slice(1)},linkTextWithEntity:_t,linkToCashtag:mt,linkToHashtag:wt,linkToMentionAndList:Tt,linkToText:gt,linkToTextWithSymbol:yt,linkToUrl:It,modifyIndicesFromUTF16ToUnicode:function(t,e){St(t,e,!0)},modifyIndicesFromUnicodeToUTF16:At,regexen:Te,removeOverlappingEntities:G,parseTweet:Vt,splitTags:Gt,standardizeIndices:function(t,e,n){var r=Bt(t);if(t.length-r>0){var i=Array.from(t),o=0===e?"":i.slice(0,e).join(""),u=i.slice(e,n).join("");return[o.length,o.length+u.length]}return[e,n]},tagAttrs:vt}},853:function(t,e,n){"use strict";var r=n(197),i=n(814),o=n(196),u=Object.prototype.hasOwnProperty;var a=function(t,e,n){var r=t[e];u.call(t,e)&&Object(o.a)(r,n)&&(void 0!==n||e in t)||Object(i.a)(t,e,n)},s=n(193),c=n(199),f=n(64),h=n(102);var l=function(t,e,n,r){if(!Object(f.a)(t))return t;for(var i=-1,o=(e=Object(s.a)(e,t)).length,u=o-1,l=t;null!=l&&++i<o;){var d=Object(h.a)(e[i]),p=n;if(i!=u){var v=l[d];void 0===(p=r?r(v,d,l):void 0)&&(p=Object(f.a)(v)?v:Object(c.a)(e[i+1])?[]:{})}a(l,d,p),l=l[d]}return t};var d=function(t,e,n){for(var i=-1,o=e.length,u={};++i<o;){var a=e[i],c=Object(r.a)(t,a);n(c,a)&&l(u,Object(s.a)(a,t),c)}return u},p=n(369);var v=function(t,e){return d(t,e,(function(e,n){return Object(p.a)(t,n)}))},g=n(288);var y=function(t){return(null==t?0:t.length)?Object(g.a)(t,1):[]},m=n(370),b=n(368);var w=function(t){return Object(b.a)(Object(m.a)(t,void 0,y),t+"")}((function(t,e){return null==t?{}:v(t,e)}));e.a=w},965:function(t,e,n){"use strict";
2(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=n(220),i=n(278),o=n(398),u=n(279),a=n(966),s=n(397);var c=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(i),f={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},h=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return r.__extends(e,t),e}(Error),l=new o.Logger("@firebase/firestore");function d(){return l.logLevel}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel<=o.LogLevel.DEBUG){var i=e.map(y);l.debug.apply(l,r.__spreadArrays(["Firestore (7.21.1): "+t],i))}}function v(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel<=o.LogLevel.ERROR){var i=e.map(y);l.error.apply(l,r.__spreadArrays(["Firestore (7.21.1): "+t],i))}}function g(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel<=o.LogLevel.WARN){var i=e.map(y);l.warn.apply(l,r.__spreadArrays(["Firestore (7.21.1): "+t],i))}}function y(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t}var e}function m(t){void 0===t&&(t="Unexpected state");var e="FIRESTORE (7.21.1) INTERNAL ASSERTION FAILED: "+t;throw v(e),new Error(e)}function b(t,e){t||m()}function w(t,e){return t}function _(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function E(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function I(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var T=function(){function t(t,e,n){void 0===e?e=0:e>t.length&&m(),void 0===n?n=t.length-e:n>t.length-e&&m(),this.segments=t,this.offset=e,this.t=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.t},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.i(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach((function(t){n.push(t)})):n.push(e),this.o(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.u=function(t){return t=void 0===t?1:t,this.o(this.segments,this.offset+t,this.length-t)},t.prototype.h=function(){return this.o(this.segments,this.offset,this.length-1)},t.prototype.l=function(){return this.segments[this.offset]},t.prototype._=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.m=function(){return 0===this.length},t.prototype.T=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.I=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.A=function(){return this.segments.slice(this.offset,this.limit())},t.i=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.o=function(t,n,r){return new e(t,n,r)},e.prototype.R=function(){return this.A().join("/")},e.prototype.toString=function(){return this.R()},e.P=function(t){if(t.indexOf("//")>=0)throw new h(f.INVALID_ARGUMENT,"Invalid path ("+t+"). Paths must not contain // in them.");return new e(t.split("/").filter((function(t){return t.length>0})))},e.g=function(){return new e([])},e}(T),S=/^[_a-zA-Z][_a-zA-Z0-9]*$/,A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.o=function(t,n,r){return new e(t,n,r)},e.V=function(t){return S.test(t)},e.prototype.R=function(){return this.A().map((function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.V(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.R()},e.prototype.p=function(){return 1===this.length&&"__name__"===this.get(0)},e.v=function(){return new e(["__name__"])},e.S=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new h(f.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},u=!1;i<t.length;){var a=t[i];if("\\"===a){if(i+1===t.length)throw new h(f.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var s=t[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new h(f.INVALID_ARGUMENT,"Path has invali
2d escape sequence: "+t);r+=s,i+=2}else"`"===a?(u=!u,i++):"."!==a||u?(r+=a,i++):(o(),i++)}if(o(),u)throw new h(f.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.g=function(){return new e([])},e}(T),N=function(){function t(t){this.path=t}return t.D=function(e){return new t(x.P(e))},t.C=function(e){return new t(x.P(e).u(5))},t.prototype.N=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===x.i(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.i=function(t,e){return x.i(t.path,e.path)},t.F=function(t){return t.length%2==0},t.$=function(e){return new t(new x(e.slice()))},t}();function k(t,e){if(0!==e.length)throw new h(f.INVALID_ARGUMENT,"Function "+t+"() does not support arguments, but was called with "+H(e.length,"argument")+".")}function D(t,e,n){if(e.length!==n)throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function C(t,e,n){if(e.length<n)throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires at least "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function O(t,e,n,r){if(e.length<n||e.length>r)throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+H(e.length,"argument")+".")}function U(t,e,n,r){F(t,e,Q(n)+" argument",r)}function P(t,e,n,r){void 0!==r&&U(t,e,n,r)}function L(t,e,n,r){F(t,e,n+" option",r)}function R(t,e,n,r){void 0!==r&&L(t,e,n,r)}function M(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){for(var o=[],u=0,a=i;u<a.length;u++){var s=a[u];if(s===r)return;o.push(q(s))}var c=q(r);throw new h(f.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+t+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(t,0,n,r,i)}function j(t,e,n,r){if(!e.some((function(t){return t===r})))throw new h(f.INVALID_ARGUMENT,"Invalid value "+q(r)+" provided to function "+t+"() for its "+Q(n)+" argument. Acceptable values: "+e.join(", "));return r}function F(t,e,n,r){if(!("object"===e?V(r):"non-empty string"===e?"string"==typeof r&&""!==r:typeof r===e)){var i=q(r);throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" to be of type "+e+", but it was: "+i)}}function V(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}function q(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":m()}function B(t,e,n){if(void 0===n)throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+Q(e)+" argument, but it was undefined.")}function G(t,e,n){E(e,(function(e,r){if(n.indexOf(e)<0)throw new h(f.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))}))}function z(t,e,n,r){var i=q(r);return new h(f.INVALID_ARGUMENT,"Function "+t+"() requires its "+Q(n)+" argument to be a "+e+", but it was: "+i)}function W(t,e,n){if(n<=0)throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires its "+Q(e)+" argument to be a positive number, but it was: "+n+".")}function Q(t){switch(t){case 1:return"first";
2case 2:return"second";case 3:return"third";default:return t+"th"}}function H(t,e){return t+" "+e+(1===t?"":"s")}function K(t){var e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(var r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}var $=function(){function t(){}return t.k=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,n="";n.length<20;)for(var r=K(40),i=0;i<r.length;++i)n.length<20&&r[i]<e&&(n+=t.charAt(r[i]%t.length));return n},t}();function Y(t,e){return t<e?-1:t>e?1:0}function X(t,e,n){return t.length===e.length&&t.every((function(t,r){return n(t,e[r])}))}function J(t){return t+"\0"}var Z=function(){function t(t){this.M=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",n=0;n<t.length;++n)e+=String.fromCharCode(t[n]);return e}(e))},t.prototype.toBase64=function(){return t=this.M,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(this.M)},t.prototype.O=function(){return 2*this.M.length},t.prototype.L=function(t){return Y(this.M,t.M)},t.prototype.isEqual=function(t){return this.M===t.M},t}();Z.B=new Z("");var tt=function(){function t(t){this.q=t}return t.fromBase64String=function(e){try{return new t(Z.fromBase64String(e))}catch(e){throw new h(f.INVALID_ARGUMENT,"Failed to construct Bytes from Base64 string: "+e)}},t.fromUint8Array=function(e){return new t(Z.fromUint8Array(e))},t.prototype.toBase64=function(){return this.q.toBase64()},t.prototype.toUint8Array=function(){return this.q.toUint8Array()},t.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.q.isEqual(t.q)},t}();function et(){if("undefined"==typeof Uint8Array)throw new h(f.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function nt(){if("undefined"==typeof atob)throw new h(f.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.fromBase64String=function(t){D("Blob.fromBase64String",arguments,1),U("Blob.fromBase64String","string",1,t),nt();try{return new e(Z.fromBase64String(t))}catch(t){throw new h(f.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},e.fromUint8Array=function(t){if(D("Blob.fromUint8Array",arguments,1),et(),!(t instanceof Uint8Array))throw z("Blob.fromUint8Array","Uint8Array",1,t);return new e(Z.fromUint8Array(t))},e.prototype.toBase64=function(){return D("Blob.toBase64",arguments,0),nt(),t.prototype.toBase64.call(this)},e.prototype.toUint8Array=function(){return D("Blob.toUint8Array",arguments,0),et(),t.prototype.toUint8Array.call(this)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(tt),it=function(t,e,n,r,i){this.U=t,this.persistenceKey=e,this.host=n,this.ssl=r,this.forceLongPolling=i},ot=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"W",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t.prototype.L=function(t){return Y(this.projectId,t.projectId)||Y(this.database,t.database)},t}(),ut=function(){function t(t,e){this.j=t,this.K=e,this.G={}}return t.prototype.get=function(t){var e=this.j(t),n=this.G[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],u=o[0],a=o[1];if(this.K(u,t))return a}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.j(t),r=this.G[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.K(r[i][0],t))return void(r[i]=[t,e]);r.push([t,e])}else this.G[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.j(t),n=this.G[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.K(n[r][0],t))return 1===n.length?delete this.G[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){E(this.G,(function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],u=o[0],a=o[1];t(u,a)}}))},t.prototype.m=function(){return I(this.G)},t}(),at=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new h(f.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new h(f.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new h(f.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new h(f.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.H=function(t){return this.seconds===t.seconds?Y(this.nanoseconds,t.nanoseconds):Y(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
2,t}(),st=function(){function t(t){this.timestamp=t}return t.Y=function(e){return new t(e)},t.min=function(){return new t(new at(0,0))},t.prototype.L=function(t){return this.timestamp.H(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.J=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.X=function(){return this.timestamp},t}();function ct(t){return null==t}function ft(t){return 0===t&&1/t==-1/0}function ht(t){return"number"==typeof t&&Number.isInteger(t)&&!ft(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}var lt=function(t,e,n,r,i,o,u){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===u&&(u=null),this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=u,this.Z=null};function dt(t,e,n,r,i,o,u){return void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===u&&(u=null),new lt(t,e,n,r,i,o,u)}function pt(t){var e=w(t);if(null===e.Z){var n=e.path.R();null!==e.collectionGroup&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((function(t){return function(t){return t.field.R()+t.op.toString()+ie(t.value)}(t)})).join(","),n+="|ob:",n+=e.orderBy.map((function(t){return(e=t).field.R()+e.dir;var e})).join(","),ct(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=ur(e.startAt)),e.endAt&&(n+="|ub:",n+=ur(e.endAt)),e.Z=n}return e.Z}function vt(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var n=0;n<t.orderBy.length;n++)if(!hr(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var r=0;r<t.filters.length;r++)if(i=t.filters[r],o=e.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!te(i.value,o.value))return!1;var i,o;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!sr(t.startAt,e.startAt)&&sr(t.endAt,e.endAt)}function gt(t){return N.F(t.path)&&null===t.collectionGroup&&0===t.filters.length}var yt,mt,bt=function(){function t(t,e,n,r,i,o,u){void 0===i&&(i=st.min()),void 0===o&&(o=st.min()),void 0===u&&(u=Z.B),this.target=t,this.targetId=e,this.tt=n,this.sequenceNumber=r,this.et=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u}return t.prototype.nt=function(e){return new t(this.target,this.targetId,this.tt,e,this.et,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.st=function(e,n){return new t(this.target,this.targetId,this.tt,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e)},t.prototype.it=function(e){return new t(this.target,this.targetId,this.tt,this.sequenceNumber,this.et,e,this.resumeToken)},t}(),wt=function(t){this.count=t};function _t(t){switch(t){case f.OK:return m();case f.CANCELLED:case f.UNKNOWN:case f.DEADLINE_EXCEEDED:case f.RESOURCE_EXHAUSTED:case f.INTERNAL:case f.UNAVAILABLE:case f.UNAUTHENTICATED:return!1;case f.INVALID_ARGUMENT:case f.NOT_FOUND:case f.ALREADY_EXISTS:case f.PERMISSION_DENIED:case f.FAILED_PRECONDITION:case f.ABORTED:case f.OUT_OF_RANGE:case f.UNIMPLEMENTED:case f.DATA_LOSS:return!0;default:return m()}}function Et(t){if(void 0===t)return v("GRPC error has no .code"),f.UNKNOWN;switch(t){case yt.OK:return f.OK;case yt.CANCELLED:return f.CANCELLED;case yt.UNKNOWN:return f.UNKNOWN;case yt.DEADLINE_EXCEEDED:return f.DEADLINE_EXCEEDED;case yt.RESOURCE_EXHAUSTED:return f.RESOURCE_EXHAUSTED;case yt.INTERNAL:return f.INTERNAL;case yt.UNAVAILABLE:return f.UNAVAILABLE;case yt.UNAUTHENTICATED:return f.UNAUTHENTICATED;case yt.INVALID_ARGUMENT:return f.INVALID_ARGUMENT;case yt.NOT_FOUND:return f.NOT_FOUND;case yt.ALREADY_EXISTS:return f.ALREADY_EXISTS;case yt.PERMISSION_DENIED:return f.PERMISSION_DENIED;case yt.FAILED_PRECONDITION:return f.FAILED_PRECONDITION;case yt.ABORTED:return f.ABORTED;case yt.OUT_OF_RANGE:return f.OUT_OF_RANGE;case yt.UNIMPLEMENTED:return f.UNIMPLEMENTED;case yt.DATA_LOSS:return f.DATA_LOSS;default:return m()}}(mt=yt||(yt={}))[mt.OK=0]="OK",mt[mt.CANCELLED=1]="CANCELLED",mt[mt.UNKNOWN=2]="UNKNOWN",mt[mt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",mt[mt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",mt[mt.NOT_FOUND=5]="NOT_FOUND",mt[mt.ALREADY_EXISTS=6]="ALREADY_EXISTS",mt[mt.PERMISSION_DENIED=7]="PERMISSION_DENIED",mt[mt.UNAUTHENTICATED=16]="UNAUTHENTICATED",mt[mt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",mt[mt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",mt[mt.ABORTED=10]="ABORTED",mt[mt.OUT_OF_RANGE=11]="OUT_OF_RANGE",mt[mt.UNIMPLEMENT
2ED=12]="UNIMPLEMENTED",mt[mt.INTERNAL=13]="INTERNAL",mt[mt.UNAVAILABLE=14]="UNAVAILABLE",mt[mt.DATA_LOSS=15]="DATA_LOSS";var It=function(){function t(t,e){this.i=t,this.root=e||xt.EMPTY}return t.prototype.rt=function(e,n){return new t(this.i,this.root.rt(e,n,this.i).copy(null,null,xt.ot,null,null))},t.prototype.remove=function(e){return new t(this.i,this.root.remove(e,this.i).copy(null,null,xt.ot,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.m();){var n=this.i(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.m();){var r=this.i(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.m=function(){return this.root.m()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.at=function(){return this.root.at()},t.prototype.ct=function(){return this.root.ct()},t.prototype.ut=function(t){return this.root.ut(t)},t.prototype.forEach=function(t){this.ut((function(e,n){return t(e,n),!1}))},t.prototype.toString=function(){var t=[];return this.ut((function(e,n){return t.push(e+":"+n),!1})),"{"+t.join(", ")+"}"},t.prototype.ht=function(t){return this.root.ht(t)},t.prototype.lt=function(){return new Tt(this.root,null,this.i,!1)},t.prototype._t=function(t){return new Tt(this.root,t,this.i,!1)},t.prototype.ft=function(){return new Tt(this.root,null,this.i,!0)},t.prototype.dt=function(t){return new Tt(this.root,t,this.i,!0)},t}(),Tt=function(){function t(t,e,n,r){this.wt=r,this.Tt=[];for(var i=1;!t.m();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.wt?t.left:t.right;else{if(0===i){this.Tt.push(t);break}this.Tt.push(t),t=this.wt?t.right:t.left}}return t.prototype.Et=function(){var t=this.Tt.pop(),e={key:t.key,value:t.value};if(this.wt)for(t=t.left;!t.m();)this.Tt.push(t),t=t.right;else for(t=t.right;!t.m();)this.Tt.push(t),t=t.left;return e},t.prototype.It=function(){return this.Tt.length>0},t.prototype.At=function(){if(0===this.Tt.length)return null;var t=this.Tt[this.Tt.length-1];return{key:t.key,value:t.value}},t}(),xt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.m=function(){return!1},t.prototype.ut=function(t){return this.left.ut(t)||t(this.key,this.value)||this.right.ut(t)},t.prototype.ht=function(t){return this.right.ht(t)||t(this.key,this.value)||this.left.ht(t)},t.prototype.min=function(){return this.left.m()?this:this.left.min()},t.prototype.at=function(){return this.min().key},t.prototype.ct=function(){return this.right.m()?this.key:this.right.ct()},t.prototype.rt=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.rt(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.rt(t,e,n))).Rt()},t.prototype.Pt=function(){if(this.left.m())return t.EMPTY;var e=this;return e.left.gt()||e.left.left.gt()||(e=e.yt()),(e=e.copy(null,null,null,e.left.Pt(),null)).Rt()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.m()||i.left.gt()||i.left.left.gt()||(i=i.yt()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.gt()&&(i=i.Vt()),i.right.m()||i.right.gt()||i.right.left.gt()||(i=i.bt()),0===n(e,i.key)){if(i.right.m())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.Pt())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.Rt()},t.prototype.gt=function(){return this.color},t.prototype.Rt=function(){var t=this;return t.right.gt()&&!t.left.gt()&&(t=t.vt()),t.left.gt()&&t.left.left.gt()&&(t=t.Vt()),t.left.gt()&&t.right.gt()&&(t=t.St()),t},t.prototype.yt=function(){var t=this.St();return t.right.left.gt()&&(t=(t=(t=t.copy(null,null,null,null,t.right.Vt())).vt()).St()),t},t.prototype.bt=function(){var t=this.St();return t.left.left.gt()&&(t=(t=t.Vt()).St()),t},t.prototype.vt=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.Vt=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.St=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.Dt=function(){var t=this.Ct();return Math.pow(2,t)<=this.size+1},t.prototype.Ct=function(){if(this.gt()&&this.left.gt())throw m();if(this.right.gt())throw m();var t=this.left.Ct();if(t!==this.right.Ct())throw m();return t+(this.gt()?0:1)},t}();
2xt.EMPTY=null,xt.RED=!0,xt.ot=!1,xt.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw m()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.rt=function(t,e,n){return new xt(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.m=function(){return!0},t.prototype.ut=function(t){return!1},t.prototype.ht=function(t){return!1},t.prototype.at=function(){return null},t.prototype.ct=function(){return null},t.prototype.gt=function(){return!1},t.prototype.Dt=function(){return!0},t.prototype.Ct=function(){return 0},t}());var St=function(){function t(t){this.i=t,this.data=new It(this.i)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.at()},t.prototype.last=function(){return this.data.ct()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.ut((function(e,n){return t(e),!1}))},t.prototype.Nt=function(t,e){for(var n=this.data._t(t[0]);n.It();){var r=n.Et();if(this.i(r.key,t[1])>=0)return;e(r.key)}},t.prototype.Ft=function(t,e){var n;for(n=void 0!==e?this.data._t(e):this.data.lt();n.It();)if(!t(n.Et().key))return},t.prototype.xt=function(t){var e=this.data._t(t);return e.It()?e.Et().key:null},t.prototype.lt=function(){return new At(this.data.lt())},t.prototype._t=function(t){return new At(this.data._t(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).rt(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.m=function(){return this.data.m()},t.prototype.$t=function(t){var e=this;return e.size<t.size&&(e=t,t=this),t.forEach((function(t){e=e.add(t)})),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.lt(),r=e.data.lt();n.It();){var i=n.Et().key,o=r.Et().key;if(0!==this.i(i,o))return!1}return!0},t.prototype.A=function(){var t=[];return this.forEach((function(e){t.push(e)})),t},t.prototype.toString=function(){var t=[];return this.forEach((function(e){return t.push(e)})),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.i);return n.data=e,n},t}(),At=function(){function t(t){this.kt=t}return t.prototype.Et=function(){return this.kt.Et().key},t.prototype.It=function(){return this.kt.It()},t}(),Nt=new It(N.i);function kt(){return Nt}function Dt(){return kt()}var Ct=new It(N.i);function Ot(){return Ct}var Ut=new It(N.i),Pt=new St(N.i);function Lt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=Pt,r=0,i=t;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var Rt=new St(Y);function Mt(){return Rt}var jt=function(){function t(t){this.i=t?function(e,n){return t(e,n)||N.i(e.key,n.key)}:function(t,e){return N.i(t.key,e.key)},this.Mt=Ot(),this.Ot=new It(this.i)}return t.Lt=function(e){return new t(e.i)},t.prototype.has=function(t){return null!=this.Mt.get(t)},t.prototype.get=function(t){return this.Mt.get(t)},t.prototype.first=function(){return this.Ot.at()},t.prototype.last=function(){return this.Ot.ct()},t.prototype.m=function(){return this.Ot.m()},t.prototype.indexOf=function(t){var e=this.Mt.get(t);return e?this.Ot.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.Ot.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.Ot.ut((function(e,n){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.Mt.rt(t.key,t),e.Ot.rt(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.Mt.remove(t),this.Ot.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.Ot.lt(),r=e.Ot.lt();n.It();){var i=n.Et().key,o=r.Et().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach((function(e){t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.i=this.i,r.Mt=e,r.Ot=n,r},t}(),Ft=function(){function t(){this.Bt=new It(N.i)}return t.prototype.track=function(t){var e=t.doc.key,n=this.Bt.get(e);n?0!==t.type&&3===n.type?this.Bt=this.Bt.rt(e,t):3===t.type&&1!==n.type?this.Bt=this.Bt.rt(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.Bt=this.Bt.rt(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.Bt=this.Bt.rt(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.Bt=this.Bt.remove(e):1===t.type&&2===n.type?this.Bt=this.Bt.rt(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.Bt=this.Bt.rt(e,{type:2,doc:t.doc}):m():this.Bt=this.Bt.rt(e,t)},t.prototype.qt=function(){var t=[];return this.Bt.ut((function(e,n){t.push(n)})),t},t}(),Vt=function(){function t(t,e,n,r,i,o,u,a){this.query=t,this.docs=e,this.Ut=n,this.docChanges=r,this.Qt=i,this.fromCache=o,this.Wt=u,this.jt=a}return t.Kt=function(e,n,r,i){var o=[];
2return n.forEach((function(t){o.push({type:0,doc:t})})),new t(e,n,jt.Lt(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.Qt.m()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.Wt===t.Wt&&this.Qt.isEqual(t.Qt)&&Wn(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.Ut.isEqual(t.Ut)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),qt=function(){function t(t,e,n,r,i){this.et=t,this.Gt=e,this.zt=n,this.Ht=r,this.Yt=i}return t.Jt=function(e,n){var r=new Map;return r.set(e,Bt.Xt(e,n)),new t(st.min(),r,Mt(),kt(),Lt())},t}(),Bt=function(){function t(t,e,n,r,i){this.resumeToken=t,this.Zt=e,this.te=n,this.ee=r,this.ne=i}return t.Xt=function(e,n){return new t(Z.B,n,Lt(),Lt(),Lt())},t}(),Gt=function(t,e,n,r){this.se=t,this.removedTargetIds=e,this.key=n,this.ie=r},zt=function(t,e){this.targetId=t,this.re=e},Wt=function(t,e,n,r){void 0===n&&(n=Z.B),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r},Qt=function(){function t(){this.oe=0,this.ae=$t(),this.ce=Z.B,this.ue=!1,this.he=!0}return Object.defineProperty(t.prototype,"Zt",{get:function(){return this.ue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.ce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"le",{get:function(){return 0!==this.oe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_e",{get:function(){return this.he},enumerable:!1,configurable:!0}),t.prototype.fe=function(t){t.O()>0&&(this.he=!0,this.ce=t)},t.prototype.de=function(){var t=Lt(),e=Lt(),n=Lt();return this.ae.forEach((function(r,i){switch(i){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:m()}})),new Bt(this.ce,this.ue,t,e,n)},t.prototype.we=function(){this.he=!1,this.ae=$t()},t.prototype.me=function(t,e){this.he=!0,this.ae=this.ae.rt(t,e)},t.prototype.Te=function(t){this.he=!0,this.ae=this.ae.remove(t)},t.prototype.Ee=function(){this.oe+=1},t.prototype.Ie=function(){this.oe-=1},t.prototype.Ae=function(){this.he=!0,this.ue=!0},t}(),Ht=function(){function t(t){this.Re=t,this.Pe=new Map,this.ge=kt(),this.ye=Kt(),this.Ve=new St(Y)}return t.prototype.pe=function(t){for(var e=0,n=t.se;e<n.length;e++){var r=n[e];t.ie instanceof kn?this.be(r,t.ie):t.ie instanceof Dn&&this.ve(r,t.key,t.ie)}for(var i=0,o=t.removedTargetIds;i<o.length;i++){var u=o[i];this.ve(u,t.key,t.ie)}},t.prototype.Se=function(t){var e=this;this.De(t,(function(n){var r=e.Ce(n);switch(t.state){case 0:e.Ne(n)&&r.fe(t.resumeToken);break;case 1:r.Ie(),r.le||r.we(),r.fe(t.resumeToken);break;case 2:r.Ie(),r.le||e.removeTarget(n);break;case 3:e.Ne(n)&&(r.Ae(),r.fe(t.resumeToken));break;case 4:e.Ne(n)&&(e.Fe(n),r.fe(t.resumeToken));break;default:m()}}))},t.prototype.De=function(t,e){var n=this;t.targetIds.length>0?t.targetIds.forEach(e):this.Pe.forEach((function(t,r){n.Ne(r)&&e(r)}))},t.prototype.xe=function(t){var e=t.targetId,n=t.re.count,r=this.$e(e);if(r){var i=r.target;if(gt(i))if(0===n){var o=new N(i.path);this.ve(e,o,new Dn(o,st.min()))}else b(1===n);else this.ke(e)!==n&&(this.Fe(e),this.Ve=this.Ve.add(e))}},t.prototype.Me=function(t){var e=this,n=new Map;this.Pe.forEach((function(r,i){var o=e.$e(i);if(o){if(r.Zt&>(o.target)){var u=new N(o.target.path);null!==e.ge.get(u)||e.Oe(i,u)||e.ve(i,u,new Dn(u,t))}r._e&&(n.set(i,r.de()),r.we())}}));var r=Lt();this.ye.forEach((function(t,n){var i=!0;n.Ft((function(t){var n=e.$e(t);return!n||2===n.tt||(i=!1,!1)})),i&&(r=r.add(t))}));var i=new qt(t,n,this.Ve,this.ge,r);return this.ge=kt(),this.ye=Kt(),this.Ve=new St(Y),i},t.prototype.be=function(t,e){if(this.Ne(t)){var n=this.Oe(t,e.key)?2:0;this.Ce(t).me(e.key,n),this.ge=this.ge.rt(e.key,e),this.ye=this.ye.rt(e.key,this.Le(e.key).add(t))}},t.prototype.ve=function(t,e,n){if(this.Ne(t)){var r=this.Ce(t);this.Oe(t,e)?r.me(e,1):r.Te(e),this.ye=this.ye.rt(e,this.Le(e).delete(t)),n&&(this.ge=this.ge.rt(e,n))}},t.prototype.removeTarget=function(t){this.Pe.delete(t)},t.prototype.ke=function(t){var e=this.Ce(t).de();return this.Re.Be(t).size+e.te.size-e.ne.size},t.prototype.Ee=function(t){this.Ce(t).Ee()},t.prototype.Ce=function(t){var e=this.Pe.get(t);return e||(e=new Qt,this.Pe.set(t,e)),e},t.prototype.Le=function(t){var e=this.ye.get(t);return e||(e=new St(Y),this.ye=this.ye.rt(t,e)),e},t.prototype.Ne=function(t){var e=null!==this.$e(t);return e||p("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.$e=function(t){var e=this.Pe.get(t);return e&&e.le?null:this.Re.qe(t)},t.prototype.Fe=function(t){var e=this;this.Pe.set(t,new Qt),this.Re.Be(t).forEach((function(n){e.ve(t,n,null)}))},t.prototype.Oe=function(t,e){return this.Re.Be(t).has(e)},t}();function Kt(){return new It(N.i)}function $t(){return new It(N.i)}function Yt(t){var e,n;return"server_timestamp"===(null===(n=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Xt(t){var e=oe(t.mapValue.fields.__local_write_time__.timestampValue);return new at(e.seconds,e.nanos)}var Jt=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Zt(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Yt(t)?4:10:m()}function te(t,e){var n=Zt(t);if(n!==Zt(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Xt(t).isEqual(Xt(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var n=oe(t.timestampValue),r=oe(e.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return ae(t.bytesValue).isEqual(ae(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return ue(t.geoPointValue.latitude)===ue(e.geoPointValue.latitude)&&ue(t.geoPointValue.longitude)===ue(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return ue(t.integerValue)===ue(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var n=ue(t.doubleValue),r=ue(e.doubleValue);return n===r?ft(n)===ft(r):isNaN(n)&&isNaN(r)}return!1}(t,e);case 9:return X(t.arrayValue.values||[],e.arrayValue.values||[],te);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(_(n)!==_(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!te(n[i],r[i])))return!1;return!0}(t,e);default:return m()}}function ee(t,e){return void 0!==(t.values||[]).find((function(t){return te(t,e)}))}function ne(t,e){var n=Zt(t),r=Zt(e);
2if(n!==r)return Y(n,r);switch(n){case 0:return 0;case 1:return Y(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=ue(t.integerValue||t.doubleValue),r=ue(e.integerValue||e.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return re(t.timestampValue,e.timestampValue);case 4:return re(Xt(t),Xt(e));case 5:return Y(t.stringValue,e.stringValue);case 6:return function(t,e){var n=ae(t),r=ae(e);return n.L(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i<n.length&&i<r.length;i++){var o=Y(n[i],r[i]);if(0!==o)return o}return Y(n.length,r.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var n=Y(ue(t.latitude),ue(e.latitude));return 0!==n?n:Y(ue(t.longitude),ue(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var n=t.values||[],r=e.values||[],i=0;i<n.length&&i<r.length;++i){var o=ne(n[i],r[i]);if(o)return o}return Y(n.length,r.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var n=t.fields||{},r=Object.keys(n),i=e.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var u=0;u<r.length&&u<o.length;++u){var a=Y(r[u],o[u]);if(0!==a)return a;var s=ne(n[r[u]],i[o[u]]);if(0!==s)return s}return Y(r.length,o.length)}(t.mapValue,e.mapValue);default:throw m()}}function re(t,e){if("string"==typeof t&&"string"==typeof e&&t.length===e.length)return Y(t,e);var n=oe(t),r=oe(e),i=Y(n.seconds,r.seconds);return 0!==i?i:Y(n.nanos,r.nanos)}function ie(t){return function t(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(t){var e=oe(t);return"time("+e.seconds+","+e.nanos+")"}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?ae(e.bytesValue).toBase64():"referenceValue"in e?(r=e.referenceValue,N.C(r).toString()):"geoPointValue"in e?"geo("+(n=e.geoPointValue).latitude+","+n.longitude+")":"arrayValue"in e?function(e){for(var n="[",r=!0,i=0,o=e.values||[];i<o.length;i++){var u=o[i];r?r=!1:n+=",",n+=t(u)}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){for(var n="{",r=!0,i=0,o=Object.keys(e.fields||{}).sort();i<o.length;i++){var u=o[i];r?r=!1:n+=",",n+=u+":"+t(e.fields[u])}return n+"}"}(e.mapValue):m();var n,r}(t)}function oe(t){if(b(!!t),"string"==typeof t){var e=0,n=Jt.exec(t);if(b(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:ue(t.seconds),nanos:ue(t.nanos)}}function ue(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function ae(t){return"string"==typeof t?Z.fromBase64String(t):Z.fromUint8Array(t)}function se(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.R()}}function ce(t){return!!t&&"integerValue"in t}function fe(t){return!!t&&"arrayValue"in t}function he(t){return!!t&&"nullValue"in t}function le(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function de(t){return!!t&&"mapValue"in t}var pe={asc:"ASCENDING",desc:"DESCENDING"},ve={"<":"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"},ge=function(t,e){this.U=t,this.Ue=e};function ye(t){return{integerValue:""+t}}function me(t,e){if(t.Ue){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ft(e)?"-0":e}}function be(t,e){return ht(e)?ye(e):me(t,e)}function we(t,e){return t.Ue?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function _e(t,e){return t.Ue?e.toBase64():e.toUint8Array()}function Ee(t,e){return we(t,e.X())}function Ie(t){return b(!!t),st.Y(function(t){var e=oe(t);return new at(e.seconds,e.nanos)}(t))}function Te(t,e){return function(t){return new x(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).R()}function xe(t){var e=x.P(t);return b(Qe(e)),e}function Se(t,e){return Te(t.U,e.path)}function Ae(t,e){var n=xe(e);return b(n.get(1)===t.U.projectId),b(!n.get(3)&&!t.U.database||n.get(3)===t.U.database),new N(Ce(n))}function Ne(t,e){return Te(t.U,e)}function ke(t){var e=xe(t);return 4===e.length?x.g():Ce(e)}function De(t){return new x(["projects",t.U.projectId,"databases",t.U.database]).R()}function Ce(t){return b(t.length>4&&"documents"===t.get(4)),t.u(5)}function Oe(t,e,n){return{name:Se(t,e),fields:n.proto.mapValue.fields}}function Ue(t,e){var n;if(e instanceof yn)n={update:Oe(t,e.key,e.value)};else if(e instanceof In)n={delete:Se(t,e.key)};else if(e instanceof mn)n={update:Oe(t,e.key,e.data),updateMask:We(e.Qe)};else if(e instanceof wn)n={transform:{document:Se(t,e.key),fieldTransforms:e.fieldTransforms.map((function(t){return function(t,e){var n=e.transform;if(n instanceof Xe)return{fieldPath:e.field.R(),setToServerValue:"REQUEST_TIME"};if(n instanceof Je)return{fieldPath:e.field.R(),appendMissingElements:{values:n.elements}};if(n instanceof tn)return{fieldPath:e.field.R(),removeAllFromArray:{values:n.elements}};if(n instanceof nn)return{fieldPath:e.field.R(),increment:n.We};throw m()}(0,t)}))}};else{if(!(e instanceof Tn))return m();n={verify:Se(t,e.key)}}return e.Ke.je||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:Ee(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:m()}(t,e.Ke)),n}function Pe(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?cn.updateTime(Ie(t.updateTime)):void 0!==t.exists?cn.exists(t.exists):cn.Ge()}(e.currentDocument):cn.Ge();if(e.update){e.update.name;var r=Ae(t,e.update.name),i=new xn({mapValue:{fields:e.update.fields}});if(e.updateMask){var o=function(t){var e=t.fieldPaths||[];return new un(e.map((function(t){return A.S(t)})))}(e.updateMask);return new mn(r,i,o,n)}return new yn(r,i,n)}if(e.delete){var u=Ae(t,e.delete);return new In(u,n)}if(e.transform){var a=Ae(t,e.transform.document),s=e.transform.fieldTransforms.map((function(e){return function(t,e){var n=null;if("setToServerValue"in e)b("REQUEST_TIME"===e.setToServerValue),n=new Xe;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new Je(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new tn(i)}else"increment"in e?n=new nn(t,e.increment):m();var o=A.S(e.fieldPath);return new an(o,n)}(t,e)}));return b(!0===n.exists),new wn(a,s)}if(e.verify){var c=Ae(t,e.verify);return new Tn(c,n)}return m()}function Le(t,e){return{documents:[Ne(t,e.path)]}}function Re(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=Ne(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Ne(t,r.h()),n.structuredQuery.from=[{collectionId:r._()}]);var i=function(t){if(0!==t.length){var e=t.map((function(t){return function(t){if("=="===t.op){if(le(t.value))return{unaryFilter:{field:qe(t.field),op:"IS_NAN"}};if(he(t.value))return{unaryFilter:{field:qe(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(le(t.value))return{unaryFilter:{field:qe(t.field),op:"IS_NOT_NA
2N"}};if(he(t.value))return{unaryFilter:{field:qe(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:qe(t.field),op:Ve(t.op),value:t.value}}}(t)}));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);i&&(n.structuredQuery.where=i);var o=function(t){if(0!==t.length)return t.map((function(t){return function(t){return{field:qe(t.field),direction:Fe(t.dir)}}(t)}))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);var u=function(t,e){return t.Ue||ct(e)?e:{value:e}}(t,e.limit);return null!==u&&(n.structuredQuery.limit=u),e.startAt&&(n.structuredQuery.startAt=Me(e.startAt)),e.endAt&&(n.structuredQuery.endAt=Me(e.endAt)),n}function Me(t){return{before:t.before,values:t.position}}function je(t){var e=!!t.before,n=t.values||[];return new or(n,e)}function Fe(t){return pe[t]}function Ve(t){return ve[t]}function qe(t){return{fieldPath:t.R()}}function Be(t){return A.S(t.fieldPath)}function Ge(t){return Yn.create(Be(t.fieldFilter.field),function(t){switch(t){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";case"OPERATOR_UNSPECIFIED":default:return m()}}(t.fieldFilter.op),t.fieldFilter.value)}function ze(t){switch(t.unaryFilter.op){case"IS_NAN":var e=Be(t.unaryFilter.field);return Yn.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=Be(t.unaryFilter.field);return Yn.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Be(t.unaryFilter.field);return Yn.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Be(t.unaryFilter.field);return Yn.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return m()}}function We(t){var e=[];return t.fields.forEach((function(t){return e.push(t.R())})),{fieldPaths:e}}function Qe(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)}var He=function(){this.ze=void 0};function Ke(t,e,n){return t instanceof Xe?function(t,e){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof Je?Ze(t,e):t instanceof tn?en(t,e):function(t,e){var n=Ye(t,e),r=rn(n)+rn(t.We);return ce(n)&&ce(t.We)?ye(r):me(t.serializer,r)}(t,e)}function $e(t,e,n){return t instanceof Je?Ze(t,e):t instanceof tn?en(t,e):n}function Ye(t,e){return t instanceof nn?ce(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null;var n}var Xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(He),Je=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return r.__extends(e,t),e}(He);function Ze(t,e){for(var n=on(e),r=function(t){n.some((function(e){return te(e,t)}))||n.push(t)},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var tn=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return r.__extends(e,t),e}(He);function en(t,e){for(var n=on(e),r=function(t){n=n.filter((function(e){return!te(e,t)}))},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var nn=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).serializer=e,r.We=n,r}return r.__extends(e,t),e}(He);function rn(t){return ue(t.integerValue||t.doubleValue)}function on(t){return fe(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}var un=function(){function t(t){this.fields=t,t.sort(A.i)}return t.prototype.He=function(t){for(var e=0,n=this.fields;e<n.length;e++)if(n[e].T(t))return!0;return!1},t.prototype.isEqual=function(t){return X(this.fields,t.fields,(function(t,e){return t.isEqual(e)}))},t}(),an=function(t,e){this.field=t,this.transform=e},sn=function(t,e){this.version=t,this.transformResults=e},cn=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.Ge=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"je",{get:function(){return void 0===this.updateTime&&void 0===this.exists}
2,enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function fn(t,e){return void 0!==t.updateTime?e instanceof kn&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof kn}var hn=function(){};function ln(t,e,n){return t instanceof yn?function(t,e,n){return new kn(t.key,n.version,t.value,{hasCommittedMutations:!0})}(t,0,n):t instanceof mn?function(t,e,n){if(!fn(t.Ke,e))return new Cn(t.key,n.version);var r=bn(t,e);return new kn(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):t instanceof wn?function(t,e,n){if(b(null!=n.transformResults),!fn(t.Ke,e))return new Cn(t.key,n.version);var r=_n(t,e),i=function(t,e,n){var r=[];b(t.length===n.length);for(var i=0;i<n.length;i++){var o=t[i],u=o.transform,a=null;e instanceof kn&&(a=e.field(o.field)),r.push($e(u,a,n[i]))}return r}(t.fieldTransforms,e,n.transformResults),o=n.version,u=En(t,r.data(),i);return new kn(t.key,o,u,{hasCommittedMutations:!0})}(t,e,n):function(t,e,n){return new Dn(t.key,n.version,{hasCommittedMutations:!0})}(t,0,n)}function dn(t,e,n,r){return t instanceof yn?function(t,e){if(!fn(t.Ke,e))return e;var n=gn(e);return new kn(t.key,n,t.value,{Ye:!0})}(t,e):t instanceof mn?function(t,e){if(!fn(t.Ke,e))return e;var n=gn(e),r=bn(t,e);return new kn(t.key,n,r,{Ye:!0})}(t,e):t instanceof wn?function(t,e,n,r){if(!fn(t.Ke,e))return e;var i=_n(t,e),o=function(t,e,n,r){for(var i=[],o=0,u=t;o<u.length;o++){var a=u[o],s=a.transform,c=null;n instanceof kn&&(c=n.field(a.field)),null===c&&r instanceof kn&&(c=r.field(a.field)),i.push(Ke(s,c,e))}return i}(t.fieldTransforms,n,e,r),u=En(t,i.data(),o);return new kn(t.key,i.version,u,{Ye:!0})}(t,e,r,n):function(t,e){return fn(t.Ke,e)?new Dn(t.key,st.min()):e}(t,e)}function pn(t,e){return t instanceof wn?function(t,e){for(var n=null,r=0,i=t.fieldTransforms;r<i.length;r++){var o=i[r],u=e instanceof kn?e.field(o.field):void 0,a=Ye(o.transform,u||null);null!=a&&(n=null==n?(new Sn).set(o.field,a):n.set(o.field,a))}return n?n.Je():null}(t,e):null}function vn(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.Ke.isEqual(e.Ke)&&(0===t.type?t.value.isEqual(e.value):1===t.type?t.data.isEqual(e.data)&&t.Qe.isEqual(e.Qe):2!==t.type||X(t.fieldTransforms,t.fieldTransforms,(function(t,e){return function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof Je&&e instanceof Je||t instanceof tn&&e instanceof tn?X(t.elements,e.elements,te):t instanceof nn&&e instanceof nn?te(t.We,e.We):t instanceof Xe&&e instanceof Xe}(t.transform,e.transform)}(t,e)})))}function gn(t){return t instanceof kn?t.version:st.min()}var yn=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).key=e,i.value=n,i.Ke=r,i.type=0,i}return r.__extends(e,t),e}(hn),mn=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this)||this).key=e,o.data=n,o.Qe=r,o.Ke=i,o.type=1,o}return r.__extends(e,t),e}(hn);function bn(t,e){return function(t,e){var n=new Sn(e);return t.Qe.fields.forEach((function(e){if(!e.m()){var r=t.data.field(e);null!==r?n.set(e,r):n.delete(e)}})),n.Je()}(t,e instanceof kn?e.data():xn.empty())}var wn=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.fieldTransforms=n,r.type=2,r.Ke=cn.exists(!0),r}return r.__extends(e,t),e}(hn);function _n(t,e){return e}function En(t,e,n){for(var r=new Sn(e),i=0;i<t.fieldTransforms.length;i++){var o=t.fieldTransforms[i];r.set(o.field,n[i])}return r.Je()}var In=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Ke=n,r.type=3,r}return r.__extends(e,t),e}(hn),Tn=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Ke=n,r.type=4,r}return r.__extends(e,t),e}(hn),xn=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t.m())return this.proto;for(var e=this.proto,n=0;n<t.length-1;++n){if(!e.mapValue.fields)return null;if(!de(e=e.mapValue.fields[t.get(n)]))return null}return(e=(e.mapValue.fields||{})[t._()])||null},t.prototype.isEqual=function(t){return te(this.proto,t.proto)},t}(),Sn=function(){function t(t){void 0===t&&(t=xn.empty()),this.Xe=t,this.Ze=new Map}return t.prototype.set=function(t,e){return this.tn(t,e),this},t.prototype.delete=function(t){return this.tn(t,null),this},t.prototype.tn=function(t,e){for(var n=this.Ze,r=0;r<t.length-1;++r){var i=t.get(r),o=n.get(i);o instanceof Map?n=o:o&&10===Zt(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(t._(),e)},t.prototype.Je=function(){var t=this.en(A.g(),this.Ze);return null!=t?new xn(t):this.Xe},t.prototype.en=function(t,e){var n=this,r=!1,i=this.Xe.field(t),o=de(i)?Object.assign({},i.mapValue.fields):{};return e.forEach((function(e,i){if(e instanceof Map){var u=n.en(t.child(i),e);null!=u&&(o[i]=u,r=!0)}else null!==e?(o[i]=e,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},t}();function An(t){var e=[];return E(t.fields||{},(function(t,n){var r=new A([t]);if(de(n)){var i=An(n.mapValue).fields;
2if(0===i.length)e.push(r);else for(var o=0,u=i;o<u.length;o++){var a=u[o];e.push(r.child(a))}}else e.push(r)})),new un(e)}var Nn=function(t,e){this.key=t,this.version=e},kn=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this,e,n)||this).nn=r,o.Ye=!!i.Ye,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return r.__extends(e,t),e.prototype.field=function(t){return this.nn.field(t)},e.prototype.data=function(){return this.nn},e.prototype.sn=function(){return this.nn.proto},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.Ye===t.Ye&&this.hasCommittedMutations===t.hasCommittedMutations&&this.nn.isEqual(t.nn)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.nn.toString()+", {hasLocalMutations: "+this.Ye+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.Ye||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(Nn),Dn=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return r.__extends(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.hasCommittedMutations===this.hasCommittedMutations&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(Nn),Cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(Nn),On=function(t,e,n,r,i,o,u,a){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o="F"),void 0===u&&(u=null),void 0===a&&(a=null),this.path=t,this.collectionGroup=e,this.rn=n,this.filters=r,this.limit=i,this.on=o,this.startAt=u,this.endAt=a,this.an=null,this.cn=null,this.startAt,this.endAt};function Un(t,e,n,r,i,o,u,a){return new On(t,e,n,r,i,o,u,a)}function Pn(t){return new On(t)}function Ln(t){return!ct(t.limit)&&"F"===t.on}function Rn(t){return!ct(t.limit)&&"L"===t.on}function Mn(t){return t.rn.length>0?t.rn[0].field:null}function jn(t){for(var e=0,n=t.filters;e<n.length;e++){var r=n[e];if(r.un())return r.field}return null}function Fn(t){return null!==t.collectionGroup}function Vn(t){var e=w(t);if(null===e.an){e.an=[];var n=jn(e),r=Mn(e);if(null!==n&&null===r)n.p()||e.an.push(new cr(n)),e.an.push(new cr(A.v(),"asc"));else{for(var i=!1,o=0,u=e.rn;o<u.length;o++){var a=u[o];e.an.push(a),a.field.p()&&(i=!0)}if(!i){var s=e.rn.length>0?e.rn[e.rn.length-1].dir:"asc";e.an.push(new cr(A.v(),s))}}}return e.an}function qn(t){var e=w(t);if(!e.cn)if("F"===e.on)e.cn=dt(e.path,e.collectionGroup,Vn(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var n=[],r=0,i=Vn(e);r<i.length;r++){var o=i[r],u="desc"===o.dir?"asc":"desc";n.push(new cr(o.field,u))}var a=e.endAt?new or(e.endAt.position,!e.endAt.before):null,s=e.startAt?new or(e.startAt.position,!e.startAt.before):null;e.cn=dt(e.path,e.collectionGroup,n,e.filters,e.limit,a,s)}return e.cn}function Bn(t,e,n){return new On(t.path,t.collectionGroup,t.rn.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Gn(t,e){return new On(t.path,t.collectionGroup,t.rn.slice(),t.filters.slice(),t.limit,t.on,e,t.endAt)}function zn(t,e){return new On(t.path,t.collectionGroup,t.rn.slice(),t.filters.slice(),t.limit,t.on,t.startAt,e)}function Wn(t,e){return vt(qn(t),qn(e))&&t.on===e.on}function Qn(t){return pt(qn(t))+"|lt:"+t.on}function Hn(t){return"Query(target="+function(t){var e=t.path.R();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=", filters: ["+t.filters.map((function(t){return(e=t).field.R()+" "+e.op+" "+ie(e.value);var e})).join(", ")+"]"),ct(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=", orderBy: ["+t.orderBy.map((function(t){return(e=t).field.R()+" ("+e.dir+")";var e})).join(", ")+"]"),t.startAt&&(e+=", startAt: "+ur(t.startAt)),t.endAt&&(e+=", endAt: "+ur(t.endAt)),"Target("+e+")"}(qn(t))+"; limitType="+t.on+")"}function Kn(t,e){return function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.N(t.collectionGroup)&&t.path.T(n):N.F(t.path)?t.path.isEqual(n):t.path.I(n)}(t,e)&&function(t,e){for(var n=0,r=t.rn;n<r.length;n++){var i=r[n];if(!i.field.p()&&null===e.field(i.field))return!1}return!0}(t,e)&&function(t,e){for(var n=0,r=t.filters;n<r.length;n++)if(!r[n].matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!ar(t.startAt,Vn(t),e))&&(!t.endAt||!ar(t.endAt,Vn(t),e))}(t,e)}function $n(t){return function(e,n){for(var r=!1,i=0,o=Vn(t);i<o.length;i++){var u=o[i],a=fr(u,e,n);if(0!==a)return a;r=r||u.field.p()}return 0}}var Yn=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).field=e,i.op=n,i.value=r,i}return r.__extends(e,t),e.create=function(t,n,r){if(t.p())return"in"===n||"not-in"===n?this.hn(t,n,r):new Xn(t,n,r);if(he(r)){if("=="!==n&&"!="!==n)throw new h(f.INVALID_ARGUMENT,"Invalid query. Null only supports '==' and '!=' comparisons.");return new e(t,n,r)}if(le(r)){if("=="!==n&&"!="!==n)throw new h(f.INVALID_ARGUMENT,"Invalid query. NaN only supports '==' and '!=' comparisons.");return new e(t,n,r)}return"array-contains"===n?new er(t,r):"in"===n?new nr(t,r):"not-in"===n?new rr(t,r):"array-contains-any"===n?new ir(t,r):new e(t,n,r)},e.hn=function(t,e,n){return"in"===e?new Jn(t,n):new Zn(t,n)},e.prototype.matches=function(t){var e=t.field(this.field);return"!="===this.op?null!==e&&this.ln(ne(e,this.value)):null!==e&&Zt(this.value)===Zt(e)&&this.ln(ne(e,this.value))},e.prototype.ln=function(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return 0===t;case"!=":return 0!==t;case">":return t>0;case">=":return t>=0;default:return m()}},e.prototype.un=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},e}((function(){})),Xn=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,r)||this).key=N.C(r.referenceValue),i}return r.__extends(e,t),e.prototype.matches=function(t){var e=N.i(t.key,this.key);return this.ln(e)},e}(Yn),Jn=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"in",n)||this).keys=tr("in",n),r}return r.__extends(e,t),e.prototype.matches=function(t){return this.keys.some((function(e){return e.isEqual(t.key)}))},e}(Yn),Zn=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"not-in",n)||this).keys=tr("not-in",n),r}return r.__extends(e,t),e.prototype.matches=function(t){return!this.keys.some((function(e){return e.isEqual(t.key)}))},e}(Yn);function tr(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(t){return N.C(t.referenceValue)}))}var er=function(t){function e(e,n){return t.call(this,e,"array-contains",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return fe(e)&&ee(e.arrayValue,this.value)},e}(Yn),nr=function(t){function e(e,n){return t.call(this,e,"in",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&ee(this.value.arrayValue,e)},e}(Yn),rr=function(t){function e(e,n){return t.call(this,e,"not-in",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){if(ee(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.field(this.field);return null!==e&&!ee(this.value.arrayValue,e)},e}(Yn),ir=function(t){function e(e,n){return t.call(this,e,"array-contains-any",n)||this}return r.__extends(e,t),e.prototype.matches=function(t){var e=this,n=t.field(this.field);return!(!fe(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(t){return ee(e.value.arrayValue,t)}))},e}(Yn),or=function(t,e){this.position=t,this.before=e};function ur(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return ie(t)})).join(",")}function ar(t,e,n){for(var r=0,i=0;i<t.position.length;i++){var o=e[i],u=t.position[i];if(r=o.field.p()?N.i(N.C(u.referenceValue),n.key):ne(u,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return t.before?r<=0:r<0}function sr(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var n=0;n<t.position.length;n++)if(!te(t.position[n],e.position[n]))return!1;return!0}var cr=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function fr(t,e,n){var r=t.field.p()?N.i(e.key,n.key):function(t,e,n){var r=e.field(t),i=n.field(t);return null!==r&&null!==i?ne(r,i):m()}
2(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return m()}}function hr(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}var lr=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},dr=function(){function t(t,e,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this._n=t,this.fn=e,this.dn=n,this.wn=r,this.mn=i,this.Tn=0,this.En=null,this.In=Date.now(),this.reset()}return t.prototype.reset=function(){this.Tn=0},t.prototype.An=function(){this.Tn=this.mn},t.prototype.Rn=function(t){var e=this;this.cancel();var n=Math.floor(this.Tn+this.Pn()),r=Math.max(0,Date.now()-this.In),i=Math.max(0,n-r);i>0&&p("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.Tn+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.En=this._n.gn(this.fn,i,(function(){return e.In=Date.now(),t()})),this.Tn*=this.wn,this.Tn<this.dn&&(this.Tn=this.dn),this.Tn>this.mn&&(this.Tn=this.mn)},t.prototype.yn=function(){null!==this.En&&(this.En.Vn(),this.En=null)},t.prototype.cancel=function(){null!==this.En&&(this.En.cancel(),this.En=null)},t.prototype.Pn=function(){return(Math.random()-.5)*this.Tn},t}(),pr=function(){function t(t){var e=this;this.pn=null,this.bn=null,this.result=void 0,this.error=void 0,this.vn=!1,this.Sn=!1,t((function(t){e.vn=!0,e.result=t,e.pn&&e.pn(t)}),(function(t){e.vn=!0,e.error=t,e.bn&&e.bn(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.Sn&&m(),this.Sn=!0,this.vn?this.error?this.Dn(n,this.error):this.Cn(e,this.result):new t((function(t,i){r.pn=function(n){r.Cn(e,n).next(t,i)},r.bn=function(e){r.Dn(n,e).next(t,i)}}))},t.prototype.Nn=function(){var t=this;return new Promise((function(e,n){t.next(e,n)}))},t.prototype.Fn=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.Cn=function(e,n){return e?this.Fn((function(){return e(n)})):t.resolve(n)},t.prototype.Dn=function(e,n){return e?this.Fn((function(){return e(n)})):t.reject(n)},t.resolve=function(e){return new t((function(t,n){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.xn=function(e){return new t((function(t,n){var r=0,i=0,o=!1;e.forEach((function(e){++r,e.next((function(){++i,o&&i===r&&t()}),(function(t){return n(t)}))})),o=!0,i===r&&t()}))},t.$n=function(e){for(var n=t.resolve(!1),r=function(e){n=n.next((function(n){return n?t.resolve(n):e()}))},i=0,o=e;i<o.length;i++)r(o[i]);return n},t.forEach=function(t,e){var n=this,r=[];return t.forEach((function(t,i){r.push(e.call(n,t,i))})),this.xn(r)},t}(),vr=function(){function e(t,n,r){this.name=t,this.version=n,this.kn=r,12.2===e.Mn(u.getUA())&&v("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.delete=function(t){return p("SimpleDb","Removing database:",t),_r(window.indexedDB.deleteDatabase(t)).Nn()},e.On=function(){if("undefined"==typeof indexedDB)return!1;if(e.Ln())return!0;var t=u.getUA(),n=e.Mn(t),r=0<n&&n<10,i=e.Bn(t),o=0<i&&i<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||o)},e.Ln=function(){var e;return"undefined"!=typeof t&&"YES"===(null===(e=Object({NODE_ENV:"production",PUBLIC_URL:"https://chatcast.jp",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}))||void 0===e?void 0:e.qn)},e.Un=function(t,e){return t.store(e)},e.Mn=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.Bn=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.Qn=function(){return r.__awaiter(this,void 0,void 0,(function(){var t,e=this;return r.__generator(this,(function(n){switch(n.label){case 0:return this.db?[3,2]:(p("SimpleDb","Opening database:",this.name),t=this,[4,new Promise((function(t,n){var r=indexedDB.open(e.name,e.version);r.onsuccess=function(e){var n=e.target.result;t(n)},r.onblocked=function(){n(new yr("Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=function(t){var e=t.target.error;"VersionError"===e.name?n(new h(f.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.")):n(new yr(e))},r.onupgradeneeded=function(t){p("SimpleDb",'Database "'+e.name+'" requires upgrade from version:',t.oldVersion);var n=t.target.result;e.kn.createOrUpgrade(n,r.transaction,t.oldVersion,e.version).next((function(){p("SimpleDb","Database upgrade to version "+e.version+" complete")}
2))}}))]);case 1:t.db=n.sent(),n.label=2;case 2:return[2,(this.Wn&&(this.db.onversionchange=function(t){return e.Wn(t)}),this.db)]}}))}))},e.prototype.jn=function(t){this.Wn=t,this.db&&(this.db.onversionchange=function(e){return t(e)})},e.prototype.runTransaction=function(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a,s;return r.__generator(this,(function(c){switch(c.label){case 0:i="readonly"===t,o=0,u=function(){var t,u,s,c,f;return r.__generator(this,(function(r){switch(r.label){case 0:++o,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,a.Qn()];case 2:return a.db=r.sent(),t=br.open(a.db,i?"readonly":"readwrite",e),u=n(t).catch((function(e){return t.abort(e),pr.reject(e)})).Nn(),s={},u.catch((function(){})),[4,t.Kn];case 3:return[2,(s.value=(r.sent(),u),s)];case 4:return c=r.sent(),f="FirebaseError"!==c.name&&o<3,p("SimpleDb","Transaction failed with error:",c.message,"Retrying:",f),a.close(),f?[3,5]:[2,{value:Promise.reject(c)}];case 5:return[2]}}))},a=this,c.label=1;case 1:return[5,u()];case 2:if("object"==typeof(s=c.sent()))return[2,s.value];c.label=3;case 3:return[3,1];case 4:return[2]}}
2))}))},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),gr=function(){function t(t){this.Gn=t,this.zn=!1,this.Hn=null}return Object.defineProperty(t.prototype,"vn",{get:function(){return this.zn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Yn",{get:function(){return this.Hn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.Gn=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.zn=!0},t.prototype.Jn=function(t){this.Hn=t},t.prototype.delete=function(){return _r(this.Gn.delete())},t}(),yr=function(t){function e(e){var n=this;return(n=t.call(this,f.UNAVAILABLE,"IndexedDB transaction failed: "+e)||this).name="IndexedDbTransactionError",n}return r.__extends(e,t),e}(h);function mr(t){return"IndexedDbTransactionError"===t.name}var br=function(){function t(t){var e=this;this.transaction=t,this.aborted=!1,this.Xn=new lr,this.transaction.oncomplete=function(){e.Xn.resolve()},this.transaction.onabort=function(){t.error?e.Xn.reject(new yr(t.error)):e.Xn.resolve()},this.transaction.onerror=function(t){var n=Ir(t.target.error);e.Xn.reject(new yr(n))}}return t.open=function(e,n,r){try{return new t(e.transaction(r,n))}catch(e){throw new yr(e)}},Object.defineProperty(t.prototype,"Kn",{get:function(){return this.Xn.promise},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&&this.Xn.reject(t),this.aborted||(p("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new wr(e)},t}(),wr=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(p("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(p("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),_r(n)},t.prototype.add=function(t){return p("SimpleDb","ADD",this.store.name,t,t),_r(this.store.add(t))},t.prototype.get=function(t){var e=this;return _r(this.store.get(t)).next((function(n){return void 0===n&&(n=null),p("SimpleDb","GET",e.store.name,t,n),n}))},t.prototype.delete=function(t){return p("SimpleDb","DELETE",this.store.name,t),_r(this.store.delete(t))},t.prototype.count=function(){return p("SimpleDb","COUNT",this.store.name),_r(this.store.count())},t.prototype.Zn=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.ts(n,(function(t,e){r.push(e)})).next((function(){return r}))},t.prototype.es=function(t,e){p("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.ns=!1;var r=this.cursor(n);return this.ts(r,(function(t,e,n){return n.delete()}))},t.prototype.ss=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.ts(r,e)},t.prototype.rs=function(t){var e=this.cursor({});return new pr((function(n,r){e.onerror=function(t){var e=Ir(t.target.error);r(e)},e.onsuccess=function(e){var r=e.target.result;r?t(r.primaryKey,r.value).next((function(t){t?r.continue():n()})):n()}}))},t.prototype.ts=function(t,e){var n=[];return new pr((function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new gr(i),u=e(i.primaryKey,i.value,o);if(u instanceof pr){var a=u.catch((function(t){return o.done(),pr.reject(t)}));n.push(a)}o.vn?r():null===o.Yn?i.continue():i.continue(o.Yn)}else r()}})).next((function(){return pr.xn(n)}))},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.ns?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function _r(t){return new pr((function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){var e=Ir(t.target.error);n(e)}}))}var Er=!1;function Ir(t){var e=vr.Mn(u.getUA());if(e>=12.2&&e<13){var n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){var r=new h("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return Er||(Er=!0,setTimeout((function(){throw r}),0)),r}}return t}function Tr(){return"undefined"!=typeof window?window:null}function xr(){return"undefined"!=typeof document?document:null}var Sr=function(){function t(t,e,n,r,i){this.os=t,this.fn=e,this.cs=n,this.op=r,this.us=i,this.hs=new lr,this.then=this.hs.promise.then.bind(this.hs.promise),this.hs.promise.catch((function(t){}))}return t.ls=function(e,n,r,i,o){var u=new t(e,n,Date.now()+r,i,o);return u.start(r),u},t.prototype.start=function(t){var e=this;this._s=setTimeout((function(){return e.fs()}),t)},t.prototype.Vn=function(){return this.fs()},t.prototype.cancel=function(t){null!==this._s&&(this.clearTimeout(),this.hs.reject(new h(f.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
2)},t.prototype.fs=function(){var t=this;this.os.ds((function(){return null!==t._s?(t.clearTimeout(),t.op().then((function(e){return t.hs.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this._s&&(this.us(this),clearTimeout(this._s),this._s=null)},t}(),Ar=function(){function t(){var t=this;this.ws=Promise.resolve(),this.Ts=[],this.Es=!1,this.Is=[],this.As=null,this.Rs=!1,this.Ps=[],this.gs=new dr(this,"async_queue_retry"),this.ys=function(){var e=xr();e&&p("AsyncQueue","Visibility state changed to ",e.visibilityState),t.gs.yn()};var e=xr();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.ys)}return Object.defineProperty(t.prototype,"Vs",{get:function(){return this.Es},enumerable:!1,configurable:!0}),t.prototype.ds=function(t){this.enqueue(t)},t.prototype.ps=function(t){this.bs(),this.vs(t)},t.prototype.Ss=function(){if(!this.Es){this.Es=!0;var t=xr();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.ys)}},t.prototype.enqueue=function(t){return this.bs(),this.Es?new Promise((function(t){})):this.vs(t)},t.prototype.Ds=function(t){var e=this;this.Ts.push(t),this.ds((function(){return e.Cs()}))},t.prototype.Cs=function(){return r.__awaiter(this,void 0,void 0,(function(){var t,e=this;return r.__generator(this,(function(n){switch(n.label){case 0:if(0===this.Ts.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Ts[0]()];case 2:return n.sent(),this.Ts.shift(),this.gs.reset(),[3,4];case 3:if(!mr(t=n.sent()))throw t;return p("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.Ts.length>0&&this.gs.Rn((function(){return e.Cs()})),n.label=5;case 5:return[2]}}
2))}))},t.prototype.vs=function(t){var e=this,n=this.ws.then((function(){return e.Rs=!0,t().catch((function(t){throw e.As=t,e.Rs=!1,v("INTERNAL UNHANDLED ERROR: ",function(t){var e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t)),t})).then((function(t){return e.Rs=!1,t}))}));return this.ws=n,n},t.prototype.gn=function(t,e,n){var r=this;this.bs(),this.Ps.indexOf(t)>-1&&(e=0);var i=Sr.ls(this,t,e,n,(function(t){return r.Ns(t)}));return this.Is.push(i),i},t.prototype.bs=function(){this.As&&m()},t.prototype.Fs=function(){},t.prototype.xs=function(){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(e){switch(e.label){case 0:return[4,t=this.ws];case 1:e.sent(),e.label=2;case 2:if(t!==this.ws)return[3,0];e.label=3;case 3:return[2]}}))}))},t.prototype.$s=function(t){for(var e=0,n=this.Is;e<n.length;e++)if(n[e].fn===t)return!0;return!1},t.prototype.ks=function(t){var e=this;return this.xs().then((function(){e.Is.sort((function(t,e){return t.cs-e.cs}));for(var n=0,r=e.Is;n<r.length;n++){var i=r[n];if(i.Vn(),"all"!==t&&i.fn===t)break}return e.xs()}))},t.prototype.Ms=function(t){this.Ps.push(t)},t.prototype.Ns=function(t){var e=this.Is.indexOf(t);this.Is.splice(e,1)},t}();function Nr(t,e){if(v("AsyncQueue",e+": "+t),mr(t))return new h(f.UNAVAILABLE,e+": "+t);throw t}var kr=function(){this.Os=void 0,this.listeners=[]},Dr=function(){this.Ls=new ut((function(t){return Qn(t)}),Wn),this.onlineState="Unknown",this.Bs=new Set};function Cr(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a,s,c;return r.__generator(this,(function(r){switch(r.label){case 0:if(n=w(t),i=e.query,o=!1,(u=n.Ls.get(i))||(o=!0,u=new kr),!o)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),a=u,[4,n.qs(i)];case 2:return a.Os=r.sent(),[3,4];case 3:return s=r.sent(),c=Nr(s,"Initialization of query '"+Hn(e.query)+"' failed"),[2,void e.onError(c)];case 4:return n.Ls.set(i,u),u.listeners.push(e),e.Us(n.onlineState),u.Os&&e.Qs(u.Os)&&Lr(n),[2]}}))}))}function Or(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a;return r.__generator(this,(function(r){return n=w(t),i=e.query,o=!1,(u=n.Ls.get(i))&&(a=u.listeners.indexOf(e))>=0&&(u.listeners.splice(a,1),o=0===u.listeners.length),o?[2,(n.Ls.delete(i),n.Ws(i))]:[2]}))}))}function Ur(t,e){for(var n=w(t),r=!1,i=0,o=e;i<o.length;i++){var u=o[i],a=u.query,s=n.Ls.get(a);if(s){for(var c=0,f=s.listeners;c<f.length;c++)f[c].Qs(u)&&(r=!0);s.Os=u}}r&&Lr(n)}function Pr(t,e,n){var r=w(t),i=r.Ls.get(e);if(i)for(var o=0,u=i.listeners;o<u.length;o++)u[o].onError(n);r.Ls.delete(e)}function Lr(t){t.Bs.forEach((function(t){t.next()}))}var Rr=function(){function t(t,e,n){this.query=t,this.js=e,this.Ks=!1,this.Gs=null,this.onlineState="Unknown",this.options=n||{}}return t.prototype.Qs=function(t){if(!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&e.push(i)}t=new Vt(t.query,t.docs,t.Ut,e,t.Qt,t.fromCache,t.Wt,!0)}var o=!1;return this.Ks?this.zs(t)&&(this.js.next(t),o=!0):this.Hs(t,this.onlineState)&&(this.Ys(t),o=!0),this.Gs=t,o},t.prototype.onError=function(t){this.js.error(t)},t.prototype.Us=function(t){this.onlineState=t;var e=!1;return this.Gs&&!this.Ks&&this.Hs(this.Gs,t)&&(this.Ys(this.Gs),e=!0),e},t.prototype.Hs=function(t,e){if(!t.fromCache)return!0;var n="Offline"!==e;return!(this.options.Js&&n||t.docs.m()&&"Offline"!==e)},t.prototype.zs=function(t){if(t.docChanges.length>0)return!0;var e=this.Gs&&this.Gs.hasPendingWrites!==t.hasPendingWrites;return!(!t.Wt&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.Ys=function(t){t=Vt.Kt(t.query,t.docs,t.Qt,t.fromCache),this.Ks=!0,this.js.next(t)},t}(),Mr=function(){function t(t){this.uid=t}return t.prototype.Xs=function(){return null!=this.uid},t.prototype.Zs=function(){return this.Xs()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();Mr.UNAUTHENTICATED=new Mr(null),Mr.ti=new Mr("google-credentials-uid"),Mr.ei=new Mr("first-party-uid");var jr=function(){function t(t,e){var n=this;this.previousValue=t,e&&(e.ni=function(t){return n.si(t)},this.ii=function(t){return e.ri(t)})}return t.prototype.si=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.ii&&this.ii(t),t},t}();function Fr(t,e){return"firestore_clients_"+t+"_"+e}function Vr(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.Xs()&&(r+="_"+e.uid),r}function qr(t,e){return"firestore_targets_"+t+"_"+e}jr.oi=-1;var Br=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.ai=function(e,n,r){var i=JSON.parse(r),o="object"==typeof i&&-1!==["pending","acknowledged","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error),u=void 0;return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(u=new h(i.error.code,i.error.message)),o?new t(e,n,i.state,u):(v("SharedCl
2ientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.ci=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),Gr=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.ai=function(e,n){var r=JSON.parse(n),i="object"==typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error),o=void 0;return i&&r.error&&(i="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(o=new h(r.error.code,r.error.message)),i?new t(e,r.state,o):(v("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.ci=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),zr=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.ai=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=Mt(),u=0;i&&u<r.activeTargetIds.length;++u)i=ht(r.activeTargetIds[u]),o=o.add(r.activeTargetIds[u]);return i?new t(e,o):(v("SharedClientState","Failed to parse client data for instance '"+e+"': "+n),null)},t}(),Wr=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.ai=function(e){var n=JSON.parse(e);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new t(n.clientId,n.onlineState):(v("SharedClientState","Failed to parse online state: "+e),null)},t}(),Qr=function(){function t(){this.activeTargetIds=Mt()}return t.prototype.ui=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.hi=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.ci=function(){var t={activeTargetIds:this.activeTargetIds.A(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),Hr=function(){function t(t,e,n,r,i){this.window=t,this._n=e,this.persistenceKey=n,this.li=r,this._i=null,this.fi=null,this.ni=null,this.di=this.wi.bind(this),this.mi=new It(Y),this.Ti=!1,this.Ei=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Ii=Fr(this.persistenceKey,this.li),this.Ai=function(t){return"firestore_sequence_number_"+t}(this.persistenceKey),this.mi=this.mi.rt(this.li,new Qr),this.Ri=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Pi=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.gi=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.yi=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.di)}return t.On=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return r.__awaiter(this,void 0,void 0,(function(){var t,e,n,i,o,u,a,s,c,f,h,l=this;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this._i.Vi()];case 1:for(t=r.sent(),e=0,n=t;e<n.length;e++)(i=n[e])!==this.li&&(o=this.getItem(Fr(this.persistenceKey,i)))&&(u=zr.ai(i,o))&&(this.mi=this.mi.rt(u.clientId,u));for(this.pi(),(a=this.storage.getItem(this.yi))&&(s=this.bi(a))&&this.vi(s),c=0,f=this.Ei;c<f.length;c++)h=f[c],this.wi(h);return this.Ei=[],this.window.addEventListener("unload",(function(){return l.Si()})),this.Ti=!0,[2]}}))}))},t.prototype.ri=function(t){this.setItem(this.Ai,JSON.stringify(t))},t.prototype.Di=function(){return this.Ci(this.mi)},t.prototype.Ni=function(t){var e=!1;return this.mi.forEach((function(n,r){r.activeTargetIds.has(t)&&(e=!0)})),e},t.prototype.Fi=function(t){this.xi(t,"pending")},t.prototype.$i=function(t,e,n){this.xi(t,e,n),this.ki(t)},t.prototype.Mi=function(t){var e="not-current";if(this.Ni(t)){var n=this.storage.getItem(qr(this.persistenceKey,t));if(n){var r=Gr.ai(t,n);r&&(e=r.state)}}return this.Oi.ui(t),this.pi(),e},t.prototype.Li=function(t){this.Oi.hi(t),this.pi()},t.prototype.Bi=function(t){return this.Oi.activeTargetIds.has(t)},t.prototype.qi=function(t){this.removeItem(qr(this.persistenceKey,t))},t.prototype.Ui=function(t,e,n){this.Qi(t,e,n)},t.prototype.Wi=function(t,e,n){var r=this;e.forEach((function(t){r.ki(t)}
2)),this.currentUser=t,n.forEach((function(t){r.Fi(t)}))},t.prototype.ji=function(t){this.Ki(t)},t.prototype.Si=function(){this.Ti&&(this.window.removeEventListener("storage",this.di),this.removeItem(this.Ii),this.Ti=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return p("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){p("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){p("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.wi=function(t){var e=this,n=t;if(n.storageArea===this.storage){if(p("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Ii)return void v("Received WebStorage notification for local change. Another client might have garbage-collected our state");this._n.Ds((function(){return r.__awaiter(e,void 0,void 0,(function(){var t,e,i,o,u,a;return r.__generator(this,(function(r){if(this.Ti){if(null!==n.key)if(this.Ri.test(n.key)){if(null==n.newValue)return t=this.Gi(n.key),[2,this.zi(t,null)];if(e=this.Hi(n.key,n.newValue))return[2,this.zi(e.clientId,e)]}else if(this.Pi.test(n.key)){if(null!==n.newValue&&(i=this.Yi(n.key,n.newValue)))return[2,this.Ji(i)]}else if(this.gi.test(n.key)){if(null!==n.newValue&&(o=this.Xi(n.key,n.newValue)))return[2,this.Zi(o)]}else if(n.key===this.yi){if(null!==n.newValue&&(u=this.bi(n.newValue)))return[2,this.vi(u)]}else n.key===this.Ai&&(a=function(t){var e=jr.oi;if(null!=t)try{var n=JSON.parse(t);b("number"==typeof n),e=n}catch(t){v("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(n.newValue))!==jr.oi&&this.ni(a)}else this.Ei.push(n);return[2]}))}))}))}},Object.defineProperty(t.prototype,"Oi",{get:function(){return this.mi.get(this.li)},enumerable:!1,configurable:!0}),t.prototype.pi=function(){this.setItem(this.Ii,this.Oi.ci())},t.prototype.xi=function(t,e,n){var r=new Br(this.currentUser,t,e,n),i=Vr(this.persistenceKey,this.currentUser,t);this.setItem(i,r.ci())},t.prototype.ki=function(t){var e=Vr(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.Ki=function(t){var e={clientId:this.li,onlineState:t};this.storage.setItem(this.yi,JSON.stringify(e))},t.prototype.Qi=function(t,e,n){var r=qr(this.persistenceKey,t),i=new Gr(t,e,n);this.setItem(r,i.ci())},t.prototype.Gi=function(t){var e=this.Ri.exec(t);return e?e[1]:null},t.prototype.Hi=function(t,e){var n=this.Gi(t);return zr.ai(n,e)},t.prototype.Yi=function(t,e){var n=this.Pi.exec(t),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return Br.ai(new Mr(i),r,e)},t.prototype.Xi=function(t,e){var n=this.gi.exec(t),r=Number(n[1]);return Gr.ai(r,e)},t.prototype.bi=function(t){return Wr.ai(t)},t.prototype.Ji=function(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return t.user.uid===this.currentUser.uid?[2,this._i.tr(t.batchId,t.state,t.error)]:(p("SharedClientState","Ignoring mutation for non-active user "+t.user.uid),[2])}))}))},t.prototype.Zi=function(t){return this._i.er(t.targetId,t.state,t.error)},t.prototype.zi=function(t,e){var n=this,r=e?this.mi.rt(t,e):this.mi.remove(t),i=this.Ci(this.mi),o=this.Ci(r),u=[],a=[];return o.forEach((function(t){i.has(t)||u.push(t)})),i.forEach((function(t){o.has(t)||a.push(t)})),this._i.nr(u,a).then((function(){n.mi=r}))},t.prototype.vi=function(t){this.mi.get(t.clientId)&&this.fi(t.onlineState)},t.prototype.Ci=function(t){var e=Mt();return t.forEach((function(t,n){e=e.$t(n.activeTargetIds)})),e},t}(),Kr=function(){function t(){this.sr=new Qr,this.ir={},this.fi=null,this.ni=null}return t.prototype.Fi=function(t){},t.prototype.$i=function(t,e,n){},t.prototype.Mi=function(t){return this.sr.ui(t),this.ir[t]||"not-current"},t.prototype.Ui=function(t,e,n){this.ir[t]=e},t.prototype.Li=function(t){this.sr.hi(t)},t.prototype.Bi=function(t){return this.sr.activeTargetIds.has(t)},t.prototype.qi=function(t){delete this.ir[t]},t.prototype.Di=function(){return this.sr.activeTargetIds},t.prototype.Ni=function(t){return this.sr.activeTargetIds.has(t)},t.prototype.start=function(){return this.sr=new Qr,Promise.resolve()},t.prototype.Wi=function(t,e,n){},t.prototype.ji=function(t){},t.prototype.Si=function(){},t.prototype.ri=function(t){},t}(),$r=function(){function t(t,e,n,r){this.batchId=t,this.rr=e,this.baseMutations=n,this.mutations=r}return t.prototype.ar=function(t,e,n){for(var r=n.cr,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(t)&&(e=ln(o,e,r[i]))}return e},t.prototype.ur=function(t,e){for(var n=0,r=this.baseMutations;n<r.length;n++){var i=r[n];i.key.isEqual(t)&&(e=dn(i,e,e,this.rr))}for(var o=e,u=0,a=this.mutations;u<a.length;u++){var s=a[u];
2s.key.isEqual(t)&&(e=dn(s,e,o,this.rr))}return e},t.prototype.hr=function(t){var e=this,n=t;return this.mutations.forEach((function(r){var i=e.ur(r.key,t.get(r.key));i&&(n=n.rt(r.key,i))})),n},t.prototype.keys=function(){return this.mutations.reduce((function(t,e){return t.add(e.key)}),Lt())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&X(this.mutations,t.mutations,(function(t,e){return vn(t,e)}))&&X(this.baseMutations,t.baseMutations,(function(t,e){return vn(t,e)}))},t}(),Yr=function(){function t(t,e,n,r){this.batch=t,this.lr=e,this.cr=n,this._r=r}return t.from=function(e,n,r){b(e.mutations.length===r.length);for(var i=Ut,o=e.mutations,u=0;u<o.length;u++)i=i.rt(o[u].key,r[u].version);return new t(e,n,r,i)},t}(),Xr=function(){function t(){this.dr=new ut((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),this.wr=!1}return Object.defineProperty(t.prototype,"readTime",{get:function(){return this.mr},set:function(t){this.mr=t},enumerable:!1,configurable:!0}),t.prototype.Tr=function(t,e){this.Er(),this.readTime=e,this.dr.set(t.key,t)},t.prototype.Ir=function(t,e){this.Er(),e&&(this.readTime=e),this.dr.set(t,null)},t.prototype.Ar=function(t,e){this.Er();var n=this.dr.get(e);return void 0!==n?pr.resolve(n):this.Rr(t,e)},t.prototype.getEntries=function(t,e){return this.Pr(t,e)},t.prototype.apply=function(t){return this.Er(),this.wr=!0,this.gr(t)},t.prototype.Er=function(){},t}(),Jr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Zr=function(){function t(){this.yr=[]}return t.prototype.Vr=function(t){this.yr.push(t)},t.prototype.pr=function(){this.yr.forEach((function(t){return t()}))},t}(),ti=function(){function t(t,e,n){this.br=t,this.vr=e,this.Sr=n}return t.prototype.Dr=function(t,e){var n=this;return this.vr.Cr(t,e).next((function(r){return n.Nr(t,e,r)}))},t.prototype.Nr=function(t,e,n){return this.br.Ar(t,e).next((function(t){for(var r=0,i=n;r<i.length;r++)t=i[r].ur(e,t);return t}))},t.prototype.Fr=function(t,e,n){var r=Dt();return e.forEach((function(t,e){for(var i=0,o=n;i<o.length;i++)e=o[i].ur(t,e);r=r.rt(t,e)})),r},t.prototype.$r=function(t,e){var n=this;return this.br.getEntries(t,e).next((function(e){return n.kr(t,e)}))},t.prototype.kr=function(t,e){var n=this;return this.vr.Mr(t,e).next((function(r){var i=n.Fr(t,e,r),o=kt();return i.forEach((function(t,e){e||(e=new Dn(t,st.min())),o=o.rt(t,e)})),o}))},t.prototype.Or=function(t,e,n){return function(t){return N.F(t.path)&&null===t.collectionGroup&&0===t.filters.length}(e)?this.Lr(t,e.path):Fn(e)?this.Br(t,e,n):this.qr(t,e,n)},t.prototype.Lr=function(t,e){return this.Dr(t,new N(e)).next((function(t){var e=Ot();return t instanceof kn&&(e=e.rt(t.key,t)),e}))},t.prototype.Br=function(t,e,n){var r=this,i=e.collectionGroup,o=Ot();return this.Sr.Ur(t,i).next((function(u){return pr.forEach(u,(function(u){var a=function(t,e){return new On(e,null,t.rn.slice(),t.filters.slice(),t.limit,t.on,t.startAt,t.endAt)}(e,u.child(i));return r.qr(t,a,n).next((function(t){t.forEach((function(t,e){o=o.rt(t,e)}))}))})).next((function(){return o}))}))},t.prototype.qr=function(t,e,n){var r,i,o=this;return this.br.Or(t,e,n).next((function(n){return r=n,o.vr.Qr(t,e)})).next((function(e){return i=e,o.Wr(t,i,r).next((function(t){r=t;for(var e=0,n=i;e<n.length;e++)for(var o=n[e],u=0,a=o.mutations;u<a.length;u++){var s=a[u],c=s.key,f=r.get(c),h=dn(s,f,f,o.rr);r=h instanceof kn?r.rt(c,h):r.remove(c)}}))})).next((function(){return r.forEach((function(t,n){Kn(e,n)||(r=r.remove(t))})),r}))},t.prototype.Wr=function(t,e,n){for(var r=Lt(),i=0,o=e;i<o.length;i++)for(var u=0,a=o[i].mutations;u<a.length;u++){var s=a[u];s instanceof mn&&null===n.get(s.key)&&(r=r.add(s.key))}var c=n;return this.br.getEntries(t,r).next((function(t){return t.forEach((function(t,e){null!==e&&e instanceof kn&&(c=c.rt(t,e))})),c}))},t}(),ei=function(){function t(t,e,n,r){this.targetId=t,this.fromCache=e,this.jr=n,this.Kr=r}return t.Gr=function(e,n){for(var r=Lt(),i=Lt(),o=0,u=n.docChanges;o<u.length;o++){var a=u[o];switch(a.type){case 0:r=r.add(a.doc.key);break;case 1:i=i.add(a.doc.key)}}return new t(e,n.fromCache,r,i)},t}();function ni(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],u=Y(n,i);return 0===u?Y(r,o):u}var ri=function(){function t(t){this.zr=t,this.buffer=new St(ni),this.Hr=0}return t.prototype.Yr=function(){return++this.Hr},t.prototype.Jr=function(t){var e=[t,this.Yr()];if(this.buffer.size<this.zr)this.buffer=this.buffer.add(e);else{var n=this.buffer.last();ni(e,n)<0&&(this.buffer=this.buffer.delete(n).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]}
2,enumerable:!1,configurable:!0}),t}(),ii={Xr:!1,Zr:0,eo:0,no:0},oi=function(){function t(t,e,n){this.so=t,this.io=e,this.ro=n}return t.oo=function(e){return new t(e,t.ao,t.co)},t}();oi.uo=-1,oi.ho=1048576,oi.lo=41943040,oi.ao=10,oi.co=1e3,oi._o=new oi(oi.lo,oi.ao,oi.co),oi.fo=new oi(oi.uo,0,0);var ui=function(){function t(t,e){this.do=t,this.os=e,this.wo=!1,this.mo=null}return t.prototype.start=function(t){this.do.params.so!==oi.uo&&this.To(t)},t.prototype.stop=function(){this.mo&&(this.mo.cancel(),this.mo=null)},Object.defineProperty(t.prototype,"Ti",{get:function(){return null!==this.mo},enumerable:!1,configurable:!0}),t.prototype.To=function(t){var e=this,n=this.wo?3e5:6e4;p("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.mo=this.os.gn("lru_garbage_collection",n,(function(){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){switch(n.label){case 0:this.mo=null,this.wo=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,t.Eo(this.do)];case 2:return n.sent(),[3,7];case 3:return mr(e=n.sent())?(p("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,Io(e)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.To(t)];case 8:return n.sent(),[2]}}))}))}))},t}(),ai=function(){function t(t,e){this.Io=t,this.params=e}return t.prototype.Ao=function(t,e){return this.Io.Ro(t).next((function(t){return Math.floor(e/100*t)}))},t.prototype.Po=function(t,e){var n=this;if(0===e)return pr.resolve(jr.oi);var r=new ri(e);return this.Io.De(t,(function(t){return r.Jr(t.sequenceNumber)})).next((function(){return n.Io.yo(t,(function(t){return r.Jr(t)}))})).next((function(){return r.maxValue}))},t.prototype.Vo=function(t,e,n){return this.Io.Vo(t,e,n)},t.prototype.po=function(t,e){return this.Io.po(t,e)},t.prototype.bo=function(t,e){var n=this;return this.params.so===oi.uo?(p("LruGarbageCollector","Garbage collection skipped; disabled"),pr.resolve(ii)):this.vo(t).next((function(r){return r<n.params.so?(p("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.so),ii):n.So(t,e)}))},t.prototype.vo=function(t){return this.Io.vo(t)},t.prototype.So=function(t,e){var n,r,i,u,a,s,c,f=this,h=Date.now();return this.Ao(t,this.params.io).next((function(e){return e>f.params.ro?(p("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+f.params.ro+" from "+e),r=f.params.ro):r=e,u=Date.now(),f.Po(t,r)})).next((function(r){return n=r,a=Date.now(),f.Vo(t,n,e)})).next((function(e){return i=e,s=Date.now(),f.po(t,n)})).next((function(t){return c=Date.now(),d()<=o.LogLevel.DEBUG&&p("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(u-h)+"ms\n\tDetermined least recently used "+r+" in "+(a-u)+"ms\n\tRemoved "+i+" targets in "+(s-a)+"ms\n\tRemoved "+t+" documents in "+(c-s)+"ms\nTotal Duration: "+(c-h)+"ms"),pr.resolve({Xr:!0,Zr:r,eo:i,no:t})}))},t}();function si(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=fi(e)),e=ci(t.get(n),e);return fi(e)}function ci(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function fi(t){return t+"\x01\x01"}function hi(t){var e=t.length;if(b(e>=2),2===e)return b("\x01"===t.charAt(0)&&"\x01"===t.charAt(1)),x.g();for(var n=e-2,r=[],i="",o=0;o<e;){var u=t.indexOf("\x01",o);switch((u<0||u>n)&&m(),t.charAt(u+1)){case"\x01":var a=t.substring(o,u),s=void 0;0===i.length?s=a:(s=i+=a,i=""),r.push(s);break;case"\x10":i+=t.substring(o,u),i+="\0";break;case"\x11":i+=t.substring(o,u+1);break;default:m()}o=u+2}return new x(r)}var li=function(t){this.Do=t};function di(t,e){if(e.document)return function(t,e,n){var r=Ae(t,e.name),i=Ie(e.updateTime),o=new xn({mapValue:{fields:e.fields}});return new kn(r,i,o,{hasCommittedMutations:!!n})}(t.Do,e.document,!!e.hasCommittedMutations);if(e.noDocument){var n=N.$(e.noDocument.path),r=mi(e.noDocument.readTime);return new Dn(n,r,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var i=N.$(e.unknownDocument.path),o=mi(e.unknownDocument.version);return new Cn(i,o)}return m()}function pi(t,e,n){var r=vi(n),i=e.key.path.h().A();if(e instanceof kn){var o=function(t,e){return{name:Se(t,e.key),fields:e.sn().mapValue.fields,updateTime:we(t,e.version.X())}}(t.Do,e),u=e.hasCommittedMutations;return new Gi(null,null,o,u,r,i)}if(e instanceof Dn){var a=e.key.path.A(),s=yi(e.version),c=e.hasCommittedMutations;return new Gi(null,new qi(a,s),null,c,r,i)}if(e instanceof Cn){var f=e.key.path.A(),h=yi(e.version);return new Gi(new Bi(f,h),null,null,!0,r,i)}return m()}function vi(t){var e=t.X();return[e.seconds,e.nanoseconds]}function gi(t){var e=new at(t[0],t[1]);return st.Y(e)}function yi(t){var e=t.X();return new Ri(e.seconds,e.nanoseconds)}function mi(t){var e=new at(t.seconds,t.nanoseconds);return st.Y(e)}function bi(t,e){var n=(e.baseMutations||[]).map((function(e){return Pe(t.Do,e)})),r=e.mutations.map((function(e){return Pe(t.Do,e)})),i=at.fromMillis(e.localWriteTimeMs);return new $r(e.batchId,i,n,r)}function wi(t){var e,n,r=mi(t.readTime),i=void 0!==t.lastLimboFreeSnapshotVersion?mi(t.lastLimboFreeSnapshotVersion):st.min();return void 0!==t.query.documents?(b(1===(n=t.query).documents.length),e=qn(Pn(ke(n.documents[0])))):e=function(t){var e=ke(t.parent),n=t.structuredQuery,r
2=n.from?n.from.length:0,i=null;if(r>0){b(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:e=e.child(o.collectionId)}var u=[];n.where&&(u=function t(e){return e?void 0!==e.unaryFilter?[ze(e)]:void 0!==e.fieldFilter?[Ge(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return t(e)})).reduce((function(t,e){return t.concat(e)})):m():[]}(n.where));var a=[];n.orderBy&&(a=n.orderBy.map((function(t){return function(t){return new cr(Be(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t)})));var s=null;n.limit&&(s=function(t){var e;return ct(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&&(c=je(n.startAt));var f=null;return n.endAt&&(f=je(n.endAt)),qn(Un(e,i,a,u,s,"F",c,f))}(t.query),new bt(e,t.targetId,0,t.lastListenSequenceNumber,r,i,Z.fromBase64String(t.resumeToken))}function _i(t,e){var n,r=yi(e.et),i=yi(e.lastLimboFreeSnapshotVersion);n=gt(e.target)?Le(t.Do,e.target):Re(t.Do,e.target);var o=e.resumeToken.toBase64();return new Wi(e.targetId,pt(e.target),r,o,e.sequenceNumber,i,n)}var Ei=function(){function t(t,e,n,r){this.userId=t,this.serializer=e,this.Sr=n,this.Co=r,this.No={}}return t.Fo=function(e,n,r,i){return b(""!==e.uid),new t(e.Xs()?e.uid:"",n,r,i)},t.prototype.xo=function(t){var e=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return xi(t).ss({index:Fi.userMutationsIndex,range:n},(function(t,n,r){e=!1,r.done()})).next((function(){return e}))},t.prototype.$o=function(t,e,n,r){var i=this,o=Si(t),u=xi(t);return u.add({}).next((function(a){b("number"==typeof a);for(var s=new $r(a,e,n,r),c=function(t,e,n){var r=n.baseMutations.map((function(e){return Ue(t.Do,e)})),i=n.mutations.map((function(e){return Ue(t.Do,e)}));return new Fi(e,n.batchId,n.rr.toMillis(),r,i)}(i.serializer,i.userId,s),f=[],h=new St((function(t,e){return Y(t.R(),e.R())})),l=0,d=r;l<d.length;l++){var p=d[l],v=Vi.key(i.userId,p.key.path,a);h=h.add(p.key.path.h()),f.push(u.put(c)),f.push(o.put(v,Vi.PLACEHOLDER))}return h.forEach((function(e){f.push(i.Sr.ko(t,e))})),t.Vr((function(){i.No[a]=s.keys()})),pr.xn(f).next((function(){return s}))}))},t.prototype.Mo=function(t,e){var n=this;return xi(t).get(e).next((function(t){return t?(b(t.userId===n.userId),bi(n.serializer,t)):null}))},t.prototype.Oo=function(t,e){var n=this;return this.No[e]?pr.resolve(this.No[e]):this.Mo(t,e).next((function(t){if(t){var r=t.keys();return n.No[e]=r,r}return null}))},t.prototype.Lo=function(t,e){var n=this,r=e+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return xi(t).ss({index:Fi.userMutationsIndex,range:i},(function(t,e,i){e.userId===n.userId&&(b(e.batchId>=r),o=bi(n.serializer,e)),i.done()})).next((function(){return o}))},t.prototype.Bo=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return xi(t).ss({index:Fi.userMutationsIndex,range:e,reverse:!0},(function(t,e,r){n=e.batchId,r.done()})).next((function(){return n}))},t.prototype.qo=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return xi(t).Zn(Fi.userMutationsIndex,n).next((function(t){return t.map((function(t){return bi(e.serializer,t)}))}))},t.prototype.Cr=function(t,e){var n=this,r=Vi.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return Si(t).ss({range:i},(function(r,i,u){var a=r[0],s=r[1],c=r[2],f=hi(s);if(a===n.userId&&e.path.isEqual(f))return xi(t).get(c).next((function(t){if(!t)throw m();b(t.userId===n.userId),o.push(bi(n.serializer,t))}));u.done()})).next((function(){return o}))},t.prototype.Mr=function(t,e){var n=this,r=new St(Y),i=[];return e.forEach((function(e){var o=Vi.prefixForPath(n.userId,e.path),u=IDBKeyRange.lowerBound(o),a=Si(t).ss({range:u},(function(t,i,o){var u=t[0],a=t[1],s=t[2],c=hi(a);u===n.userId&&e.path.isEqual(c)?r=r.add(s):o.done()}));i.push(a)})),pr.xn(i).next((function(){return n.Uo(t,r)}))},t.prototype.Qr=function(t,e){var n=this,r=e.path,i=r.length+1,o=Vi.prefixForPath(this.userId,r),u=IDBKeyRange.lowerBound(o),a=new St(Y);return Si(t).ss({range:u},(function(t,e,o){var u=t[0],s=t[1],c=t[2],f=hi(s);
2u===n.userId&&r.T(f)?f.length===i&&(a=a.add(c)):o.done()})).next((function(){return n.Uo(t,a)}))},t.prototype.Uo=function(t,e){var n=this,r=[],i=[];return e.forEach((function(e){i.push(xi(t).get(e).next((function(t){if(null===t)throw m();b(t.userId===n.userId),r.push(bi(n.serializer,t))})))})),pr.xn(i).next((function(){return r}))},t.prototype.Qo=function(t,e){var n=this;return Ti(t.Wo,this.userId,e).next((function(r){return t.Vr((function(){n.jo(e.batchId)})),pr.forEach(r,(function(e){return n.Co.Ko(t,e)}))}))},t.prototype.jo=function(t){delete this.No[t]},t.prototype.Go=function(t){var e=this;return this.xo(t).next((function(n){if(!n)return pr.resolve();var r=IDBKeyRange.lowerBound(Vi.prefixForUser(e.userId)),i=[];return Si(t).ss({range:r},(function(t,n,r){if(t[0]===e.userId){var o=hi(t[1]);i.push(o)}else r.done()})).next((function(){b(0===i.length)}))}))},t.prototype.zo=function(t,e){return Ii(t,this.userId,e)},t.prototype.Ho=function(t){var e=this;return Ai(t).get(this.userId).next((function(t){return t||new ji(e.userId,-1,"")}))},t}();function Ii(t,e,n){var r=Vi.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),u=!1;return Si(t).ss({range:o,ns:!0},(function(t,n,r){var o=t[0],a=t[1];t[2],o===e&&a===i&&(u=!0),r.done()})).next((function(){return u}))}function Ti(t,e,n){var r=t.store(Fi.store),i=t.store(Vi.store),o=[],u=IDBKeyRange.only(n.batchId),a=0,s=r.ss({range:u},(function(t,e,n){return a++,n.delete()}));o.push(s.next((function(){b(1===a)})));for(var c=[],f=0,h=n.mutations;f<h.length;f++){var l=h[f],d=Vi.key(e,l.key.path,n.batchId);o.push(i.delete(d)),c.push(l.key)}return pr.xn(o).next((function(){return c}))}function xi(t){return ao.Un(t,Fi.store)}function Si(t){return ao.Un(t,Vi.store)}function Ai(t){return ao.Un(t,ji.store)}var Ni=function(){function t(t,e){this.serializer=t,this.Sr=e}return t.prototype.Tr=function(t,e,n){return Di(t).put(Ci(e),n)},t.prototype.Ir=function(t,e){var n=Di(t),r=Ci(e);return n.delete(r)},t.prototype.updateMetadata=function(t,e){var n=this;return this.getMetadata(t).next((function(r){return r.byteSize+=e,n.Yo(t,r)}))},t.prototype.Ar=function(t,e){var n=this;return Di(t).get(Ci(e)).next((function(t){return n.Jo(t)}))},t.prototype.Xo=function(t,e){var n=this;return Di(t).get(Ci(e)).next((function(t){var e=n.Jo(t);return e?{Zo:e,size:Oi(t)}:null}))},t.prototype.getEntries=function(t,e){var n=this,r=Dt();return this.ta(t,e,(function(t,e){var i=n.Jo(e);r=r.rt(t,i)})).next((function(){return r}))},t.prototype.ea=function(t,e){var n=this,r=Dt(),i=new It(N.i);return this.ta(t,e,(function(t,e){var o=n.Jo(e);o?(r=r.rt(t,o),i=i.rt(t,Oi(e))):(r=r.rt(t,null),i=i.rt(t,0))})).next((function(){return{na:r,sa:i}}))},t.prototype.ta=function(t,e,n){if(e.m())return pr.resolve();var r=IDBKeyRange.bound(e.first().path.A(),e.last().path.A()),i=e.lt(),o=i.Et();return Di(t).ss({range:r},(function(t,e,r){for(var u=N.$(t);o&&N.i(o,u)<0;)n(o,null),o=i.Et();o&&o.isEqual(u)&&(n(o,e),o=i.It()?i.Et():null),o?r.Jn(o.path.A()):r.done()})).next((function(){for(;o;)n(o,null),o=i.It()?i.Et():null}))},t.prototype.Or=function(t,e,n){var r=this,i=Ot(),o=e.path.length+1,u={};if(n.isEqual(st.min())){var a=e.path.A();u.range=IDBKeyRange.lowerBound(a)}else{var s=e.path.A(),c=vi(n);u.range=IDBKeyRange.lowerBound([s,c],!0),u.index=Gi.collectionReadTimeIndex}return Di(t).ss(u,(function(t,n,u){if(t.length===o){var a=di(r.serializer,n);e.path.T(a.key.path)?a instanceof kn&&Kn(e,a)&&(i=i.rt(a.key,a)):u.done()}})).next((function(){return i}))},t.prototype.ia=function(t,e){var n=this,r=kt(),i=vi(e),o=Di(t),u=IDBKeyRange.lowerBound(i,!0);return o.ss({index:Gi.readTimeIndex,range:u},(function(t,e){var o=di(n.serializer,e);r=r.rt(o.key,o),i=e.readTime})).next((function(){return{ra:r,readTime:gi(i)}}))},t.prototype.oa=function(t){var e=Di(t),n=st.min();return e.ss({index:Gi.readTimeIndex,reverse:!0},(function(t,e,r){e.readTime&&(n=gi(e.readTime)),r.done()})).next((function(){return n}))},t.prototype.aa=function(e){return new t.ca(this,!!e&&e.ua)},t.prototype.ha=function(t){return this.getMetadata(t).next((function(t){return t.byteSize}))},t.prototype.getMetadata=function(t){return ki(t).get(zi.key).next((function(t){return b(!!t),t}))},t.prototype.Yo=function(t,e){return ki(t).put(zi.key,e)},t.prototype.Jo=function(t){if(t){var e=di(this.serializer,t);return e instanceof Dn&&e.version.isEqual(st.min())?null:e}return null},t}();function ki(t){return ao.Un(t,zi.store)}function Di(t){return ao.Un(t,Gi.store)}function Ci(t){return t.path.A()}function Oi(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw m();e=t.noDocument}return JSON.stringify(e).length}
2Ni.ca=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).la=e,r.ua=n,r._a=new ut((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),r}return r.__extends(e,t),e.prototype.gr=function(t){var e=this,n=[],r=0,i=new St((function(t,e){return Y(t.R(),e.R())}));return this.dr.forEach((function(o,u){var a=e._a.get(o);if(u){var s=pi(e.la.serializer,u,e.readTime);i=i.add(o.path.h());var c=Oi(s);r+=c-a,n.push(e.la.Tr(t,o,s))}else if(r-=a,e.ua){var f=pi(e.la.serializer,new Dn(o,st.min()),e.readTime);n.push(e.la.Tr(t,o,f))}else n.push(e.la.Ir(t,o))})),i.forEach((function(r){n.push(e.la.Sr.ko(t,r))})),n.push(this.la.updateMetadata(t,r)),pr.xn(n)},e.prototype.Rr=function(t,e){var n=this;return this.la.Xo(t,e).next((function(t){return null===t?(n._a.set(e,0),null):(n._a.set(e,t.size),t.Zo)}))},e.prototype.Pr=function(t,e){var n=this;return this.la.ea(t,e).next((function(t){var e=t.na;return t.sa.forEach((function(t,e){n._a.set(t,e)})),e}))},e}(Xr);var Ui=function(){function t(){this.fa=new Pi}return t.prototype.ko=function(t,e){return this.fa.add(e),pr.resolve()},t.prototype.Ur=function(t,e){return pr.resolve(this.fa.getEntries(e))},t}(),Pi=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t._(),n=t.h(),r=this.index[e]||new St(x.i),i=!r.has(n);return this.index[e]=r.add(n),i},t.prototype.has=function(t){var e=t._(),n=t.h(),r=this.index[e];return r&&r.has(n)},t.prototype.getEntries=function(t){return(this.index[t]||new St(x.i)).A()},t}(),Li=function(){function t(t){this.serializer=t}return t.prototype.createOrUpgrade=function(t,e,n,r){var i=this;b(n<r&&n>=0&&r<=10);var o=new br(e);n<1&&r>=1&&(function(t){t.createObjectStore(Mi.store)}(t),function(t){t.createObjectStore(ji.store,{keyPath:ji.keyPath}),t.createObjectStore(Fi.store,{keyPath:Fi.keyPath,autoIncrement:!0}).createIndex(Fi.userMutationsIndex,Fi.userMutationsKeyPath,{unique:!0}),t.createObjectStore(Vi.store)}(t),$i(t),function(t){t.createObjectStore(Gi.store)}(t));var u=pr.resolve();return n<3&&r>=3&&(0!==n&&(function(t){t.deleteObjectStore(Qi.store),t.deleteObjectStore(Wi.store),t.deleteObjectStore(Hi.store)}(t),$i(t)),u=u.next((function(){return function(t){var e=t.store(Hi.store),n=new Hi(0,0,st.min().X(),0);return e.put(Hi.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(u=u.next((function(){return function(t,e){return e.store(Fi.store).Zn().next((function(n){t.deleteObjectStore(Fi.store),t.createObjectStore(Fi.store,{keyPath:Fi.keyPath,autoIncrement:!0}).createIndex(Fi.userMutationsIndex,Fi.userMutationsKeyPath,{unique:!0});var r=e.store(Fi.store),i=n.map((function(t){return r.put(t)}));return pr.xn(i)}))}(t,o)}))),u=u.next((function(){!function(t){t.createObjectStore(Yi.store,{keyPath:Yi.keyPath})}(t)}))),n<5&&r>=5&&(u=u.next((function(){return i.removeAcknowledgedMutations(o)}))),n<6&&r>=6&&(u=u.next((function(){return function(t){t.createObjectStore(zi.store)}(t),i.addDocumentGlobal(o)}))),n<7&&r>=7&&(u=u.next((function(){return i.ensureSequenceNumbers(o)}))),n<8&&r>=8&&(u=u.next((function(){return i.createCollectionParentIndex(t,o)}))),n<9&&r>=9&&(u=u.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){var e=t.objectStore(Gi.store);e.createIndex(Gi.readTimeIndex,Gi.readTimeIndexPath,{unique:!1}),e.createIndex(Gi.collectionReadTimeIndex,Gi.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&r>=10&&(u=u.next((function(){return i.rewriteCanonicalIds(o)}))),u},t.prototype.addDocumentGlobal=function(t){var e=0;return t.store(Gi.store).ss((function(t,n){e+=Oi(n)})).next((function(){var n=new zi(e);return t.store(zi.store).put(zi.key,n)}))},t.prototype.removeAcknowledgedMutations=function(t){var e=this,n=t.store(ji.store),r=t.store(Fi.store);return n.Zn().next((function(n){return pr.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.Zn(Fi.userMutationsIndex,i).next((function(r){return pr.forEach(r,(function(r){b(r.userId===n.userId);var i=bi(e.serializer,r);return Ti(t,n.userId,i).next((function(){}))}))}))}))}))},t.prototype.ensureSequenceNumbers=function(t){var e=t.store(Qi.store),n=t.store(Gi.store);return t.store(Hi.store).get(Hi.key).next((function(t){var r=[];return n.ss((function(n,i){var o=new x(n),u=function(t){return[0,si(t)]}(o);r.push(e.get(u).next((function(n){return n?pr.resolve():function(n){return e.put(new Qi(0,si(n),t.highestListenSequenceNumber))}(o)})))})).next((function(){return pr.xn(r)}))}
2))},t.prototype.createCollectionParentIndex=function(t,e){t.createObjectStore(Ki.store,{keyPath:Ki.keyPath});var n=e.store(Ki.store),r=new Pi,i=function(t){if(r.add(t)){var e=t._(),i=t.h();return n.put({collectionId:e,parent:si(i)})}};return e.store(Gi.store).ss({ns:!0},(function(t,e){var n=new x(t);return i(n.h())})).next((function(){return e.store(Vi.store).ss({ns:!0},(function(t,e){t[0];var n=t[1],r=(t[2],hi(n));return i(r.h())}))}))},t.prototype.rewriteCanonicalIds=function(t){var e=this,n=t.store(Wi.store);return n.ss((function(t,r){var i=wi(r),o=_i(e.serializer,i);return n.put(o)}))},t}(),Ri=function(t,e){this.seconds=t,this.nanoseconds=e},Mi=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};Mi.store="owner",Mi.key="owner";var ji=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};ji.store="mutationQueues",ji.keyPath="userId";var Fi=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Fi.store="mutations",Fi.keyPath="batchId",Fi.userMutationsIndex="userMutationsIndex",Fi.userMutationsKeyPath=["userId","batchId"];var Vi=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,si(e)]},t.key=function(t,e,n){return[t,si(e),n]},t}();Vi.store="documentMutations",Vi.PLACEHOLDER=new Vi;var qi=function(t,e){this.path=t,this.readTime=e},Bi=function(t,e){this.path=t,this.version=e},Gi=function(t,e,n,r,i,o){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};Gi.store="remoteDocuments",Gi.readTimeIndex="readTimeIndex",Gi.readTimeIndexPath="readTime",Gi.collectionReadTimeIndex="collectionReadTimeIndex",Gi.collectionReadTimeIndexPath=["parentPath","readTime"];var zi=function(t){this.byteSize=t};zi.store="remoteDocumentGlobal",zi.key="remoteDocumentGlobalKey";var Wi=function(t,e,n,r,i,o,u){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=u};Wi.store="targets",Wi.keyPath="targetId",Wi.queryTargetsIndexName="queryTargetsIndex",Wi.queryTargetsKeyPath=["canonicalId","targetId"];var Qi=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};Qi.store="targetDocuments",Qi.keyPath=["targetId","path"],Qi.documentTargetsIndex="documentTargetsIndex",Qi.documentTargetsKeyPath=["path","targetId"];var Hi=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Hi.key="targetGlobalKey",Hi.store="targetGlobal";var Ki=function(t,e){this.collectionId=t,this.parent=e};function $i(t){t.createObjectStore(Qi.store,{keyPath:Qi.keyPath}).createIndex(Qi.documentTargetsIndex,Qi.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Wi.store,{keyPath:Wi.keyPath}).createIndex(Wi.queryTargetsIndexName,Wi.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Hi.store)}Ki.store="collectionParents",Ki.keyPath=["collectionId","parent"];var Yi=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};Yi.store="clientMetadata",Yi.keyPath="clientId";var Xi=r.__spreadArrays(r.__spreadArrays(r.__spreadArrays([ji.store,Fi.store,Vi.store,Gi.store,Wi.store,Mi.store,Hi.store,Qi.store],[Yi.store]),[zi.store]),[Ki.store]),Ji=function(){function t(){this.da=new Pi}return t.prototype.ko=function(t,e){var n=this;if(!this.da.has(e)){var r=e._(),i=e.h();t.Vr((function(){n.da.add(e)}));var o={collectionId:r,parent:si(i)};return Zi(t).put(o)}return pr.resolve()},t.prototype.Ur=function(t,e){var n=[],r=IDBKeyRange.bound([e,""],[J(e),""],!1,!0);return Zi(t).Zn(r).next((function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.collectionId!==e)break;n.push(hi(o.parent))}return n}))},t}();function Zi(t){return ao.Un(t,Ki.store)}var to=function(){function t(t){this.wa=t}return t.prototype.next=function(){return this.wa+=2,this.wa},t.ma=function(){return new t(0)},t.Ta=function(){return new t(-1)},t}
2(),eo=function(){function t(t,e){this.Co=t,this.serializer=e}return t.prototype.Ea=function(t){var e=this;return this.Ia(t).next((function(n){var r=new to(n.highestTargetId);return n.highestTargetId=r.next(),e.Aa(t,n).next((function(){return n.highestTargetId}))}))},t.prototype.Ra=function(t){return this.Ia(t).next((function(t){return st.Y(new at(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.Pa=function(t){return this.Ia(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.ga=function(t,e,n){var r=this;return this.Ia(t).next((function(i){return i.highestListenSequenceNumber=e,n&&(i.lastRemoteSnapshotVersion=n.X()),e>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=e),r.Aa(t,i)}))},t.prototype.ya=function(t,e){var n=this;return this.Va(t,e).next((function(){return n.Ia(t).next((function(r){return r.targetCount+=1,n.pa(e,r),n.Aa(t,r)}))}))},t.prototype.ba=function(t,e){return this.Va(t,e)},t.prototype.va=function(t,e){var n=this;return this.Sa(t,e.targetId).next((function(){return no(t).delete(e.targetId)})).next((function(){return n.Ia(t)})).next((function(e){return b(e.targetCount>0),e.targetCount-=1,n.Aa(t,e)}))},t.prototype.Vo=function(t,e,n){var r=this,i=0,o=[];return no(t).ss((function(u,a){var s=wi(a);s.sequenceNumber<=e&&null===n.get(s.targetId)&&(i++,o.push(r.va(t,s)))})).next((function(){return pr.xn(o)})).next((function(){return i}))},t.prototype.De=function(t,e){return no(t).ss((function(t,n){var r=wi(n);e(r)}))},t.prototype.Ia=function(t){return ro(t).get(Hi.key).next((function(t){return b(null!==t),t}))},t.prototype.Aa=function(t,e){return ro(t).put(Hi.key,e)},t.prototype.Va=function(t,e){return no(t).put(_i(this.serializer,e))},t.prototype.pa=function(t,e){var n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n},t.prototype.Da=function(t){return this.Ia(t).next((function(t){return t.targetCount}))},t.prototype.Ca=function(t,e){var n=pt(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return no(t).ss({range:r,index:Wi.queryTargetsIndexName},(function(t,n,r){var o=wi(n);vt(e,o.target)&&(i=o,r.done())})).next((function(){return i}))},t.prototype.Na=function(t,e,n){var r=this,i=[],o=io(t);return e.forEach((function(e){var u=si(e.path);i.push(o.put(new Qi(n,u))),i.push(r.Co.Fa(t,n,e))})),pr.xn(i)},t.prototype.xa=function(t,e,n){var r=this,i=io(t);return pr.forEach(e,(function(e){var o=si(e.path);return pr.xn([i.delete([n,o]),r.Co.$a(t,n,e)])}))},t.prototype.Sa=function(t,e){var n=io(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.ka=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=io(t),i=Lt();return r.ss({range:n,ns:!0},(function(t,e,n){var r=hi(t[1]),o=new N(r);i=i.add(o)})).next((function(){return i}))},t.prototype.zo=function(t,e){var n=si(e.path),r=IDBKeyRange.bound([n],[J(n)],!1,!0),i=0;return io(t).ss({index:Qi.documentTargetsIndex,ns:!0,range:r},(function(t,e,n){var r=t[0];t[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},t.prototype.qe=function(t,e){return no(t).get(e).next((function(t){return t?wi(t):null}))},t}();function no(t){return ao.Un(t,Wi.store)}function ro(t){return ao.Un(t,Hi.store)}function io(t){return ao.Un(t,Qi.store)}var oo="Failed to obtain exclusive access to the persistence layer. To allow shared access, make sure to invoke `enablePersistence()` with `synchronizeTabs:true` in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",uo=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Wo=e,r.Ma=n,r}return r.__extends(e,t),e}(Zr),ao=function(){function t(e,n,r,i,o,u,a,s,c,l){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this._n=o,this.window=u,this.document=a,this.Oa=c,this.La=l,this.Ba=null,this.qa=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Ua=null,this.inForeground=!1,this.Qa=null,this.Wa=null,this.ja=Number.NEGATIVE_INFINITY,this.Ka=function(t){return Promise.resolve()}
2,!t.On())throw new h(f.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.Co=new fo(this,i),this.Ga=n+"main",this.serializer=new li(s),this.za=new vr(this.Ga,10,new Li(this.serializer)),this.Ha=new eo(this.Co,this.serializer),this.Sr=new Ji,this.br=new Ni(this.serializer,this.Sr),this.window&&this.window.localStorage?this.Ya=this.window.localStorage:(this.Ya=null,!1===l&&v("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.Un=function(t,e){if(t instanceof uo)return vr.Un(t.Wo,e);throw m()},t.prototype.start=function(){var t=this;return this.Ja().then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new h(f.FAILED_PRECONDITION,oo);return t.Xa(),t.Za(),t.tc(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t.Ha.Pa(e)}))})).then((function(e){t.Ba=new jr(e,t.Oa)})).then((function(){t.qa=!0})).catch((function(e){return t.za&&t.za.close(),Promise.reject(e)}))},t.prototype.ec=function(t){var e=this;return this.Ka=function(n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.Ti?[2,t(n)]:[2]}))}))},t(this.isPrimary)},t.prototype.nc=function(t){var e=this;this.za.jn((function(n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return null===n.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))},t.prototype.sc=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this._n.ds((function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this.Ti?[4,this.Ja()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.Ja=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return co(e).put(new Yi(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.ic(e).next((function(e){e||(t.isPrimary=!1,t._n.Ds((function(){return t.Ka(!1)})))}))})).next((function(){return t.rc(e)})).next((function(n){return t.isPrimary&&!n?t.oc(e).next((function(){return!1})):!!n&&t.ac(e).next((function(){return!0}))}))})).catch((function(e){if(mr(e))return p("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return p("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t._n.Ds((function(){return t.Ka(e)})),t.isPrimary=e}))},t.prototype.ic=function(t){var e=this;return so(t).get(Mi.key).next((function(t){return pr.resolve(e.cc(t))}))},t.prototype.uc=function(t){return co(t).delete(this.clientId)},t.prototype.hc=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,n,i,o,u=this;return r.__generator(this,(function(r){switch(r.label){case 0:return!this.isPrimary||this.lc(this.ja,18e5)?[3,2]:(this.ja=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(e){var n=t.Un(e,Yi.store);return n.Zn().next((function(t){var e=u._c(t,18e5),r=t.filter((function(t){return-1===e.indexOf(t)}));return pr.forEach(r,(function(t){return n.delete(t.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(e=r.sent(),this.Ya)for(n=0,i=e;n<i.length;n++)o=i[n],this.Ya.removeItem(this.fc(o.clientId));r.label=2;case 2:return[2]}}
2))}))},t.prototype.tc=function(){var t=this;this.Wa=this._n.gn("client_metadata_refresh",4e3,(function(){return t.Ja().then((function(){return t.hc()})).then((function(){return t.tc()}))}))},t.prototype.cc=function(t){return!!t&&t.ownerId===this.clientId},t.prototype.rc=function(t){var e=this;return this.La?pr.resolve(!0):so(t).get(Mi.key).next((function(n){if(null!==n&&e.lc(n.leaseTimestampMs,5e3)&&!e.dc(n.ownerId)){if(e.cc(n)&&e.networkEnabled)return!0;if(!e.cc(n)){if(!n.allowTabSynchronization)throw new h(f.FAILED_PRECONDITION,oo);return!1}}return!(!e.networkEnabled||!e.inForeground)||co(t).Zn().next((function(t){return void 0===e._c(t,5e3).find((function(t){if(e.clientId!==t.clientId){var n=!e.networkEnabled&&t.networkEnabled,r=!e.inForeground&&t.inForeground,i=e.networkEnabled===t.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(t){return e.isPrimary!==t&&p("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t}))},t.prototype.Si=function(){return r.__awaiter(this,void 0,void 0,(function(){var t=this;return r.__generator(this,(function(e){switch(e.label){case 0:return this.qa=!1,this.wc(),this.Wa&&(this.Wa.cancel(),this.Wa=null),this.mc(),this.Tc(),[4,this.za.runTransaction("readwrite",[Mi.store,Yi.store],(function(e){var n=new uo(e,jr.oi);return t.oc(n).next((function(){return t.uc(n)}))}))];case 1:return e.sent(),this.za.close(),this.Ec(),[2]}}))}))},t.prototype._c=function(t,e){var n=this;return t.filter((function(t){return n.lc(t.updateTimeMs,e)&&!n.dc(t.clientId)}))},t.prototype.Vi=function(){var t=this;return this.runTransaction("getActiveClients","readonly",(function(e){return co(e).Zn().next((function(e){return t._c(e,18e5).map((function(t){return t.clientId}))}))}))},Object.defineProperty(t.prototype,"Ti",{get:function(){return this.qa},enumerable:!1,configurable:!0}),t.prototype.Ic=function(t){return Ei.Fo(t,this.serializer,this.Sr,this.Co)},t.prototype.Ac=function(){return this.Ha},t.prototype.Rc=function(){return this.br},t.prototype.Pc=function(){return this.Sr},t.prototype.runTransaction=function(t,e,n){var r=this;p("IndexedDbPersistence","Starting transaction:",t);var i,o="readonly"===e?"readonly":"readwrite";return this.za.runTransaction(o,Xi,(function(o){return i=new uo(o,r.Ba?r.Ba.next():jr.oi),"readwrite-primary"===e?r.ic(i).next((function(t){return!!t||r.rc(i)})).next((function(e){if(!e)throw v("Failed to obtain primary lease for action '"+t+"'."),r.isPrimary=!1,r._n.Ds((function(){return r.Ka(!1)})),new h(f.FAILED_PRECONDITION,Jr);return n(i)})).next((function(t){return r.ac(i).next((function(){return t}))})):r.gc(i).next((function(){return n(i)}))})).then((function(t){return i.pr(),t}))},t.prototype.gc=function(t){var e=this;return so(t).get(Mi.key).next((function(t){if(null!==t&&e.lc(t.leaseTimestampMs,5e3)&&!e.dc(t.ownerId)&&!e.cc(t)&&!(e.La||e.allowTabSynchronization&&t.allowTabSynchronization))throw new h(f.FAILED_PRECONDITION,oo)}))},t.prototype.ac=function(t){var e=new Mi(this.clientId,this.allowTabSynchronization,Date.now());return so(t).put(Mi.key,e)},t.On=function(){return vr.On()},t.prototype.oc=function(t){var e=this,n=so(t);return n.get(Mi.key).next((function(t){return e.cc(t)?(p("IndexedDbPersistence","Releasing primary lease."),n.delete(Mi.key)):pr.resolve()}))},t.prototype.lc=function(t,e){var n=Date.now();return!(t<n-e||t>n&&(v("Detected an update time that is in the future: "+t+" > "+n),1))},t.prototype.Xa=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.Qa=function(){t._n.ds((function(){return t.inForeground="visible"===t.document.visibilityState,t.Ja()}))},this.document.addEventListener("visibilitychange",this.Qa),this.inForeground="visible"===this.document.visibilityState)},t.prototype.mc=function(){this.Qa&&(this.document.removeEventListener("visibilitychange",this.Qa),this.Qa=null)},t.prototype.Za=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.Ua=function(){e.wc(),e._n.ds((function(){return e.Si()}))},this.window.addEventListener("unload",this.Ua))},t.prototype.Tc=function(){this.Ua&&(this.window.removeEventListener("unload",this.Ua),this.Ua=null)},t.prototype.dc=function(t){var e;try{var n=null!==(null===(e=this.Ya)||void 0===e?void 0:e.getItem(this.fc(t)));return p("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return v("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype.wc=function(){if(this.Ya)try{this.Ya.setItem(this.fc(this.clientId),String(Date.now()))}catch(r){v("Failed to set zombie client id.",r)}},t.prototype.Ec=function(){if(this.Ya)try{this.Ya.removeItem(this.fc(this.clientId))}catch(r){}},t.prototype.fc=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function so(t){return ao.Un(t,Mi.store)}function co(t){return ao.Un(t,Yi.store)}var fo=function(){function t(t,e){this.db=t,this.do=new ai(this,e)}return t.prototype.Ro=function(t){var e=this.yc(t);return this.db.Ac().Da(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.yc=function(t){var e=0;return this.yo(t,(function(t){e++})).next((function(){return e}))},t.prototype.De=function(t,e){return this.db.Ac().De(t,e)},t.prototype.yo=function(t,e){return this.Vc(t,(function(t,n){return e(n)}))},t.prototype.Fa=function(t,e,n){return ho(t,n)},t.prototype.$a=function(t,e,n){return ho(t,n)},t.prototype.Vo=function(t,e,n){return this.db.Ac().Vo(t,e,n)},t.prototype.Ko=function(t,e){return ho(t,e)},t.prototype.bc=function(t,e){return function(t,e){var n=!1;return Ai(t).rs((function(r){return Ii(t,r,e).next((function(t){return t&&(n=!0),pr.resolve(!t)}))})).next((function(){return n}))}(t,e)},t.prototype.po=function(t,e){var n=this,r=this.db.Rc().aa(),i=[],o=0;return this.Vc(t,(function(u,a){if(a<=e){var s=n.bc(t,u).next((function(e){if(!e)return o++,r.Ar(t,u).next((function(){return r.Ir(u),io(t).delete([0,si(u.path)])}))}));i.push(s)}})).next((function(){return pr.xn(i)})).next((function(){return r.apply(t)})).next((function(){return o}
2))},t.prototype.removeTarget=function(t,e){var n=e.nt(t.Ma);return this.db.Ac().ba(t,n)},t.prototype.vc=function(t,e){return ho(t,e)},t.prototype.Vc=function(t,e){var n,r=io(t),i=jr.oi;return r.ss({index:Qi.documentTargetsIndex},(function(t,r){var o=t[0],u=(t[1],r.path),a=r.sequenceNumber;0===o?(i!==jr.oi&&e(new N(hi(n)),i),i=a,n=u):i=jr.oi})).next((function(){i!==jr.oi&&e(new N(hi(n)),i)}))},t.prototype.vo=function(t){return this.db.Rc().ha(t)},t}();function ho(t,e){return io(t).put(function(t,e){return new Qi(0,si(t.path),e)}(e,t.Ma))}function lo(t,e){var n=t.projectId;return t.W||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var po=function(){function t(t,e,n){this.persistence=t,this.Sc=e,this.Dc=new It(Y),this.Cc=new ut((function(t){return pt(t)}),vt),this.Nc=st.min(),this.vr=t.Ic(n),this.Fc=t.Rc(),this.Ha=t.Ac(),this.xc=new ti(this.Fc,this.vr,this.persistence.Pc()),this.Sc.$c(this.xc)}return t.prototype.Eo=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return t.bo(n,e.Dc)}))},t}();function vo(t,e){var n=w(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(t){var r=e.batch.keys(),i=n.Fc.aa({ua:!0});return function(t,e,n,r){var i=n.batch,o=i.keys(),u=pr.resolve();return o.forEach((function(t){u=u.next((function(){return r.Ar(e,t)})).next((function(e){var o=e,u=n._r.get(t);b(null!==u),(!o||o.version.L(u)<0)&&(o=i.ar(t,o,n))&&r.Tr(o,n.lr)}))})),u.next((function(){return t.vr.Qo(e,i)}))}(n,t,e,i).next((function(){return i.apply(t)})).next((function(){return n.vr.Go(t)})).next((function(){return n.xc.$r(t,r)}))}))}function go(t){var e=w(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(function(t){return e.Ha.Ra(t)}))}function yo(t,e){var n=w(t),r=e.et,i=n.Dc;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(t){var o=n.Fc.aa({ua:!0});i=n.Dc;var u=[];e.Gt.forEach((function(e,o){var a=i.get(o);if(a){u.push(n.Ha.xa(t,e.ne,o).next((function(){return n.Ha.Na(t,e.te,o)})));var s=e.resumeToken;if(s.O()>0){var c=a.st(s,r).nt(t.Ma);i=i.rt(o,c),function(t,e,n){return b(e.resumeToken.O()>0),0===t.resumeToken.O()||e.et.J()-t.et.J()>=3e8||n.te.size+n.ee.size+n.ne.size>0}(a,c,e)&&u.push(n.Ha.ba(t,c))}}}));var a=kt(),s=Lt();if(e.Ht.forEach((function(t,e){s=s.add(t)})),u.push(o.getEntries(t,s).next((function(i){e.Ht.forEach((function(s,c){var f=i.get(s);c instanceof Dn&&c.version.isEqual(st.min())?(o.Ir(s,r),a=a.rt(s,c)):null==f||c.version.L(f.version)>0||0===c.version.L(f.version)&&f.hasPendingWrites?(o.Tr(c,r),a=a.rt(s,c)):p("LocalStore","Ignoring outdated watch update for ",s,". Current version:",f.version," Watch version:",c.version),e.Yt.has(s)&&u.push(n.persistence.Co.vc(t,s))}))}))),!r.isEqual(st.min())){var c=n.Ha.Ra(t).next((function(e){return n.Ha.ga(t,t.Ma,r)}));u.push(c)}return pr.xn(u).next((function(){return o.apply(t)})).next((function(){return n.xc.kr(t,a)}))})).then((function(t){return n.Dc=i,t}))}function mo(t,e){var n=w(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(t){return void 0===e&&(e=-1),n.vr.Lo(t,e)}))}function bo(t,e){var n=w(t);return n.persistence.runTransaction("Allocate target","readwrite",(function(t){var r;return n.Ha.Ca(t,e).next((function(i){return i?(r=i,pr.resolve(r)):n.Ha.Ea(t).next((function(i){return r=new bt(e,i,0,t.Ma),n.Ha.ya(t,r).next((function(){return r}))}))}))})).then((function(t){var r=n.Dc.get(t.targetId);return(null===r||t.et.L(r.et)>0)&&(n.Dc=n.Dc.rt(t.targetId,t),n.Cc.set(e,t.targetId)),t}))}function wo(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a;return r.__generator(this,(function(r){switch(r.label){case 0:i=w(t),o=i.Dc.get(e),u=n?"readwrite":"readwrite-primary",r.label=1;case 1:return r.trys.push([1,4,,5]),n?[3,3]:[4,i.persistence.runTransaction("Release target",u,(function(t){return i.persistence.Co.removeTarget(t,o)}))];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:if(!mr(a=r.sent()))throw a;return p("LocalStore","Failed to update sequence numbers for target "+e+": "+a),[3,5];case 5:return i.Dc=i.Dc.remove(e),i.Cc.delete(o.target),[2]}}))}))}function _o(t,e,n){var r=w(t),i=st.min(),o=Lt();
2return r.persistence.runTransaction("Execute query","readonly",(function(t){return function(t,e,n){var r=w(t),i=r.Cc.get(n);return void 0!==i?pr.resolve(r.Dc.get(i)):r.Ha.Ca(e,n)}(r,t,qn(e)).next((function(e){if(e)return i=e.lastLimboFreeSnapshotVersion,r.Ha.ka(t,e.targetId).next((function(t){o=t}))})).next((function(){return r.Sc.Or(t,e,n?i:st.min(),n?o:Lt())})).next((function(t){return{documents:t,kc:o}}))}))}function Eo(t,e){var n=w(t),r=w(n.Ha),i=n.Dc.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(t){return r.qe(t,e).next((function(t){return t?t.target:null}))}))}function Io(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){if(t.code!==f.FAILED_PRECONDITION||t.message!==Jr)throw t;return p("LocalStore","Unexpectedly lost primary lease"),[2]}))}))}var To=function(){function t(){this.Mc=new St(xo.Oc),this.Lc=new St(xo.Bc)}return t.prototype.m=function(){return this.Mc.m()},t.prototype.Fa=function(t,e){var n=new xo(t,e);this.Mc=this.Mc.add(n),this.Lc=this.Lc.add(n)},t.prototype.qc=function(t,e){var n=this;t.forEach((function(t){return n.Fa(t,e)}))},t.prototype.$a=function(t,e){this.Uc(new xo(t,e))},t.prototype.Qc=function(t,e){var n=this;t.forEach((function(t){return n.$a(t,e)}))},t.prototype.Wc=function(t){var e=this,n=new N(new x([])),r=new xo(n,t),i=new xo(n,t+1),o=[];return this.Lc.Nt([r,i],(function(t){e.Uc(t),o.push(t.key)})),o},t.prototype.jc=function(){var t=this;this.Mc.forEach((function(e){return t.Uc(e)}))},t.prototype.Uc=function(t){this.Mc=this.Mc.delete(t),this.Lc=this.Lc.delete(t)},t.prototype.Kc=function(t){var e=new N(new x([])),n=new xo(e,t),r=new xo(e,t+1),i=Lt();return this.Lc.Nt([n,r],(function(t){i=i.add(t.key)})),i},t.prototype.zo=function(t){var e=new xo(t,0),n=this.Mc.xt(e);return null!==n&&t.isEqual(n.key)},t}(),xo=function(){function t(t,e){this.key=t,this.Gc=e}return t.Oc=function(t,e){return N.i(t.key,e.key)||Y(t.Gc,e.Gc)},t.Bc=function(t,e){return Y(t.Gc,e.Gc)||N.i(t.key,e.key)},t}(),So=function(t,e){this.user=e,this.type="OAuth",this.zc={},this.zc.Authorization="Bearer "+t},Ao=function(){function t(){this.Hc=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.Yc=function(){},t.prototype.Jc=function(t){this.Hc=t,t(Mr.UNAUTHENTICATED)},t.prototype.Xc=function(){this.Hc=null},t}(),No=function(){function t(t){var e=this;this.Zc=null,this.currentUser=Mr.UNAUTHENTICATED,this.tu=!1,this.eu=0,this.Hc=null,this.forceRefresh=!1,this.Zc=function(){e.eu++,e.currentUser=e.nu(),e.tu=!0,e.Hc&&e.Hc(e.currentUser)},this.eu=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.Zc):(this.Zc(null),t.get().then((function(t){e.auth=t,e.Zc&&e.auth.addAuthTokenListener(e.Zc)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.eu,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return t.eu!==e?(p("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(b("string"==typeof n.accessToken),new So(n.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.Yc=function(){this.forceRefresh=!0},t.prototype.Jc=function(t){this.Hc=t,this.tu&&t(this.currentUser)},t.prototype.Xc=function(){this.auth&&this.auth.removeAuthTokenListener(this.Zc),this.Zc=null,this.Hc=null},t.prototype.nu=function(){var t=this.auth&&this.auth.getUid();return b(null===t||"string"==typeof t),new Mr(t)},t}(),ko=function(){function t(t,e){this.su=t,this.iu=e,this.type="FirstParty",this.user=Mr.ei}return Object.defineProperty(t.prototype,"zc",{get:function(){var t={"X-Goog-AuthUser":this.iu},e=this.su.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),t},enumerable:!1,configurable:!0}),t}(),Do=function(){function t(t,e){this.su=t,this.iu=e}return t.prototype.getToken=function(){return Promise.resolve(new ko(this.su,this.iu))},t.prototype.Jc=function(t){t(Mr.ei)},t.prototype.Xc=function(){},t.prototype.Yc=function(){},t}(),Co=function(){function t(t,e,n,r,i,o){this._n=t,this.ru=n,this.ou=r,this.au=i,this.listener=o,this.state=0,this.cu=0,this.uu=null,this.stream=null,this.gs=new dr(t,e)}return t.prototype.hu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.lu=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this._u()},t.prototype.stop=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this.hu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))},t.prototype.fu=function(){this.state=0,this.gs.reset()},t.prototype.du=function(){var t=this;this.lu()&&null===this.uu&&(this.uu=this._n.gn(this.ru,6e4,(function(){return t.wu()})))},t.prototype.mu=function(t){this.Tu(),this.stream.send(t)},t.prototype.wu=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return this.lu()?[2,this.close(0)]:[2]}))}))},t.prototype.Tu=function(){this.uu&&(this.uu.cancel(),this.uu=null)},t.prototype.close=function(t,e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return this.Tu(),this.gs.cancel(),this.cu++,3!==t?this.gs.reset():e&&e.code===f.RESOURCE_EXHAUSTED?(v(e.toString()),v("Using maximum backoff delay to prevent overloading the backend."),this.gs.An()):e&&e.code===f.UNAUTHENTICATED&&this.au.Yc(),null!==this.stream&&(this.Eu(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Iu(e)];case 1:return n.sent(),[2]}}))}))},t.prototype.Eu=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.Au(this.cu),n=this.cu;this.au.getToken().then((function(e){t.cu===n&&t.Ru(e)}),(function(n){e((function(){var e=new h(f.UNKNOWN,"Fetching auth token failed: "+n.message);return t.Pu(e)}))}))},t.prototype.Ru=function(t){var e=this,n=this.Au(this.cu);this.stream=this.gu(t),this.stream.yu((function(){n((function(){return e.state=2,e.listener.yu()}))})),this.stream.Iu((function(t){n((function(){return e.Pu(t)}))})),this.stream.onMessage((function(t){n((function(){return e.onMessage(t)}))}))},t.prototype._u=function(){var t=this;this.state=4,this.gs.Rn((function(){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return this.state=0,this.start(),[2]}))}))}))},t.prototype.Pu=function(t){return p("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.Au=function(t){var e=this;return function(n){e._n.ds((function(){return e.cu===t?n():(p("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),Oo=function(t){function e(e,n,r,i,o){var u=this;return(u=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).serializer=i,u}return r.__extends(e,t),e.prototype.gu=function(t){return this.ou.Vu("Listen",t)},e.prototype.onMessage=function(t){this.gs.reset();var e=function(t,e){var n;if("targetChange"in e){e.targetChange;var r=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:m()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.Ue?(b(void 0===e||"string"==typeof e),Z.fromBase64String(e||"")):(b(void 0===e||e instanceof Uint8Array),Z.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),u=e.targetChange.cause,a=u&&function(t){var e=void 0===t.code?f.UNKNOWN:Et(t.code);return new h(e,t.message||"")}(u);n=new Wt(r,i,o,a||null)}else if("documentChange"in e){e.documentChange;var s=e.documentChange;s.document,s.document.name,s.document.updateTime;var c=Ae(t,s.document.name),l=Ie(s.document.updateTime),d=new xn({mapValue:{fields:s.document.fields}}),p=new kn(c,l,d,{}),v=s.targetIds||[],g=s.removedTargetIds||[];n=new Gt(v,g,p.key,p)}else if("documentDelete"in e){e.documentDelete;var y=e.documentDelete;y.document;var w=Ae(t,y.document),_=y.readTime?Ie(y.readTime):st.min(),E=new Dn(w,_),I=y.removedTargetIds||[];n=new Gt([],I,E.key,E)}else if("documentRemove"in e){e.documentRemove;var T=e.documentRemove;T.document;var x=Ae(t,T.document),S=T.removedTargetIds||[];n=new Gt([],S,x,null)}else{if(!("filter"in e))return m();e.filter;var A=e.filter;A.targetId;var N=A.count||0,k=new wt(N),D=A.targetId;n=new zt(D,k)}return n}(this.serializer,t),n=function(t){if(!("targetChange"in t))return st.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?st.min():e.readTime?Ie(e.readTime):st.min()}(t);return this.listener.pu(e,n)},e.prototype.bu=function(t){var e={};e.database=De(this.serializer),e.addTarget=function(t,e){var n,r=e.target;return(n=gt(r)?{documents:Le(t,r)}:{query:Re(t,r)}).targetId=e.targetId,e.resumeToken.O()>0&&(n.resumeToken=_e(t,e.resumeToken)),n}(this.serializer,t);var n=function(t,e){var n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return m()}}(0,e.tt);return null==n?null:{"goog-listen-tags":n}}(this.serializer,t);n&&(e.labels=n),this.mu(e)},e.prototype.vu=function(t){var e={};e.database=De(this.serializer),e.removeTarget=t,this.mu(e)},e}(Co),Uo=function(t){function e(e,n,r,i,o){var u=this;return(u=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).serializer
2=i,u.Su=!1,u}return r.__extends(e,t),Object.defineProperty(e.prototype,"Du",{get:function(){return this.Su},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.Su=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.Eu=function(){this.Su&&this.Cu([])},e.prototype.gu=function(t){return this.ou.Vu("Write",t)},e.prototype.onMessage=function(t){if(b(!!t.streamToken),this.lastStreamToken=t.streamToken,this.Su){this.gs.reset();var e=function(t,e){return t&&t.length>0?(b(void 0!==e),t.map((function(t){return function(t,e){var n=t.updateTime?Ie(t.updateTime):Ie(e);n.isEqual(st.min())&&(n=Ie(e));var r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults),new sn(n,r)}(t,e)}))):[]}(t.writeResults,t.commitTime),n=Ie(t.commitTime);return this.listener.Nu(n,e)}return b(!t.writeResults||0===t.writeResults.length),this.Su=!0,this.listener.Fu()},e.prototype.xu=function(){var t={};t.database=De(this.serializer),this.mu(t)},e.prototype.Cu=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map((function(t){return Ue(e.serializer,t)}))};this.mu(n)},e}(Co),Po=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).credentials=e,i.ou=n,i.serializer=r,i.$u=!1,i}return r.__extends(e,t),e.prototype.ku=function(){if(this.$u)throw new h(f.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.Mu=function(t,e,n){var r=this;return this.ku(),this.credentials.getToken().then((function(i){return r.ou.Mu(t,e,n,i)})).catch((function(t){throw t.code===f.UNAUTHENTICATED&&r.credentials.Yc(),t}))},e.prototype.Ou=function(t,e,n){var r=this;return this.ku(),this.credentials.getToken().then((function(i){return r.ou.Ou(t,e,n,i)})).catch((function(t){throw t.code===f.UNAUTHENTICATED&&r.credentials.Yc(),t}))},e.prototype.terminate=function(){this.$u=!1},e}((function(){})),Lo=function(){function t(t,e){this.os=t,this.fi=e,this.state="Unknown",this.Lu=0,this.Bu=null,this.qu=!0}return t.prototype.Uu=function(){var t=this;0===this.Lu&&(this.Qu("Unknown"),this.Bu=this.os.gn("online_state_timeout",1e4,(function(){return t.Bu=null,t.Wu("Backend didn't respond within 10 seconds."),t.Qu("Offline"),Promise.resolve()})))},t.prototype.ju=function(t){"Online"===this.state?this.Qu("Unknown"):(this.Lu++,this.Lu>=1&&(this.Ku(),this.Wu("Connection failed 1 times. Most recent error: "+t.toString()),this.Qu("Offline")))},t.prototype.set=function(t){this.Ku(),this.Lu=0,"Online"===t&&(this.qu=!1),this.Qu(t)},t.prototype.Qu=function(t){t!==this.state&&(this.state=t,this.fi(t))},t.prototype.Wu=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\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.qu?(v(e),this.qu=!1):p("OnlineStateTracker",e)},t.prototype.Ku=function(){null!==this.Bu&&(this.Bu.cancel(),this.Bu=null)},t}(),Ro=function(t,e,n,i,o){var u=this;this.Gu=t,this.zu=e,this.os=n,this.Hu={},this.Yu=[],this.Ju=new Map,this.Xu=new Set,this.Zu=[],this.th=o,this.th.eh((function(t){n.ds((function(){return r.__awaiter(u,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return Qo(this)?(p("RemoteStore","Restarting streams for network reachability change."),[4,function(t){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){switch(n.label){case 0:return(e=w(t)).Xu.add(4),[4,jo(e)];case 1:return n.sent(),e.nh.set("Unknown"),e.Xu.delete(4),[4,Mo(e)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))})),this.nh=new Lo(n,i)};function Mo(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){switch(r.label){case 0:if(!Qo(t))return[3,4];e=0,n=t.Zu,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function jo(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){switch(r.label){case 0:e=0,n=t.Zu,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function Fo(t){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){switch(n.label){case 0:return e=w(t),p("RemoteStore","RemoteStore shutting down."),e.Xu.add(5),[4,jo(e)];case 1:return n.sent(),e.th.Si(),e.nh.set("Unknown"),[2]}}))}))}function Vo(t,e){var n=w(t);n.Ju.has(e.targetId)||(n.Ju.set(e.targetId,e),Wo(n)?zo(n):au(n).lu()&&Bo(n,e))}function qo(t,e){var n=w(t),r=au(n);n.Ju.delete(e),r.lu()&&Go(n,e),0===n.Ju.size&&(r.lu()?r.du():Qo(n)&&n.nh.set("Unknown"))}function Bo(t,e){t.sh.Ee(e.targetId),au(t).bu(e)}function Go(t,e){t.sh.Ee(e),au(t).vu(e)}function zo(t){t.sh=new Ht({Be:function(e){return t.Hu.Be(e)},qe:function(e){return t.Ju.get(e)||null}}),au(t).start(),t.nh.Uu()}function Wo(t){return Qo(t)&&!au(t).hu()&&t.Ju.size>0}function Qo(t){return 0===w(t).Xu.size}function Ho(t){t.sh=void 0}function Ko(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return t.Ju.forEach((function(e,n){Bo(t,e)})),[2]}))}))}function $o(t,e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){return Ho(t),Wo(t)?(t.nh.ju(e),zo(t)):t.nh.set("Unknown"),[2]}))}))}function Yo(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u;return r.__generator(this,(function(a){switch(a.label){case 0:if(t.nh.set("Online"),!(e instanceof Wt&&2===e.state&&e.cause))return[3,6];a.label=1;case 1:return a.trys.push([1,3,,5]),[4,function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u;return r.__generator(this,(function(r){switch(r.label){case 0:n=e.cause,i=0,o=e.targetIds,r.label=1;case 1:return i<o.length?(u=o[i],t.Ju.has(u)?[4,t.Hu.ih(u,n)]:[3,3]):[3,5];case 2:r.sent(),t.Ju.delete(u),t.sh.removeTarget(u),r.label=3;case 3:r.label=4;case 4:return i++,[3,1];case 5:return[2]}}
2))}))}(t,e)];case 2:return a.sent(),[3,5];case 3:return i=a.sent(),p("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),i),[4,Xo(t,i)];case 4:return a.sent(),[3,5];case 5:return[3,13];case 6:if(e instanceof Gt?t.sh.pe(e):e instanceof zt?t.sh.xe(e):t.sh.Se(e),n.isEqual(st.min()))return[3,13];a.label=7;case 7:return a.trys.push([7,11,,13]),[4,go(t.Gu)];case 8:return o=a.sent(),n.L(o)>=0?[4,function(t,e){var n=t.sh.Me(e);return n.Gt.forEach((function(n,r){if(n.resumeToken.O()>0){var i=t.Ju.get(r);i&&t.Ju.set(r,i.st(n.resumeToken,e))}})),n.zt.forEach((function(e){var n=t.Ju.get(e);if(n){t.Ju.set(e,n.st(Z.B,n.et)),Go(t,e);var r=new bt(n.target,e,1,n.sequenceNumber);Bo(t,r)}})),t.Hu.rh(n)}(t,n)]:[3,10];case 9:a.sent(),a.label=10;case 10:return[3,13];case 11:return p("RemoteStore","Failed to raise snapshot:",u=a.sent()),[4,Xo(t,u)];case 12:return a.sent(),[3,13];case 13:return[2]}}))}))}function Xo(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i=this;return r.__generator(this,(function(o){switch(o.label){case 0:if(!mr(e))throw e;return t.Xu.add(1),[4,jo(t)];case 1:return o.sent(),t.nh.set("Offline"),n||(n=function(){return go(t.Gu)}),t.os.Ds((function(){return r.__awaiter(i,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return p("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return e.sent(),t.Xu.delete(1),[4,Mo(t)];case 2:return e.sent(),[2]}}))}))})),[2]}}))}))}function Jo(t,e){return e().catch((function(n){return Xo(t,n,e)}))}function Zo(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n,i,o,u;return r.__generator(this,(function(r){switch(r.label){case 0:e=w(t),n=su(e),i=e.Yu.length>0?e.Yu[e.Yu.length-1].batchId:-1,r.label=1;case 1:if(!function(t){return Qo(t)&&t.Yu.length<10}(e))return[3,7];r.label=2;case 2:return r.trys.push([2,4,,6]),[4,mo(e.Gu,i)];case 3:return null===(o=r.sent())?(0===e.Yu.length&&n.du(),[3,7]):(i=o.batchId,function(t,e){t.Yu.push(e);var n=su(t);n.lu()&&n.Du&&n.Cu(e.mutations)}(e,o),[3,6]);case 4:return u=r.sent(),[4,Xo(e,u)];case 5:return r.sent(),[3,6];case 6:return[3,1];case 7:return tu(e)&&eu(e),[2]}}))}))}function tu(t){return Qo(t)&&!su(t).hu()&&t.Yu.length>0}function eu(t){su(t).start()}function nu(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return su(t).xu(),[2]}))}))}function ru(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n,i,o;return r.__generator(this,(function(r){for(e=su(t),n=0,i=t.Yu;n<i.length;n++)o=i[n],e.Cu(o.mutations);return[2]}))}))}function iu(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o;return r.__generator(this,(function(r){switch(r.label){case 0:return i=t.Yu.shift(),o=Yr.from(i,e,n),[4,Jo(t,(function(){return t.Hu.oh(o)}))];case 1:return r.sent(),[4,Zo(t)];case 2:return r.sent(),[2]}}))}))}function ou(t,e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return e&&su(t).Du?[4,function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(r){switch(r.label){case 0:return _t(i=e.code)&&i!==f.ABORTED?(n=t.Yu.shift(),su(t).fu(),[4,Jo(t,(function(){return t.Hu.ah(n.batchId,e)}))]):[3,3];case 1:return r.sent(),[4,Zo(t)];case 2:r.sent(),r.label=3;case 3:return[2]}}
2))}))}(t,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return tu(t)&&eu(t),[2]}}))}))}function uu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:return n=w(t),e?(n.Xu.delete(2),[4,Mo(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return e?[3,4]:(n.Xu.add(2),[4,jo(n)]);case 3:r.sent(),n.nh.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}))}))}function au(t){var e=this;return t.uh||(t.uh=function(t,e,n){var r=w(t);return r.ku(),new Oo(e,r.ou,r.credentials,r.serializer,n)}(t.zu,t.os,{yu:Ko.bind(null,t),Iu:$o.bind(null,t),pu:Yo.bind(null,t)}),t.Zu.push((function(n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return n?(t.uh.fu(),Wo(t)?zo(t):t.nh.set("Unknown"),[3,3]):[3,1];case 1:return[4,t.uh.stop()];case 2:e.sent(),Ho(t),e.label=3;case 3:return[2]}}))}))}))),t.uh}function su(t){var e=this;return t.hh||(t.hh=function(t,e,n){var r=w(t);return r.ku(),new Uo(e,r.ou,r.credentials,r.serializer,n)}(t.zu,t.os,{yu:nu.bind(null,t),Iu:ou.bind(null,t),Fu:ru.bind(null,t),Nu:iu.bind(null,t)}),t.Zu.push((function(n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return n?(t.hh.fu(),[4,Zo(t)]):[3,2];case 1:return e.sent(),[3,4];case 2:return[4,t.hh.stop()];case 3:e.sent(),t.Yu.length>0&&(p("RemoteStore","Stopping write stream with "+t.Yu.length+" pending writes"),t.Yu=[]),e.label=4;case 4:return[2]}}
2))}))}))),t.hh}var cu=function(t){this.key=t},fu=function(t){this.key=t},hu=function(){function t(t,e){this.query=t,this.lh=e,this._h=null,this.Zt=!1,this.fh=Lt(),this.Qt=Lt(),this.dh=$n(t),this.wh=new jt(this.dh)}return Object.defineProperty(t.prototype,"mh",{get:function(){return this.lh},enumerable:!1,configurable:!0}),t.prototype.Th=function(t,e){var n=this,r=e?e.Eh:new Ft,i=e?e.wh:this.wh,o=e?e.Qt:this.Qt,u=i,a=!1,s=Ln(this.query)&&i.size===this.query.limit?i.last():null,c=Rn(this.query)&&i.size===this.query.limit?i.first():null;if(t.ut((function(t,e){var f=i.get(t),h=e instanceof kn?e:null;h&&(h=Kn(n.query,h)?h:null);var l=!!f&&n.Qt.has(f.key),d=!!h&&(h.Ye||n.Qt.has(h.key)&&h.hasCommittedMutations),p=!1;f&&h?f.data().isEqual(h.data())?l!==d&&(r.track({type:3,doc:h}),p=!0):n.Ih(f,h)||(r.track({type:2,doc:h}),p=!0,(s&&n.dh(h,s)>0||c&&n.dh(h,c)<0)&&(a=!0)):!f&&h?(r.track({type:0,doc:h}),p=!0):f&&!h&&(r.track({type:1,doc:f}),p=!0,(s||c)&&(a=!0)),p&&(h?(u=u.add(h),o=d?o.add(t):o.delete(t)):(u=u.delete(t),o=o.delete(t)))})),Ln(this.query)||Rn(this.query))for(;u.size>this.query.limit;){var f=Ln(this.query)?u.last():u.first();u=u.delete(f.key),o=o.delete(f.key),r.track({type:1,doc:f})}return{wh:u,Eh:r,Ah:a,Qt:o}},t.prototype.Ih=function(t,e){return t.Ye&&e.hasCommittedMutations&&!e.Ye},t.prototype.gr=function(t,e,n){var r=this,i=this.wh;this.wh=t.wh,this.Qt=t.Qt;var o=t.Eh.qt();o.sort((function(t,e){return function(t,e){var n=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return m()}};return n(t)-n(e)}(t.type,e.type)||r.dh(t.doc,e.doc)})),this.Rh(n);var u=e?this.Ph():[],a=0===this.fh.size&&this.Zt?1:0,s=a!==this._h;return this._h=a,0!==o.length||s?{snapshot:new Vt(this.query,t.wh,i,o,t.Qt,0===a,s,!1),gh:u}:{gh:u}},t.prototype.Us=function(t){return this.Zt&&"Offline"===t?(this.Zt=!1,this.gr({wh:this.wh,Eh:new Ft,Qt:this.Qt,Ah:!1},!1)):{gh:[]}},t.prototype.yh=function(t){return!this.lh.has(t)&&!!this.wh.has(t)&&!this.wh.get(t).Ye},t.prototype.Rh=function(t){var e=this;t&&(t.te.forEach((function(t){return e.lh=e.lh.add(t)})),t.ee.forEach((function(t){})),t.ne.forEach((function(t){return e.lh=e.lh.delete(t)})),this.Zt=t.Zt)},t.prototype.Ph=function(){var t=this;if(!this.Zt)return[];var e=this.fh;this.fh=Lt(),this.wh.forEach((function(e){t.yh(e.key)&&(t.fh=t.fh.add(e.key))}));var n=[];return e.forEach((function(e){t.fh.has(e)||n.push(new fu(e))})),this.fh.forEach((function(t){e.has(t)||n.push(new cu(t))})),n},t.prototype.Vh=function(t){this.lh=t.kc,this.fh=Lt();var e=this.Th(t.documents);return this.gr(e,!0)},t.prototype.ph=function(){return Vt.Kt(this.query,this.wh,this.Qt,0===this._h)},t}(),lu=function(t,e,n){this.query=t,this.targetId=e,this.view=n},du=function(t){this.key=t,this.bh=!1},pu=function(){function t(t,e,n,r,i,o){this.Gu=t,this.Sh=e,this.Dh=n,this.Ch=r,this.currentUser=i,this.Nh=o,this.Fh={},this.xh=new ut((function(t){return Qn(t)}),Wn),this.$h=new Map,this.kh=[],this.Mh=new It(N.i),this.Oh=new Map,this.Lh=new To,this.Bh={},this.qh=new Map,this.Uh=to.Ta(),this.onlineState="Unknown",this.Qh=void 0}return Object.defineProperty(t.prototype,"Wh",{get:function(){return!0===this.Qh},enumerable:!1,configurable:!0}),t}();function vu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a,s;return r.__generator(this,(function(r){switch(r.label){case 0:return n=qu(t),(u=n.xh.get(e))?(i=u.targetId,n.Ch.Mi(i),o=u.view.ph(),[3,4]):[3,1];case 1:return[4,bo(n.Gu,qn(e))];case 2:return a=r.sent(),s=n.Ch.Mi(a.targetId),i=a.targetId,[4,gu(n,e,i,"current"===s)];case 3:o=r.sent(),n.Wh&&Vo(n.Sh,a),r.label=4;case 4:return[2,o]}}))}))}function gu(t,e,n,i){return r.__awaiter(this,void 0,void 0,(function(){var o,u,a,s,c,f;return r.__generator(this,(function(h){switch(h.label){case 0:return t.jh=function(e,n,i){return function(t,e,n,i){return r.__awaiter(this,void 0,void 0,(function(){var o,u,a;return r.__generator(this,(function(r){switch(r.label){case 0:return(o=e.view.Th(n)).Ah?[4,_o(t.Gu,e.query,!1).then((function(t){var n=t.documents;return e.view.Th(n,o)}))]:[3,2];case 1:o=r.sent(),r.label=2;case 2:return u=i&&i.Gt.get(e.targetId),a=e.view.gr(o,t.Wh,u),[2,(Au(t,e.targetId,a.gh),a.snapshot)]}}))}))}(t,e,n,i)},[4,_o(t.Gu,e,!0)];case 1:return o=h.sent(),u=new hu(e,o.kc),a=u.Th(o.documents),s=Bt.Xt(n,i&&"Offline"!==t.onlineState),c=u.gr(a,t.Wh,s),Au(t,n,c.gh),f=new lu(e,n,u),[2,(t.xh.set(e,f),t.$h.has(n)?t.$h.get(n).push(e):t.$h.set(n,[e]),c.snapshot)]}}))}))}function yu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o;return r.__generator(this,(function(r){switch(r.label){case 0:return n=w(t),i=n.xh.get(e),(o=n.$h.get(i.targetId)).length>1?[2,(n.$h.set(i.targetId,o.filter((function(t){return!Wn(t,e)}))),void n.xh.delete(e))]:n.Wh?(n.Ch.Li(i.targetId),n.Ch.Ni(i.targetId)?[3,2]:[4,wo(n.Gu,i.targetId,!1).then((function(){n.Ch.qi(i.targetId),qo(n.Sh,i.targetId),xu(n,i.targetId)})).catch(Io)]):[3,3];case 1:r.sent(),r.label=2;case 2:return[3,5];case 3:return xu(n,i.targetId),[4,wo(n.Gu,i.targetId,!0)];case 4:r.sent(),r.label=5;case 5:return[2]}}
2))}))}function mu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(r){switch(r.label){case 0:n=w(t),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,yo(n.Gu,e)];case 2:return i=r.sent(),e.Gt.forEach((function(t,e){var r=n.Oh.get(e);r&&(b(t.te.size+t.ee.size+t.ne.size<=1),t.te.size>0?r.bh=!0:t.ee.size>0?b(r.bh):t.ne.size>0&&(b(r.bh),r.bh=!1))})),[4,Du(n,i,e)];case 3:return r.sent(),[3,6];case 4:return[4,Io(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}))}))}function bu(t,e,n){var r=w(t);if(r.Wh&&0===n||!r.Wh&&1===n){var i=[];r.xh.forEach((function(t,n){var r=n.view.Us(e);r.snapshot&&i.push(r.snapshot)})),function(t,e){var n=w(t);n.onlineState=e;var r=!1;n.Ls.forEach((function(t,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].Us(e)&&(r=!0)})),r&&Lr(n)}(r.Dh,e),i.length&&r.Fh.pu(i),r.onlineState=e,r.Wh&&r.Ch.ji(e)}}function wu(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a,s,c;return r.__generator(this,(function(r){switch(r.label){case 0:return(i=w(t)).Ch.Ui(e,"rejected",n),o=i.Oh.get(e),(u=o&&o.key)?(a=(a=new It(N.i)).rt(u,new Dn(u,st.min())),s=Lt().add(u),c=new qt(st.min(),new Map,new St(Y),a,s),[4,mu(i,c)]):[3,2];case 1:return r.sent(),i.Mh=i.Mh.remove(u),i.Oh.delete(e),ku(i),[3,4];case 2:return[4,wo(i.Gu,e,!1).then((function(){return xu(i,e,n)})).catch(Io)];case 3:r.sent(),r.label=4;case 4:return[2]}}
2))}))}function _u(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o;return r.__generator(this,(function(r){switch(r.label){case 0:n=w(t),i=e.batch.batchId,r.label=1;case 1:return r.trys.push([1,4,,6]),[4,vo(n.Gu,e)];case 2:return o=r.sent(),Tu(n,i,null),Iu(n,i),n.Ch.$i(i,"acknowledged"),[4,Du(n,o)];case 3:return r.sent(),[3,6];case 4:return[4,Io(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}))}))}function Eu(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o;return r.__generator(this,(function(r){switch(r.label){case 0:i=w(t),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,function(t,e){var n=w(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(t){var r;return n.vr.Mo(t,e).next((function(e){return b(null!==e),r=e.keys(),n.vr.Qo(t,e)})).next((function(){return n.vr.Go(t)})).next((function(){return n.xc.$r(t,r)}))}))}(i.Gu,e)];case 2:return o=r.sent(),Tu(i,e,n),Iu(i,e),i.Ch.$i(e,"rejected",n),[4,Du(i,o)];case 3:return r.sent(),[3,6];case 4:return[4,Io(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
2))}))}function Iu(t,e){(t.qh.get(e)||[]).forEach((function(t){t.resolve()})),t.qh.delete(e)}function Tu(t,e,n){var r=w(t),i=r.Bh[r.currentUser.Zs()];if(i){var o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.Bh[r.currentUser.Zs()]=i}}function xu(t,e,n){void 0===n&&(n=null),t.Ch.Li(e);for(var r=0,i=t.$h.get(e);r<i.length;r++){var o=i[r];t.xh.delete(o),n&&t.Fh.Kh(o,n)}t.$h.delete(e),t.Wh&&t.Lh.Wc(e).forEach((function(e){t.Lh.zo(e)||Su(t,e)}))}function Su(t,e){var n=t.Mh.get(e);null!==n&&(qo(t.Sh,n),t.Mh=t.Mh.remove(e),t.Oh.delete(n),ku(t))}function Au(t,e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof cu?(t.Lh.Fa(o.key,e),Nu(t,o)):o instanceof fu?(p("SyncEngine","Document no longer in limbo: "+o.key),t.Lh.$a(o.key,e),t.Lh.zo(o.key)||Su(t,o.key)):m()}}function Nu(t,e){var n=e.key;t.Mh.get(n)||(p("SyncEngine","New document in limbo: "+n),t.kh.push(n),ku(t))}function ku(t){for(;t.kh.length>0&&t.Mh.size<t.Nh;){var e=t.kh.shift(),n=t.Uh.next();t.Oh.set(n,new du(e)),t.Mh=t.Mh.rt(e,n),Vo(t.Sh,new bt(qn(Pn(e.path)),n,2,jr.oi))}}function Du(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a;return r.__generator(this,(function(s){switch(s.label){case 0:return i=w(t),o=[],u=[],a=[],i.xh.m()?[3,3]:(i.xh.forEach((function(t,r){a.push(i.jh(r,e,n).then((function(t){if(t){i.Wh&&i.Ch.Ui(r.targetId,t.fromCache?"not-current":"current"),o.push(t);var e=ei.Gr(r.targetId,t);u.push(e)}})))})),[4,Promise.all(a)]);case 1:return s.sent(),i.Fh.pu(o),[4,function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a,s,c,f,h;return r.__generator(this,(function(r){switch(r.label){case 0:n=w(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(t){return pr.forEach(e,(function(e){return pr.forEach(e.jr,(function(r){return n.persistence.Co.Fa(t,e.targetId,r)})).next((function(){return pr.forEach(e.Kr,(function(r){return n.persistence.Co.$a(t,e.targetId,r)}))}))}))}))];case 2:return r.sent(),[3,4];case 3:if(!mr(i=r.sent()))throw i;return p("LocalStore","Failed to update sequence numbers: "+i),[3,4];case 4:for(o=0,u=e;o<u.length;o++)a=u[o],s=a.targetId,a.fromCache||(c=n.Dc.get(s),f=c.et,h=c.it(f),n.Dc=n.Dc.rt(s,h));return[2]}}))}))}(i.Gu,u)];case 2:s.sent(),s.label=3;case 3:return[2]}}
2))}))}function Cu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(o){switch(o.label){case 0:return(n=w(t)).currentUser.isEqual(e)?[3,3]:(p("SyncEngine","User change. New user:",e.Zs()),[4,function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u;return r.__generator(this,(function(r){switch(r.label){case 0:return n=w(t),i=n.vr,o=n.xc,[4,n.persistence.runTransaction("Handle user change","readonly",(function(t){var r;return n.vr.qo(t).next((function(u){return r=u,i=n.persistence.Ic(e),o=new ti(n.Fc,i,n.persistence.Pc()),i.qo(t)})).next((function(e){for(var n=[],i=[],u=Lt(),a=0,s=r;a<s.length;a++){var c=s[a];n.push(c.batchId);for(var f=0,h=c.mutations;f<h.length;f++){var l=h[f];u=u.add(l.key)}}for(var d=0,p=e;d<p.length;d++){var v=p[d];i.push(v.batchId);for(var g=0,y=v.mutations;g<y.length;g++){var m=y[g];u=u.add(m.key)}}return o.$r(t,u).next((function(t){return{Gh:t,zh:n,Hh:i}}))}))}))];case 1:return u=r.sent(),[2,(n.vr=i,n.xc=o,n.Sc.$c(n.xc),u)]}}))}))}(n.Gu,e)]);case 1:return i=o.sent(),n.currentUser=e,function(t,e){t.qh.forEach((function(t){t.forEach((function(t){t.reject(new h(f.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),t.qh.clear()}(n),n.Ch.Wi(e,i.zh,i.Hh),[4,Du(n,i.Gh)];case 2:o.sent(),o.label=3;case 3:return[2]}}
2))}))}function Ou(t,e){var n=w(t),r=n.Oh.get(e);if(r&&r.bh)return Lt().add(r.key);var i=Lt(),o=n.$h.get(e);if(!o)return i;for(var u=0,a=o;u<a.length;u++){var s=a[u],c=n.xh.get(s);i=i.$t(c.view.mh)}return i}function Uu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,_o((n=w(t)).Gu,e.query,!0)];case 1:return i=r.sent(),o=e.view.Vh(i),[2,(n.Wh&&Au(n,e.targetId,o.gh),o)]}}))}))}function Pu(t,e,n,i){return r.__awaiter(this,void 0,void 0,(function(){var o,u;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,function(t,e){var n=w(t),r=w(n.vr);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(t){return r.Oo(t,e).next((function(e){return e?n.xc.$r(t,e):pr.resolve(null)}))}))}((o=w(t)).Gu,e)];case 1:return null===(u=r.sent())?[3,6]:"pending"!==n?[3,3]:[4,Zo(o.Sh)];case 2:return r.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(Tu(o,e,i||null),Iu(o,e),function(t,e){w(w(t).vr).jo(e)}(o.Gu,e)):m(),r.label=4;case 4:return[4,Du(o,u)];case 5:return r.sent(),[3,7];case 6:p("SyncEngine","Cannot apply mutation batch with id: "+e),r.label=7;case 7:return[2]}}
2))}))}function Lu(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a,s,c,f;return r.__generator(this,(function(r){switch(r.label){case 0:return qu(n=w(t)),Bu(n),!0!==e||!0===n.Qh?[3,3]:(i=n.Ch.Di(),[4,Ru(n,i.A())]);case 1:return o=r.sent(),n.Qh=!0,[4,uu(n.Sh,!0)];case 2:for(r.sent(),u=0,a=o;u<a.length;u++)s=a[u],Vo(n.Sh,s);return[3,7];case 3:return!1!==e||!1===n.Qh?[3,7]:(c=[],f=Promise.resolve(),n.$h.forEach((function(t,e){n.Ch.Bi(e)?c.push(e):f=f.then((function(){return xu(n,e),wo(n.Gu,e,!0)})),qo(n.Sh,e)})),[4,f]);case 4:return r.sent(),[4,Ru(n,c)];case 5:return r.sent(),function(t){var e=w(t);e.Oh.forEach((function(t,n){qo(e.Sh,n)})),e.Lh.jc(),e.Oh=new Map,e.Mh=new It(N.i)}(n),n.Qh=!1,[4,uu(n.Sh,!1)];case 6:r.sent(),r.label=7;case 7:return[2]}}))}))}function Ru(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a,s,c,f,h,l,d,p,v,g;return r.__generator(this,(function(r){switch(r.label){case 0:n=w(t),i=[],o=[],u=0,a=e,r.label=1;case 1:return u<a.length?(s=a[u],c=void 0,(f=n.$h.get(s))&&0!==f.length?[4,bo(n.Gu,qn(f[0]))]:[3,7]):[3,13];case 2:c=r.sent(),h=0,l=f,r.label=3;case 3:return h<l.length?(d=l[h],p=n.xh.get(d),[4,Uu(n,p)]):[3,6];case 4:(v=r.sent()).snapshot&&o.push(v.snapshot),r.label=5;case 5:return h++,[3,3];case 6:return[3,11];case 7:return[4,Eo(n.Gu,s)];case 8:return g=r.sent(),[4,bo(n.Gu,g)];case 9:return c=r.sent(),[4,gu(n,Mu(g),s,!1)];case 10:r.sent(),r.label=11;case 11:i.push(c),r.label=12;case 12:return u++,[3,1];case 13:return[2,(n.Fh.pu(o),i)]}}))}))}function Mu(t){return Un(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function ju(t){var e=w(t);return w(w(e.Gu).persistence).Vi()}function Fu(t,e,n,i){return r.__awaiter(this,void 0,void 0,(function(){var o,u,a;return r.__generator(this,(function(r){switch(r.label){case 0:return(o=w(t)).Qh?(p("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!o.$h.has(e))return[3,8];switch(n){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,function(t){var e=w(t),n=w(e.Fc);return e.persistence.runTransaction("Get new document changes","readonly",(function(t){return n.ia(t,e.Nc)})).then((function(t){var n=t.ra,r=t.readTime;return e.Nc=r,n}))}(o.Gu)];case 3:return u=r.sent(),a=qt.Jt(e,"current"===n),[4,Du(o,u,a)];case 4:return r.sent(),[3,8];case 5:return[4,wo(o.Gu,e,!0)];case 6:return r.sent(),xu(o,e,i),[3,8];case 7:m(),r.label=8;case 8:return[2]}}
2))}))}function Vu(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a,s,c,f,h,l,d;return r.__generator(this,(function(v){switch(v.label){case 0:if(!(i=qu(t)).Qh)return[3,10];o=0,u=e,v.label=1;case 1:return o<u.length?(a=u[o],i.$h.has(a)?(p("SyncEngine","Adding an already active target "+a),[3,5]):[4,Eo(i.Gu,a)]):[3,6];case 2:return s=v.sent(),[4,bo(i.Gu,s)];case 3:return c=v.sent(),[4,gu(i,Mu(s),c.targetId,!1)];case 4:v.sent(),Vo(i.Sh,c),v.label=5;case 5:return o++,[3,1];case 6:f=function(t){return r.__generator(this,(function(e){switch(e.label){case 0:return i.$h.has(t)?[4,wo(i.Gu,t,!1).then((function(){qo(i.Sh,t),xu(i,t)})).catch(Io)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))},h=0,l=n,v.label=7;case 7:return h<l.length?(d=l[h],[5,f(d)]):[3,10];case 8:v.sent(),v.label=9;case 9:return h++,[3,7];case 10:return[2]}}))}))}function qu(t){var e=w(t);return e.Sh.Hu.rh=mu.bind(null,e),e.Sh.Hu.Be=Ou.bind(null,e),e.Sh.Hu.ih=wu.bind(null,e),e.Fh.pu=Ur.bind(null,e.Dh),e.Fh.Kh=Pr.bind(null,e.Dh),e}function Bu(t){var e=w(t);return e.Sh.Hu.oh=_u.bind(null,e),e.Sh.Hu.ah=Eu.bind(null,e),e}var Gu=function(){function t(){}return t.prototype.$c=function(t){this.Yh=t},t.prototype.Or=function(t,e,n,r){var i=this;return function(t){return 0===t.filters.length&&null===t.limit&&null==t.startAt&&null==t.endAt&&(0===t.rn.length||1===t.rn.length&&t.rn[0].field.p())}(e)||n.isEqual(st.min())?this.Jh(t,e):this.Yh.$r(t,r).next((function(u){var a=i.Xh(e,u);return(Ln(e)||Rn(e))&&i.Ah(e.on,a,r,n)?i.Jh(t,e):(d()<=o.LogLevel.DEBUG&&p("IndexFreeQueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),Hn(e)),i.Yh.Or(t,e,n).next((function(t){return a.forEach((function(e){t=t.rt(e.key,e)})),t})))}))},t.prototype.Xh=function(t,e){var n=new St($n(t));return e.forEach((function(e,r){r instanceof kn&&Kn(t,r)&&(n=n.add(r))})),n},t.prototype.Ah=function(t,e,n,r){if(n.size!==e.size)return!0;var i="F"===t?e.last():e.first();return!!i&&(i.hasPendingWrites||i.version.L(r)>0)},t.prototype.Jh=function(t,e){return d()<=o.LogLevel.DEBUG&&p("IndexFreeQueryEngine","Using full collection scan to execute query:",Hn(e)),this.Yh.Or(t,e,st.min())},t}(),zu=function(){function t(t,e){this.Sr=t,this.Co=e,this.vr=[],this.Zh=1,this.tl=new St(xo.Oc)}return t.prototype.xo=function(t){return pr.resolve(0===this.vr.length)},t.prototype.$o=function(t,e,n,r){var i=this.Zh;this.Zh++,this.vr.length>0&&this.vr[this.vr.length-1];var o=new $r(i,e,n,r);this.vr.push(o);for(var u=0,a=r;u<a.length;u++){var s=a[u];this.tl=this.tl.add(new xo(s.key,i)),this.Sr.ko(t,s.key.path.h())}return pr.resolve(o)},t.prototype.Mo=function(t,e){return pr.resolve(this.el(e))},t.prototype.Lo=function(t,e){var n=e+1,r=this.nl(n),i=r<0?0:r;return pr.resolve(this.vr.length>i?this.vr[i]:null)},t.prototype.Bo=function(){return pr.resolve(0===this.vr.length?-1:this.Zh-1)},t.prototype.qo=function(t){return pr.resolve(this.vr.slice())},t.prototype.Cr=function(t,e){var n=this,r=new xo(e,0),i=new xo(e,Number.POSITIVE_INFINITY),o=[];return this.tl.Nt([r,i],(function(t){var e=n.el(t.Gc);o.push(e)})),pr.resolve(o)},t.prototype.Mr=function(t,e){var n=this,r=new St(Y);return e.forEach((function(t){var e=new xo(t,0),i=new xo(t,Number.POSITIVE_INFINITY);n.tl.Nt([e,i],(function(t){r=r.add(t.Gc)}))})),pr.resolve(this.sl(r))},t.prototype.Qr=function(t,e){var n=e.path,r=n.length+1,i=n;N.F(i)||(i=i.child(""));var o=new xo(new N(i),0),u=new St(Y);return this.tl.Ft((function(t){var e=t.key.path;return!!n.T(e)&&(e.length===r&&(u=u.add(t.Gc)),!0)}),o),pr.resolve(this.sl(u))},t.prototype.sl=function(t){var e=this,n=[];return t.forEach((function(t){var r=e.el(t);null!==r&&n.push(r)})),n},t.prototype.Qo=function(t,e){var n=this;b(0===this.il(e.batchId,"removed")),this.vr.shift();var r=this.tl;return pr.forEach(e.mutations,(function(i){var o=new xo(i.key,e.batchId);return r=r.delete(o),n.Co.Ko(t,i.key)})).next((function(){n.tl=r}))},t.prototype.jo=function(t){},t.prototype.zo=function(t,e){var n=new xo(e,0),r=this.tl.xt(n);return pr.resolve(e.isEqual(r&&r.key))},t.prototype.Go=function(t){return this.vr.length,pr.resolve()},t.prototype.il=function(t,e){return this.nl(t)},t.prototype.nl=function(t){return 0===this.vr.length?0:t-this.vr[0].batchId},t.prototype.el=function(t){var e=this.nl(t);return e<0||e>=this.vr.length?null:this.vr[e]},t}(),Wu=function(){function t(t,e){this.Sr=t,this.rl=e,this.docs=new It(N.i),this.size=0}return t.prototype.Tr=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,u=this.rl(e);return this.docs=this.docs.rt(r,{Zo:e,size:u,readTime:n}
2),this.size+=u-o,this.Sr.ko(t,r.path.h())},t.prototype.Ir=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype.Ar=function(t,e){var n=this.docs.get(e);return pr.resolve(n?n.Zo:null)},t.prototype.getEntries=function(t,e){var n=this,r=Dt();return e.forEach((function(t){var e=n.docs.get(t);r=r.rt(t,e?e.Zo:null)})),pr.resolve(r)},t.prototype.Or=function(t,e,n){for(var r=Ot(),i=new N(e.path.child("")),o=this.docs._t(i);o.It();){var u=o.Et(),a=u.key,s=u.value,c=s.Zo,f=s.readTime;if(!e.path.T(a.path))break;f.L(n)<=0||c instanceof kn&&Kn(e,c)&&(r=r.rt(c.key,c))}return pr.resolve(r)},t.prototype.ol=function(t,e){return pr.forEach(this.docs,(function(t){return e(t)}))},t.prototype.aa=function(e){return new t.ca(this)},t.prototype.ha=function(t){return pr.resolve(this.size)},t}();Wu.ca=function(t){function e(e){var n=this;return(n=t.call(this)||this).la=e,n}return r.__extends(e,t),e.prototype.gr=function(t){var e=this,n=[];return this.dr.forEach((function(r,i){i?n.push(e.la.Tr(t,i,e.readTime)):e.la.Ir(r)})),pr.xn(n)},e.prototype.Rr=function(t,e){return this.la.Ar(t,e)},e.prototype.Pr=function(t,e){return this.la.getEntries(t,e)},e}(Xr);var Qu=function(){function t(t){this.persistence=t,this.al=new ut((function(t){return pt(t)}),vt),this.lastRemoteSnapshotVersion=st.min(),this.highestTargetId=0,this.cl=0,this.ul=new To,this.targetCount=0,this.hl=to.ma()}return t.prototype.De=function(t,e){return this.al.forEach((function(t,n){return e(n)})),pr.resolve()},t.prototype.Ra=function(t){return pr.resolve(this.lastRemoteSnapshotVersion)},t.prototype.Pa=function(t){return pr.resolve(this.cl)},t.prototype.Ea=function(t){return this.highestTargetId=this.hl.next(),pr.resolve(this.highestTargetId)},t.prototype.ga=function(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.cl&&(this.cl=e),pr.resolve()},t.prototype.Va=function(t){this.al.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.hl=new to(e),this.highestTargetId=e),t.sequenceNumber>this.cl&&(this.cl=t.sequenceNumber)},t.prototype.ya=function(t,e){return this.Va(e),this.targetCount+=1,pr.resolve()},t.prototype.ba=function(t,e){return this.Va(e),pr.resolve()},t.prototype.va=function(t,e){return this.al.delete(e.target),this.ul.Wc(e.targetId),this.targetCount-=1,pr.resolve()},t.prototype.Vo=function(t,e,n){var r=this,i=0,o=[];return this.al.forEach((function(u,a){a.sequenceNumber<=e&&null===n.get(a.targetId)&&(r.al.delete(u),o.push(r.Sa(t,a.targetId)),i++)})),pr.xn(o).next((function(){return i}))},t.prototype.Da=function(t){return pr.resolve(this.targetCount)},t.prototype.Ca=function(t,e){var n=this.al.get(e)||null;return pr.resolve(n)},t.prototype.Na=function(t,e,n){return this.ul.qc(e,n),pr.resolve()},t.prototype.xa=function(t,e,n){this.ul.Qc(e,n);var r=this.persistence.Co,i=[];return r&&e.forEach((function(e){i.push(r.Ko(t,e))})),pr.xn(i)},t.prototype.Sa=function(t,e){return this.ul.Wc(e),pr.resolve()},t.prototype.ka=function(t,e){var n=this.ul.Kc(e);return pr.resolve(n)},t.prototype.zo=function(t,e){return pr.resolve(this.ul.zo(e))},t}(),Hu=function(){function t(t){var e=this;this.ll={},this.Ba=new jr(0),this.qa=!1,this.qa=!0,this.Co=t(this),this.Ha=new Qu(this),this.Sr=new Ui,this.br=new Wu(this.Sr,(function(t){return e.Co._l(t)}))}return t.prototype.start=function(){return Promise.resolve()},t.prototype.Si=function(){return this.qa=!1,Promise.resolve()},Object.defineProperty(t.prototype,"Ti",{get:function(){return this.qa},enumerable:!1,configurable:!0}),t.prototype.nc=function(){},t.prototype.sc=function(){},t.prototype.Pc=function(){return this.Sr},t.prototype.Ic=function(t){var e=this.ll[t.Zs()];return e||(e=new zu(this.Sr,this.Co),this.ll[t.Zs()]=e),e},t.prototype.Ac=function(){return this.Ha},t.prototype.Rc=function(){return this.br},t.prototype.runTransaction=function(t,e,n){var r=this;p("MemoryPersistence","Starting transaction:",t);var i=new Ku(this.Ba.next());return this.Co.fl(),n(i).next((function(t){return r.Co.dl(i).next((function(){return t}))})).Nn().then((function(t){return i.pr(),t}))},t.prototype.wl=function(t,e){return pr.$n(Object.values(this.ll).map((function(n){return function(){return n.zo(t,e)}})))},t}(),Ku=function(t){function e(e){var n=this;return(n=t.call(this)||this).Ma=e,n}return r.__extends(e,t),e}(Zr),$u=function(){function t(t){this.persistence=t,this.ml=new To,this.Tl=null}return t.El=function(e){return new t(e)},Object.defineProperty(t.prototype,"Il",{get:function(){if(this.Tl)return this.Tl;throw m()}
2,enumerable:!1,configurable:!0}),t.prototype.Fa=function(t,e,n){return this.ml.Fa(n,e),this.Il.delete(n.toString()),pr.resolve()},t.prototype.$a=function(t,e,n){return this.ml.$a(n,e),this.Il.add(n.toString()),pr.resolve()},t.prototype.Ko=function(t,e){return this.Il.add(e.toString()),pr.resolve()},t.prototype.removeTarget=function(t,e){var n=this;this.ml.Wc(e.targetId).forEach((function(t){return n.Il.add(t.toString())}));var r=this.persistence.Ac();return r.ka(t,e.targetId).next((function(t){t.forEach((function(t){return n.Il.add(t.toString())}))})).next((function(){return r.va(t,e)}))},t.prototype.fl=function(){this.Tl=new Set},t.prototype.dl=function(t){var e=this,n=this.persistence.Rc().aa();return pr.forEach(this.Il,(function(r){var i=N.D(r);return e.Al(t,i).next((function(t){t||n.Ir(i)}))})).next((function(){return e.Tl=null,n.apply(t)}))},t.prototype.vc=function(t,e){var n=this;return this.Al(t,e).next((function(t){t?n.Il.delete(e.toString()):n.Il.add(e.toString())}))},t.prototype._l=function(t){return 0},t.prototype.Al=function(t,e){var n=this;return pr.$n([function(){return pr.resolve(n.ml.zo(e))},function(){return n.persistence.Ac().zo(t,e)},function(){return n.persistence.wl(t,e)}])},t}(),Yu=function(){function t(t){this.Rl=t.Rl,this.Pl=t.Pl}return t.prototype.yu=function(t){this.gl=t},t.prototype.Iu=function(t){this.yl=t},t.prototype.onMessage=function(t){this.Vl=t},t.prototype.close=function(){this.Pl()},t.prototype.send=function(t){this.Rl(t)},t.prototype.pl=function(){this.gl()},t.prototype.bl=function(t){this.yl(t)},t.prototype.vl=function(t){this.Vl(t)},t}(),Xu={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Ju=function(t){function e(e){var n=this;return(n=t.call(this,e)||this).forceLongPolling=e.forceLongPolling,n}return r.__extends(e,t),e.prototype.xl=function(t,e,n,r){return new Promise((function(i,o){var u=new a.XhrIo;u.listenOnce(a.EventType.COMPLETE,(function(){try{switch(u.getLastErrorCode()){case a.ErrorCode.NO_ERROR:var e=u.getResponseJson();p("Connection","XHR received:",JSON.stringify(e)),i(e);break;case a.ErrorCode.TIMEOUT:p("Connection",'RPC "'+t+'" timed out'),o(new h(f.DEADLINE_EXCEEDED,"Request time out"));break;case a.ErrorCode.HTTP_ERROR:var n=u.getStatus();if(p("Connection",'RPC "'+t+'" failed with status:',n,"response text:",u.getResponseText()),n>0){var r=u.getResponseJson().error;if(r&&r.status&&r.message){var s=function(t){var e=t.toLowerCase().replace("_","-");return Object.values(f).indexOf(e)>=0?e:f.UNKNOWN}(r.status);o(new h(s,r.message))}else o(new h(f.UNKNOWN,"Server responded with status "+u.getStatus()))}else o(new h(f.UNAVAILABLE,"Connection failed."));break;default:m()}}finally{p("Connection",'RPC "'+t+'" completed.')}}));var s=JSON.stringify(r);u.send(e,"POST",s,n,15)}))},e.prototype.Vu=function(t,e){var n=[this.Dl,"/","google.firestore.v1.Firestore","/",t,"/channel"],r=a.createWebChannelTransport(),i={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.U.projectId+"/databases/"+this.U.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling};this.Fl(i.initMessageHeaders,e),u.isMobileCordova()||u.isReactNative()||u.isElectron()||u.isIE()||u.isUWP()||u.isBrowserExtension()||(i.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");p("Connection","Creating WebChannel: "+o,i);var s=r.createWebChannel(o,i),c=!1,l=!1,d=new Yu({Rl:function(t){l?p("Connection","Not sending because WebChannel is closed:",t):(c||(p("Connection","Opening WebChannel transport."),s.open(),c=!0),p("Connection","WebChannel sending:",t),s.send(t))},Pl:function(){return s.close()}}),v=function(t,e){s.listen(t,(function(t){try{e(t)}catch(t){setTimeout((function(){throw t}),0)}}))};return v(a.WebChannel.EventType.OPEN,(function(){l||p("Connection","WebChannel transport opened.")})),v(a.WebChannel.EventType.CLOSE,(function(){l||(l=!0,p("Connection","WebChannel transport closed"),d.bl())})),v(a.WebChannel.EventType.ERROR,(function(t){l||(l=!0,g("Connection","WebChannel transport errored:",t),d.bl(new h(f.UNAVAILABLE,"The operation could not be completed")))})),v(a.WebChannel.EventType.MESSAGE,(function(t){var e;if(!l){var n=t.data[0];b(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){p("Connection","WebChannel received error:",i);var o=i.status,u=function(t){var e=yt[t];if(void 0!==e)return Et(e)}(o),a=i.message;void 0===u&&(u=f.INTERNAL,a="Unknown error status: "+o+" with message "+i.message),l=!0,d.bl(new h(u,a)),s.close()}else p("Connection","WebChannel received:",n),d.vl(n)}})),setTimeout((function(){d.pl()}),0),d},e}(function(){function t(t){this.Sl=t,this.U=t.U;var e=t.ssl?"https":"http";this.Dl=e+"://"+t.host,this.Cl="projects/"+this.U.projectId+"/databases/"+this.U.database+"/documents"}return t.prototype.Mu=function(t,e,n,r){var i=this.Nl(t,e);p("RestConnection","Sending: ",i,n);var o={};return this.Fl(o,r),this.xl(t,i,o,n).then((function(t){return p("RestConnection","Received: ",t),t}),(function(e){throw g("RestConnection",t+" failed with error: ",e,"url: ",i,"request:",n),e}))},t.prototype.Ou=function(t,e,n,r){return this.Mu(t,e,n,r)},t.prototype.Fl=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/7.21.1",t["Content-Type"]="text/plain",e)for(var n in e.zc)e.zc.hasOwnProperty(n)&&(t[n]=e.zc[n])},t.prototype.Nl=function(t,e){var n=Xu[t];return this.Dl+"/v1/"+e+":"+n},t}()),Zu=function(){function t(){var t=this;this.$l=function(){return t.kl()},this.Ml=function(){return t.Ol()},this.Ll=[],this.Bl()}
2return t.prototype.eh=function(t){this.Ll.push(t)},t.prototype.Si=function(){window.removeEventListener("online",this.$l),window.removeEventListener("offline",this.Ml)},t.prototype.Bl=function(){window.addEventListener("online",this.$l),window.addEventListener("offline",this.Ml)},t.prototype.kl=function(){p("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this.Ll;t<e.length;t++)(0,e[t])(0)},t.prototype.Ol=function(){p("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this.Ll;t<e.length;t++)(0,e[t])(1)},t.On=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},t}(),ta=function(){function t(){}return t.prototype.eh=function(t){},t.prototype.Si=function(){},t}();function ea(t){return new ge(t,!0)}var na="You are using the memory-only build of Firestore. Persistence support is only available via the @firebase/firestore bundle or the firebase-firestore.js build.",ra=function(){function t(){}return t.prototype.initialize=function(t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return this.Ch=this.ql(t),this.persistence=this.Ul(t),[4,this.persistence.start()];case 1:return e.sent(),this.Ql=this.Wl(t),this.Gu=this.jl(t),[2]}}))}))},t.prototype.Wl=function(t){return null},t.prototype.jl=function(t){return e=this.persistence,n=new Gu,r=t.Kl,new po(e,n,r);var e,n,r},t.prototype.Ul=function(t){if(t.persistenceSettings.Gl)throw new h(f.FAILED_PRECONDITION,na);return new Hu($u.El)},t.prototype.ql=function(t){return new Kr},t.prototype.terminate=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this.Ql&&this.Ql.stop(),[4,this.Ch.Si()];case 1:return t.sent(),[4,this.persistence.Si()];case 2:return t.sent(),[2]}}))}))},t.prototype.clearPersistence=function(t,e){throw new h(f.FAILED_PRECONDITION,na)},t}(),ia=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.initialize=function(e){return r.__awaiter(this,void 0,void 0,(function(){var n,i=this;return r.__generator(this,(function(o){switch(o.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return o.sent(),n=this.zl._i,this.Ch instanceof Hr?(this.Ch._i={tr:Pu.bind(null,n),er:Fu.bind(null,n),nr:Vu.bind(null,n),Vi:ju.bind(null,n)},[4,this.Ch.start()]):[3,3];case 2:o.sent(),o.label=3;case 3:return[4,this.persistence.ec((function(t){return r.__awaiter(i,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return[4,Lu(this.zl._i,t)];case 1:return e.sent(),this.Ql&&(t&&!this.Ql.Ti?this.Ql.start(this.Gu):t||this.Ql.stop()),[2]}}))}))}))];case 4:return o.sent(),[2]}}))}))},e.prototype.ql=function(t){if(t.persistenceSettings.Gl&&t.persistenceSettings.synchronizeTabs){var e=Tr();if(!Hr.On(e))throw new h(f.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=lo(t.Sl.U,t.Sl.persistenceKey);return new Hr(e,t.os,n,t.clientId,t.Kl)}return new Kr},e}(function(t){function e(e){var n=this;return(n=t.call(this)||this).zl=e,n}return r.__extends(e,t),e.prototype.initialize=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return n.sent(),[4,function(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){return e=w(t),n=w(e.Fc),[2,e.persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return n.oa(t)})).then((function(t){e.Nc=t}))]}))}))}(this.Gu)];case 2:return n.sent(),[4,this.zl.initialize(this,e)];case 3:return n.sent(),[4,Bu(this.zl._i)];case 4:return n.sent(),[4,Zo(this.zl.Sh)];case 5:return n.sent(),[2]}}))}))},e.prototype.Wl=function(t){var e=this.persistence.Co.do;return new ui(e,t.os)},e.prototype.Ul=function(t){var e=lo(t.Sl.U,t.Sl.persistenceKey),n=ea(t.Sl.U);return new ao(t.persistenceSettings.synchronizeTabs,e,t.clientId,oi.oo(t.persistenceSettings.cacheSizeBytes),t.os,Tr(),xr(),n,this.Ch,t.persistenceSettings.La)},e.prototype.ql=function(t){return new Kr},e.prototype.clearPersistence=function(t,e){return function(t){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){switch(n.label){case 0:return vr.On()?(e=t+"main",[4,vr.delete(e)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(lo(t,e))},e}(ra)),oa=function(){function t(){}return t.prototype.initialize=function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n=this;return r.__generator(this,(function(r){switch(r.label){case 0:return this.Gu?[3,2]:(this.Gu=t.Gu,this.Ch=t.Ch,this.zu=this.Hl(e),this.Sh=this.Yl(e),this.Dh=this.Jl(e),this._i=this.Xl(e),this.Ch.fi=function(t){return bu(n._i,t,1)}
2,this.Sh.Hu.Zl=Cu.bind(null,this._i),[4,uu(this.Sh,this._i.Wh)]);case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},t.prototype.Jl=function(t){return new Dr},t.prototype.Hl=function(t){var e,n=ea(t.Sl.U),r=(e=t.Sl,new Ju(e));return function(t,e,n){return new Po(t,e,n)}(t.credentials,r,n)},t.prototype.Yl=function(t){var e,n,r,i,o,u=this;return e=this.Gu,n=this.zu,r=t.os,i=function(t){return bu(u._i,t,0)},o=Zu.On()?new Zu:new ta,new Ro(e,n,r,i,o)},t.prototype.Xl=function(t){return function(t,e,n,r,i,o,u){var a=new pu(t,e,n,r,i,o);return u&&(a.Qh=!0),a}(this.Gu,this.Sh,this.Dh,this.Ch,t.Kl,t.Nh,!t.persistenceSettings.Gl||!t.persistenceSettings.synchronizeTabs)},t.prototype.terminate=function(){return Fo(this.Sh)},t}(),ua=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.observer.next&&this.t_(this.observer.next,t)},t.prototype.error=function(t){this.observer.error?this.t_(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},t.prototype.e_=function(){this.muted=!0},t.prototype.t_=function(t,e){var n=this;this.muted||setTimeout((function(){n.muted||t(e)}),0)},t}(),aa=function(t){!function(t,e,n,r){if(!(e instanceof Array)||e.length<1)throw new h(f.INVALID_ARGUMENT,"Function FieldPath() requires its fieldNames argument to be an array with at least "+H(1,"element")+".")}(0,t);for(var e=0;e<t.length;++e)if(U("FieldPath","string",e,t[e]),0===t[e].length)throw new h(f.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.n_=new A(t)},sa=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.call(this,e)||this}return r.__extends(e,t),e.documentId=function(){return new e(A.v().R())},e.prototype.isEqual=function(t){if(!(t instanceof e))throw z("isEqual","FieldPath",1,t);return this.n_.isEqual(t.n_)},e}(aa),ca=new RegExp("[~\\*/\\[\\]]"),fa=function(){this.s_=this},ha=function(t){function e(e){var n=this;return(n=t.call(this)||this).i_=e,n}return r.__extends(e,t),e.prototype.r_=function(t){if(2!==t.o_)throw 1===t.o_?t.a_(this.i_+"() can only appear at the top level of your update data"):t.a_(this.i_+"() cannot be used with set() unless you pass {merge:true}");return t.Qe.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(fa);function la(t,e,n){return new xa({o_:3,c_:e.settings.c_,methodName:t.i_,u_:n},e.U,e.serializer,e.ignoreUndefinedProperties)}var da=function(t){function e(e){var n=this;return(n=t.call(this)||this).i_=e,n}return r.__extends(e,t),e.prototype.r_=function(t){return new an(t.path,new Xe)},e.prototype.isEqual=function(t){return t instanceof e},e}(fa),pa=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).i_=e,r.h_=n,r}return r.__extends(e,t),e.prototype.r_=function(t){var e=la(this,t,!0),n=this.h_.map((function(t){return Ca(t,e)})),r=new Je(n);return new an(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(fa),va=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).i_=e,r.h_=n,r}return r.__extends(e,t),e.prototype.r_=function(t){var e=la(this,t,!0),n=this.h_.map((function(t){return Ca(t,e)})),r=new tn(n);return new an(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(fa),ga=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).i_=e,r.l_=n,r}return r.__extends(e,t),e.prototype.r_=function(t){var e=new nn(t.serializer,be(t.serializer,this.l_));return new an(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(fa),ya=function(t){function e(){return t.call(this)||this}return r.__extends(e,t),e.delete=function(){return k("FieldValue.delete",arguments),new ma(new ha("FieldValue.delete"))},e.serverTimestamp=function(){return k("FieldValue.serverTimestamp",arguments),new ma(new da("FieldValue.serverTimestamp"))},e.arrayUnion=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return C("FieldValue.arrayUnion",arguments,1),new ma(new pa("FieldValue.arrayUnion",t))},e.arrayRemove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];
2return C("FieldValue.arrayRemove",arguments,1),new ma(new va("FieldValue.arrayRemove",t))},e.increment=function(t){return U("FieldValue.increment","number",1,t),D("FieldValue.increment",arguments,1),new ma(new ga("FieldValue.increment",t))},e}(fa),ma=function(t){function e(e){var n=this;return(n=t.call(this)||this).s_=e,n.i_=e.i_,n}return r.__extends(e,t),e.prototype.r_=function(t){return this.s_.r_(t)},e.prototype.isEqual=function(t){return t instanceof e&&this.s_.isEqual(t.s_)},e}(ya),ba=function(){function t(t,e){if(D("GeoPoint",arguments,2),U("GeoPoint","number",1,t),U("GeoPoint","number",2,e),!isFinite(t)||t<-90||t>90)throw new h(f.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new h(f.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.__=t,this.f_=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.__},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.f_},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.__===t.__&&this.f_===t.f_},t.prototype.toJSON=function(){return{latitude:this.__,longitude:this.f_}},t.prototype.H=function(t){return Y(this.__,t.__)||Y(this.f_,t.f_)},t}(),wa=/^__.*__$/,_a=function(t,e,n){this.d_=t,this.w_=e,this.m_=n},Ea=function(){function t(t,e,n){this.data=t,this.Qe=e,this.fieldTransforms=n}return t.prototype.T_=function(t,e){var n=[];return null!==this.Qe?n.push(new mn(t,this.data,this.Qe,e)):n.push(new yn(t,this.data,e)),this.fieldTransforms.length>0&&n.push(new wn(t,this.fieldTransforms)),n},t}(),Ia=function(){function t(t,e,n){this.data=t,this.Qe=e,this.fieldTransforms=n}return t.prototype.T_=function(t,e){var n=[new mn(t,this.data,this.Qe,e)];return this.fieldTransforms.length>0&&n.push(new wn(t,this.fieldTransforms)),n},t}();function Ta(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw m()}}var xa=function(){function t(t,e,n,r,i,o){this.settings=t,this.U=e,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&&this.E_(),this.fieldTransforms=i||[],this.Qe=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"o_",{get:function(){return this.settings.o_},enumerable:!1,configurable:!0}),t.prototype.I_=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.U,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.Qe)},t.prototype.A_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.I_({path:n,u_:!1});return r.R_(t),r},t.prototype.P_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.I_({path:n,u_:!1});return r.E_(),r},t.prototype.g_=function(t){return this.I_({path:void 0,u_:!0})},t.prototype.a_=function(t){return Ma(t,this.settings.methodName,this.settings.y_||!1,this.path,this.settings.c_)},t.prototype.contains=function(t){return void 0!==this.Qe.find((function(e){return t.T(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.T(e.field)}))},t.prototype.E_=function(){if(this.path)for(var t=0;t<this.path.length;t++)this.R_(this.path.get(t))},t.prototype.R_=function(t){if(0===t.length)throw this.a_("Document fields must not be empty");if(Ta(this.o_)&&wa.test(t))throw this.a_('Document fields cannot begin and end with "__"')},t}(),Sa=function(){function t(t,e,n){this.U=t,this.ignoreUndefinedProperties=e,this.serializer=n||ea(t)}return t.prototype.V_=function(t,e,n,r){return void 0===r&&(r=!1),new xa({o_:t,methodName:e,c_:n,path:A.g(),u_:!1,y_:r},this.U,this.serializer,this.ignoreUndefinedProperties)},t}();function Aa(t,e,n,r,i,o){void 0===o&&(o={});var u=t.V_(o.merge||o.mergeFields?2:0,e,n,i);Pa("Data must be an object, but it was:",u,r);var a,s,c=Oa(r,u);if(o.merge)a=new un(u.Qe),s=u.fieldTransforms;else if(o.mergeFields){for(var l=[],d=0,p=o.mergeFields;d<p.length;d++){var v=p[d],g=void 0;if(v instanceof aa)g=v.n_;else{if("string"!=typeof v)throw m();g=Ra(e,v,n)}if(!u.contains(g))throw new h(f.INVALID_ARGUMENT,"Field '"+g+"' is specified in your field mask but missing from your input data.");ja(l,g)||l.push(g)}a=new un(l),s=u.fieldTransforms.filter((function(t){return a.He(t.field)}))}else a=null,s=u.fieldTransforms;return new Ea(new xn(c),a,s)}function Na(t,e,n,r){var i=t.V_(1,e,n);Pa("Data must be an object, but it was:",i,r);var o=[],u=new Sn;E(r,(function(t,r){var a=Ra(e,t,n),s=i.P_(a);if(r instanceof fa&&r.s_ instanceof ha)o.push(a);else{var c=Ca(r,s);null!=c&&(o.push(a),u.set(a,c))}}));var a=new un(o);return new Ia(u.Je(),a,i.fieldTransforms)}function ka(t,e,n,r,i,o){var u=t.V_(1,e,n),a=[La(e,r,n)],s=[i];if(o.length%2!=0)throw new h(f.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c<o.length;c+=2)a.push(La(e,o[c])),s.push(o[c+1]);for(var l=[],d=new Sn,p=a.length-1;p>=0;--p)if(!ja(l,a[p])){var v=a[p],g=s[p],y=u.P_(v);
2if(g instanceof fa&&g.s_ instanceof ha)l.push(v);else{var m=Ca(g,y);null!=m&&(l.push(v),d.set(v,m))}}var b=new un(l);return new Ia(d.Je(),b,u.fieldTransforms)}function Da(t,e,n,r){return void 0===r&&(r=!1),Ca(n,t.V_(r?4:3,e))}function Ca(t,e){if(Ua(t))return Pa("Unsupported field value:",e,t),Oa(t,e);if(t instanceof fa)return function(t,e){if(!Ta(e.o_))throw e.a_(t.i_+"() can only be used with update() and set()");if(!e.path)throw e.a_(t.i_+"() is not currently supported inside arrays");var n=t.r_(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(e.path&&e.Qe.push(e.path),t instanceof Array){if(e.settings.u_&&4!==e.o_)throw e.a_("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var u=Ca(o[i],e.g_(r));null==u&&(u={nullValue:"NULL_VALUE"}),n.push(u),r++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return be(e.serializer,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var n=at.fromDate(t);return{timestampValue:we(e.serializer,n)}}if(t instanceof at){var r=new at(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:we(e.serializer,r)}}if(t instanceof ba)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof tt)return{bytesValue:_e(e.serializer,t.q)};if(t instanceof _a){var i=e.U,o=t.d_;if(!o.isEqual(i))throw e.a_("Document reference is for database "+o.projectId+"/"+o.database+" but should be for database "+i.projectId+"/"+i.database);return{referenceValue:Te(t.d_||e.U,t.w_.path)}}if(void 0===t&&e.ignoreUndefinedProperties)return null;throw e.a_("Unsupported field value: "+q(t))}(t,e)}function Oa(t,e){var n={};return I(t)?e.path&&e.path.length>0&&e.Qe.push(e.path):E(t,(function(t,r){var i=Ca(r,e.A_(t));null!=i&&(n[t]=i)})),{mapValue:{fields:n}}}function Ua(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof at||t instanceof ba||t instanceof tt||t instanceof _a||t instanceof fa)}function Pa(t,e,n){if(!Ua(n)||!V(n)){var r=q(n);throw"an object"===r?e.a_(t+" a custom object"):e.a_(t+" "+r)}}function La(t,e,n){if(e instanceof aa)return e.n_;if("string"==typeof e)return Ra(t,e);throw Ma("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}function Ra(t,e,n){try{return function(t){if(t.search(ca)>=0)throw new h(f.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(sa.bind.apply(sa,r.__spreadArrays([void 0],t.split("."))))}catch(r){throw new h(f.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(e).n_}catch(e){throw Ma((i=e)instanceof Error?i.message:i.toString(),t,!1,void 0,n)}var i}function Ma(t,e,n,r,i){var o=r&&!r.m(),u=void 0!==i,a="Function "+e+"() called with invalid data";n&&(a+=" (via `toFirestore()`)");var s="";return(o||u)&&(s+=" (found",o&&(s+=" in field "+r),u&&(s+=" in document "+i),s+=")"),new h(f.INVALID_ARGUMENT,(a+=". ")+t+s)}function ja(t,e){return t.some((function(t){return t.isEqual(e)}))}var Fa=function(){function t(t){this.zu=t,this.p_=new Map,this.mutations=[],this.b_=!1,this.v_=null,this.S_=new Set}return t.prototype.D_=function(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:if(this.C_(),this.mutations.length>0)throw new h(f.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a,s;return r.__generator(this,(function(r){switch(r.label){case 0:return n=w(t),i=De(n.serializer)+"/documents",o={documents:e.map((function(t){return Se(n.serializer,t)}))},[4,n.Ou("BatchGetDocuments",i,o)];case 1:return u=r.sent(),a=new Map,u.forEach((function(t){var e=function(t,e){return"found"in e?function(t,e){b(!!e.found),e.found.name,e.found.updateTime;var n=Ae(t,e.found.name),r=Ie(e.found.updateTime),i=new xn({mapValue:{fields:e.found.fields}});return new kn(n,r,i,{})}(t,e):"missing"in e?function(t,e){b(!!e.missing),b(!!e.readTime);var n=Ae(t,e.missing),r=Ie(e.readTime);return new Dn(n,r)}(t,e):m()}(n.serializer,t);a.set(e.key.toString(),e)})),s=[],[2,(e.forEach((function(t){var e=a.get(t.toString());b(!!e),s.push(e)})),s)]}}))}))}(this.zu,t)];
2case 1:return[2,((e=i.sent()).forEach((function(t){t instanceof Dn||t instanceof kn?n.N_(t):m()})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.T_(t,this.Ke(t))),this.S_.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.T_(t,this.F_(t)))}catch(t){this.v_=t}this.S_.add(t.toString())},t.prototype.delete=function(t){this.write([new In(t,this.Ke(t))]),this.S_.add(t.toString())},t.prototype.commit=function(){return r.__awaiter(this,void 0,void 0,(function(){var t,e=this;return r.__generator(this,(function(n){switch(n.label){case 0:if(this.C_(),this.v_)throw this.v_;return t=this.p_,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,n){var r=N.D(n);e.mutations.push(new Tn(r,e.Ke(r)))})),[4,function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o;return r.__generator(this,(function(r){switch(r.label){case 0:return n=w(t),i=De(n.serializer)+"/documents",o={writes:e.map((function(t){return Ue(n.serializer,t)}))},[4,n.Mu("Commit",i,o)];case 1:return r.sent(),[2]}}))}))}(this.zu,this.mutations)];case 1:return n.sent(),this.b_=!0,[2]}}))}))},t.prototype.N_=function(t){var e;if(t instanceof kn)e=t.version;else{if(!(t instanceof Dn))throw m();e=st.min()}var n=this.p_.get(t.key.toString());if(n){if(!e.isEqual(n))throw new h(f.ABORTED,"Document version changed between two reads.")}else this.p_.set(t.key.toString(),e)},t.prototype.Ke=function(t){var e=this.p_.get(t.toString());return!this.S_.has(t.toString())&&e?cn.updateTime(e):cn.Ge()},t.prototype.F_=function(t){var e=this.p_.get(t.toString());if(!this.S_.has(t.toString())&&e){if(e.isEqual(st.min()))throw new h(f.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return cn.updateTime(e)}return cn.exists(!0)},t.prototype.write=function(t){this.C_(),this.mutations=this.mutations.concat(t)},t.prototype.C_=function(){},t}(),Va=function(){function t(t,e,n,r){this.os=t,this.zu=e,this.updateFunction=n,this.hs=r,this.x_=5,this.gs=new dr(this.os,"transaction_retry")}return t.prototype.run=function(){this.k_()},t.prototype.k_=function(){var t=this;this.gs.Rn((function(){return r.__awaiter(t,void 0,void 0,(function(){var t,e,n=this;return r.__generator(this,(function(r){return t=new Fa(this.zu),(e=this.M_(t))&&e.then((function(e){n.os.ds((function(){return t.commit().then((function(){n.hs.resolve(e)})).catch((function(t){n.O_(t)}))}))})).catch((function(t){n.O_(t)})),[2]}))}))}))},t.prototype.M_=function(t){try{var e=this.updateFunction(t);return!ct(e)&&e.catch&&e.then?e:(this.hs.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.hs.reject(t),null}},t.prototype.O_=function(t){var e=this;this.x_>0&&this.L_(t)?(this.x_-=1,this.os.ds((function(){return e.k_(),Promise.resolve()}))):this.hs.reject(t)},t.prototype.L_=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!_t(e)}return!1},t}(),qa=function(){function t(t,e){this.credentials=t,this.os=e,this.clientId=$.k(),this.B_=new lr}return t.prototype.start=function(t,e,n,i){var o=this;this.q_(),this.Sl=t;var u=new lr,a=!1;return this.credentials.Jc((function(t){if(!a)return a=!0,p("FirestoreClient","Initializing. user=",t.uid),o.U_(e,n,i,t,u).then(o.B_.resolve,o.B_.reject);o.os.Ds((function(){return function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i;return r.__generator(this,(function(r){switch(r.label){case 0:return(n=w(t)).os.Fs(),p("RemoteStore","RemoteStore received new credentials"),i=Qo(n),n.Xu.add(3),[4,jo(n)];case 1:return r.sent(),i&&n.nh.set("Unknown"),[4,n.Hu.Zl(e)];case 2:return r.sent(),n.Xu.delete(3),[4,Mo(n)];case 3:return r.sent(),[2]}}))}))}(o.Sh,t)}))})),this.os.ds((function(){return o.B_.promise})),u.promise},t.prototype.enableNetwork=function(){var t=this;return this.q_(),this.os.enqueue((function(){return t.persistence.sc(!0),function(t){var e=w(t);return e.Xu.delete(0),Mo(e)}(t.Sh)}))},t.prototype.U_=function(t,e,n,i,o){return r.__awaiter(this,void 0,void 0,(function(){var u,a,s=this;return r.__generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),u={os:this.os,Sl:this.Sl,clientId:this.clientId,credentials:this.credentials,Kl:i,Nh:100,persistenceSettings:n},[4,t.initialize(u)];case 1:return c.sent(),[4,e.initialize(t,u)];case 2:return c.sent(),this.persistence=t.persistence,this.Ch=t.Ch,this.Gu=t.Gu,this.Ql=t.Ql,this.zu=e.zu,this.Sh=e.Sh,this._i=e._i,this.Q_=e.Dh,this.Q_.qs=vu.bind(null,this._i),this.Q_.Ws=yu.bind(null,this._i),this.persistence.nc((function(){return r.__awaiter(s,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return[4,this.terminate()];case 1:return t.sent(),[2]}}))}))})),o.resolve(),[3,4];case 3:if(a=c.sent(),o.reject(a),!this.W_(a))throw a;return[2,(console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+a),this.U_(new ra,new oa,{Gl:!1},i,o))];case 4:return[2]}}
2))}))},t.prototype.W_=function(t){return"FirebaseError"===t.name?t.code===f.FAILED_PRECONDITION||t.code===f.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code},t.prototype.q_=function(){if(this.os.Vs)throw new h(f.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.disableNetwork=function(){var t=this;return this.q_(),this.os.enqueue((function(){return t.persistence.sc(!1),function(t){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){switch(n.label){case 0:return(e=w(t)).Xu.add(0),[4,jo(e)];case 1:return n.sent(),e.nh.set("Offline"),[2]}}))}))}(t.Sh)}))},t.prototype.terminate=function(){var t=this;this.os.Ss();var e=new lr;return this.os.ps((function(){return r.__awaiter(t,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),this.Ql&&this.Ql.stop(),[4,Fo(this.Sh)];case 1:return r.sent(),[4,this.Ch.Si()];case 2:return r.sent(),[4,this.persistence.Si()];case 3:return r.sent(),this.credentials.Xc(),e.resolve(),[3,5];case 4:return t=r.sent(),n=Nr(t,"Failed to shutdown persistence"),e.reject(n),[3,5];case 5:return[2]}}
2))}))})),e.promise},t.prototype.waitForPendingWrites=function(){var t=this;this.q_();var e=new lr;return this.os.ds((function(){return function(t,e){return r.__awaiter(this,void 0,void 0,(function(){var n,i,o,u,a;return r.__generator(this,(function(r){switch(r.label){case 0:Qo((n=w(t)).Sh)||p("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,function(t){var e=w(t);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(t){return e.vr.Bo(t)}))}(n.Gu)];case 2:return-1===(i=r.sent())?[2,void e.resolve()]:((o=n.qh.get(i)||[]).push(e),n.qh.set(i,o),[3,4]);case 3:return u=r.sent(),a=Nr(u,"Initialization of waitForPendingWrites() operation failed"),e.reject(a),[3,4];case 4:return[2]}}))}))}(t._i,e)})),e.promise},t.prototype.listen=function(t,e,n){var r=this;this.q_();var i=new ua(n),o=new Rr(t,i,e);return this.os.ds((function(){return Cr(r.Q_,o)})),function(){i.e_(),r.os.ds((function(){return Or(r.Q_,o)}))}},t.prototype.j_=function(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:return this.q_(),[4,this.B_.promise];case 1:return i.sent(),e=new lr,[2,(this.os.ds((function(){return function(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(t,e){var n=w(t);return n.persistence.runTransaction("read document","readonly",(function(t){return n.xc.Dr(t,e)}))}(t,e)];case 1:return(i=r.sent())instanceof kn?n.resolve(i):i instanceof Dn?n.resolve(null):n.reject(new h(f.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.)")),[3,3];case 2:return o=r.sent(),u=Nr(o,"Failed to get document '"+e+" from cache"),n.reject(u),[3,3];case 3:return[2]}}
2))}))}(n.Gu,t,e)})),e.promise)]}}))}))},t.prototype.K_=function(t,e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){var n,i=this;return r.__generator(this,(function(r){switch(r.label){case 0:return this.q_(),[4,this.B_.promise];case 1:return r.sent(),n=new lr,[2,(this.os.ds((function(){return function(t,e,n,r,i){var o=new ua({next:function(o){e.ds((function(){return Or(t,u)}));var a=o.docs.has(n);!a&&o.fromCache?i.reject(new h(f.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&o.fromCache&&r&&"server"===r.source?i.reject(new h(f.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(o)},error:function(t){return i.reject(t)}}),u=new Rr(Pn(n.path),o,{includeMetadataChanges:!0,Js:!0});return Cr(t,u)}(i.Q_,i.os,t,e,n)})),n.promise)]}}))}))},t.prototype.G_=function(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n=this;return r.__generator(this,(function(i){switch(i.label){case 0:return this.q_(),[4,this.B_.promise];case 1:return i.sent(),e=new lr,[2,(this.os.ds((function(){return function(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a,s,c;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,_o(t,e,!0)];case 1:return i=r.sent(),o=new hu(e,i.kc),u=o.Th(i.documents),a=o.gr(u,!1),n.resolve(a.snapshot),[3,3];case 2:return s=r.sent(),c=Nr(s,"Failed to execute query '"+e+" against cache"),n.reject(c),[3,3];case 3:return[2]}}
2))}))}(n.Gu,t,e)})),e.promise)]}}))}))},t.prototype.z_=function(t,e){return void 0===e&&(e={}),r.__awaiter(this,void 0,void 0,(function(){var n,i=this;return r.__generator(this,(function(r){switch(r.label){case 0:return this.q_(),[4,this.B_.promise];case 1:return r.sent(),n=new lr,[2,(this.os.ds((function(){return function(t,e,n,r,i){var o=new ua({next:function(n){e.ds((function(){return Or(t,u)})),n.fromCache&&"server"===r.source?i.reject(new h(f.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(t){return i.reject(t)}}),u=new Rr(n,o,{includeMetadataChanges:!0,Js:!0});return Cr(t,u)}(i.Q_,i.os,t,e,n)})),n.promise)]}}))}))},t.prototype.write=function(t){var e=this;this.q_();var n=new lr;return this.os.ds((function(){return function(t,e,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,u,a;return r.__generator(this,(function(r){switch(r.label){case 0:i=Bu(t),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,function(t,e){var n,r=w(t),i=at.now(),o=e.reduce((function(t,e){return t.add(e.key)}),Lt());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(t){return r.xc.$r(t,o).next((function(o){n=o;for(var u=[],a=0,s=e;a<s.length;a++){var c=s[a],f=pn(c,n.get(c.key));null!=f&&u.push(new mn(c.key,f,An(f.proto.mapValue),cn.exists(!0)))}return r.vr.$o(t,i,u,e)}))})).then((function(t){var e=t.hr(n);return{batchId:t.batchId,dr:e}}))}(i.Gu,e)];case 2:return o=r.sent(),i.Ch.Fi(o.batchId),function(t,e,n){var r=t.Bh[t.currentUser.Zs()];r||(r=new It(Y)),r=r.rt(e,n),t.Bh[t.currentUser.Zs()]=r}(i,o.batchId,n),[4,Du(i,o.dr)];case 3:return r.sent(),[4,Zo(i.Sh)];case 4:return r.sent(),[3,6];case 5:return u=r.sent(),a=Nr(u,"Failed to persist write"),n.reject(a),[3,6];case 6:return[2]}}
2))}))}(e._i,t,n)})),n.promise},t.prototype.U=function(){return this.Sl.U},t.prototype.H_=function(t){var e=this;this.q_();var n=new ua(t);return this.os.ds((function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,function(t,e){w(t).Bs.add(e),e.next()}(this.Q_,n)]}))}))})),function(){n.e_(),e.os.ds((function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,function(t,e){w(t).Bs.delete(e)}(this.Q_,n)]}))}))}))}},Object.defineProperty(t.prototype,"Y_",{get:function(){return this.os.Vs},enumerable:!1,configurable:!0}),t.prototype.transaction=function(t){var e=this;this.q_();var n=new lr;return this.os.ds((function(){return new Va(e.os,e.zu,t,n).run(),Promise.resolve()})),n.promise},t}();function Ba(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=["next","error","complete"];r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t)}var Ga=function(){function t(t,e,n,r,i){this.U=t,this.timestampsInSnapshots=e,this.J_=n,this.X_=r,this.Z_=i}return t.prototype.tf=function(t){switch(Zt(t)){case 0:return null;case 1:return t.booleanValue;case 2:return ue(t.integerValue||t.doubleValue);case 3:return this.ef(t.timestampValue);case 4:return this.nf(t);case 5:return t.stringValue;case 6:return this.Z_(ae(t.bytesValue));case 7:return this.sf(t.referenceValue);case 8:return this.if(t.geoPointValue);case 9:return this.rf(t.arrayValue);case 10:return this.af(t.mapValue);default:throw m()}},t.prototype.af=function(t){var e=this,n={};return E(t.fields||{},(function(t,r){n[t]=e.tf(r)})),n},t.prototype.if=function(t){return new ba(ue(t.latitude),ue(t.longitude))},t.prototype.rf=function(t){var e=this;return(t.values||[]).map((function(t){return e.tf(t)}))},t.prototype.nf=function(t){switch(this.J_){case"previous":var e=function t(e){var n=e.mapValue.fields.__previous_value__;return Yt(n)?t(n):n}(t);return null==e?null:this.tf(e);case"estimate":return this.ef(Xt(t));default:return null}},t.prototype.ef=function(t){var e=oe(t),n=new at(e.seconds,e.nanos);return this.timestampsInSnapshots?n:n.toDate()},t.prototype.sf=function(t){var e=x.P(t);b(Qe(e));var n=new ot(e.get(1),e.get(3)),r=new N(e.u(5));return n.isEqual(this.U)||v("Document "+r+" contains a document reference within a different database ("+n.projectId+"/"+n.database+") which is not supported. It will be treated as a reference in the current database ("+this.U.projectId+"/"+this.U.database+") instead."),this.X_(r)},t}(),za=oi.uo,Wa=function(){function t(t){var e,n,r,i;if(void 0===t.host){if(void 0!==t.ssl)throw new h(f.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else L("settings","non-empty string","host",t.host),this.host=t.host,R("settings","boolean","ssl",t.ssl),this.ssl=null===(e=t.ssl)||void 0===e||e;if(G("settings",t,["host","ssl","credentials","timestampsInSnapshots","cacheSizeBytes","experimentalForceLongPolling","ignoreUndefinedProperties"]),R("settings","object","credentials",t.credentials),this.credentials=t.credentials,R("settings","boolean","timestampsInSnapshots",t.timestampsInSnapshots),R("settings","boolean","ignoreUndefinedProperties",t.ignoreUndefinedProperties),!0===t.timestampsInSnapshots?v("The setting 'timestampsInSnapshots: true' is no longer required and should be removed."):!1===t.timestampsInSnapshots&&v("Support for 'timestampsInSnapshots: false' will be removed soon. You must update your code to handle Timestamp objects."),this.timestampsInSnapshots=null===(n=t.timestampsInSnapshots)||void 0===n||n,this.ignoreUndefinedProperties=null!==(r=t.ignoreUndefinedProperties)&&void 0!==r&&r,R("settings","number","cacheSizeBytes",t.cacheSizeBytes),void 0===t.cacheSizeBytes)this.cacheSizeBytes=oi.lo;else{if(t.cacheSizeBytes!==za&&t.cacheSizeBytes<oi.ho)throw new h(f.INVALID_ARGUMENT,"cacheSizeBytes must be at least "+oi.ho);this.cacheSizeBytes=t.cacheSizeBytes}R("settings","boolean","experimentalForceLongPolling",t.experimentalForceLongPolling),this.experimentalForceLongPolling=null!==(i=t.experimentalForceLongPolling)&&void 0!==i&&i}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.timestampsInSnapshots===t.timestampsInSnapshots&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),Qa=function(){function t(e,n,i,o){var u=this;if(void 0===i&&(i=new ra),void 0===o&&(o=new oa),this.cf=i,this.uf=o,this.hf=null,this.lf=new Ar,this.INTERNAL={delete:function(){return r.__awaiter(u,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return this._f(),[4,this.ff.terminate()];case 1:return t.sent(),[2]}}))}))}}
2,"object"==typeof e.options){var a=e;this.hf=a,this.d_=t.df(a),this.wf=a.name,this.mf=new No(n)}else{var s=e;if(!s.projectId)throw new h(f.INVALID_ARGUMENT,"Must provide projectId");this.d_=new ot(s.projectId,s.database),this.wf="[DEFAULT]",this.mf=new Ao}this.Tf=new Wa({})}return Object.defineProperty(t.prototype,"Ef",{get:function(){return this.If||(this.If=new Sa(this.d_,this.Tf.ignoreUndefinedProperties)),this.If},enumerable:!1,configurable:!0}),t.prototype.settings=function(t){D("Firestore.settings",arguments,1),U("Firestore.settings","object",1,t),t.merge&&delete(t=Object.assign(Object.assign({},this.Tf),t)).merge;var e=new Wa(t);if(this.ff&&!this.Tf.isEqual(e))throw new h(f.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this.Tf=e,void 0!==e.credentials&&(this.mf=function(t){if(!t)return new Ao;switch(t.type){case"gapi":var e=t.client;return b(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new Do(e,t.sessionIndex||"0");case"provider":return t.client;default:throw new h(f.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},t.prototype.enableNetwork=function(){return this._f(),this.ff.enableNetwork()},t.prototype.disableNetwork=function(){return this._f(),this.ff.disableNetwork()},t.prototype.enablePersistence=function(t){var e,n;if(this.ff)throw new h(f.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");var r=!1,i=!1;if(t&&(void 0!==t.experimentalTabSynchronization&&v("The 'experimentalTabSynchronization' setting will be removed. Use 'synchronizeTabs' instead."),r=null!==(n=null!==(e=t.synchronizeTabs)&&void 0!==e?e:t.experimentalTabSynchronization)&&void 0!==n&&n,i=!!t.experimentalForceOwningTab&&t.experimentalForceOwningTab,r&&i))throw new h(f.INVALID_ARGUMENT,"The 'experimentalForceOwningTab' setting cannot be used with 'synchronizeTabs'.");return this.Af(this.cf,this.uf,{Gl:!0,cacheSizeBytes:this.Tf.cacheSizeBytes,synchronizeTabs:r,La:i})},t.prototype.clearPersistence=function(){return r.__awaiter(this,void 0,void 0,(function(){var t,e=this;return r.__generator(this,(function(n){if(void 0!==this.ff&&!this.ff.Y_)throw new h(f.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");return t=new lr,[2,(this.lf.ps((function(){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cf.clearPersistence(this.d_,this.wf)];case 1:return n.sent(),t.resolve(),[3,3];case 2:return e=n.sent(),t.reject(e),[3,3];case 3:return[2]}}
2))}))})),t.promise)]}))}))},t.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.INTERNAL.delete()},Object.defineProperty(t.prototype,"Rf",{get:function(){return this._f(),this.ff.Y_},enumerable:!1,configurable:!0}),t.prototype.waitForPendingWrites=function(){return this._f(),this.ff.waitForPendingWrites()},t.prototype.onSnapshotsInSync=function(t){if(this._f(),Ba(t))return this.ff.H_(t);U("Firestore.onSnapshotsInSync","function",1,t);var e={next:t};return this.ff.H_(e)},t.prototype._f=function(){return this.ff||this.Af(new ra,new oa,{Gl:!1}),this.ff},t.prototype.Pf=function(){return new it(this.d_,this.wf,this.Tf.host,this.Tf.ssl,this.Tf.experimentalForceLongPolling)},t.prototype.Af=function(t,e,n){var r=this.Pf();return this.ff=new qa(this.mf,this.lf),this.ff.start(r,t,e,n)},t.df=function(t){if(e=t.options,!Object.prototype.hasOwnProperty.call(e,"projectId"))throw new h(f.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');var e,n=t.options.projectId;if(!n||"string"!=typeof n)throw new h(f.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new ot(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this.hf)throw new h(f.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.hf},enumerable:!1,configurable:!0}),t.prototype.collection=function(t){return D("Firestore.collection",arguments,1),U("Firestore.collection","non-empty string",1,t),this._f(),new as(x.P(t),this,null)},t.prototype.doc=function(t){return D("Firestore.doc",arguments,1),U("Firestore.doc","non-empty string",1,t),this._f(),$a.gf(x.P(t),this,null)},t.prototype.collectionGroup=function(t){if(D("Firestore.collectionGroup",arguments,1),U("Firestore.collectionGroup","non-empty string",1,t),t.indexOf("/")>=0)throw new h(f.INVALID_ARGUMENT,"Invalid collection ID '"+t+"' passed to function Firestore.collectionGroup(). Collection IDs must not contain '/'.");return this._f(),new os(function(t){return new On(x.g(),t)}(t),this,null)},t.prototype.runTransaction=function(t){var e=this;return D("Firestore.runTransaction",arguments,1),U("Firestore.runTransaction","function",1,t),this._f().transaction((function(n){return t(new Ha(e,n))}))},t.prototype.batch=function(){return this._f(),new Ka(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(d()){case o.LogLevel.DEBUG:return"debug";case o.LogLevel.ERROR:return"error";case o.LogLevel.SILENT:return"silent";case o.LogLevel.WARN:return"warn";case o.LogLevel.INFO:return"info";case o.LogLevel.VERBOSE:return"verbose";default:return"error"}},enumerable:!1,configurable:!0}),t.setLogLevel=function(t){var e;D("Firestore.setLogLevel",arguments,1),j("setLogLevel",["debug","error","silent","warn","info","verbose"],1,t),e=t,l.setLogLevel(e)},t.prototype.yf=function(){return this.Tf.timestampsInSnapshots},t.prototype.Vf=function(){return this.Tf},t}(),Ha=function(){function t(t,e){this.pf=t,this.bf=e}return t.prototype.get=function(t){var e=this;D("Transaction.get",arguments,1);var n=hs("Transaction.get",t,this.pf);return this.bf.D_([n.w_]).then((function(t){if(!t||1!==t.length)return m();var r=t[0];if(r instanceof Dn)return new Xa(e.pf,n.w_,null,!1,!1,n.m_);if(r instanceof kn)return new Xa(e.pf,n.w_,r,!1,!1,n.m_);throw m()}
2))},t.prototype.set=function(t,e,n){O("Transaction.set",arguments,2,3);var r=hs("Transaction.set",t,this.pf);n=ss("Transaction.set",n);var i=ds(r.m_,e,n),o=Aa(this.pf.Ef,"Transaction.set",r.w_,i,null!==r.m_,n);return this.bf.set(r.w_,o),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],u=3;u<arguments.length;u++)o[u-3]=arguments[u];return"string"==typeof e||e instanceof sa?(C("Transaction.update",arguments,3),r=hs("Transaction.update",t,this.pf),i=ka(this.pf.Ef,"Transaction.update",r.w_,e,n,o)):(D("Transaction.update",arguments,2),r=hs("Transaction.update",t,this.pf),i=Na(this.pf.Ef,"Transaction.update",r.w_,e)),this.bf.update(r.w_,i),this},t.prototype.delete=function(t){D("Transaction.delete",arguments,1);var e=hs("Transaction.delete",t,this.pf);return this.bf.delete(e.w_),this},t}(),Ka=function(){function t(t){this.pf=t,this.vf=[],this.Sf=!1}return t.prototype.set=function(t,e,n){O("WriteBatch.set",arguments,2,3),this.Df();var r=hs("WriteBatch.set",t,this.pf);n=ss("WriteBatch.set",n);var i=ds(r.m_,e,n),o=Aa(this.pf.Ef,"WriteBatch.set",r.w_,i,null!==r.m_,n);return this.vf=this.vf.concat(o.T_(r.w_,cn.Ge())),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],u=3;u<arguments.length;u++)o[u-3]=arguments[u];return this.Df(),"string"==typeof e||e instanceof sa?(C("WriteBatch.update",arguments,3),r=hs("WriteBatch.update",t,this.pf),i=ka(this.pf.Ef,"WriteBatch.update",r.w_,e,n,o)):(D("WriteBatch.update",arguments,2),r=hs("WriteBatch.update",t,this.pf),i=Na(this.pf.Ef,"WriteBatch.update",r.w_,e)),this.vf=this.vf.concat(i.T_(r.w_,cn.exists(!0))),this},t.prototype.delete=function(t){D("WriteBatch.delete",arguments,1),this.Df();var e=hs("WriteBatch.delete",t,this.pf);return this.vf=this.vf.concat(new In(e.w_,cn.Ge())),this},t.prototype.commit=function(){return this.Df(),this.Sf=!0,this.vf.length>0?this.pf._f().write(this.vf):Promise.resolve()},t.prototype.Df=function(){if(this.Sf)throw new h(f.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),$a=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n.d_,e,r)||this).w_=e,i.firestore=n,i.m_=r,i.ff=i.firestore._f(),i}return r.__extends(e,t),e.gf=function(t,n,r){if(t.length%2!=0)throw new h(f.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.R()+" has "+t.length);return new e(new N(t),n,r)},Object.defineProperty(e.prototype,"id",{get:function(){return this.w_.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new as(this.w_.path.h(),this.firestore,this.m_)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.w_.path.R()},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){if(D("DocumentReference.collection",arguments,1),U("DocumentReference.collection","non-empty string",1,t),!t)throw new h(f.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=x.P(t);return new as(this.w_.path.child(e),this.firestore,null)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw z("isEqual","DocumentReference",1,t);return this.firestore===t.firestore&&this.w_.isEqual(t.w_)&&this.m_===t.m_},e.prototype.set=function(t,e){O("DocumentReference.set",arguments,1,2),e=ss("DocumentReference.set",e);var n=ds(this.m_,t,e),r=Aa(this.firestore.Ef,"DocumentReference.set",this.w_,n,null!==this.m_,e);return this.ff.write(r.T_(this.w_,cn.Ge()))},e.prototype.update=function(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof t||t instanceof sa?(C("DocumentReference.update",arguments,2),n=ka(this.firestore.Ef,"DocumentReference.update",this.w_,t,e,r)):(D("DocumentReference.update",arguments,1),n=Na(this.firestore.Ef,"DocumentReference.update",this.w_,t)),this.ff.write(n.T_(this.w_,cn.exists(!0)))},e.prototype.delete=function(){return D("DocumentReference.delete",arguments,0),this.ff.write([new In(this.w_,cn.Ge())])},e.prototype.onSnapshot=function(){for(var t,e,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];O("DocumentReference.onSnapshot",arguments,1,4);var u={includeMetadataChanges:!1},a=0;"object"!=typeof i[a]||Ba(i[a])||(G("DocumentReference.onSnapshot",u=i[a],["includeMetadataChanges"]),R("DocumentReference.onSnapshot","boolean","includeMetadataChanges",u.includeMetadataChanges),a++);var s={includeMetadataChanges:u.includeMetadataChanges};if(Ba(i[a])){var c=i[a];i[a]=null===(t=c.next)||void 0===t?void 0:t.bind(c),i[a+1]=null===(e=c.error)||void 0===e?void 0:e.b
2ind(c),i[a+2]=null===(n=c.complete)||void 0===n?void 0:n.bind(c)}else U("DocumentReference.onSnapshot","function",a,i[a]),P("DocumentReference.onSnapshot","function",a+1,i[a+1]),P("DocumentReference.onSnapshot","function",a+2,i[a+2]);var f={next:function(t){i[a]&&i[a](r.Cf(t))},error:i[a+1],complete:i[a+2]};return this.ff.listen(Pn(this.w_.path),s,f)},e.prototype.get=function(t){var e=this;O("DocumentReference.get",arguments,0,1),fs("DocumentReference.get",t);var n=this.firestore._f();return t&&"cache"===t.source?n.j_(this.w_).then((function(t){return new Xa(e.firestore,e.w_,t,!0,t instanceof kn&&t.Ye,e.m_)})):n.K_(this.w_,t).then((function(t){return e.Cf(t)}))},e.prototype.withConverter=function(t){return new e(this.w_,this.firestore,t)},e.prototype.Cf=function(t){var e=t.docs.get(this.w_);return new Xa(this.firestore,this.w_,e,t.fromCache,t.hasPendingWrites,this.m_)},e}(_a),Ya=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Xa=function(){function t(t,e,n,r,i,o){this.pf=t,this.w_=e,this.Nf=n,this.Ff=r,this.xf=i,this.m_=o}return t.prototype.data=function(t){var e=this;if(O("DocumentSnapshot.data",arguments,0,1),t=cs("DocumentSnapshot.data",t),this.Nf){if(this.m_){var n=new Ja(this.pf,this.w_,this.Nf,this.Ff,this.xf,null);return this.m_.fromFirestore(n,t)}return new Ga(this.pf.d_,this.pf.yf(),t.serverTimestamps||"none",(function(t){return new $a(t,e.pf,null)}),(function(t){return new rt(t)})).tf(this.Nf.sn())}},t.prototype.get=function(t,e){var n=this;if(O("DocumentSnapshot.get",arguments,1,2),e=cs("DocumentSnapshot.get",e),this.Nf){var r=this.Nf.data().field(La("DocumentSnapshot.get",t,this.w_));if(null!==r)return new Ga(this.pf.d_,this.pf.yf(),e.serverTimestamps||"none",(function(t){return new $a(t,n.pf,n.m_)}),(function(t){return new rt(t)})).tf(r)}},Object.defineProperty(t.prototype,"id",{get:function(){return this.w_.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new $a(this.w_,this.pf,this.m_)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exists",{get:function(){return null!==this.Nf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return new Ya(this.xf,this.Ff)},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){if(!(e instanceof t))throw z("isEqual","DocumentSnapshot",1,e);return this.pf===e.pf&&this.Ff===e.Ff&&this.w_.isEqual(e.w_)&&(null===this.Nf?null===e.Nf:this.Nf.isEqual(e.Nf))&&this.m_===e.m_},t}(),Ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.data=function(e){return t.prototype.data.call(this,e)},e}(Xa);function Za(t,e,n,r,i,o,u){var a;if(i.p()){if("array-contains"===o||"array-contains-any"===o)throw new h(f.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){ns(u,o);for(var s=[],c=0,l=u;c<l.length;c++){var d=l[c];s.push(es(r,t,d))}a={arrayValue:{values:s}}}else a=es(r,t,u)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||ns(u,o),a=Da(n,e,u,"in"===o||"not-in"===o);var p=Yn.create(i,o,a);return function(t,e){if(e.un()){var n=jn(t);if(null!==n&&!n.isEqual(e.field))throw new h(f.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+e.field.toString()+"'");var r=Mn(t);null!==r&&rs(t,e.field,r)}var i=function(t,e){for(var n=0,r=t.filters;n<r.length;n++){var i=r[n];if(e.indexOf(i.op)>=0)return i.op}return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(null!==i)throw i===e.op?new h(f.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new h(f.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+i.toString()+"' filters.")}(t,p),p}function ts(t,e,n){if(null!==t.startAt)throw new h(f.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new h(f.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new cr(e,n);return function(t,e){if(null===Mn(t)){var n=jn(t);null!==n&&rs(t,n,e.field)}}(t,r),r}function es(t,e,n){if("string"==typeof n){if(""===n)throw new h(f.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Fn(e)&&-1!==n.indexOf("/"))throw new h(f.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=e.path.child(x.P(n));if(!N.F(r))throw new h(f.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+r+"' is not because it has an odd number of segments ("+r.length+").");return se(t,new N(r))}if(n instanceof _a)return se(t,n.w_);throw new h(f.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+q(n)+".")}function ns(t,e){if(!Array.isArray(t)||0===t.length)throw new h(f.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length>10)throw new h(f.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.");if("in"===e||"array-contains-any"===e){if(t.indexOf(null)>=0)throw new h(f.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters cannot contain 'null' in the value array.");if(t.filter((function(t){return Number.isNaN(t)})).length>0)throw new h(f.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters cannot contain 'NaN' in the value array.")}}function rs(t,e,n){if(!n.isEqual(e))throw new h(f.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function is(t){if(Rn(t)&&0===t.rn.length)throw new h(f.UNIMPLEMENT
2ED,"limitToLast() queries require specifying at least one orderBy() clause")}var os=function(){function t(t,e,n){this.$f=t,this.firestore=e,this.m_=n}return t.prototype.where=function(e,n,r){D("Query.where",arguments,3),B("Query.where",3,r);var i=j("Query.where",["<","<=","==","!=",">=",">","array-contains","in","array-contains-any","not-in"],2,n),o=La("Query.where",e),u=Za(this.$f,"Query.where",this.firestore.Ef,this.firestore.d_,o,i,r);return new t(function(t,e){var n=t.filters.concat([e]);return new On(t.path,t.collectionGroup,t.rn.slice(),n,t.limit,t.on,t.startAt,t.endAt)}(this.$f,u),this.firestore,this.m_)},t.prototype.orderBy=function(e,n){var r;if(O("Query.orderBy",arguments,1,2),P("Query.orderBy","non-empty string",2,n),void 0===n||"asc"===n)r="asc";else{if("desc"!==n)throw new h(f.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r="desc"}var i=La("Query.orderBy",e),o=ts(this.$f,i,r);return new t(function(t,e){var n=t.rn.concat([e]);return new On(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.on,t.startAt,t.endAt)}(this.$f,o),this.firestore,this.m_)},t.prototype.limit=function(e){return D("Query.limit",arguments,1),U("Query.limit","number",1,e),W("Query.limit",1,e),new t(Bn(this.$f,e,"F"),this.firestore,this.m_)},t.prototype.limitToLast=function(e){return D("Query.limitToLast",arguments,1),U("Query.limitToLast","number",1,e),W("Query.limitToLast",1,e),new t(Bn(this.$f,e,"L"),this.firestore,this.m_)},t.prototype.startAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];C("Query.startAt",arguments,1);var i=this.kf("Query.startAt",e,n,!0);return new t(Gn(this.$f,i),this.firestore,this.m_)},t.prototype.startAfter=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];C("Query.startAfter",arguments,1);var i=this.kf("Query.startAfter",e,n,!1);return new t(Gn(this.$f,i),this.firestore,this.m_)},t.prototype.endBefore=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];C("Query.endBefore",arguments,1);var i=this.kf("Query.endBefore",e,n,!0);return new t(zn(this.$f,i),this.firestore,this.m_)},t.prototype.endAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];C("Query.endAt",arguments,1);var i=this.kf("Query.endAt",e,n,!1);return new t(zn(this.$f,i),this.firestore,this.m_)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw z("isEqual","Query",1,e);return this.firestore===e.firestore&&Wn(this.$f,e.$f)&&this.m_===e.m_},t.prototype.withConverter=function(e){return new t(this.$f,this.firestore,e)},t.prototype.kf=function(t,e,n,i){if(B(t,1,e),e instanceof Xa)return D(t,r.__spreadArrays([e],n),1),function(t,e,n,r,i){if(!r)throw new h(f.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],u=0,a=Vn(t);u<a.length;u++){var s=a[u];if(s.field.p())o.push(se(e,r.key));else{var c=r.field(s.field);if(Yt(c))throw new h(f.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+s.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===c){var l=s.field.R();throw new h(f.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+l+"' (used as the orderBy) does not exist.")}o.push(c)}}return new or(o,i)}(this.$f,this.firestore.d_,t,e.Nf,i);var o=[e].concat(n);return function(t,e,n,r,i,o){var u=t.rn;if(i.length>u.length)throw new h(f.INVALID_ARGUMENT,"Too many arguments provided to "+r+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var a=[],s=0;s<i.length;s++){var c=i[s];if(u[s].field.p()){if("string"!=typeof c)throw new h(f.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof c);if(!Fn(t)&&-1!==c.indexOf("/"))throw new h(f.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+c+"' contains a slash.");var l=t.path.child(x.P(c));if(!N.F(l))throw new h(f.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+l+"' is not because it c
2ontains an odd number of segments.");var d=new N(l);a.push(se(e,d))}else{var p=Da(n,r,c);a.push(p)}}return new or(a,o)}(this.$f,this.firestore.d_,this.firestore.Ef,t,o,i)},t.prototype.onSnapshot=function(){for(var t,e,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];O("Query.onSnapshot",arguments,1,4);var u={},a=0;if("object"!=typeof i[a]||Ba(i[a])||(G("Query.onSnapshot",u=i[a],["includeMetadataChanges"]),R("Query.onSnapshot","boolean","includeMetadataChanges",u.includeMetadataChanges),a++),Ba(i[a])){var s=i[a];i[a]=null===(t=s.next)||void 0===t?void 0:t.bind(s),i[a+1]=null===(e=s.error)||void 0===e?void 0:e.bind(s),i[a+2]=null===(n=s.complete)||void 0===n?void 0:n.bind(s)}else U("Query.onSnapshot","function",a,i[a]),P("Query.onSnapshot","function",a+1,i[a+1]),P("Query.onSnapshot","function",a+2,i[a+2]);var c={next:function(t){i[a]&&i[a](new us(r.firestore,r.$f,t,r.m_))},error:i[a+1],complete:i[a+2]};return is(this.$f),this.firestore._f().listen(this.$f,u,c)},t.prototype.get=function(t){var e=this;O("Query.get",arguments,0,1),fs("Query.get",t),is(this.$f);var n=this.firestore._f();return(t&&"cache"===t.source?n.G_(this.$f):n.z_(this.$f,t)).then((function(t){return new us(e.firestore,e.$f,t,e.m_)}))},t}(),us=function(){function t(t,e,n,r){this.pf=t,this.Mf=e,this.Of=n,this.m_=r,this.Lf=null,this.Bf=null,this.metadata=new Ya(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this.Of.docs.m()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.Of.docs.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;O("QuerySnapshot.forEach",arguments,1,2),U("QuerySnapshot.forEach","function",1,t),this.Of.docs.forEach((function(r){t.call(e,n.qf(r,n.metadata.fromCache,n.Of.Qt.has(r.key)))}))},Object.defineProperty(t.prototype,"query",{get:function(){return new os(this.Mf,this.pf,this.m_)},enumerable:!1,configurable:!0}),t.prototype.docChanges=function(t){t&&(G("QuerySnapshot.docChanges",t,["includeMetadataChanges"]),R("QuerySnapshot.docChanges","boolean","includeMetadataChanges",t.includeMetadataChanges));var e=!(!t||!t.includeMetadataChanges);if(e&&this.Of.jt)throw new h(f.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.Lf&&this.Bf===e||(this.Lf=function(t,e,n){if(t.Ut.m()){var r=0;return t.docChanges.map((function(e){var i=n(e.doc,t.fromCache,t.Qt.has(e.doc.key));return e.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}}))}var i=t.Ut;return t.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var r=n(e.doc,t.fromCache,t.Qt.has(e.doc.key)),o=-1,u=-1;return 0!==e.type&&(o=i.indexOf(e.doc.key),i=i.delete(e.doc.key)),1!==e.type&&(u=(i=i.add(e.doc)).indexOf(e.doc.key)),{type:ls(e.type),doc:r,oldIndex:o,newIndex:u}}))}(this.Of,e,this.qf.bind(this)),this.Bf=e),this.Lf},t.prototype.isEqual=function(e){if(!(e instanceof t))throw z("isEqual","QuerySnapshot",1,e);return this.pf===e.pf&&Wn(this.Mf,e.Mf)&&this.Of.isEqual(e.Of)&&this.m_===e.m_},t.prototype.qf=function(t,e,n){return new Ja(this.pf,t.key,t,e,n,this.m_)},t}(),as=function(t){function e(e,n,r){var i=this;if((i=t.call(this,Pn(e),n,r)||this).Uf=e,e.length%2!=1)throw new h(f.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.R()+" has "+e.length);return i}return r.__extends(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.$f.path._()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.$f.path.h();return t.m()?null:new $a(new N(t),this.firestore,null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.$f.path.R()},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){O("CollectionReference.doc",arguments,0,1),0===arguments.length&&(t=$.k()),U("CollectionReference.doc","non-empty string",1,t);var e=x.P(t);return $a.gf(this.$f.path.child(e),this.firestore,this.m_)},e.prototype.add=function(t){D("CollectionReference.add",arguments,1
2);var e=this.m_?this.m_.toFirestore(t):t;U("CollectionReference.add","object",1,e);var n=this.doc();return new $a(n.w_,this.firestore,null).set(e).then((function(){return n}))},e.prototype.withConverter=function(t){return new e(this.Uf,this.firestore,t)},e}(os);function ss(t,e){if(void 0===e)return{merge:!1};if(G(t,e,["merge","mergeFields"]),R(t,"boolean","merge",e.merge),function(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){if(!(r instanceof Array))throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires its "+e+" option to be an array, but it was: "+q(r));for(var o=0;o<r.length;++o)if(!i(r[o]))throw new h(f.INVALID_ARGUMENT,"Function "+t+"() requires all "+e+" elements to be a string or a FieldPath, but the value at index "+o+" was: "+q(r[o]))}(t,"mergeFields",0,r,(function(t){return"string"==typeof t||t instanceof sa}))}(t,0,0,e.mergeFields),void 0!==e.mergeFields&&void 0!==e.merge)throw new h(f.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function cs(t,e){return void 0===e?{}:(G(t,e,["serverTimestamps"]),M(t,0,"serverTimestamps",e.serverTimestamps,["estimate","previous","none"]),e)}function fs(t,e){P(t,"object",1,e),e&&(G(t,e,["source"]),M(t,0,"source",e.source,["default","server","cache"]))}function hs(t,e,n){if(e instanceof _a){if(e.firestore!==n)throw new h(f.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}throw z(t,"DocumentReference",1,e)}function ls(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return m()}}function ds(t,e,n){return t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}var ps={Firestore:Qa,GeoPoint:ba,Timestamp:at,Blob:rt,Transaction:Ha,WriteBatch:Ka,DocumentReference:$a,DocumentSnapshot:Xa,Query:os,QueryDocumentSnapshot:Ja,QuerySnapshot:us,CollectionReference:as,FieldPath:sa,FieldValue:ya,setLogLevel:Qa.setLogLevel,CACHE_SIZE_UNLIMITED:za};function vs(t){!function(t,e){t.INTERNAL.registerComponent(new s.Component("firestore",(function(t){return function(t,e){var n=new oa,r=new ia(n);return new Qa(t,e,r,n)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},ps)))}(t),t.registerVersion("@firebase/firestore","1.17.1")}vs(c.default),e.__PRIVATE_registerFirestore=vs}).call(this,n(221))},966:function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"ErrorCode",(function(){return er})),n.d(e,"EventType",(function(){return nr})),n.d(e,"WebChannel",(function(){return rr})),n.d(e,"XhrIo",(function(){return ir})),n.d(e,"createWebChannelTransport",(function(){return tr}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},a=a||{},s=u||self;function c(){}function f(t){var e=typeof t;return"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}function h(t){var e=f(t);return"array"==e||"object"==e&&"number"==typeof t.length}function l(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var d="closure_uid_"+(1e9*Math.random()>>>0),p=0;function v(t,e,n){return t.call.apply(t.bind,arguments)}function g(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function y(t,e,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:g).apply(null,arguments)}
2function m(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var b=Date.now;function w(t,e){function n(){}n.prototype=e.prototype,t.S=e.prototype,t.prototype=new n,t.prototype.constructor=t}function _(){this.j=this.j,this.i=this.i}_.prototype.j=!1,_.prototype.ja=function(){if(!this.j&&(this.j=!0,this.G(),0))(function(t){Object.prototype.hasOwnProperty.call(t,d)&&t[d]||(t[d]=++p)})(this)},_.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var E=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},I=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function T(t){return Array.prototype.concat.apply([],arguments)}function x(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function S(t){return/^[\s\xa0]*$/.test(t)}var A,N=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function k(t,e){return-1!=t.indexOf(e)}function D(t,e){return t<e?-1:t>e?1:0}t:{var C=s.navigator;if(C){var O=C.userAgent;if(O){A=O;break t}}A=""}function U(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function P(t){var e={};for(var n in t)e[n]=t[n];return e}var L="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function R(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<L.length;o++)n=L[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function M(t){return M[" "](t),t}M[" "]=c;var j,F=k(A,"Opera"),V=k(A,"Trident")||k(A,"MSIE"),q=k(A,"Edge"),B=q||V,G=k(A,"Gecko")&&!(k(A.toLowerCase(),"webkit")&&!k(A,"Edge"))&&!(k(A,"Trident")||k(A,"MSIE"))&&!k(A,"Edge"),z=k(A.toLowerCase(),"webkit")&&!k(A,"Edge");function W(){var t=s.document;return t?t.documentMode:void 0}t:{var Q="",H=function(){var t=A;return G?/rv:([^\);]+)(\)|;)/.exec(t):q?/Edge\/([\d\.]+)/.exec(t):V?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):z?/WebKit\/(\S+)/.exec(t):F?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(H&&(Q=H?H[1]:""),V){var K=W();if(null!=K&&K>parseFloat(Q)){j=String(K);break t}}j=Q}var $,Y={};function X(t){return function(t,e){var n=Y;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=N(String(j)).split("."),r=N(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var u=n[o]||"",a=r[o]||"";do{if(u=/(\d*)(\D*)(.*)/.exec(u)||["","","",""],a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],0==u[0].length&&0==a[0].length)break;e=D(0==u[1].length?0:parseInt(u[1],10),0==a[1].length?0:parseInt(a[1],10))||D(0==u[2].length,0==a[2].length)||D(u[2],a[2]),u=u[3],a=a[3]}while(0==e)}return 0<=e}))}if(s.document&&V){var J=W();$=J||(parseInt(j,10)||void 0)}else $=void 0;var Z=$,tt=!V||9<=Number(Z),et=V&&!X("9"),nt=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{s.addEventListener("test",c,e),s.removeEventListener("test",c,e)}catch(n){}return t}();function rt(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function it(t,e){if(rt.call(this,t?t.type:""),this.relatedTarget=this.a=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.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(G){t:{try{M(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:ot[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}rt.prototype.b=function(){this.defaultPrevented=!0},w(it,rt);var ot={2:"touch",3:"pen",4:"mouse"};
2it.prototype.b=function(){it.S.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,et)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var ut="closure_listenable_"+(1e6*Math.random()|0),at=0;function st(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ca=i,this.key=++at,this.Y=this.Z=!1}function ct(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function ft(t){this.src=t,this.a={},this.b=0}function ht(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=E(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ct(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function lt(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Y&&o.listener==e&&o.capture==!!n&&o.ca==r)return i}return-1}ft.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var u=lt(t,e,r,i);return-1<u?(e=t[u],n||(e.Z=!1)):((e=new st(e,this.src,o,!!r,i)).Z=n,t.push(e)),e};var dt="closure_lm_"+(1e6*Math.random()|0),pt={};function vt(t,e,n,r,i){if(r&&r.once)return function t(e,n,r,i,o){if(Array.isArray(n)){for(var u=0;u<n.length;u++)t(e,n[u],r,i,o);return null}return r=It(r),e&&e[ut]?e.wa(n,r,l(i)?!!i.capture:!!i,o):gt(e,n,r,!0,i,o)}(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o<e.length;o++)vt(t,e[o],n,r,i);return null}return n=It(n),t&&t[ut]?t.va(e,n,l(r)?!!r.capture:!!r,i):gt(t,e,n,!1,r,i)}function gt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var u=l(i)?!!i.capture:!!i;if(u&&!tt)return null;var a=_t(t);if(a||(t[dt]=a=new ft(t)),(n=a.add(e,n,r,u,o)).proxy)return n;if(r=function(){var t=wt,e=tt?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)nt||(i=u),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(mt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function yt(t){if("number"!==typeof t&&t&&!t.Y){var e=t.src;if(e&&e[ut])ht(e.c,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(mt(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=_t(e))?(ht(n,t),0==n.b&&(n.src=null,e[dt]=null)):ct(t)}}}function mt(t){return t in pt?pt[t]:pt[t]="on"+t}function bt(t,e){var n=t.listener,r=t.ca||t.src;return t.Z&&yt(t),n.call(r,e)}function wt(t,e){if(t.Y)return!0;if(!tt){if(!e)t:{e=["window","event"];for(var n=s,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return bt(t,e=new it(e,this))}return bt(t,new it(e,this))}function _t(t){return(t=t[dt])instanceof ft?t:null}var Et="__closure_events_fn_"+(1e9*Math.random()>>>0);function It(t){return"function"==f(t)?t:(t[Et]||(t[Et]=function(e){return t.handleEvent(e)}),t[Et])}function Tt(){_.call(this),this.c=new ft(this),this.J=this,this.C=null}function xt(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var u=e[o];if(u&&!u.Y&&u.capture==n){var a=u.listener,s=u.ca||u.src;u.Z&&ht(t.c,u),i=!1!==a.call(s,r)&&i}}return i&&!r.defaultPrevented}w(Tt,_),Tt.prototype[ut]=!0,(o=Tt.prototype).addEventListener=function(t,e,n,r){vt(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){!function t(e,n,r,i,o){if(Array.isArray(n))for(var u=0;u<n.length;u++)t(e,n[u],r,i,o);else i=l(i)?!!i.capture:!!i,r=It(r),e&&e[ut]?(e=e.c,(n=String(n).toString())in e.a&&(-1<(r=lt(u=e.a[n],r,i,o))&&(ct(u[r]),Array.prototype.splice.call(u,r,1),0==u.length&&(delete e.a[n],e.b--)))):e&&(e=_t(e))&&(n=e.a[n.toString()],e=-1,n&&(e=lt(n,r,i,o)),(r=-1<e?n[e]:null)&&yt(r))}(this,t,e,n,r)},o.dispatchEvent=function(t){var e,n=this.C;if(n)for(e=[];n;n=n.C)e.push(n);n=this.J;var r=t.type||t;if("string"===typeof t)t=new rt(t,n);else if(t instanceof rt)t.target=t.target||n;else{var i=t;R(t=new rt(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var u=t.a=e[o];i=xt(u,r,!0,t)&&i}if(i=xt(u=t.a=n,r,!0,t)&&i,i=xt(u,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=xt(u=t.a=e[o],r,!1,t)&&i;return i},o.G=function(){if(Tt.S.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)ct(n[r]);delete e.a[t],e.b--}}this.C=null},o.va=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},o.wa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var St=s.JSON.stringify;function At(){this.b=this.a=null}
2var Nt,kt=new(function(){function t(t,e,n){this.f=n,this.c=t,this.g=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())((function(){return new Ct}),(function(t){t.reset()}),100);function Dt(){var t=Lt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Ct(){this.next=this.b=this.a=null}function Ot(t){s.setTimeout((function(){throw t}),0)}function Ut(t,e){Nt||function(){var t=s.Promise.resolve(void 0);Nt=function(){t.then(Rt)}}(),Pt||(Nt(),Pt=!0),Lt.add(t,e)}At.prototype.add=function(t,e){var n=kt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Ct.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Ct.prototype.reset=function(){this.next=this.b=this.a=null};var Pt=!1,Lt=new At;function Rt(){for(var t;t=Dt();){try{t.a.call(t.b)}catch(n){Ot(n)}var e=kt;e.g(t),e.b<e.f&&(e.b++,t.next=e.a,e.a=t)}Pt=!1}function Mt(t,e){Tt.call(this),this.b=t||1,this.a=e||s,this.f=y(this.Ya,this),this.g=b()}function jt(t){t.aa=!1,t.M&&(t.a.clearTimeout(t.M),t.M=null)}function Ft(t,e,n){if("function"==f(t))n&&(t=y(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=y(t.handleEvent,t)}return 2147483647<Number(e)?-1:s.setTimeout(t,e||0)}function Vt(t){t.a=Ft((function(){t.a=null,t.c&&(t.c=!1,Vt(t))}),t.h);var e=t.b;t.b=null,t.g.apply(null,e)}w(Mt,Tt),(o=Mt.prototype).aa=!1,o.M=null,o.Ya=function(){if(this.aa){var t=b()-this.g;0<t&&t<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&&(this.a.clearTimeout(this.M),this.M=null),this.dispatchEvent("tick"),this.aa&&(jt(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=b())},o.G=function(){Mt.S.G.call(this),jt(this),delete this.a};var qt=function(t){function e(e,n,r){var i=t.call(this)||this;return i.g=null!=r?e.bind(r):e,i.h=n,i.b=null,i.c=!1,i.a=null,i}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:Vt(this)},e.prototype.G=function(){t.prototype.G.call(this),this.a&&(s.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},e}(_);function Bt(t){_.call(this),this.b=t,this.a={}}w(Bt,_);var Gt=[];function zt(t,e,n,r){Array.isArray(n)||(n&&(Gt[0]=n.toString()),n=Gt);for(var i=0;i<n.length;i++){var o=vt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function Wt(t){U(t.a,(function(t,e){this.a.hasOwnProperty(e)&&yt(t)}),t),t.a={}}function Qt(){this.a=!0}function Ht(t,e,n,r){t.info((function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var u=1;u<i.length;u++)i[u]=""}}}return St(n)}catch(a){return e}}(t,n)+(r?" "+r:"")}))}Bt.prototype.G=function(){Bt.S.G.call(this),Wt(this)},Bt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Qt.prototype.info=function(){};var Kt=null;function $t(){return Kt=Kt||new Tt}function Yt(t){rt.call(this,"serverreachability",t)}function Xt(t){var e=$t();e.dispatchEvent(new Yt(e,t))}function Jt(t){rt.call(this,"statevent",t)}function Zt(t){var e=$t();e.dispatchEvent(new Jt(e,t))}function te(t){rt.call(this,"timingevent",t)}function ee(t,e){if("function"!=f(t))throw Error("Fn must not be null and must be a function");return s.setTimeout((function(){t()}),e)}w(Yt,rt),w(Jt,rt),w(te,rt);var ne={NO_ERROR:0,Za:1,gb:2,fb:3,bb:4,eb:5,hb:6,Da:7,TIMEOUT:8,kb:9},re={ab:"complete",ob:"success",Ea:"error",Da:"abort",mb:"ready",nb:"readystatechange",TIMEOUT:"timeout",ib:"incrementaldata",lb:"progress",cb:"downloadprogress",pb:"uploadprogress"};function ie(){}function oe(t){var e;return(e=t.a)||(e=t.a={}),e}function ue(){}ie.prototype.a=null;var ae,se={OPEN:"a",$a:"b",Ea:"c",jb:"d"};function ce(){rt.call(this,"d")}function fe(){rt.call(this,"c")}function he(){}function le(t,e,n,r){this.g=t,this.c=e,this.f=n,this.T=r||1,this.J=new Bt(this),this.P=de,t=B?125:void 0,this.R=new Mt(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.U=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.W=this.C=this.V=this.I=!1}w(ce,rt),w(fe,rt),w(he,ie),ae=new he;var de=45e3,pe={},ve={};function ge(t,e,n){t.H=1,t.i=je(Oe(e)),t.j=n,t.I=!0,ye(t,null)}function ye(t,e){t.u=b(),we(t),t.l=Oe(t.i);var n=t.l,r=t.T;Array.isArray(r)||(r=[String(r)]),Xe(n.b,"t",r),t.D=0,t.a=Qn(t.g,t.g.C?e:null),0<t.O&&(t.F=new qt(y(t.Ca,t,t.a),t.O)),zt(t.J,t.a,"readystatechange",t.Wa),e=t.B?P(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),Xt(1),function(t,e,n,r,i,o){t.info((function(){if(t.a)if(o)for(var u="",a=o.split("&"),s=0;s<a.length;s++){var c=a[s].split("=");if(1<c.length){var f=c[0];c=c[1];var h=f.split("_");u=2<=h.length&&"type"==h[1]?u+(f+"=")+c+"&":u+(f+"=redacted&")}}else u=null;else u=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+u}))}(t.c,t.m,t.l,t.f,t.T,t.j)}function me(t,e,n){for(var r=!0;!t.A&&t.D<n.length;){var i=be(t,n);if(i==ve){4==e&&(t.h=4,Zt(14),r=!1),Ht(t.c,t.f,null,"[Incomplete Response]");break}if(i==pe){t.h=4,Zt(15),Ht(t.c,t.f,n,"[Invalid Chunk]"),r=!1;break}Ht(t.c,t.f,i,null),xe(t,i)}4==e&&0==n.length&&(t.h=1,Zt(16),r=!1),t.b=t.b&&r,r?0<n.length&&!t.W&&(t.W=!0,(e=t.g).a==t&&e.V&&!e.F&&(e.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),jn(e),e.F=!0)):(Ht(t.c,t.f,n,"[Invalid Chunked Response]"),Te(t),Ie(t))}function be(t,e){var n=t.D,r=e.indexOf("\n",n);return-1==r?ve:(n=Number(e.substring(n,r)),isNaN(n)?pe:(r+=1)+n>e.length?ve:(e=e.substr(r,n),t.D=r+n,e))}function we(t){t.U=b()+t.P,_e(t,t.P)}function _e(t,e){if(null!=t.o)throw Error("WatchDog timer not null");
vendor: 11,121 bytes, line 2
2t.o=ee(y(t.Ua,t),e)}function Ee(t){t.o&&(s.clearTimeout(t.o),t.o=null)}function Ie(t){0==t.g.v||t.A||qn(t.g,t)}function Te(t){Ee(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,jt(t.R),Wt(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function xe(t,e){try{var n=t.g;if(0!=n.v&&(n.a==t||on(n.b,t)))if(n.I=t.N,!t.C&&on(n.b,t)&&3==n.v){try{var r=n.ka.a.parse(e)}catch(g){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){t:if(!n.j){if(n.a){if(!(n.a.u+3e3<t.u))break t;Vn(n),kn(n)}Mn(n),Zt(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=ee(y(n.Ra,n),6e3));if(1>=rn(n.b)&&n.ea){try{n.ea()}catch(g){}n.ea=void 0}}else Gn(n,11)}else if((t.C||n.a==t)&&Vn(n),!S(e))for(e=r=n.ka.a.parse(e),r=0;r<e.length;r++)if(i=e[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&&(n.ha=o,n.c.info("VER="+n.ha));var u=i[4];null!=u&&(n.pa=u,n.c.info("SVER="+n.pa));var a=i[5];if(null!=a&&"number"===typeof a&&0<a){var s=1.5*a;n.D=s,n.c.info("backChannelRequestTimeoutMs_="+s)}s=n;var c=t.a;if(c){var f=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(f){var h=s.b;!h.a&&(k(f,"spdy")||k(f,"quic")||k(f,"h2"))&&(h.f=h.g,h.a=new Set,h.b&&(un(h,h.b),h.b=null))}if(s.A){var l=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;l&&(s.na=l,Me(s.B,s.A,l))}}n.v=3,n.f&&n.f.ta(),n.V&&(n.N=b()-t.u,n.c.info("Handshake RTT: "+n.N+"ms"));var d=t;if((s=n).la=Wn(s,s.C?s.ga:null,s.fa),d.C){an(s.b,d);var p=d,v=s.D;v&&p.setTimeout(v),p.o&&(Ee(p),we(p)),s.a=d}else Rn(s);0<n.g.length&&On(n)}else"stop"!=i[0]&&"close"!=i[0]||Gn(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Gn(n,7):Nn(n):"noop"!=i[0]&&n.f&&n.f.sa(i),n.o=0);Xt(4)}catch(g){}}function Se(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(h(t)||"string"===typeof t)I(t,e,void 0);else{if(t.L&&"function"==typeof t.L)var n=t.L();else if(t.K&&"function"==typeof t.K)n=void 0;else if(h(t)||"string"===typeof t){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.K&&"function"==typeof t.K)return t.K();if("string"===typeof t)return t.split("");if(h(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function Ae(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Ae)for(n=t.L(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ne(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];ke(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)ke(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function ke(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(o=le.prototype).setTimeout=function(t){this.P=t},o.Wa=function(t){t=t.target;var e=this.F;e&&3==Tn(t)?e.f():this.Ca(t)},o.Ca=function(t){try{if(t==this.a)t:{var e=Tn(this.a),n=this.a.ua(),r=this.a.X();if(!(3>e||3==e&&!B&&!this.a.$())){this.A||4!=e||7==n||Xt(8==n||0>=r?3:2),Ee(this);var i=this.a.X();this.N=i;var o=this.a.$();if(this.b=200==i,function(t,e,n,r,i,o,u){t.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+u}))}(this.c,this.m,this.l,this.f,this.T,e,i),this.b){if(this.V&&!this.C){e:{if(this.a){var u,a=this.a;if((u=a.a?a.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!S(u)){var s=u;break e}}s=null}if(!s){this.b=!1,this.h=3,Zt(12),Te(this),Ie(this);break t}Ht(this.c,this.f,s,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,xe(this,s)}this.I?(me(this,e,o),B&&this.b&&3==e&&(zt(this.J,this.R,"tick",this.Va),this.R.start())):(Ht(this.c,this.f,o,null),xe(this,o)),4==e&&Te(this),this.b&&!this.A&&(4==e?qn(this.g,this):(this.b=!1,we(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,Zt(12)):(this.h=0,Zt(13)),Te(this),Ie(this)}}}catch(c){}},o.Va=function(){if(this.a){var t=Tn(this.a),e=this.a.$();this.D<e.length&&(Ee(this),me(this,t,e),this.b&&4!=t&&we(this))}},o.cancel=function(){this.A=!0,Te(this)},o.Ua=function(){this.o=null;var t=b();0<=t-this.U?(function(t,e){t.info((function(){return"TIMEOUT: "+e}))}(this.c,this.l),2!=this.H&&(Xt(3),Zt(17)),Te(this),this.h=2,Ie(this)):_e(this,this.U-t)},(o=Ae.prototype).K=function(){Ne(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},o.L=function(){return Ne(this),this.a.concat()},o.get=function(t,e){return ke(this.b,t)?this.b[t]:e},o.set=function(t,e){ke(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},o.forEach=function(t,e){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var De=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Ce(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof Ce){this.a=void 0!==e?e:t.a,Ue(this,t.f),this.j=t.j,Pe(this,t.c),Le(this,t.h),this.g=t.g,e=t.b;var n=new He;n.c=e.c,e.a&&(n.a=new Ae(e.a),n.b=e.b),Re(this,n),this.i=t.i}else t&&(n=String(t).match(De))?(this.a=!!e,Ue(this,n[1]||"",!0),this.j=Fe(n[2]||""),Pe(this,n[3]||"",!0),Le(this,n[4]),this.g=Fe(n[5]||"",!0),Re(this,n[6]||"",!0),this.i=Fe(n[7]||"")):(this.a=!!e,this.b=new He(null,this.a))}function Oe(t){return new Ce(t)}function Ue(t,e,n){t.f=n?Fe(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Pe(t,e,n){t.c=n?Fe(e,!0):e}function Le(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Re(t,e,n){e instanceof He?(t.b=e,function(t,e){e&&!t.f&&(Ke(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&($e(this,e),Xe(this,n,t))}),t)),t.f=e}(t.b,t.a)):(n||(e=Ve(e,We)),t.b=new He(e,t.a))}function Me(t,e,n){t.b.set(e,n)}function je(t){return Me(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^b()).toString(36)),t}function Fe(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Ve(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,qe),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function qe(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Ce.prototype.toString=function(){var t=[],e=this.f;e&&t.push(Ve(e,Be,!0),":");var n=this.c;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(Ve(e,Be,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&t.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&t.push("/"),t.push(Ve(n,"/"==n.charAt(0)?ze:Ge,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",Ve(n,Qe)),t.join("")};var Be=/[#\/\?@]/g,Ge=/[#\?:]/g,ze=/[#\?]/g,We=/[#\?@]/g,Qe=/#/g;function He(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Ke(t){t.a||(t.a=new Ae,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function $e(t,e){Ke(t),e=Je(t,e),ke(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,ke((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ne(t)))}function Ye(t,e){return Ke(t),e=Je(t,e),ke(t.a.b,e)}function Xe(t,e,n){$e(t,e),0<n.length&&(t.c=null,t.a.set(Je(t,e),x(n)),t.b+=n.length)}function Je(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function Ze(t,e){this.b=t,this.a=e}function tn(t){this.g=t||en,s.PerformanceNavigationTiming?t=0<(t=s.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(s.ia&&s.ia.ya&&s.ia.ya()&&s.ia.ya().qb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}(o=He.prototype).add=function(t,e){Ke(this),this.c=null,t=Je(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},o.forEach=function(t,e){Ke(this),this.a.forEach((function(n,r){I(n,(function(n){t.call(e,n,r,this)}),this)}),this)},o.L=function(){Ke(this);for(var t=this.a.K(),e=this.a.L(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},o.K=function(t){Ke(this);var e=[];if("string"===typeof t)Ye(this,t)&&(e=T(e,this.a.get(Je(this,t))));else{t=this.a.K();for(var n=0;n<t.length;n++)e=T(e,t[n])}return e},o.set=function(t,e){return Ke(this),this.c=null,Ye(this,t=Je(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},o.get=function(t,e){return t&&0<(t=this.K(t)).length?String(t[0]):e},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o<r.length;o++){var u=i;""!==r[o]&&(u+="="+encodeURIComponent(String(r[o]))),t.push(u)}}return this.c=t.join("&")};var en=10;function nn(t){return!!t.b||!!t.a&&t.a.size>=t.f}function rn(t){return t.b?1:t.a?t.a.size:0}function on(t,e){return t.b?t.b==e:!!t.a&&t.a.has(e)}function un(t,e){t.a?t.a.add(e):t.b=e}function an(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function sn(t){var e,n;if(null!=t.b)return t.c.concat(t.b.s);if(null!=t.a&&0!==t.a.size){var r=t.c;try{for(var o=i(t.a.values()),u=o.next();!u.done;u=o.next()){var a=u.value;r=r.concat(a.s)}}catch(s){e={error:s}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}return x(t.c)}function cn(){}function fn(){this.a=new cn}function hn(t,e,n){var r=n||"";try{Se(t,(function(t,n){var i=t;l(t)&&(i=St(t)),e.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function ln(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(o){}}tn.prototype.cancel=function(){var t,e;if(this.c=sn(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=i(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(o){t={error:o}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.a.clear()}},cn.prototype.stringify=function(t){return s.JSON.stringify(t,void 0)},cn.prototype.parse=function(t){return s.JSON.parse(t,void 0)};var dn=s.JSON.parse;function pn(t){Tt.call(this),this.headers=new Ae,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=vn,this.D=this.F=!1}w(pn,Tt);var vn="",gn=/^https?$/i,yn=["POST","PUT"];function mn(t){return"content-type"==t.toLowerCase()}function bn(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,wn(t),En(t)}function wn(t){t.u||(t.u=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function _n(t){if(t.b&&"undefined"!=typeof a&&(!t.s[1]||4!=Tn(t)||2!=t.X()))if(t.l&&4==Tn(t))Ft(t.za,0,t);else if(t.dispatchEvent("readystatechange"),4==Tn(t)){t.b=!1;try{var e,n=t.X();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(De)[1]||null;if(!o&&s.self&&s.self.location){var u=s.self.location.protocol;o=u.substr(0,u.length-1)}i=!gn.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{t.h=6;try{var c=2<Tn(t)?t.a.statusText:""}catch(f){c=""}t.f=c+" ["+t.X()+"]",wn(t)}}finally{En(t)}}}function En(t,e){if(t.a){In(t);var n=t.a,r=t.s[0]?c:null;t.a=null,t.s=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){}}}function In(t){t.a&&t.D&&(t.a.ontimeout=null),t.m&&(s.clearTimeout(t.m),t.m=null)}function Tn(t){return t.a?t.a.readyState:0}function xn(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=function(t){var e="";return U(t,(function(t,n){e+=n,e+=":",e+=t,e+="\r\n"})),e}(n),"string"===typeof t?null!=n&&encodeURIComponent(String(n)):Me(t,e,n))}function Sn(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function An(t){this.pa=0,this.g=[],this.c=new Qt,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.W=this.i=this.O=this.l=null,this.La=this.R=0,this.Ia=Sn("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.T=!0,this.I=this.oa=this.P=-1,this.U=this.o=this.u=0,this.Fa=Sn("baseRetryDelayMs",5e3,t),this.Ma=Sn("retryDelaySeedMs",1e4,t),this.Ja=Sn("forwardChannelMaxRetries",2,t),this.ma=Sn("forwardChannelRequestTimeoutMs",2e4,t),this.Ka=t&&t.g||void 0,this.D=void 0,this.C=t&&t.supportsCrossDomainXhr||!1,this.J="",this.b=new tn(t&&t.concurrentRequestLimit),this.ka=new fn,this.da=t&&t.fastHandshake||!1,this.Ga=t&&t.b||!1,t&&t.f&&(this.c.a=!1),t&&t.forceLongPolling&&(this.T=!1),this.V=!this.da&&this.T&&t&&t.c||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null}function Nn(t){if(Dn(t),3==t.v){var e=t.R++,n=Oe(t.B);Me(n,"SID",t.J),Me(n,"RID",e),Me(n,"TYPE","terminate"),Pn(t,n),(e=new le(t,t.c,e,void 0)).H=2,e.i=je(Oe(n)),n=!1,s.navigator&&s.navigator.sendBeacon&&(n=s.navigator.sendBeacon(e.i.toString(),"")),!n&&s.Image&&((new Image).src=e.i,n=!0),n||(e.a=Qn(e.g,null),e.a.ba(e.i)),e.u=b(),we(e)}zn(t)}function kn(t){t.a&&(jn(t),t.a.cancel(),t.a=null)}function Dn(t){kn(t),t.j&&(s.clearTimeout(t.j),t.j=null),Vn(t),t.b.cancel(),t.h&&("number"===typeof t.h&&s.clearTimeout(t.h),t.h=null)}function Cn(t,e){t.g.push(new Ze(t.La++,e)),3==t.v&&On(t)}function On(t){nn(t.b)||t.h||(t.h=!0,Ut(t.Ba,t),t.u=0)}function Un(t,e){var n;n=e?e.f:t.R++;var r=Oe(t.B);Me(r,"SID",t.J),Me(r,"RID",n),Me(r,"AID",t.P),Pn(t,r),t.i&&t.l&&xn(r,t.i,t.l),n=new le(t,t.c,n,t.u+1),null===t.i&&(n.B=t.l),e&&(t.g=e.s.concat(t.g)),e=Ln(t,n,1e3),n.setTimeout(Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),un(t.b,n),ge(n,r,e)}function Pn(t,e){t.f&&Se({},(function(t,n){Me(e,n,t)}))}function Ln(t,e,n){n=Math.min(t.g.length,n);var r=t.f?y(t.f.Ha,t.f,t):null;t:for(var i=t.g,o=-1;;){var u=["count="+n];-1==o?0<n?(o=i[0].b,u.push("ofs="+o)):o=0:u.push("ofs="+o);for(var a=!0,s=0;s<n;s++){var c=i[s].b,f=i[s].a;if(0>(c-=o))o=Math.max(0,i[s].b-100),a=!1;else try{hn(f,u,"req"+c+"_")}catch(h){r&&r(f)}}if(a){r=u.join("&");break t}}return t=t.g.splice(0,n),e.s=t,r}function Rn(t){t.a||t.j||(t.U=1,Ut(t.Aa,t),t.o=0)}function Mn(t){return!(t.a||t.j||3<=t.o)&&(t.U++,t.j=ee(y(t.Aa,t),Bn(t,t.o)),t.o++,!0)}function jn(t){null!=t.s&&(s.clearTimeout(t.s),t.s=null)}function Fn(t){t.a=new le(t,t.c,"rpc",t.U),null===t.i&&(t.a.B=t.l),t.a.O=0;var e=Oe(t.la);Me(e,"RID","rpc"),Me(e,"SID",t.J),Me(e,"CI",t.H?"0":"1"),Me(e,"AID",t.P),Pn(t,e),Me(e,"TYPE","xmlhttp"),t.i&&t.l&&xn(e,t.i,t.l),t.D&&t.a.setTimeout(t.D);var n=t.a;t=t.ga,n.H=1,n.i=je(Oe(e)),n.j=null,n.I=!0,ye(n,t)}function Vn(t){null!=t.m&&(s.clearTimeout(t.m),t.m=null)}function qn(t,e){var n=null;if(t.a==e){Vn(t),jn(t),t.a=null;var r=2}else{if(!on(t.b,e))return;n=e.s,an(t.b,e),r=1}if(t.I=e.N,0!=t.v)if(e.b)if(1==r){n=e.j?e.j.length:0,e=b()-e.u;var i=t.u;(r=$t()).dispatchEvent(new te(r,n,e,i)),On(t)}else Rn(t);else if(3==(i=e.h)||0==i&&0<t.I||!(1==r&&function(t,e){return!(rn(t.b)>=t.b.f-(t.h?1:0))&&(t.h?(t.g=e.s.concat(t.g),!0):!(1==t.v||2==t.v||t.u>=(t.Ia?0:t.Ja))&&(t.h=ee(y(t.Ba,t,e),Bn(t,t.u)),t.u++,!0))}(t,e)||2==r&&Mn(t)))switch(n&&0<n.length&&(e=t.b,e.c=e.c.concat(n)),i){case 1:Gn(t,5);break;case 4:Gn(t,10);break;case 3:Gn(t,6);break;default:Gn(t,2)}}function Bn(t,e){var n=t.Fa+Math.floor(Math.random()*t.Ma);return t.f||(n*=2),n*e}function Gn(t,e){if(t.c.info("Error code "+e),2==e){var n=null;t.f&&(n=null);var r=y(t.Xa,t);n||(n=new Ce("//www.google.com/images/cleardot.gif"),s.location&&"http"==s.location.protocol||Ue(n,"https"),je(n)),function(t,e){var n=new Qt;if(s.Image){var r=new Image;r.onload=m(ln,n,r,"TestLoadImage: loaded",!0,e),r.onerror=m(ln,n,r,"TestLoadImage: error",!1,e),r.onabort=m(ln,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=m(ln,n,r,"TestLoadImage: timeout",!1,e),s.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=t}else e(!1)}(n.toString(),r)}else Zt(2);t.v=0,t.f&&t.f.ra(e),zn(t),Dn(t)}function zn(t){t.v=0,t.I=-1,t.f&&(0==sn(t.b).length&&0==t.g.length||(t.b.c.length=0,x(t.g),t.g.length=0),t.f.qa())}function Wn(t,e,n){var r=function(t){return t instanceof Ce?Oe(t):new Ce(t,void 0)}(n);if(""!=r.c)e&&Pe(r,e+"."+r.c),Le(r,r.h);else{var i=s.location;r=function(t,e,n,r){var i=new Ce(null,void 0);return t&&Ue(i,t),e&&Pe(i,e),n&&Le(i,n),r&&(i.g=r),i}(i.protocol,e?e+"."+i.hostname:i.hostname,+i.port,n)}return t.W&&U(t.W,(function(t,e){Me(r,e,t)})),e=t.A,n=t.na,e&&n&&Me(r,e,n),Me(r,"VER",t.ha),Pn(t,r),r}function Qn(t,e){if(e&&!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new pn(t.Ka)).F=t.C,e}function Hn(){}function Kn(){if(V&&!(10<=Number(Z)))throw Error("Environmental error: no available transport.")}function $n(t,e){Tt.call(this),this.a=new An(e),this.l=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.a&&(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&&e.httpHeadersOverwriteParam)&&!S(t)&&(this.a.i=t),this.h=e&&e.supportsCrossDomainXhr||!1,this.g=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!S(e)&&(this.a.A=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new Jn(this)}function Yn(t){ce.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function Xn(){fe.call(this),this.status=1}function Jn(t){this.a=t}(o=pn.prototype).ba=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?oe(this.H):oe(ae),this.a.onreadystatechange=y(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(o){return void bn(this,o)}t=n||"";var i=new Ae(this.headers);r&&Se(r,(function(t,e){i.set(e,t)})),r=function(t){t:{for(var e=mn,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(i.L()),n=s.FormData&&t instanceof s.FormData,!(0<=E(yn,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(t,e){this.a.setRequestHeader(e,t)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{In(this),0<this.o&&((this.D=function(t){return V&&X(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=y(this.xa,this)):this.m=Ft(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(o){bn(this,o)}},o.xa=function(){"undefined"!=typeof a&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},o.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),En(this))},o.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),En(this,!0)),pn.S.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?_n(this):this.Ta())},o.Ta=function(){_n(this)},o.X=function(){try{return 2<Tn(this)?this.a.status:-1}catch(t){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},o.Na=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),dn(e)}},o.ua=function(){return this.h},o.Qa=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=An.prototype).ha=8,o.v=1,o.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,n=new le(this,this.c,t,void 0),r=this.l;if(this.O&&(r?R(r=P(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)t:{for(var i=e=0;i<this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&&"string"===typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(e+=o)){e=i;break t}if(4096===e||i===this.g.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Ln(this,n,e),Me(i=Oe(this.B),"RID",t),Me(i,"CVER",22),this.A&&Me(i,"X-HTTP-Session-Id",this.A),Pn(this,i),this.i&&r&&xn(i,this.i,r),un(this.b,n),this.Ga&&Me(i,"TYPE","init"),this.da?(Me(i,"$req",e),Me(i,"SID","null"),n.V=!0,ge(n,i,null)):ge(n,i,e),this.v=2}}else 3==this.v&&(t?Un(this,t):0==this.g.length||nn(this.b)||Un(this))},o.Aa=function(){if(this.j=null,Fn(this),this.V&&!(this.F||null==this.a||0>=this.N)){var t=2*this.N;this.c.info("BP detection timer enabled: "+t),this.s=ee(y(this.Sa,this),t)}},o.Sa=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,kn(this),Fn(this))},o.Ra=function(){null!=this.m&&(this.m=null,kn(this),Mn(this),Zt(19))},o.Xa=function(t){t?(this.c.info("Successfully pinged google.com"),Zt(2)):(this.c.info("Failed to ping google.com"),Zt(1))},(o=Hn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ha=function(){},Kn.prototype.a=function(t,e){return new $n(t,e)},w($n,Tt),(o=$n.prototype).addEventListener=function(t,e,n,r){$n.S.addEventListener.call(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){$n.S.removeEventListener.call(this,t,e,n,r)},o.Oa=function(){this.a.f=this.f,this.h&&(this.a.C=!0);var t=this.a,e=this.l,n=this.b||void 0;Zt(0),t.fa=e,t.W=n||{},t.H=t.T,t.B=Wn(t,null,t.fa),On(t)},o.close=function(){Nn(this.a)},o.Pa=function(t){if("string"===typeof t){var e={};e.__data__=t,Cn(this.a,e)}else this.g?((e={}).__data__=St(t),Cn(this.a,e)):Cn(this.a,t)},o.G=function(){this.a.f=null,delete this.f,Nn(this.a),delete this.a,$n.S.G.call(this)},w(Yn,ce),w(Xn,fe),w(Jn,Hn),Jn.prototype.ta=function(){this.a.dispatchEvent("a")},Jn.prototype.sa=function(t){this.a.dispatchEvent(new Yn(t))},Jn.prototype.ra=function(t){this.a.dispatchEvent(new Xn(t))},Jn.prototype.qa=function(){this.a.dispatchEvent("b")},Kn.prototype.createWebChannel=Kn.prototype.a,$n.prototype.send=$n.prototype.Pa,$n.prototype.open=$n.prototype.Oa,$n.prototype.close=$n.prototype.close,ne.NO_ERROR=0,ne.TIMEOUT=8,ne.HTTP_ERROR=6,re.COMPLETE="complete",ue.EventType=se,se.OPEN="a",se.CLOSE="b",se.ERROR="c",se.MESSAGE="d",Tt.prototype.listen=Tt.prototype.va,pn.prototype.listenOnce=pn.prototype.wa,pn.prototype.getLastError=pn.prototype.Qa,pn.prototype.getLastErrorCode=pn.prototype.ua,pn.prototype.getStatus=pn.prototype.X,pn.prototype.getResponseJson=pn.prototype.Na,pn.prototype.getResponseText=pn.prototype.$,pn.prototype.send=pn.prototype.ba;var Zn={createWebChannelTransport:function(){return new Kn},ErrorCode:ne,EventType:re,WebChannel:ue,XhrIo:pn},tr=Zn.createWebChannelTransport,er=Zn.ErrorCode,nr=Zn.EventType,rr=Zn.WebChannel,ir=Zn.XhrIo;e.default=Zn}
2.call(this,n(55))},967:function(t,e,n){"use strict";var r=n(734);n(624)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},968:function(t,e,n){t.exports=n(694)("native-function-to-string",Function.toString)},969:function(t,e,n){var r=n(692),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},970:function(t,e,n){var r=n(641),i=n(971).set;t.exports=function(t,e,n){var o,u=e.constructor;return u!==n&&"function"==typeof u&&(o=u.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},971:function(t,e,n){var r=n(641),i=n(626),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(697)(Function.call,n(737).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},972:function(t,e,n){"use strict";var r=n(627),i=n(632),o=n(628),u=n(621)("species");t.exports=function(t){var e=r[t];o&&e&&!e[u]&&i.f(e,u,{configurable:!0,get:function(){return this}})}},973:function(t,e,n){var r=n(626),i=n(698),o=n(621)("species");t.exports=function(t,e){var n,u=r(t).constructor;return void 0===u||void 0==(n=r(u)[o])?e:i(n)}},974:function(t,e,n){(function(t,r){var i;!function(o){e&&e.nodeType,t&&t.nodeType;var u="object"==typeof r&&r;u.global!==u&&u.window!==u&&u.self;var a,s=2147483647,c=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function v(t){throw new RangeError(l[t])}function g(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function y(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+g((t=t.replace(h,".")).split("."),e).join(".")}function m(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function b(t){return g(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=36)t=d(t/35);return d(r+36*t/(t+38))}function E(t){var e,n,r,i,o,u,a,c,f,h,l,p=[],g=t.length,y=0,m=128,w=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&v("not-basic"),p.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=y,u=1,a=36;i>=g&&v("invalid-input"),((c=(l=t.charCodeAt(i++))-48<10?l-22:l-65<26?l-65:l-97<26?l-97:36)>=36||c>d((s-y)/u))&&v("overflow"),y+=c*u,!(c<(f=a<=w?1:a>=w+26?26:a-w));a+=36)u>d(s/(h=36-f))&&v("overflow"),u*=h;w=_(y-o,e=p.length+1,0==o),d(y/e)>s-m&&v("overflow"),m+=d(y/e),y%=e,p.splice(y++,0,m)}return b(p)}function I(t){var e,n,r,i,o,u,a,c,f,h,l,g,y,b,E,I=[];for(g=(t=m(t)).length,e=128,n=0,o=72,u=0;u<g;++u)(l=t[u])<128&&I.push(p(l));for(r=i=I.length,i&&I.push("-");r<g;){for(a=s,u=0;u<g;++u)(l=t[u])>=e&&l<a&&(a=l);for(a-e>d((s-n)/(y=r+1))&&v("overflow"),n+=(a-e)*y,e=a,u=0;u<g;++u)if((l=t[u])<e&&++n>s&&v("overflow"),l==e){for(c=n,f=36;!(c<(h=f<=o?1:f>=o+26?26:f-o));f+=36)E=c-h,b=36-h,I.push(p(w(h+E%b,0))),c=d(E/b);I.push(p(w(c,0))),o=_(n,y,r==i),n=0,++r}++n,++e}return I.join("")}a={version:"1.4.1",ucs2:{decode:m,encode:b},decode:E,encode:I,toASCII:function(t){return y(t,(function(t){return f.test(t)?"xn--"+I(t):t}))},toUnicode:function(t){return y(t,(function(t){return c.test(t)?E(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return a}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(165)(t),n(55))},975:function(t,e,n){"use strict";n(976);var r=n(626),i=n(696),o=n(628),u=/./.toString,a=function(t){n(642)(RegExp.prototype,"toString",t,!0)};n(633)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?a((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&a((function(){return u.call(this)}))},976:function(t,e,n){n(628)&&"g"!=/./g.flags&&n(632).f(RegExp.prototype,"flags",{configurable:!0,get:n(696)})},977:function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(642)(r,"toString",(function(){var t=o.call(this);return t===t?i.call(this):"Invalid Date"}))},978:function(t,e,n){var r=n(624);r(r.S,"Array",{isArray:n(742)})},979:function(t,e,n){"use strict";var r=n(624),i=n(980);r(r.P+r.F*!n(671)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},980:function(t,e,n){var r=n(698),i=n(647),o=n(736),u=n(651);t.exports=function(t,e,n,a,s){r(e);var c=i(t),f=o(c),h=u(c.length),l=s?h-1:0,d=s?-1:1;if(n<2)for(;;){if(l in f){a=f[l],l+=d;break}
2if(l+=d,s?l<0:h<=l)throw TypeError("Reduce of empty array with no initial value")}for(;s?l>=0:h>l;l+=d)l in f&&(a=e(a,f[l],l,c));return a}},981:function(t,e,n){var r=n(621)("unscopables"),i=Array.prototype;void 0==i[r]&&n(648)(i,r,{}),t.exports=function(t){i[r][t]=!0}},982:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},983:function(t,e,n){"use strict";var r=n(808),i=n(670),o=n(744),u={};n(648)(u,n(621)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(u,{next:i(1,n)}),o(t,e+" Iterator")}},984:function(t,e,n){var r=n(627).document;t.exports=r&&r.documentElement},985:function(t,e,n){var r=n(652),i=n(647),o=n(739)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},986:function(t,e,n){var r=n(624),i=n(660),o=n(633);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],u={};u[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",u)}},987:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeName=void 0,e.parse=function(t,e){var n=e&&e.assetType?e.assetType:"svg",r=e&&e.buildUrl?e.buildUrl:function(t,e){return"png"===e?"https://twemoji.maxcdn.com/2/72x72/"+t+".png":"https://twemoji.maxcdn.com/2/svg/"+t+".svg"},i=[];o.default.lastIndex=0;for(;;){var a=o.default.exec(t);if(!a)break;var s=a[0],h=f(c(s)).join("-");i.push({url:h?r(h,n):"",indices:[a.index,o.default.lastIndex],text:s,type:u})}return i},e.toCodePoints=f;var r,i=n(988),o=(r=i)&&r.__esModule?r:{default:r};var u=e.TypeName="emoji";var a=/\uFE0F/g,s=String.fromCharCode(8205),c=function(t){return t.indexOf(s)<0?t.replace(a,""):t};function f(t){for(var e=[],n=0,r=0,i=0;i<t.length;)n=t.charCodeAt(i++),r?(e.push((65536+(r-55296<<10)+(n-56320)).toString(16)),r=0):n>55296&&n<=56319?r=n:e.push(n.toString(16));return e}},988:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=/(?:\ud83d[\udc68\udc69])(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddb0-\uddb3])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f)|[#*0-9]\ufe0f?\u20e3|(?:[\xa9\xae\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u23
21a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddb5\uddb6\uddb8\uddb9\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\udeeb\udeec\udef4-\udef9]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd40-\udd45\udd47-\udd70\udd73-\udd76\udd7a\udd7c-\udda2\uddb4\uddb7\uddc0-\uddc2\uddd0\uddde
2-\uddff]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g},989:function(t,e,n){var r=n(624);r(r.S+r.F*!n(628),"Object",{defineProperty:n(632).f})},990:function(t,e,n){var r=n(624);r(r.S+r.F*!n(628),"Object",{defineProperties:n(809)})},991:function(t,e,n){var r=n(624),i=n(992),o=n(653),u=n(737),a=n(811);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),s=u.f,c=i(r),f={},h=0;c.length>h;)void 0!==(n=s(r,e=c[h++]))&&a(f,e,n);return f}})},992:function(t,e,n){var r=n(700),i=n(745),o=n(626),u=n(627).Reflect;t.exports=u&&u.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},993:function(t,e,n){"use strict";var r=n(624),i=n(812)(0),o=n(671)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},994:function(t,e,n){var r=n(995);t.exports=function(t,e){return new(r(t))(e)}},995:function(t,e,n){var r=n(641),i=n(742),o=n(621)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},996:function(t,e,n){"use strict";var r=n(624),i=n(812)(2);r(r.P+r.F*!n(671)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},997:function(t,e,n){"use strict";var r=n(627),i=n(652),o=n(628),u=n(624),a=n(642),s=n(998).KEY,c=n(633),f=n(694),h=n(744),l=n(669),d=n(621),p=n(813),v=n(999),g=n(1e3),y=n(742),m=n(626),b=n(641),w=n(647),_=n(653),E=n(735),I=n(670),T=n(808),x=n(1001),S=n(737),A=n(745),N=n(632),k=n(673),D=S.f,C=N.f,O=x.f,U=r.Symbol,P=r.JSON,L=P&&P.stringify,R=d("_hidden"),M=d("toPrimitive"),j={}.propertyIsEnumerable,F=f("symbol-registry"),V=f("symbols"),q=f("op-symbol
2s"),B=Object.prototype,G="function"==typeof U&&!!A.f,z=r.QObject,W=!z||!z.prototype||!z.prototype.findChild,Q=o&&c((function(){return 7!=T(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=D(B,e);r&&delete B[e],C(t,e,n),r&&t!==B&&C(B,e,r)}:C,H=function(t){var e=V[t]=T(U.prototype);return e._k=t,e},K=G&&"symbol"==typeof U.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof U},$=function(t,e,n){return t===B&&$(q,e,n),m(t),e=E(e,!0),m(n),i(V,e)?(n.enumerable?(i(t,R)&&t[R][e]&&(t[R][e]=!1),n=T(n,{enumerable:I(0,!1)})):(i(t,R)||C(t,R,I(1,{})),t[R][e]=!0),Q(t,e,n)):C(t,e,n)},Y=function(t,e){m(t);for(var n,r=g(e=_(e)),i=0,o=r.length;o>i;)$(t,n=r[i++],e[n]);return t},X=function(t){var e=j.call(this,t=E(t,!0));return!(this===B&&i(V,t)&&!i(q,t))&&(!(e||!i(this,t)||!i(V,t)||i(this,R)&&this[R][t])||e)},J=function(t,e){if(t=_(t),e=E(e,!0),t!==B||!i(V,e)||i(q,e)){var n=D(t,e);return!n||!i(V,e)||i(t,R)&&t[R][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=O(_(t)),r=[],o=0;n.length>o;)i(V,e=n[o++])||e==R||e==s||r.push(e);return r},tt=function(t){for(var e,n=t===B,r=O(n?q:_(t)),o=[],u=0;r.length>u;)!i(V,e=r[u++])||n&&!i(B,e)||o.push(V[e]);return o};G||(a((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function e(n){this===B&&e.call(q,n),i(this,R)&&i(this[R],t)&&(this[R][t]=!1),Q(this,t,I(1,n))};return o&&W&&Q(B,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",(function(){return this._k})),S.f=J,N.f=$,n(700).f=x.f=Z,n(738).f=X,A.f=tt,o&&!n(695)&&a(B,"propertyIsEnumerable",X,!0),p.f=function(t){return H(d(t))}),u(u.G+u.W+u.F*!G,{Symbol:U});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=k(d.store),it=0;rt.length>it;)v(rt[it++]);u(u.S+u.F*!G,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=U(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),u(u.S+u.F*!G,"Object",{create:function(t,e){return void 0===e?T(t):Y(T(t),e)},defineProperty:$,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var ot=c((function(){A.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return A.f(w(t))}}),P&&u(u.S+u.F*(!G||c((function(){var t=U();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,L.apply(P,r)}}),U.prototype[M]||n(648)(U.prototype,M,U.prototype.valueOf),h(U,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},998:function(t,e,n){var r=n(669)("meta"),i=n(641),o=n(652),u=n(632).f,a=0,s=Object.isExtensible||function(){return!0},c=!n(633)((function(){return s(Object.preventExtensions({}))})),f=function(t){u(t,r,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!s(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!s(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return c&&h.NEED&&s(t)&&!o(t,r)&&f(t),t}}},999:function(t,e,n){var r=n(627),i=n(660),o=n(695),u=n(813),a=n(632).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:u.f(t)})}}}]); 3//# sourceMappingURL=1.e73cd9ec.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.