(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{48711:function(e,t,r){"use strict";r.d(t,{Z:function(){return $}});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,s=Object.assign;function a(e,t,r){return e.replace(t,r)}function l(e,t){return e.indexOf(t)}function c(e,t){return 0|e.charCodeAt(t)}function u(e,t,r){return e.slice(t,r)}function h(e){return e.length}function d(e,t){return t.push(e),e}var f=1,p=1,m=0,g=0,y=0,v="";function b(e,t,r,n,i,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:f,column:p,length:s,return:""}}function w(e,t){return s(b("",null,null,"",null,null,0),e,{length:-e.length},t)}function _(){return y=g<m?c(v,g++):0,p++,10===y&&(p=1,f++),y}function x(){return c(v,g)}function k(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function S(e){return f=p=1,m=h(v=e),g=0,[]}function E(e){var t,r;return(t=g-1,r=function e(t){for(;_();)switch(y){case t:return g;case 34:case 39:34!==t&&39!==t&&e(y);break;case 40:41===t&&e(t);break;case 92:_()}return g}(91===e?e+2:40===e?e+1:e),u(v,t,r)).trim()}var T="-ms-",C="-moz-",I="-webkit-",P="comm",A="rule",O="decl",R="@keyframes";function N(e,t){for(var r="",n=e.length,i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function j(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case O:return e.return=e.return||e.value;case P:return"";case R:return e.return=e.value+"{"+N(e.children,n)+"}";case A:e.value=e.props.join(",")}return h(r=N(e.children,n))?e.return=e.value+"{"+r+"}":""}function D(e,t,r,n,o,s,l,c,h,d,f){for(var p=o-1,m=0===o?s:[""],g=m.length,y=0,v=0,w=0;y<n;++y)for(var _=0,x=u(e,p+1,p=i(v=l[y])),k=e;_<g;++_)(k=(v>0?m[_]+" "+x:a(x,/&\f/g,m[_])).trim())&&(h[w++]=k);return b(e,t,r,0===o?A:c,h,d,f)}function M(e,t,r,n){return b(e,t,r,O,u(e,0,n),u(e,n+1,-1),n)}var L=function(e,t,r){for(var n=0,i=0;n=i,i=x(),38===n&&12===i&&(t[r]=1),!k(i);)_();return u(v,e,g)},F=function(e,t){var r=-1,n=44;do switch(k(n)){case 0:38===n&&12===x()&&(t[r]=1),e[r]+=L(g-1,t,r);break;case 2:e[r]+=E(n);break;case 4:if(44===n){e[++r]=58===x()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=o(n)}while(n=_());return e},z=function(e,t){var r;return r=F(S(e),t),v="",r},U=new WeakMap,B=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||U.get(r))&&!n){U.set(e,!0);for(var i=[],o=z(t,i),s=r.props,a=0,l=0;a<o.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[c]):s[c]+" "+o[a]}}},V=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},q=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case O:e.return=function e(t,r){switch(45^c(t,0)?(((r<<2^c(t,0))<<2^c(t,1))<<2^c(t,2))<<2^c(t,3):0){case 5103:return I+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return I+t+C+t+T+t+t;case 6828:case 4268:return I+t+T+t+t;case 6165:return I+t+T+"flex-"+t+t;case 5187:return I+t+a(t,/(\w+).+(:[^]+)/,I+"box-$1$2"+T+"flex-$1$2")+t;case 5443:return I+t+T+"flex-item-"+a(t,/flex-|-self/,"")+t;case 4675:return I+t+T+"flex-line-pack"+a(t,/align-content|flex-|-self/,"")+t;case 5548:return I+t+T+a(t,"shrink","negative")+t;case 5292:return I+t+T+a(t,"basis","preferred-size")+t;case 6060:return I+"box-"+a(t,"-grow","")+I+t+T+a(t,"grow","positive")+t;case 4554:return I+a(t,/([^-])(transform)/g,"$1"+I+"$2")+t;case 6187:return a(a(a(t,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),t,"")+t;case 5495:case 3959:return a(t,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return a(a(t,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+T+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+t+t;case 4095:case 3583:case 4068:case 2532:return a(t,/(.+)-inline(.+)/,I+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(t)-1-r>6)switch(c(t,r+1)){case 109:if(45!==c(t,r+4))break;case 102:return a(t,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+C+(108==c(t,r+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?e(a(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==c(t,r+1))break;case 6444:switch(c(t,h(t)-3-(~l(t,"!important")&&10))){case 107:return a(t,":",":"+I)+t;case 101:return a(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(45===c(t,14)?"inline-":"")+"box$3$1"+I+"$2$3$1"+T+"$2box$3")+t}break;case 5936:switch(c(t,r+11)){case 114:return I+t+T+a(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return I+t+T+a(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return I+t+T+a(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return I+t+T+t+t}return t}(e.value,e.length);break;case R:return N([w(e,{value:a(e.value,"@","@"+I)})],n);case A:if(e.length){var i,o;return i=e.props,o=function(t){var r;switch(r=t,(r=/(::plac\w+|:read-\w+)/.exec(r))?r[0]:r){case":read-only":case":read-write":return N([w(e,{props:[a(t,/:(read-\w+)/,":"+C+"$1")]})],n);case"::placeholder":return N([w(e,{props:[a(t,/:(plac\w+)/,":"+I+"input-$1")]}),w(e,{props:[a(t,/:(plac\w+)/,":"+C+"$1")]}),w(e,{props:[a(t,/:(plac\w+)/,T+"input-$1")]})],n)}return""},i.map(o).join("")}}}],$=function(e){var t,r,i,s,m,w,T=e.key;if("css"===T){var C=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(C,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var I=e.stylisPlugins||q,A={},O=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+T+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)A[t[r]]=!0;O.push(e)});var R=(r=(t=[B,V].concat(I,[j,(i=function(e){w.insert(e)},function(e){!e.root&&(e=e.return)&&i(e)})])).length,function(e,n,i,o){for(var s="",a=0;a<r;a++)s+=t[a](e,n,i,o)||"";return s}),L=function(e){var t,r;return N((r=function e(t,r,n,i,s,m,w,S,T){for(var C,I=0,A=0,O=w,R=0,N=0,j=0,L=1,F=1,z=1,U=0,B="",V=s,q=m,$=i,W=B;F;)switch(j=U,U=_()){case 40:if(108!=j&&58==c(W,O-1)){-1!=l(W+=a(E(U),"&","&\f"),"&\f")&&(z=-1);break}case 34:case 39:case 91:W+=E(U);break;case 9:case 10:case 13:case 32:W+=function(e){for(;y=x();)if(y<33)_();else break;return k(e)>2||k(y)>3?"":" "}(j);break;case 92:W+=function(e,t){for(var r;--t&&_()&&!(y<48)&&!(y>102)&&(!(y>57)||!(y<65))&&(!(y>70)||!(y<97)););return r=g+(t<6&&32==x()&&32==_()),u(v,e,r)}(g-1,7);continue;case 47:switch(x()){case 42:case 47:d(b(C=function(e,t){for(;_();)if(e+y===57)break;else if(e+y===84&&47===x())break;return"/*"+u(v,t,g-1)+"*"+o(47===e?e:_())}(_(),g),r,n,P,o(y),u(C,2,-2),0),T);break;default:W+="/"}break;case 123*L:S[I++]=h(W)*z;case 125*L:case 59:case 0:switch(U){case 0:case 125:F=0;case 59+A:-1==z&&(W=a(W,/\f/g,"")),N>0&&h(W)-O&&d(N>32?M(W+";",i,n,O-1):M(a(W," ","")+";",i,n,O-2),T);break;case 59:W+=";";default:if(d($=D(W,r,n,I,A,s,S,B,V=[],q=[],O),m),123===U){if(0===A)e(W,r,$,$,V,m,O,S,q);else switch(99===R&&110===c(W,3)?100:R){case 100:case 108:case 109:case 115:e(t,$,$,i&&d(D(t,$,$,0,0,s,S,B,s,V=[],O),q),s,q,O,S,i?V:q);break;default:e(W,$,$,$,[""],q,0,S,q)}}}I=A=N=0,L=z=1,B=W="",O=w;break;case 58:O=1+h(W),N=j;default:if(L<1){if(123==U)--L;else if(125==U&&0==L++&&125==(y=g>0?c(v,--g):0,p--,10===y&&(p=1,f--),y))continue}switch(W+=o(U),U*L){case 38:z=A>0?1:(W+="\f",-1);break;case 44:S[I++]=(h(W)-1)*z,z=1;break;case 64:45===x()&&(W+=E(_())),R=x(),A=O=h(B=W+=function(e){for(;!k(x());)_();return u(v,e,g)}(g)),U++;break;case 45:45===j&&2==h(W)&&(L=0)}}return m}("",null,null,null,[""],t=S(t=e),0,[0],t),v="",r),R)};m=function(e,t,r,n){w=r,L(e?e+"{"+t.styles+"}":t.styles),n&&(F.inserted[t.name]=!0)};var F={key:T,sheet:new n({key:T,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:A,registered:{},insert:m};return F.sheet.hydrate(O),F}},45042:function(e,t,r){"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{Z:function(){return n}})},2623:function(e,t,r){"use strict";r.d(t,{E:function(){return b},T:function(){return d},a:function(){return p},c:function(){return y},h:function(){return m},w:function(){return h}});var n=r(67294),i=r(48711),o=r(87462),s=function(e){var t=new WeakMap;return function(r){if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}},a=r(70444),l=r(85662),c=r(27278),u=n.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null);u.Provider;var h=function(e){return(0,n.forwardRef)(function(t,r){return e(t,(0,n.useContext)(u),r)})},d=n.createContext({}),f=s(function(e){return s(function(t){return"function"==typeof t?t(e):(0,o.Z)({},e,t)})}),p=function(e){var t=n.useContext(d);return e.theme!==t&&(t=f(t)(e.theme)),n.createElement(d.Provider,{value:t},e.children)},m={}.hasOwnProperty,g="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",y=function(e,t){var r={};for(var n in t)m.call(t,n)&&(r[n]=t[n]);return r[g]=e,r},v=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,a.hC)(t,r,n),(0,c.L)(function(){return(0,a.My)(t,r,n)}),null},b=h(function(e,t,r){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var o=e[g],s=[i],c="";"string"==typeof e.className?c=(0,a.fp)(t.registered,s,e.className):null!=e.className&&(c=e.className+" ");var u=(0,l.O)(s,void 0,n.useContext(d));c+=t.key+"-"+u.name;var h={};for(var f in e)m.call(e,f)&&"css"!==f&&f!==g&&(h[f]=e[f]);return h.className=c,r&&(h.ref=r),n.createElement(n.Fragment,null,n.createElement(v,{cache:t,serialized:u,isStringTag:"string"==typeof o}),n.createElement(o,h))})},70917:function(e,t,r){"use strict";r.d(t,{F4:function(){return h},iv:function(){return u},tZ:function(){return l},xB:function(){return c}});var n=r(2623),i=r(67294),o=r(70444),s=r(27278),a=r(85662);r(48711),r(8679);var l=function(e,t){var r=arguments;if(null==t||!n.h.call(t,"css"))return i.createElement.apply(void 0,r);var o=r.length,s=Array(o);s[0]=n.E,s[1]=(0,n.c)(e,t);for(var a=2;a<o;a++)s[a]=r[a];return i.createElement.apply(null,s)},c=(0,n.w)(function(e,t){var r=e.styles,l=(0,a.O)([r],void 0,i.useContext(n.T)),c=i.useRef();return(0,s.j)(function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==i&&(n=!0,i.setAttribute("data-emotion",e),r.hydrate([i])),c.current=[r,n],function(){r.flush()}},[t]),(0,s.j)(function(){var e=c.current,r=e[0];if(e[1]){e[1]=!1;return}if(void 0!==l.next&&(0,o.My)(t,l.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",l,r,!1)},[t,l.name]),null});function u(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.O)(t)}var h=function(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},85662:function(e,t,r){"use strict";r.d(t,{O:function(){return p}});var n,i={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r(45042),s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},u=(0,o.Z)(function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()}),h=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,function(e,t,r){return n={name:t,styles:r,next:n},t})}return 1===i[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return n={name:r.name,styles:r.styles,next:n},r.name;if(void 0!==r.styles){var i=r.next;if(void 0!==i)for(;void 0!==i;)n={name:i.name,styles:i.styles,next:n},i=i.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=d(e,t,r[i])+";";else for(var o in r){var s=r[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?n+=o+"{"+t[s]+"}":c(s)&&(n+=u(o)+":"+h(o,s)+";");else if(Array.isArray(s)&&"string"==typeof s[0]&&(null==t||void 0===t[s[0]]))for(var a=0;a<s.length;a++)c(s[a])&&(n+=u(o)+":"+h(o,s[a])+";");else{var l=d(e,t,s);switch(o){case"animation":case"animationName":n+=u(o)+":"+l+";";break;default:n+=o+"{"+l+"}"}}}return n}(e,t,r);case"function":if(void 0!==e){var o=n,s=r(e);return n=o,d(e,t,s)}}if(null==t)return r;var a=t[r];return void 0!==a?a:r}var f=/label:\s*([^\s;{]+)\s*(;|$)/g;function p(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i,o=!0,s="";n=void 0;var a=e[0];null==a||void 0===a.raw?(o=!1,s+=d(r,t,a)):s+=a[0];for(var l=1;l<e.length;l++)s+=d(r,t,e[l]),o&&(s+=a[l]);f.lastIndex=0;for(var c="";null!==(i=f.exec(s));)c+="-"+i[1];return{name:function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&r)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*1540483477+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)}(s)+c,styles:s,next:n}}},16829:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(87462),i=r(67294),o=r(45042),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,a=(0,o.Z)(function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),l=r(2623),c=r(70444),u=r(85662),h=r(27278),d=function(e){return"theme"!==e},f=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?a:d},p=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},m=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,c.hC)(t,r,n),(0,h.L)(function(){return(0,c.My)(t,r,n)}),null},g=(function e(t,r){var o,s,a=t.__emotion_real===t,h=a&&t.__emotion_base||t;void 0!==r&&(o=r.label,s=r.target);var d=p(t,r,a),g=d||f(h),y=!g("as");return function(){var v=arguments,b=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{b.push(v[0][0]);for(var w=v.length,_=1;_<w;_++)b.push(v[_],v[0][_])}var x=(0,l.w)(function(e,t,r){var n=y&&e.as||h,o="",a=[],p=e;if(null==e.theme){for(var v in p={},e)p[v]=e[v];p.theme=i.useContext(l.T)}"string"==typeof e.className?o=(0,c.fp)(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var w=(0,u.O)(b.concat(a),t.registered,p);o+=t.key+"-"+w.name,void 0!==s&&(o+=" "+s);var _=y&&void 0===d?f(n):g,x={};for(var k in e)(!y||"as"!==k)&&_(k)&&(x[k]=e[k]);return x.className=o,r&&(x.ref=r),i.createElement(i.Fragment,null,i.createElement(m,{cache:t,serialized:w,isStringTag:"string"==typeof n}),i.createElement(n,x))});return x.displayName=void 0!==o?o:"Styled("+("string"==typeof h?h:h.displayName||h.name||"Component")+")",x.defaultProps=t.defaultProps,x.__emotion_real=x,x.__emotion_base=h,x.__emotion_styles=b,x.__emotion_forwardProp=d,Object.defineProperty(x,"toString",{value:function(){return"."+s}}),x.withComponent=function(t,i){return e(t,(0,n.Z)({},r,i,{shouldForwardProp:p(x,i,!0)})).apply(void 0,b)},x}}).bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){g[e]=g(e)})},27278:function(e,t,r){"use strict";r.d(t,{L:function(){return s},j:function(){return a}});var n,i=r(67294),o=!!(n||(n=r.t(i,2))).useInsertionEffect&&(n||(n=r.t(i,2))).useInsertionEffect,s=o||function(e){return e()},a=o||i.useLayoutEffect},70444:function(e,t,r){"use strict";function n(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}r.d(t,{My:function(){return o},fp:function(){return n},hC:function(){return i}});var i=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},o=function(e,t,r){i(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(void 0!==o)}}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),s=o[0],a=o[1],c=new i((s+a)*3/4-a),u=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(e,t,n){for(var i,o=[],s=t;s<n;s+=3)o.push(r[(i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:function(e,t,r){"use strict";var n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=s(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(P(e,Uint8Array)){var t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(P(e,ArrayBuffer)||e&&P(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(P(e,SharedArrayBuffer)||e&&P(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t,r=0|f(e.length),n=s(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),s(e<0?0:0|f(e))}function h(e){for(var t=e.length<0?0:0|f(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||P(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return C(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var i,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=A[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,o=r,0===i&&o===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else -1!==u&&(o-=o-u),u=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return -1}function b(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function S(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=a,t.h2=50,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(P(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),P(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(P(o,Uint8Array))i+o.length>n.length?a.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(a.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):m.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(P(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,l=Math.min(o,s),c=this.slice(n,i),u=e.slice(t,r),h=0;h<l;++h)if(c[h]!==u[h]){o=c[h],s=u[h];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,l,c,u,h,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(a!=a)break;e[r+s]=a}return s}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,I(T(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=t,a=r,I(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,s,a);case"base64":return l=t,c=r,I(C(e),this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,h=r,I(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return S(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return S(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),l=s.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%l]}return this};var E=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function C(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function P(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var A=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},54098:function(e,t,r){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();(function(e){var t=void 0!==i&&i||"undefined"!=typeof self&&self||void 0!==t&&t,r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(r.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function u(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(d)}),this.text=function(){var e,t,r,n=u(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},r.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=a(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=a(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),l(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),l(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),l(e)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(e,t){if(!(this instanceof g))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(t=t||{}).body;if(e instanceof g){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),m.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function v(e,t){if(!(this instanceof v))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},p.call(g.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];v.redirect=function(e,t){if(-1===b.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(n,i){return new Promise(function(o,s){var l=new g(n,i);if(l.signal&&l.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function h(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout(function(){o(new v(n,r))},0)},u.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},u.ontimeout=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},u.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},u.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(l.url),!0),"include"===l.credentials?u.withCredentials=!0:"omit"===l.credentials&&(u.withCredentials=!1),"responseType"in u&&(r.blob?u.responseType="blob":r.arrayBuffer&&l.headers.get("Content-Type")&&-1!==l.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!i||"object"!=typeof i.headers||i.headers instanceof c?l.headers.forEach(function(e,t){u.setRequestHeader(t,e)}):Object.getOwnPropertyNames(i.headers).forEach(function(e){u.setRequestHeader(e,a(i.headers[e]))}),l.signal&&(l.signal.addEventListener("abort",h),u.onreadystatechange=function(){4===u.readyState&&l.signal.removeEventListener("abort",h)}),u.send(void 0===l._bodyInit?null:l._bodyInit)})}w.polyfill=!0,t.fetch||(t.fetch=w,t.Headers=c,t.Request=g,t.Response=v),e.Headers=c,e.Request=g,e.Response=v,e.fetch=w})({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},8679:function(e,t,r){"use strict";var n=r(59864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return n.isMemo(e)?s:a[e.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(p){var i=f(r);i&&i!==p&&e(t,i,n)}var s=u(r);h&&(s=s.concat(h(r)));for(var a=l(t),m=l(r),g=0;g<s.length;++g){var y=s[g];if(!o[y]&&!(n&&n[y])&&!(m&&m[y])&&!(a&&a[y])){var v=d(r,y);try{c(t,y,v)}catch(e){}}}}return t}},80645:function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<<a)-1,c=l>>1,u=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?5960464477539062e-23:0,f=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+f]=255&s,f+=p,s/=256,c-=8);e[r+f-p]|=128*m}},38554:function(e,t,r){e=r.nmd(e);var n,i,o,s,a,l,c,u,h,d,f,p="__lodash_hash_undefined__",m="[object Arguments]",g="[object Function]",y="[object Object]",v=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[m]=w["[object Array]"]=w["[object ArrayBuffer]"]=w["[object Boolean]"]=w["[object DataView]"]=w["[object Date]"]=w["[object Error]"]=w[g]=w["[object Map]"]=w["[object Number]"]=w[y]=w["[object RegExp]"]=w["[object Set]"]=w["[object String]"]=w["[object WeakMap]"]=!1;var _="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,x="object"==typeof self&&self&&self.Object===Object&&self,k=_||x||Function("return this")(),S=t&&!t.nodeType&&t,E=S&&e&&!e.nodeType&&e,T=E&&E.exports===S,C=T&&_.process,I=function(){try{var e=E&&E.require&&E.require("util").types;if(e)return e;return C&&C.binding&&C.binding("util")}catch(e){}}(),P=I&&I.isTypedArray,A=Array.prototype,O=Function.prototype,R=Object.prototype,N=k["__core-js_shared__"],j=O.toString,D=R.hasOwnProperty,M=(c=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",L=R.toString,F=j.call(Object),z=RegExp("^"+j.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=T?k.Buffer:void 0,B=k.Symbol,V=k.Uint8Array,q=U?U.allocUnsafe:void 0,$=(u=Object.getPrototypeOf,h=Object,function(e){return u(h(e))}),W=Object.create,H=R.propertyIsEnumerable,G=A.splice,K=B?B.toStringTag:void 0,Q=function(){try{var e=ef(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=U?U.isBuffer:void 0,X=Math.max,J=Date.now,Z=ef(k,"Map"),ee=ef(Object,"create"),et=function(){function e(){}return function(t){if(!eE(t))return{};if(W)return W(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function er(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function en(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ei(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eo(e){var t=this.__data__=new en(e);this.size=t.size}function es(e,t,r){(void 0===r||ev(e[t],r))&&(void 0!==r||t in e)||el(e,t,r)}function ea(e,t){for(var r=e.length;r--;)if(ev(e[r][0],t))return r;return -1}function el(e,t,r){"__proto__"==t&&Q?Q(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}er.prototype.clear=function(){this.__data__=ee?ee(null):{},this.size=0},er.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},er.prototype.get=function(e){var t=this.__data__;if(ee){var r=t[e];return r===p?void 0:r}return D.call(t,e)?t[e]:void 0},er.prototype.has=function(e){var t=this.__data__;return ee?void 0!==t[e]:D.call(t,e)},er.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ee&&void 0===t?p:t,this},en.prototype.clear=function(){this.__data__=[],this.size=0},en.prototype.delete=function(e){var t=this.__data__,r=ea(t,e);return!(r<0)&&(r==t.length-1?t.pop():G.call(t,r,1),--this.size,!0)},en.prototype.get=function(e){var t=this.__data__,r=ea(t,e);return r<0?void 0:t[r][1]},en.prototype.has=function(e){return ea(this.__data__,e)>-1},en.prototype.set=function(e,t){var r=this.__data__,n=ea(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ei.prototype.clear=function(){this.size=0,this.__data__={hash:new er,map:new(Z||en),string:new er}},ei.prototype.delete=function(e){var t=ed(this,e).delete(e);return this.size-=t?1:0,t},ei.prototype.get=function(e){return ed(this,e).get(e)},ei.prototype.has=function(e){return ed(this,e).has(e)},ei.prototype.set=function(e,t){var r=ed(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},eo.prototype.clear=function(){this.__data__=new en,this.size=0},eo.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},eo.prototype.get=function(e){return this.__data__.get(e)},eo.prototype.has=function(e){return this.__data__.has(e)},eo.prototype.set=function(e,t){var r=this.__data__;if(r instanceof en){var n=r.__data__;if(!Z||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ei(n)}return r.set(e,t),this.size=r.size,this};var ec=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}return e};function eu(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":K&&K in Object(e)?function(e){var t=D.call(e,K),r=e[K];try{e[K]=void 0;var n=!0}catch(e){}var i=L.call(e);return n&&(t?e[K]=r:delete e[K]),i}(e):L.call(e)}function eh(e){return eT(e)&&eu(e)==m}function ed(e,t){var r,n=e.__data__;return("string"==(r=typeof t)||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function ef(e,t){var r=null==e?void 0:e[t];return!(!eE(r)||M&&M in r)&&(ek(r)?z:v).test(function(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(r))?r:void 0}function ep(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&b.test(e))&&e>-1&&e%1==0&&e<t}function em(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||R)}function eg(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ey=(n=Q?function(e,t){return Q(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eA,i=0,o=0,function(){var e=J(),t=16-(e-o);if(o=e,t>0){if(++i>=800)return arguments[0]}else i=0;return n.apply(void 0,arguments)});function ev(e,t){return e===t||e!=e&&t!=t}var eb=eh(function(){return arguments}())?eh:function(e){return eT(e)&&D.call(e,"callee")&&!H.call(e,"callee")},ew=Array.isArray;function e_(e){return null!=e&&eS(e.length)&&!ek(e)}var ex=Y||function(){return!1};function ek(e){if(!eE(e))return!1;var t=eu(e);return t==g||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function eE(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eT(e){return null!=e&&"object"==typeof e}var eC=P?function(e){return P(e)}:function(e){return eT(e)&&eS(e.length)&&!!w[eu(e)]};function eI(e){return e_(e)?function(e,t){var r=ew(e),n=!r&&eb(e),i=!r&&!n&&ex(e),o=!r&&!n&&!i&&eC(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],l=a.length;for(var c in e)(t||D.call(e,c))&&!(s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ep(c,l)))&&a.push(c);return a}(e,!0):function(e){if(!eE(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=em(e),r=[];for(var n in e)"constructor"==n&&(t||!D.call(e,n))||r.push(n);return r}(e)}var eP=(d=function(e,t,r,n){!function e(t,r,n,i,o){t!==r&&ec(r,function(s,a){if(o||(o=new eo),eE(s))(function(e,t,r,n,i,o,s){var a=eg(e,r),l=eg(t,r),c=s.get(l);if(c){es(e,r,c);return}var u=o?o(a,l,r+"",e,t,s):void 0,h=void 0===u;if(h){var d,f,p,m=ew(l),g=!m&&ex(l),v=!m&&!g&&eC(l);u=l,m||g||v?ew(a)?u=a:eT(a)&&e_(a)?u=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(a):g?(h=!1,u=function(e,t){if(t)return e.slice();var r=e.length,n=q?q(r):new e.constructor(r);return e.copy(n),n}(l,!0)):v?(h=!1,new V(f=new(d=l.buffer).constructor(d.byteLength)).set(new V(d)),p=f,u=new l.constructor(p,l.byteOffset,l.length)):u=[]:function(e){if(!eT(e)||eu(e)!=y)return!1;var t=$(e);if(null===t)return!0;var r=D.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&j.call(r)==F}(l)||eb(l)?(u=a,eb(a)?u=function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=void 0;void 0===l&&(l=e[a]),i?el(r,a,l):function(e,t,r){var n=e[t];D.call(e,t)&&ev(n,r)&&(void 0!==r||t in e)||el(e,t,r)}(r,a,l)}return r}(a,eI(a)):(!eE(a)||ek(a))&&(u="function"!=typeof l.constructor||em(l)?{}:et($(l)))):h=!1}h&&(s.set(l,u),i(u,l,n,o,s),s.delete(l)),es(e,r,u)})(t,r,a,n,e,i,o);else{var l=i?i(eg(t,a),s,a+"",t,r,o):void 0;void 0===l&&(l=s),es(t,a,l)}},eI)}(e,t,r,n)},ey((s=f=function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=d.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!eE(r))return!1;var n=typeof t;return("number"==n?!!(e_(r)&&ep(t,r.length)):"string"==n&&(t in r))&&ev(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&d(e,s,r,i)}return e},a=void 0,l=eA,a=X(void 0===a?s.length-1:a,0),function(){for(var e=arguments,t=-1,r=X(e.length-a,0),n=Array(r);++t<r;)n[t]=e[a+t];t=-1;for(var i=Array(a+1);++t<a;)i[t]=e[t];return i[a]=l(n),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(s,this,i)}),f+""));function eA(e){return e}e.exports=eP},29548:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcastChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nextauth.message";return{receive:function(t){var r=function(r){if(r.key===e){var n,i=JSON.parse(null!==(n=r.newValue)&&void 0!==n?n:"{}");(null==i?void 0:i.event)==="session"&&null!=i&&i.data&&t(i)}};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}},post:function(t){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(l(l({},t),{},{timestamp:h()})))}catch(e){}}}},t.apiBaseUrl=u,t.fetchData=function(e,t,r){return c.apply(this,arguments)},t.now=h;var i=n(r(64687)),o=n(r(38416)),s=n(r(17156));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){(0,o.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(){return(c=(0,s.default)(i.default.mark(function e(t,r,n){var o,s,a,c,h,d,f,p,m,g=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=(o=g.length>3&&void 0!==g[3]?g[3]:{}).ctx,c=void 0===(a=o.req)?null==s?void 0:s.req:a,h="".concat(u(r),"/").concat(t),e.prev=2,f={headers:l({"Content-Type":"application/json"},null!=c&&null!==(d=c.headers)&&void 0!==d&&d.cookie?{cookie:c.headers.cookie}:{})},null!=c&&c.body&&(f.body=JSON.stringify(c.body),f.method="POST"),e.next=7,fetch(h,f);case 7:return p=e.sent,e.next=10,p.json();case 10:if(m=e.sent,p.ok){e.next=13;break}throw m;case 13:return e.abrupt("return",Object.keys(m).length>0?m:null);case 16:return e.prev=16,e.t0=e.catch(2),n.error("CLIENT_FETCH_ERROR",{error:e.t0,url:h}),e.abrupt("return",null);case 20:case"end":return e.stop()}},e,null,[[2,16]])}))).apply(this,arguments)}function u(e){return"undefined"==typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function h(){return Math.floor(Date.now()/1e3)}},36925:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedStrategy=t.UnknownError=t.OAuthCallbackError=t.MissingSecret=t.MissingAuthorize=t.MissingAdapterMethods=t.MissingAdapter=t.MissingAPIRoute=t.InvalidCallbackUrl=t.AccountNotLinkedError=void 0,t.adapterErrorHandler=function(e,t){if(e)return Object.keys(e).reduce(function(r,n){return r[n]=(0,o.default)(i.default.mark(function r(){var o,s,a,l,c,u=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(r.prev=0,s=Array(o=u.length),a=0;a<o;a++)s[a]=u[a];return t.debug("adapter_".concat(n),{args:s}),l=e[n],r.next=6,l.apply(void 0,s);case 6:return r.abrupt("return",r.sent);case 9:throw r.prev=9,r.t0=r.catch(0),t.error("adapter_error_".concat(n),r.t0),(c=new m(r.t0)).name="".concat(y(n),"Error"),c;case 15:case"end":return r.stop()}},r,null,[[0,9]])})),r},{})},t.capitalize=y,t.eventsErrorHandler=function(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=(0,o.default)(i.default.mark(function r(){var o,s=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e[n],r.next=4,o.apply(void 0,s);case 4:return r.abrupt("return",r.sent);case 7:r.prev=7,r.t0=r.catch(0),t.error("".concat(g(n),"_EVENT_ERROR"),r.t0);case 10:case"end":return r.stop()}},r,null,[[0,7]])})),r},{})},t.upperSnake=g;var i=n(r(64687)),o=n(r(17156)),s=n(r(38416)),a=n(r(56690)),l=n(r(89728)),c=n(r(94993)),u=n(r(73808)),h=n(r(61655)),d=n(r(33496));function f(e,t,r){return t=(0,u.default)(t),(0,c.default)(e,p()?Reflect.construct(t,r||[],(0,u.default)(e).constructor):t.apply(e,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var m=t.UnknownError=function(e){function t(e){var r,n;return(0,a.default)(this,t),(n=f(this,t,[null!==(r=null==e?void 0:e.message)&&void 0!==r?r:e])).name="UnknownError",n.code=e.code,e instanceof Error&&(n.stack=e.stack),n}return(0,h.default)(t,e),(0,l.default)(t,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}])}((0,d.default)(Error));function g(e){return e.replace(/([A-Z])/g,"_$1").toUpperCase()}function y(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}t.OAuthCallbackError=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","OAuthCallbackError"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.AccountNotLinkedError=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","AccountNotLinkedError"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.MissingAPIRoute=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","MissingAPIRouteError"),(0,s.default)(e,"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.MissingSecret=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","MissingSecretError"),(0,s.default)(e,"code","NO_SECRET"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.MissingAuthorize=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","MissingAuthorizeError"),(0,s.default)(e,"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.MissingAdapter=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","MissingAdapterError"),(0,s.default)(e,"code","EMAIL_REQUIRES_ADAPTER_ERROR"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.MissingAdapterMethods=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","MissingAdapterMethodsError"),(0,s.default)(e,"code","MISSING_ADAPTER_METHODS_ERROR"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.UnsupportedStrategy=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","UnsupportedStrategyError"),(0,s.default)(e,"code","CALLBACK_CREDENTIALS_JWT_ERROR"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m),t.InvalidCallbackUrl=function(e){function t(){var e;(0,a.default)(this,t);for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e=f(this,t,[].concat(n)),(0,s.default)(e,"name","InvalidCallbackUrl"),(0,s.default)(e,"code","INVALID_CALLBACK_URL_ERROR"),e}return(0,h.default)(t,e),(0,l.default)(t)}(m)},33299:function(e,t,r){"use strict";var n,i,o,s,a,l=r(83454),c=r(64836),u=r(18698);Object.defineProperty(t,"__esModule",{value:!0});var h={SessionContext:!0,useSession:!0,getSession:!0,getCsrfToken:!0,getProviders:!0,signIn:!0,signOut:!0,SessionProvider:!0};t.SessionContext=void 0,t.SessionProvider=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t,r,n,i,o,s,a=e.children,l=e.basePath,c=e.refetchInterval,u=e.refetchWhenOffline;l&&(T.basePath=l);var h=void 0!==e.session;T._lastSync=h?(0,b.now)():0;var f=g.useState(function(){return h&&(T._session=e.session),e.session}),y=(0,m.default)(f,2),v=y[0],_=y[1],x=g.useState(!h),k=(0,m.default)(x,2),S=k[0],E=k[1];g.useEffect(function(){return T._getSession=(0,p.default)(d.default.mark(function e(){var t,r,n=arguments;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(n.length>0&&void 0!==n[0]?n[0]:{}).event,e.prev=1,!((r="storage"===t)||void 0===T._session)){e.next=10;break}return T._lastSync=(0,b.now)(),e.next=7,A({broadcast:!r});case 7:return T._session=e.sent,_(T._session),e.abrupt("return");case 10:if(!(!t||null===T._session||(0,b.now)()<T._lastSync)){e.next=12;break}return e.abrupt("return");case 12:return T._lastSync=(0,b.now)(),e.next=15,A();case 15:T._session=e.sent,_(T._session),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),I.error("CLIENT_SESSION_ERROR",e.t0);case 22:return e.prev=22,E(!1),e.finish(22);case 25:case"end":return e.stop()}},e,null,[[1,19,22,25]])})),T._getSession(),function(){T._lastSync=0,T._session=void 0,T._getSession=function(){}}},[]),g.useEffect(function(){var e=C.receive(function(){return T._getSession({event:"storage"})});return function(){return e()}},[]),g.useEffect(function(){var t=e.refetchOnWindowFocus,r=void 0===t||t,n=function(){r&&"visible"===document.visibilityState&&T._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",n,!1),function(){return document.removeEventListener("visibilitychange",n,!1)}},[e.refetchOnWindowFocus]);var O=(t=g.useState("undefined"!=typeof navigator&&navigator.onLine),n=(r=(0,m.default)(t,2))[0],i=r[1],o=function(){return i(!0)},s=function(){return i(!1)},g.useEffect(function(){return window.addEventListener("online",o),window.addEventListener("offline",s),function(){window.removeEventListener("online",o),window.removeEventListener("offline",s)}},[]),n),N=!1!==u||O;g.useEffect(function(){if(c&&N){var e=setInterval(function(){T._session&&T._getSession({event:"poll"})},1e3*c);return function(){return clearInterval(e)}}},[c,N]);var j=g.useMemo(function(){return{data:v,status:S?"loading":v?"authenticated":"unauthenticated",update:function(e){return(0,p.default)(d.default.mark(function t(){var r;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(S||!v)){t.next=2;break}return t.abrupt("return");case 2:return E(!0),t.t0=b.fetchData,t.t1=T,t.t2=I,t.next=8,R();case 8:return t.t3=t.sent,t.t4=e,t.t5={csrfToken:t.t3,data:t.t4},t.t6={body:t.t5},t.t7={req:t.t6},t.next=15,(0,t.t0)("session",t.t1,t.t2,t.t7);case 15:return r=t.sent,E(!1),r&&(_(r),C.post({event:"session",data:{trigger:"getSession"}})),t.abrupt("return",r);case 19:case"end":return t.stop()}},t)}))()}}},[v,S]);return(0,w.jsx)(P.Provider,{value:j,children:a})},t.getCsrfToken=R,t.getProviders=j,t.getSession=A,t.signIn=function(e,t,r){return M.apply(this,arguments)},t.signOut=function(e){return L.apply(this,arguments)},t.useSession=function(e){if(!P)throw Error("React Context is unavailable in Server Components");var t=g.useContext(P),r=null!=e?e:{},n=r.required,i=r.onUnauthenticated,o=n&&"unauthenticated"===t.status;return(g.useEffect(function(){if(o){var e="/api/auth/signin?".concat(new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));i?i():window.location.href=e}},[o,i]),o)?{data:t.data,update:t.update,status:"loading"}:t};var d=c(r(64687)),f=c(r(38416)),p=c(r(17156)),m=c(r(27424)),g=k(r(67294)),y=k(r(26553)),v=c(r(30762)),b=r(29548),w=r(85893),_=r(527);function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(x=function(e){return e?r:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=u(e)&&"function"!=typeof e)return{default:e};var r=x(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){(0,f.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Object.keys(_).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(h,e))&&(e in t&&t[e]===_[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}}))});var T={baseUrl:(0,v.default)(null!==(n=l.env.NEXTAUTH_URL)&&void 0!==n?n:l.env.VERCEL_URL).origin,basePath:(0,v.default)(l.env.NEXTAUTH_URL).path,baseUrlServer:(0,v.default)(null!==(i=null!==(o=l.env.NEXTAUTH_URL_INTERNAL)&&void 0!==o?o:l.env.NEXTAUTH_URL)&&void 0!==i?i:l.env.VERCEL_URL).origin,basePathServer:(0,v.default)(null!==(s=l.env.NEXTAUTH_URL_INTERNAL)&&void 0!==s?s:l.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:function(){}},C=(0,b.BroadcastChannel)(),I=(0,y.proxyLogger)(y.default,T.basePath),P=t.SessionContext=null===(a=g.createContext)||void 0===a?void 0:a.call(g,void 0);function A(e){return O.apply(this,arguments)}function O(){return(O=(0,p.default)(d.default.mark(function e(t){var r,n;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.fetchData)("session",T,I,t);case 2:return n=e.sent,(null===(r=null==t?void 0:t.broadcast)||void 0===r||r)&&C.post({event:"session",data:{trigger:"getSession"}}),e.abrupt("return",n);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=(0,p.default)(d.default.mark(function e(t){var r;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.fetchData)("csrf",T,I,t);case 2:return r=e.sent,e.abrupt("return",null==r?void 0:r.csrfToken);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function j(){return D.apply(this,arguments)}function D(){return(D=(0,p.default)(d.default.mark(function e(){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.fetchData)("providers",T,I);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function M(){return(M=(0,p.default)(d.default.mark(function e(t,r,n){var i,o,s,a,l,c,u,h,f,p,m,g,y,v,w,_,x;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=void 0===(o=(i=null!=r?r:{}).callbackUrl)?window.location.href:o,l=void 0===(a=i.redirect)||a,c=(0,b.apiBaseUrl)(T),e.next=4,j();case 4:if(u=e.sent){e.next=8;break}return window.location.href="".concat(c,"/error"),e.abrupt("return");case 8:if(!(!t||!(t in u))){e.next=11;break}return window.location.href="".concat(c,"/signin?").concat(new URLSearchParams({callbackUrl:s})),e.abrupt("return");case 11:return h="credentials"===u[t].type,f="email"===u[t].type,p=h||f,m="".concat(c,"/").concat(h?"callback":"signin","/").concat(t),g="".concat(m).concat(n?"?".concat(new URLSearchParams(n)):""),e.t0=fetch,e.t1=g,e.t2={"Content-Type":"application/x-www-form-urlencoded"},e.t3=URLSearchParams,e.t4=E,e.t5=E({},r),e.t6={},e.next=25,R();case 25:return e.t7=e.sent,e.t8=s,e.t9={csrfToken:e.t7,callbackUrl:e.t8,json:!0},e.t10=(0,e.t4)(e.t5,e.t6,e.t9),e.t11=new e.t3(e.t10),e.t12={method:"post",headers:e.t2,body:e.t11},e.next=33,(0,e.t0)(e.t1,e.t12);case 33:return y=e.sent,e.next=36,y.json();case 36:if(v=e.sent,!(l||!p)){e.next=42;break}return _=null!==(w=v.url)&&void 0!==w?w:s,window.location.href=_,_.includes("#")&&window.location.reload(),e.abrupt("return");case 42:if(x=new URL(v.url).searchParams.get("error"),!y.ok){e.next=46;break}return e.next=46,T._getSession({event:"storage"});case 46:return e.abrupt("return",{error:x,status:y.status,ok:y.ok,url:x?null:v.url});case 47:case"end":return e.stop()}},e)}))).apply(this,arguments)}function L(){return(L=(0,p.default)(d.default.mark(function e(t){var r,n,i,o,s,a,l,c,u;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=void 0===(n=(null!=t?t:{}).callbackUrl)?window.location.href:n,o=(0,b.apiBaseUrl)(T),e.t0={"Content-Type":"application/x-www-form-urlencoded"},e.t1=URLSearchParams,e.next=6,R();case 6:return e.t2=e.sent,e.t3=i,e.t4={csrfToken:e.t2,callbackUrl:e.t3,json:!0},e.t5=new e.t1(e.t4),s={method:"post",headers:e.t0,body:e.t5},e.next=13,fetch("".concat(o,"/signout"),s);case 13:return a=e.sent,e.next=16,a.json();case 16:if(l=e.sent,C.post({event:"session",data:{trigger:"signout"}}),!(null===(r=null==t?void 0:t.redirect)||void 0===r||r)){e.next=23;break}return u=null!==(c=l.url)&&void 0!==c?c:i,window.location.href=u,u.includes("#")&&window.location.reload(),e.abrupt("return");case 23:return e.next=25,T._getSession({event:"storage"});case 25:return e.abrupt("return",l);case 26:case"end":return e.stop()}},e)}))).apply(this,arguments)}},527:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},26553:function(e,t,r){"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.proxyLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0;try{if("undefined"==typeof window)return e;var r={},n=function(e){var n;r[e]=(n=(0,s.default)(i.default.mark(function r(n,s){var a,h;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(u[e](n,s),"error"===e&&(s=c(s)),s.client=!0,a="".concat(t,"/_log"),h=new URLSearchParams(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){(0,o.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({level:e,code:n},s)),!navigator.sendBeacon){r.next=8;break}return r.abrupt("return",navigator.sendBeacon(a,h));case 8:return r.next=10,fetch(a,{method:"POST",body:h,keepalive:!0});case 10:return r.abrupt("return",r.sent);case 11:case"end":return r.stop()}},r)})),function(e,t){return n.apply(this,arguments)})};for(var a in e)n(a);return r}catch(e){return u}},t.setLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t||(u.debug=function(){}),e.error&&(u.error=e.error),e.warn&&(u.warn=e.warn),e.debug&&(u.debug=e.debug)};var i=n(r(64687)),o=n(r(38416)),s=n(r(17156)),a=r(36925);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){var t;return e instanceof Error&&!(e instanceof a.UnknownError)?{message:e.message,stack:e.stack,name:e.name}:(null!=e&&e.error&&(e.error=c(e.error),e.message=null!==(t=e.message)&&void 0!==t?t:e.error.message),e)}var u={error:function(e,t){t=c(t),console.error("[next-auth][error][".concat(e,"]"),"\nhttps://next-auth.js.org/errors#".concat(e.toLowerCase()),t.message,t)},warn:function(e){console.warn("[next-auth][warn][".concat(e,"]"),"\nhttps://next-auth.js.org/warnings#".concat(e.toLowerCase()))},debug:function(e,t){console.log("[next-auth][debug][".concat(e,"]"),t)}};t.default=u},30762:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;let r=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let n=new URL(null!==(t=e)&&void 0!==t?t:r),i=("/"===n.pathname?r.pathname:n.pathname).replace(/\/$/,""),o=`${n.origin}${i}`;return{origin:n.origin,host:n.host,path:i,base:o,toString:()=>o}}},83454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(77663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(45092)}])},83525:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(14001).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76361:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});let n=r(83525);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return f},usePathname:function(){return h},useRouter:function(){return d},useSearchParams:function(){return u},useSelectedLayoutSegment:function(){return m},useSelectedLayoutSegments:function(){return p},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let n=r(67294),i=r(60257),o=r(22608),s=r(11288),a=r(66406),l=r(72717),c=r(65988);function u(){let e=(0,n.useContext)(o.SearchParamsContext);return(0,n.useMemo)(()=>e?new l.ReadonlyURLSearchParams(e):null,[e])}function h(){return(0,n.useContext)(o.PathnameContext)}function d(){let e=(0,n.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function f(){return(0,n.useContext)(o.PathParamsContext)}function p(e){void 0===e&&(e="children");let t=(0,n.useContext)(i.LayoutRouterContext);return t?function e(t,r,n,i){let o;if(void 0===n&&(n=!0),void 0===i&&(i=[]),n)o=t[1][r];else{var l;let e=t[1];o=null!=(l=e.children)?l:Object.values(e)[0]}if(!o)return i;let c=o[0],u=(0,s.getSegmentValue)(c);return!u||u.startsWith(a.PAGE_SEGMENT_KEY)?i:(i.push(u),e(o,r,!1,i))}(t.tree,e):null}function m(e){void 0===e&&(e="children");let t=p(e);if(!t||0===t.length)return null;let r="children"===e?t[0]:t[t.length-1];return r===a.DEFAULT_SEGMENT_KEY?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72717:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return s},RedirectType:function(){return n.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});let n=r(7511),i=r(73394);class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class s extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new o}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},73394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isNotFoundError:function(){return i},notFound:function(){return n}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44234:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),(n=r||(r={}))[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7511:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return m},getRedirectTypeFromError:function(){return p},getURLFromRedirectError:function(){return f},isRedirectError:function(){return d},permanentRedirect:function(){return h},redirect:function(){return u}});let o=r(82595),s=r(76361),a=r(44234),l="NEXT_REDIRECT";function c(e,t,r){void 0===r&&(r=a.RedirectStatusCode.TemporaryRedirect);let n=Error(l);n.digest=l+";"+t+";"+e+";"+r+";";let i=o.requestAsyncStorage.getStore();return i&&(n.mutableCookies=i.mutableCookies),n}function u(e,t){void 0===t&&(t="replace");let r=s.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function h(e,t){void 0===t&&(t="replace");let r=s.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,i]=e.digest.split(";",4),o=Number(i);return t===l&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(o)&&o in a.RedirectStatusCode}function f(e){return d(e)?e.digest.split(";",3)[2]:null}function p(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function m(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(i=n||(n={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25329:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(14001).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82595:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getExpectedRequestStore:function(){return i},requestAsyncStorage:function(){return n.requestAsyncStorage}});let n=r(25329);function i(e){let t=n.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11288:function(e,t){"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38199:function(e,t){"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_FAST_REFRESH:function(){return h},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return u},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return n},PrefetchKind:function(){return r},isThenable:function(){return f}});let s="refresh",a="navigate",l="restore",c="server-patch",u="prefetch",h="fast-refresh",d="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=r||(r={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(o=n||(n={})).fresh="fresh",o.reusable="reusable",o.expired="expired",o.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},87195:function(e,t,r){"use strict";function n(e,t,r,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),r(98337),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98342:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let n=r(38754),i=r(85893),o=n._(r(67294)),s=r(36075),a=r(53955),l=r(48041),c=r(99903),u=r(65490),h=r(81928),d=r(60257),f=r(84229),p=r(87195),m=r(89470),g=r(38199),y=new Set;function v(e,t,r,n,i,o){if(o||(0,a.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(y.has(i))return;y.add(i)}(async()=>o?e.prefetch(t,i):e.prefetch(t,r,n))().catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let w=o.default.forwardRef(function(e,t){let r,n;let{href:l,as:y,children:w,prefetch:_=null,passHref:x,replace:k,shallow:S,scroll:E,locale:T,onClick:C,onMouseEnter:I,onTouchStart:P,legacyBehavior:A=!1,...O}=e;r=w,A&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let R=o.default.useContext(h.RouterContext),N=o.default.useContext(d.AppRouterContext),j=null!=R?R:N,D=!R,M=!1!==_,L=null===_?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:F,as:z}=o.default.useMemo(()=>{if(!R){let e=b(l);return{href:e,as:y?b(y):e}}let[e,t]=(0,s.resolveHref)(R,l,!0);return{href:e,as:y?(0,s.resolveHref)(R,y):t||e}},[R,l,y]),U=o.default.useRef(F),B=o.default.useRef(z);A&&(n=o.default.Children.only(r));let V=A?n&&"object"==typeof n&&n.ref:t,[q,$,W]=(0,f.useIntersection)({rootMargin:"200px"}),H=o.default.useCallback(e=>{(B.current!==z||U.current!==F)&&(W(),B.current=z,U.current=F),q(e),V&&("function"==typeof V?V(e):"object"==typeof V&&(V.current=e))},[z,V,F,W,q]);o.default.useEffect(()=>{j&&$&&M&&v(j,F,z,{locale:T},{kind:L},D)},[z,F,$,T,M,null==R?void 0:R.locale,j,D,L]);let G={ref:H,onClick(e){A||"function"!=typeof C||C(e),A&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),j&&!e.defaultPrevented&&function(e,t,r,n,i,s,l,c,u){let{nodeName:h}=e.currentTarget;if("A"===h.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,a.isLocalURL)(r)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:s,locale:c,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};u?o.default.startTransition(d):d()}(e,j,F,z,k,S,E,T,D)},onMouseEnter(e){A||"function"!=typeof I||I(e),A&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),j&&(M||!D)&&v(j,F,z,{locale:T,priority:!0,bypassPrefetchedCheck:!0},{kind:L},D)},onTouchStart:function(e){A||"function"!=typeof P||P(e),A&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),j&&(M||!D)&&v(j,F,z,{locale:T,priority:!0,bypassPrefetchedCheck:!0},{kind:L},D)}};if((0,c.isAbsoluteUrl)(z))G.href=z;else if(!A||x||"a"===n.type&&!("href"in n.props)){let e=void 0!==T?T:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,p.getDomainLocale)(z,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);G.href=t||(0,m.addBasePath)((0,u.addLocale)(z,e,null==R?void 0:R.defaultLocale))}return A?o.default.cloneElement(n,G):(0,i.jsx)("a",{...O,...G,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84229:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(67294),i=r(84474),o="function"==typeof IntersectionObserver,s=new Map,a=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,c=l||!o,[u,h]=(0,n.useState)(!1),d=(0,n.useRef)(null),f=(0,n.useCallback)(e=>{d.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(c||u)return;let e=d.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:o}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=a.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=s.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},a.push(r),s.set(r,t),t}(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),s.delete(n);let e=a.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&h(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!u){let e=(0,i.requestIdleCallback)(()=>h(!0));return()=>(0,i.cancelIdleCallback)(e)}},[c,r,t,u,d.current]),[f,u,(0,n.useCallback)(()=>{h(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65988:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return o}});let n=r(61757)._(r(67294)),i=n.default.createContext(null);function o(e){let t=(0,n.useContext)(i);t&&t(e)}},7443:function(e,t,r){"use strict";var n=r(83454);r(91479);var i=r(67294),o=i&&"object"==typeof i&&"default"in i?i:{default:i},s=void 0!==n&&n.env&&!0,a=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,o=void 0===i?s:i;c(a(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof o,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=o,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l=document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(s||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){if(c(a(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return s||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},t.replaceRule=function(e,t){if(this._optimizeForSpeed){var r=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){s||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},t.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},t.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},t.cssRules=function(){var e=this;return this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},t.makeStyleTag=function(e,t,r){t&&c(a(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return r?i.insertBefore(n,r):i.appendChild(n),n},function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var u=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},h={};function d(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return h[n]||(h[n]="jsx-"+u(e+"-"+r)),h[n]}function f(e,t){var r=e+t;return h[r]||(h[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,o=void 0!==i&&i;this._sheet=n||new l({name:"styled-jsx",optimizeForSpeed:o}),this._sheet.inject(),n&&"boolean"==typeof o&&(this._sheet.setOptimizeForSpeed(o),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var o=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=o,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return o.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=d(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return f(i,e)}):[f(i,t)]}}return{styleId:d(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=i.createContext(null);m.displayName="StyleSheetContext";var g=o.default.useInsertionEffect||o.default.useLayoutEffect,y=new p;function v(e){var t=y||i.useContext(m);return t&&g(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}v.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},t.style=v},40645:function(e,t,r){"use strict";e.exports=r(7443).style},45092:function(e,t,r){"use strict";let n,i;r.r(t),r.d(t,{default:function(){return i8}});var o,s,a,l,c,u,h,d,f=r(85893),p=r(40645),m=r.n(p),g=r(67294),y=r(45007),v=r(33299),b=r(9008),w=r.n(b),_=r(11163),x=r(4298),k=r.n(x),S=r(1209),E=r(21326),T=r(2623),C=r(31046);let I={light:"chakra-ui-light",dark:"chakra-ui-dark"},P="chakra-ui-color-mode",A={ssr:!1,type:"localStorage",get(e){let t;if(!globalThis?.document)return e;try{t=localStorage.getItem(P)||e}catch(e){}return t||e},set(e){try{localStorage.setItem(P,e)}catch(e){}}},O=()=>{},R=(0,E.jU)()?g.useLayoutEffect:g.useEffect;function N(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}let j=(0,T.w)(function(e,t){let{value:r,children:n,options:{useSystemColorMode:i,initialColorMode:o,disableTransitionOnChange:s}={},colorModeManager:a=A}=e,l="dark"===o?"dark":"light",[c,u]=(0,g.useState)(()=>N(a,l)),[h,d]=(0,g.useState)(()=>N(a)),{getSystemTheme:p,setClassName:m,setDataset:y,addListener:v}=(0,g.useMemo)(()=>(function(e={}){let{preventTransition:t=!0,nonce:r}=e,n={setDataset:e=>{let r=t?n.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,r?.()},setClassName(e){document.body.classList.add(e?I.dark:I.light),document.body.classList.remove(e?I.light:I.dark)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme:e=>n.query().matches??"dark"===e?"dark":"light",addListener(e){let t=n.query(),r=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(r):t.addEventListener("change",r),()=>{"function"==typeof t.removeListener?t.removeListener(r):t.removeEventListener("change",r)}},preventTransition(){let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),void 0!==r&&(e.nonce=r),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(e)})})}}};return n})({preventTransition:s,nonce:t?.nonce}),[s,t?.nonce]),b="system"!==o||c?c:h,w=(0,g.useCallback)(e=>{let t="system"===e?p():e;u(t),m("dark"===t),y(t),a.set(t)},[a,p,m,y]);R(()=>{"system"===o&&d(p())},[]),(0,g.useEffect)(()=>{let e=a.get();if(e){w(e);return}if("system"===o){w("system");return}w(l)},[a,l,o,w]);let _=(0,g.useCallback)(()=>{w("dark"===b?"light":"dark")},[b,w]);(0,g.useEffect)(()=>{if(i)return v(w)},[i,v,w]);let x=(0,g.useMemo)(()=>({colorMode:r??b,toggleColorMode:r?O:_,setColorMode:r?O:w,forced:void 0!==r}),[b,_,w,r]);return(0,f.jsx)(C.kc.Provider,{value:x,children:n})});j.displayName="ColorModeProvider";var D=r(70917);let M=String.raw,L=M`
  :root,
  :host {
    --chakra-vh: 100vh;
  }

  @supports (height: -webkit-fill-available) {
    :root,
    :host {
      --chakra-vh: -webkit-fill-available;
    }
  }

  @supports (height: -moz-fill-available) {
    :root,
    :host {
      --chakra-vh: -moz-fill-available;
    }
  }

  @supports (height: 100dvh) {
    :root,
    :host {
      --chakra-vh: 100dvh;
    }
  }
`,F=()=>(0,f.jsx)(D.xB,{styles:L}),z=({scope:e=""})=>(0,f.jsx)(D.xB,{styles:M`
      html {
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        font-family: system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        -moz-osx-font-smoothing: grayscale;
        touch-action: manipulation;
      }

      body {
        position: relative;
        min-height: 100%;
        margin: 0;
        font-feature-settings: "kern";
      }

      ${e} :where(*, *::before, *::after) {
        border-width: 0;
        border-style: solid;
        box-sizing: border-box;
        word-wrap: break-word;
      }

      main {
        display: block;
      }

      ${e} hr {
        border-top-width: 1px;
        box-sizing: content-box;
        height: 0;
        overflow: visible;
      }

      ${e} :where(pre, code, kbd,samp) {
        font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 1em;
      }

      ${e} a {
        background-color: transparent;
        color: inherit;
        text-decoration: inherit;
      }

      ${e} abbr[title] {
        border-bottom: none;
        text-decoration: underline;
        -webkit-text-decoration: underline dotted;
        text-decoration: underline dotted;
      }

      ${e} :where(b, strong) {
        font-weight: bold;
      }

      ${e} small {
        font-size: 80%;
      }

      ${e} :where(sub,sup) {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
      }

      ${e} sub {
        bottom: -0.25em;
      }

      ${e} sup {
        top: -0.5em;
      }

      ${e} img {
        border-style: none;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        font-family: inherit;
        font-size: 100%;
        line-height: 1.15;
        margin: 0;
      }

      ${e} :where(button, input) {
        overflow: visible;
      }

      ${e} :where(button, select) {
        text-transform: none;
      }

      ${e} :where(
          button::-moz-focus-inner,
          [type="button"]::-moz-focus-inner,
          [type="reset"]::-moz-focus-inner,
          [type="submit"]::-moz-focus-inner
        ) {
        border-style: none;
        padding: 0;
      }

      ${e} fieldset {
        padding: 0.35em 0.75em 0.625em;
      }

      ${e} legend {
        box-sizing: border-box;
        color: inherit;
        display: table;
        max-width: 100%;
        padding: 0;
        white-space: normal;
      }

      ${e} progress {
        vertical-align: baseline;
      }

      ${e} textarea {
        overflow: auto;
      }

      ${e} :where([type="checkbox"], [type="radio"]) {
        box-sizing: border-box;
        padding: 0;
      }

      ${e} input[type="number"]::-webkit-inner-spin-button,
      ${e} input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none !important;
      }

      ${e} input[type="number"] {
        -moz-appearance: textfield;
      }

      ${e} input[type="search"] {
        -webkit-appearance: textfield;
        outline-offset: -2px;
      }

      ${e} input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none !important;
      }

      ${e} ::-webkit-file-upload-button {
        -webkit-appearance: button;
        font: inherit;
      }

      ${e} details {
        display: block;
      }

      ${e} summary {
        display: list-item;
      }

      template {
        display: none;
      }

      [hidden] {
        display: none !important;
      }

      ${e} :where(
          blockquote,
          dl,
          dd,
          h1,
          h2,
          h3,
          h4,
          h5,
          h6,
          hr,
          figure,
          p,
          pre
        ) {
        margin: 0;
      }

      ${e} button {
        background: transparent;
        padding: 0;
      }

      ${e} fieldset {
        margin: 0;
        padding: 0;
      }

      ${e} :where(ol, ul) {
        margin: 0;
        padding: 0;
      }

      ${e} textarea {
        resize: vertical;
      }

      ${e} :where(button, [role="button"]) {
        cursor: pointer;
      }

      ${e} button::-moz-focus-inner {
        border: 0 !important;
      }

      ${e} table {
        border-collapse: collapse;
      }

      ${e} :where(h1, h2, h3, h4, h5, h6) {
        font-size: inherit;
        font-weight: inherit;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        padding: 0;
        line-height: inherit;
        color: inherit;
      }

      ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
        display: block;
      }

      ${e} :where(img, video) {
        max-width: 100%;
        height: auto;
      }

      [data-js-focus-visible]
        :focus:not([data-focus-visible-added]):not(
          [data-focus-visible-disabled]
        ) {
        outline: none;
        box-shadow: none;
      }

      ${e} select::-ms-expand {
        display: none;
      }

      ${L}
    `});var U=r(15292),B=r(79115),V=r(38554),q=r(57474),$=r(33829),W=r(43289);function H(e,t,r={}){let{stop:n,getKey:i}=r;return function e(r,o=[]){if((0,B.Kn)(r)||Array.isArray(r)){let s={};for(let[a,l]of Object.entries(r)){let c=i?.(a)??a,u=[...o,c];if(n?.(r,u))return t(r,o);s[c]=e(l,u)}return s}return t(r,o)}(e)}var G=r(70562);let K=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function Q(e,t){return(0,W.gJ)(String(e).replace(/\./g,"-"),void 0,t)}var Y=r(35831),X=r(82203),J=r(52110),Z=r(4839),ee=r(2847);function et(e){let{cssVarsRoot:t,theme:r,children:n}=e,i=(0,g.useMemo)(()=>(function(e){let t=function(e){let{__cssMap:t,__cssVars:r,__breakpoints:n,...i}=e;return i}(e),{cssMap:r,cssVars:n}=function(e){let t=function(e){let t=(0,G.e)(e,K),r=e.semanticTokens,n=(0,q.T)(e),i=e=>n.includes(e)||"default"===e,o={};return H(t,(e,t)=>{null!=e&&(o[t.join(".")]={isSemantic:!1,value:e})}),H(r,(e,t)=>{null!=e&&(o[t.join(".")]={isSemantic:!0,value:e})},{stop:e=>Object.keys(e).every(i)}),o}(e),r=e.config?.cssVarPrefix,n=(0,q.R)(e),i={},o={};for(let[e,s]of Object.entries(t)){let{isSemantic:a,value:l}=s,{variable:c,reference:u}=Q(e,r);if(!a){if(e.startsWith("space")){let[t,...r]=e.split("."),n=`${t}.-${r.join(".")}`,i=$.y.negate(l),s=$.y.negate(u);o[n]={value:i,var:c,varRef:s}}i[c]=l,o[e]={value:l,var:c,varRef:u};continue}i=V(i,Object.entries((0,B.Kn)(l)?l:{default:l}).reduce((i,[o,s])=>{if(!s)return i;let a=function(e,n){let i=[String(e).split(".")[0],n].join(".");if(!t[i])return n;let{reference:o}=Q(i,r);return o}(e,`${s}`);return"default"===o?i[c]=a:i[n?.[o]??o]={[c]:a},i},{})),o[e]={value:u,var:c,varRef:u}}return{cssVars:i,cssMap:o}}(t),i=(0,Y.O0)(t);return Object.assign(t,{__cssVars:{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0",...n},__cssMap:r,__breakpoints:(0,U.y)(t.breakpoints),__isStyleProp:i}),t})(r),[r]);return(0,f.jsxs)(T.a,{theme:i,children:[(0,f.jsx)(er,{root:t}),n]})}function er({root:e=":host, :root"}){let t=[e,"[data-theme]"].join(",");return(0,f.jsx)(D.xB,{styles:e=>({[t]:e.__cssVars})})}let[en,ei]=(0,J.k)({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function eo(){let{colorMode:e}=(0,C.If)();return(0,f.jsx)(D.xB,{styles:t=>{let r=(0,Z.W)(t,"styles.global"),n=(0,ee.P)(r,{theme:t,colorMode:e});if(n)return(0,X.i)(n)(t)}})}var es=r(28215),ea=r(28497);let el=e=>{let{children:t,colorModeManager:r,portalZIndex:n,resetScope:i,resetCSS:o=!0,theme:s={},environment:a,cssVarsRoot:l,disableEnvironment:c,disableGlobalStyle:u}=e,h=(0,f.jsx)(ea.u,{environment:a,disabled:c,children:t});return(0,f.jsx)(et,{theme:s,cssVarsRoot:l,children:(0,f.jsxs)(j,{colorModeManager:r,options:s.config,children:[o?(0,f.jsx)(z,{scope:i}):(0,f.jsx)(F,{}),!u&&(0,f.jsx)(eo,{}),n?(0,f.jsx)(es.h,{zIndex:n,children:h}):h]})})};var ec=r(13114),eu=r(4840),eh=r(95372),ed=r(15947),ef=r(72701);let ep=(e,t)=>e.find(e=>e.id===t);function em(e,t){let r=eg(e,t),n=r?e[r].findIndex(e=>e.id===t):-1;return{position:r,index:n}}function eg(e,t){for(let[r,n]of Object.entries(e))if(ep(n,t))return r}var ey=r(64993);let ev={initial:e=>{let{position:t}=e,r=["top","bottom"].includes(t)?"y":"x",n=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(n=1),{opacity:0,[r]:24*n}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},eb=(0,g.memo)(e=>{let{id:t,message:r,onCloseComplete:n,onRequestRemove:i,requestClose:o=!1,position:s="bottom",duration:a=5e3,containerStyle:l,motionVariants:c=ev,toastSpacing:u="0.5rem"}=e,[h,d]=(0,g.useState)(a),p=(0,ed.hO)();(0,eu.r)(()=>{p||n?.()},[p]),(0,eu.r)(()=>{d(a)},[a]);let m=()=>{p&&i()};(0,g.useEffect)(()=>{p&&o&&i()},[p,o,i]),function(e,t){let r=(0,eh.W)(e);(0,g.useEffect)(()=>{if(null==t)return;let e=null;return e=window.setTimeout(()=>{r()},t),()=>{e&&window.clearTimeout(e)}},[t,r])}(m,h);let y=(0,g.useMemo)(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...l}),[l,u]),v=(0,g.useMemo)(()=>(function(e){let t=e.includes("right"),r=e.includes("left"),n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}})(s),[s]);return(0,f.jsx)(ef.E.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>d(null),onHoverEnd:()=>d(a),custom:{position:s},style:v,children:(0,f.jsx)(ey.m.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:y,children:(0,ee.P)(r,{id:t,onClose:m})})})});eb.displayName="ToastComponent";var ew=r(65544),e_=r(83695),ex=r(34926),ek=r(12553);function eS(e){return(0,f.jsx)(ek.J,{viewBox:"0 0 24 24",...e,children:(0,f.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var eE=r(48899);let[eT,eC]=(0,J.k)({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[eI,eP]=(0,J.k)({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),eA={info:{icon:function(e){return(0,f.jsx)(ek.J,{viewBox:"0 0 24 24",...e,children:(0,f.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},colorScheme:"blue"},warning:{icon:eS,colorScheme:"orange"},success:{icon:function(e){return(0,f.jsx)(ek.J,{viewBox:"0 0 24 24",...e,children:(0,f.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},colorScheme:"green"},error:{icon:eS,colorScheme:"red"},loading:{icon:eE.$,colorScheme:"blue"}};var eO=r(73035),eR=r(49381);let eN=(0,eR.G)(function(e,t){let{status:r="info",addRole:n=!0,...i}=(0,ew.L)(e),o=e.colorScheme??eA[r].colorScheme,s=(0,eO.j)("Alert",{...e,colorScheme:o}),a=(0,e_.k0)({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container});return(0,f.jsx)(eT,{value:{status:r},children:(0,f.jsx)(eI,{value:s,children:(0,f.jsx)(ey.m.div,{"data-status":r,role:n?"alert":void 0,ref:t,...i,className:(0,ex.cx)("chakra-alert",e.className),__css:a})})})});function ej(e){let{status:t}=eC(),r=eA[t].icon,n=eP(),i="loading"===t?n.spinner:n.icon;return(0,f.jsx)(ey.m.span,{display:"inherit","data-status":t,...e,className:(0,ex.cx)("chakra-alert__icon",e.className),__css:i,children:e.children||(0,f.jsx)(r,{h:"100%",w:"100%"})})}eN.displayName="Alert",ej.displayName="AlertIcon";let eD=(0,eR.G)(function(e,t){let r=eP(),{status:n}=eC();return(0,f.jsx)(ey.m.div,{ref:t,"data-status":n,...e,className:(0,ex.cx)("chakra-alert__title",e.className),__css:r.title})});eD.displayName="AlertTitle";let eM=(0,eR.G)(function(e,t){let{status:r}=eC(),n=eP(),i=(0,e_.k0)({display:"inline",...n.description});return(0,f.jsx)(ey.m.div,{ref:t,"data-status":r,...e,className:(0,ex.cx)("chakra-alert__desc",e.className),__css:i})});eM.displayName="AlertDescription";var eL=r(71856);let eF=e=>{let{status:t,variant:r="solid",id:n,title:i,isClosable:o,onClose:s,description:a,colorScheme:l,icon:c}=e,u=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return(0,f.jsxs)(eN,{addRole:!1,status:t,variant:r,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[(0,f.jsx)(ej,{children:c}),(0,f.jsxs)(ey.m.div,{flex:"1",maxWidth:"100%",children:[i&&(0,f.jsx)(eD,{id:u?.title,children:i}),a&&(0,f.jsx)(eM,{id:u?.description,display:"block",children:a})]}),o&&(0,f.jsx)(eL.P,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})},ez=function(e){let t=e,r=new Set,n=e=>{t=e(t),r.forEach(e=>e())};return{getState:()=>t,subscribe:t=>(r.add(t),()=>{n(()=>e),r.delete(t)}),removeToast:(e,t)=>{n(r=>({...r,[t]:r[t].filter(t=>t.id!=e)}))},notify:(e,t)=>{let r=function(e,t={}){eU+=1;let r=t.id??eU,n=t.position??"bottom";return{id:r,message:e,position:n,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ez.removeToast(String(r),n),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:i,id:o}=r;return n(e=>{let t=i.includes("top")?[r,...e[i]??[]]:[...e[i]??[],r];return{...e,[i]:t}}),o},update:(e,t)=>{e&&n(r=>{let n={...r},{position:i,index:o}=em(n,e);return i&&-1!==o&&(n[i][o]={...n[i][o],...t,message:function(e={}){let{render:t,toastComponent:r=eF}=e;return n=>"function"==typeof t?t({...n,...e}):(0,f.jsx)(r,{...n,...e})}(t)}),n})},closeAll:({positions:e}={})=>{n(t=>(e??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((e,r)=>(e[r]=t[r].map(e=>({...e,requestClose:!0})),e),{...t}))},close:e=>{n(t=>{let r=eg(t,e);return r?{...t,[r]:t[r].map(t=>t.id==e?{...t,requestClose:!0}:t)}:t})},isActive:e=>!!em(ez.getState(),e).position}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]}),eU=0;var eB=r(93977);let[eV,eq]=(0,J.k)({name:"ToastOptionsContext",strict:!1}),e$=e=>{let t=(0,g.useSyncExternalStore)(ez.subscribe,ez.getState,ez.getState),{motionVariants:r,component:n=eb,portalProps:i,animatePresenceProps:o}=e,s=Object.keys(t).map(e=>{let i=t[e];return(0,f.jsx)("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,id:`chakra-toast-manager-${e}`,style:function(e){let t=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,r=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,n=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",i=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:t,bottom:r,right:n,left:i}}(e),children:(0,f.jsx)(ec.M,{...o,initial:!1,children:i.map(e=>(0,f.jsx)(n,{motionVariants:r,...e},e.id))})},e)});return(0,f.jsx)(eB.h,{...i,children:s})},eW=(i=S.rS,function({children:e,theme:t=i,toastOptions:r,...n}){return(0,f.jsxs)(el,{theme:t,...n,children:[(0,f.jsx)(eV,{value:r?.defaultOptions,children:e}),(0,f.jsx)(e$,{...r})]})});var eH=r(54098),eG=r.n(eH),eK=r(97582),eQ=r(78287);function eY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eX(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eJ(e,t,r){return t&&eX(e.prototype,t),r&&eX(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var eZ=function(){return"function"==typeof Symbol},e0=function(e){return eZ()&&!!Symbol[e]},e1=function(e){return e0(e)?Symbol[e]:"@@"+e};eZ()&&!e0("observable")&&(Symbol.observable=Symbol("observable"));var e2=e1("iterator"),e4=e1("observable"),e5=e1("species");function e6(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw TypeError(r+" is not a function");return r}}function e3(e){var t=e.constructor;return void 0!==t&&null===(t=t[e5])&&(t=void 0),void 0!==t?t:to}function e9(e){e9.log?e9.log(e):setTimeout(function(){throw e})}function e8(e){Promise.resolve().then(function(){try{e()}catch(e){e9(e)}})}function e7(e){var t=e._cleanup;if(void 0!==t){if(e._cleanup=void 0,!t)return;try{if("function"==typeof t)t();else{var r=e6(t,"unsubscribe");r&&r.call(t)}}catch(e){e9(e)}}}function te(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function tt(e,t,r){e._state="running";var n=e._observer;try{var i=e6(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(te(e),i)i.call(n,r);else throw r;break;case"complete":te(e),i&&i.call(n)}}catch(e){e9(e)}"closed"===e._state?e7(e):"running"===e._state&&(e._state="ready")}function tr(e,t,r){if("closed"!==e._state){if("buffering"===e._state){e._queue.push({type:t,value:r});return}if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:r}],e8(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(tt(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)});return}tt(e,t,r)}}var tn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new ti(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(te(this),e7(this))},eJ(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),ti=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){tr(this._subscription,"next",e)},t.error=function(e){tr(this._subscription,"error",e)},t.complete=function(){tr(this._subscription,"complete")},eJ(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),to=function(){function e(t){if(!(this instanceof e))throw TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new tn(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(r,n){if("function"!=typeof e){n(TypeError(e+" is not a function"));return}function i(){o.unsubscribe(),r()}var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){n(e),o.unsubscribe()}},error:n,complete:r})})},t.map=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(e3(this))(function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(e3(this))(function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var r=e3(this),n=arguments.length>1,i=!1,o=arguments[1],s=o;return new r(function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(TypeError("Cannot reduce an empty sequence"));r.next(s),r.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e3(this);return new i(function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var r=e3(this);return new r(function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[e4]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var n=e6(t,e4);if(n){var i=n.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return i instanceof to&&i.constructor===r?i:new r(function(e){return i.subscribe(e)})}if(e0("iterator")&&(n=e6(t,e2)))return new r(function(e){e8(function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return eY(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eY(e,void 0)}}(e))){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new r(function(e){e8(function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}})});throw TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)(function(e){e8(function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}})})},eJ(e,null,[{key:e5,get:function(){return this}}]),e}();eZ()&&Object.defineProperty(to,Symbol("extensions"),{value:{symbol:e4,hostReportError:e9},configurable:!0});var ts=r(13154);function ta(e,t){var r=t,n=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw(0,eQ._K)(74,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&n.push(e)}),void 0===r&&((0,eQ.kG)(1===n.length,75,n.length),r=n[0].name.value),(0,eK.pi)((0,eK.pi)({},e),{definitions:(0,eK.ev)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function tl(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function tc(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return(0,eQ.kG)(n,76,r),n||null;default:return null}}var tu=r(38991),th=r(66331),td=r(88244),tf=Object.assign(function(e){return JSON.stringify(e,tp)},{reset:function(){c=new tu.L(th.Q.canonicalStringify||1e3)}});function tp(e,t){if(t&&"object"==typeof t){var r=Object.getPrototypeOf(t);if(r===Object.prototype||null===r){var n=Object.keys(t);if(n.every(tm))return t;var i=JSON.stringify(n),o=c.get(i);if(!o){n.sort();var s=JSON.stringify(n);o=c.get(s)||n,c.set(i,o),c.set(s,o)}var a=Object.create(r);return o.forEach(function(e){a[e]=t[e]}),a}}return t}function tm(e,t,r){return 0===t||r[t-1]<=e}function tg(e){return{__ref:String(e)}}function ty(e){return!!(e&&"object"==typeof e&&"string"==typeof e.__ref)}function tv(e,t,r,n){if("IntValue"===r.kind||"FloatValue"===r.kind)e[t.value]=Number(r.value);else if("BooleanValue"===r.kind||"StringValue"===r.kind)e[t.value]=r.value;else if("ObjectValue"===r.kind){var i={};r.fields.map(function(e){return tv(i,e.name,e.value,n)}),e[t.value]=i}else if("Variable"===r.kind){var o=(n||{})[r.name.value];e[t.value]=o}else if("ListValue"===r.kind)e[t.value]=r.values.map(function(e){var r={};return tv(r,t,e,n),r[t.value]});else if("EnumValue"===r.kind)e[t.value]=r.value;else if("NullValue"===r.kind)e[t.value]=null;else throw(0,eQ._K)(85,t.value,r.kind)}!1!==globalThis.__DEV__&&(0,td.zP)("canonicalStringify",function(){return c.size}),tf.reset();var tb=["connection","include","skip","client","rest","export","nonreactive"],tw=tf,t_=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(!r.connection.filter||!(r.connection.filter.length>0))return r.connection.key;var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(e){i[e]=t[e]}),"".concat(r.connection.key,"(").concat(tw(i),")")}var o=e;if(t){var s=tw(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach(function(e){-1===tb.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(tw(r[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=tw;return tw=e,t}});function tx(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(e){return tv(r,e.name,e.value,t)}),r}return null}function tk(e){return e.alias?e.alias.value:e.name.value}function tS(e,t,r){for(var n,i=0,o=t.selections;i<o.length;i++){var s=o[i];if(tE(s)){if("__typename"===s.name.value)return e[tk(s)]}else n?n.push(s):n=[s]}if("string"==typeof e.__typename)return e.__typename;if(n)for(var a=0,l=n;a<l.length;a++){var s=l[a],c=tS(e,tc(s,r).selectionSet,r);if("string"==typeof c)return c}}function tE(e){return"Field"===e.kind}function tT(e){(0,eQ.kG)(e&&"Document"===e.kind,77);var t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw(0,eQ._K)(78,e.kind);return e});return(0,eQ.kG)(t.length<=1,79,t.length),e}function tC(e){return tT(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function tI(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function tP(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function tA(e){var t=tC(e);return(0,eQ.kG)(t&&"query"===t.operation,80),t}function tO(e){tT(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw(0,eQ._K)(84)}function tR(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(e){e.defaultValue&&tv(t,e.variable.name,e.defaultValue)}),t}function tN(e,t){return t?t(e):to.of()}function tj(e){return"function"==typeof e?new tM(e):e}function tD(e){return e.request.length<=1}var tM=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return to.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(tj).reduce(function(e,t){return e.concat(t)})},e.split=function(t,r,n){var i=tj(r),o=tj(n||new e(tN));return Object.assign(new e(tD(i)&&tD(o)?function(e){return t(e)?i.request(e)||to.of():o.request(e)||to.of()}:function(e,r){return t(e)?i.request(e,r)||to.of():o.request(e,r)||to.of()}),{left:i,right:o})},e.execute=function(e,t){var r,n,i,o;return e.request((i=t.context,(n={variables:(r=function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(0>t.indexOf(i))throw(0,eQ._K)(44,i)}return e}(t)).variables||{},extensions:r.extensions||{},operationName:r.operationName,query:r.query}).operationName||(n.operationName="string"!=typeof n.query?tI(n.query)||void 0:""),o=(0,eK.pi)({},i),Object.defineProperty(n,"setContext",{enumerable:!1,value:function(e){o="function"==typeof e?(0,eK.pi)((0,eK.pi)({},o),e(o)):(0,eK.pi)((0,eK.pi)({},o),e)}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:function(){return(0,eK.pi)({},o)}}),n))||to.of()},e.concat=function(t,r){var n=tj(t);if(tD(n))return!1!==globalThis.__DEV__&&eQ.kG.warn(36,n),n;var i=tj(r);return Object.assign(new e(tD(i)?function(e){return n.request(e,function(e){return i.request(e)||to.of()})||to.of()}:function(e,t){return n.request(e,function(e){return i.request(e,t)||to.of()})||to.of()}),{left:n,right:i})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(tN)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw(0,eQ._K)(37)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}();let tL={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},tF=new Set(Object.keys(tL));function tz(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&tF.has(t)}(o=u||(u={})).QUERY="query",o.MUTATION="mutation",o.SUBSCRIPTION="subscription",(s=h||(h={})).NAME="Name",s.DOCUMENT="Document",s.OPERATION_DEFINITION="OperationDefinition",s.VARIABLE_DEFINITION="VariableDefinition",s.SELECTION_SET="SelectionSet",s.FIELD="Field",s.ARGUMENT="Argument",s.FRAGMENT_SPREAD="FragmentSpread",s.INLINE_FRAGMENT="InlineFragment",s.FRAGMENT_DEFINITION="FragmentDefinition",s.VARIABLE="Variable",s.INT="IntValue",s.FLOAT="FloatValue",s.STRING="StringValue",s.BOOLEAN="BooleanValue",s.NULL="NullValue",s.ENUM="EnumValue",s.LIST="ListValue",s.OBJECT="ObjectValue",s.OBJECT_FIELD="ObjectField",s.DIRECTIVE="Directive",s.NAMED_TYPE="NamedType",s.LIST_TYPE="ListType",s.NON_NULL_TYPE="NonNullType",s.SCHEMA_DEFINITION="SchemaDefinition",s.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",s.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",s.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",s.FIELD_DEFINITION="FieldDefinition",s.INPUT_VALUE_DEFINITION="InputValueDefinition",s.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",s.UNION_TYPE_DEFINITION="UnionTypeDefinition",s.ENUM_TYPE_DEFINITION="EnumTypeDefinition",s.ENUM_VALUE_DEFINITION="EnumValueDefinition",s.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",s.DIRECTIVE_DEFINITION="DirectiveDefinition",s.SCHEMA_EXTENSION="SchemaExtension",s.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",s.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",s.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",s.UNION_TYPE_EXTENSION="UnionTypeExtension",s.ENUM_TYPE_EXTENSION="EnumTypeExtension",s.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";let tU=Object.freeze({});function tB(e,t,r=tL){let n,i,o;let s=new Map;for(let e of Object.values(h))s.set(e,function(e,t){let r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let a=Array.isArray(e),l=[e],c=-1,u=[],d=e,f=[],p=[];do{var m,g,y;let e;let h=++c===l.length,v=h&&0!==u.length;if(h){if(i=0===p.length?void 0:f[f.length-1],d=o,o=p.pop(),v){if(a){d=d.slice();let e=0;for(let[t,r]of u){let n=t-e;null===r?(d.splice(n,1),e++):d[n]=r}}else for(let[e,t]of(d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d)),u))d[e]=t}c=n.index,l=n.keys,u=n.edits,a=n.inArray,n=n.prev}else if(o){if(null==(d=o[i=a?c:l[c]]))continue;f.push(i)}if(!Array.isArray(d)){tz(d)||function(e,t){if(!e)throw Error(t)}(!1,`Invalid AST Node: ${function e(t,r){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,r){if(null===t)return"null";if(r.includes(t))return"[Circular]";let n=[...r,t];if("function"==typeof t.toJSON){let r=t.toJSON();if(r!==t)return"string"==typeof r?r:e(r,n)}else if(Array.isArray(t))return function(t,r){if(0===t.length)return"[]";if(r.length>2)return"[Array]";let n=Math.min(10,t.length),i=t.length-n,o=[];for(let i=0;i<n;++i)o.push(e(t[i],r));return 1===i?o.push("... 1 more item"):i>1&&o.push(`... ${i} more items`),"["+o.join(", ")+"]"}(t,n);return function(t,r){let n=Object.entries(t);return 0===n.length?"{}":r.length>2?"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(t)+"]":"{ "+n.map(([t,n])=>t+": "+e(n,r)).join(", ")+" }"}(t,n)}(t,r);default:return String(t)}}(d,[])}.`);let r=h?null===(m=s.get(d.kind))||void 0===m?void 0:m.leave:null===(g=s.get(d.kind))||void 0===g?void 0:g.enter;if((e=null==r?void 0:r.call(t,d,i,o,f,p))===tU)break;if(!1===e){if(!h){f.pop();continue}}else if(void 0!==e&&(u.push([i,e]),!h)){if(tz(e))d=e;else{f.pop();continue}}}void 0===e&&v&&u.push([i,d]),h?f.pop():(n={inArray:a,index:c,keys:l,edits:u,prev:n},l=(a=Array.isArray(d))?d:null!==(y=r[d.kind])&&void 0!==y?y:[],c=-1,u=[],o&&p.push(o),o=d)}while(void 0!==n);return 0!==u.length?u[u.length-1][1]:e}function tV(e,t){var r,n=e.directives;return!n||!n.length||(r=[],n&&n.length&&n.forEach(function(e){var t;if(!("skip"!==(t=e.name.value)&&"include"!==t)){var n=e.arguments,i=e.name.value;(0,eQ.kG)(n&&1===n.length,71,i);var o=n[0];(0,eQ.kG)(o.name&&"if"===o.name.value,72,i);var s=o.value;(0,eQ.kG)(s&&("Variable"===s.kind||"BooleanValue"===s.kind),73,i),r.push({directive:e,ifArgument:o})}}),r).every(function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],(0,eQ.kG)(void 0!==i,70,r.name.value)):i=n.value.value,"skip"===r.name.value?!i:i})}function tq(e,t,r){var n=new Set(e),i=n.size;return tB(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return tU}}),r?!n.size:n.size<i}var t$=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=(0,eQ._K)(40,t,e.message);throw n.parseError=e,n}return r},tW=r(30320);function tH(e){var t={next:function(){return e.read()}};return tW.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}var tG=function(e,t,r){var n=Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},tK=r(30990),tQ=r(21436),tY=Object.prototype.hasOwnProperty;function tX(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tJ(e)}function tJ(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new t0,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var tZ=function(e,t,r){return this.merge(e[r],t[r])},t0=function(){function e(e){void 0===e&&(e=tZ),this.reconciler=e,this.isObject=ts.s,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return(0,ts.s)(t)&&(0,ts.s)(e)?(Object.keys(t).forEach(function(i){if(tY.call(e,i)){var o=e[i];if(t[i]!==o){var s=r.reconciler.apply(r,(0,eK.ev)([e,t,i],n,!1));s!==o&&((e=r.shallowCopyForMerge(e))[i]=s)}}else(e=r.shallowCopyForMerge(e))[i]=t[i]}),e):t},e.prototype.shallowCopyForMerge=function(e){return(0,ts.s)(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,eK.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}();function t1(e){return"incremental"in e}function t2(e,t){var r=e,n=new t0;return t1(t)&&(0,tQ.O)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)}),r}var t4=Object.prototype.hasOwnProperty;function t5(e,t){e.status>=300&&tG(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(r){throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}var t6=function(e){if(!e&&"undefined"==typeof fetch)throw(0,eQ._K)(38)};function t3(e){return 9===e||32===e}let t9=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function t8(e){return t7[e.charCodeAt(0)]}let t7=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],re={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>rt(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=rn("(",rt(e.variableDefinitions,", "),")"),r=rt([e.operation,rt([e.name,t]),rt(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+rn(" = ",r)+rn(" ",rt(n," "))},SelectionSet:{leave:({selections:e})=>rr(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){let o=rn("",e,": ")+t,s=o+rn("(",rt(r,", "),")");return s.length>80&&(s=o+rn("(\n",ri(rt(r,"\n")),"\n)")),rt([s,rt(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+rn(" ",rt(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>rt(["...",rn("on ",e),rt(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${rn("(",rt(r,", "),")")} on ${t} ${rn("",rt(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){let r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every(e=>0===e.length||t3(e.charCodeAt(0))),s=r.endsWith('\\"""'),a=e.endsWith('"')&&!s,l=e.endsWith("\\"),c=a||l,u=!i||e.length>70||c||o||s,h="",d=i&&t3(e.charCodeAt(0));return(u&&!d||o)&&(h+="\n"),h+=r,(u||c)&&(h+="\n"),'"""'+h+'"""'}(e):`"${e.replace(t9,t8)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+rt(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+rt(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+rn("(",rt(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>rn("",e,"\n")+rt(["schema",rt(t," "),rr(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>rn("",e,"\n")+rt(["scalar",t,rt(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>rn("",e,"\n")+rt(["type",t,rn("implements ",rt(r," & ")),rt(n," "),rr(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>rn("",e,"\n")+t+(ro(r)?rn("(\n",ri(rt(r,"\n")),"\n)"):rn("(",rt(r,", "),")"))+": "+n+rn(" ",rt(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>rn("",e,"\n")+rt([t+": "+r,rn("= ",n),rt(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>rn("",e,"\n")+rt(["interface",t,rn("implements ",rt(r," & ")),rt(n," "),rr(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>rn("",e,"\n")+rt(["union",t,rt(r," "),rn("= ",rt(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>rn("",e,"\n")+rt(["enum",t,rt(r," "),rr(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>rn("",e,"\n")+rt([t,rt(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>rn("",e,"\n")+rt(["input",t,rt(r," "),rr(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>rn("",e,"\n")+"directive @"+t+(ro(r)?rn("(\n",ri(rt(r,"\n")),"\n)"):rn("(",rt(r,", "),")"))+(n?" repeatable":"")+" on "+rt(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>rt(["extend schema",rt(e," "),rr(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>rt(["extend scalar",e,rt(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>rt(["extend type",e,rn("implements ",rt(t," & ")),rt(r," "),rr(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>rt(["extend interface",e,rn("implements ",rt(t," & ")),rt(r," "),rr(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>rt(["extend union",e,rt(t," "),rn("= ",rt(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>rt(["extend enum",e,rt(t," "),rr(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>rt(["extend input",e,rt(t," "),rr(r)]," ")}};function rt(e,t=""){var r;return null!==(r=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==r?r:""}function rr(e){return rn("{\n",ri(rt(e,"\n")),"\n}")}function rn(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ri(e){return rn("  ",e.replace(/\n/g,"\n  "))}function ro(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var rs=Object.assign(function(e){var t=d.get(e);return t||(t=tB(e,re),d.set(e,t)),t},{reset:function(){d=new tu.s(th.Q.print||2e3)}});rs.reset(),!1!==globalThis.__DEV__&&(0,td.zP)("print",function(){return d?d.size:0});var ra={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},rl=function(e,t){return t(e)};function rc(e){return new to(function(t){t.error(e)})}var ru={kind:h.FIELD,name:{kind:h.NAME,value:"__typename"}};function rh(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function rd(e,t){tT(t);for(var r,n,i,o,s=rh(""),a=rh(""),l=function(e){for(var t=0,r=void 0;t<e.length&&(r=e[t]);++t)if(!(0,tQ.k)(r)){if(r.kind===h.OPERATION_DEFINITION)return s(r.name&&r.name.value);if(r.kind===h.FRAGMENT_DEFINITION)return a(r.name.value)}return!1!==globalThis.__DEV__&&eQ.kG.error(86),null},c=0,u=t.definitions.length-1;u>=0;--u)t.definitions[u].kind===h.OPERATION_DEFINITION&&++c;var d=(r=new Map,n=new Map,e.forEach(function(e){e&&(e.name?r.set(e.name,e):e.test&&n.set(e.test,e))}),function(e){var t=r.get(e.name.value);return!t&&n.size&&n.forEach(function(r,n){n(e)&&(t=r)}),t}),f=function(e){return(0,tQ.O)(e)&&e.map(d).some(function(e){return e&&e.remove})},p=new Map,m=!1,g={enter:function(e){if(f(e.directives))return m=!0,null}},y=tB(t,{Field:g,InlineFragment:g,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var o=l(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return m=!0,null;var o=l(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:c>0&&e.selectionSet.selections.every(function(e){return e.kind===h.FIELD&&"__typename"===e.name.value})?(a(e.name.value).removed=!0,m=!0,null):void 0}},Directive:{leave:function(e){if(d(e))return m=!0,null}}});if(!m)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){v(a(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},b=new Set;y.definitions.forEach(function(e){e.kind===h.OPERATION_DEFINITION?v(s(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){b.add(e)}):e.kind!==h.FRAGMENT_DEFINITION||0!==c||a(e.name.value).removed||b.add(e.name.value)}),b.forEach(function(e){v(a(e)).fragmentSpreads.forEach(function(e){b.add(e)})});var w={enter:function(e){var t;if(t=e.name.value,!b.has(t)||a(t).removed)return null}};return!function e(t,r){return!t||t.selectionSet.selections.every(function(t){return t.kind===h.FRAGMENT_SPREAD&&e(r[t.name.value],r)})}(tC(i=tB(y,{FragmentSpread:w,FragmentDefinition:w,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(s(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,eK.pi)((0,eK.pi)({},e),{variableDefinitions:e.variableDefinitions.filter(function(e){return t.has(e.variable.name.value)})})}}}}))||((0,eQ.kG)("Document"===i.kind,81),(0,eQ.kG)(i.definitions.length<=1,82),o=i.definitions[0],(0,eQ.kG)("FragmentDefinition"===o.kind,83),o),tl(tP(i)))?i:null}var rf=Object.assign(function(e){return tB(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==h.OPERATION_DEFINITION){var n=e.selections;if(!(!n||n.some(function(e){return tE(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))&&!(tE(r)&&r.directives&&r.directives.some(function(e){return"export"===e.name.value})))return(0,eK.pi)((0,eK.pi)({},e),{selections:(0,eK.ev)((0,eK.ev)([],n,!0),[ru],!1)})}}}})},{added:function(e){return e===ru}});function rp(e){return tT(e),rd([{test:function(e){return"client"===e.name.value},remove:!0}],e)}var rm=(0,eQ.wY)(function(){return fetch}),rg=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,n=e.fetch,i=e.print,o=void 0===i?rl:i,s=e.includeExtensions,a=e.preserveHeaderCase,l=e.useGETForQueries,c=e.includeUnusedVariables,u=void 0!==c&&c,h=(0,eK._T)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);!1!==globalThis.__DEV__&&t6(n||rm);var d={http:{includeExtensions:s,preserveHeaderCase:a},options:h.fetchOptions,credentials:h.credentials,headers:h.headers};return new tM(function(e){var t,i,s,a,c,h,f,p,m=(t=e,i=r,t.getContext().uri||("function"==typeof i?i(t):i||"/graphql")),g=e.getContext(),y={};if(g.clientAwareness){var v=g.clientAwareness,b=v.name,w=v.version;b&&(y["apollographql-client-name"]=b),w&&(y["apollographql-client-version"]=w)}var _=(0,eK.pi)((0,eK.pi)({},y),g.headers),x={http:g.http,options:g.fetchOptions,credentials:g.credentials,headers:_};if(tq(["client"],e.query)){var k=rp(e.query);if(!k)return rc(Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));e.query=k}var S=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},o={};r.forEach(function(e){i=(0,eK.pi)((0,eK.pi)((0,eK.pi)({},i),e.options),{headers:(0,eK.pi)((0,eK.pi)({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),o=(0,eK.pi)((0,eK.pi)({},o),e.http)}),i.headers&&(i.headers=function(e,t){if(!t){var r={};return Object.keys(Object(e)).forEach(function(t){r[t.toLowerCase()]=e[t]}),r}var n={};Object.keys(Object(e)).forEach(function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}});var i={};return Object.keys(n).forEach(function(e){i[n[e].originalName]=n[e].value}),i}(i.headers,o.preserveHeaderCase));var s=e.operationName,a=e.extensions,l=e.variables,c=e.query,u={operationName:s,variables:l};return o.includeExtensions&&(u.extensions=a),o.includeQuery&&(u.query=t(c,rs)),{options:i,body:u}}(e,o,ra,d,x),E=S.options,T=S.body;T.variables&&!u&&(T.variables=(s=T.variables,a=e.query,c=(0,eK.pi)({},s),h=new Set(Object.keys(s)),tB(a,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&h.delete(e.name.value)}}),h.forEach(function(e){delete c[e]}),c)),E.signal||"undefined"==typeof AbortController||(p=new AbortController,E.signal=p.signal);var C="OperationDefinition"===(f=tO(e.query)).kind&&"subscription"===f.operation,I=tq(["defer"],e.query);if(l&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(E.method="GET"),I||C){E.headers=E.headers||{};var P="multipart/mixed;";C&&I&&!1!==globalThis.__DEV__&&eQ.kG.warn(39),C?P+="boundary=graphql;subscriptionSpec=1.0,application/json":I&&(P+="deferSpec=20220824,application/json"),E.headers.accept=P}if("GET"===E.method){var A=function(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=t$(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=t$(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",a=e,l=e.indexOf("#");-1!==l&&(s=e.substr(l),a=e.substr(0,l));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+r.join("&")+s}}(m,T),O=A.newURI,R=A.parseError;if(R)return rc(R);m=O}else try{E.body=t$(T,"Payload")}catch(e){return rc(e)}return new to(function(t){var r=n||(0,eQ.wY)(function(){return fetch})||rm,i=t.next.bind(t);return r(m,E).then(function(t){e.setContext({response:t});var r,n=null===(r=t.headers)||void 0===r?void 0:r.get("content-type");return null!==n&&/^multipart\/mixed/i.test(n)?function(e,t){return(0,eK.mG)(this,void 0,void 0,function(){var r,n,i,o,s,a,l,c,u,h,d,f,p,m,g,y,v,b,w,_,x,k,S;return(0,eK.Jh)(this,function(E){switch(E.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");r=new TextDecoder("utf-8"),n=null===(S=e.headers)||void 0===S?void 0:S.get("content-type"),i="boundary=",o=(null==n?void 0:n.includes(i))?null==n?void 0:n.substring((null==n?void 0:n.indexOf(i))+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",s="\r\n--".concat(o),a="",l=function(e){var t,r,n,i,o,s,a=e;if(e.body&&(a=e.body),t=a,tW.DN&&t[Symbol.asyncIterator])return n=a[Symbol.asyncIterator](),(r={next:function(){return n.next()}})[Symbol.asyncIterator]=function(){return this},r;if(a.getReader)return tH(a.getReader());if(a.stream)return tH(a.stream().getReader());if(a.arrayBuffer)return i=a.arrayBuffer(),o=!1,s={next:function(){return o?Promise.resolve({value:void 0,done:!0}):(o=!0,new Promise(function(e,t){i.then(function(t){e({value:t,done:!1})}).catch(t)}))}},tW.DN&&(s[Symbol.asyncIterator]=function(){return this}),s;if(a.pipe)return function(e){var t=null,r=null,n=!1,i=[],o=[];function s(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function a(e){r=e,o.slice().forEach(function(t){t[1](e)}),t&&t()}function l(){n=!0,o.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",l),e.removeListener("finish",l),e.removeListener("close",l)},e.on("data",s),e.on("error",a),e.on("end",l),e.on("finish",l),e.on("close",l);var c={next:function(){return new Promise(function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])})}};return tW.DN&&(c[Symbol.asyncIterator]=function(){return this}),c}(a);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}(e),c=!0,E.label=1;case 1:if(!c)return[3,3];return[4,l.next()];case 2:for(h=(u=E.sent()).value,d=u.done,f="string"==typeof h?h:r.decode(h),p=a.length-s.length+1,c=!d,a+=f,m=a.indexOf(s,p);m>-1;){if(g=void 0,g=(x=[a.slice(0,m),a.slice(m+s.length)])[0],a=x[1],y=g.indexOf("\r\n\r\n"),(v=function(e){var t={};return e.split("\n").forEach(function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}}),t}(g.slice(0,y))["content-type"])&&-1===v.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(b=g.slice(y)){if(Object.keys(w=t5(e,b)).length>1||"data"in w||"incremental"in w||"errors"in w||"payload"in w){if((0,ts.s)(w)&&"payload"in w){if(_={},"payload"in w){if(1===Object.keys(w).length&&null===w.payload)return[2];_=(0,eK.pi)({},w.payload)}"errors"in w&&(_=(0,eK.pi)((0,eK.pi)({},_),{extensions:(0,eK.pi)((0,eK.pi)({},"extensions"in _?_.extensions:null),((k={})[tK.YG]=w.errors,k))})),t(_)}else t(w)}else if(1===Object.keys(w).length&&"hasNext"in w&&!w.hasNext)return[2]}m=a.indexOf(s)}return[3,1];case 3:return[2]}})})}(t,i):t.text().then(function(e){return t5(t,e)}).then(function(r){return Array.isArray(r)||t4.call(r,"data")||t4.call(r,"errors")||tG(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),r}).then(i)}).then(function(){p=void 0,t.complete()}).catch(function(e){p=void 0,e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}),function(){p&&p.abort()}})})},ry=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,rg(t).request)||this;return r.options=t,r}return(0,eK.ZT)(t,e),t}(tM),rv=tM.execute,rb=r(49379),rw=r(30020);let r_=()=>Object.create(null),{forEach:rx,slice:rk}=Array.prototype,{hasOwnProperty:rS}=Object.prototype;class rE{constructor(e=!0,t=r_){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return rx.call(e,e=>t=t.getChildTrie(e)),rS.call(t,"data")?t.data:t.data=this.makeData(rk.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let r=0,n=e.length;t&&r<n;++r){let n=t.mapFor(e[r],!1);t=n&&n.get(e[r])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){let r=e[0],n=this.mapFor(r,!1),i=n&&n.get(r);!i||(t=i.removeArray(rk.call(e,1)),i.data||i.weak||i.strong&&i.strong.size||n.delete(r))}else t=this.data,delete this.data;return t}getChildTrie(e){let t=this.mapFor(e,!0),r=t.get(e);return r||t.set(e,r=new rE(this.weakness,this.makeData)),r}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}var rT=r(99869);let rC=()=>Object.create(null),{forEach:rI,slice:rP}=Array.prototype,{hasOwnProperty:rA}=Object.prototype;class rO{constructor(e=!0,t=rC){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return rI.call(e,e=>t=t.getChildTrie(e)),rA.call(t,"data")?t.data:t.data=this.makeData(rP.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let r=0,n=e.length;t&&r<n;++r){let n=this.weakness&&rR(e[r])?t.weak:t.strong;t=n&&n.get(e[r])}return t&&t.data}getChildTrie(e){let t=this.weakness&&rR(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=t.get(e);return r||t.set(e,r=new rO(this.weakness,this.makeData)),r}}function rR(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}var rN=r(2379);let rj=null,rD={},rM=1;function rL(e){try{return e()}catch(e){}}let rF="@wry/context:Slot",rz=rL(()=>globalThis)||rL(()=>global)||Object.create(null),rU=rz[rF]||Array[rF]||function(e){try{Object.defineProperty(rz,rF,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",rM++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=rj;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===rD)break;return e!==rj&&(rj.slots[this.id]=t),!0}return rj&&(rj.slots[this.id]=rD),!1}getValue(){if(this.hasValue())return rj.slots[this.id]}withValue(e,t,r,n){let i={__proto__:null,[this.id]:e},o=rj;rj={parent:o,slots:i};try{return t.apply(n,r)}finally{rj=o}}static bind(e){let t=rj;return function(){let r=rj;try{return rj=t,e.apply(this,arguments)}finally{rj=r}}}static noContext(e,t,r){if(!rj)return e.apply(r,t);{let n=rj;try{return rj=null,e.apply(r,t)}finally{rj=n}}}}),{bind:rB,noContext:rV}=rU,rq=new rU,{hasOwnProperty:r$}=Object.prototype,rW=Array.from||function(e){let t=[];return e.forEach(e=>t.push(e)),t};function rH(e){let{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}let rG=[];function rK(e,t){if(!e)throw Error(t||"assertion failure")}function rQ(e,t){let r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function rY(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}class rX{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++rX.count}peek(){if(1===this.value.length&&!r0(this))return rJ(this),this.value[0]}recompute(e){var t;return rK(!this.recomputing,"already recomputing"),rJ(this),r0(this)&&(r6(this),rq.withValue(this,rZ,[this,e]),function(e,t){if("function"==typeof e.subscribe)try{rH(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(this,e)&&(this.dirty=!1,r0(this)||(t=this,r1(t,r4)))),rY(this.value)}setDirty(){this.dirty||(this.dirty=!0,r1(this,r2),rH(this))}dispose(){this.setDirty(),r6(this),r1(this,(e,t)=>{e.setDirty(),r3(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=rG.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(rW(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),rG.push(this.deps),this.deps=null)}}function rJ(e){let t=rq.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),r0(e)?r2(t,e):r4(t,e),t}function rZ(e,t){let r;e.recomputing=!0;let{normalizeResult:n}=e;n&&1===e.value.length&&(r=e.value.slice(0)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!rQ(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(e){}}catch(t){e.value[1]=t}e.recomputing=!1}function r0(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function r1(e,t){let r=e.parents.size;if(r){let n=rW(e.parents);for(let i=0;i<r;++i)t(n[i],e)}}function r2(e,t){rK(e.childValues.has(t)),rK(r0(t));let r=!r0(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=rG.pop()||new Set;e.dirtyChildren.add(t),r&&r1(e,r2)}function r4(e,t){rK(e.childValues.has(t)),rK(!r0(t));let r=e.childValues.get(t);0===r.length?e.childValues.set(t,t.value.slice(0)):rQ(r,t.value)||e.setDirty(),r5(e,t),r0(e)||r1(e,r4)}function r5(e,t){let r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(rG.length<100&&rG.push(r),e.dirtyChildren=null))}function r6(e){e.childValues.size>0&&e.childValues.forEach((t,r)=>{r3(e,r)}),e.forgetDeps(),rK(null===e.dirtyChildren)}function r3(e,t){t.parents.delete(e),e.childValues.delete(t),r5(e,t)}rX.count=0;let r9={setDirty:!0,dispose:!0,forget:!0};function r8(e){let t=new Map,r=e&&e.subscribe;function n(e){let n=rq.getValue();if(n){let i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(rH(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){let n=t.get(e);if(n){let i=r&&r$.call(r9,r)?r:"setDirty";rW(n).forEach(e=>e[i]()),t.delete(e),rH(n)}},n}function r7(...e){return(n||(n=new rO("function"==typeof WeakMap))).lookupArray(e)}let ne=new Set;function nt(e,{max:t=65536,keyArgs:r,makeCacheKey:n=r7,normalizeResult:i,subscribe:o,cache:s=rN.e}=Object.create(null)){let a="function"==typeof s?new s(t,e=>e.dispose()):s,l=function(){let t=n.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let s=a.get(t);s||(a.set(t,s=new rX(e)),s.normalizeResult=i,s.subscribe=o,s.forget=()=>a.delete(t));let l=s.recompute(Array.prototype.slice.call(arguments));return a.set(t,s),ne.add(a),rq.hasValue()||(ne.forEach(e=>e.clean()),ne.clear()),l};function c(e){let t=e&&a.get(e);t&&t.setDirty()}function u(e){let t=e&&a.get(e);if(t)return t.peek()}function h(e){return!!e&&a.delete(e)}return Object.defineProperty(l,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:o,cache:a}),l.dirtyKey=c,l.dirty=function(){c(n.apply(null,arguments))},l.peekKey=u,l.peek=function(){return u(n.apply(null,arguments))},l.forgetKey=h,l.forget=function(){return h(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(l)}function nr(e){return e}var nn=function(){function e(e,t){void 0===t&&(t=Object.create(null)),this.resultCache=tW.sy?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}return e.prototype.getCacheKey=function(e){return[e]},e.identity=function(){return new e(nr,{cache:!1})},e.split=function(t,r,n){return void 0===n&&(n=e.identity()),Object.assign(new e(function(e){return(t(e)?r:n).transformDocument(e)},{cache:!1}),{left:r,right:n})},e.prototype.resetCache=function(){var t=this;if(this.cached){var r=new rE(tW.mr);this.performWork=nt(e.prototype.performWork.bind(this),{makeCacheKey:function(e){var n=t.getCacheKey(e);if(n)return(0,eQ.kG)(Array.isArray(n),69),r.lookupArray(n)},max:th.Q["documentTransform.cache"],cache:rT.k})}},e.prototype.performWork=function(e){return tT(e),this.transform(e)},e.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},e.prototype.concat=function(t){var r=this;return Object.assign(new e(function(e){return t.transformDocument(r.transformDocument(e))},{cache:!1}),{left:this,right:t})},e}();function ni(e,t,r){return new to(function(n){var i={then:function(e){return new Promise(function(t){return t(e())})}};function o(e,t){return function(r){if(e){var o=function(){return n.closed?0:e(r)};i=i.then(o,o).then(function(e){return n.next(e)},function(e){return n.error(e)})}else n[t](r)}}var s={next:o(t,"next"),error:o(r,"error"),complete:function(){i.then(function(){return n.complete()})}},a=e.subscribe(s);return function(){return a.unsubscribe()}})}function no(e){var t=ns(e);return(0,tQ.O)(t)}function ns(e){var t=(0,tQ.O)(e.errors)?e.errors.slice(0):[];return t1(e)&&(0,tQ.O)(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}var na=r(60897);function nl(e,t,r){var n=[];e.forEach(function(e){return e[t]&&n.push(e)}),n.forEach(function(e){return e[t](r)})}function nc(e){function t(t){Object.defineProperty(e,t,{value:to})}return tW.aS&&Symbol.species&&t(Symbol.species),t("@@species"),e}function nu(e){return e&&"function"==typeof e.then}var nh=function(e){function t(t){var r=e.call(this,function(e){return r.addObserver(e),function(){return r.removeObserver(e)}})||this;return r.observers=new Set,r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),nl(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),nl(r.observers,"error",e))},complete:function(){var e=r.sub,t=r.sources;if(null!==e){var n=(void 0===t?[]:t).shift();n?nu(n)?n.then(function(e){return r.sub=e.subscribe(r.handlers)},r.handlers.error):r.sub=n.subscribe(r.handlers):(e&&setTimeout(function(){return e.unsubscribe()}),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),nl(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.error(e)},r.promise.catch(function(e){}),"function"==typeof t&&(t=[new to(t)]),nu(t)?t.then(function(e){return r.start(e)},r.handlers.error):r.start(t),r}return(0,eK.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach(function(r){return r(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(r,n){t||(t=!0,e(r,n))})},t}(to);nc(nh);var nd=r(1644),nf=r(53712),np=Object.prototype.toString;function nm(e,t){switch(np.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(e,n){r[n]=nm(e,t)}),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(r){n[r]=nm(e[r],t)}),n;default:return e}}function ng(e,t,r,n){var i=t.data,o=(0,eK._T)(t,["data"]),s=r.data,a=(0,eK._T)(r,["data"]);return(0,rw.Z)(o,a)&&function e(t,r,n,i){if(r===n)return!0;var o=new Set;return t.selections.every(function(t){if(o.has(t)||(o.add(t),!tV(t,i.variables)||ny(t)))return!0;if(tE(t)){var s=tk(t),a=r&&r[s],l=n&&n[s],c=t.selectionSet;if(!c)return(0,rw.Z)(a,l);var u=Array.isArray(a),h=Array.isArray(l);if(u!==h)return!1;if(u&&h){var d=a.length;if(l.length!==d)return!1;for(var f=0;f<d;++f)if(!e(c,a[f],l[f],i))return!1;return!0}return e(c,a,l,i)}var p=tc(t,i.fragmentMap);if(p)return!!ny(p)||e(p.selectionSet,r,n,i)})}(tO(e).selectionSet,i,s,{fragmentMap:tl(tP(e)),variables:n})}function ny(e){return!!e.directives&&e.directives.some(nv)}function nv(e){return"nonreactive"===e.name.value}var nb=Object.assign,nw=Object.hasOwnProperty,n_=function(e){function t(t){var r=t.queryManager,n=t.queryInfo,i=t.options,o=e.call(this,function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=nk)}catch(e){}var r=!o.observers.size;o.observers.add(e);var n=o.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&o.reobserve().catch(function(){}),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}})||this;o.observers=new Set,o.subscriptions=new Set,o.queryInfo=n,o.queryManager=r,o.waitForOwnResult=nE(i.fetchPolicy),o.isTornDown=!1,o.subscribeToMore=o.subscribeToMore.bind(o);var s=r.defaultOptions.watchQuery,a=(void 0===s?{}:s).fetchPolicy,l=void 0===a?"cache-first":a,c=i.fetchPolicy,u=void 0===c?l:c,h=i.initialFetchPolicy,d=void 0===h?"standby"===u?l:u:h;o.options=(0,eK.pi)((0,eK.pi)({},i),{initialFetchPolicy:d,fetchPolicy:u}),o.queryId=n.queryId||r.generateQueryId();var f=tC(o.query);return o.queryName=f&&f.name&&f.name.value,o}return(0,eK.ZT)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise(function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:r},i=e.subscribe(n)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||nd.Ie.ready,n=(0,eK.pi)((0,eK.pi)({},t),{loading:(0,nd.Oj)(r),networkStatus:r}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if(nE(o)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var s=this.queryInfo.getDiff();(s.complete||this.options.returnPartialData)&&(n.data=s.result),(0,rw.D)(n.data,{})&&(n.data=void 0),s.complete?(delete n.partial,s.complete&&n.networkStatus===nd.Ie.loading&&("cache-first"===o||"cache-only"===o)&&(n.networkStatus=nd.Ie.ready,n.loading=!1)):n.partial=!0,!1===globalThis.__DEV__||s.complete||this.options.partialRefetch||n.loading||n.data||n.error||nS(s.missing)}return e&&this.updateLastResult(n),n},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||(this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!ng(this.query,this.last.result,e,this.variables):!(0,rw.D)(this.last.result,e))||t&&!(0,rw.D)(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||(0,rw.D)(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},n=this.options.fetchPolicy;if("cache-and-network"===n?r.fetchPolicy=n:"no-cache"===n?r.fetchPolicy="no-cache":r.fetchPolicy="network-only",!1!==globalThis.__DEV__&&e&&nw.call(e,"variables")){var i=tA(this.query),o=i.variableDefinitions;o&&o.some(function(e){return"variables"===e.variable.name.value})||!1===globalThis.__DEV__||eQ.kG.warn(20,e,(null===(t=i.name)||void 0===t?void 0:t.value)||i)}return e&&!(0,rw.D)(this.options.variables,e)&&(r.variables=this.options.variables=(0,eK.pi)((0,eK.pi)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,nd.Ie.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,eK.pi)((0,eK.pi)({},e.query?e:(0,eK.pi)((0,eK.pi)((0,eK.pi)((0,eK.pi)({},this.options),{query:this.options.query}),e),{variables:(0,eK.pi)((0,eK.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"});r.query=this.transformDocument(r.query);var n=this.queryManager.generateQueryId();this.lastQuery=e.query?this.transformDocument(this.options.query):r.query;var i=this.queryInfo,o=i.networkStatus;i.networkStatus=nd.Ie.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var s=new Set,a=null==e?void 0:e.updateQuery,l="no-cache"!==this.options.fetchPolicy;return l||(0,eQ.kG)(a,21),this.queryManager.fetchQuery(n,r,nd.Ie.fetchMore).then(function(c){if(t.queryManager.removeQuery(n),i.networkStatus===nd.Ie.fetchMore&&(i.networkStatus=o),l)t.queryManager.cache.batch({update:function(n){var i=e.updateQuery;i?n.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return i(e,{fetchMoreResult:c.data,variables:r.variables})}):n.writeQuery({query:r.query,variables:r.variables,data:c.data})},onWatchUpdated:function(e){s.add(e.query)}});else{var u=t.getLast("result"),h=a(u.data,{fetchMoreResult:c.data,variables:r.variables});t.reportResult((0,eK.pi)((0,eK.pi)({},u),{data:h}),t.variables)}return c}).finally(function(){l&&!s.has(t.query)&&nx(t)})},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery(function(e,t){return n(e,{subscriptionData:r,variables:t.variables})})},error:function(t){if(e.onError){e.onError(t);return}!1!==globalThis.__DEV__&&eQ.kG.error(22,t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.silentSetOptions=function(e){var t=(0,nf.o)(this.options,e||{});nb(this.options,t)},t.prototype.setVariables=function(e){return(0,rw.D)(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size)?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},nd.Ie.setVariables):Promise.resolve()},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):"variables-changed"===e?t.fetchPolicy=o:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t,r){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,e,t,r)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(!r||!this.hasObservers()){t&&(clearTimeout(t.timeout),delete this.pollingInfo);return}if(!t||t.interval!==r){(0,eQ.kG)(r,23),(t||(this.pollingInfo={})).interval=r;var n=function(){var t,r;e.pollingInfo&&((0,nd.Oj)(e.queryInfo.networkStatus)||(null===(r=(t=e.options).skipPollAttempt)||void 0===r?void 0:r.call(t))?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},nd.Ie.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}},t.prototype.updateLastResult=function(e,t){void 0===t&&(t=this.variables);var r=this.getLastError();return r&&this.last&&!(0,rw.D)(t,this.last.variables)&&(r=void 0),this.last=(0,eK.pi)({result:this.queryManager.assumeImmutableResults?e:nm(e),variables:t},r?{error:r}:null)},t.prototype.reobserveAsConcast=function(e,t){var r=this;this.isTornDown=!1;var n=t===nd.Ie.refetch||t===nd.Ie.fetchMore||t===nd.Ie.poll,i=this.options.variables,o=this.options.fetchPolicy,s=(0,nf.o)(this.options,e||{}),a=n?s:nb(this.options,s),l=this.transformDocument(a.query);this.lastQuery=l,!n&&(this.updatePolling(),e&&e.variables&&!(0,rw.D)(e.variables,i)&&"standby"!==a.fetchPolicy&&(a.fetchPolicy===o||"function"==typeof a.nextFetchPolicy)&&(this.applyNextFetchPolicy("variables-changed",a),void 0===t&&(t=nd.Ie.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=nE(a.fetchPolicy));var c=function(){r.concast===d&&(r.waitForOwnResult=!1)},u=a.variables&&(0,eK.pi)({},a.variables),h=this.fetch(a,t,l),d=h.concast,f=h.fromLink,p={next:function(e){(0,rw.D)(r.variables,u)&&(c(),r.reportResult(e,u))},error:function(e){(0,rw.D)(r.variables,u)&&((0,tK.MS)(e)||(e=new tK.cA({networkError:e})),c(),r.reportError(e,u))}};return n||!f&&this.concast||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=d,this.observer=p),d.addObserver(p),d},t.prototype.reobserve=function(e,t){return this.reobserveAsConcast(e,t).promise},t.prototype.resubscribeAfterError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.last;this.resetLastResults();var n=this.subscribe.apply(this,e);return this.last=r,n},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError(),n=this.isDifferentFromLastResult(e,t);(r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),(r||n)&&nl(this.observers,"next",e)},t.prototype.reportError=function(e,t){var r=(0,eK.pi)((0,eK.pi)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:nd.Ie.error,loading:!1});this.updateLastResult(r,t),nl(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t}(to);function nx(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,t){return(this.nextFetchPolicy=n,"function"==typeof this.nextFetchPolicy)?this.nextFetchPolicy(e,t):r}}):e.reobserve()}function nk(e){!1!==globalThis.__DEV__&&eQ.kG.error(24,e.message,e.stack)}function nS(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&eQ.kG.debug(25,e)}function nE(e){return"network-only"===e||"no-cache"===e||"standby"===e}nc(n_);var nT=new(tW.mr?WeakMap:Map);function nC(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return nT.set(e,(nT.get(e)+1)%1e15),r.apply(this,arguments)})}function nI(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var nP=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;nT.has(r)||(nT.set(r,0),nC(r,"evict"),nC(r,"modify"),nC(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||nd.Ie.loading;return this.variables&&this.networkStatus!==nd.Ie.loading&&!(0,rw.D)(this.variables,e.variables)&&(t=nd.Ie.setVariables),(0,rw.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){nI(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,rw.D)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(e);return this.updateLastDiff(r,e),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,r=this,n=this.lastDiff&&this.lastDiff.diff;!(e&&!e.complete&&(null===(t=this.observableQuery)||void 0===t?void 0:t.getLastError()))&&(this.updateLastDiff(e),this.dirty||(0,rw.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():nx(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;nI(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,nd.Oj)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var n=(0,eK.pi)((0,eK.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,rw.D)(n,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=n))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===nT.get(this.cache)&&(0,rw.D)(t,r.variables)&&(0,rw.D)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new t0,s=(0,tQ.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,tQ.O)(e.incremental)){var a=t2(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var l=this.getDiff();e.data=o.merge(l.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(nA(e,r.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:nT.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var s=i.getDiffOptions(r.variables),a=o.diff(s);!i.stopped&&(0,rw.D)(i.variables,r.variables)&&i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=nd.Ie.ready},e.prototype.markError=function(e){return this.networkStatus=nd.Ie.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function nA(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!no(e);return!n&&r&&e.data&&(n=!0),n}var nO=Object.prototype.hasOwnProperty,nR=Object.create(null),nN=function(){function e(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new tu.s(th.Q["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new rE(!1);var r=new nn(function(e){return t.cache.transformDocument(e)},{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults;var n=e.documentTransform;this.documentTransform=n?r.concat(n).concat(r):r,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.cancelPendingFetches((0,eQ._K)(26))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){return(0,eK.mG)(this,arguments,void 0,function(e){var t,r,n,i,o,s,a,l=e.mutation,c=e.variables,u=e.optimisticResponse,h=e.updateQueries,d=e.refetchQueries,f=void 0===d?[]:d,p=e.awaitRefetchQueries,m=void 0!==p&&p,g=e.update,y=e.onQueryUpdated,v=e.fetchPolicy,b=void 0===v?(null===(s=this.defaultOptions.mutate)||void 0===s?void 0:s.fetchPolicy)||"network-only":v,w=e.errorPolicy,_=void 0===w?(null===(a=this.defaultOptions.mutate)||void 0===a?void 0:a.errorPolicy)||"none":w,x=e.keepRootFields,k=e.context;return(0,eK.Jh)(this,function(e){switch(e.label){case 0:if((0,eQ.kG)(l,27),(0,eQ.kG)("network-only"===b||"no-cache"===b,28),t=this.generateMutationId(),l=this.cache.transformForLink(this.transform(l)),r=this.getDocumentInfo(l).hasClientExports,c=this.getVariables(l,c),!r)return[3,2];return[4,this.localState.addExportedVariables(l,c,k)];case 1:c=e.sent(),e.label=2;case 2:return n=this.mutationStore&&(this.mutationStore[t]={mutation:l,variables:c,loading:!0,error:null}),i=u&&this.markMutationOptimistic(u,{mutationId:t,document:l,variables:c,fetchPolicy:b,errorPolicy:_,context:k,updateQueries:h,update:g,keepRootFields:x}),this.broadcastQueries(),o=this,[2,new Promise(function(e,r){return ni(o.getObservableFromLink(l,(0,eK.pi)((0,eK.pi)({},k),{optimisticResponse:i?u:void 0}),c,{},!1),function(e){if(no(e)&&"none"===_)throw new tK.cA({graphQLErrors:ns(e)});n&&(n.loading=!1,n.error=null);var r=(0,eK.pi)({},e);return"function"==typeof f&&(f=f(r)),"ignore"===_&&no(r)&&delete r.errors,o.markMutationResult({mutationId:t,result:r,document:l,variables:c,fetchPolicy:b,errorPolicy:_,context:k,update:g,updateQueries:h,awaitRefetchQueries:m,refetchQueries:f,removeOptimistic:i?t:void 0,onQueryUpdated:y,keepRootFields:x})}).subscribe({next:function(t){o.broadcastQueries(),"hasNext"in t&&!1!==t.hasNext||e(t)},error:function(e){n&&(n.loading=!1,n.error=e),i&&o.cache.removeOptimistic(t),o.broadcastQueries(),r(e instanceof tK.cA?e:new tK.cA({networkError:e}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var n=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&nA(n,e.errorPolicy)){if(t1(n)||i.push({result:n.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),t1(n)&&(0,tQ.O)(n.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),a=void 0;s.result&&(a=t2(s.result,n)),void 0!==a&&(n.data=a,i.push({result:a,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var l=e.updateQueries;l&&this.queries.forEach(function(e,o){var s=e.observableQuery,a=s&&s.queryName;if(a&&nO.call(l,a)){var c=l[a],u=r.queries.get(o),h=u.document,d=u.variables,f=t.diff({query:h,variables:d,returnPartialData:!0,optimistic:!1}),p=f.result;if(f.complete&&p){var m=c(p,{mutationResult:n,queryName:h&&tI(h)||void 0,queryVariables:d});m&&i.push({result:m,dataId:"ROOT_QUERY",query:h,variables:d})}}})}if(i.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach(function(e){return t.write(e)});var s,a=e.update,l=!(t1(s=n)||"hasNext"in s&&"data"in s)||t1(n)&&!n.hasNext;if(a){if(!o){var c=t.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});c.complete&&("incremental"in(n=(0,eK.pi)((0,eK.pi)({},n),{data:c.result}))&&delete n.incremental,"hasNext"in n&&delete n.hasNext)}l&&a(t,n,{context:e.context,variables:e.variables})}o||e.keepRootFields||!l||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return c.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then(function(){return n})}return Promise.resolve(n)},e.prototype.markMutationOptimistic=function(e,t){var r=this,n="function"==typeof e?e(t.variables,{IGNORE:nR}):e;return n!==nR&&(this.cache.recordOptimisticTransaction(function(e){try{r.markMutationResult((0,eK.pi)((0,eK.pi)({},t),{result:{data:n}}),e)}catch(e){!1!==globalThis.__DEV__&&eQ.kG.error(e)}},t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,r){return this.fetchConcastWithInfo(e,t,r).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var r={hasClientExports:e&&tq(["client","export"],e,!0),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:tq(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:rd([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:tR(tC(e)),asQuery:(0,eK.pi)((0,eK.pi)({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,eK.pi)((0,eK.pi)({},e),{operation:"query"}):e})})};t.set(e,r)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,eK.pi)((0,eK.pi)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=(0,eK.pi)((0,eK.pi)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=new nP(this),n=new n_({queryManager:this,queryInfo:r,options:e});return n.lastQuery=t,this.queries.set(n.queryId,r),r.init({document:t,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),(0,eQ.kG)(e.query,29),(0,eQ.kG)("Document"===e.query.kind,30),(0,eQ.kG)(!e.returnPartialData,31),(0,eQ.kG)(!e.pollInterval,32),this.fetchQuery(t,(0,eK.pi)((0,eK.pi)({},e),{query:this.transform(e.query)})).finally(function(){return r.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,eQ._K)(33)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=nd.Ie.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,n=new Map,i=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?n.set(e,!1):(0,ts.s)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)?n.set(t.transform(e),!1):(0,ts.s)(e)&&e.query&&i.add(e)}),this.queries.forEach(function(t,i){var o=t.observableQuery,s=t.document;if(o){if("all"===e){r.set(i,o);return}var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&n.has(a)||s&&n.has(s))&&(r.set(i,o),a&&n.set(a,!0),s&&n.set(s,!0))}}),i.size&&i.forEach(function(e){var n=(0,na.X)("legacyOneTimeQuery"),i=t.getQuery(n).init({document:e.query,variables:e.variables}),o=new n_({queryManager:t,queryInfo:i,options:(0,eK.pi)((0,eK.pi)({},e),{fetchPolicy:"network-only"})});(0,eQ.kG)(o.queryId===n),i.setObservableQuery(o),r.set(n,o)}),!1!==globalThis.__DEV__&&n.size&&n.forEach(function(e,t){e||!1===globalThis.__DEV__||eQ.kG.warn("string"==typeof t?34:35,t)}),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach(function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=void 0===i?"none":i,s=e.variables,a=e.context,l=void 0===a?{}:a,c=e.extensions,u=void 0===c?{}:c;r=this.transform(r),s=this.getVariables(r,s);var h=function(e){return t.getObservableFromLink(r,l,e,u).map(function(i){"no-cache"!==n&&(nA(i,o)&&t.cache.write({query:r,result:i.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var s=no(i),a=(0,tK.ls)(i);if(s||a){var l={};if(s&&(l.graphQLErrors=i.errors),a&&(l.protocolErrors=i.extensions[tK.YG]),"none"===o||a)throw new tK.cA(l)}return"ignore"===o&&delete i.errors,i})};if(this.getDocumentInfo(r).hasClientExports){var d=this.localState.addExportedVariables(r,s,l).then(h);return new to(function(e){var t=null;return d.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return h(s)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n,i){var o,s,a=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var l=this.getDocumentInfo(e),c=l.serverQuery,u=l.clientQuery;if(c){var h=this.inFlightLinkObservables,d=this.link,f={query:c,variables:r,operationName:tI(c)||void 0,context:this.prepareContext((0,eK.pi)((0,eK.pi)({},t),{forceFetch:!i})),extensions:n};if(t=f.context,i){var p=rs(c),m=tf(r),g=h.lookup(p,m);if(!(s=g.observable)){var y=new nh([rv(d,f)]);s=g.observable=y,y.beforeNext(function(){h.remove(p,m)})}}else s=new nh([rv(d,f)])}else s=new nh([to.of({data:{}})]),t=this.prepareContext(t);return u&&(s=ni(s,function(e){return a.localState.runResolvers({document:u,remoteResult:e,context:t,variables:r})})),s},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(r.query);return ni(this.getObservableFromLink(i,r.context,r.variables),function(o){var s=ns(o),a=s.length>0,l=r.errorPolicy;if(n>=e.lastRequestId){if(a&&"none"===l)throw e.markError(new tK.cA({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var c={data:o.data,loading:!1,networkStatus:nd.Ie.ready};return a&&"none"===l&&(c.data=void 0),a&&"ignore"!==l&&(c.errors=s,c.networkStatus=nd.Ie.error),c},function(t){var r=(0,tK.MS)(t)?t:new tK.cA({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r})},e.prototype.fetchConcastWithInfo=function(e,t,r,n){var i,o,s=this;void 0===r&&(r=nd.Ie.loading),void 0===n&&(n=t.query);var a=this.getVariables(n,t.variables),l=this.getQuery(e),c=this.defaultOptions.watchQuery,u=t.fetchPolicy,h=void 0===u?c&&c.fetchPolicy||"cache-first":u,d=t.errorPolicy,f=void 0===d?c&&c.errorPolicy||"none":d,p=t.returnPartialData,m=t.notifyOnNetworkStatusChange,g=t.context,y=Object.assign({},t,{query:n,variables:a,fetchPolicy:h,errorPolicy:f,returnPartialData:void 0!==p&&p,notifyOnNetworkStatusChange:void 0!==m&&m,context:void 0===g?{}:g}),v=function(e){y.variables=e;var n=s.fetchQueryByPolicy(l,y,r);return"standby"!==y.fetchPolicy&&n.sources.length>0&&l.observableQuery&&l.observableQuery.applyNextFetchPolicy("after-fetch",t),n},b=function(){return s.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){b(),setTimeout(function(){return i.cancel(e)})}),this.getDocumentInfo(y.query).hasClientExports)i=new nh(this.localState.addExportedVariables(y.query,y.variables,y.context).then(v).then(function(e){return e.sources})),o=!0;else{var w=v(y.variables);o=w.fromLink,i=new nh(w.sources)}return i.promise.then(b,b),{concast:i,fromLink:o}},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?(0,na.X)("refetchQueries"):void 0:s,l=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach(function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})});var u=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof nP&&e.watcher.observableQuery;if(n){if(l){c.delete(n.queryId);var i=l(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&u.set(n,i),i}null!==l&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach(function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(l){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=l(i,s,o)}l&&!0!==n||(n=i.refetch()),!1!==n&&u.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)}),a&&this.cache.removeOptimistic(a),u},e.prototype.fetchQueryByPolicy=function(e,t,r){var n=this,i=t.query,o=t.variables,s=t.fetchPolicy,a=t.refetchWritePolicy,l=t.errorPolicy,c=t.returnPartialData,u=t.context,h=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:i,variables:o,networkStatus:r});var f=function(){return e.getDiff()},p=function(t,r){void 0===r&&(r=e.networkStatus||nd.Ie.loading);var s=t.result;!1===globalThis.__DEV__||c||(0,rw.D)(s,{})||nS(t.missing);var a=function(e){return to.of((0,eK.pi)({data:e,loading:(0,nd.Oj)(r),networkStatus:r},t.complete?null:{partial:!0}))};return s&&n.getDocumentInfo(i).hasForcedResolvers?n.localState.runResolvers({document:i,remoteResult:{data:s},context:u,variables:o,onlyRunForcedResolvers:!0}).then(function(e){return a(e.data||void 0)}):"none"===l&&r===nd.Ie.refetch&&Array.isArray(t.missing)?a(void 0):a(s)},m="no-cache"===s?0:r===nd.Ie.refetch&&"merge"!==a?1:2,g=function(){return n.getResultsFromLink(e,m,{query:i,variables:o,context:u,fetchPolicy:s,errorPolicy:l})},y=h&&"number"==typeof d&&d!==r&&(0,nd.Oj)(r);switch(s){default:case"cache-first":var v=f();if(v.complete)return{fromLink:!1,sources:[p(v,e.markReady())]};if(c||y)return{fromLink:!0,sources:[p(v),g()]};return{fromLink:!0,sources:[g()]};case"cache-and-network":var v=f();if(v.complete||c||y)return{fromLink:!0,sources:[p(v),g()]};return{fromLink:!0,sources:[g()]};case"cache-only":return{fromLink:!1,sources:[p(f(),e.markReady())]};case"network-only":if(y)return{fromLink:!0,sources:[p(f()),g()]};return{fromLink:!0,sources:[g()]};case"no-cache":if(y)return{fromLink:!0,sources:[p(e.getDiff()),g()]};return{fromLink:!0,sources:[g()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new nP(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,eK.pi)((0,eK.pi)((0,eK.pi)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}();function nj(e){return e.kind===h.FIELD||e.kind===h.FRAGMENT_SPREAD||e.kind===h.INLINE_FRAGMENT}var nD=new rU,nM=new WeakMap;function nL(e){var t=nM.get(e);return t||nM.set(e,t={vars:new Set,dep:r8()}),t}function nF(e){nL(e).vars.forEach(function(t){return t.forgetCache(e)})}function nz(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(e){nL(e).dep.dirty(n),e.broadcastWatches&&e.broadcastWatches()});var s=Array.from(r);r.clear(),s.forEach(function(t){return t(e)})}}else{var a=nD.getValue();a&&(i(a),nL(a).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),nL(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}var nU=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=tX(t.resolvers,e)}):this.resolvers=tX(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){return(0,eK.mG)(this,arguments,void 0,function(e){var t=e.document,r=e.remoteResult,n=e.context,i=e.variables,o=e.onlyRunForcedResolvers,s=void 0!==o&&o;return(0,eK.Jh)(this,function(e){return t?[2,this.resolveDocument(t,r.data,n,i,this.fragmentMatcher,s).then(function(e){return(0,eK.pi)((0,eK.pi)({},r),{data:e.result})})]:[2,r]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return tq(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return rp(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,eK.pi)((0,eK.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e){return(0,eK.mG)(this,arguments,void 0,function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,eK.Jh)(this,function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return(0,eK.pi)((0,eK.pi)({},t),e.exportedVariables)})]:[2,(0,eK.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return tB(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return tU}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:"query"===tO(e).operation?e:tB(e,{OperationDefinition:{enter:function(e){return(0,eK.pi)((0,eK.pi)({},e),{operation:"query"})}}}),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t){return(0,eK.mG)(this,arguments,void 0,function(e,t,r,n,i,o){var s,a,l,c,u,h,d,f,p;return void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),(0,eK.Jh)(this,function(m){return s=tO(e),a=tl(tP(e)),l=this.collectSelectionsToResolve(s,a),u=(c=s.operation)?c.charAt(0).toUpperCase()+c.slice(1):"Query",h=this,d=h.cache,f=h.client,p={fragmentMap:a,context:(0,eK.pi)((0,eK.pi)({},r),{cache:d,client:f}),variables:n,fragmentMatcher:i,defaultOperationType:u,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(s.selectionSet,!1,t,p).then(function(e){return{result:e,exportedVariables:p.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r,n){return(0,eK.mG)(this,void 0,void 0,function(){var i,o,s,a,l,c=this;return(0,eK.Jh)(this,function(u){return i=n.fragmentMap,o=n.context,s=n.variables,a=[r],l=function(e){return(0,eK.mG)(c,void 0,void 0,function(){var l,c;return(0,eK.Jh)(this,function(u){return(t||n.selectionsToResolve.has(e))&&tV(e,s)?tE(e)?[2,this.resolveField(e,t,r,n).then(function(t){var r;void 0!==t&&a.push(((r={})[tk(e)]=t,r))})]:("InlineFragment"===e.kind?l=e:(l=i[e.name.value],(0,eQ.kG)(l,18,e.name.value)),l&&l.typeCondition&&(c=l.typeCondition.name.value,n.fragmentMatcher(r,c,o))?[2,this.resolveSelectionSet(l.selectionSet,t,r,n).then(function(e){a.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(l)).then(function(){return tJ(a)})]})})},e.prototype.resolveField=function(e,t,r,n){return(0,eK.mG)(this,void 0,void 0,function(){var i,o,s,a,l,c,u,h,d,f=this;return(0,eK.Jh)(this,function(p){return r?(i=n.variables,a=(o=e.name.value)!==(s=tk(e)),c=Promise.resolve(l=r[s]||r[o]),(!n.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(u=r.__typename||n.defaultOperationType,(h=this.resolvers&&this.resolvers[u])&&(d=h[a?o:s])&&(c=Promise.resolve(nD.withValue(this.cache,d,[r,tx(e,i),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,c.then(function(r){if(void 0===r&&(r=l),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=r)})}),!e.selectionSet||null==r)return r;var i,o,s=null!==(o=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==o&&o;return Array.isArray(r)?f.resolveSubSelectedArray(e,t||s,r,n):e.selectionSet?f.resolveSelectionSet(e.selectionSet,t||s,r,n):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map(function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),tB(i,{Directive:function(e,t,n,i,s){"client"===e.name.value&&s.forEach(function(e){r(e)&&nj(e)&&o.add(e)})},FragmentSpread:function(n,i,s,a,l){var c=t[n.name.value];(0,eQ.kG)(c,19,n.name.value);var u=e(c);u.size>0&&(l.forEach(function(e){r(e)&&nj(e)&&o.add(e)}),o.add(n),u.forEach(function(e){o.add(e)}))}})}return n.get(i)}(e)},e}(),nB=r(14012),nV=!1,nq=function(){function e(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,eQ._K)(15);var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,s=e.documentTransform,a=e.ssrMode,l=void 0!==a&&a,c=e.ssrForceFetchDelay,u=void 0===c?0:c,h=e.connectToDevTools,d=e.queryDeduplication,f=void 0===d||d,p=e.defaultOptions,m=e.defaultContext,g=e.assumeImmutableResults,y=void 0===g?o.assumeImmutableResults:g,v=e.resolvers,b=e.typeDefs,w=e.fragmentMatcher,_=e.name,x=e.version,k=e.devtools,S=e.link;S||(S=r?new ry({uri:r,credentials:n,headers:i}):tM.empty()),this.link=S,this.cache=o,this.disableNetworkFetches=l||u>0,this.queryDeduplication=f,this.defaultOptions=p||Object.create(null),this.typeDefs=b,this.devtoolsConfig=(0,eK.pi)((0,eK.pi)({},k),{enabled:(null==k?void 0:k.enabled)||h}),void 0===this.devtoolsConfig.enabled&&(this.devtoolsConfig.enabled=!1!==globalThis.__DEV__),u&&setTimeout(function(){return t.disableNetworkFetches=!1},u),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=rb.i,this.localState=new nU({cache:o,client:this,resolvers:v,fragmentMatcher:w}),this.queryManager=new nN({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:m,documentTransform:s,queryDeduplication:f,ssrMode:l,clientAwareness:{name:_,version:x},localState:this.localState,assumeImmutableResults:y,onBroadcast:this.devtoolsConfig.enabled?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if("undefined"!=typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,!nV&&!1!==globalThis.__DEV__&&(nV=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,r=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?r="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(r="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),r&&!1!==globalThis.__DEV__&&eQ.kG.log("Download the Apollo DevTools for a better development experience: %s",r)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,nB.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,eK.pi)((0,eK.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,nB.J)(this.defaultOptions.query,e)),(0,eQ.kG)("cache-and-network"!==e.fetchPolicy,16),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,eK.pi)((0,eK.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,nB.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.watchFragment=function(e){return this.cache.watchFragment(e)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return rv(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach(function(e,t){r.push(t),n.push(e)});var i=Promise.all(n);return i.queries=r,i.results=n,i.catch(function(e){!1!==globalThis.__DEV__&&eQ.kG.debug(17,e)}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(nq.prototype.getMemoryInternals=td.su);var n$=tM.from,nW=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=nt(ta,{max:th.Q["cache.fragmentQueryDocuments"]||1e3,cache:rT.k})}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(r)},n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,eK.pi)((0,eK.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.watchFragment=function(e){var t,r=this,n=e.fragment,i=e.fragmentName,o=e.from,s=e.optimistic,a=(0,eK._T)(e,["fragment","fragmentName","from","optimistic"]),l=this.getFragmentDoc(n,i),c=(0,eK.pi)((0,eK.pi)({},a),{returnPartialData:!0,id:void 0===o||"string"==typeof o?o:this.identify(o),query:l,optimistic:void 0===s||s});return new to(function(e){return r.watch((0,eK.pi)((0,eK.pi)({},c),{immediate:!0,callback:function(r){if(!(t&&ng(l,{data:null==t?void 0:t.result},{data:r.result}))){var n={data:r.result,complete:!!r.complete};r.missing&&(n.missing=tJ(r.missing.map(function(e){return e.missing}))),t=r,e.next(n)}}}))})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,eK.pi)((0,eK.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,n=(0,eK._T)(e,["id","data"]);return this.write(Object.assign(n,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,n=e.fragment,i=e.fragmentName,o=(0,eK._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(n,i),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var n=r.readQuery(e),i=t(n);return null==i?n:(r.writeQuery((0,eK.pi)((0,eK.pi)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var n=r.readFragment(e),i=t(n);return null==i?n:(r.writeFragment((0,eK.pi)((0,eK.pi)({},e),{data:i})),i)}})},e}();!1!==globalThis.__DEV__&&(nW.prototype.getMemoryInternals=td.Kb);var nH=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var l=a.path.length-1;l>=0;--l)a.missing=((s={})[a.path[l]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,eK.ZT)(t,e),t}(Error),nG=r(48702),nK=Object.prototype.hasOwnProperty;function nQ(e){return null==e}function nY(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=nQ(n)?nQ(i)?void 0:{_id:i}:{id:n}),nQ(n)&&!nQ(i)&&(n=i),!nQ(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var nX={dataIdFromObject:nY,addTypename:!0,resultCaching:!0,canonizeResults:!1};function nJ(e){var t=e.canonizeResults;return void 0===t?nX.canonizeResults:t}var nZ=/^[_a-z][_0-9a-z]*/i;function n0(e){var t=e.match(nZ);return t?t[0]:e}function n1(e){return(0,ts.s)(e)&&!ty(e)&&!(0,tQ.k)(e)}function n2(e,t){var r=tl(tP(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var n4=Object.create(null),n5=function(){return n4},n6=Object.create(null),n3=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,nG.J)(ty(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return ty(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return tg(e);if(ty(e))return e;var n=r.policies.identify(e)[0];if(n){var i=tg(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,eK.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),nK.call(this.data,e)){var r=this.data[e];if(r&&nK.call(r,t))return r[t]}return"__typename"===t&&nK.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof n7?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),nK.call(this.data,e))?this.data[e]:this instanceof n7?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;ty(e)&&(e=e.__ref),ty(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){(0,eQ.kG)("string"==typeof r,1);var s=new t0(it).merge(i,o);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){var a=Object.create(null);i||(a.__exists=1),Object.keys(o).forEach(function(e){if(!i||i[e]!==s[e]){a[e]=1;var t=n0(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(a[t]=1),void 0!==s[e]||n instanceof n7||delete s[e]}}),a.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[r]===s.__typename&&delete a.__typename,Object.keys(a).forEach(function(e){return n.group.dirty(r,e)})}}},e.prototype.modify=function(e,t){var r=this,n=this.lookup(e);if(n){var i=Object.create(null),o=!1,s=!0,a={DELETE:n4,INVALIDATE:n6,isReference:ty,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||tg(e)}:t,{store:r})}};if(Object.keys(n).forEach(function(l){var c=n0(l),u=n[l];if(void 0!==u){var h="function"==typeof t?t:t[l]||t[c];if(h){var d=h===n5?n4:h((0,nG.J)(u),(0,eK.pi)((0,eK.pi)({},a),{fieldName:c,storeFieldName:l,storage:r.getStorage(e,l)}));if(d===n6)r.group.dirty(e,l);else if(d===n4&&(d=void 0),d!==u&&(i[l]=d,o=!0,u=d,!1!==globalThis.__DEV__)){var f=function(e){if(void 0===r.lookup(e.__ref))return!1!==globalThis.__DEV__&&eQ.kG.warn(2,e),!0};if(ty(d))f(d);else if(Array.isArray(d))for(var p=!1,m=void 0,g=0,y=d;g<y.length;g++){var v=y[g];if(ty(v)){if(p=!0,f(v))break}else"object"==typeof v&&v&&r.policies.identify(v)[0]&&(m=v);if(p&&void 0!==m){!1!==globalThis.__DEV__&&eQ.kG.warn(3,m);break}}}}void 0!==u&&(s=!1)}}),o)return this.merge(e,i),s&&(this instanceof n7?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=n5,n):n5)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(nK.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof n7&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach(function(t){nK.call(e.policies.rootTypenamesById,t)||r.push(t)}),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(r){e&&nK.call(e,r)||t.delete(r)}),e){var r=e.__META,n=(0,eK._T)(e,["__META"]);Object.keys(n).forEach(function(e){t.merge(e,n[e])}),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof n7?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach(function(n){nK.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])});var n=Object.keys(r);if(n.length){for(var i=this;i instanceof n7;)i=i.parent;n.forEach(function(e){return i.delete(e)})}return n},e.prototype.findChildRefIds=function(e){if(!nK.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach(function(e){ty(e)&&(t[e.__ref]=!0),(0,ts.s)(e)&&Object.keys(e).forEach(function(t){var r=e[t];(0,ts.s)(r)&&n.add(r)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),n9=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?r8():null,this.keyMaker=new rE(tW.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(t+"#"+e);var r=n0(t);r!==t&&this.d(r+"#"+e),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(t+"#"+e,"__exists"===t?"forget":"setDirty")},e}();function n8(e,t){ir(e)&&e.group.depend(t,"__exists")}l=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=t.seed,o=e.call(this,r,new n9(void 0===n||n))||this;return o.stump=new ie(o),o.storageTrie=new rE(tW.mr),i&&o.replace(i),o}return(0,eK.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(a=n3||(n3={})),a.Root=l;var n7=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,eK.ZT)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach(function(r){(0,rw.D)(n[r],i[r])||t.group.dirty(e,r)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(r){t.group.dirty(e,r)})):t.delete(e)}),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,eK.pi)((0,eK.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return nK.call(this.data,t)?(0,eK.pi)((0,eK.pi)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(n3),ie=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new n9(t.group.caching,t.group))||this}return(0,eK.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(n7);function it(e,t,r){var n=e[r],i=t[r];return(0,rw.D)(n,i)?n:i}function ir(e){return!!(e instanceof n3&&e.group.caching)}var ii=function(){function e(){this.known=new(tW.sy?WeakSet:Set),this.pool=new rE(tW.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,ts.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,ts.s)(e)){var t=(0,ts.s)(e)?(0,tQ.k)(e)?e.slice(0):(0,eK.pi)({__proto__:Object.getPrototypeOf(e)},e):e;return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,ts.s)(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var n=e.map(this.admit,this),i=this.pool.lookupArray(n);return i.array||(this.known.add(i.array=n),!1!==globalThis.__DEV__&&Object.freeze(n)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),s=[o],a=this.sortedKeys(e);s.push(a.json);var l=s.length;a.sorted.forEach(function(r){s.push(t.admit(e[r]))});var i=this.pool.lookupArray(s);if(!i.object){var c=i.object=Object.create(o);this.known.add(c),a.sorted.forEach(function(e,t){c[e]=s[l+t]}),!1!==globalThis.__DEV__&&Object.freeze(c)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}();function io(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var is=function(){function e(e){var t=this;this.knownResults=new(tW.mr?WeakMap:Map),this.config=(0,nf.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:nJ(e)}),this.canon=e.canon||new ii,this.executeSelectionSet=nt(function(e){var r,n=e.context.canonizeResults,i=io(e);i[3]=!n;var o=(r=t.executeSelectionSet).peek.apply(r,i);return o?n?(0,eK.pi)((0,eK.pi)({},o),{result:t.canon.admit(o.result)}):o:(n8(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize||th.Q["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:io,makeCacheKey:function(e,t,r,n){if(ir(r.store))return r.store.makeCacheKey(e,ty(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=nt(function(e){return n8(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize||th.Q["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(ir(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new ii},e.prototype.diffQueryAgainstStore=function(e){var t,r=e.store,n=e.query,i=e.rootId,o=e.variables,s=e.returnPartialData,a=e.canonizeResults,l=void 0===a?this.config.canonizeResults:a,c=this.config.cache.policies;o=(0,eK.pi)((0,eK.pi)({},tR(tA(n))),o);var u=tg(void 0===i?"ROOT_QUERY":i),h=this.executeSelectionSet({selectionSet:tO(n).selectionSet,objectOrReference:u,enclosingRef:u,context:(0,eK.pi)({store:r,query:n,policies:c,variables:o,varString:tf(o),canonizeResults:l},n2(n,this.config.fragments))});if(h.missing&&(t=[new nH(function(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}(h.missing),h.missing,n,o)],!(void 0===s||s)))throw t[0];return{result:h.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,r,n){if(ir(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,r=this,n=e.selectionSet,i=e.objectOrReference,o=e.enclosingRef,s=e.context;if(ty(i)&&!s.policies.rootTypenamesById[i.__ref]&&!s.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var a=s.variables,l=s.policies,c=s.store.getFieldValue(i,"__typename"),u=[],d=new t0;function f(e,r){var n;return e.missing&&(t=d.merge(t,((n={})[r]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof c&&!l.rootIdsByTypename[c]&&u.push({__typename:c});var p=new Set(n.selections);p.forEach(function(e){var n,m;if(tV(e,a)){if(tE(e)){var g=l.readField({fieldName:e.name.value,field:e,variables:s.variables,from:i},s),y=tk(e);void 0===g?rf.added(e)||(t=d.merge(t,((n={})[y]="Can't find field '".concat(e.name.value,"' on ").concat(ty(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),n))):(0,tQ.k)(g)?g.length>0&&(g=f(r.executeSubSelectedArray({field:e,array:g,enclosingRef:o,context:s}),y)):e.selectionSet?null!=g&&(g=f(r.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:g,enclosingRef:ty(g)?g:o,context:s}),y)):s.canonizeResults&&(g=r.canon.pass(g)),void 0!==g&&u.push(((m={})[y]=g,m))}else{var v=tc(e,s.lookupFragment);if(!v&&e.kind===h.FRAGMENT_SPREAD)throw(0,eQ._K)(9,e.name.value);v&&l.fragmentMatches(v,c)&&v.selectionSet.selections.forEach(p.add,p)}}});var m={result:tJ(u),missing:t},g=s.canonizeResults?this.canon.admit(m):(0,nG.J)(m);return g.result&&this.knownResults.set(g.result,n),g},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,s=e.context,a=new t0;function l(e,r){var n;return e.missing&&(t=a.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,tQ.k)(e)?l(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:s}),t):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:ty(e)?e:o,context:s}),t):(!1!==globalThis.__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(r){(0,ts.s)(r)&&((0,eQ.kG)(!ty(r),10,ty(r)?e.get(r.__ref,"__typename"):r&&r.__typename,t.name.value),Object.values(r).forEach(n.add,n))})}}(s.store,n,e),e)}),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ia=r(13887),il=Object.create(null);function ic(e){var t=JSON.stringify(e);return il[t]||(il[t]=Object.create(null))}function iu(e){var t=ic(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=id(e,function(e){var i=im(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&nK.call(t,e[0])&&(i=im(t,e,ip)),(0,eQ.kG)(void 0!==i,4,e.join("."),t),i});return"".concat(r.typename,":").concat(JSON.stringify(i))})}function ih(e){var t=ic(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=JSON.stringify(id(e,function(e){var r=e[0],o=r.charAt(0);if("@"===o){if(n&&(0,tQ.O)(n.directives)){var s=r.slice(1),a=n.directives.find(function(e){return e.name.value===s}),l=a&&tx(a,i);return l&&im(l,e.slice(1))}return}if("$"===o){var c=r.slice(1);if(i&&nK.call(i,c)){var u=e.slice(0);return u[0]=c,im(i,u)}return}if(t)return im(t,e)}));return(t||"{}"!==s)&&(o+=":"+s),o})}function id(e,t){var r=new t0;return(function e(t){var r=ic(t);if(!r.paths){var n=r.paths=[],i=[];t.forEach(function(r,o){(0,tQ.k)(r)?(e(r).forEach(function(e){return n.push(i.concat(e))}),i.length=0):(i.push(r),(0,tQ.k)(t[o+1])||(n.push(i.slice(0)),i.length=0))})}return r.paths})(e).reduce(function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e},Object.create(null))}function ip(e,t){return e[t]}function im(e,t,r){return r=r||ip,function e(t){return(0,ts.s)(t)?(0,tQ.k)(t)?t.map(e):id(Object.keys(t).sort(),function(e){return im(t,e)}):t}(t.reduce(function e(t,n){return(0,tQ.k)(t)?t.map(function(t){return e(t,n)}):t&&r(t,n)},e))}function ig(e){return void 0!==e.args?e.args:e.field?tx(e.field,e.variables):null}var iy=function(){},iv=function(e,t){return t.fieldName},ib=function(e,t,r){return(0,r.mergeObjects)(e,t)},iw=function(e,t){return t},i_=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,eK.pi)({dataIdFromObject:nY},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,n,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s=t&&t.storeObject||e,a=(0,eK.pi)((0,eK.pi)({},t),{typename:o,storeObject:s,readField:t&&t.readField||function(){var e=ik(arguments,s);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),l=o&&this.getTypePolicy(o),c=l&&l.keyFn||this.config.dataIdFromObject;c;){var u=c((0,eK.pi)((0,eK.pi)({},e),s),a);if((0,tQ.k)(u))c=iu(u);else{n=u;break}}return n=n?String(n):void 0,a.keyObject?[n,a.keyObject]:[n]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(r){var n=e[r],i=n.queryType,o=n.mutationType,s=n.subscriptionType,a=(0,eK._T)(n,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",r),o&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),nK.call(t.toBeAdded,r)?t.toBeAdded[r].push(a):t.toBeAdded[r]=[a]})},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?ib:!1===t?iw:e.merge}s(n,t.merge),n.keyFn=!1===i?iy:(0,tQ.k)(i)?iu(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach(function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,l=i.read,c=i.merge;n.keyFn=!1===a?iv:(0,tQ.k)(a)?ih(a):"function"==typeof a?a:n.keyFn,"function"==typeof l&&(n.read=l),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||iv)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,eQ.kG)(!n||n===e,5,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(r){t.getSupertypeSet(r,!0),e[r].forEach(function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(nZ);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!nK.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var n=this.supertypeMap.get(e);!n&&this.fuzzySubtypes.size&&(n=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(r,i){if(r.test(e)){var o=t.supertypeMap.get(i);o&&o.forEach(function(e){return n.add(e)})}})),n&&n.size&&n.forEach(function(e){var n=t.getTypePolicy(e),i=n.fields;Object.assign(r,(0,eK._T)(n,["fields"])),Object.assign(r.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(r){t.updateTypePolicy(e,r)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),a=[s],l=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>a.indexOf(t)&&a.push(t)},c=!!(r&&this.fuzzySubtypes.size),u=!1,h=0;h<a.length;++h){var d=a[h];if(d.has(o))return s.has(o)||(u&&!1!==globalThis.__DEV__&&eQ.kG.warn(6,t,o),s.add(o)),!0;d.forEach(l),c&&h===a.length-1&&function e(t,r,n){return!!(0,ts.s)(r)&&((0,tQ.k)(r)?r.every(function(r){return e(t,r,n)}):t.selections.every(function(t){if(tE(t)&&tV(t,n)){var i=tk(t);return nK.call(r,i)&&(!t.selectionSet||e(t.selectionSet,r[i],n))}return!0}))}(e.selectionSet,r,n)&&(c=!1,u=!0,this.fuzzySubtypes.forEach(function(e,r){var n=t.match(e);n&&n[0]===t&&l(r)}))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!!(r&&r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r,n,i,o,s=e.typename,a=e.fieldName,l=this.getFieldPolicy(s,a,!1),c=l&&l.keyFn;if(c&&s)for(var u={typename:s,fieldName:a,field:e.field||null,variables:e.variables},h=ig(e);c;){var d=c(h,u);if((0,tQ.k)(d))c=ih(d);else{o=d||a;break}}return void 0===o&&(o=e.field?(t=e.field,r=e.variables,n=null,t.directives&&(n={},t.directives.forEach(function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach(function(t){var i=t.name,o=t.value;return tv(n[e.name.value],i,o,r)})})),i=null,t.arguments&&t.arguments.length&&(i={},t.arguments.forEach(function(e){var t=e.name,n=e.value;return tv(i,t,n,r)})),t_(t.name.value,i,n)):t_(a,ig(e))),!1===o?a:a===n0(o)?o:a+":"+o},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=n0(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),l=a&&a.read;if(l){var c=ix(this,r,e,t,t.store.getStorage(ty(r)?r.__ref:r,i));return nD.withValue(this.cache,l,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===ib?iS(n.store)(e,t):a===iw?t:(n.overwrite&&(e=void 0),a(e,t,ix(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function ix(e,t,r,n,i){var o=e.getStoreFieldName(r),s=n0(o),a=r.variables||n.variables,l=n.store,c=l.toReference,u=l.canRead;return{args:ig(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:ty,toReference:c,storage:i,cache:e.cache,canRead:u,readField:function(){return e.readField(ik(arguments,t,a),n)},mergeObjects:iS(n.store)}}function ik(e,t,r){var n,i=e[0],o=e[1],s=e.length;return"string"==typeof i?n={fieldName:i,from:s>1?o:t}:(n=(0,eK.pi)({},i),nK.call(n,"from")||(n.from=t)),!1!==globalThis.__DEV__&&void 0===n.from&&!1!==globalThis.__DEV__&&eQ.kG.warn(7,(0,ia.v)(Array.from(e))),void 0===n.variables&&(n.variables=r),n}function iS(e){return function(t,r){if((0,tQ.k)(t)||(0,tQ.k)(r))throw(0,eQ._K)(8);if((0,ts.s)(t)&&(0,ts.s)(r)){var n=e.getFieldValue(t,"__typename"),i=e.getFieldValue(r,"__typename");if(n&&i&&n!==i)return r;if(ty(t)&&n1(r))return e.merge(t.__ref,r),t;if(n1(t)&&ty(r))return e.merge(t,r.__ref),r;if(n1(t)&&n1(r))return(0,eK.pi)((0,eK.pi)({},t),r)}return r}}function iE(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:(0,eK.pi)((0,eK.pi)({},e),{clientOnly:t,deferred:r})),i}var iT=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,n=t.query,i=t.result,o=t.dataId,s=t.variables,a=t.overwrite,l=tC(n),c=new t0;s=(0,eK.pi)((0,eK.pi)({},tR(l)),s);var u=(0,eK.pi)((0,eK.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:s,varString:tf(s)},n2(n,this.fragments)),{overwrite:!!a,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:u});if(!ty(h))throw(0,eQ._K)(11,i);return u.incomingById.forEach(function(t,n){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,a=tg(n);if(o&&o.map.size){var l=r.applyMerges(o,a,i,u);if(ty(l))return;i=l}if(!1!==globalThis.__DEV__&&!u.overwrite){var c=Object.create(null);s.forEach(function(e){e.selectionSet&&(c[e.name.value]=!0)});var h=function(e){var t=o&&o.map.get(e);return!!(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){!0!==c[n0(e)]||h(e)||function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(!(!s||ty(o)||(0,rw.D)(o,s)||Object.keys(o).every(function(e){return void 0!==n.getFieldValue(s,e)}))){var a=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),l=n0(r),c="".concat(a,".").concat(l);if(!iO.has(c)){iO.add(c);var u=[];(0,tQ.k)(o)||(0,tQ.k)(s)||[o,s].forEach(function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||u.includes(t)||u.push(t)}),!1!==globalThis.__DEV__&&eQ.kG.warn(14,l,a,u.length?"either ensure all objects of type "+u.join(" and ")+" have an ID or a custom merge function, or ":"",c,(0,eK.pi)({},o),(0,eK.pi)({},s))}}}}(a,i,e,u.store)})}e.merge(n,i)}),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,n=e.result,i=e.selectionSet,o=e.context,s=e.mergeTree,a=this.cache.policies,l=Object.create(null),c=r&&a.rootTypenamesById[r]||tS(n,i,o.fragmentMap)||r&&o.store.get(r,"__typename");"string"==typeof c&&(l.__typename=c);var u=function(){var e=ik(arguments,l,o.variables);if(ty(e.from)){var t=o.incomingById.get(e.from.__ref);if(t){var r=a.readField((0,eK.pi)((0,eK.pi)({},e),{from:t.storeObject}),o);if(void 0!==r)return r}}return a.readField(e,o)},h=new Set;this.flattenFields(i,n,o,c).forEach(function(e,r){var i,o=n[tk(r)];if(h.add(r),void 0!==o){var d=a.getStoreFieldName({typename:c,fieldName:r.name.value,field:r,variables:e.variables}),f=iI(s,d),p=t.processFieldValue(o,r,r.selectionSet?iE(e,!1,!1):e,f),m=void 0;r.selectionSet&&(ty(p)||n1(p))&&(m=u("__typename",p));var g=a.getMergeFunction(c,r.name.value,m);g?f.info={field:r,typename:c,merge:g}:iA(s,d),l=e.merge(l,((i={})[d]=p,i))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||rf.added(r)||a.getReadFunction(c,r.name.value)||!1===globalThis.__DEV__||eQ.kG.error(12,tk(r),n)});try{var d=a.identify(n,{typename:c,selectionSet:i,fragmentMap:o.fragmentMap,storeObject:l,readField:u}),f=d[0],p=d[1];r=r||f,p&&(l=o.merge(l,p))}catch(e){if(!r)throw e}if("string"==typeof r){var m=tg(r),g=o.written[r]||(o.written[r]=[]);if(g.indexOf(i)>=0||(g.push(i),this.reader&&this.reader.isFresh(n,m,i,o)))return m;var y=o.incomingById.get(r);return y?(y.storeObject=o.merge(y.storeObject,l),y.mergeTree=function e(t,r){if(t===r||!r||iP(r))return t;if(!t||iP(t))return r;var n=t.info&&r.info?(0,eK.pi)((0,eK.pi)({},t.info),r.info):t.info||r.info,i=t.map.size&&r.map.size,o={info:n,map:i?new Map:t.map.size?t.map:r.map};if(i){var s=new Set(r.map.keys());t.map.forEach(function(t,n){o.map.set(n,e(t,r.map.get(n))),s.delete(n)}),s.forEach(function(n){o.map.set(n,e(r.map.get(n),t.map.get(n)))})}return o}(y.mergeTree,s),h.forEach(function(e){return y.fieldNodeSet.add(e)})):o.incomingById.set(r,{storeObject:l,mergeTree:iP(s)?void 0:s,fieldNodeSet:h}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?(0,tQ.k)(e)?e.map(function(e,o){var s=i.processFieldValue(e,t,r,iI(n,o));return iA(n,o),s}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):!1!==globalThis.__DEV__?nm(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=tS(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,s=new rE(!1);return function e(a,l){var c=s.lookup(a,l.clientOnly,l.deferred);c.visited||(c.visited=!0,a.selections.forEach(function(s){if(tV(s,r.variables)){var a=l.clientOnly,c=l.deferred;if(!(a&&c)&&(0,tQ.O)(s.directives)&&s.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(a=!0),"defer"===t){var n=tx(e,r.variables);n&&!1===n.if||(c=!0)}}),tE(s)){var u=i.get(s);u&&(a=a&&u.clientOnly,c=c&&u.deferred),i.set(s,iE(r,a,c))}else{var d=tc(s,r.lookupFragment);if(!d&&s.kind===h.FRAGMENT_SPREAD)throw(0,eQ._K)(13,s.name.value);d&&o.fragmentMatches(d,n,t,r.variables)&&e(d.selectionSet,iE(r,a,c))}}}))}(e,r),i},e.prototype.applyMerges=function(e,t,r,n,i){var o=this;if(e.map.size&&!ty(r)){var s,a,l=!(0,tQ.k)(r)&&(ty(t)||n1(t))?t:void 0,c=r;l&&!i&&(i=[ty(l)?l.__ref:l]);var u=function(e,t){return(0,tQ.k)(e)?"number"==typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var r=u(l,t),s=u(c,t);if(void 0!==s){i&&i.push(t);var h=o.applyMerges(e,r,s,n,i);h!==s&&(a=a||new Map).set(t,h),i&&(0,eQ.kG)(i.pop()===t)}}),a&&(r=(0,tQ.k)(c)?c.slice(0):(0,eK.pi)({},c),a.forEach(function(e,t){r[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&(s=n.store).getStorage.apply(s,i)):r},e}(),iC=[];function iI(e,t){var r=e.map;return r.has(t)||r.set(t,iC.pop()||{map:new Map}),r.get(t)}function iP(e){return!e||!(e.info||e.map.size)}function iA(e,t){var r=e.map,n=r.get(t);n&&iP(n)&&(iC.push(n),r.delete(t))}var iO=new Set,iR=function(e){function t(t){void 0===t&&(t={});var r,n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new nn(rf),n.assumeImmutableResults=!0,n.makeVar=nz,n.txCount=0,n.config=(r=t,(0,nf.o)(nX,r)),n.addTypename=!!n.config.addTypename,n.policies=new i_({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,eK.ZT)(t,e),t.prototype.init=function(){var e=this.data=new n3.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new iT(this,this.storeReader=new is({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:nJ(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=nt(function(e,r){return t.broadcastWatch(e,r)},{max:this.config.resultCacheMaxSize||th.Q["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(ir(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,tf({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData;try{return this.storeReader.diffQueryAgainstStore((0,eK.pi)((0,eK.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:void 0!==t&&t})).result||null}catch(e){if(e instanceof nH)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(nK.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,eK.pi)((0,eK.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){nL(e).vars.forEach(function(t){return t.attachCache(e)})}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&nF(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){tf.reset(),rs.reset(),this.addTypenameTransform.resetCache(),null===(t=this.config.fragments)||void 0===t||t.resetCaches();var t,r=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),r},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(ty(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){!1!==globalThis.__DEV__&&eQ.kG.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(nK.call(e,"id"))return!1;e=(0,eK.pi)((0,eK.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),tf.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),nF(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,n=e.update,i=e.optimistic,o=void 0===i||i,s=e.removeOptimistic,a=e.onWatchUpdated,l=function(e){var i=r.data,o=r.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=n(r)}finally{--r.txCount,r.data=i,r.optimisticData=o}},c=new Set;return a&&!this.txCount&&this.broadcastWatches((0,eK.pi)((0,eK.pi)({},e),{onWatchUpdated:function(e){return c.add(e),!1}})),"string"==typeof o?this.optimisticData=this.optimisticData.addLayer(o,l):!1===o?l(this.data):l(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),a&&c.size?(this.broadcastWatches((0,eK.pi)((0,eK.pi)({},e),{onWatchUpdated:function(e,t){var r=a.call(this,e,t);return!1!==r&&c.delete(e),r}})),c.size&&c.forEach(function(e){return r.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(r){return t.maybeBroadcastWatch(r,e)})},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,n,r)))&&(r&&(0,rw.D)(r.result,n.result)||e.callback(e.lastDiff=n,r))},t}(nW);!1!==globalThis.__DEV__&&(iR.prototype.getMemoryInternals=td.q4);var iN=r(73914),ij=r(85317),iD=function(e){var t=e.client,r=e.children,n=(0,ij.K)(),i=iN.useContext(n),o=iN.useMemo(function(){return(0,eK.pi)((0,eK.pi)({},i),{client:t||i.client})},[i,t]);return(0,eQ.kG)(o.client,47),iN.createElement(n.Provider,{value:o},r)};let iM=new ry({uri:"".concat("https://srvr.optionsmd.com","/graphql"),fetch:eG()}),iL=e=>{var t;let{children:r}=e;return(0,f.jsx)(iD,{client:new nq({link:n$([(t=async(e,t)=>{let{headers:r}=t,{token:n}=await eG()("/api/authOmd/token").then(e=>e.json());return{headers:{...r,authorization:"Bearer ".concat(n||"")}}},new tM(function(e,r){var n=(0,eK._T)(e,[]);return new to(function(i){var o,s=!1;return Promise.resolve(n).then(function(r){return t(r,e.getContext())}).then(e.setContext).then(function(){s||(o=r(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){s=!0,o&&o.unsubscribe()}})})),iM]),cache:new iR}),children:r})};var iF=r(18173),iz=r(38971),iU=r(88074),iB=r(10550),iV=r(41664),iq=r.n(iV),i$=r(5185),iW=r(52572),iH=e=>{let{theme:t=iF}=e,[r,n]=(0,g.useState)({showBanner:!0}),i=(0,i$.i)(e=>e.user.user),o=()=>{(window.localStorage.getItem("omdCC")||i.activeSubscription)&&n({showBanner:!1})};return(0,g.useEffect)(()=>{o()},[null==i?void 0:i.uid]),(0,f.jsxs)("div",{className:m().dynamic([["2531c11b44624fec",[t.colors.softBlack,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.breakpoints.small]]]),children:[r.showBanner&&(0,f.jsxs)("div",{role:"region","aria-live":"polite","aria-label":"cookie consent",className:m().dynamic([["2531c11b44624fec",[t.colors.softBlack,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.breakpoints.small]]])+" cc-banner",children:[(0,f.jsxs)("span",{className:m().dynamic([["2531c11b44624fec",[t.colors.softBlack,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.breakpoints.small]]])+" cc-message",children:["This website uses cookies to ensure you get the best experience on our platform."," ",(0,f.jsx)(iq(),{legacyBehavior:!0,href:"https://optionsmd.com/privacy-policy",children:(0,f.jsx)("a",{"aria-label":"learn more about cookies",role:"button",tabIndex:0,className:m().dynamic([["2531c11b44624fec",[t.colors.softBlack,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.breakpoints.small]]])+" cc-link",children:"Learn more"})})]}),(0,f.jsx)("div",{style:{marginLeft:"2rem"},className:m().dynamic([["2531c11b44624fec",[t.colors.softBlack,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.breakpoints.small]]]),children:(0,f.jsx)(iW.zx,{onClick:()=>{n({showBanner:!1}),window.localStorage.setItem("omdCC",JSON.stringify({showBanner:!1}))},variant:"cookie",type:"button",children:"Got It!"})})]}),(0,f.jsx)(m(),{id:"2531c11b44624fec",dynamic:[t.colors.softBlack,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.fonts.Poppins,t.colors.white,t.breakpoints.small],children:".cc-banner.__jsx-style-dynamic-selector{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;background-color:".concat(t.colors.softBlack,";display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;padding:0 1rem;position:fixed;bottom:0;width:100vw;z-index:10}.cc-compliance.__jsx-style-dynamic-selector{font-size:1rem;font-family:").concat(t.fonts.Poppins,";line-height:1.5em;color:").concat(t.colors.white,";-webkit-box-direction:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-content:space-between;-ms-flex-line-pack:justify;align-content:space-between}.cc-link.__jsx-style-dynamic-selector{font-family:").concat(t.fonts.Poppins,";font-size:1rem;line-height:1.5em;-webkit-box-direction:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;opacity:.8;padding:.2em;text-decoration:underline;color:").concat(t.colors.white,"}.cc-message.__jsx-style-dynamic-selector{font-family:").concat(t.fonts.Poppins,";font-size:1rem;line-height:1.5em;color:").concat(t.colors.white,";-webkit-box-direction:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;margin-right:1em}@media only screen and (max-width:").concat(t.breakpoints.small,"){.cc-link.__jsx-style-dynamic-selector{font-size:.75rem}.cc-message.__jsx-style-dynamic-selector{font-size:.75rem}}")})]})},iG=e=>{let{metaContent:t={}}=e,{ogDescription:r="You deserve a mental health treatment that works. That's why we use data and clinical expertise to match you to the world's most leading-edge mental health treatments.",ogTitle:n="Options MD",ogUrl:i="https://app.optionsmd.com"}=t;return(0,f.jsxs)(w(),{children:[(0,f.jsx)("title",{children:n}),(0,f.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,f.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"}),(0,f.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,f.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,f.jsx)("link",{rel:"mask-icon",href:"/safari-pinned-tab.svg",color:"#000"}),(0,f.jsx)("meta",{name:"msapplication-TileColor",content:"#000"}),(0,f.jsx)("meta",{name:"theme-color",content:"#000"}),(0,f.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width"}),(0,f.jsx)("meta",{property:"og:title",content:n,name:"title"},"title"),(0,f.jsx)("meta",{name:"description",content:r}),(0,f.jsx)("meta",{property:"og:image",content:"/optionsmd_resiliencelabco_1x.png"}),(0,f.jsx)("meta",{property:"og:url",content:i}),(0,f.jsx)("meta",{name:"facebook-domain-verification",content:"gb98lu1wzq6dhbunxv7q9ixcl9kv14"})]})},iK=r(51040),iQ=e=>{let{children:t}=e;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(iG,{}),(0,f.jsxs)("div",{className:m().dynamic([["15139c165a3dfe29",[iF.colors.bgPrimary]]])+" body_container",children:[(0,f.jsx)(iK.Z,{bg_color:iF.colors.bgPrimary}),t]}),(0,f.jsx)(m(),{id:"15139c165a3dfe29",dynamic:[iF.colors.bgPrimary],children:".body_container.__jsx-style-dynamic-selector{background-color:".concat(iF.colors.bgPrimary,";display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:0;margin:0;min-height:100vh}")})]})},iY=r(55346),iX=r(67796);function iJ(e){return(0,iX.w_)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M331.5 235.7c2.2 .9 4.2 1.9 6.3 2.8c29.2 14.1 50.6 35.2 61.8 61.4c15.7 36.5 17.2 95.8-30.3 143.2c-36.2 36.2-80.3 52.5-142.6 53h-.3c-70.2-.5-124.1-24.1-160.4-70.2c-32.3-41-48.9-98.1-49.5-169.6V256v-.2C17 184.3 33.6 127.2 65.9 86.2C102.2 40.1 156.2 16.5 226.4 16h.3c70.3 .5 124.9 24 162.3 69.9c18.4 22.7 32 50 40.6 81.7l-40.4 10.8c-7.1-25.8-17.8-47.8-32.2-65.4c-29.2-35.8-73-54.2-130.5-54.6c-57 .5-100.1 18.8-128.2 54.4C72.1 146.1 58.5 194.3 58 256c.5 61.7 14.1 109.9 40.3 143.3c28 35.6 71.2 53.9 128.2 54.4c51.4-.4 85.4-12.6 113.7-40.9c32.3-32.2 31.7-71.8 21.4-95.9c-6.1-14.2-17.1-26-31.9-34.9c-3.7 26.9-11.8 48.3-24.7 64.8c-17.1 21.8-41.4 33.6-72.7 35.3c-23.6 1.3-46.3-4.4-63.9-16c-20.8-13.8-33-34.8-34.3-59.3c-2.5-48.3 35.7-83 95.2-86.4c21.1-1.2 40.9-.3 59.2 2.8c-2.4-14.8-7.3-26.6-14.6-35.2c-10-11.7-25.6-17.7-46.2-17.8H227c-16.6 0-39 4.6-53.3 26.3l-34.4-23.6c19.2-29.1 50.3-45.1 87.8-45.1h.8c62.6 .4 99.9 39.5 103.7 107.7l-.2 .2zm-156 68.8c1.3 25.1 28.4 36.8 54.6 35.3c25.6-1.4 54.6-11.4 59.5-73.2c-13.2-2.9-27.8-4.4-43.4-4.4c-4.8 0-9.6 .1-14.4 .4c-42.9 2.4-57.2 23.2-56.2 41.8l-.1 .1z"},child:[]}]})(e)}var iZ=r(68029);let i0=()=>(0,f.jsx)("img",{alt:"Options MD",src:"/OptionsMDFooterLogo.png",style:{width:"45px",objectFit:"cover"}});var i1=()=>{let e=new Date;return(0,f.jsxs)(iX.Pd.Provider,{value:{},children:[(0,f.jsxs)("footer",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:[(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" mobile",children:[(0,f.jsx)(i0,{}),(0,f.jsx)(iZ.x,{height:8}),(0,f.jsx)("h3",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" desc",children:"Expert telehealth services for severe depression"}),(0,f.jsx)(iZ.x,{height:8}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" main_content",children:[(0,f.jsxs)("nav",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" site_links",children:[(0,f.jsx)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)("a",{href:"https://optionsmd.com/privacy-policy",target:"_blank",rel:"noreferrer",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:"Privacy"})}),(0,f.jsx)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)("a",{href:"https://optionsmd.com/terms-and-conditions",target:"_blank",rel:"noreferrer",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:"Terms of Use"})})]}),(0,f.jsx)(iZ.x,{height:10}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" social_links_container",children:[(0,f.jsx)("a",{href:"https://www.instagram.com/optionsmd/",target:"_blank",rel:"noopener noreferrer","aria-label":"follow Options on instagram",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)(iY.Zf_,{style:{height:21,width:21}})}),(0,f.jsx)("a",{href:"https://www.threads.net/@optionsmd",target:"_blank",rel:"noopener noreferrer","aria-label":"follow Options on threads",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)(iJ,{style:{height:21,width:21}})}),(0,f.jsx)("a",{href:" https://www.facebook.com/groups/optionsmd",target:"_blank",rel:"noopener noreferrer","aria-label":"join the Options facebook group",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)(iY.tBk,{style:{height:21,width:21}})})]})]}),(0,f.jsx)(iZ.x,{height:10}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" copyright",children:["\xa9 ",e.getFullYear()," Options MD"]})]}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" desktop",children:[(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" column",children:[(0,f.jsx)(i0,{}),(0,f.jsx)(iZ.x,{height:10}),(0,f.jsx)("h3",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" desc",children:"Expert telehealth services for severe depression"}),(0,f.jsx)(iZ.x,{height:10}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" copyright",children:["\xa9 ",e.getFullYear()," Options MD"]})]}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" column",children:[(0,f.jsxs)("nav",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" site_links_desktop column",children:[(0,f.jsx)("a",{href:"https://optionsmd.com/privacy-policy",target:"_blank",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:"Privacy"}),(0,f.jsx)("a",{href:"https://optionsmd.com/terms-and-conditions",target:"_blank",rel:"noreferrer",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:"Terms of Use"})]}),(0,f.jsx)(iZ.x,{height:10}),(0,f.jsxs)("div",{className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]])+" social_links_container_desktop",children:[(0,f.jsx)("a",{href:"https://www.instagram.com/optionsmd/",target:"_blank",rel:"noopener noreferrer","aria-label":"follow Options on instagram",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)(iY.Zf_,{style:{height:25,width:25}})}),(0,f.jsx)("a",{href:"https://www.threads.net/@optionsmd",target:"_blank",rel:"noopener noreferrer","aria-label":"follow Options on threads",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)(iJ,{style:{height:25,width:25}})}),(0,f.jsx)("a",{href:" https://www.facebook.com/groups/optionsmd",target:"_blank",rel:"noopener noreferrer","aria-label":"join the Options facebook group",className:m().dynamic([["e717c80528f7887c",[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins]]]),children:(0,f.jsx)(iY.tBk,{style:{height:25,width:25}})})]})]})]})]}),(0,f.jsx)(m(),{id:"e717c80528f7887c",dynamic:[iF.colors.white,iF.colors.cyan,iF.colors.black,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.breakpoints.small,iF.colors.white,iF.fonts.Poppins,iF.colors.white,iF.fonts.Poppins],children:"a.__jsx-style-dynamic-selector{color:".concat(iF.colors.white,";text-decoration:underline;text-underline-offset:3px;-webkit-transition:color.25s ease-in-out;-moz-transition:color.25s ease-in-out;-o-transition:color.25s ease-in-out;transition:color.25s ease-in-out}a.__jsx-style-dynamic-selector:hover{color:").concat(iF.colors.cyan,"}footer.__jsx-style-dynamic-selector{background-color:").concat(iF.colors.black,"}h3.__jsx-style-dynamic-selector{color:").concat(iF.colors.white,";font-family:").concat(iF.fonts.Poppins,";font-size:24px}.copyright.__jsx-style-dynamic-selector{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(iF.colors.white,";display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:").concat(iF.fonts.Poppins,";font-size:15px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;max-width:250px}.desc.__jsx-style-dynamic-selector{max-width:245px}.desktop.__jsx-style-dynamic-selector{display:none}.main_content.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mobile.__jsx-style-dynamic-selector{padding:60px 40px}.site_links.__jsx-style-dynamic-selector{color:").concat(iF.colors.white,";display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-size:14px;height:80px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;line-height:1}.social_links_container.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.social_links_container.__jsx-style-dynamic-selector>a.__jsx-style-dynamic-selector{margin-right:10px}@media only screen and (min-width:").concat(iF.breakpoints.small,"){.column.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.copyright_desktop.__jsx-style-dynamic-selector{color:").concat(iF.colors.white,";font-family:").concat(iF.fonts.Poppins,";font-size:16px;text-align:center}.desktop.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:75px 90px}.mobile.__jsx-style-dynamic-selector{display:none}.site_links_desktop.__jsx-style-dynamic-selector{color:").concat(iF.colors.white,";font-family:").concat(iF.fonts.Poppins,";font-size:18px;margin:72px 0 0 0}.site_links_desktop.__jsx-style-dynamic-selector>a.__jsx-style-dynamic-selector{margin:3px 0}.social_links_container_desktop.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.social_links_container_desktop.__jsx-style-dynamic-selector>a.__jsx-style-dynamic-selector{margin-right:10px}}")})]})},i2=r(8186),i4=r(90092),i5=r(38491);class i6 extends g.Component{static getDerivedStateFromError(e){return{hasError:!0}}async sendErrorToCollections(e,t){await fetch("/api/collectErrors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({error:e,errorInfo:t})}).then(()=>{})}componentDidCatch(e,t){console.error({error:e,errorInfo:t}),this.sendErrorToCollections(e,t)}render(){return this.state.hasError?(0,f.jsx)(eW,{children:(0,f.jsx)(iZ.x,{children:(0,f.jsxs)(i2.g,{margin:"0 auto",children:[(0,f.jsx)(iZ.x,{h:16}),(0,f.jsx)(i4.x,{fontFamily:iF.fonts.Poppins,children:"Oops, we have an error."}),(0,f.jsx)(i5.z,{type:"button",onClick:()=>{this.props.router.push("/").then(()=>{this.setState({hasError:!1})})},children:"Please try again."})]})})}):this.props.children}constructor(e){super(e),this.state={hasError:!1}}}var i3=(0,_.withRouter)(i6);let i9=()=>{let{data:e}=(0,v.useSession)();return(0,g.useEffect)(()=>{var t,r;(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.uid)&&void 0!==iU.co&&(0,iU.Kz)(iU.co,"platform_load",{user:null==e?void 0:null===(r=e.user)||void 0===r?void 0:r.uid})},[iU.co,e]),null};var i8=e=>{let{Component:t,pageProps:{session:r,...n}}=e,i=(0,_.useRouter)(),o=["/onboarding","/messages/general"].includes(i.pathname);return(0,g.useEffect)(()=>{let e=e=>{iB.LV(e),(0,iU.Kz)(iU.co,"page_view_fb",{page:e})};return i.events.on("routeChangeComplete",e),()=>{i.events.off("routeChangeComplete",e)}},[i.events]),(0,f.jsxs)(i3,{children:[(0,f.jsx)(w(),{children:(0,f.jsx)("meta",{name:"facebook-domain-verification",content:"gb98lu1wzq6dhbunxv7q9ixcl9kv14",className:"jsx-8a982babdab68452"})}),(0,f.jsx)(k(),{defer:!0,type:"text/javascript",src:"https://brighter-metrics.netlify.app/go.js",id:"brighter",children:void(window.brighter||(window.brighter={pid:"options"}))}),(0,f.jsx)(k(),{id:"google-tag-manager",strategy:"afterInteractive",children:"\n        (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n        })(window,document,'script','dataLayer','GTM-NS44XTB');\n      "}),(0,f.jsx)(v.SessionProvider,{session:r,children:(0,f.jsx)(iL,{children:(0,f.jsx)(eW,{theme:iF.default,children:(0,f.jsxs)(y.zt,{store:iz.Z,children:[(0,f.jsx)(i9,{}),(0,f.jsxs)("div",{style:{overflowX:"hidden"},className:"jsx-8a982babdab68452",children:[(0,f.jsx)(iQ,{children:(0,f.jsx)(t,{...n,className:"jsx-8a982babdab68452 "+(n&&null!=n.className&&n.className||"")})}),(0,f.jsx)(iH,{}),!o&&(0,f.jsx)(i1,{})]})]})})})}),(0,f.jsx)(m(),{id:"8a982babdab68452",children:'*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:inherit;text-decoration:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}'})]})}},91259:function(e,t,r){"use strict";r.d(t,{N:function(){return o}});var n=r(83300),i=r.n(n);let o=async()=>{try{let{token:e}=await i()("/api/authOmd/token").then(e=>e.json());if(void 0===e)return"";return e}catch(e){return console.error(e),""}}},88074:function(e,t,r){"use strict";let n,i,o,s,a,l,c,u,h,d,f,p,m,g,y,v,b,w,_;r.d(t,{co:function(){return b},I8:function(){return pQ},hJ:function(){return uf},LG:function(){return fB},Xb:function(){return f$},db:function(){return pY},JU:function(){return up},Kz:function(){return hJ},cf:function(){return u$},LS:function(){return fU},pl:function(){return uq},TX:function(){return fq}});var x,k,S,E,T,C,I,P,A,O,R,N,j,D,M,L,F,z,U,B,V,q,$,W,H=r(83454);let G={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},K=function(e,t){if(!e)throw Q(t)},Q=function(e){return Error("Firebase Database ("+G.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},Y=function(e){let t=[],r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return t},X=function(e){let t=[],r=0,n=0;for(;r<e.length;){let i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){let o=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){let o=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else{let o=e[r++],s=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")},J={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t<e.length;t+=3){let i=e[t],o=t+1<e.length,s=o?e[t+1]:0,a=t+2<e.length,l=a?e[t+2]:0,c=i>>2,u=(3&i)<<4|s>>4,h=(15&s)<<2|l>>6,d=63&l;a||(d=64,o||(h=64)),n.push(r[c],r[u],r[h],r[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Y(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):X(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t<e.length;){let i=r[e.charAt(t++)],o=t<e.length?r[e.charAt(t)]:0,s=++t<e.length?r[e.charAt(t)]:64,a=++t<e.length?r[e.charAt(t)]:64;if(++t,null==i||null==o||null==s||null==a)throw new Z;let l=i<<2|o>>4;if(n.push(l),64!==s){let e=o<<4&240|s>>2;if(n.push(e),64!==a){let e=s<<6&192|a;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Z extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let ee=function(e){let t=Y(e);return J.encodeByteArray(t,!0)},et=function(e){return ee(e).replace(/\./g,"")},er=function(e){try{return J.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},en=()=>(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,ei=()=>{if(void 0===H||void 0===H.env)return;let e=H.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},eo=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&er(e[1]);return t&&JSON.parse(t)},es=()=>{try{return en()||ei()||eo()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},ea=e=>{var t,r;return null===(r=null===(t=es())||void 0===t?void 0:t.emulatorHosts)||void 0===r?void 0:r[e]},el=e=>{let t=ea(e);if(!t)return;let r=t.lastIndexOf(":");if(r<=0||r+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let n=parseInt(t.substring(r+1),10);return"["===t[0]?[t.substring(1,r-1),n]:[t.substring(0,r),n]},ec=()=>{var e;return null===(e=es())||void 0===e?void 0:e.config},eu=e=>{var t;return null===(t=es())||void 0===t?void 0:t[`_${e}`]};class eh{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,r))}}}function ed(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let r=t||"demo-project",n=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:n,exp:n+3600,auth_time:n,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[et(JSON.stringify({alg:"none",type:"JWT"})),et(JSON.stringify(o)),""].join(".")}function ef(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function ep(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ef())}function em(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function eg(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function ey(){return!0===G.NODE_CLIENT||!0===G.NODE_ADMIN}function ev(){try{return"object"==typeof indexedDB}catch(e){return!1}}function eb(){return new Promise((e,t)=>{try{let r=!0,n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}function ew(){return"undefined"!=typeof navigator&&!!navigator.cookieEnabled}class e_ extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,e_.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ex.prototype.create)}}class ex{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){let r=t[0]||{},n=`${this.service}/${e}`,i=this.errors[e],o=i?i.replace(ek,(e,t)=>{let n=r[t];return null!=n?String(n):`<${t}?>`}):"Error",s=`${this.serviceName}: ${o} (${n}).`;return new e_(n,s,r)}}let ek=/\{\$([^}]+)}/g;function eS(e){return JSON.parse(e)}function eE(e){return JSON.stringify(e)}let eT=function(e){let t={},r={},n={},i="";try{let o=e.split(".");t=eS(er(o[0])||""),r=eS(er(o[1])||""),i=o[2],n=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:n,signature:i}},eC=function(e){let t=eT(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},eI=function(e){let t=eT(e).claims;return"object"==typeof t&&!0===t.admin};function eP(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eA(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function eO(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function eR(e,t,r){let n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=t.call(r,e[i],i,e));return n}function eN(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);for(let i of r){if(!n.includes(i))return!1;let r=e[i],o=t[i];if(ej(r)&&ej(o)){if(!eN(r,o))return!1}else if(r!==o)return!1}for(let e of n)if(!r.includes(e))return!1;return!0}function ej(e){return null!==e&&"object"==typeof e}function eD(e){let t=[];for(let[r,n]of Object.entries(e))Array.isArray(n)?n.forEach(e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function eM(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[r,n]=e.split("=");t[decodeURIComponent(r)]=decodeURIComponent(n)}}),t}function eL(e){let t=e.indexOf("?");if(!t)return"";let r=e.indexOf("#",t);return e.substring(t,r>0?r:void 0)}class eF{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){let r,n;t||(t=0);let i=this.W_;if("string"==typeof e)for(let r=0;r<16;r++)i[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let r=0;r<16;r++)i[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let e=16;e<80;e++){let t=i[e-3]^i[e-8]^i[e-14]^i[e-16];i[e]=(t<<1|t>>>31)&4294967295}let o=this.chain_[0],s=this.chain_[1],a=this.chain_[2],l=this.chain_[3],c=this.chain_[4];for(let e=0;e<80;e++){e<40?e<20?(r=l^s&(a^l),n=1518500249):(r=s^a^l,n=1859775393):e<60?(r=s&a|l&(s|a),n=2400959708):(r=s^a^l,n=3395469782);let t=(o<<5|o>>>27)+r+c+n+i[e]&4294967295;c=l,l=a,a=(s<<30|s>>>2)&4294967295,s=o,o=t}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);let r=t-this.blockSize,n=0,i=this.buf_,o=this.inbuf_;for(;n<t;){if(0===o)for(;n<=r;)this.compress_(e,n),n+=this.blockSize;if("string"==typeof e){for(;n<t;)if(i[o]=e.charCodeAt(n),++o,++n,o===this.blockSize){this.compress_(i),o=0;break}}else for(;n<t;)if(i[o]=e[n],++o,++n,o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}digest(){let e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let e=this.blockSize-1;e>=56;e--)this.buf_[e]=255&t,t/=256;this.compress_(this.buf_);let r=0;for(let t=0;t<5;t++)for(let n=24;n>=0;n-=8)e[r]=this.chain_[t]>>n&255,++r;return e}}class ez{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw Error("Missing Observer.");void 0===(n=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:r}:e).next&&(n.next=eU),void 0===n.error&&(n.error=eU),void 0===n.complete&&(n.complete=eU);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(e){}}),this.observers.push(n),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function eU(){}let eB=function(e){let t=[],r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(i>=55296&&i<=56319){let t=i-55296;K(++n<e.length,"Surrogate pair missing trail surrogate."),i=65536+(t<<10)+(e.charCodeAt(n)-56320)}i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return t},eV=function(e){let t=0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);n<128?t++:n<2048?t+=2:n>=55296&&n<=56319?(t+=4,r++):t+=3}return t};function eq(e,t=1e3,r=2){let n=t*Math.pow(r,e);return Math.min(144e5,n+Math.round(.5*n*(Math.random()-.5)*2))}function e$(e){return e&&e._delegate?e._delegate:e}class eW{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}let eH="[DEFAULT]";class eG{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new eh;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let r=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(e){if(n)return null;throw e}else{if(n)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:eH})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(e){}}}}clearInstance(e=eH){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=eH){return this.instances.has(e)}getOptions(e=eH){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(let[e,t]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(e)&&t.resolve(n);return n}onInit(e,t){var r;let n=this.normalizeInstanceIdentifier(t),i=null!==(r=this.onInitCallbacks.get(n))&&void 0!==r?r:new Set;i.add(e),this.onInitCallbacks.set(n,i);let o=this.instances.get(n);return o&&e(o,n),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let r=this.onInitCallbacks.get(t);if(r)for(let n of r)try{n(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:e===eH?void 0:e,options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch(e){}return r||null}normalizeInstanceIdentifier(e=eH){return this.component?this.component.multipleInstances?e:eH:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class eK{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new eG(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}let eQ=[];(x=I||(I={}))[x.DEBUG=0]="DEBUG",x[x.VERBOSE=1]="VERBOSE",x[x.INFO=2]="INFO",x[x.WARN=3]="WARN",x[x.ERROR=4]="ERROR",x[x.SILENT=5]="SILENT";let eY={debug:I.DEBUG,verbose:I.VERBOSE,info:I.INFO,warn:I.WARN,error:I.ERROR,silent:I.SILENT},eX=I.INFO,eJ={[I.DEBUG]:"log",[I.VERBOSE]:"log",[I.INFO]:"info",[I.WARN]:"warn",[I.ERROR]:"error"},eZ=(e,t,...r)=>{if(t<e.logLevel)return;let n=new Date().toISOString(),i=eJ[t];if(i)console[i](`[${n}]  ${e.name}:`,...r);else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class e0{constructor(e){this.name=e,this._logLevel=eX,this._logHandler=eZ,this._userLogHandler=null,eQ.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in I))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?eY[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,I.DEBUG,...e),this._logHandler(this,I.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,I.VERBOSE,...e),this._logHandler(this,I.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,I.INFO,...e),this._logHandler(this,I.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,I.WARN,...e),this._logHandler(this,I.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,I.ERROR,...e),this._logHandler(this,I.ERROR,...e)}}let e1=(e,t)=>t.some(t=>e instanceof t),e2=new WeakMap,e4=new WeakMap,e5=new WeakMap,e6=new WeakMap,e3=new WeakMap,e9={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return e4.get(e);if("objectStoreNames"===t)return e.objectStoreNames||e5.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return e8(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function e8(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(e8(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&e2.set(t,e)}).catch(()=>{}),e3.set(t,e),t}(e);if(e6.has(e))return e6.get(e);let r="function"==typeof(t=e)?t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(e7(this),e),e8(e2.get(this))}:function(...e){return e8(t.apply(e7(this),e))}:function(e,...r){let n=t.call(e7(this),e,...r);return e5.set(n,e.sort?e.sort():[e]),e8(n)}:(t instanceof IDBTransaction&&function(e){if(e4.has(e))return;let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});e4.set(e,t)}(t),e1(t,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,e9):t;return r!==e&&(e6.set(e,r),e3.set(r,e)),r}let e7=e=>e3.get(e);function te(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){let s=indexedDB.open(e,t),a=e8(s);return n&&s.addEventListener("upgradeneeded",e=>{n(e8(s.result),e.oldVersion,e.newVersion,e8(s.transaction),e)}),r&&s.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}let tt=["get","getKey","getAll","getAllKeys","count"],tr=["put","add","delete","clear"],tn=new Map;function ti(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(tn.get(t))return tn.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,i=tr.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||tt.includes(r)))return;let o=async function(e,...t){let o=this.transaction(e,i?"readwrite":"readonly"),s=o.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&o.done]))[0]};return tn.set(t,o),o}e9={..._=e9,get:(e,t,r)=>ti(e,t)||_.get(e,t,r),has:(e,t)=>!!ti(e,t)||_.has(e,t)};class to{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let ts="@firebase/app",ta="0.10.13",tl=new e0("@firebase/app"),tc="[DEFAULT]",tu={[ts]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/data-connect":"fire-data-connect","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/vertexai-preview":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},th=new Map,td=new Map,tf=new Map;function tp(e,t){try{e.container.addComponent(t)}catch(r){tl.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function tm(e){let t=e.name;if(tf.has(t))return tl.debug(`There were multiple attempts to register component ${t}.`),!1;for(let r of(tf.set(t,e),th.values()))tp(r,e);for(let t of td.values())tp(t,e);return!0}function tg(e,t){let r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function ty(e){return void 0!==e.settings}let tv=new ex("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class tb{constructor(e,t,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new eW("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw tv.create("app-deleted",{appName:this._name})}}let tw="10.14.1";function t_(e,t={}){let r=e;"object"!=typeof t&&(t={name:t});let n=Object.assign({name:tc,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw tv.create("bad-app-name",{appName:String(i)});if(r||(r=ec()),!r)throw tv.create("no-options");let o=th.get(i);if(o){if(eN(r,o.options)&&eN(n,o.config))return o;throw tv.create("duplicate-app",{appName:i})}let s=new eK(i);for(let e of tf.values())s.addComponent(e);let a=new tb(r,n,s);return th.set(i,a),a}function tx(e=tc){let t=th.get(e);if(!t&&e===tc&&ec())return t_();if(!t)throw tv.create("no-app",{appName:e});return t}function tk(e,t,r){var n;let i=null!==(n=tu[e])&&void 0!==n?n:e;r&&(i+=`-${r}`);let o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){let e=[`Unable to register library "${i}" with version "${t}":`];o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),tl.warn(e.join(" "));return}tm(new eW(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}let tS="firebase-heartbeat-store",tE=null;function tT(){return tE||(tE=te("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(tS)}catch(e){console.warn(e)}}}).catch(e=>{throw tv.create("idb-open",{originalErrorMessage:e.message})})),tE}async function tC(e){try{let t=(await tT()).transaction(tS),r=await t.objectStore(tS).get(tP(e));return await t.done,r}catch(e){if(e instanceof e_)tl.warn(e.message);else{let t=tv.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});tl.warn(t.message)}}}async function tI(e,t){try{let r=(await tT()).transaction(tS,"readwrite"),n=r.objectStore(tS);await n.put(t,tP(e)),await r.done}catch(e){if(e instanceof e_)tl.warn(e.message);else{let t=tv.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});tl.warn(t.message)}}}function tP(e){return`${e.name}!${e.options.appId}`}class tA{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new tR(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){var e,t;try{let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=tO();if((null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(e=>e.date===n))return;return this._heartbeatsCache.heartbeats.push({date:n,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache)}catch(e){tl.warn(e)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null||0===this._heartbeatsCache.heartbeats.length)return"";let t=tO(),{heartbeatsToSend:r,unsentEntries:n}=function(e,t=1024){let r=[],n=e.slice();for(let i of e){let e=r.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),tN(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),tN(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),i=et(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=t,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return tl.warn(e),""}}}function tO(){return new Date().toISOString().substring(0,10)}class tR{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!ev()&&eb().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await tC(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){let r=await this.read();return tI(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){let r=await this.read();return tI(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function tN(e){return et(JSON.stringify({version:2,heartbeats:e})).length}tm(new eW("platform-logger",e=>new to(e),"PRIVATE")),tm(new eW("heartbeat",e=>new tA(e),"PRIVATE")),tk(ts,ta,""),tk(ts,ta,"esm2017"),tk("fire-js",""),tk("firebase","10.14.1","app");let tj="firebasestorage.googleapis.com";class tD extends e_{constructor(e,t,r=0){super(tM(e),`Firebase Storage: ${t} (${tM(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,tD.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return tM(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
${this.customData.serverResponse}`:this.message=this._baseMessage}}function tM(e){return"storage/"+e}function tL(e){return new tD(P.INVALID_ARGUMENT,e)}function tF(){return new tD(P.APP_DELETED,"The Firebase app was deleted.")}(k=P||(P={})).UNKNOWN="unknown",k.OBJECT_NOT_FOUND="object-not-found",k.BUCKET_NOT_FOUND="bucket-not-found",k.PROJECT_NOT_FOUND="project-not-found",k.QUOTA_EXCEEDED="quota-exceeded",k.UNAUTHENTICATED="unauthenticated",k.UNAUTHORIZED="unauthorized",k.UNAUTHORIZED_APP="unauthorized-app",k.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",k.INVALID_CHECKSUM="invalid-checksum",k.CANCELED="canceled",k.INVALID_EVENT_NAME="invalid-event-name",k.INVALID_URL="invalid-url",k.INVALID_DEFAULT_BUCKET="invalid-default-bucket",k.NO_DEFAULT_BUCKET="no-default-bucket",k.CANNOT_SLICE_BLOB="cannot-slice-blob",k.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",k.NO_DOWNLOAD_URL="no-download-url",k.INVALID_ARGUMENT="invalid-argument",k.INVALID_ARGUMENT_COUNT="invalid-argument-count",k.APP_DELETED="app-deleted",k.INVALID_ROOT_OPERATION="invalid-root-operation",k.INVALID_FORMAT="invalid-format",k.INTERNAL_ERROR="internal-error",k.UNSUPPORTED_ENVIRONMENT="unsupported-environment";class tz{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let r;try{r=tz.makeFromUrl(e,t)}catch(t){return new tz(e,"")}if(""===r.path)return r;throw new tD(P.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}static makeFromUrl(e,t){let r=null,n="([A-Za-z0-9.\\-_]+)",i=RegExp("^gs://"+n+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}let s=t.replace(/[.]/g,"\\."),a=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:RegExp(`^https?://${s}/v[A-Za-z0-9_]+/b/${n}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:RegExp(`^https?://${t===tj?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${n}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let t=0;t<a.length;t++){let n=a[t],i=n.regex.exec(e);if(i){let e=i[n.indices.bucket],t=i[n.indices.path];t||(t=""),r=new tz(e,t),n.postModify(r);break}}if(null==r)throw new tD(P.INVALID_URL,"Invalid URL '"+e+"'.");return r}}class tU{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function tB(e,t,r,n){if(n<t)throw tL(`Invalid value for '${e}'. Expected ${t} or greater.`);if(n>r)throw tL(`Invalid value for '${e}'. Expected ${r} or less.`)}(S=A||(A={}))[S.NO_ERROR=0]="NO_ERROR",S[S.NETWORK_ERROR=1]="NETWORK_ERROR",S[S.ABORT=2]="ABORT";class tV{constructor(e,t,r,n,i,o,s,a,l,c,u,h=!0){this.url_=e,this.method_=t,this.headers_=r,this.body_=n,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=s,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=u,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()})}start_(){let e=(e,t)=>{let r=this.resolve_,n=this.reject_,i=t.connection;if(t.wasSuccessCode)try{let e=this.callback_(i,i.getResponse());void 0!==e?r(e):r()}catch(e){n(e)}else if(null!==i){let e=new tD(P.UNKNOWN,"An unknown error occurred, please check the error payload for server response.");e.serverResponse=i.getErrorText(),n(this.errorCallback_?this.errorCallback_(i,e):e)}else n(t.canceled?this.appDelete_?tF():new tD(P.CANCELED,"User canceled the upload/download."):new tD(P.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))};this.canceled_?e(!1,new tq(!1,null,!0)):this.backoffId_=function(e,t,r){let n=1,i=null,o=null,s=!1,a=0,l=!1;function c(...e){l||(l=!0,t.apply(null,e))}function u(t){i=setTimeout(()=>{i=null,e(d,2===a)},t)}function h(){o&&clearTimeout(o)}function d(e,...t){let r;if(l){h();return}if(e||2===a||s){h(),c.call(null,e,...t);return}n<64&&(n*=2),1===a?(a=2,r=0):r=(n+Math.random())*1e3,u(r)}let f=!1;function p(e){!f&&(f=!0,h(),!l&&(null!==i?(e||(a=2),clearTimeout(i),u(0)):e||(a=1)))}return u(0),o=setTimeout(()=>{s=!0,p(!0)},r),p}((e,t)=>{if(t){e(!1,new tq(!1,null,!0));return}let r=this.connectionFactory_();this.pendingConnection_=r;let n=e=>{let t=e.loaded,r=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,r)};null!==this.progressCallback_&&r.addUploadProgressListener(n),r.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&r.removeUploadProgressListener(n),this.pendingConnection_=null;let t=r.getErrorCode()===A.NO_ERROR,i=r.getStatus();if(!t||function(e,t){let r=e>=500&&e<600,n=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return r||n||i}(i,this.additionalRetryCodes_)&&this.retry){e(!1,new tq(!1,null,r.getErrorCode()===A.ABORT));return}e(!0,new tq(-1!==this.successCodes_.indexOf(i),r))})},e,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class tq{constructor(e,t,r){this.wasSuccessCode=e,this.connection=t,this.canceled=!!r}}class t${constructor(e,t){this._service=e,t instanceof tz?this._location=t:this._location=tz.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new t$(e,t)}get root(){let e=new tz(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return function(e){let t=e.lastIndexOf("/",e.length-2);return -1===t?e:e.slice(t+1)}(this._location.path)}get storage(){return this._service}get parent(){let e=function(e){if(0===e.length)return null;let t=e.lastIndexOf("/");return -1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;let t=new tz(this._location.bucket,e);return new t$(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw new tD(P.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}}function tW(e,t){let r=null==t?void 0:t.storageBucket;return null==r?null:tz.makeFromBucketSpec(r,e)}class tH{constructor(e,t,r,n,i){this.app=e,this._authProvider=t,this._appCheckProvider=r,this._url=n,this._firebaseVersion=i,this._bucket=null,this._host=tj,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=n?this._bucket=tz.makeFromBucketSpec(n,this._host):this._bucket=tW(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=tz.makeFromBucketSpec(this._url,e):this._bucket=tW(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){tB("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){tB("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){let e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new t$(this,e)}_makeRequest(e,t,r,n,i=!0){if(this._deleted)return new tU(tF());{let o=function(e,t,r,n,i,o,s=!0){let a=function(e){let t=encodeURIComponent,r="?";for(let n in e)e.hasOwnProperty(n)&&(r=r+(t(n)+"=")+t(e[n])+"&");return r.slice(0,-1)}(e.urlParams),l=e.url+a,c=Object.assign({},e.headers);return t&&(c["X-Firebase-GMPID"]=t),null!==r&&r.length>0&&(c.Authorization="Firebase "+r),c["X-Firebase-Storage-Version"]="webjs/"+(null!=o?o:"AppManager"),null!==n&&(c["X-Firebase-AppCheck"]=n),new tV(l,e.method,c,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,s)}(e,this._appId,r,n,t,this._firebaseVersion,i);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,t){let[r,n]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,r,n).getPromise()}}let tG="@firebase/storage",tK="0.13.2",tQ="storage";tm(new eW(tQ,function(e,{instanceIdentifier:t}){return new tH(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t,tw)},"PUBLIC").setMultipleInstances(!0)),tk(tG,tK,""),tk(tG,tK,"esm2017");var tY=r(83454);let tX="@firebase/database",tJ="1.0.8",tZ="";class t0{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),eE(t))}get(e){let t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:eS(t)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}class t1{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}get(e){return eP(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}let t2=function(e){try{if("undefined"!=typeof window&&void 0!==window[e]){let t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new t0(t)}}catch(e){}return new t1},t4=t2("localStorage"),t5=t2("sessionStorage"),t6=new e0("@firebase/database"),t3=(w=1,function(){return w++}),t9=function(e){let t=eB(e),r=new eF;r.update(t);let n=r.digest();return J.encodeByteArray(n)},t8=function(...e){let t="";for(let r=0;r<e.length;r++){let n=e[r];Array.isArray(n)||n&&"object"==typeof n&&"number"==typeof n.length?t+=t8.apply(null,n):"object"==typeof n?t+=eE(n):t+=n,t+=" "}return t},t7=null,re=!0,rt=function(e,t){K(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(t6.logLevel=I.VERBOSE,t7=t6.log.bind(t6),t&&t5.set("logging_enabled",!0)):"function"==typeof e?t7=e:(t7=null,t5.remove("logging_enabled"))},rr=function(...e){if(!0===re&&(re=!1,null===t7&&!0===t5.get("logging_enabled")&&rt(!0)),t7){let t=t8.apply(null,e);t7(t)}},rn=function(e){return function(...t){rr(e,...t)}},ri=function(...e){let t="FIREBASE INTERNAL ERROR: "+t8(...e);t6.error(t)},ro=function(...e){let t=`FIREBASE FATAL ERROR: ${t8(...e)}`;throw t6.error(t),Error(t)},rs=function(...e){let t="FIREBASE WARNING: "+t8(...e);t6.warn(t)},ra=function(){"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&rs("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},rl=function(e){return"number"==typeof e&&(e!=e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},rc=function(e){if(ey()||"complete"===document.readyState)e();else{let t=!1,r=function(){if(!document.body){setTimeout(r,Math.floor(10));return}t||(t=!0,e())};document.addEventListener?(document.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&r()}),window.attachEvent("onload",r))}},ru="[MIN_NAME]",rh="[MAX_NAME]",rd=function(e,t){if(e===t)return 0;if(e===ru||t===rh)return -1;if(t===ru||e===rh)return 1;{let r=rw(e),n=rw(t);return null!==r?null!==n?r-n==0?e.length-t.length:r-n:-1:null!==n?1:e<t?-1:1}},rf=function(e,t){return e===t?0:e<t?-1:1},rp=function(e,t){if(t&&e in t)return t[e];throw Error("Missing required key ("+e+") in object: "+eE(t))},rm=function(e){if("object"!=typeof e||null===e)return eE(e);let t=[];for(let r in e)t.push(r);t.sort();let r="{";for(let n=0;n<t.length;n++)0!==n&&(r+=","),r+=eE(t[n])+":"+rm(e[t[n]]);return r+"}"},rg=function(e,t){let r=e.length;if(r<=t)return[e];let n=[];for(let i=0;i<r;i+=t)i+t>r?n.push(e.substring(i,r)):n.push(e.substring(i,i+t));return n};function ry(e,t){for(let r in e)e.hasOwnProperty(r)&&t(r,e[r])}let rv=function(e){let t,r,n,i,o;K(!rl(e),"Invalid JSON number"),0===e?(r=0,n=0,t=1/e==-1/0?1:0):(t=e<0,(e=Math.abs(e))>=22250738585072014e-324?(r=(i=Math.min(Math.floor(Math.log(e)/Math.LN2),1023))+1023,n=Math.round(e*Math.pow(2,52-i)-4503599627370496)):(r=0,n=Math.round(e/5e-324)));let s=[];for(o=52;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);for(o=11;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);s.push(t?1:0),s.reverse();let a=s.join(""),l="";for(o=0;o<64;o+=8){let e=parseInt(a.substr(o,8),2).toString(16);1===e.length&&(e="0"+e),l+=e}return l.toLowerCase()},rb=RegExp("^-?(0*)\\d{1,10}$"),rw=function(e){if(rb.test(e)){let t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},r_=function(e){try{e()}catch(e){setTimeout(()=>{throw rs("Exception was thrown by user callback.",e.stack||""),e},Math.floor(0))}},rx=function(e,t){let r=setTimeout(e,t);return"number"==typeof r&&"undefined"!=typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(r):"object"==typeof r&&r.unref&&r.unref(),r};class rk{constructor(e,t){this.appName_=e,this.appCheckProvider=t,this.appCheck=null==t?void 0:t.getImmediate({optional:!0}),this.appCheck||null==t||t.get().then(e=>this.appCheck=e)}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise((t,r)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(t,r):t(null)},0)})}addTokenChangeListener(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then(t=>t.addTokenListener(e))}notifyForInvalidToken(){rs(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}class rS{constructor(e,t,r){this.appName_=e,this.firebaseOptions_=t,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(e=>this.auth_=e)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(e=>e&&"auth/token-not-initialized"===e.code?(rr("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(e)):new Promise((t,r)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(t,r):t(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(t=>t.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(t=>t.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',rs(e)}}class rE{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}rE.OWNER="owner";let rT=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,rC="websocket",rI="long_polling";class rP{constructor(e,t,r,n,i=!1,o="",s=!1,a=!1){this.secure=t,this.namespace=r,this.webSocketOnly=n,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=t4.get("host:"+e)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&t4.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){let e=this.secure?"https://":"http://",t=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${t}`}}function rA(e,t,r){let n;if(K("string"==typeof t,"typeof type must == string"),K("object"==typeof r,"typeof params must == object"),t===rC)n=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else if(t===rI)n=(e.secure?"https://":"http://")+e.internalHost+"/.lp?";else throw Error("Unknown connection type: "+t);(e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams)&&(r.ns=e.namespace);let i=[];return ry(r,(e,t)=>{i.push(e+"="+t)}),n+i.join("&")}class rO{constructor(){this.counters_={}}incrementCounter(e,t=1){eP(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}get(){return function e(t,r){if(!(r instanceof Object))return r;switch(r.constructor){case Date:return new Date(r.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return r}for(let n in r)r.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=e(t[n],r[n]));return t}(void 0,this.counters_)}}let rR={},rN={};function rj(e){let t=e.toString();return rR[t]||(rR[t]=new rO),rR[t]}class rD{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(e,t){for(this.pendingResponses[e]=t;this.pendingResponses[this.currentResponseNum];){let e=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let t=0;t<e.length;++t)e[t]&&r_(()=>{this.onMessage_(e[t])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}let rM="start";class rL{constructor(e,t,r,n,i,o,s){this.connId=e,this.repoInfo=t,this.applicationId=r,this.appCheckToken=n,this.authToken=i,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=rn(e),this.stats_=rj(t),this.urlFn=e=>(this.appCheckToken&&(e.ac=this.appCheckToken),rA(t,rI,e))}open(e,t){this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new rD(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(3e4)),rc(()=>{if(this.isClosed_)return;this.scriptTagHolder=new rF((...e)=>{let[t,r,n,i,o]=e;if(this.incrementIncomingBytes_(e),this.scriptTagHolder){if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,t===rM)this.id=r,this.password=n;else if("close"===t)r?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(r,()=>{this.onClosed_()})):this.onClosed_();else throw Error("Unrecognized command received: "+t)}},(...e)=>{let[t,r]=e;this.incrementIncomingBytes_(e),this.myPacketOrderer.handleResponse(t,r)},()=>{this.onClosed_()},this.urlFn);let e={};e[rM]="t",e.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=this.scriptTagHolder.uniqueCallbackIdentifier),e.v="5",this.transportSessionId&&(e.s=this.transportSessionId),this.lastSessionId&&(e.ls=this.lastSessionId),this.applicationId&&(e.p=this.applicationId),this.appCheckToken&&(e.ac=this.appCheckToken),"undefined"!=typeof location&&location.hostname&&rT.test(location.hostname)&&(e.r="f");let t=this.urlFn(e);this.log_("Connecting via long-poll to "+t),this.scriptTagHolder.addTag(t,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){rL.forceAllow_=!0}static forceDisallow(){rL.forceDisallow_=!0}static isAvailable(){return!ey()&&(!!rL.forceAllow_||!rL.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.UI))}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){!this.isClosed_&&(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){let t=eE(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);let r=rg(ee(t),1840);for(let e=0;e<r.length;e++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[e]),this.curSegmentNum++}addDisconnectPingFrame(e,t){if(ey())return;this.myDisconnFrame=document.createElement("iframe");let r={};r.dframe="t",r.id=e,r.pw=t,this.myDisconnFrame.src=this.urlFn(r),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(e){let t=eE(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)}}class rF{constructor(e,t,r,n){if(this.onDisconnect=r,this.urlFn=n,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,ey())this.commandCB=e,this.onMessageCB=t;else{this.uniqueCallbackIdentifier=t3(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=t,this.myIFrame=rF.createIFrame_();let r="";this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,11)&&(r='<script>document.domain="'+document.domain+'";</script>');let n="<html><body>"+r+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(n),this.myIFrame.doc.close()}catch(e){rr("frame writing exception"),e.stack&&rr(e.stack),rr(e)}}}static createIFrame_(){let e=document.createElement("iframe");if(e.style.display="none",document.body){document.body.appendChild(e);try{e.contentWindow.document||rr("No IE domain setting required")}catch(r){let t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));let e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););}newRequest_(){if(!this.alive||!this.sendNewPolls||!(this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)))return!1;{this.currentSerial++;let e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;let t=this.urlFn(e),r="",n=0;for(;this.pendingSegs.length>0;)if(this.pendingSegs[0].d.length+30+r.length<=1870){let e=this.pendingSegs.shift();r=r+"&seg"+n+"="+e.seg+"&ts"+n+"="+e.ts+"&d"+n+"="+e.d,n++}else break;return t+=r,this.addLongPollTag_(t,this.currentSerial),!0}}enqueueSegment(e,t,r){this.pendingSegs.push({seg:e,ts:t,d:r}),this.alive&&this.newRequest_()}addLongPollTag_(e,t){this.outstandingRequests.add(t);let r=()=>{this.outstandingRequests.delete(t),this.newRequest_()},n=setTimeout(r,Math.floor(25e3));this.addTag(e,()=>{clearTimeout(n),r()})}addTag(e,t){ey()?this.doNodeLongPoll(e,t):setTimeout(()=>{try{if(!this.sendNewPolls)return;let r=this.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){let e=r.readyState;e&&"loaded"!==e&&"complete"!==e||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),t())},r.onerror=()=>{rr("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(r)}catch(e){}},Math.floor(1))}}let rz=null;"undefined"!=typeof MozWebSocket?rz=MozWebSocket:"undefined"!=typeof WebSocket&&(rz=WebSocket);class rU{constructor(e,t,r,n,i,o,s){this.connId=e,this.applicationId=r,this.appCheckToken=n,this.authToken=i,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=rn(this.connId),this.stats_=rj(t),this.connURL=rU.connectionURL_(t,o,s,n,r),this.nodeAdmin=t.nodeAdmin}static connectionURL_(e,t,r,n,i){let o={};return o.v="5",!ey()&&"undefined"!=typeof location&&location.hostname&&rT.test(location.hostname)&&(o.r="f"),t&&(o.s=t),r&&(o.ls=r),n&&(o.ac=n),i&&(o.p=i),rA(e,rC,o)}open(e,t){this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,t4.set("previous_websocket_failure",!0);try{let e;if(ey()){let t=this.nodeAdmin?"AdminNode":"Node";e={headers:{"User-Agent":`Firebase/5/${tZ}/${tY.platform}/${t}`,"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(e.headers.Authorization=`Bearer ${this.authToken}`),this.appCheckToken&&(e.headers["X-Firebase-AppCheck"]=this.appCheckToken);let r=tY.env,n=0===this.connURL.indexOf("wss://")?r.HTTPS_PROXY||r.https_proxy:r.HTTP_PROXY||r.http_proxy;n&&(e.proxy={origin:n})}this.mySock=new rz(this.connURL,[],e)}catch(t){this.log_("Error instantiating WebSocket.");let e=t.message||t.data;e&&this.log_(e),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=e=>{this.handleIncomingFrame(e)},this.mySock.onerror=e=>{this.log_("WebSocket error.  Closing connection.");let t=e.message||e.data;t&&this.log_(t),this.onClosed_()}}start(){}static forceDisallow(){rU.forceDisallow_=!0}static isAvailable(){let e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){let t=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);t&&t.length>1&&4.4>parseFloat(t[1])&&(e=!0)}return!e&&null!==rz&&!rU.forceDisallow_}static previouslyFailed(){return t4.isInMemoryStorage||!0===t4.get("previous_websocket_failure")}markConnectionHealthy(){t4.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){let e=this.frames.join("");this.frames=null;let t=eS(e);this.onMessage(t)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(K(null===this.frames,"We already have a frame buffer"),e.length<=6){let t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(null===this.mySock)return;let t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{let e=this.extractFrameCount_(t);null!==e&&this.appendFrame_(e)}}send(e){this.resetKeepAlive();let t=eE(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);let r=rg(t,16384);r.length>1&&this.sendString_(String(r.length));for(let e=0;e<r.length;e++)this.sendString_(r[e])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){!this.isClosed_&&(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(45e3))}sendString_(e){try{this.mySock.send(e)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}rU.responsesRequiredToBeHealthy=2,rU.healthyTimeout=3e4;class rB{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[rL,rU]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){let t=rU&&rU.isAvailable(),r=t&&!rU.previouslyFailed();if(e.webSocketOnly&&(t||rs("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),r=!0),r)this.transports_=[rU];else{let e=this.transports_=[];for(let t of rB.ALL_TRANSPORTS)t&&t.isAvailable()&&e.push(t);rB.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}rB.globalTransportInitialized_=!1;class rV{constructor(e,t,r,n,i,o,s,a,l,c){this.id=e,this.repoInfo_=t,this.applicationId_=r,this.appCheckToken_=n,this.authToken_=i,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=a,this.onKill_=l,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=rn("c:"+this.id+":"),this.transportManager_=new rB(t),this.log_("Connection created"),this.start_()}start_(){let e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;let t=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(t,r)},Math.floor(0));let n=e.healthyTimeout||0;n>0&&(this.healthyTimeout_=rx(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes.  Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>10240?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes.  Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(n)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return t=>{e===this.conn_?this.onConnectionLost_(t):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return t=>{2!==this.state_&&(e===this.rx_?this.onPrimaryMessageReceived_(t):e===this.secondaryConn_?this.onSecondaryMessageReceived_(t):this.log_("message on old connection"))}}sendRequest(e){this.sendData_({t:"d",d:e})}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if("t"in e){let t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){let t=rp("t",e),r=rp("d",e);if("c"===t)this.onSecondaryControl_(r);else if("d"===t)this.pendingDataMessages.push(r);else throw Error("Unknown protocol layer: "+t)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){let t=rp("t",e),r=rp("d",e);"c"===t?this.onControl_(r):"d"===t&&this.onDataMessage_(r)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){!this.isHealthy_&&(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){let t=rp("t",e);if("d"in e){let r=e.d;if("h"===t){let e=Object.assign({},r);this.repoInfo_.isUsingEmulator&&(e.h=this.repoInfo_.host),this.onHandshake_(e)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let e=0;e<this.pendingDataMessages.length;++e)this.onDataMessage_(this.pendingDataMessages[e]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(r):"r"===t?this.onReset_(r):"e"===t?ri("Server Error: "+r):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):ri("Unknown control packet command: "+t)}}onHandshake_(e){let t=e.ts,r=e.v,n=e.h;this.sessionId=e.s,this.repoInfo_.host=n,0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),"5"!==r&&rs("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){let e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)}startUpgrade_(e){this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;let t=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(t,r),rx(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(6e4))}onReset_(e){this.log_("Reset packet received.  New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,t){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):rx(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){let e=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===e||this.rx_===e)&&this.close()}onConnectionLost_(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(t4.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}close(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}class rq{put(e,t,r,n){}merge(e,t,r,n){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,t,r){}onDisconnectMerge(e,t,r){}onDisconnectCancel(e,t){}reportStats(e){}}class r${constructor(e){this.allowedEvents_=e,this.listeners_={},K(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e,...t){if(Array.isArray(this.listeners_[e])){let r=[...this.listeners_[e]];for(let e=0;e<r.length;e++)r[e].callback.apply(r[e].context,t)}}on(e,t,r){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:r});let n=this.getInitialEvent(e);n&&t.apply(r,n)}off(e,t,r){this.validateEventType_(e);let n=this.listeners_[e]||[];for(let e=0;e<n.length;e++)if(n[e].callback===t&&(!r||r===n[e].context)){n.splice(e,1);return}}validateEventType_(e){K(this.allowedEvents_.find(t=>t===e),"Unknown event: "+e)}}class rW extends r${constructor(){super(["online"]),this.online_=!0,"undefined"==typeof window||void 0===window.addEventListener||ep()||(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new rW}getInitialEvent(e){return K("online"===e,"Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}class rH{constructor(e,t){if(void 0===t){this.pieces_=e.split("/");let t=0;for(let e=0;e<this.pieces_.length;e++)this.pieces_[e].length>0&&(this.pieces_[t]=this.pieces_[e],t++);this.pieces_.length=t,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}toString(){let e="";for(let t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"}}function rG(){return new rH("")}function rK(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function rQ(e){return e.pieces_.length-e.pieceNum_}function rY(e){let t=e.pieceNum_;return t<e.pieces_.length&&t++,new rH(e.pieces_,t)}function rX(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function rJ(e,t=0){return e.pieces_.slice(e.pieceNum_+t)}function rZ(e){if(e.pieceNum_>=e.pieces_.length)return null;let t=[];for(let r=e.pieceNum_;r<e.pieces_.length-1;r++)t.push(e.pieces_[r]);return new rH(t,0)}function r0(e,t){let r=[];for(let t=e.pieceNum_;t<e.pieces_.length;t++)r.push(e.pieces_[t]);if(t instanceof rH)for(let e=t.pieceNum_;e<t.pieces_.length;e++)r.push(t.pieces_[e]);else{let e=t.split("/");for(let t=0;t<e.length;t++)e[t].length>0&&r.push(e[t])}return new rH(r,0)}function r1(e){return e.pieceNum_>=e.pieces_.length}function r2(e,t){let r=rK(e),n=rK(t);if(null===r)return t;if(r===n)return r2(rY(e),rY(t));throw Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function r4(e,t){if(rQ(e)!==rQ(t))return!1;for(let r=e.pieceNum_,n=t.pieceNum_;r<=e.pieces_.length;r++,n++)if(e.pieces_[r]!==t.pieces_[n])return!1;return!0}function r5(e,t){let r=e.pieceNum_,n=t.pieceNum_;if(rQ(e)>rQ(t))return!1;for(;r<e.pieces_.length;){if(e.pieces_[r]!==t.pieces_[n])return!1;++r,++n}return!0}class r6{constructor(e,t){this.errorPrefix_=t,this.parts_=rJ(e,0),this.byteLength_=Math.max(1,this.parts_.length);for(let e=0;e<this.parts_.length;e++)this.byteLength_+=eV(this.parts_[e]);r3(this)}}function r3(e){if(e.byteLength_>768)throw Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+r9(e))}function r9(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}class r8 extends r${constructor(){let e,t;super(["visible"]),"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(t="visibilitychange",e="hidden"):void 0!==document.mozHidden?(t="mozvisibilitychange",e="mozHidden"):void 0!==document.msHidden?(t="msvisibilitychange",e="msHidden"):void 0!==document.webkitHidden&&(t="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,t&&document.addEventListener(t,()=>{let t=!document[e];t!==this.visible_&&(this.visible_=t,this.trigger("visible",t))},!1)}static getInstance(){return new r8}getInitialEvent(e){return K("visible"===e,"Unknown event type: "+e),[this.visible_]}}class r7 extends rq{constructor(e,t,r,n,i,o,s,a){if(super(),this.repoInfo_=e,this.applicationId_=t,this.onDataUpdate_=r,this.onConnectStatus_=n,this.onServerInfoUpdate_=i,this.authTokenProvider_=o,this.appCheckTokenProvider_=s,this.authOverride_=a,this.id=r7.nextPersistentConnectionId_++,this.log_=rn("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=1e3,this.maxReconnectDelay_=3e5,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,a&&!ey())throw Error("Auth override specified in options, but not supported on non Node.js platforms");r8.getInstance().on("visible",this.onVisible_,this),-1===e.host.indexOf("fblocal")&&rW.getInstance().on("online",this.onOnline_,this)}sendRequest(e,t,r){let n=++this.requestNumber_,i={r:n,a:e,b:t};this.log_(eE(i)),K(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),r&&(this.requestCBHash_[n]=r)}get(e){this.initConnection_();let t=new eh,r={p:e._path.toString(),q:e._queryObject};this.outstandingGets_.push({action:"g",request:r,onComplete:e=>{let r=e.d;"ok"===e.s?t.resolve(r):t.reject(r)}}),this.outstandingGetCount_++;let n=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(n),t.promise}listen(e,t,r,n){this.initConnection_();let i=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),K(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),K(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");let s={onComplete:n,hashFn:t,query:e,tag:r};this.listens.get(o).set(i,s),this.connected_&&this.sendListen_(s)}sendGet_(e){let t=this.outstandingGets_[e];this.sendRequest("g",t.request,r=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),t.onComplete&&t.onComplete(r)})}sendListen_(e){let t=e.query,r=t._path.toString(),n=t._queryIdentifier;this.log_("Listen on "+r+" for "+n);let i={p:r};e.tag&&(i.q=t._queryObject,i.t=e.tag),i.h=e.hashFn(),this.sendRequest("q",i,i=>{let o=i.d,s=i.s;r7.warnOnListenWarnings_(o,t),(this.listens.get(r)&&this.listens.get(r).get(n))===e&&(this.log_("listen response",i),"ok"!==s&&this.removeListen_(r,n),e.onComplete&&e.onComplete(s,o))})}static warnOnListenWarnings_(e,t){if(e&&"object"==typeof e&&eP(e,"w")){let r=eA(e,"w");if(Array.isArray(r)&&~r.indexOf("no_index")){let e='".indexOn": "'+t._queryParams.getIndex().toString()+'"',r=t._path.toString();rs(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${e} at ${r} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&40===e.length||eI(e))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){let e=this.authToken_,t=eC(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"==typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(t,r,t=>{let r=t.s,n=t.d||"error";this.authToken_===e&&("ok"===r?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(r,n))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{let t=e.s,r=e.d||"error";"ok"===t?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(t,r)})}unlisten(e,t){let r=e._path.toString(),n=e._queryIdentifier;this.log_("Unlisten called for "+r+" "+n),K(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(r,n)&&this.connected_&&this.sendUnlisten_(r,n,e._queryObject,t)}sendUnlisten_(e,t,r,n){this.log_("Unlisten on "+e+" for "+t);let i={p:e};n&&(i.q=r,i.t=n),this.sendRequest("n",i)}onDisconnectPut(e,t,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:r})}onDisconnectMerge(e,t,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:r})}onDisconnectCancel(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}sendOnDisconnect_(e,t,r,n){let i={p:t,d:r};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,e=>{n&&setTimeout(()=>{n(e.s,e.d)},Math.floor(0))})}put(e,t,r,n){this.putInternal("p",e,t,r,n)}merge(e,t,r,n){this.putInternal("m",e,t,r,n)}putInternal(e,t,r,n,i){this.initConnection_();let o={p:t,d:r};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:n}),this.outstandingPutCount_++;let s=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(s):this.log_("Buffering put: "+t)}sendPut_(e){let t=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,n=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(t,r,r=>{this.log_(t+" response",r),delete this.outstandingPuts_[e],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),n&&n(r.s,r.d)})}reportStats(e){if(this.connected_){let t={c:e};this.log_("reportStats",t),this.sendRequest("s",t,e=>{if("ok"!==e.s){let t=e.d;this.log_("reportStats","Error sending stats: "+t)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+eE(e));let t=e.r,r=this.requestCBHash_[t];r&&(delete this.requestCBHash_[t],r(e.b))}else if("error"in e)throw"A server-side error has occurred: "+e.error;else"a"in e&&this.onDataPush_(e.a,e.b)}onDataPush_(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):ri("Unrecognized action received from server: "+eE(e)+"\nAre you using the latest client?")}onReady_(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){K(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){!e||this.visible_||this.reconnectDelay_!==this.maxReconnectDelay_||(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=1e3),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());let e=new Date().getTime()-this.lastConnectionAttemptTime_,t=Math.max(0,this.reconnectDelay_-e);t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;let e=this.onDataMessage_.bind(this),t=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),n=this.id+":"+r7.nextConnectionId_++,i=this.lastSessionId,o=!1,s=null,a=function(){s?s.close():(o=!0,r())};this.realtime_={close:a,sendRequest:function(e){K(s,"sendRequest call when we're not connected not allowed."),s.sendRequest(e)}};let l=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{let[a,c]=await Promise.all([this.authTokenProvider_.getToken(l),this.appCheckTokenProvider_.getToken(l)]);o?rr("getToken() completed but was canceled"):(rr("getToken() completed. Creating connection."),this.authToken_=a&&a.accessToken,this.appCheckToken_=c&&c.token,s=new rV(n,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,t,r,e=>{rs(e+" ("+this.repoInfo_.toString()+")"),this.interrupt("server_kill")},i))}catch(e){this.log_("Failed to get token: "+e),o||(this.repoInfo_.nodeAdmin&&rs(e),a())}}}interrupt(e){rr("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){rr("Resuming connection for reason: "+e),delete this.interruptReasons_[e],eO(this.interruptReasons_)&&(this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){let t=e-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}cancelSentTransactions_(){for(let e=0;e<this.outstandingPuts_.length;e++){let t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])}onListenRevoked_(e,t){let r;r=t?t.map(e=>rm(e)).join("$"):"default";let n=this.removeListen_(e,r);n&&n.onComplete&&n.onComplete("permission_denied")}removeListen_(e,t){let r;let n=new rH(e).toString();if(this.listens.has(n)){let e=this.listens.get(n);r=e.get(t),e.delete(t),0===e.size&&this.listens.delete(n)}else r=void 0;return r}onAuthRevoked_(e,t){rr("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),("invalid_token"===e||"permission_denied"===e)&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,t){rr("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,("invalid_token"===e||"permission_denied"===e)&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}restoreState_(){for(let e of(this.tryAuth(),this.tryAppCheck(),this.listens.values()))for(let t of e.values())this.sendListen_(t);for(let e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){let e=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(e.action,e.pathString,e.data,e.onComplete)}for(let e=0;e<this.outstandingGets_.length;e++)this.outstandingGets_[e]&&this.sendGet_(e)}sendConnectStats_(){let e={},t="js";ey()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+tZ.replace(/\./g,"-")]=1,ep()?e["framework.cordova"]=1:eg()&&(e["framework.reactnative"]=1),this.reportStats(e)}shouldReconnect_(){let e=rW.getInstance().currentlyOnline();return eO(this.interruptReasons_)&&e}}r7.nextPersistentConnectionId_=0,r7.nextConnectionId_=0;class ne{constructor(e,t){this.name=e,this.node=t}static Wrap(e,t){return new ne(e,t)}}class nt{getCompare(){return this.compare.bind(this)}indexedValueChanged(e,t){let r=new ne(ru,e),n=new ne(ru,t);return 0!==this.compare(r,n)}minPost(){return ne.MIN}}class nr extends nt{static get __EMPTY_NODE(){return o}static set __EMPTY_NODE(e){o=e}compare(e,t){return rd(e.name,t.name)}isDefinedOn(e){throw Q("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(e,t){return!1}minPost(){return ne.MIN}maxPost(){return new ne(rh,o)}makePost(e,t){return K("string"==typeof e,"KeyIndex indexValue must always be a string."),new ne(e,o)}toString(){return".key"}}let nn=new nr;class ni{constructor(e,t,r,n,i=null){this.isReverse_=n,this.resultGenerator_=i,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(o=t?r(e.key,t):1,n&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else if(0===o){this.nodeStack_.push(e);break}else this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}getNext(){let e;if(0===this.nodeStack_.length)return null;let t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}hasNext(){return this.nodeStack_.length>0}peek(){if(0===this.nodeStack_.length)return null;let e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class no{constructor(e,t,r,n,i){this.key=e,this.value=t,this.color=null!=r?r:no.RED,this.left=null!=n?n:na.EMPTY_NODE,this.right=null!=i?i:na.EMPTY_NODE}copy(e,t,r,n,i){return new no(null!=e?e:this.key,null!=t?t:this.value,null!=r?r:this.color,null!=n?n:this.left,null!=i?i:this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let n=this,i=r(e,n.key);return(n=i<0?n.copy(null,null,null,n.left.insert(e,t,r),null):0===i?n.copy(null,t,null,null,null):n.copy(null,null,null,null,n.right.insert(e,t,r))).fixUp_()}removeMin_(){if(this.left.isEmpty())return na.EMPTY_NODE;let e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),(e=e.copy(null,null,null,e.left.removeMin_(),null)).fixUp_()}remove(e,t){let r,n;if(r=this,0>t(e,r.key))r.left.isEmpty()||r.left.isRed_()||r.left.left.isRed_()||(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),r.right.isEmpty()||r.right.isRed_()||r.right.left.isRed_()||(r=r.moveRedRight_()),0===t(e,r.key)){if(r.right.isEmpty())return na.EMPTY_NODE;n=r.right.min_(),r=r.copy(n.key,n.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight_())).rotateLeft_()).colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=(e=e.rotateRight_()).colorFlip_()),e}rotateLeft_(){let e=this.copy(null,null,no.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){let e=this.copy(null,null,no.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth_(){return Math.pow(2,this.check_())<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw Error("Right child of ("+this.key+","+this.value+") is red");let e=this.left.check_();if(e===this.right.check_())return e+(this.isRed_()?0:1);throw Error("Black depths differ")}}no.RED=!0,no.BLACK=!1;class ns{copy(e,t,r,n,i){return this}insert(e,t,r){return new no(e,t,null)}remove(e,t){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class na{constructor(e,t=na.EMPTY_NODE){this.comparator_=e,this.root_=t}insert(e,t){return new na(this.comparator_,this.root_.insert(e,t,this.comparator_).copy(null,null,no.BLACK,null,null))}remove(e){return new na(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,no.BLACK,null,null))}get(e){let t;let r=this.root_;for(;!r.isEmpty();){if(0===(t=this.comparator_(e,r.key)))return r.value;t<0?r=r.left:t>0&&(r=r.right)}return null}getPredecessorKey(e){let t,r=this.root_,n=null;for(;!r.isEmpty();){if(0===(t=this.comparator_(e,r.key))){if(r.left.isEmpty()){if(n)return n.key;return null}for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}t<0?r=r.left:t>0&&(n=r,r=r.right)}throw Error("Attempted to find predecessor key for a nonexistent key.  What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new ni(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,t){return new ni(this.root_,e,this.comparator_,!1,t)}getReverseIteratorFrom(e,t){return new ni(this.root_,e,this.comparator_,!0,t)}getReverseIterator(e){return new ni(this.root_,null,this.comparator_,!0,e)}}function nl(e,t){return rd(e.name,t.name)}function nc(e,t){return rd(e,t)}na.EMPTY_NODE=new ns;let nu=function(e){return"number"==typeof e?"number:"+rv(e):"string:"+e},nh=function(e){if(e.isLeafNode()){let t=e.val();K("string"==typeof t||"number"==typeof t||"object"==typeof t&&eP(t,".sv"),"Priority must be a string or number.")}else K(e===s||e.isEmpty(),"priority of unexpected type.");K(e===s||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};class nd{constructor(e,t=nd.__childrenNodeConstructor.EMPTY_NODE){this.value_=e,this.priorityNode_=t,this.lazyHash_=null,K(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),nh(this.priorityNode_)}static set __childrenNodeConstructor(e){a=e}static get __childrenNodeConstructor(){return a}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new nd(this.value_,e)}getImmediateChild(e){return".priority"===e?this.priorityNode_:nd.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return r1(e)?this:".priority"===rK(e)?this.priorityNode_:nd.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,t){return null}updateImmediateChild(e,t){return".priority"===e?this.updatePriority(t):t.isEmpty()&&".priority"!==e?this:nd.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,t).updatePriority(this.priorityNode_)}updateChild(e,t){let r=rK(e);return null===r?t:t.isEmpty()&&".priority"!==r?this:(K(".priority"!==r||1===rQ(e),".priority must be the last token in a path"),this.updateImmediateChild(r,nd.__childrenNodeConstructor.EMPTY_NODE.updateChild(rY(e),t)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,t){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+nu(this.priorityNode_.val())+":");let t=typeof this.value_;e+=t+":","number"===t?e+=rv(this.value_):e+=this.value_,this.lazyHash_=t9(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===nd.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof nd.__childrenNodeConstructor?-1:(K(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){let t=typeof e.value_,r=typeof this.value_,n=nd.VALUE_TYPE_ORDER.indexOf(t),i=nd.VALUE_TYPE_ORDER.indexOf(r);return(K(n>=0,"Unknown leaf type: "+t),K(i>=0,"Unknown leaf type: "+r),n!==i)?i-n:"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1}withIndex(){return this}isIndexed(){return!0}equals(e){return e===this||!!e.isLeafNode()&&this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}}nd.VALUE_TYPE_ORDER=["object","boolean","number","string"];class nf extends nt{compare(e,t){let r=e.node.getPriority(),n=t.node.getPriority(),i=r.compareTo(n);return 0===i?rd(e.name,t.name):i}isDefinedOn(e){return!e.getPriority().isEmpty()}indexedValueChanged(e,t){return!e.getPriority().equals(t.getPriority())}minPost(){return ne.MIN}maxPost(){return new ne(rh,new nd("[PRIORITY-POST]",c))}makePost(e,t){return new ne(t,new nd("[PRIORITY-POST]",l(e)))}toString(){return".priority"}}let np=new nf,nm=Math.log(2);class ng{constructor(e){this.count=parseInt(Math.log(e+1)/nm,10),this.current_=this.count-1;let t=parseInt(Array(this.count+1).join("1"),2);this.bits_=e+1&t}nextBitIsOne(){let e=!(this.bits_&1<<this.current_);return this.current_--,e}}let ny=function(e,t,r,n){e.sort(t);let i=function(t,n){let o;let s=n-t;if(0===s)return null;if(1===s)return o=e[t],new no(r?r(o):o,o.node,no.BLACK,null,null);{let a=parseInt(s/2,10)+t,l=i(t,a),c=i(a+1,n);return o=e[a],new no(r?r(o):o,o.node,no.BLACK,l,c)}};return new na(n||t,function(t){let n=null,o=null,s=e.length,a=function(t,n){let o=s-t,a=s;s-=t;let c=i(o+1,a),u=e[o];l(new no(r?r(u):u,u.node,n,null,c))},l=function(e){n?n.left=e:o=e,n=e};for(let e=0;e<t.count;++e){let r=t.nextBitIsOne(),n=Math.pow(2,t.count-(e+1));r?a(n,no.BLACK):(a(n,no.BLACK),a(n,no.RED))}return o}(new ng(e.length)))},nv={};class nb{constructor(e,t){this.indexes_=e,this.indexSet_=t}static get Default(){return K(nv&&np,"ChildrenNode.ts has not been loaded"),u=u||new nb({".priority":nv},{".priority":np})}get(e){let t=eA(this.indexes_,e);if(!t)throw Error("No index defined for "+e);return t instanceof na?t:null}hasIndex(e){return eP(this.indexSet_,e.toString())}addIndex(e,t){let r;K(e!==nn,"KeyIndex always exists and isn't meant to be added to the IndexMap.");let n=[],i=!1,o=t.getIterator(ne.Wrap),s=o.getNext();for(;s;)i=i||e.isDefinedOn(s.node),n.push(s),s=o.getNext();r=i?ny(n,e.getCompare()):nv;let a=e.toString(),l=Object.assign({},this.indexSet_);l[a]=e;let c=Object.assign({},this.indexes_);return c[a]=r,new nb(c,l)}addToIndexes(e,t){return new nb(eR(this.indexes_,(r,n)=>{let i=eA(this.indexSet_,n);if(K(i,"Missing index implementation for "+n),r===nv){if(!i.isDefinedOn(e.node))return nv;{let r=[],n=t.getIterator(ne.Wrap),o=n.getNext();for(;o;)o.name!==e.name&&r.push(o),o=n.getNext();return r.push(e),ny(r,i.getCompare())}}{let n=t.get(e.name),i=r;return n&&(i=i.remove(new ne(e.name,n))),i.insert(e,e.node)}}),this.indexSet_)}removeFromIndexes(e,t){return new nb(eR(this.indexes_,r=>{if(r===nv)return r;{let n=t.get(e.name);return n?r.remove(new ne(e.name,n)):r}}),this.indexSet_)}}class nw{constructor(e,t,r){this.children_=e,this.priorityNode_=t,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&nh(this.priorityNode_),this.children_.isEmpty()&&K(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return h||(h=new nw(new na(nc),null,nb.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||h}updatePriority(e){return this.children_.isEmpty()?this:new nw(this.children_,e,this.indexMap_)}getImmediateChild(e){if(".priority"===e)return this.getPriority();{let t=this.children_.get(e);return null===t?h:t}}getChild(e){let t=rK(e);return null===t?this:this.getImmediateChild(t).getChild(rY(e))}hasChild(e){return null!==this.children_.get(e)}updateImmediateChild(e,t){if(K(t,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(t);{let r,n;let i=new ne(e,t);t.isEmpty()?(r=this.children_.remove(e),n=this.indexMap_.removeFromIndexes(i,this.children_)):(r=this.children_.insert(e,t),n=this.indexMap_.addToIndexes(i,this.children_));let o=r.isEmpty()?h:this.priorityNode_;return new nw(r,o,n)}}updateChild(e,t){let r=rK(e);if(null===r)return t;{K(".priority"!==rK(e)||1===rQ(e),".priority must be the last token in a path");let n=this.getImmediateChild(r).updateChild(rY(e),t);return this.updateImmediateChild(r,n)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;let t={},r=0,n=0,i=!0;if(this.forEachChild(np,(o,s)=>{t[o]=s.val(e),r++,i&&nw.INTEGER_REGEXP_.test(o)?n=Math.max(n,Number(o)):i=!1}),e||!i||!(n<2*r))return e&&!this.getPriority().isEmpty()&&(t[".priority"]=this.getPriority().val()),t;{let e=[];for(let r in t)e[r]=t[r];return e}}hash(){if(null===this.lazyHash_){let e="";this.getPriority().isEmpty()||(e+="priority:"+nu(this.getPriority().val())+":"),this.forEachChild(np,(t,r)=>{let n=r.hash();""!==n&&(e+=":"+t+":"+n)}),this.lazyHash_=""===e?"":t9(e)}return this.lazyHash_}getPredecessorChildName(e,t,r){let n=this.resolveIndex_(r);if(!n)return this.children_.getPredecessorKey(e);{let r=n.getPredecessorKey(new ne(e,t));return r?r.name:null}}getFirstChildName(e){let t=this.resolveIndex_(e);if(!t)return this.children_.minKey();{let e=t.minKey();return e&&e.name}}getFirstChild(e){let t=this.getFirstChildName(e);return t?new ne(t,this.children_.get(t)):null}getLastChildName(e){let t=this.resolveIndex_(e);if(!t)return this.children_.maxKey();{let e=t.maxKey();return e&&e.name}}getLastChild(e){let t=this.getLastChildName(e);return t?new ne(t,this.children_.get(t)):null}forEachChild(e,t){let r=this.resolveIndex_(e);return r?r.inorderTraversal(e=>t(e.name,e.node)):this.children_.inorderTraversal(t)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,t){let r=this.resolveIndex_(t);if(r)return r.getIteratorFrom(e,e=>e);{let r=this.children_.getIteratorFrom(e.name,ne.Wrap),n=r.peek();for(;null!=n&&0>t.compare(n,e);)r.getNext(),n=r.peek();return r}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,t){let r=this.resolveIndex_(t);if(r)return r.getReverseIteratorFrom(e,e=>e);{let r=this.children_.getReverseIteratorFrom(e.name,ne.Wrap),n=r.peek();for(;null!=n&&t.compare(n,e)>0;)r.getNext(),n=r.peek();return r}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===nx?-1:0}withIndex(e){if(e===nn||this.indexMap_.hasIndex(e))return this;{let t=this.indexMap_.addIndex(e,this.children_);return new nw(this.children_,this.priorityNode_,t)}}isIndexed(e){return e===nn||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode()||!this.getPriority().equals(e.getPriority())||this.children_.count()!==e.children_.count())return!1;{let t=this.getIterator(np),r=e.getIterator(np),n=t.getNext(),i=r.getNext();for(;n&&i;){if(n.name!==i.name||!n.node.equals(i.node))return!1;n=t.getNext(),i=r.getNext()}return null===n&&null===i}}resolveIndex_(e){return e===nn?null:this.indexMap_.get(e.toString())}}nw.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class n_ extends nw{constructor(){super(new na(nc),nw.EMPTY_NODE,nb.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return nw.EMPTY_NODE}isEmpty(){return!1}}let nx=new n_;function nk(e,t=null){if(null===e)return nw.EMPTY_NODE;if("object"==typeof e&&".priority"in e&&(t=e[".priority"]),K(null===t||"string"==typeof t||"number"==typeof t||"object"==typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"==typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!=typeof e||".sv"in e)return new nd(e,nk(t));if(e instanceof Array){let r=nw.EMPTY_NODE;return ry(e,(t,n)=>{if(eP(e,t)&&"."!==t.substring(0,1)){let e=nk(n);(e.isLeafNode()||!e.isEmpty())&&(r=r.updateImmediateChild(t,e))}}),r.updatePriority(nk(t))}{let r=[],n=!1;if(ry(e,(e,t)=>{if("."!==e.substring(0,1)){let i=nk(t);i.isEmpty()||(n=n||!i.getPriority().isEmpty(),r.push(new ne(e,i)))}}),0===r.length)return nw.EMPTY_NODE;let i=ny(r,nl,e=>e.name,nc);if(!n)return new nw(i,nk(t),nb.Default);{let e=ny(r,np.getCompare());return new nw(i,nk(t),new nb({".priority":e},{".priority":np}))}}}Object.defineProperties(ne,{MIN:{value:new ne(ru,nw.EMPTY_NODE)},MAX:{value:new ne(rh,nx)}}),nr.__EMPTY_NODE=nw.EMPTY_NODE,nd.__childrenNodeConstructor=nw,s=nx,c=nx,l=nk;class nS extends nt{constructor(e){super(),this.indexPath_=e,K(!r1(e)&&".priority"!==rK(e),"Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,t){let r=this.extractChild(e.node),n=this.extractChild(t.node),i=r.compareTo(n);return 0===i?rd(e.name,t.name):i}makePost(e,t){let r=nk(e);return new ne(t,nw.EMPTY_NODE.updateChild(this.indexPath_,r))}maxPost(){return new ne(rh,nw.EMPTY_NODE.updateChild(this.indexPath_,nx))}toString(){return rJ(this.indexPath_,0).join("/")}}class nE extends nt{compare(e,t){let r=e.node.compareTo(t.node);return 0===r?rd(e.name,t.name):r}isDefinedOn(e){return!0}indexedValueChanged(e,t){return!e.equals(t)}minPost(){return ne.MIN}maxPost(){return ne.MAX}makePost(e,t){return new ne(t,nk(e))}toString(){return".value"}}let nT=new nE;function nC(e,t,r){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:r}}class nI{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=np}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return K(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return(K(this.startSet_,"Only valid if start has been set"),this.startNameSet_)?this.indexStartName_:ru}hasEnd(){return this.endSet_}getIndexEndValue(){return K(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return(K(this.endSet_,"Only valid if end has been set"),this.endNameSet_)?this.indexEndName_:rh}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return K(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===np}copy(){let e=new nI;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function nP(e){let t;let r={};if(e.isDefault())return r;if(e.index_===np?t="$priority":e.index_===nT?t="$value":e.index_===nn?t="$key":(K(e.index_ instanceof nS,"Unrecognized index type!"),t=e.index_.toString()),r.orderBy=eE(t),e.startSet_){let t=e.startAfterSet_?"startAfter":"startAt";r[t]=eE(e.indexStartValue_),e.startNameSet_&&(r[t]+=","+eE(e.indexStartName_))}if(e.endSet_){let t=e.endBeforeSet_?"endBefore":"endAt";r[t]=eE(e.indexEndValue_),e.endNameSet_&&(r[t]+=","+eE(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?r.limitToFirst=e.limit_:r.limitToLast=e.limit_),r}function nA(e){let t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let r=e.viewFrom_;""===r&&(r=e.isViewFromLeft()?"l":"r"),t.vf=r}return e.index_!==np&&(t.i=e.index_.toString()),t}class nO extends rq{constructor(e,t,r,n){super(),this.repoInfo_=e,this.onDataUpdate_=t,this.authTokenProvider_=r,this.appCheckTokenProvider_=n,this.log_=rn("p:rest:"),this.listens_={}}reportStats(e){throw Error("Method not implemented.")}static getListenId_(e,t){return void 0!==t?"tag$"+t:(K(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,t,r,n){let i=e._path.toString();this.log_("Listen called for "+i+" "+e._queryIdentifier);let o=nO.getListenId_(e,r),s={};this.listens_[o]=s;let a=nP(e._queryParams);this.restRequest_(i+".json",a,(e,t)=>{let a=t;404===e&&(a=null,e=null),null===e&&this.onDataUpdate_(i,a,!1,r),eA(this.listens_,o)===s&&n(e?401===e?"permission_denied":"rest_error:"+e:"ok",null)})}unlisten(e,t){let r=nO.getListenId_(e,t);delete this.listens_[r]}get(e){let t=nP(e._queryParams),r=e._path.toString(),n=new eh;return this.restRequest_(r+".json",t,(e,t)=>{let i=t;404===e&&(i=null,e=null),null===e?(this.onDataUpdate_(r,i,!1,null),n.resolve(i)):n.reject(Error(i))}),n.promise}refreshAuthToken(e){}restRequest_(e,t={},r){return t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([n,i])=>{n&&n.accessToken&&(t.auth=n.accessToken),i&&i.token&&(t.ac=i.token);let o=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+eD(t);this.log_("Sending REST request for "+o);let s=new XMLHttpRequest;s.onreadystatechange=()=>{if(r&&4===s.readyState){this.log_("REST Response for "+o+" received. status:",s.status,"response:",s.responseText);let e=null;if(s.status>=200&&s.status<300){try{e=eS(s.responseText)}catch(e){rs("Failed to parse JSON response for "+o+": "+s.responseText)}r(null,e)}else 401!==s.status&&404!==s.status&&rs("Got unsuccessful REST response for "+o+" Status: "+s.status),r(s.status);r=null}},s.open("GET",o,!0),s.send()})}}class nR{constructor(){this.rootNode_=nw.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}function nN(){return{value:null,children:new Map}}function nj(e,t,r){null!==e.value?r(t,e.value):function(e,t){e.children.forEach((e,r)=>{t(r,e)})}(e,(e,n)=>{nj(n,new rH(t.toString()+"/"+e),r)})}class nD{constructor(e){this.collection_=e,this.last_=null}get(){let e=this.collection_.get(),t=Object.assign({},e);return this.last_&&ry(this.last_,(e,r)=>{t[e]=t[e]-r}),this.last_=e,t}}class nM{constructor(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new nD(e),rx(this.reportStats_.bind(this),Math.floor(1e4+2e4*Math.random()))}reportStats_(){let e=this.statsListener_.get(),t={},r=!1;ry(e,(e,n)=>{n>0&&eP(this.statsToReport_,e)&&(t[e]=n,r=!0)}),r&&this.server_.reportStats(t),rx(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}function nL(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function nF(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function nz(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}(E=O||(O={}))[E.OVERWRITE=0]="OVERWRITE",E[E.MERGE=1]="MERGE",E[E.ACK_USER_WRITE=2]="ACK_USER_WRITE",E[E.LISTEN_COMPLETE=3]="LISTEN_COMPLETE";class nU{constructor(e,t,r){this.path=e,this.affectedTree=t,this.revert=r,this.type=O.ACK_USER_WRITE,this.source=nL()}operationForChild(e){if(!r1(this.path))return K(rK(this.path)===e,"operationForChild called for unrelated child."),new nU(rY(this.path),this.affectedTree,this.revert);if(null!=this.affectedTree.value)return K(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{let t=this.affectedTree.subtree(new rH(e));return new nU(rG(),t,this.revert)}}}class nB{constructor(e,t,r){this.source=e,this.path=t,this.snap=r,this.type=O.OVERWRITE}operationForChild(e){return r1(this.path)?new nB(this.source,rG(),this.snap.getImmediateChild(e)):new nB(this.source,rY(this.path),this.snap)}}class nV{constructor(e,t,r){this.source=e,this.path=t,this.children=r,this.type=O.MERGE}operationForChild(e){if(!r1(this.path))return K(rK(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new nV(this.source,rY(this.path),this.children);{let t=this.children.subtree(new rH(e));return t.isEmpty()?null:t.value?new nB(this.source,rG(),t.value):new nV(this.source,rG(),t)}}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class nq{constructor(e,t,r){this.node_=e,this.fullyInitialized_=t,this.filtered_=r}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(r1(e))return this.isFullyInitialized()&&!this.filtered_;let t=rK(e);return this.isCompleteForChild(t)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}function n$(e,t,r,n,i,o){let s=n.filter(e=>e.type===r);s.sort((t,r)=>(function(e,t,r){if(null==t.childName||null==r.childName)throw Q("Should only compare child_ events.");let n=new ne(t.childName,t.snapshotNode),i=new ne(r.childName,r.snapshotNode);return e.index_.compare(n,i)})(e,t,r)),s.forEach(r=>{let n=("value"===r.type||"child_removed"===r.type||(r.prevName=o.getPredecessorChildName(r.childName,r.snapshotNode,e.index_)),r);i.forEach(i=>{i.respondsTo(r.type)&&t.push(i.createEvent(n,e.query_))})})}function nW(e,t){return{eventCache:e,serverCache:t}}function nH(e,t,r,n){return nW(new nq(t,r,n),e.serverCache)}function nG(e,t,r,n){return nW(e.eventCache,new nq(t,r,n))}function nK(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function nQ(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let nY=()=>(d||(d=new na(rf)),d);class nX{constructor(e,t=nY()){this.value=e,this.children=t}static fromObject(e){let t=new nX(null);return ry(e,(e,r)=>{t=t.set(new rH(e),r)}),t}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,t){if(null!=this.value&&t(this.value))return{path:rG(),value:this.value};if(r1(e))return null;{let r=rK(e),n=this.children.get(r);if(null===n)return null;{let i=n.findRootMostMatchingPathAndValue(rY(e),t);return null!=i?{path:r0(new rH(r),i.path),value:i.value}:null}}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(r1(e))return this;{let t=rK(e),r=this.children.get(t);return null!==r?r.subtree(rY(e)):new nX(null)}}set(e,t){if(r1(e))return new nX(t,this.children);{let r=rK(e),n=(this.children.get(r)||new nX(null)).set(rY(e),t),i=this.children.insert(r,n);return new nX(this.value,i)}}remove(e){if(r1(e))return this.children.isEmpty()?new nX(null):new nX(null,this.children);{let t=rK(e),r=this.children.get(t);if(!r)return this;{let n;let i=r.remove(rY(e));return(n=i.isEmpty()?this.children.remove(t):this.children.insert(t,i),null===this.value&&n.isEmpty())?new nX(null):new nX(this.value,n)}}}get(e){if(r1(e))return this.value;{let t=rK(e),r=this.children.get(t);return r?r.get(rY(e)):null}}setTree(e,t){if(r1(e))return t;{let r;let n=rK(e),i=(this.children.get(n)||new nX(null)).setTree(rY(e),t);return r=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),new nX(this.value,r)}}fold(e){return this.fold_(rG(),e)}fold_(e,t){let r={};return this.children.inorderTraversal((n,i)=>{r[n]=i.fold_(r0(e,n),t)}),t(e,this.value,r)}findOnPath(e,t){return this.findOnPath_(e,rG(),t)}findOnPath_(e,t,r){let n=!!this.value&&r(t,this.value);if(n)return n;if(r1(e))return null;{let n=rK(e),i=this.children.get(n);return i?i.findOnPath_(rY(e),r0(t,n),r):null}}foreachOnPath(e,t){return this.foreachOnPath_(e,rG(),t)}foreachOnPath_(e,t,r){if(r1(e))return this;{this.value&&r(t,this.value);let n=rK(e),i=this.children.get(n);return i?i.foreachOnPath_(rY(e),r0(t,n),r):new nX(null)}}foreach(e){this.foreach_(rG(),e)}foreach_(e,t){this.children.inorderTraversal((r,n)=>{n.foreach_(r0(e,r),t)}),this.value&&t(e,this.value)}foreachChild(e){this.children.inorderTraversal((t,r)=>{r.value&&e(t,r.value)})}}class nJ{constructor(e){this.writeTree_=e}static empty(){return new nJ(new nX(null))}}function nZ(e,t,r){if(r1(t))return new nJ(new nX(r));{let n=e.writeTree_.findRootMostValueAndPath(t);if(null!=n){let i=n.path,o=n.value,s=r2(i,t);return o=o.updateChild(s,r),new nJ(e.writeTree_.set(i,o))}{let n=new nX(r);return new nJ(e.writeTree_.setTree(t,n))}}}function n0(e,t,r){let n=e;return ry(r,(e,r)=>{n=nZ(n,r0(t,e),r)}),n}function n1(e,t){return r1(t)?nJ.empty():new nJ(e.writeTree_.setTree(t,new nX(null)))}function n2(e,t){return null!=n4(e,t)}function n4(e,t){let r=e.writeTree_.findRootMostValueAndPath(t);return null!=r?e.writeTree_.get(r.path).getChild(r2(r.path,t)):null}function n5(e){let t=[],r=e.writeTree_.value;return null!=r?r.isLeafNode()||r.forEachChild(np,(e,r)=>{t.push(new ne(e,r))}):e.writeTree_.children.inorderTraversal((e,r)=>{null!=r.value&&t.push(new ne(e,r.value))}),t}function n6(e,t){if(r1(t))return e;{let r=n4(e,t);return new nJ(null!=r?new nX(r):e.writeTree_.subtree(t))}}function n3(e){return e.writeTree_.isEmpty()}function n9(e,t){return function e(t,r,n){if(null!=r.value)return n.updateChild(t,r.value);{let i=null;return r.children.inorderTraversal((r,o)=>{".priority"===r?(K(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):n=e(r0(t,r),o,n)}),n.getChild(t).isEmpty()||null===i||(n=n.updateChild(r0(t,".priority"),i)),n}}(rG(),e.writeTree_,t)}function n8(e){return e.visible}function n7(e,t,r){let n=nJ.empty();for(let i=0;i<e.length;++i){let o=e[i];if(t(o)){let e;let t=o.path;if(o.snap)r5(r,t)?n=nZ(n,e=r2(r,t),o.snap):r5(t,r)&&(e=r2(t,r),n=nZ(n,rG(),o.snap.getChild(e)));else if(o.children){if(r5(r,t))n=n0(n,e=r2(r,t),o.children);else if(r5(t,r)){if(r1(e=r2(t,r)))n=n0(n,rG(),o.children);else{let t=eA(o.children,rK(e));if(t){let r=t.getChild(rY(e));n=nZ(n,rG(),r)}}}}else throw Q("WriteRecord should have .snap or .children")}}return n}function ie(e,t,r,n,i){if(n||i){let o=n6(e.visibleWrites,t);return!i&&n3(o)?r:i||null!=r||n2(o,rG())?n9(n7(e.allWrites,function(e){return(e.visible||i)&&(!n||!~n.indexOf(e.writeId))&&(r5(e.path,t)||r5(t,e.path))},t),r||nw.EMPTY_NODE):null}{let n=n4(e.visibleWrites,t);if(null!=n)return n;{let n=n6(e.visibleWrites,t);return n3(n)?r:null!=r||n2(n,rG())?n9(n,r||nw.EMPTY_NODE):null}}}function it(e,t,r,n){return ie(e.writeTree,e.treePath,t,r,n)}function ir(e,t){return function(e,t,r){let n=nw.EMPTY_NODE,i=n4(e.visibleWrites,t);if(i)return i.isLeafNode()||i.forEachChild(np,(e,t)=>{n=n.updateImmediateChild(e,t)}),n;if(!r)return n5(n6(e.visibleWrites,t)).forEach(e=>{n=n.updateImmediateChild(e.name,e.node)}),n;{let i=n6(e.visibleWrites,t);return r.forEachChild(np,(e,t)=>{let r=n9(n6(i,new rH(e)),t);n=n.updateImmediateChild(e,r)}),n5(i).forEach(e=>{n=n.updateImmediateChild(e.name,e.node)}),n}}(e.writeTree,e.treePath,t)}function ii(e,t,r,n){return function(e,t,r,n,i){K(n||i,"Either existingEventSnap or existingServerSnap must exist");let o=r0(t,r);if(n2(e.visibleWrites,o))return null;{let t=n6(e.visibleWrites,o);return n3(t)?i.getChild(r):n9(t,i.getChild(r))}}(e.writeTree,e.treePath,t,r,n)}function io(e,t){var r,n;return r=e.writeTree,n=r0(e.treePath,t),n4(r.visibleWrites,n)}function is(e,t,r){return function(e,t,r,n){let i=r0(t,r),o=n4(e.visibleWrites,i);return null!=o?o:n.isCompleteForChild(r)?n9(n6(e.visibleWrites,i),n.getNode().getImmediateChild(r)):null}(e.writeTree,e.treePath,t,r)}function ia(e,t){return il(r0(e.treePath,t),e.writeTree)}function il(e,t){return{treePath:e,writeTree:t}}class ic{constructor(){this.changeMap=new Map}trackChildChange(e){let t=e.type,r=e.childName;K("child_added"===t||"child_changed"===t||"child_removed"===t,"Only child changes supported for tracking"),K(".priority"!==r,"Only non-priority child changes can be tracked.");let n=this.changeMap.get(r);if(n){let i=n.type;if("child_added"===t&&"child_removed"===i)this.changeMap.set(r,nC(r,e.snapshotNode,n.snapshotNode));else if("child_removed"===t&&"child_added"===i)this.changeMap.delete(r);else if("child_removed"===t&&"child_changed"===i)this.changeMap.set(r,{type:"child_removed",snapshotNode:n.oldSnap,childName:r});else if("child_changed"===t&&"child_added"===i)this.changeMap.set(r,{type:"child_added",snapshotNode:e.snapshotNode,childName:r});else if("child_changed"===t&&"child_changed"===i)this.changeMap.set(r,nC(r,e.snapshotNode,n.oldSnap));else throw Q("Illegal combination of changes: "+e+" occurred after "+n)}else this.changeMap.set(r,e)}getChanges(){return Array.from(this.changeMap.values())}}class iu{getCompleteChild(e){return null}getChildAfterChild(e,t,r){return null}}let ih=new iu;class id{constructor(e,t,r=null){this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=r}getCompleteChild(e){let t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);{let t=null!=this.optCompleteServerCache_?new nq(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return is(this.writes_,e,t)}}getChildAfterChild(e,t,r){var n;let i=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:nQ(this.viewCache_),o=function(e,t,r,n,i,o,s){let a;let l=n6(e.visibleWrites,t),c=n4(l,rG());if(null!=c)a=c;else{if(null==r)return[];a=n9(l,r)}if((a=a.withIndex(s)).isEmpty()||a.isLeafNode())return[];{let e=[],t=s.getCompare(),r=o?a.getReverseIteratorFrom(n,s):a.getIteratorFrom(n,s),i=r.getNext();for(;i&&e.length<1;)0!==t(i,n)&&e.push(i),i=r.getNext();return e}}((n=this.writes_).writeTree,n.treePath,i,t,0,r,e);return 0===o.length?null:o[0]}}function ip(e,t,r,n,i,o){let s=t.eventCache;if(null!=io(n,r))return t;{let a,l;if(r1(r)){if(K(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){let r=nQ(t),i=ir(n,r instanceof nw?r:nw.EMPTY_NODE);a=e.filter.updateFullNode(t.eventCache.getNode(),i,o)}else{let r=it(n,nQ(t));a=e.filter.updateFullNode(t.eventCache.getNode(),r,o)}}else{let c=rK(r);if(".priority"===c){K(1===rQ(r),"Can't have a priority with additional path components");let i=s.getNode(),o=ii(n,r,i,l=t.serverCache.getNode());a=null!=o?e.filter.updatePriority(i,o):s.getNode()}else{let u;let h=rY(r);if(s.isCompleteForChild(c)){l=t.serverCache.getNode();let e=ii(n,r,s.getNode(),l);u=null!=e?s.getNode().getImmediateChild(c).updateChild(h,e):s.getNode().getImmediateChild(c)}else u=is(n,c,t.serverCache);a=null!=u?e.filter.updateChild(s.getNode(),c,u,h,i,o):s.getNode()}}return nH(t,a,s.isFullyInitialized()||r1(r),e.filter.filtersNodes())}}function im(e,t,r,n,i,o,s,a){let l;let c=t.serverCache,u=s?e.filter:e.filter.getIndexedFilter();if(r1(r))l=u.updateFullNode(c.getNode(),n,null);else if(u.filtersNodes()&&!c.isFiltered()){let e=c.getNode().updateChild(r,n);l=u.updateFullNode(c.getNode(),e,null)}else{let e=rK(r);if(!c.isCompleteForPath(r)&&rQ(r)>1)return t;let i=rY(r),o=c.getNode().getImmediateChild(e).updateChild(i,n);l=".priority"===e?u.updatePriority(c.getNode(),o):u.updateChild(c.getNode(),e,o,i,ih,null)}let h=nG(t,l,c.isFullyInitialized()||r1(r),u.filtersNodes()),d=new id(i,h,o);return ip(e,h,r,i,d,a)}function ig(e,t,r,n,i,o,s){let a,l;let c=t.eventCache,u=new id(i,t,o);if(r1(r))l=e.filter.updateFullNode(t.eventCache.getNode(),n,s),a=nH(t,l,!0,e.filter.filtersNodes());else{let i=rK(r);if(".priority"===i)l=e.filter.updatePriority(t.eventCache.getNode(),n),a=nH(t,l,c.isFullyInitialized(),c.isFiltered());else{let o;let l=rY(r),h=c.getNode().getImmediateChild(i);if(r1(l))o=n;else{let e=u.getCompleteChild(i);o=null!=e?".priority"===rX(l)&&e.getChild(rZ(l)).isEmpty()?e:e.updateChild(l,n):nw.EMPTY_NODE}a=h.equals(o)?t:nH(t,e.filter.updateChild(c.getNode(),i,o,l,u,s),c.isFullyInitialized(),e.filter.filtersNodes())}}return a}function iy(e,t){return e.eventCache.isCompleteForChild(t)}function iv(e,t,r){return r.foreach((e,r)=>{t=t.updateChild(e,r)}),t}function ib(e,t,r,n,i,o,s,a){let l;if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let c=t;l=r1(r)?n:new nX(null).setTree(r,n);let u=t.serverCache.getNode();return l.children.inorderTraversal((r,n)=>{if(u.hasChild(r)){let l=iv(e,t.serverCache.getNode().getImmediateChild(r),n);c=im(e,c,new rH(r),l,i,o,s,a)}}),l.children.inorderTraversal((r,n)=>{let l=!t.serverCache.isCompleteForChild(r)&&null===n.value;if(!u.hasChild(r)&&!l){let l=iv(e,t.serverCache.getNode().getImmediateChild(r),n);c=im(e,c,new rH(r),l,i,o,s,a)}}),c}function iw(e,t,r,n){var i,o;t.type===O.MERGE&&null!==t.source.queryId&&(K(nQ(e.viewCache_),"We should always have a full cache before handling merges"),K(nK(e.viewCache_),"Missing event cache, even though we have a server cache"));let s=e.viewCache_,a=function(e,t,r,n,i){let o,s;let a=new ic;if(r.type===O.OVERWRITE)r.source.fromUser?o=ig(e,t,r.path,r.snap,n,i,a):(K(r.source.fromServer,"Unknown source."),s=r.source.tagged||t.serverCache.isFiltered()&&!r1(r.path),o=im(e,t,r.path,r.snap,n,i,s,a));else if(r.type===O.MERGE){var l,c;let u;r.source.fromUser?(l=r.path,c=r.children,u=t,c.foreach((r,o)=>{let s=r0(l,r);iy(t,rK(s))&&(u=ig(e,u,s,o,n,i,a))}),c.foreach((r,o)=>{let s=r0(l,r);iy(t,rK(s))||(u=ig(e,u,s,o,n,i,a))}),o=u):(K(r.source.fromServer,"Unknown source."),s=r.source.tagged||t.serverCache.isFiltered(),o=ib(e,t,r.path,r.children,n,i,s,a))}else if(r.type===O.ACK_USER_WRITE)o=r.revert?function(e,t,r,n,i,o){let s;if(null!=io(n,r))return t;{let a;let l=new id(n,t,i),c=t.eventCache.getNode();if(r1(r)||".priority"===rK(r)){let r;if(t.serverCache.isFullyInitialized())r=it(n,nQ(t));else{let e=t.serverCache.getNode();K(e instanceof nw,"serverChildren would be complete if leaf node"),r=ir(n,e)}a=e.filter.updateFullNode(c,r,o)}else{let i=rK(r),u=is(n,i,t.serverCache);null==u&&t.serverCache.isCompleteForChild(i)&&(u=c.getImmediateChild(i)),(a=null!=u?e.filter.updateChild(c,i,u,rY(r),l,o):t.eventCache.getNode().hasChild(i)?e.filter.updateChild(c,i,nw.EMPTY_NODE,rY(r),l,o):c).isEmpty()&&t.serverCache.isFullyInitialized()&&(s=it(n,nQ(t))).isLeafNode()&&(a=e.filter.updateFullNode(a,s,o))}return s=t.serverCache.isFullyInitialized()||null!=io(n,rG()),nH(t,a,s,e.filter.filtersNodes())}}(e,t,r.path,n,i,a):function(e,t,r,n,i,o,s){if(null!=io(i,r))return t;let a=t.serverCache.isFiltered(),l=t.serverCache;if(null!=n.value){if(r1(r)&&l.isFullyInitialized()||l.isCompleteForPath(r))return im(e,t,r,l.getNode().getChild(r),i,o,a,s);if(!r1(r))return t;{let n=new nX(null);return l.getNode().forEachChild(nn,(e,t)=>{n=n.set(new rH(e),t)}),ib(e,t,r,n,i,o,a,s)}}{let c=new nX(null);return n.foreach((e,t)=>{let n=r0(r,e);l.isCompleteForPath(n)&&(c=c.set(e,l.getNode().getChild(n)))}),ib(e,t,r,c,i,o,a,s)}}(e,t,r.path,r.affectedTree,n,i,a);else if(r.type===O.LISTEN_COMPLETE)o=function(e,t,r,n,i){let o=t.serverCache;return ip(e,nG(t,o.getNode(),o.isFullyInitialized()||r1(r),o.isFiltered()),r,n,ih,i)}(e,t,r.path,n,a);else throw Q("Unknown operation type: "+r.type);let u=a.getChanges();return function(e,t,r){let n=t.eventCache;if(n.isFullyInitialized()){let i=n.getNode().isLeafNode()||n.getNode().isEmpty(),o=nK(e);!(r.length>0)&&e.eventCache.isFullyInitialized()&&(!i||n.getNode().equals(o))&&n.getNode().getPriority().equals(o.getPriority())||r.push({type:"value",snapshotNode:nK(t)})}}(t,o,u),{viewCache:o,changes:u}}(e.processor_,s,t,r,n);return i=e.processor_,K((o=a.viewCache).eventCache.getNode().isIndexed(i.filter.getIndex()),"Event snap not indexed"),K(o.serverCache.getNode().isIndexed(i.filter.getIndex()),"Server snap not indexed"),K(a.viewCache.serverCache.isFullyInitialized()||!s.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=a.viewCache,function(e,t,r,n){let i=e.eventRegistrations_;return function(e,t,r,n){let i=[],o=[];return t.forEach(t=>{if("child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)){var r;o.push((r=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:r}))}}),n$(e,i,"child_removed",t,n,r),n$(e,i,"child_added",t,n,r),n$(e,i,"child_moved",o,n,r),n$(e,i,"child_changed",t,n,r),n$(e,i,"value",t,n,r),i}(e.eventGenerator_,t,r,i)}(e,a.changes,a.viewCache.eventCache.getNode(),0)}function i_(e,t,r,n){let i=t.source.queryId;if(null!==i){let o=e.views.get(i);return K(null!=o,"SyncTree gave us an op for an invalid query."),iw(o,t,r,n)}{let i=[];for(let o of e.views.values())i=i.concat(iw(o,t,r,n));return i}}function ix(e,t){let r=null;for(let n of e.views.values())r=r||function(e,t){let r=nQ(e.viewCache_);return r&&(e.query._queryParams.loadsAllData()||!r1(t)&&!r.getImmediateChild(rK(t)).isEmpty())?r.getChild(t):null}(n,t);return r}class ik{constructor(e){this.listenProvider_=e,this.syncPointTree_=new nX(null),this.pendingWriteTree_={visibleWrites:nJ.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function iS(e,t,r=!1){let n=function(e,t){for(let r=0;r<e.allWrites.length;r++){let n=e.allWrites[r];if(n.writeId===t)return n}return null}(e.pendingWriteTree_,t);if(!function(e,t){let r=e.allWrites.findIndex(e=>e.writeId===t);K(r>=0,"removeWrite called with nonexistent writeId.");let n=e.allWrites[r];e.allWrites.splice(r,1);let i=n.visible,o=!1,s=e.allWrites.length-1;for(;i&&s>=0;){let t=e.allWrites[s];t.visible&&(s>=r&&function(e,t){if(e.snap)return r5(e.path,t);for(let r in e.children)if(e.children.hasOwnProperty(r)&&r5(r0(e.path,r),t))return!0;return!1}(t,n.path)?i=!1:r5(n.path,t.path)&&(o=!0)),s--}return!!i&&(o?(e.visibleWrites=n7(e.allWrites,n8,rG()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1):n.snap?e.visibleWrites=n1(e.visibleWrites,n.path):ry(n.children,t=>{e.visibleWrites=n1(e.visibleWrites,r0(n.path,t))}),!0)}(e.pendingWriteTree_,t))return[];{let t=new nX(null);return null!=n.snap?t=t.set(rG(),!0):ry(n.children,e=>{t=t.set(new rH(e),!0)}),iC(e,new nU(n.path,t,r))}}function iE(e,t,r){return iC(e,new nB(nF(),t,r))}function iT(e,t,r){let n=e.pendingWriteTree_,i=e.syncPointTree_.findOnPath(t,(e,r)=>{let n=ix(r,r2(e,t));if(n)return n});return ie(n,t,i,r,!0)}function iC(e,t){var r;return function e(t,r,n,i){if(r1(t.path))return function e(t,r,n,i){let o=r.get(rG());null==n&&null!=o&&(n=ix(o,rG()));let s=[];return r.children.inorderTraversal((r,o)=>{let a=n?n.getImmediateChild(r):null,l=ia(i,r),c=t.operationForChild(r);c&&(s=s.concat(e(c,o,a,l)))}),o&&(s=s.concat(i_(o,t,i,n))),s}(t,r,n,i);{let o=r.get(rG());null==n&&null!=o&&(n=ix(o,rG()));let s=[],a=rK(t.path),l=t.operationForChild(a),c=r.children.get(a);if(c&&l){let t=n?n.getImmediateChild(a):null,r=ia(i,a);s=s.concat(e(l,c,t,r))}return o&&(s=s.concat(i_(o,t,i,n))),s}}(t,e.syncPointTree_,null,(r=e.pendingWriteTree_,il(rG(),r)))}function iI(e,t){return e.tagToQueryMap.get(t)}function iP(e){let t=e.indexOf("$");return K(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new rH(e.substr(0,t))}}function iA(e,t,r){let n=e.syncPointTree_.get(t);return K(n,"Missing sync point for query tag that we're tracking"),i_(n,r,il(t,e.pendingWriteTree_),null)}class iO{constructor(e){this.node_=e}getImmediateChild(e){return new iO(this.node_.getImmediateChild(e))}node(){return this.node_}}class iR{constructor(e,t){this.syncTree_=e,this.path_=t}getImmediateChild(e){let t=r0(this.path_,e);return new iR(this.syncTree_,t)}node(){return iT(this.syncTree_,this.path_)}}let iN=function(e,t,r){return e&&"object"==typeof e?(K(".sv"in e,"Unexpected leaf node or priority contents"),"string"==typeof e[".sv"])?ij(e[".sv"],t,r):"object"==typeof e[".sv"]?iD(e[".sv"],t):void K(!1,"Unexpected server value: "+JSON.stringify(e,null,2)):e},ij=function(e,t,r){if("timestamp"===e)return r.timestamp;K(!1,"Unexpected server value: "+e)},iD=function(e,t,r){e.hasOwnProperty("increment")||K(!1,"Unexpected server value: "+JSON.stringify(e,null,2));let n=e.increment;"number"!=typeof n&&K(!1,"Unexpected increment value: "+n);let i=t.node();if(K(null!=i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return n;let o=i.getValue();return"number"!=typeof o?n:o+n};function iM(e,t,r){let n;let i=iN(e.getPriority().val(),t.getImmediateChild(".priority"),r);if(!e.isLeafNode())return n=e,i!==e.getPriority().val()&&(n=n.updatePriority(new nd(i))),e.forEachChild(np,(e,i)=>{let o=iM(i,t.getImmediateChild(e),r);o!==i&&(n=n.updateImmediateChild(e,o))}),n;{let n=iN(e.getValue(),t,r);return n!==e.getValue()||i!==e.getPriority().val()?new nd(n,nk(i)):e}}class iL{constructor(e="",t=null,r={children:{},childCount:0}){this.name=e,this.parent=t,this.node=r}}function iF(e,t){let r=t instanceof rH?t:new rH(t),n=e,i=rK(r);for(;null!==i;){let e=eA(n.node.children,i)||{children:{},childCount:0};n=new iL(i,n,e),i=rK(r=rY(r))}return n}function iz(e){return e.node.value}function iU(e,t){e.node.value=t,function e(t){null!==t.parent&&function(t,r,n){let i=void 0===iz(n)&&!iB(n),o=eP(t.node.children,r);i&&o?(delete t.node.children[r],t.node.childCount--,e(t)):i||o||(t.node.children[r]=n.node,t.node.childCount++,e(t))}(t.parent,t.name,t)}(e)}function iB(e){return e.node.childCount>0}function iV(e,t){ry(e.node.children,(r,n)=>{t(new iL(r,e,n))})}function iq(e){return new rH(null===e.parent?e.name:iq(e.parent)+"/"+e.name)}let i$=/[\[\].#$\/\u0000-\u001F\u007F]/,iW=/[\[\].#$\u0000-\u001F\u007F]/,iH=function(e){return"string"==typeof e&&0!==e.length&&!i$.test(e)},iG=function(e){var t;return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),"string"==typeof(t=e)&&0!==t.length&&!iW.test(t)},iK=function(e,t,r){let n=r instanceof rH?new r6(r,e):r;if(void 0===t)throw Error(e+"contains undefined "+r9(n));if("function"==typeof t)throw Error(e+"contains a function "+r9(n)+" with contents = "+t.toString());if(rl(t))throw Error(e+"contains "+t.toString()+" "+r9(n));if("string"==typeof t&&t.length>3495253.3333333335&&eV(t)>10485760)throw Error(e+"contains a string greater than 10485760 utf8 bytes "+r9(n)+" ('"+t.substring(0,50)+"...')");if(t&&"object"==typeof t){let r=!1,i=!1;if(ry(t,(t,o)=>{if(".value"===t)r=!0;else if(".priority"!==t&&".sv"!==t&&(i=!0,!iH(t)))throw Error(e+" contains an invalid key ("+t+") "+r9(n)+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');n.parts_.length>0&&(n.byteLength_+=1),n.parts_.push(t),n.byteLength_+=eV(t),r3(n),iK(e,o,n),function(e){let t=e.parts_.pop();e.byteLength_-=eV(t),e.parts_.length>0&&(e.byteLength_-=1)}(n)}),r&&i)throw Error(e+' contains ".value" child '+r9(n)+" in addition to actual children.")}},iQ=function(e,t){let r=t.path.toString();if("string"!=typeof t.repoInfo.host||0===t.repoInfo.host.length||!iH(t.repoInfo.namespace)&&"localhost"!==t.repoInfo.host.split(":")[0]||0!==r.length&&!iG(r))throw Error(`${e} failed: url argument must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};class iY{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function iX(e,t,r){!function(e,t){let r=null;for(let n=0;n<t.length;n++){let i=t[n],o=i.getPath();null===r||r4(o,r.path)||(e.eventLists_.push(r),r=null),null===r&&(r={events:[],path:o}),r.events.push(i)}r&&e.eventLists_.push(r)}(e,r),function(e,t){e.recursionDepth_++;let r=!0;for(let n=0;n<e.eventLists_.length;n++){let i=e.eventLists_[n];i&&(t(i.path)?(function(e){for(let t=0;t<e.events.length;t++){let r=e.events[t];if(null!==r){e.events[t]=null;let n=r.getEventRunner();t7&&rr("event: "+r.toString()),r_(n)}}}(e.eventLists_[n]),e.eventLists_[n]=null):r=!1)}r&&(e.eventLists_=[]),e.recursionDepth_--}(e,e=>r5(e,t)||r5(t,e))}class iJ{constructor(e,t,r,n){this.repoInfo_=e,this.forceRestClient_=t,this.authTokenProvider_=r,this.appCheckProvider_=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new iY,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=nN(),this.transactionQueueTree_=new iL,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function iZ(e){var t;return(t=t={timestamp:function(e){let t=e.infoData_.getNode(new rH(".info/serverTimeOffset")).val()||0;return new Date().getTime()+t}(e)}).timestamp=t.timestamp||new Date().getTime(),t}function i0(e,t,r,n,i){e.dataUpdateCount++;let o=new rH(t);r=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,r):r;let s=[];if(i){if(n){let t=eR(r,e=>nk(e));s=function(e,t,r,n){let i=iI(e,n);if(!i)return[];{let n=iP(i),o=n.path,s=n.queryId,a=r2(o,t),l=nX.fromObject(r);return iA(e,o,new nV(nz(s),a,l))}}(e.serverSyncTree_,o,t,i)}else{let t=nk(r);s=function(e,t,r,n){let i=iI(e,n);if(null==i)return[];{let n=iP(i),o=n.path,s=n.queryId,a=r2(o,t);return iA(e,o,new nB(nz(s),a,r))}}(e.serverSyncTree_,o,t,i)}}else if(n){let t=eR(r,e=>nk(e));s=function(e,t,r){let n=nX.fromObject(r);return iC(e,new nV(nF(),t,n))}(e.serverSyncTree_,o,t)}else{let t=nk(r);s=iE(e.serverSyncTree_,o,t)}let a=o;s.length>0&&(a=i6(e,o)),iX(e.eventQueue_,a,s)}function i1(e,t){i2(e,"connected",t),!1===t&&function(e){i4(e,"onDisconnectEvents");let t=iZ(e),r=nN();nj(e.onDisconnect_,rG(),(n,i)=>{let o=iM(i,new iR(e.serverSyncTree_,n),t);!function e(t,r,n){if(r1(r))t.value=n,t.children.clear();else if(null!==t.value)t.value=t.value.updateChild(r,n);else{let i=rK(r);t.children.has(i)||t.children.set(i,nN()),e(t.children.get(i),r=rY(r),n)}}(r,n,o)});let n=[];nj(r,rG(),(t,r)=>{n=n.concat(iE(e.serverSyncTree_,t,r));let i=function(e,t){let r=iq(i3(e,t)),n=iF(e.transactionQueueTree_,t);return function(e,t,r){let n=e.parent;for(;null!==n;){if(t(n))return!0;n=n.parent}}(n,t=>{i7(e,t)}),i7(e,n),function e(t,r,n,i){n&&!i&&r(t),iV(t,t=>{e(t,r,!0,i)}),n&&i&&r(t)}(n,t=>{i7(e,t)}),r}(e,t);i6(e,i)}),e.onDisconnect_=nN(),iX(e.eventQueue_,rG(),n)}(e)}function i2(e,t,r){let n=new rH("/.info/"+t),i=nk(r);e.infoData_.updateSnapshot(n,i);let o=iE(e.infoSyncTree_,n,i);iX(e.eventQueue_,n,o)}function i4(e,...t){let r="";e.persistentConnection_&&(r=e.persistentConnection_.id+":"),rr(r,...t)}function i5(e,t,r){return iT(e.serverSyncTree_,t,r)||nw.EMPTY_NODE}function i6(e,t){let r=i3(e,t),n=iq(r),i=i9(e,r);return function(e,t,r){if(0===t.length)return;let n=[],i=[],o=t.filter(e=>0===e.status).map(e=>e.currentWriteId);for(let s=0;s<t.length;s++){let a=t[s],l=r2(r,a.path),c=!1,u;if(K(null!==l,"rerunTransactionsUnderNode_: relativePath should not be null."),4===a.status)c=!0,u=a.abortReason,i=i.concat(iS(e.serverSyncTree_,a.currentWriteId,!0));else if(0===a.status){if(a.retryCount>=25)c=!0,u="maxretry",i=i.concat(iS(e.serverSyncTree_,a.currentWriteId,!0));else{let r=i5(e,a.path,o);a.currentInputSnapshot=r;let n=t[s].update(r.val());if(void 0!==n){iK("transaction failed: Data returned ",n,a.path);let t=nk(n);"object"==typeof n&&null!=n&&eP(n,".priority")||(t=t.updatePriority(r.getPriority()));let s=a.currentWriteId,l=iZ(e),c=iM(t,new iO(r),l);a.currentOutputSnapshotRaw=t,a.currentOutputSnapshotResolved=c,a.currentWriteId=e.nextWriteId_++,o.splice(o.indexOf(s),1),i=(i=i.concat(function(e,t,r,n,i){var o,s;return(o=e.pendingWriteTree_,s=i,K(n>o.lastWriteId,"Stacking an older write on top of newer ones"),void 0===s&&(s=!0),o.allWrites.push({path:t,snap:r,writeId:n,visible:s}),s&&(o.visibleWrites=nZ(o.visibleWrites,t,r)),o.lastWriteId=n,i)?iC(e,new nB(nL(),t,r)):[]}(e.serverSyncTree_,a.path,c,a.currentWriteId,a.applyLocally))).concat(iS(e.serverSyncTree_,s,!0))}else c=!0,u="nodata",i=i.concat(iS(e.serverSyncTree_,a.currentWriteId,!0))}}iX(e.eventQueue_,r,i),i=[],c&&(t[s].status=2,setTimeout(t[s].unwatcher,Math.floor(0)),t[s].onComplete&&("nodata"===u?n.push(()=>t[s].onComplete(null,!1,t[s].currentInputSnapshot)):n.push(()=>t[s].onComplete(Error(u),!1,null))))}i8(e,e.transactionQueueTree_);for(let e=0;e<n.length;e++)r_(n[e]);(function e(t,r=t.transactionQueueTree_){if(r||i8(t,r),iz(r)){let n=i9(t,r);K(n.length>0,"Sending zero length transaction queue"),n.every(e=>0===e.status)&&function(t,r,n){let i=i5(t,r,n.map(e=>e.currentWriteId)),o=i,s=i.hash();for(let e=0;e<n.length;e++){let t=n[e];K(0===t.status,"tryToSendTransactionQueue_: items in queue should all be run."),t.status=1,t.retryCount++;let i=r2(r,t.path);o=o.updateChild(i,t.currentOutputSnapshotRaw)}let a=o.val(!0);t.server_.put(r.toString(),a,i=>{i4(t,"transaction put response",{path:r.toString(),status:i});let o=[];if("ok"===i){let i=[];for(let e=0;e<n.length;e++)n[e].status=2,o=o.concat(iS(t.serverSyncTree_,n[e].currentWriteId)),n[e].onComplete&&i.push(()=>n[e].onComplete(null,!0,n[e].currentOutputSnapshotResolved)),n[e].unwatcher();i8(t,iF(t.transactionQueueTree_,r)),e(t,t.transactionQueueTree_),iX(t.eventQueue_,r,o);for(let e=0;e<i.length;e++)r_(i[e])}else{if("datastale"===i)for(let e=0;e<n.length;e++)3===n[e].status?n[e].status=4:n[e].status=0;else{rs("transaction at "+r.toString()+" failed: "+i);for(let e=0;e<n.length;e++)n[e].status=4,n[e].abortReason=i}i6(t,r)}},s)}(t,iq(r),n)}else iB(r)&&iV(r,r=>{e(t,r)})})(e,e.transactionQueueTree_)}(e,i,n),n}function i3(e,t){let r;let n=e.transactionQueueTree_;for(r=rK(t);null!==r&&void 0===iz(n);)n=iF(n,r),r=rK(t=rY(t));return n}function i9(e,t){let r=[];return function e(t,r,n){let i=iz(r);if(i)for(let e=0;e<i.length;e++)n.push(i[e]);iV(r,r=>{e(t,r,n)})}(e,t,r),r.sort((e,t)=>e.order-t.order),r}function i8(e,t){let r=iz(t);if(r){let e=0;for(let t=0;t<r.length;t++)2!==r[t].status&&(r[e]=r[t],e++);r.length=e,iU(t,r.length>0?r:void 0)}iV(t,t=>{i8(e,t)})}function i7(e,t){let r=iz(t);if(r){let n=[],i=[],o=-1;for(let t=0;t<r.length;t++)3===r[t].status||(1===r[t].status?(K(o===t-1,"All SENT items should be at beginning of queue."),o=t,r[t].status=3,r[t].abortReason="set"):(K(0===r[t].status,"Unexpected transaction status in abort"),r[t].unwatcher(),i=i.concat(iS(e.serverSyncTree_,r[t].currentWriteId,!0)),r[t].onComplete&&n.push(r[t].onComplete.bind(null,Error("set"),!1,null))));-1===o?iU(t,void 0):r.length=o+1,iX(e.eventQueue_,iq(t),i);for(let e=0;e<n.length;e++)r_(n[e])}}let oe=function(e,t){let r=ot(e),n=r.namespace;"firebase.com"===r.domain&&ro(r.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!==n||"localhost"===r.domain||ro("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),r.secure||ra();let i="ws"===r.scheme||"wss"===r.scheme;return{repoInfo:new rP(r.host,r.secure,n,i,t,"",n!==r.subdomain),path:new rH(r.pathString)}},ot=function(e){let t="",r="",n="",i="",o="",s=!0,a="https",l=443;if("string"==typeof e){let c=e.indexOf("//");c>=0&&(a=e.substring(0,c-1),e=e.substring(c+2));let u=e.indexOf("/");-1===u&&(u=e.length);let h=e.indexOf("?");-1===h&&(h=e.length),t=e.substring(0,Math.min(u,h)),u<h&&(i=function(e){let t="",r=e.split("/");for(let e=0;e<r.length;e++)if(r[e].length>0){let n=r[e];try{n=decodeURIComponent(n.replace(/\+/g," "))}catch(e){}t+="/"+n}return t}(e.substring(u,h)));let d=function(e){let t={};for(let r of("?"===e.charAt(0)&&(e=e.substring(1)),e.split("&"))){if(0===r.length)continue;let n=r.split("=");2===n.length?t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]):rs(`Invalid query segment '${r}' in query '${e}'`)}return t}(e.substring(Math.min(e.length,h)));(c=t.indexOf(":"))>=0?(s="https"===a||"wss"===a,l=parseInt(t.substring(c+1),10)):c=t.length;let f=t.slice(0,c);if("localhost"===f.toLowerCase())r="localhost";else if(f.split(".").length<=2)r=f;else{let e=t.indexOf(".");n=t.substring(0,e).toLowerCase(),r=t.substring(e+1),o=n}"ns"in d&&(o=d.ns)}return{host:t,port:l,domain:r,subdomain:n,secure:s,scheme:a,pathString:i,namespace:o}};class or{constructor(e,t,r,n){this._repo=e,this._path=t,this._queryParams=r,this._orderByCalled=n}get key(){return r1(this._path)?null:rX(this._path)}get ref(){return new on(this._repo,this._path)}get _queryIdentifier(){let e=rm(nA(this._queryParams));return"{}"===e?"default":e}get _queryObject(){return nA(this._queryParams)}isEqual(e){if(!((e=e$(e))instanceof or))return!1;let t=this._repo===e._repo,r=r4(this._path,e._path),n=this._queryIdentifier===e._queryIdentifier;return t&&r&&n}toJSON(){return this.toString()}toString(){return this._repo.toString()+function(e){let t="";for(let r=e.pieceNum_;r<e.pieces_.length;r++)""!==e.pieces_[r]&&(t+="/"+encodeURIComponent(String(e.pieces_[r])));return t||"/"}(this._path)}}class on extends or{constructor(e,t){super(e,t,new nI,!1)}get parent(){let e=rZ(this._path);return null===e?null:new on(this._repo,e)}get root(){let e=this;for(;null!==e.parent;)e=e.parent;return e}}K(!f,"__referenceConstructor has already been defined"),f=on,K(!p,"__referenceConstructor has already been defined"),p=on;let oi={};class oo{constructor(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(function(e,t,r){if(e.stats_=rj(e.repoInfo_),e.forceRestClient_||("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)e.server_=new nO(e.repoInfo_,(t,r,n,i)=>{i0(e,t,r,n,i)},e.authTokenProvider_,e.appCheckProvider_),setTimeout(()=>i1(e,!0),0);else{if(null!=r){if("object"!=typeof r)throw Error("Only objects are supported for option databaseAuthVariableOverride");try{eE(r)}catch(e){throw Error("Invalid authOverride provided: "+e)}}e.persistentConnection_=new r7(e.repoInfo_,t,(t,r,n,i)=>{i0(e,t,r,n,i)},t=>{i1(e,t)},t=>{ry(t,(t,r)=>{i2(e,t,r)})},e.authTokenProvider_,e.appCheckProvider_,r),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener(t=>{e.server_.refreshAuthToken(t)}),e.appCheckProvider_.addTokenChangeListener(t=>{e.server_.refreshAppCheckToken(t.token)}),e.statsReporter_=function(e,t){let r=e.toString();return rN[r]||(rN[r]=t()),rN[r]}(e.repoInfo_,()=>new nM(e.stats_,e.server_)),e.infoData_=new nR,e.infoSyncTree_=new ik({startListening:(t,r,n,i)=>{let o=[],s=e.infoData_.getNode(t._path);return s.isEmpty()||(o=iE(e.infoSyncTree_,t._path,s),setTimeout(()=>{i("ok")},0)),o},stopListening:()=>{}}),i2(e,"connected",!1),e.serverSyncTree_=new ik({startListening:(t,r,n,i)=>(e.server_.listen(t,n,r,(r,n)=>{let o=i(r,n);iX(e.eventQueue_,t._path,o)}),[]),stopListening:(t,r)=>{e.server_.unlisten(t,r)}})}(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new on(this._repo,rG())),this._rootInternal}_delete(){return null!==this._rootInternal&&(function(e,t){let r=oi[t];r&&r[e.key]===e||ro(`Database ${t}(${e.repoInfo_}) has already been deleted.`),e.persistentConnection_&&e.persistentConnection_.interrupt("repo_interrupt"),delete r[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){null===this._rootInternal&&ro("Cannot call "+e+" on a deleted database.")}}r7.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},r7.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)},tZ=tw,tm(new eW("database",(e,{instanceIdentifier:t})=>(function(e,t,r,n,i){var o,s;let a,l,c,u,h=n||e.options.databaseURL;void 0===h&&(e.options.projectId||ro("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),rr("Using default host for project ",e.options.projectId),h=`${e.options.projectId}-default-rtdb.firebaseio.com`);let d=oe(h,void 0),f=d.repoInfo;void 0!==tY&&tY.env&&(c=tY.env.FIREBASE_DATABASE_EMULATOR_HOST),c?(u=!0,f=(d=oe(h=`http://${c}?ns=${f.namespace}`,void 0)).repoInfo):u=!d.repoInfo.secure;let p=new rS(e.name,e.options,t);return iQ("Invalid Firebase Database URL",d),r1(d.path)||ro("Database URL must point to the root of a Firebase Database (not including a child path)."),new oo((o=f,s=new rk(e.name,r),(a=oi[e.name])||(a={},oi[e.name]=a),(l=a[o.toURLString()])&&ro("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),l=new iJ(o,!1,p,s),a[o.toURLString()]=l,l),e)})(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t),"PUBLIC").setMultipleInstances(!0)),tk(tX,tJ,void 0),tk(tX,tJ,"esm2017");var os="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},oa={};(function(){function e(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function t(e,t,r){r||(r=0);var n=Array(16);if("string"==typeof t)for(var i=0;16>i;++i)n[i]=t.charCodeAt(r++)|t.charCodeAt(r++)<<8|t.charCodeAt(r++)<<16|t.charCodeAt(r++)<<24;else for(i=0;16>i;++i)n[i]=t[r++]|t[r++]<<8|t[r++]<<16|t[r++]<<24;t=e.g[0],r=e.g[1],i=e.g[2];var o=e.g[3],s=t+(o^r&(i^o))+n[0]+3614090360&4294967295;s=o+(i^(t=r+(s<<7&4294967295|s>>>25))&(r^i))+n[1]+3905402710&4294967295,s=i+(r^(o=t+(s<<12&4294967295|s>>>20))&(t^r))+n[2]+606105819&4294967295,s=r+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+n[3]+3250441966&4294967295,s=t+(o^(r=i+(s<<22&4294967295|s>>>10))&(i^o))+n[4]+4118548399&4294967295,s=o+(i^(t=r+(s<<7&4294967295|s>>>25))&(r^i))+n[5]+1200080426&4294967295,s=i+(r^(o=t+(s<<12&4294967295|s>>>20))&(t^r))+n[6]+2821735955&4294967295,s=r+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+n[7]+4249261313&4294967295,s=t+(o^(r=i+(s<<22&4294967295|s>>>10))&(i^o))+n[8]+1770035416&4294967295,s=o+(i^(t=r+(s<<7&4294967295|s>>>25))&(r^i))+n[9]+2336552879&4294967295,s=i+(r^(o=t+(s<<12&4294967295|s>>>20))&(t^r))+n[10]+4294925233&4294967295,s=r+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+n[11]+2304563134&4294967295,s=t+(o^(r=i+(s<<22&4294967295|s>>>10))&(i^o))+n[12]+1804603682&4294967295,s=o+(i^(t=r+(s<<7&4294967295|s>>>25))&(r^i))+n[13]+4254626195&4294967295,s=i+(r^(o=t+(s<<12&4294967295|s>>>20))&(t^r))+n[14]+2792965006&4294967295,s=r+(t^(i=o+(s<<17&4294967295|s>>>15))&(o^t))+n[15]+1236535329&4294967295,r=i+(s<<22&4294967295|s>>>10),s=t+(i^o&(r^i))+n[1]+4129170786&4294967295,t=r+(s<<5&4294967295|s>>>27),s=o+(r^i&(t^r))+n[6]+3225465664&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^r&(o^t))+n[11]+643717713&4294967295,i=o+(s<<14&4294967295|s>>>18),s=r+(o^t&(i^o))+n[0]+3921069994&4294967295,r=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(r^i))+n[5]+3593408605&4294967295,t=r+(s<<5&4294967295|s>>>27),s=o+(r^i&(t^r))+n[10]+38016083&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^r&(o^t))+n[15]+3634488961&4294967295,i=o+(s<<14&4294967295|s>>>18),s=r+(o^t&(i^o))+n[4]+3889429448&4294967295,r=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(r^i))+n[9]+568446438&4294967295,t=r+(s<<5&4294967295|s>>>27),s=o+(r^i&(t^r))+n[14]+3275163606&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^r&(o^t))+n[3]+4107603335&4294967295,i=o+(s<<14&4294967295|s>>>18),s=r+(o^t&(i^o))+n[8]+1163531501&4294967295,r=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(r^i))+n[13]+2850285829&4294967295,t=r+(s<<5&4294967295|s>>>27),s=o+(r^i&(t^r))+n[2]+4243563512&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^r&(o^t))+n[7]+1735328473&4294967295,i=o+(s<<14&4294967295|s>>>18),s=r+(o^t&(i^o))+n[12]+2368359562&4294967295,s=t+((r=i+(s<<20&4294967295|s>>>12))^i^o)+n[5]+4294588738&4294967295,s=o+((t=r+(s<<4&4294967295|s>>>28))^r^i)+n[8]+2272392833&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^r)+n[11]+1839030562&4294967295,s=r+((i=o+(s<<16&4294967295|s>>>16))^o^t)+n[14]+4259657740&4294967295,s=t+((r=i+(s<<23&4294967295|s>>>9))^i^o)+n[1]+2763975236&4294967295,s=o+((t=r+(s<<4&4294967295|s>>>28))^r^i)+n[4]+1272893353&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^r)+n[7]+4139469664&4294967295,s=r+((i=o+(s<<16&4294967295|s>>>16))^o^t)+n[10]+3200236656&4294967295,s=t+((r=i+(s<<23&4294967295|s>>>9))^i^o)+n[13]+681279174&4294967295,s=o+((t=r+(s<<4&4294967295|s>>>28))^r^i)+n[0]+3936430074&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^r)+n[3]+3572445317&4294967295,s=r+((i=o+(s<<16&4294967295|s>>>16))^o^t)+n[6]+76029189&4294967295,s=t+((r=i+(s<<23&4294967295|s>>>9))^i^o)+n[9]+3654602809&4294967295,s=o+((t=r+(s<<4&4294967295|s>>>28))^r^i)+n[12]+3873151461&4294967295,s=i+((o=t+(s<<11&4294967295|s>>>21))^t^r)+n[15]+530742520&4294967295,s=r+((i=o+(s<<16&4294967295|s>>>16))^o^t)+n[2]+3299628645&4294967295,r=i+(s<<23&4294967295|s>>>9),s=t+(i^(r|~o))+n[0]+4096336452&4294967295,t=r+(s<<6&4294967295|s>>>26),s=o+(r^(t|~i))+n[7]+1126891415&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~r))+n[14]+2878612391&4294967295,i=o+(s<<15&4294967295|s>>>17),s=r+(o^(i|~t))+n[5]+4237533241&4294967295,r=i+(s<<21&4294967295|s>>>11),s=t+(i^(r|~o))+n[12]+1700485571&4294967295,t=r+(s<<6&4294967295|s>>>26),s=o+(r^(t|~i))+n[3]+2399980690&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~r))+n[10]+4293915773&4294967295,i=o+(s<<15&4294967295|s>>>17),s=r+(o^(i|~t))+n[1]+2240044497&4294967295,r=i+(s<<21&4294967295|s>>>11),s=t+(i^(r|~o))+n[8]+1873313359&4294967295,t=r+(s<<6&4294967295|s>>>26),s=o+(r^(t|~i))+n[15]+4264355552&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~r))+n[6]+2734768916&4294967295,i=o+(s<<15&4294967295|s>>>17),s=r+(o^(i|~t))+n[13]+1309151649&4294967295,r=i+(s<<21&4294967295|s>>>11),s=t+(i^(r|~o))+n[4]+4149444226&4294967295,t=r+(s<<6&4294967295|s>>>26),s=o+(r^(t|~i))+n[11]+3174756917&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~r))+n[2]+718787259&4294967295,i=o+(s<<15&4294967295|s>>>17),s=r+(o^(i|~t))+n[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(s<<21&4294967295|s>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+o&4294967295}function r(e,t){this.h=t;for(var r=[],n=!0,i=e.length-1;0<=i;i--){var o=0|e[i];n&&o==t||(r[i]=o,n=!1)}this.g=r}!function(e,t){function r(){}r.prototype=t.prototype,e.D=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.C=function(e,r,n){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[r].apply(e,i)}}(e,function(){this.blockSize=-1}),e.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0},e.prototype.u=function(e,r){void 0===r&&(r=e.length);for(var n=r-this.blockSize,i=this.B,o=this.h,s=0;s<r;){if(0==o)for(;s<=n;)t(this,e,s),s+=this.blockSize;if("string"==typeof e){for(;s<r;)if(i[o++]=e.charCodeAt(s++),o==this.blockSize){t(this,i),o=0;break}}else for(;s<r;)if(i[o++]=e[s++],o==this.blockSize){t(this,i),o=0;break}}this.h=o,this.o+=r},e.prototype.v=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var r=8*this.o;for(t=e.length-8;t<e.length;++t)e[t]=255&r,r/=256;for(this.u(e),e=Array(16),t=r=0;4>t;++t)for(var n=0;32>n;n+=8)e[r++]=this.g[t]>>>n&255;return e};var n,i={};function o(e){var t;return -128<=e&&128>e?(t=function(e){return new r([0|e],0>e?-1:0)},Object.prototype.hasOwnProperty.call(i,e)?i[e]:i[e]=t(e)):new r([0|e],0>e?-1:0)}function s(e){if(isNaN(e)||!isFinite(e))return a;if(0>e)return d(s(-e));for(var t=[],n=1,i=0;e>=n;i++)t[i]=e/n|0,n*=4294967296;return new r(t,0)}var a=o(0),l=o(1),c=o(16777216);function u(e){if(0!=e.h)return!1;for(var t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function h(e){return -1==e.h}function d(e){for(var t=e.g.length,n=[],i=0;i<t;i++)n[i]=~e.g[i];return new r(n,~e.h).add(l)}function f(e,t){return e.add(d(t))}function p(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function m(e,t){this.g=e,this.h=t}function g(e,t){if(u(t))throw Error("division by zero");if(u(e))return new m(a,a);if(h(e))return t=g(d(e),t),new m(d(t.g),d(t.h));if(h(t))return t=g(e,d(t)),new m(d(t.g),t.h);if(30<e.g.length){if(h(e)||h(t))throw Error("slowDivide_ only works with positive integers.");for(var r=l,n=t;0>=n.l(e);)r=y(r),n=y(n);var i=v(r,1),o=v(n,1);for(n=v(n,2),r=v(r,2);!u(n);){var c=o.add(n);0>=c.l(e)&&(i=i.add(r),o=c),n=v(n,1),r=v(r,1)}return t=f(e,i.j(t)),new m(i,t)}for(i=a;0<=e.l(t);){for(n=48>=(n=Math.ceil(Math.log(r=Math.max(1,Math.floor(e.m()/t.m())))/Math.LN2))?1:Math.pow(2,n-48),c=(o=s(r)).j(t);h(c)||0<c.l(e);)r-=n,c=(o=s(r)).j(t);u(o)&&(o=l),i=i.add(o),e=f(e,c)}return new m(i,e)}function y(e){for(var t=e.g.length+1,n=[],i=0;i<t;i++)n[i]=e.i(i)<<1|e.i(i-1)>>>31;return new r(n,e.h)}function v(e,t){var n=t>>5;t%=32;for(var i=e.g.length-n,o=[],s=0;s<i;s++)o[s]=0<t?e.i(s+n)>>>t|e.i(s+n+1)<<32-t:e.i(s+n);return new r(o,e.h)}(n=r.prototype).m=function(){if(h(this))return-d(this).m();for(var e=0,t=1,r=0;r<this.g.length;r++){var n=this.i(r);e+=(0<=n?n:4294967296+n)*t,t*=4294967296}return e},n.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(u(this))return"0";if(h(this))return"-"+d(this).toString(e);for(var t=s(Math.pow(e,6)),r=this,n="";;){var i=g(r,t).g,o=((0<(r=f(r,i.j(t))).g.length?r.g[0]:r.h)>>>0).toString(e);if(u(r=i))return o+n;for(;6>o.length;)o="0"+o;n=o+n}},n.i=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},n.l=function(e){return h(e=f(this,e))?-1:u(e)?0:1},n.abs=function(){return h(this)?d(this):this},n.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0,o=0;o<=t;o++){var s=i+(65535&this.i(o))+(65535&e.i(o)),a=(s>>>16)+(this.i(o)>>>16)+(e.i(o)>>>16);i=a>>>16,s&=65535,a&=65535,n[o]=a<<16|s}return new r(n,-2147483648&n[n.length-1]?-1:0)},n.j=function(e){if(u(this)||u(e))return a;if(h(this))return h(e)?d(this).j(d(e)):d(d(this).j(e));if(h(e))return d(this.j(d(e)));if(0>this.l(c)&&0>e.l(c))return s(this.m()*e.m());for(var t=this.g.length+e.g.length,n=[],i=0;i<2*t;i++)n[i]=0;for(i=0;i<this.g.length;i++)for(var o=0;o<e.g.length;o++){var l=this.i(i)>>>16,f=65535&this.i(i),m=e.i(o)>>>16,g=65535&e.i(o);n[2*i+2*o]+=f*g,p(n,2*i+2*o),n[2*i+2*o+1]+=l*g,p(n,2*i+2*o+1),n[2*i+2*o+1]+=f*m,p(n,2*i+2*o+1),n[2*i+2*o+2]+=l*m,p(n,2*i+2*o+2)}for(i=0;i<t;i++)n[i]=n[2*i+1]<<16|n[2*i];for(i=t;i<2*t;i++)n[i]=0;return new r(n,0)},n.A=function(e){return g(this,e).h},n.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0;i<t;i++)n[i]=this.i(i)&e.i(i);return new r(n,this.h&e.h)},n.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0;i<t;i++)n[i]=this.i(i)|e.i(i);return new r(n,this.h|e.h)},n.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0;i<t;i++)n[i]=this.i(i)^e.i(i);return new r(n,this.h^e.h)},e.prototype.digest=e.prototype.v,e.prototype.reset=e.prototype.s,e.prototype.update=e.prototype.u,N=oa.Md5=e,r.prototype.add=r.prototype.add,r.prototype.multiply=r.prototype.j,r.prototype.modulo=r.prototype.A,r.prototype.compare=r.prototype.l,r.prototype.toNumber=r.prototype.m,r.prototype.toString=r.prototype.toString,r.prototype.getBits=r.prototype.i,r.fromNumber=s,r.fromString=function e(t,r){if(0==t.length)throw Error("number format error: empty string");if(2>(r=r||10)||36<r)throw Error("radix out of range: "+r);if("-"==t.charAt(0))return d(e(t.substring(1),r));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var n=s(Math.pow(r,8)),i=a,o=0;o<t.length;o+=8){var l=Math.min(8,t.length-o),c=parseInt(t.substring(o,o+l),r);8>l?(l=s(Math.pow(r,l)),i=i.j(l).add(s(c))):i=(i=i.j(n)).add(s(c))}return i},R=oa.Integer=r}).apply(void 0!==os?os:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var ol="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},oc={};(function(){var e,t,r,n="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){return e==Array.prototype||e==Object.prototype||(e[t]=r.value),e},i=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof ol&&ol];for(var t=0;t<e.length;++t){var r=e[t];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);!function(e,t){if(t)e:{var r=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var s=e[o];if(!(s in r))break e;r=r[s]}(t=t(o=r[e=e[e.length-1]]))!=o&&null!=t&&n(r,e,{configurable:!0,writable:!0,value:t})}}("Array.prototype.values",function(e){return e||function(){var e,t,r,n,i;return e=this,t=function(e,t){return t},e instanceof String&&(e+=""),r=0,n=!1,(i={next:function(){if(!n&&r<e.length){var i=r++;return{value:t(i,e[i]),done:!1}}return n=!0,{done:!0,value:void 0}}})[Symbol.iterator]=function(){return i},i}});var o=o||{},s=this||self;function a(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function l(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function c(e,t,r){return e.call.apply(e.bind,arguments)}function u(e,t,r){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,n),e.apply(t,r)}}return function(){return e.apply(t,arguments)}}function h(e,t,r){return(h=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?c:u).apply(null,arguments)}function d(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var t=r.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function f(e,t){function r(){}r.prototype=t.prototype,e.aa=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.Qb=function(e,r,n){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[r].apply(e,i)}}function p(e){let t=e.length;if(0<t){let r=Array(t);for(let n=0;n<t;n++)r[n]=e[n];return r}return[]}function m(e,t){for(let t=1;t<arguments.length;t++){let r=arguments[t];if(a(r)){let t=e.length||0,n=r.length||0;e.length=t+n;for(let i=0;i<n;i++)e[t+i]=r[i]}else e.push(r)}}class g{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}function y(e){return/^[\s\xa0]*$/.test(e)}function v(){var e=s.navigator;return e&&(e=e.userAgent)?e:""}function b(e){return b[" "](e),e}b[" "]=function(){};var w=-1!=v().indexOf("Gecko")&&!(-1!=v().toLowerCase().indexOf("webkit")&&-1==v().indexOf("Edge"))&&!(-1!=v().indexOf("Trident")||-1!=v().indexOf("MSIE"))&&-1==v().indexOf("Edge");function _(e,t,r){for(let n in e)t.call(r,e[n],n,e)}function x(e){let t={};for(let r in e)t[r]=e[r];return t}let k="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function S(e,t){let r,n;for(let t=1;t<arguments.length;t++){for(r in n=arguments[t])e[r]=n[r];for(let t=0;t<k.length;t++)r=k[t],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}}class E{constructor(){this.h=this.g=null}add(e,t){let r=T.get();r.set(e,t),this.h?this.h.next=r:this.g=r,this.h=r}}var T=new g(()=>new C,e=>e.reset());class C{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let I,P=!1,A=new E,O=()=>{let e=s.Promise.resolve(void 0);I=()=>{e.then(R)}};var R=()=>{let e;for(var t;e=null,A.g&&(e=A.g,A.g=A.g.next,A.g||(A.h=null),e.next=null),t=e;){try{t.h.call(t.g)}catch(e){!function(e){s.setTimeout(()=>{throw e},0)}(e)}T.j(t),100>T.h&&(T.h++,t.next=T.g,T.g=t)}P=!1};function N(){this.s=this.s,this.C=this.C}function V(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}N.prototype.s=!1,N.prototype.ma=function(){this.s||(this.s=!0,this.N())},N.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},V.prototype.h=function(){this.defaultPrevented=!0};var q=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{let e=()=>{};s.addEventListener("test",e,t),s.removeEventListener("test",e,t)}catch(e){}return e}();function $(e,t){if(V.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var r=this.type=e.type,n=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(w){e:{try{b(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==r?t=e.fromElement:"mouseout"==r&&(t=e.toElement);this.relatedTarget=t,n?(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:W[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&$.aa.h.call(this)}}f($,V);var W={2:"touch",3:"pen",4:"mouse"};$.prototype.h=function(){$.aa.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var H="closure_listenable_"+(1e6*Math.random()|0),G=0;function K(e,t,r,n,i){this.listener=e,this.proxy=null,this.src=t,this.type=r,this.capture=!!n,this.ha=i,this.key=++G,this.da=this.fa=!1}function Q(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function Y(e){this.src=e,this.g={},this.h=0}function X(e,t){var r=t.type;if(r in e.g){var n,i=e.g[r],o=Array.prototype.indexOf.call(i,t,void 0);(n=0<=o)&&Array.prototype.splice.call(i,o,1),n&&(Q(t),0==e.g[r].length&&(delete e.g[r],e.h--))}}function J(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i];if(!o.da&&o.listener==t&&!!r==o.capture&&o.ha==n)return i}return -1}Y.prototype.add=function(e,t,r,n,i){var o=e.toString();(e=this.g[o])||(e=this.g[o]=[],this.h++);var s=J(e,t,n,i);return -1<s?(t=e[s],r||(t.fa=!1)):((t=new K(t,this.src,o,!!n,i)).fa=r,e.push(t)),t};var Z="closure_lm_"+(1e6*Math.random()|0),ee={};function et(e,t,r,n,i,o){if(!t)throw Error("Invalid event type");var s=l(i)?!!i.capture:!!i,a=eo(e);if(a||(e[Z]=a=new Y(e)),(r=a.add(t,r,n,s,o)).proxy)return r;if(n=function e(t){return ei.call(e.src,e.listener,t)},r.proxy=n,n.src=e,n.listener=r,e.addEventListener)q||(i=s),void 0===i&&(i=!1),e.addEventListener(t.toString(),n,i);else if(e.attachEvent)e.attachEvent(en(t.toString()),n);else if(e.addListener&&e.removeListener)e.addListener(n);else throw Error("addEventListener and attachEvent are unavailable.");return r}function er(e){if("number"!=typeof e&&e&&!e.da){var t=e.src;if(t&&t[H])X(t.i,e);else{var r=e.type,n=e.proxy;t.removeEventListener?t.removeEventListener(r,n,e.capture):t.detachEvent?t.detachEvent(en(r),n):t.addListener&&t.removeListener&&t.removeListener(n),(r=eo(t))?(X(r,e),0==r.h&&(r.src=null,t[Z]=null)):Q(e)}}}function en(e){return e in ee?ee[e]:ee[e]="on"+e}function ei(e,t){if(e.da)e=!0;else{t=new $(t,this);var r=e.listener,n=e.ha||e.src;e.fa&&er(e),e=r.call(n,t)}return e}function eo(e){return(e=e[Z])instanceof Y?e:null}var es="__closure_events_fn_"+(1e9*Math.random()>>>0);function ea(e){return"function"==typeof e?e:(e[es]||(e[es]=function(t){return e.handleEvent(t)}),e[es])}function el(){N.call(this),this.i=new Y(this),this.M=this,this.F=null}function ec(e,t){var r,n=e.F;if(n)for(r=[];n;n=n.F)r.push(n);if(e=e.M,n=t.type||t,"string"==typeof t)t=new V(t,e);else if(t instanceof V)t.target=t.target||e;else{var i=t;S(t=new V(n,e),i)}if(i=!0,r)for(var o=r.length-1;0<=o;o--){var s=t.g=r[o];i=eu(s,n,!0,t)&&i}if(i=eu(s=t.g=e,n,!0,t)&&i,i=eu(s,n,!1,t)&&i,r)for(o=0;o<r.length;o++)i=eu(s=t.g=r[o],n,!1,t)&&i}function eu(e,t,r,n){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var s=t[o];if(s&&!s.da&&s.capture==r){var a=s.listener,l=s.ha||s.src;s.fa&&X(e.i,s),i=!1!==a.call(l,n)&&i}}return i&&!n.defaultPrevented}function eh(e,t,r){if("function"==typeof e)r&&(e=h(e,r));else if(e&&"function"==typeof e.handleEvent)e=h(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<Number(t)?-1:s.setTimeout(e,t||0)}f(el,N),el.prototype[H]=!0,el.prototype.removeEventListener=function(e,t,r,n){!function e(t,r,n,i,o){if(Array.isArray(r))for(var s=0;s<r.length;s++)e(t,r[s],n,i,o);else(i=l(i)?!!i.capture:!!i,n=ea(n),t&&t[H])?(t=t.i,(r=String(r).toString())in t.g&&-1<(n=J(s=t.g[r],n,i,o))&&(Q(s[n]),Array.prototype.splice.call(s,n,1),0==s.length&&(delete t.g[r],t.h--))):t&&(t=eo(t))&&(r=t.g[r.toString()],t=-1,r&&(t=J(r,n,i,o)),(n=-1<t?r[t]:null)&&er(n))}(this,e,t,r,n)},el.prototype.N=function(){if(el.aa.N.call(this),this.i){var e,t=this.i;for(e in t.g){for(var r=t.g[e],n=0;n<r.length;n++)Q(r[n]);delete t.g[e],t.h--}}this.F=null},el.prototype.K=function(e,t,r,n){return this.i.add(String(e),t,!1,r,n)},el.prototype.L=function(e,t,r,n){return this.i.add(String(e),t,!0,r,n)};class ed extends N{constructor(e,t){super(),this.m=e,this.l=t,this.h=null,this.i=!1,this.g=null}j(e){this.h=arguments,this.g?this.i=!0:function e(t){t.g=eh(()=>{t.g=null,t.i&&(t.i=!1,e(t))},t.l);let r=t.h;t.h=null,t.m.apply(null,r)}(this)}N(){super.N(),this.g&&(s.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function ef(e){N.call(this),this.h=e,this.g={}}f(ef,N);var ep=[];function em(e){_(e.g,function(e,t){this.g.hasOwnProperty(t)&&er(e)},e),e.g={}}ef.prototype.N=function(){ef.aa.N.call(this),em(this)},ef.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var eg=s.JSON.stringify,ey=s.JSON.parse,ev=class{stringify(e){return s.JSON.stringify(e,void 0)}parse(e){return s.JSON.parse(e,void 0)}};function eb(){}function ew(e){return e.h||(e.h=e.i())}function e_(){}eb.prototype.h=null;var ex={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function ek(){V.call(this,"d")}function eS(){V.call(this,"c")}f(ek,V),f(eS,V);var eE={},eT=null;function eC(){return eT=eT||new el}function eI(e){V.call(this,eE.La,e)}function eP(e){let t=eC();ec(t,new eI(t))}function eA(e,t){V.call(this,eE.STAT_EVENT,e),this.stat=t}function eO(e){let t=eC();ec(t,new eA(t,e))}function eR(e,t){V.call(this,eE.Ma,e),this.size=t}function eN(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return s.setTimeout(function(){e()},t)}function ej(){this.g=!0}function eD(e,t,r,n){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var r=JSON.parse(t);if(r){for(e=0;e<r.length;e++)if(Array.isArray(r[e])){var n=r[e];if(!(2>n.length)){var i=n[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var s=1;s<i.length;s++)i[s]=""}}}}return eg(r)}catch(e){return t}}(e,r)+(n?" "+n:"")})}eE.La="serverreachability",f(eI,V),eE.STAT_EVENT="statevent",f(eA,V),eE.Ma="timingevent",f(eR,V),ej.prototype.xa=function(){this.g=!1},ej.prototype.info=function(){};var eM={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},eL={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"};function eF(){}function ez(e,t,r,n){this.j=e,this.i=t,this.l=r,this.R=n||1,this.U=new ef(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new eU}function eU(){this.i=null,this.g="",this.h=!1}f(eF,eb),eF.prototype.g=function(){return new XMLHttpRequest},eF.prototype.i=function(){return{}},t=new eF;var eB={},eV={};function eq(e,t,r){e.L=1,e.v=ti(e7(t)),e.m=r,e.P=!0,e$(e,null)}function e$(e,t){e.F=Date.now(),eH(e),e.A=e7(e.v);var r=e.A,n=e.R;Array.isArray(n)||(n=[String(n)]),ty(r.i,"t",n),e.C=0,r=e.j.J,e.h=new eU,e.g=t4(e.j,r?t:null,!e.m),0<e.O&&(e.M=new ed(h(e.Y,e,e.g),e.O)),t=e.U,r=e.g,n=e.ca;var i="readystatechange";Array.isArray(i)||(i&&(ep[0]=i.toString()),i=ep);for(var o=0;o<i.length;o++){var s=function e(t,r,n,i,o){if(i&&i.once)return function e(t,r,n,i,o){if(Array.isArray(r)){for(var s=0;s<r.length;s++)e(t,r[s],n,i,o);return null}return n=ea(n),t&&t[H]?t.L(r,n,l(i)?!!i.capture:!!i,o):et(t,r,n,!0,i,o)}(t,r,n,i,o);if(Array.isArray(r)){for(var s=0;s<r.length;s++)e(t,r[s],n,i,o);return null}return n=ea(n),t&&t[H]?t.K(r,n,l(i)?!!i.capture:!!i,o):et(t,r,n,!1,i,o)}(r,i[o],n||t.handleEvent,!1,t.h||t);if(!s)break;t.g[s.key]=s}t=e.H?x(e.H):{},e.m?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.m,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),eP(),function(e,t,r,n,i,o){e.info(function(){if(e.g){if(o)for(var s="",a=o.split("&"),l=0;l<a.length;l++){var c=a[l].split("=");if(1<c.length){var u=c[0];c=c[1];var h=u.split("_");s=2<=h.length&&"type"==h[1]?s+(u+"=")+c+"&":s+(u+"=redacted&")}}else s=null}else s=o;return"XMLHTTP REQ ("+n+") [attempt "+i+"]: "+t+"\n"+r+"\n"+s})}(e.i,e.u,e.A,e.l,e.R,e.m)}function eW(e){return!!e.g&&"GET"==e.u&&2!=e.L&&e.j.Ca}function eH(e){e.S=Date.now()+e.I,eG(e,e.I)}function eG(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=eN(h(e.ba,e),t)}function eK(e){e.B&&(s.clearTimeout(e.B),e.B=null)}function eQ(e){0==e.j.G||e.J||tJ(e.j,e)}function eY(e){eK(e);var t=e.M;t&&"function"==typeof t.ma&&t.ma(),e.M=null,em(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.ma())}function eX(e,t){try{var r=e.j;if(0!=r.G&&(r.g==e||e2(r.h,e))){if(!e.K&&e2(r.h,e)&&3==r.G){try{var n=r.Da.g.parse(t)}catch(e){n=null}if(Array.isArray(n)&&3==n.length){var i=n;if(0==i[0]){e:if(!r.u){if(r.g){if(r.g.F+3e3<e.F)tX(r),tB(r);else break e}tK(r),eO(18)}}else r.za=i[1],0<r.za-r.T&&37500>i[2]&&r.F&&0==r.v&&!r.C&&(r.C=eN(h(r.Za,r),6e3));if(1>=e1(r.h)&&r.ca){try{r.ca()}catch(e){}r.ca=void 0}}else t0(r,11)}else if((e.K||r.g==e)&&tX(r),!y(t))for(i=r.Da.g.parse(t),t=0;t<i.length;t++){let a=i[t];if(r.T=a[0],a=a[1],2==r.G){if("c"==a[0]){r.K=a[1],r.ia=a[2];let t=a[3];null!=t&&(r.la=t,r.j.info("VER="+r.la));let i=a[4];null!=i&&(r.Aa=i,r.j.info("SVER="+r.Aa));let l=a[5];null!=l&&"number"==typeof l&&0<l&&(n=1.5*l,r.L=n,r.j.info("backChannelRequestTimeoutMs_="+n)),n=r;let c=e.g;if(c){let e=c.g?c.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var o=n.h;o.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(o.j=o.l,o.g=new Set,o.h&&(e4(o,o.h),o.h=null))}if(n.D){let e=c.g?c.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(n.ya=e,tn(n.I,n.D,e))}}if(r.G=3,r.l&&r.l.ua(),r.ba&&(r.R=Date.now()-e.F,r.j.info("Handshake RTT: "+r.R+"ms")),(n=r).qa=t2(n,n.J?n.ia:null,n.W),e.K){e5(n.h,e);var s=n.L;s&&(e.I=s),e.B&&(eK(e),eH(e)),n.g=e}else tG(n);0<r.i.length&&tq(r)}else"stop"!=a[0]&&"close"!=a[0]||t0(r,7)}else 3==r.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?t0(r,7):tU(r):"noop"!=a[0]&&r.l&&r.l.ta(a),r.v=0)}}eP(4)}catch(e){}}ez.prototype.ca=function(e){e=e.target;let t=this.M;t&&3==tM(e)?t.j():this.Y(e)},ez.prototype.Y=function(e){try{if(e==this.g)e:{let d=tM(this.g);var t=this.g.Ba();let f=this.g.Z();if(!(3>d)&&(3!=d||this.g&&(this.h.h||this.g.oa()||tL(this.g)))){this.J||4!=d||7==t||(8==t||0>=f?eP(3):eP(2)),eK(this);var r=this.g.Z();this.X=r;t:if(eW(this)){var n=tL(this.g);e="";var i=n.length,o=4==tM(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){eY(this),eQ(this);var a="";break t}this.h.i=new s.TextDecoder}for(t=0;t<i;t++)this.h.h=!0,e+=this.h.i.decode(n[t],{stream:!(o&&t==i-1)});n.length=0,this.h.g+=e,this.C=0,a=this.h.g}else a=this.g.oa();if(this.o=200==r,function(e,t,r,n,i,o,s){e.info(function(){return"XMLHTTP RESP ("+n+") [ attempt "+i+"]: "+t+"\n"+r+"\n"+o+" "+s})}(this.i,this.u,this.A,this.l,this.R,d,r),this.o){if(this.T&&!this.K){t:{if(this.g){var l,c=this.g;if((l=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!y(l)){var u=l;break t}}u=null}if(r=u)eD(this.i,this.l,r,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,eX(this,r);else{this.o=!1,this.s=3,eO(12),eY(this),eQ(this);break e}}if(this.P){let e;for(r=!0;!this.J&&this.C<a.length;)if((e=function(e,t){var r=e.C,n=t.indexOf("\n",r);return -1==n?eV:isNaN(r=Number(t.substring(r,n)))?eB:(n+=1)+r>t.length?eV:(t=t.slice(n,n+r),e.C=n+r,t)}(this,a))==eV){4==d&&(this.s=4,eO(14),r=!1),eD(this.i,this.l,null,"[Incomplete Response]");break}else if(e==eB){this.s=4,eO(15),eD(this.i,this.l,a,"[Invalid Chunk]"),r=!1;break}else eD(this.i,this.l,e,null),eX(this,e);if(eW(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=d||0!=a.length||this.h.h||(this.s=1,eO(16),r=!1),this.o=this.o&&r,r){if(0<a.length&&!this.W){this.W=!0;var h=this.j;h.g==this&&h.ba&&!h.M&&(h.j.info("Great, no buffering proxy detected. Bytes received: "+a.length),tQ(h),h.M=!0,eO(11))}}else eD(this.i,this.l,a,"[Invalid Chunked Response]"),eY(this),eQ(this)}else eD(this.i,this.l,a,null),eX(this,a);4==d&&eY(this),this.o&&!this.J&&(4==d?tJ(this.j,this):(this.o=!1,eH(this)))}else(function(e){let t={};e=(e.g&&2<=tM(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let n=0;n<e.length;n++){if(y(e[n]))continue;var r=function(e){var t=1;e=e.split(":");let r=[];for(;0<t&&e.length;)r.push(e.shift()),t--;return e.length&&r.push(e.join(":")),r}(e[n]);let i=r[0];if("string"!=typeof(r=r[1]))continue;r=r.trim();let o=t[i]||[];t[i]=o,o.push(r)}!function(e,t){for(let r in e)t.call(void 0,e[r],r,e)}(t,function(e){return e.join(", ")})})(this.g),400==r&&0<a.indexOf("Unknown SID")?(this.s=3,eO(12)):(this.s=0,eO(13)),eY(this),eQ(this)}}}catch(e){}finally{}},ez.prototype.cancel=function(){this.J=!0,eY(this)},ez.prototype.ba=function(){this.B=null;let e=Date.now();0<=e-this.S?(function(e,t){e.info(function(){return"TIMEOUT: "+t})}(this.i,this.A),2!=this.L&&(eP(),eO(17)),eY(this),this.s=2,eQ(this)):eG(this,this.S-e)};var eJ=class{constructor(e,t){this.g=e,this.map=t}};function eZ(e){this.l=e||10,e=s.PerformanceNavigationTiming?0<(e=s.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):!!(s.chrome&&s.chrome.loadTimes&&s.chrome.loadTimes()&&s.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function e0(e){return!!e.h||!!e.g&&e.g.size>=e.j}function e1(e){return e.h?1:e.g?e.g.size:0}function e2(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function e4(e,t){e.g?e.g.add(t):e.h=t}function e5(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function e6(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){let t=e.i;for(let r of e.g.values())t=t.concat(r.D);return t}return p(e.i)}function e3(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(a(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var r=function(e){if(e.na&&"function"==typeof e.na)return e.na();if(!e.V||"function"!=typeof e.V){if("undefined"!=typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!=typeof Set&&e instanceof Set)){if(a(e)||"string"==typeof e){var t=[];e=e.length;for(var r=0;r<e;r++)t.push(r);return t}for(let n in t=[],r=0,e)t[r++]=n;return t}}}(e),n=function(e){if(e.V&&"function"==typeof e.V)return e.V();if("undefined"!=typeof Map&&e instanceof Map||"undefined"!=typeof Set&&e instanceof Set)return Array.from(e.values());if("string"==typeof e)return e.split("");if(a(e)){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t}for(n in t=[],r=0,e)t[r++]=e[n];return t}(e),i=n.length,o=0;o<i;o++)t.call(void 0,n[o],r&&r[o],e)}eZ.prototype.cancel=function(){if(this.i=e6(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let e of this.g.values())e.cancel();this.g.clear()}};var e9=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function e8(e){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,e instanceof e8){this.h=e.h,te(this,e.j),this.o=e.o,this.g=e.g,tt(this,e.s),this.l=e.l;var t=e.i,r=new tf;r.i=t.i,t.g&&(r.g=new Map(t.g),r.h=t.h),tr(this,r),this.m=e.m}else e&&(t=String(e).match(e9))?(this.h=!1,te(this,t[1]||"",!0),this.o=to(t[2]||""),this.g=to(t[3]||"",!0),tt(this,t[4]),this.l=to(t[5]||"",!0),tr(this,t[6]||"",!0),this.m=to(t[7]||"")):(this.h=!1,this.i=new tf(null,this.h))}function e7(e){return new e8(e)}function te(e,t,r){e.j=r?to(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function tt(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.s=t}else e.s=null}function tr(e,t,r){var n,i;t instanceof tf?(e.i=t,n=e.i,(i=e.h)&&!n.j&&(tp(n),n.i=null,n.g.forEach(function(e,t){var r=t.toLowerCase();t!=r&&(tm(this,t),ty(this,r,e))},n)),n.j=i):(r||(t=ts(t,th)),e.i=new tf(t,e.h))}function tn(e,t,r){e.i.set(t,r)}function ti(e){return tn(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function to(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function ts(e,t,r){return"string"==typeof e?(e=encodeURI(e).replace(t,ta),r&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ta(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}e8.prototype.toString=function(){var e=[],t=this.j;t&&e.push(ts(t,tl,!0),":");var r=this.g;return(r||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(ts(t,tl,!0),"@"),e.push(encodeURIComponent(String(r)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(r=this.s)&&e.push(":",String(r))),(r=this.l)&&(this.g&&"/"!=r.charAt(0)&&e.push("/"),e.push(ts(r,"/"==r.charAt(0)?tu:tc,!0))),(r=this.i.toString())&&e.push("?",r),(r=this.m)&&e.push("#",ts(r,td)),e.join("")};var tl=/[#\/\?@]/g,tc=/[#\?:]/g,tu=/[#\?]/g,th=/[#\?@]/g,td=/#/g;function tf(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function tp(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var r=0;r<e.length;r++){var n=e[r].indexOf("="),i=null;if(0<=n){var o=e[r].substring(0,n);i=e[r].substring(n+1)}else o=e[r];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,function(t,r){e.add(decodeURIComponent(t.replace(/\+/g," ")),r)}))}function tm(e,t){tp(e),t=tv(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function tg(e,t){return tp(e),t=tv(e,t),e.g.has(t)}function ty(e,t,r){tm(e,t),0<r.length&&(e.i=null,e.g.set(tv(e,t),p(r)),e.h+=r.length)}function tv(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function tb(e,t,r,n,i){try{i&&(i.onload=null,i.onerror=null,i.onabort=null,i.ontimeout=null),n(r)}catch(e){}}function tw(){this.g=new ev}function t_(e){this.l=e.Ub||null,this.j=e.eb||!1}function tx(e,t){el.call(this),this.D=e,this.o=t,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}function tk(e){e.j.read().then(e.Pa.bind(e)).catch(e.ga.bind(e))}function tS(e){e.readyState=4,e.l=null,e.j=null,e.v=null,tE(e)}function tE(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function tT(e){let t="";return _(e,function(e,r){t+=r+":"+e+"\r\n"}),t}function tC(e,t,r){e:{for(n in r){var n=!1;break e}n=!0}n||(r=tT(r),"string"==typeof e?null!=r&&encodeURIComponent(String(r)):tn(e,t,r))}function tI(e){el.call(this),this.headers=new Map,this.o=e||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}(r=tf.prototype).add=function(e,t){tp(this),this.i=null,e=tv(this,e);var r=this.g.get(e);return r||this.g.set(e,r=[]),r.push(t),this.h+=1,this},r.forEach=function(e,t){tp(this),this.g.forEach(function(r,n){r.forEach(function(r){e.call(t,r,n,this)},this)},this)},r.na=function(){tp(this);let e=Array.from(this.g.values()),t=Array.from(this.g.keys()),r=[];for(let n=0;n<t.length;n++){let i=e[n];for(let e=0;e<i.length;e++)r.push(t[n])}return r},r.V=function(e){tp(this);let t=[];if("string"==typeof e)tg(this,e)&&(t=t.concat(this.g.get(tv(this,e))));else{e=Array.from(this.g.values());for(let r=0;r<e.length;r++)t=t.concat(e[r])}return t},r.set=function(e,t){return tp(this),this.i=null,tg(this,e=tv(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},r.get=function(e,t){return e&&0<(e=this.V(e)).length?String(e[0]):t},r.toString=function(){if(this.i)return this.i;if(!this.g)return"";let e=[],t=Array.from(this.g.keys());for(var r=0;r<t.length;r++){var n=t[r];let o=encodeURIComponent(String(n)),s=this.V(n);for(n=0;n<s.length;n++){var i=o;""!==s[n]&&(i+="="+encodeURIComponent(String(s[n]))),e.push(i)}}return this.i=e.join("&")},f(t_,eb),t_.prototype.g=function(){return new tx(this.l,this.j)},t_.prototype.i=(e={},function(){return e}),f(tx,el),(r=tx.prototype).open=function(e,t){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.B=e,this.A=t,this.readyState=1,tE(this)},r.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;let t={headers:this.u,method:this.B,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||s).fetch(new Request(this.A,t)).then(this.Sa.bind(this),this.ga.bind(this))},r.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,tS(this)),this.readyState=0},r.Sa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,tE(this)),this.g&&(this.readyState=3,tE(this),this.g))){if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(void 0!==s.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;tk(this)}else e.text().then(this.Ra.bind(this),this.ga.bind(this))}},r.Pa=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array(0);(t=this.v.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?tS(this):tE(this),3==this.readyState&&tk(this)}},r.Ra=function(e){this.g&&(this.response=this.responseText=e,tS(this))},r.Qa=function(e){this.g&&(this.response=e,tS(this))},r.ga=function(){this.g&&tS(this)},r.setRequestHeader=function(e,t){this.u.append(e,t)},r.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},r.getAllResponseHeaders=function(){if(!this.h)return"";let e=[],t=this.h.entries();for(var r=t.next();!r.done;)e.push((r=r.value)[0]+": "+r[1]),r=t.next();return e.join("\r\n")},Object.defineProperty(tx.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),f(tI,el);var tP=/^https?$/i,tA=["POST","PUT"];function tO(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.m=5,tR(e),tj(e)}function tR(e){e.A||(e.A=!0,ec(e,"complete"),ec(e,"error"))}function tN(e){if(e.h&&void 0!==o&&(!e.v[1]||4!=tM(e)||2!=e.Z())){if(e.u&&4==tM(e))eh(e.Ea,0,e);else if(ec(e,"readystatechange"),4==tM(e)){e.h=!1;try{let o=e.Z();switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t,r,n=!0;break;default:n=!1}if(!(t=n)){if(r=0===o){var i=String(e.D).match(e9)[1]||null;!i&&s.self&&s.self.location&&(i=s.self.location.protocol.slice(0,-1)),r=!tP.test(i?i.toLowerCase():"")}t=r}if(t)ec(e,"complete"),ec(e,"success");else{e.m=6;try{var a=2<tM(e)?e.g.statusText:""}catch(e){a=""}e.l=a+" ["+e.Z()+"]",tR(e)}}finally{tj(e)}}}}function tj(e,t){if(e.g){tD(e);let r=e.g,n=e.v[0]?()=>{}:null;e.g=null,e.v=null,t||ec(e,"ready");try{r.onreadystatechange=n}catch(e){}}}function tD(e){e.I&&(s.clearTimeout(e.I),e.I=null)}function tM(e){return e.g?e.g.readyState:0}function tL(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.H){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function tF(e,t,r){return r&&r.internalChannelParams&&r.internalChannelParams[e]||t}function tz(e){this.Aa=0,this.i=[],this.j=new ej,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=tF("failFast",!1,e),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=tF("baseRetryDelayMs",5e3,e),this.cb=tF("retryDelaySeedMs",1e4,e),this.Wa=tF("forwardChannelMaxRetries",2,e),this.wa=tF("forwardChannelRequestTimeoutMs",2e4,e),this.pa=e&&e.xmlHttpFactory||void 0,this.Xa=e&&e.Tb||void 0,this.Ca=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.h=new eZ(e&&e.concurrentRequestLimit),this.Da=new tw,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=e&&e.Rb||!1,e&&e.xa&&this.j.xa(),e&&e.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&e&&e.detectBufferingProxy||!1,this.ja=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.ja=e.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}function tU(e){if(tV(e),3==e.G){var t=e.U++,r=e7(e.I);if(tn(r,"SID",e.K),tn(r,"RID",t),tn(r,"TYPE","terminate"),tW(e,r),(t=new ez(e,e.j,t)).L=2,t.v=ti(e7(r)),r=!1,s.navigator&&s.navigator.sendBeacon)try{r=s.navigator.sendBeacon(t.v.toString(),"")}catch(e){}!r&&s.Image&&((new Image).src=t.v,r=!0),r||(t.g=t4(t.j,null),t.g.ea(t.v)),t.F=Date.now(),eH(t)}t1(e)}function tB(e){e.g&&(tQ(e),e.g.cancel(),e.g=null)}function tV(e){tB(e),e.u&&(s.clearTimeout(e.u),e.u=null),tX(e),e.h.cancel(),e.s&&("number"==typeof e.s&&s.clearTimeout(e.s),e.s=null)}function tq(e){if(!e0(e.h)&&!e.s){e.s=!0;var t=e.Ga;I||O(),P||(I(),P=!0),A.add(t,e),e.B=0}}function t$(e,t){var r;r=t?t.l:e.U++;let n=e7(e.I);tn(n,"SID",e.K),tn(n,"RID",r),tn(n,"AID",e.T),tW(e,n),e.m&&e.o&&tC(n,e.m,e.o),r=new ez(e,e.j,r,e.B+1),null===e.m&&(r.H=e.o),t&&(e.i=t.D.concat(e.i)),t=tH(e,r,1e3),r.I=Math.round(.5*e.wa)+Math.round(.5*e.wa*Math.random()),e4(e.h,r),eq(r,n,t)}function tW(e,t){e.H&&_(e.H,function(e,r){tn(t,r,e)}),e.l&&e3({},function(e,r){tn(t,r,e)})}function tH(e,t,r){r=Math.min(e.i.length,r);var n=e.l?h(e.l.Na,e.l,e):null;e:{var i=e.i;let t=-1;for(;;){let e=["count="+r];-1==t?0<r?(t=i[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let o=!0;for(let s=0;s<r;s++){let r=i[s].g,a=i[s].map;if(0>(r-=t))t=Math.max(0,i[s].g-100),o=!1;else try{!function(e,t,r){let n=r||"";try{e3(e,function(e,r){let i=e;l(e)&&(i=eg(e)),t.push(n+r+"="+encodeURIComponent(i))})}catch(e){throw t.push(n+"type="+encodeURIComponent("_badmap")),e}}(a,e,"req"+r+"_")}catch(e){n&&n(a)}}if(o){n=e.join("&");break e}}}return e=e.i.splice(0,r),t.D=e,n}function tG(e){if(!e.g&&!e.u){e.Y=1;var t=e.Fa;I||O(),P||(I(),P=!0),A.add(t,e),e.v=0}}function tK(e){return!e.g&&!e.u&&!(3<=e.v)&&(e.Y++,e.u=eN(h(e.Fa,e),tZ(e,e.v)),e.v++,!0)}function tQ(e){null!=e.A&&(s.clearTimeout(e.A),e.A=null)}function tY(e){e.g=new ez(e,e.j,"rpc",e.Y),null===e.m&&(e.g.H=e.o),e.g.O=0;var t=e7(e.qa);tn(t,"RID","rpc"),tn(t,"SID",e.K),tn(t,"AID",e.T),tn(t,"CI",e.F?"0":"1"),!e.F&&e.ja&&tn(t,"TO",e.ja),tn(t,"TYPE","xmlhttp"),tW(e,t),e.m&&e.o&&tC(t,e.m,e.o),e.L&&(e.g.I=e.L);var r=e.g;e=e.ia,r.L=1,r.v=ti(e7(t)),r.m=null,r.P=!0,e$(r,e)}function tX(e){null!=e.C&&(s.clearTimeout(e.C),e.C=null)}function tJ(e,t){var r=null;if(e.g==t){tX(e),tQ(e),e.g=null;var n=2}else{if(!e2(e.h,t))return;r=t.D,e5(e.h,t),n=1}if(0!=e.G){if(t.o){if(1==n){r=t.m?t.m.length:0,t=Date.now()-t.F;var i,o=e.B;ec(n=eC(),new eR(n,r)),tq(e)}else tG(e)}else if(3==(o=t.s)||0==o&&0<t.X||!(1==n&&(i=t,!(e1(e.h)>=e.h.j-(e.s?1:0))&&(e.s?(e.i=i.D.concat(e.i),!0):1!=e.G&&2!=e.G&&!(e.B>=(e.Va?0:e.Wa))&&(e.s=eN(h(e.Ga,e,i),tZ(e,e.B)),e.B++,!0)))||2==n&&tK(e)))switch(r&&0<r.length&&((t=e.h).i=t.i.concat(r)),o){case 1:t0(e,5);break;case 4:t0(e,10);break;case 3:t0(e,6);break;default:t0(e,2)}}}function tZ(e,t){let r=e.Ta+Math.floor(Math.random()*e.cb);return e.isActive()||(r*=2),r*t}function t0(e,t){if(e.j.info("Error code "+t),2==t){var r=h(e.fb,e),n=e.Xa;let t=!n;n=new e8(n||"//www.google.com/images/cleardot.gif"),s.location&&"http"==s.location.protocol||te(n,"https"),ti(n),t?function(e,t){let r=new ej;if(s.Image){let n=new Image;n.onload=d(tb,r,"TestLoadImage: loaded",!0,t,n),n.onerror=d(tb,r,"TestLoadImage: error",!1,t,n),n.onabort=d(tb,r,"TestLoadImage: abort",!1,t,n),n.ontimeout=d(tb,r,"TestLoadImage: timeout",!1,t,n),s.setTimeout(function(){n.ontimeout&&n.ontimeout()},1e4),n.src=e}else t(!1)}(n.toString(),r):function(e,t){let r=new ej,n=new AbortController,i=setTimeout(()=>{n.abort(),tb(r,"TestPingServer: timeout",!1,t)},1e4);fetch(e,{signal:n.signal}).then(e=>{clearTimeout(i),e.ok?tb(r,"TestPingServer: ok",!0,t):tb(r,"TestPingServer: server error",!1,t)}).catch(()=>{clearTimeout(i),tb(r,"TestPingServer: error",!1,t)})}(n.toString(),r)}else eO(2);e.G=0,e.l&&e.l.sa(t),t1(e),tV(e)}function t1(e){if(e.G=0,e.ka=[],e.l){let t=e6(e.h);(0!=t.length||0!=e.i.length)&&(m(e.ka,t),m(e.ka,e.i),e.h.i.length=0,p(e.i),e.i.length=0),e.l.ra()}}function t2(e,t,r){var n=r instanceof e8?e7(r):new e8(r);if(""!=n.g)t&&(n.g=t+"."+n.g),tt(n,n.s);else{var i=s.location;n=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var o=new e8(null);n&&te(o,n),t&&(o.g=t),i&&tt(o,i),r&&(o.l=r),n=o}return r=e.D,t=e.ya,r&&t&&tn(n,r,t),tn(n,"VER",e.la),tW(e,n),n}function t4(e,t,r){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new tI(e.Ca&&!e.pa?new t_({eb:r}):e.pa)).Ha(e.J),t}function t5(){}function t6(){}function t3(e,t){el.call(this),this.g=new tz(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.o=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.va&&(e?e["X-WebChannel-Client-Profile"]=t.va:e={"X-WebChannel-Client-Profile":t.va}),this.g.S=e,(e=t&&t.Sb)&&!y(e)&&(this.g.m=e),this.v=t&&t.supportsCrossDomainXhr||!1,this.u=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!y(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&t in(e=this.h)&&delete e[t]),this.j=new t7(this)}function t9(e){ek.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(let r in t){e=r;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function t8(){eS.call(this),this.status=1}function t7(e){this.g=e}(r=tI.prototype).Ha=function(e){this.J=e},r.ea=function(e,r,n,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+e);r=r?r.toUpperCase():"GET",this.D=e,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():t.g(),this.v=this.o?ew(this.o):ew(t),this.g.onreadystatechange=h(this.Ea,this);try{this.B=!0,this.g.open(r,String(e),!0),this.B=!1}catch(e){tO(this,e);return}if(e=n||"",n=new Map(this.headers),i){if(Object.getPrototypeOf(i)===Object.prototype)for(var o in i)n.set(o,i[o]);else if("function"==typeof i.keys&&"function"==typeof i.get)for(let e of i.keys())n.set(e,i.get(e));else throw Error("Unknown input type for opt_headers: "+String(i))}for(let[t,a]of(i=Array.from(n.keys()).find(e=>"content-type"==e.toLowerCase()),o=s.FormData&&e instanceof s.FormData,!(0<=Array.prototype.indexOf.call(tA,r,void 0))||i||o||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(t,a);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{tD(this),this.u=!0,this.g.send(e),this.u=!1}catch(e){tO(this,e)}},r.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=e||7,ec(this,"complete"),ec(this,"abort"),tj(this))},r.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),tj(this,!0)),tI.aa.N.call(this)},r.Ea=function(){this.s||(this.B||this.u||this.j?tN(this):this.bb())},r.bb=function(){tN(this)},r.isActive=function(){return!!this.g},r.Z=function(){try{return 2<tM(this)?this.g.status:-1}catch(e){return -1}},r.oa=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},r.Oa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),ey(t)}},r.Ba=function(){return this.m},r.Ka=function(){return"string"==typeof this.l?this.l:String(this.l)},(r=tz.prototype).la=8,r.G=1,r.connect=function(e,t,r,n){eO(0),this.W=e,this.H=t||{},r&&void 0!==n&&(this.H.OSID=r,this.H.OAID=n),this.F=this.X,this.I=t2(this,null,this.W),tq(this)},r.Ga=function(e){if(this.s){if(this.s=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;let i=new ez(this,this.j,e),o=this.o;if(this.S&&(o?S(o=x(o),this.S):o=this.S),null!==this.m||this.O||(i.H=o,o=null),this.P)e:{for(var t=0,r=0;r<this.i.length;r++){t:{var n=this.i[r];if("__data__"in n.map&&"string"==typeof(n=n.map.__data__)){n=n.length;break t}n=void 0}if(void 0===n)break;if(4096<(t+=n)){t=r;break e}if(4096===t||r===this.i.length-1){t=r+1;break e}}t=1e3}else t=1e3;t=tH(this,i,t),tn(r=e7(this.I),"RID",e),tn(r,"CVER",22),this.D&&tn(r,"X-HTTP-Session-Id",this.D),tW(this,r),o&&(this.O?t="headers="+encodeURIComponent(String(tT(o)))+"&"+t:this.m&&tC(r,this.m,o)),e4(this.h,i),this.Ua&&tn(r,"TYPE","init"),this.P?(tn(r,"$req",t),tn(r,"SID","null"),i.T=!0,eq(i,r,null)):eq(i,r,t),this.G=2}}else 3==this.G&&(e?t$(this,e):0==this.i.length||e0(this.h)||t$(this))}},r.Fa=function(){if(this.u=null,tY(this),this.ba&&!(this.M||null==this.g||0>=this.R)){var e=2*this.R;this.j.info("BP detection timer enabled: "+e),this.A=eN(h(this.ab,this),e)}},r.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,eO(10),tB(this),tY(this))},r.Za=function(){null!=this.C&&(this.C=null,tB(this),tK(this),eO(19))},r.fb=function(e){e?(this.j.info("Successfully pinged google.com"),eO(2)):(this.j.info("Failed to ping google.com"),eO(1))},r.isActive=function(){return!!this.l&&this.l.isActive(this)},(r=t5.prototype).ua=function(){},r.ta=function(){},r.sa=function(){},r.ra=function(){},r.isActive=function(){return!0},r.Na=function(){},t6.prototype.g=function(e,t){return new t3(e,t)},f(t3,el),t3.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},t3.prototype.close=function(){tU(this.g)},t3.prototype.o=function(e){var t=this.g;if("string"==typeof e){var r={};r.__data__=e,e=r}else this.u&&((r={}).__data__=eg(e),e=r);t.i.push(new eJ(t.Ya++,e)),3==t.G&&tq(t)},t3.prototype.N=function(){this.g.l=null,delete this.j,tU(this.g),delete this.g,t3.aa.N.call(this)},f(t9,ek),f(t8,eS),f(t7,t5),t7.prototype.ua=function(){ec(this.g,"a")},t7.prototype.ta=function(e){ec(this.g,new t9(e))},t7.prototype.sa=function(e){ec(this.g,new t8)},t7.prototype.ra=function(){ec(this.g,"b")},t6.prototype.createWebChannel=t6.prototype.g,t3.prototype.send=t3.prototype.o,t3.prototype.open=t3.prototype.m,t3.prototype.close=t3.prototype.close,B=oc.createWebChannelTransport=function(){return new t6},U=oc.getStatEventTarget=function(){return eC()},z=oc.Event=eE,F=oc.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},eM.NO_ERROR=0,eM.TIMEOUT=8,eM.HTTP_ERROR=6,L=oc.ErrorCode=eM,eL.COMPLETE="complete",M=oc.EventType=eL,e_.EventType=ex,ex.OPEN="a",ex.CLOSE="b",ex.ERROR="c",ex.MESSAGE="d",el.prototype.listen=el.prototype.K,D=oc.WebChannel=e_,oc.FetchXmlHttpFactory=t_,tI.prototype.listenOnce=tI.prototype.L,tI.prototype.getLastError=tI.prototype.Ka,tI.prototype.getLastErrorCode=tI.prototype.Ba,tI.prototype.getStatus=tI.prototype.Z,tI.prototype.getResponseJson=tI.prototype.Oa,tI.prototype.getResponseText=tI.prototype.oa,tI.prototype.send=tI.prototype.ea,tI.prototype.setWithCredentials=tI.prototype.Ha,j=oc.XhrIo=tI}).apply(void 0!==ol?ol:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),r(83454);var ou=r(48764).lW;let oh="@firebase/firestore";class od{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}od.UNAUTHENTICATED=new od(null),od.GOOGLE_CREDENTIALS=new od("google-credentials-uid"),od.FIRST_PARTY=new od("first-party-uid"),od.MOCK_USER=new od("mock-user");let of="10.14.0",op=new e0("@firebase/firestore");function om(){return op.logLevel}function og(e,...t){if(op.logLevel<=I.DEBUG){let r=t.map(ob);op.debug(`Firestore (${of}): ${e}`,...r)}}function oy(e,...t){if(op.logLevel<=I.ERROR){let r=t.map(ob);op.error(`Firestore (${of}): ${e}`,...r)}}function ov(e,...t){if(op.logLevel<=I.WARN){let r=t.map(ob);op.warn(`Firestore (${of}): ${e}`,...r)}}function ob(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return e}}function ow(e="Unexpected state"){let t=`FIRESTORE (${of}) INTERNAL ASSERTION FAILED: `+e;throw oy(t),Error(t)}let o_={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class ox extends e_{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class ok{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class oS{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class oE{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(od.UNAUTHENTICATED))}shutdown(){}}class oT{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class oC{constructor(e){this.t=e,this.currentUser=od.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){void 0===this.o||ow();let r=this.i,n=e=>this.i!==r?(r=this.i,t(e)):Promise.resolve(),i=new ok;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new ok,e.enqueueRetryable(()=>n(this.currentUser))};let o=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await n(this.currentUser)})},s=e=>{og("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(e=>s(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?s(e):(og("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new ok)}},0),o()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(og("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||ow(),new oS(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||ow(),new od(e)}}class oI{constructor(e,t,r){this.l=e,this.h=t,this.P=r,this.type="FirstParty",this.user=od.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class oP{constructor(e,t,r){this.l=e,this.h=t,this.P=r}getToken(){return Promise.resolve(new oI(this.l,this.h,this.P))}start(e,t){e.enqueueRetryable(()=>t(od.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class oA{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class oO{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,t){void 0===this.o||ow();let r=e=>{null!=e.error&&og("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let r=e.token!==this.R;return this.R=e.token,og("FirebaseAppCheckTokenProvider",`Received ${r?"new":"existing"} token.`),r?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>r(t))};let n=e=>{og("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(e=>n(e)),setTimeout(()=>{if(!this.appCheck){let e=this.A.getImmediate({optional:!0});e?n(e):og("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?("string"==typeof e.token||ow(),this.R=e.token,new oA(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}class oR{static newId(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,r="";for(;r.length<20;){let n=function(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),r=new Uint8Array(40);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(r);else for(let e=0;e<40;e++)r[e]=Math.floor(256*Math.random());return r}(0);for(let i=0;i<n.length;++i)r.length<20&&n[i]<t&&(r+=e.charAt(n[i]%e.length))}return r}}function oN(e,t){return e<t?-1:e>t?1:0}function oj(e,t,r){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}class oD{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new ox(o_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new ox(o_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return oD.fromMillis(Date.now())}static fromDate(e){return oD.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new oD(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?oN(this.nanoseconds,e.nanoseconds):oN(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class oM{constructor(e){this.timestamp=e}static fromTimestamp(e){return new oM(e)}static min(){return new oM(new oD(0,0))}static max(){return new oM(new oD(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class oL{constructor(e,t,r){void 0===t?t=0:t>e.length&&ow(),void 0===r?r=e.length-t:r>e.length-t&&ow(),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return 0===oL.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof oL?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,r=this.limit();t<r;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++){let r=e.get(n),i=t.get(n);if(r<i)return -1;if(r>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class oF extends oL{construct(e,t,r){return new oF(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){let t=[];for(let r of e){if(r.indexOf("//")>=0)throw new ox(o_.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter(e=>e.length>0))}return new oF(t)}static emptyPath(){return new oF([])}}let oz=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class oU extends oL{construct(e,t,r){return new oU(e,t,r)}static isValidIdentifier(e){return oz.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),oU.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new oU(["__name__"])}static fromServerFormat(e){let t=[],r="",n=0,i=()=>{if(0===r.length)throw new ox(o_.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""},o=!1;for(;n<e.length;){let t=e[n];if("\\"===t){if(n+1===e.length)throw new ox(o_.INVALID_ARGUMENT,"Path has trailing escape character: "+e);let t=e[n+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new ox(o_.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=t,n+=2}else"`"===t?o=!o:"."!==t||o?r+=t:i(),n++}if(i(),o)throw new ox(o_.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new oU(t)}static emptyPath(){return new oU([])}}class oB{constructor(e){this.path=e}static fromPath(e){return new oB(oF.fromString(e))}static fromName(e){return new oB(oF.fromString(e).popFirst(5))}static empty(){return new oB(oF.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===oF.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return oF.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new oB(new oF(e.slice()))}}class oV{constructor(e,t,r,n){this.indexId=e,this.collectionGroup=t,this.fields=r,this.indexState=n}}oV.UNKNOWN_ID=-1;class oq{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new oq(oM.min(),oB.empty(),-1)}static max(){return new oq(oM.max(),oB.empty(),-1)}}class o${constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}async function oW(e){if(e.code!==o_.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;og("LocalStore","Unexpectedly lost primary lease")}class oH{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&ow(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new oH((r,n)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(r,n)},this.catchCallback=e=>{this.wrapFailure(t,e).next(r,n)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof oH?t:oH.resolve(t)}catch(e){return oH.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):oH.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):oH.reject(t)}static resolve(e){return new oH((t,r)=>{t(e)})}static reject(e){return new oH((t,r)=>{r(e)})}static waitFor(e){return new oH((t,r)=>{let n=0,i=0,o=!1;e.forEach(e=>{++n,e.next(()=>{++i,o&&i===n&&t()},e=>r(e))}),o=!0,i===n&&t()})}static or(e){let t=oH.resolve(!1);for(let r of e)t=t.next(e=>e?oH.resolve(e):r());return t}static forEach(e,t){let r=[];return e.forEach((e,n)=>{r.push(t.call(this,e,n))}),this.waitFor(r)}static mapArray(e,t){return new oH((r,n)=>{let i=e.length,o=Array(i),s=0;for(let a=0;a<i;a++){let l=a;t(e[l]).next(e=>{o[l]=e,++s===i&&r(o)},e=>n(e))}})}static doWhile(e,t){return new oH((r,n)=>{let i=()=>{!0===e()?t().next(()=>{i()},n):r()};i()})}}function oG(e){return"IndexedDbTransactionError"===e.name}class oK{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ie(e),this.se=e=>t.writeSequenceNumber(e))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.se&&this.se(e),e}}function oQ(e){return 0===e&&1/e==-1/0}function oY(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function oX(e,t){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(r,e[r])}function oJ(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}oK.oe=-1;class oZ{constructor(e,t){this.comparator=e,this.root=t||o1.EMPTY}insert(e,t){return new oZ(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,o1.BLACK,null,null))}remove(e){return new oZ(this.comparator,this.root.remove(e,this.comparator).copy(null,null,o1.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let r=this.comparator(e,t.key);if(0===r)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){let n=this.comparator(e,r.key);if(0===n)return t+r.left.size;n<0?r=r.left:(t+=r.left.size+1,r=r.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,r)=>(e(t,r),!1))}toString(){let e=[];return this.inorderTraversal((t,r)=>(e.push(`${t}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new o0(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new o0(this.root,e,this.comparator,!1)}getReverseIterator(){return new o0(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new o0(this.root,e,this.comparator,!0)}}class o0{constructor(e,t,r,n){this.isReverse=n,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?r(e.key,t):1,t&&n&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class o1{constructor(e,t,r,n,i){this.key=e,this.value=t,this.color=null!=r?r:o1.RED,this.left=null!=n?n:o1.EMPTY,this.right=null!=i?i:o1.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,n,i){return new o1(null!=e?e:this.key,null!=t?t:this.value,null!=r?r:this.color,null!=n?n:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let n=this,i=r(e,n.key);return(n=i<0?n.copy(null,null,null,n.left.insert(e,t,r),null):0===i?n.copy(null,t,null,null,null):n.copy(null,null,null,null,n.right.insert(e,t,r))).fixUp()}removeMin(){if(this.left.isEmpty())return o1.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let r,n=this;if(0>t(e,n.key))n.left.isEmpty()||n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed()&&(n=n.rotateRight()),n.right.isEmpty()||n.right.isRed()||n.right.left.isRed()||(n=n.moveRedRight()),0===t(e,n.key)){if(n.right.isEmpty())return o1.EMPTY;r=n.right.min(),n=n.copy(r.key,r.value,null,null,n.right.removeMin())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,o1.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,o1.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){return Math.pow(2,this.check())<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw ow();let e=this.left.check();if(e!==this.right.check())throw ow();return e+(this.isRed()?0:1)}}o1.EMPTY=null,o1.RED=!0,o1.BLACK=!1,o1.EMPTY=new class{constructor(){this.size=0}get key(){throw ow()}get value(){throw ow()}get color(){throw ow()}get left(){throw ow()}get right(){throw ow()}copy(e,t,r,n,i){return this}insert(e,t,r){return new o1(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class o2{constructor(e){this.comparator=e,this.data=new oZ(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,r)=>(e(t),!1))}forEachInRange(e,t){let r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){let n=r.getNext();if(this.comparator(n.key,e[1])>=0)return;t(n.key)}}forEachWhile(e,t){let r;for(r=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new o4(this.data.getIterator())}getIteratorFrom(e){return new o4(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(e=>{t=t.add(e)}),t}isEqual(e){if(!(e instanceof o2)||this.size!==e.size)return!1;let t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(0!==this.comparator(e,n))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new o2(this.comparator);return t.data=e,t}}class o4{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class o5{constructor(e){this.fields=e,e.sort(oU.comparator)}static empty(){return new o5([])}unionWith(e){let t=new o2(oU.comparator);for(let e of this.fields)t=t.add(e);for(let r of e)t=t.add(r);return new o5(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return oj(this.fields,e.fields,(e,t)=>e.isEqual(t))}}class o6 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class o3{constructor(e){this.binaryString=e}static fromBase64String(e){return new o3(function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new o6("Invalid base64 string: "+e):e}}(e))}static fromUint8Array(e){return new o3(function(e){let t="";for(let r=0;r<e.length;++r)t+=String.fromCharCode(e[r]);return t}(e))}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return oN(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}o3.EMPTY_BYTE_STRING=new o3("");let o9=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function o8(e){if(e||ow(),"string"==typeof e){let t=0,r=o9.exec(e);if(r||ow(),r[1]){let e=r[1];t=Number(e=(e+"000000000").substr(0,9))}return{seconds:Math.floor(new Date(e).getTime()/1e3),nanos:t}}return{seconds:o7(e.seconds),nanos:o7(e.nanos)}}function o7(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function se(e){return"string"==typeof e?o3.fromBase64String(e):o3.fromUint8Array(e)}function st(e){var t,r;return"server_timestamp"===(null===(r=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===r?void 0:r.stringValue)}function sr(e){let t=e.mapValue.fields.__previous_value__;return st(t)?sr(t):t}function sn(e){let t=o8(e.mapValue.fields.__local_write_time__.timestampValue);return new oD(t.seconds,t.nanos)}class si{constructor(e,t,r,n,i,o,s,a,l){this.databaseId=e,this.appId=t,this.persistenceKey=r,this.host=n,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=s,this.longPollingOptions=a,this.useFetchStreams=l}}class so{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new so("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof so&&e.projectId===this.projectId&&e.database===this.database}}let ss={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function sa(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?st(e)?4:s_(e)?9007199254740991:sb(e)?10:11:ow()}function sl(e,t){if(e===t)return!0;let r=sa(e);if(r!==sa(t))return!1;switch(r){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return sn(e).isEqual(sn(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;let r=o8(e.timestampValue),n=o8(t.timestampValue);return r.seconds===n.seconds&&r.nanos===n.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return se(e.bytesValue).isEqual(se(t.bytesValue));case 7:return e.referenceValue===t.referenceValue;case 8:return o7(e.geoPointValue.latitude)===o7(t.geoPointValue.latitude)&&o7(e.geoPointValue.longitude)===o7(t.geoPointValue.longitude);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return o7(e.integerValue)===o7(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){let r=o7(e.doubleValue),n=o7(t.doubleValue);return r===n?oQ(r)===oQ(n):isNaN(r)&&isNaN(n)}return!1}(e,t);case 9:return oj(e.arrayValue.values||[],t.arrayValue.values||[],sl);case 10:case 11:return function(e,t){let r=e.mapValue.fields||{},n=t.mapValue.fields||{};if(oY(r)!==oY(n))return!1;for(let e in r)if(r.hasOwnProperty(e)&&(void 0===n[e]||!sl(r[e],n[e])))return!1;return!0}(e,t);default:return ow()}}function sc(e,t){return void 0!==(e.values||[]).find(e=>sl(e,t))}function su(e,t){if(e===t)return 0;let r=sa(e),n=sa(t);if(r!==n)return oN(r,n);switch(r){case 0:case 9007199254740991:return 0;case 1:return oN(e.booleanValue,t.booleanValue);case 2:return function(e,t){let r=o7(e.integerValue||e.doubleValue),n=o7(t.integerValue||t.doubleValue);return r<n?-1:r>n?1:r===n?0:isNaN(r)?isNaN(n)?0:-1:1}(e,t);case 3:return sh(e.timestampValue,t.timestampValue);case 4:return sh(sn(e),sn(t));case 5:return oN(e.stringValue,t.stringValue);case 6:return function(e,t){let r=se(e),n=se(t);return r.compareTo(n)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let r=e.split("/"),n=t.split("/");for(let e=0;e<r.length&&e<n.length;e++){let t=oN(r[e],n[e]);if(0!==t)return t}return oN(r.length,n.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){let r=oN(o7(e.latitude),o7(t.latitude));return 0!==r?r:oN(o7(e.longitude),o7(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return sd(e.arrayValue,t.arrayValue);case 10:return function(e,t){var r,n,i,o;let s=e.fields||{},a=t.fields||{},l=null===(r=s.value)||void 0===r?void 0:r.arrayValue,c=null===(n=a.value)||void 0===n?void 0:n.arrayValue,u=oN((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i.length)||0,(null===(o=null==c?void 0:c.values)||void 0===o?void 0:o.length)||0);return 0!==u?u:sd(l,c)}(e.mapValue,t.mapValue);case 11:return function(e,t){if(e===ss.mapValue&&t===ss.mapValue)return 0;if(e===ss.mapValue)return 1;if(t===ss.mapValue)return -1;let r=e.fields||{},n=Object.keys(r),i=t.fields||{},o=Object.keys(i);n.sort(),o.sort();for(let e=0;e<n.length&&e<o.length;++e){let t=oN(n[e],o[e]);if(0!==t)return t;let s=su(r[n[e]],i[o[e]]);if(0!==s)return s}return oN(n.length,o.length)}(e.mapValue,t.mapValue);default:throw ow()}}function sh(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return oN(e,t);let r=o8(e),n=o8(t),i=oN(r.seconds,n.seconds);return 0!==i?i:oN(r.nanos,n.nanos)}function sd(e,t){let r=e.values||[],n=t.values||[];for(let e=0;e<r.length&&e<n.length;++e){let t=su(r[e],n[e]);if(t)return t}return oN(r.length,n.length)}function sf(e){var t,r;return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){let t=o8(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?se(e.bytesValue).toBase64():"referenceValue"in e?(t=e.referenceValue,oB.fromName(t).toString()):"geoPointValue"in e?(r=e.geoPointValue,`geo(${r.latitude},${r.longitude})`):"arrayValue"in e?function(e){let t="[",r=!0;for(let n of e.values||[])r?r=!1:t+=",",t+=sf(n);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){let t=Object.keys(e.fields||{}).sort(),r="{",n=!0;for(let i of t)n?n=!1:r+=",",r+=`${i}:${sf(e.fields[i])}`;return r+"}"}(e.mapValue):ow()}function sp(e){return!!e&&"integerValue"in e}function sm(e){return!!e&&"arrayValue"in e}function sg(e){return!!e&&"nullValue"in e}function sy(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function sv(e){return!!e&&"mapValue"in e}function sb(e){var t,r;return"__vector__"===(null===(r=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===r?void 0:r.stringValue)}function sw(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){let t={mapValue:{fields:{}}};return oX(e.mapValue.fields,(e,r)=>t.mapValue.fields[e]=sw(r)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let r=0;r<(e.arrayValue.values||[]).length;++r)t.arrayValue.values[r]=sw(e.arrayValue.values[r]);return t}return Object.assign({},e)}function s_(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class sx{constructor(e){this.value=e}static empty(){return new sx({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r<e.length-1;++r)if(!sv(t=(t.mapValue.fields||{})[e.get(r)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=sw(t)}setAll(e){let t=oU.emptyPath(),r={},n=[];e.forEach((e,i)=>{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,r,n),r={},n=[],t=i.popLast()}e?r[i.lastSegment()]=sw(e):n.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,r,n)}delete(e){let t=this.field(e.popLast());sv(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return sl(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;r<e.length;++r){let n=t.mapValue.fields[e.get(r)];sv(n)&&n.mapValue.fields||(n={mapValue:{fields:{}}},t.mapValue.fields[e.get(r)]=n),t=n}return t.mapValue.fields}applyChanges(e,t,r){for(let n of(oX(t,(t,r)=>e[t]=r),r))delete e[n]}clone(){return new sx(sw(this.value))}}class sk{constructor(e,t,r,n,i,o,s){this.key=e,this.documentType=t,this.version=r,this.readTime=n,this.createTime=i,this.data=o,this.documentState=s}static newInvalidDocument(e){return new sk(e,0,oM.min(),oM.min(),oM.min(),sx.empty(),0)}static newFoundDocument(e,t,r,n){return new sk(e,1,t,oM.min(),r,n,0)}static newNoDocument(e,t){return new sk(e,2,t,oM.min(),oM.min(),sx.empty(),0)}static newUnknownDocument(e,t){return new sk(e,3,t,oM.min(),oM.min(),sx.empty(),2)}convertToFoundDocument(e,t){return this.createTime.isEqual(oM.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=sx.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=sx.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=oM.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof sk&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new sk(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class sS{constructor(e,t){this.position=e,this.inclusive=t}}function sE(e,t,r){let n=0;for(let i=0;i<e.position.length;i++){let o=t[i],s=e.position[i];if(n=o.field.isKeyField()?oB.comparator(oB.fromName(s.referenceValue),r.key):su(s,r.data.field(o.field)),"desc"===o.dir&&(n*=-1),0!==n)break}return n}function sT(e,t){if(null===e)return null===t;if(null===t||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let r=0;r<e.position.length;r++)if(!sl(e.position[r],t.position[r]))return!1;return!0}class sC{constructor(e,t="asc"){this.field=e,this.dir=t}}class sI{}class sP extends sI{constructor(e,t,r){super(),this.field=e,this.op=t,this.value=r}static create(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,r):new sN(e,t,r):"array-contains"===t?new sL(e,r):"in"===t?new sF(e,r):"not-in"===t?new sz(e,r):"array-contains-any"===t?new sU(e,r):new sP(e,t,r)}static createKeyFieldInFilter(e,t,r){return"in"===t?new sj(e,r):new sD(e,r)}matches(e){let t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(su(t,this.value)):null!==t&&sa(this.value)===sa(t)&&this.matchesComparison(su(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return ow()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class sA extends sI{constructor(e,t){super(),this.filters=e,this.op=t,this.ae=null}static create(e,t){return new sA(e,t)}matches(e){return sO(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.ae||(this.ae=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function sO(e){return"and"===e.op}function sR(e){for(let t of e.filters)if(t instanceof sA)return!1;return!0}class sN extends sP{constructor(e,t,r){super(e,t,r),this.key=oB.fromName(r.referenceValue)}matches(e){let t=oB.comparator(e.key,this.key);return this.matchesComparison(t)}}class sj extends sP{constructor(e,t){super(e,"in",t),this.keys=sM("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class sD extends sP{constructor(e,t){super(e,"not-in",t),this.keys=sM("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function sM(e,t){var r;return((null===(r=t.arrayValue)||void 0===r?void 0:r.values)||[]).map(e=>oB.fromName(e.referenceValue))}class sL extends sP{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return sm(t)&&sc(t.arrayValue,this.value)}}class sF extends sP{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&sc(this.value.arrayValue,t)}}class sz extends sP{constructor(e,t){super(e,"not-in",t)}matches(e){if(sc(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!sc(this.value.arrayValue,t)}}class sU extends sP{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!sm(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>sc(this.value.arrayValue,e))}}class sB{constructor(e,t=null,r=[],n=[],i=null,o=null,s=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=n,this.limit=i,this.startAt=o,this.endAt=s,this.ue=null}}function sV(e,t=null,r=[],n=[],i=null,o=null,s=null){return new sB(e,t,r,n,i,o,s)}function sq(e){if(null===e.ue){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:"+e.filters.map(e=>(function e(t){if(t instanceof sP)return t.field.canonicalString()+t.op.toString()+sf(t.value);if(sR(t)&&sO(t))return t.filters.map(t=>e(t)).join(",");{let r=t.filters.map(t=>e(t)).join(",");return`${t.op}(${r})`}})(e)).join(",")+"|ob:"+e.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==e.limit||(t+="|l:"+e.limit),e.startAt&&(t+="|lb:"+(e.startAt.inclusive?"b:":"a:")+e.startAt.position.map(e=>sf(e)).join(",")),e.endAt&&(t+="|ub:"+(e.endAt.inclusive?"a:":"b:")+e.endAt.position.map(e=>sf(e)).join(",")),e.ue=t}return e.ue}function s$(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;i<e.orderBy.length;i++){var r,n;if(r=e.orderBy[i],n=t.orderBy[i],!(r.dir===n.dir&&r.field.isEqual(n.field)))return!1}if(e.filters.length!==t.filters.length)return!1;for(let r=0;r<e.filters.length;r++)if(!function e(t,r){return t instanceof sP?r instanceof sP&&t.op===r.op&&t.field.isEqual(r.field)&&sl(t.value,r.value):t instanceof sA?r instanceof sA&&t.op===r.op&&t.filters.length===r.filters.length&&t.filters.reduce((t,n,i)=>t&&e(n,r.filters[i]),!0):void ow()}(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!sT(e.startAt,t.startAt)&&sT(e.endAt,t.endAt)}function sW(e){return oB.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class sH{constructor(e,t=null,r=[],n=[],i=null,o="F",s=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=n,this.limit=i,this.limitType=o,this.startAt=s,this.endAt=a,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function sG(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function sK(e){if(null===e.ce){let t;e.ce=[];let r=new Set;for(let t of e.explicitOrderBy)e.ce.push(t),r.add(t.field.canonicalString());let n=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(t=new o2(oU.comparator),e.filters.forEach(e=>{e.getFlattenedFilters().forEach(e=>{e.isInequality()&&(t=t.add(e.field))})}),t).forEach(t=>{r.has(t.canonicalString())||t.isKeyField()||e.ce.push(new sC(t,n))}),r.has(oU.keyField().canonicalString())||e.ce.push(new sC(oU.keyField(),n))}return e.ce}function sQ(e){return e.le||(e.le=function(e,t){if("F"===e.limitType)return sV(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map(e=>{let t="desc"===e.dir?"asc":"desc";return new sC(e.field,t)});let r=e.endAt?new sS(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new sS(e.startAt.position,e.startAt.inclusive):null;return sV(e.path,e.collectionGroup,t,e.filters,e.limit,r,n)}}(e,sK(e))),e.le}function sY(e,t,r){return new sH(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,r,e.startAt,e.endAt)}function sX(e,t){return s$(sQ(e),sQ(t))&&e.limitType===t.limitType}function sJ(e){return`${sq(sQ(e))}|lt:${e.limitType}`}function sZ(e){var t;let r;return`Query(target=${r=(t=sQ(e)).path.canonicalString(),null!==t.collectionGroup&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof sP?`${t.field.canonicalString()} ${t.op} ${sf(t.value)}`:t instanceof sA?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(r+=", startAt: "+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>sf(e)).join(",")),t.endAt&&(r+=", endAt: "+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>sf(e)).join(",")),`Target(${r})`}; limitType=${e.limitType})`}function s0(e,t){return t.isFoundDocument()&&function(e,t){let r=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(r):oB.isDocumentKey(e.path)?e.path.isEqual(r):e.path.isImmediateParentOf(r)}(e,t)&&function(e,t){for(let r of sK(e))if(!r.field.isKeyField()&&null===t.data.field(r.field))return!1;return!0}(e,t)&&function(e,t){for(let r of e.filters)if(!r.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,r){let n=sE(e,t,r);return e.inclusive?n<=0:n<0}(e.startAt,sK(e),t))&&(!e.endAt||!!function(e,t,r){let n=sE(e,t,r);return e.inclusive?n>=0:n>0}(e.endAt,sK(e),t))}function s1(e){return(t,r)=>{let n=!1;for(let i of sK(e)){let e=function(e,t,r){let n=e.field.isKeyField()?oB.comparator(t.key,r.key):function(e,t,r){let n=t.data.field(e),i=r.data.field(e);return null!==n&&null!==i?su(n,i):ow()}(e.field,t,r);switch(e.dir){case"asc":return n;case"desc":return -1*n;default:return ow()}}(i,t,r);if(0!==e)return e;n=n||i.field.isKeyField()}return 0}}class s2{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),r=this.inner[t];if(void 0!==r){for(let[t,n]of r)if(this.equalsFn(t,e))return n}}has(e){return void 0!==this.get(e)}set(e,t){let r=this.mapKeyFn(e),n=this.inner[r];if(void 0===n)return this.inner[r]=[[e,t]],void this.innerSize++;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return void(n[r]=[e,t]);n.push([e,t]),this.innerSize++}delete(e){let t=this.mapKeyFn(e),r=this.inner[t];if(void 0===r)return!1;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return 1===r.length?delete this.inner[t]:r.splice(n,1),this.innerSize--,!0;return!1}forEach(e){oX(this.inner,(t,r)=>{for(let[t,n]of r)e(t,n)})}isEmpty(){return oJ(this.inner)}size(){return this.innerSize}}let s4=new oZ(oB.comparator),s5=new oZ(oB.comparator);function s6(...e){let t=s5;for(let r of e)t=t.insert(r.key,r);return t}function s3(e){let t=s5;return e.forEach((e,r)=>t=t.insert(e,r.overlayedDocument)),t}function s9(){return new s2(e=>e.toString(),(e,t)=>e.isEqual(t))}let s8=new oZ(oB.comparator),s7=new o2(oB.comparator);function ae(...e){let t=s7;for(let r of e)t=t.add(r);return t}let at=new o2(oN);function ar(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:oQ(t)?"-0":t}}function an(e){return{integerValue:""+e}}class ai{constructor(){this._=void 0}}function ao(e,t){return e instanceof ah?sp(t)||t&&"doubleValue"in t?t:{integerValue:0}:null}class as extends ai{}class aa extends ai{constructor(e){super(),this.elements=e}}function al(e,t){let r=af(t);for(let t of e.elements)r.some(e=>sl(e,t))||r.push(t);return{arrayValue:{values:r}}}class ac extends ai{constructor(e){super(),this.elements=e}}function au(e,t){let r=af(t);for(let t of e.elements)r=r.filter(e=>!sl(e,t));return{arrayValue:{values:r}}}class ah extends ai{constructor(e,t){super(),this.serializer=e,this.Pe=t}}function ad(e){return o7(e.integerValue||e.doubleValue)}function af(e){return sm(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class ap{constructor(e,t){this.version=e,this.transformResults=t}}class am{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new am}static exists(e){return new am(void 0,e)}static updateTime(e){return new am(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function ag(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class ay{}function av(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new aT(e.key,am.none()):new a_(e.key,e.data,am.none());{let r=e.data,n=sx.empty(),i=new o2(oU.comparator);for(let e of t.fields)if(!i.has(e)){let t=r.field(e);null===t&&e.length>1&&(e=e.popLast(),t=r.field(e)),null===t?n.delete(e):n.set(e,t),i=i.add(e)}return new ax(e.key,n,new o5(i.toArray()),am.none())}}function ab(e,t,r,n){return e instanceof a_?function(e,t,r,n){if(!ag(e.precondition,t))return r;let i=e.value.clone(),o=aE(e.fieldTransforms,n,t);return i.setAll(o),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,r,n):e instanceof ax?function(e,t,r,n){if(!ag(e.precondition,t))return r;let i=aE(e.fieldTransforms,n,t),o=t.data;return(o.setAll(ak(e)),o.setAll(i),t.convertToFoundDocument(t.version,o).setHasLocalMutations(),null===r)?null:r.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,r,n):ag(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):r}function aw(e,t){var r,n;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(r=e.fieldTransforms,n=t.fieldTransforms,!!(void 0===r&&void 0===n||!(!r||!n)&&oj(r,n,(e,t)=>{var r,n;return e.field.isEqual(t.field)&&(r=e.transform,n=t.transform,r instanceof aa&&n instanceof aa||r instanceof ac&&n instanceof ac?oj(r.elements,n.elements,sl):r instanceof ah&&n instanceof ah?sl(r.Pe,n.Pe):r instanceof as&&n instanceof as)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class a_ extends ay{constructor(e,t,r,n=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=n,this.type=0}getFieldMask(){return null}}class ax extends ay{constructor(e,t,r,n,i=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=n,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function ak(e){let t=new Map;return e.fieldMask.fields.forEach(r=>{if(!r.isEmpty()){let n=e.data.field(r);t.set(r,n)}}),t}function aS(e,t,r){var n;let i=new Map;e.length===r.length||ow();for(let o=0;o<r.length;o++){let s=e[o],a=s.transform,l=t.data.field(s.field);i.set(s.field,(n=r[o],a instanceof aa?al(a,l):a instanceof ac?au(a,l):n))}return i}function aE(e,t,r){let n=new Map;for(let i of e){let e=i.transform,o=r.data.field(i.field);n.set(i.field,e instanceof as?function(e,t){let r={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&st(t)&&(t=sr(t)),t&&(r.fields.__previous_value__=t),{mapValue:r}}(t,o):e instanceof aa?al(e,o):e instanceof ac?au(e,o):function(e,t){let r=ao(e,t),n=ad(r)+ad(e.Pe);return sp(r)&&sp(e.Pe)?an(n):ar(e.serializer,n)}(e,o))}return n}class aT extends ay{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class aC extends ay{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class aI{constructor(e,t,r,n){this.batchId=e,this.localWriteTime=t,this.baseMutations=r,this.mutations=n}applyToRemoteDocument(e,t){let r=t.mutationResults;for(let t=0;t<this.mutations.length;t++){let i=this.mutations[t];if(i.key.isEqual(e.key)){var n;n=r[t],i instanceof a_?function(e,t,r){let n=e.value.clone(),i=aS(e.fieldTransforms,t,r.transformResults);n.setAll(i),t.convertToFoundDocument(r.version,n).setHasCommittedMutations()}(i,e,n):i instanceof ax?function(e,t,r){if(!ag(e.precondition,t))return void t.convertToUnknownDocument(r.version);let n=aS(e.fieldTransforms,t,r.transformResults),i=t.data;i.setAll(ak(e)),i.setAll(n),t.convertToFoundDocument(r.version,i).setHasCommittedMutations()}(i,e,n):function(e,t,r){t.convertToNoDocument(r.version).setHasCommittedMutations()}(0,e,n)}}}applyToLocalView(e,t){for(let r of this.baseMutations)r.key.isEqual(e.key)&&(t=ab(r,e,t,this.localWriteTime));for(let r of this.mutations)r.key.isEqual(e.key)&&(t=ab(r,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){let r=s9();return this.mutations.forEach(n=>{let i=e.get(n.key),o=i.overlayedDocument,s=this.applyToLocalView(o,i.mutatedFields),a=av(o,s=t.has(n.key)?null:s);null!==a&&r.set(n.key,a),o.isValidDocument()||o.convertToNoDocument(oM.min())}),r}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),ae())}isEqual(e){return this.batchId===e.batchId&&oj(this.mutations,e.mutations,(e,t)=>aw(e,t))&&oj(this.baseMutations,e.baseMutations,(e,t)=>aw(e,t))}}class aP{constructor(e,t,r,n){this.batch=e,this.commitVersion=t,this.mutationResults=r,this.docVersions=n}static from(e,t,r){e.mutations.length===r.length||ow();let n=s8,i=e.mutations;for(let e=0;e<i.length;e++)n=n.insert(i[e].key,r[e].version);return new aP(e,t,r,n)}}class aA{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{
      largestBatchId: ${this.largestBatchId},
      mutation: ${this.mutation.toString()}
    }`}}class aO{constructor(e,t){this.count=e,this.unchangedNames=t}}function aR(e){if(void 0===e)return oy("GRPC error has no .code"),o_.UNKNOWN;switch(e){case V.OK:return o_.OK;case V.CANCELLED:return o_.CANCELLED;case V.UNKNOWN:return o_.UNKNOWN;case V.DEADLINE_EXCEEDED:return o_.DEADLINE_EXCEEDED;case V.RESOURCE_EXHAUSTED:return o_.RESOURCE_EXHAUSTED;case V.INTERNAL:return o_.INTERNAL;case V.UNAVAILABLE:return o_.UNAVAILABLE;case V.UNAUTHENTICATED:return o_.UNAUTHENTICATED;case V.INVALID_ARGUMENT:return o_.INVALID_ARGUMENT;case V.NOT_FOUND:return o_.NOT_FOUND;case V.ALREADY_EXISTS:return o_.ALREADY_EXISTS;case V.PERMISSION_DENIED:return o_.PERMISSION_DENIED;case V.FAILED_PRECONDITION:return o_.FAILED_PRECONDITION;case V.ABORTED:return o_.ABORTED;case V.OUT_OF_RANGE:return o_.OUT_OF_RANGE;case V.UNIMPLEMENTED:return o_.UNIMPLEMENTED;case V.DATA_LOSS:return o_.DATA_LOSS;default:return ow()}}(q=V||(V={}))[q.OK=0]="OK",q[q.CANCELLED=1]="CANCELLED",q[q.UNKNOWN=2]="UNKNOWN",q[q.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",q[q.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",q[q.NOT_FOUND=5]="NOT_FOUND",q[q.ALREADY_EXISTS=6]="ALREADY_EXISTS",q[q.PERMISSION_DENIED=7]="PERMISSION_DENIED",q[q.UNAUTHENTICATED=16]="UNAUTHENTICATED",q[q.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",q[q.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",q[q.ABORTED=10]="ABORTED",q[q.OUT_OF_RANGE=11]="OUT_OF_RANGE",q[q.UNIMPLEMENTED=12]="UNIMPLEMENTED",q[q.INTERNAL=13]="INTERNAL",q[q.UNAVAILABLE=14]="UNAVAILABLE",q[q.DATA_LOSS=15]="DATA_LOSS";let aN=new R([4294967295,4294967295],0);function aj(e){let t=(new TextEncoder).encode(e),r=new N;return r.update(t),new Uint8Array(r.digest())}function aD(e){let t=new DataView(e.buffer),r=t.getUint32(0,!0),n=t.getUint32(4,!0),i=t.getUint32(8,!0),o=t.getUint32(12,!0);return[new R([r,n],0),new R([i,o],0)]}class aM{constructor(e,t,r){if(this.bitmap=e,this.padding=t,this.hashCount=r,t<0||t>=8)throw new aL(`Invalid padding: ${t}`);if(r<0||e.length>0&&0===this.hashCount)throw new aL(`Invalid hash count: ${r}`);if(0===e.length&&0!==t)throw new aL(`Invalid padding when bitmap length is 0: ${t}`);this.Ie=8*e.length-t,this.Te=R.fromNumber(this.Ie)}Ee(e,t,r){let n=e.add(t.multiply(R.fromNumber(r)));return 1===n.compare(aN)&&(n=new R([n.getBits(0),n.getBits(1)],0)),n.modulo(this.Te).toNumber()}de(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(0===this.Ie)return!1;let[t,r]=aD(aj(e));for(let e=0;e<this.hashCount;e++){let n=this.Ee(t,r,e);if(!this.de(n))return!1}return!0}static create(e,t,r){let n=new aM(new Uint8Array(Math.ceil(e/8)),e%8==0?0:8-e%8,t);return r.forEach(e=>n.insert(e)),n}insert(e){if(0===this.Ie)return;let[t,r]=aD(aj(e));for(let e=0;e<this.hashCount;e++){let n=this.Ee(t,r,e);this.Ae(n)}}Ae(e){this.bitmap[Math.floor(e/8)]|=1<<e%8}}class aL extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class aF{constructor(e,t,r,n,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=r,this.documentUpdates=n,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,r){let n=new Map;return n.set(e,az.createSynthesizedTargetChangeForCurrentChange(e,t,r)),new aF(oM.min(),n,new oZ(oN),s4,ae())}}class az{constructor(e,t,r,n,i){this.resumeToken=e,this.current=t,this.addedDocuments=r,this.modifiedDocuments=n,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,r){return new az(r,t,ae(),ae(),ae())}}class aU{constructor(e,t,r,n){this.Re=e,this.removedTargetIds=t,this.key=r,this.Ve=n}}class aB{constructor(e,t){this.targetId=e,this.me=t}}class aV{constructor(e,t,r=o3.EMPTY_BYTE_STRING,n=null){this.state=e,this.targetIds=t,this.resumeToken=r,this.cause=n}}class aq{constructor(){this.fe=0,this.ge=aH(),this.pe=o3.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return 0!==this.fe}get be(){return this.we}De(e){e.approximateByteSize()>0&&(this.we=!0,this.pe=e)}ve(){let e=ae(),t=ae(),r=ae();return this.ge.forEach((n,i)=>{switch(i){case 0:e=e.add(n);break;case 2:t=t.add(n);break;case 1:r=r.add(n);break;default:ow()}}),new az(this.pe,this.ye,e,t,r)}Ce(){this.we=!1,this.ge=aH()}Fe(e,t){this.we=!0,this.ge=this.ge.insert(e,t)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,this.fe>=0||ow()}Ne(){this.we=!0,this.ye=!0}}class a${constructor(e){this.Le=e,this.Be=new Map,this.ke=s4,this.qe=aW(),this.Qe=new oZ(oN)}Ke(e){for(let t of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(t,e.Ve):this.Ue(t,e.key,e.Ve);for(let t of e.removedTargetIds)this.Ue(t,e.key,e.Ve)}We(e){this.forEachTarget(e,t=>{let r=this.Ge(t);switch(e.state){case 0:this.ze(t)&&r.De(e.resumeToken);break;case 1:r.Oe(),r.Se||r.Ce(),r.De(e.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(t);break;case 3:this.ze(t)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.ze(t)&&(this.je(t),r.De(e.resumeToken));break;default:ow()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Be.forEach((e,r)=>{this.ze(r)&&t(r)})}He(e){let t=e.targetId,r=e.me.count,n=this.Je(t);if(n){let i=n.target;if(sW(i)){if(0===r){let e=new oB(i.path);this.Ue(t,e,sk.newNoDocument(e,oM.min()))}else 1===r||ow()}else{let n=this.Ye(t);if(n!==r){let r=this.Ze(e),i=r?this.Xe(r,e,n):1;0!==i&&(this.je(t),this.Qe=this.Qe.insert(t,2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Ze(e){let t,r;let n=e.me.unchangedNames;if(!n||!n.bits)return null;let{bits:{bitmap:i="",padding:o=0},hashCount:s=0}=n;try{t=se(i).toUint8Array()}catch(e){if(e instanceof o6)return ov("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{r=new aM(t,o,s)}catch(e){return ov(e instanceof aL?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===r.Ie?null:r}Xe(e,t,r){return t.me.count===r-this.nt(e,t.targetId)?0:2}nt(e,t){let r=this.Le.getRemoteKeysForTarget(t),n=0;return r.forEach(r=>{let i=this.Le.tt(),o=`projects/${i.projectId}/databases/${i.database}/documents/${r.path.canonicalString()}`;e.mightContain(o)||(this.Ue(t,r,null),n++)}),n}rt(e){let t=new Map;this.Be.forEach((r,n)=>{let i=this.Je(n);if(i){if(r.current&&sW(i.target)){let t=new oB(i.target.path);null!==this.ke.get(t)||this.it(n,t)||this.Ue(n,t,sk.newNoDocument(t,e))}r.be&&(t.set(n,r.ve()),r.Ce())}});let r=ae();this.qe.forEach((e,t)=>{let n=!0;t.forEachWhile(e=>{let t=this.Je(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(n=!1,!1)}),n&&(r=r.add(e))}),this.ke.forEach((t,r)=>r.setReadTime(e));let n=new aF(e,t,this.Qe,this.ke,r);return this.ke=s4,this.qe=aW(),this.Qe=new oZ(oN),n}$e(e,t){if(!this.ze(e))return;let r=this.it(e,t.key)?2:0;this.Ge(e).Fe(t.key,r),this.ke=this.ke.insert(t.key,t),this.qe=this.qe.insert(t.key,this.st(t.key).add(e))}Ue(e,t,r){if(!this.ze(e))return;let n=this.Ge(e);this.it(e,t)?n.Fe(t,1):n.Me(t),this.qe=this.qe.insert(t,this.st(t).delete(e)),r&&(this.ke=this.ke.insert(t,r))}removeTarget(e){this.Be.delete(e)}Ye(e){let t=this.Ge(e).ve();return this.Le.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let t=this.Be.get(e);return t||(t=new aq,this.Be.set(e,t)),t}st(e){let t=this.qe.get(e);return t||(t=new o2(oN),this.qe=this.qe.insert(e,t)),t}ze(e){let t=null!==this.Je(e);return t||og("WatchChangeAggregator","Detected inactive target",e),t}Je(e){let t=this.Be.get(e);return t&&t.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new aq),this.Le.getRemoteKeysForTarget(e).forEach(t=>{this.Ue(e,t,null)})}it(e,t){return this.Le.getRemoteKeysForTarget(e).has(t)}}function aW(){return new oZ(oB.comparator)}function aH(){return new oZ(oB.comparator)}let aG={asc:"ASCENDING",desc:"DESCENDING"},aK={"<":"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"},aQ={and:"AND",or:"OR"};class aY{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function aX(e,t){return e.useProto3Json||null==t?t:{value:t}}function aJ(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function aZ(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function a0(e){return e||ow(),oM.fromTimestamp(function(e){let t=o8(e);return new oD(t.seconds,t.nanos)}(e))}function a1(e,t){return a2(e,t).canonicalString()}function a2(e,t){let r=new oF(["projects",e.projectId,"databases",e.database]).child("documents");return void 0===t?r:r.child(t)}function a4(e){let t=oF.fromString(e);return lr(t)||ow(),t}function a5(e,t){return a1(e.databaseId,t.path)}function a6(e,t){let r=a4(t);if(r.get(1)!==e.databaseId.projectId)throw new ox(o_.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+r.get(1)+" vs "+e.databaseId.projectId);if(r.get(3)!==e.databaseId.database)throw new ox(o_.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+r.get(3)+" vs "+e.databaseId.database);return new oB(a8(r))}function a3(e,t){return a1(e.databaseId,t)}function a9(e){return new oF(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function a8(e){return e.length>4&&"documents"===e.get(4)||ow(),e.popFirst(5)}function a7(e,t,r){return{name:a5(e,t),fields:r.value.mapValue.fields}}function le(e){return{fieldPath:e.canonicalString()}}function lt(e){return oU.fromServerFormat(e.fieldPath)}function lr(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class ln{constructor(e,t,r,n,i=oM.min(),o=oM.min(),s=o3.EMPTY_BYTE_STRING,a=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=n,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=s,this.expectedCount=a}withSequenceNumber(e){return new ln(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new ln(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new ln(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new ln(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class li{constructor(e){this.ct=e}}class lo{constructor(){}It(e,t){this.Tt(e,t),t.Et()}Tt(e,t){if("nullValue"in e)this.dt(t,5);else if("booleanValue"in e)this.dt(t,10),t.At(e.booleanValue?1:0);else if("integerValue"in e)this.dt(t,15),t.At(o7(e.integerValue));else if("doubleValue"in e){let r=o7(e.doubleValue);isNaN(r)?this.dt(t,13):(this.dt(t,15),oQ(r)?t.At(0):t.At(r))}else if("timestampValue"in e){let r=e.timestampValue;this.dt(t,20),"string"==typeof r&&(r=o8(r)),t.Rt(`${r.seconds||""}`),t.At(r.nanos||0)}else if("stringValue"in e)this.Vt(e.stringValue,t),this.ft(t);else if("bytesValue"in e)this.dt(t,30),t.gt(se(e.bytesValue)),this.ft(t);else if("referenceValue"in e)this.yt(e.referenceValue,t);else if("geoPointValue"in e){let r=e.geoPointValue;this.dt(t,45),t.At(r.latitude||0),t.At(r.longitude||0)}else"mapValue"in e?s_(e)?this.dt(t,Number.MAX_SAFE_INTEGER):sb(e)?this.wt(e.mapValue,t):(this.St(e.mapValue,t),this.ft(t)):"arrayValue"in e?(this.bt(e.arrayValue,t),this.ft(t)):ow()}Vt(e,t){this.dt(t,25),this.Dt(e,t)}Dt(e,t){t.Rt(e)}St(e,t){let r=e.fields||{};for(let e of(this.dt(t,55),Object.keys(r)))this.Vt(e,t),this.Tt(r[e],t)}wt(e,t){var r,n;let i=e.fields||{};this.dt(t,53);let o="value",s=(null===(n=null===(r=i[o].arrayValue)||void 0===r?void 0:r.values)||void 0===n?void 0:n.length)||0;this.dt(t,15),t.At(o7(s)),this.Vt(o,t),this.Tt(i[o],t)}bt(e,t){let r=e.values||[];for(let e of(this.dt(t,50),r))this.Tt(e,t)}yt(e,t){this.dt(t,37),oB.fromName(e).path.forEach(e=>{this.dt(t,60),this.Dt(e,t)})}dt(e,t){e.At(t)}ft(e){e.At(2)}}lo.vt=new lo;class ls{constructor(){this.un=new la}addToCollectionParentIndex(e,t){return this.un.add(t),oH.resolve()}getCollectionParents(e,t){return oH.resolve(this.un.getEntries(t))}addFieldIndex(e,t){return oH.resolve()}deleteFieldIndex(e,t){return oH.resolve()}deleteAllFieldIndexes(e){return oH.resolve()}createTargetIndexes(e,t){return oH.resolve()}getDocumentsMatchingTarget(e,t){return oH.resolve(null)}getIndexType(e,t){return oH.resolve(0)}getFieldIndexes(e,t){return oH.resolve([])}getNextCollectionGroupToUpdate(e){return oH.resolve(null)}getMinOffset(e,t){return oH.resolve(oq.min())}getMinOffsetFromCollectionGroup(e,t){return oH.resolve(oq.min())}updateCollectionGroup(e,t,r){return oH.resolve()}updateIndexEntries(e,t){return oH.resolve()}}class la{constructor(){this.index={}}add(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t]||new o2(oF.comparator),i=!n.has(r);return this.index[t]=n.add(r),i}has(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t];return n&&n.has(r)}getEntries(e){return(this.index[e]||new o2(oF.comparator)).toArray()}}new Uint8Array(0);class ll{constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}static withCacheSize(e){return new ll(e,ll.DEFAULT_COLLECTION_PERCENTILE,ll.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}ll.DEFAULT_COLLECTION_PERCENTILE=10,ll.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ll.DEFAULT=new ll(41943040,ll.DEFAULT_COLLECTION_PERCENTILE,ll.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ll.DISABLED=new ll(-1,0,0);class lc{constructor(e){this.Ln=e}next(){return this.Ln+=2,this.Ln}static Bn(){return new lc(0)}static kn(){return new lc(-1)}}class lu{constructor(){this.changes=new s2(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,sk.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let r=this.changes.get(t);return void 0!==r?oH.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class lh{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class ld{constructor(e,t,r,n){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=n}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next(n=>(r=n,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==r&&ab(r.mutation,e,o5.empty(),oD.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,ae()).next(()=>t))}getLocalViewOfDocuments(e,t,r=ae()){let n=s9();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,r).next(e=>{let t=s6();return e.forEach((e,r)=>{t=t.insert(e,r.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let r=s9();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,ae()))}populateOverlays(e,t,r){let n=[];return r.forEach(e=>{t.has(e)||n.push(e)}),this.documentOverlayCache.getOverlays(e,n).next(e=>{e.forEach((e,r)=>{t.set(e,r)})})}computeViews(e,t,r,n){let i=s4,o=s9(),s=s9();return t.forEach((e,t)=>{let s=r.get(t.key);n.has(t.key)&&(void 0===s||s.mutation instanceof ax)?i=i.insert(t.key,t):void 0!==s?(o.set(t.key,s.mutation.getFieldMask()),ab(s.mutation,t,s.mutation.getFieldMask(),oD.now())):o.set(t.key,o5.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>o.set(e,t)),t.forEach((e,t)=>{var r;return s.set(e,new lh(t,null!==(r=o.get(e))&&void 0!==r?r:null))}),s))}recalculateAndSaveOverlays(e,t){let r=s9(),n=new oZ((e,t)=>e-t),i=ae();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let o=t.get(e);if(null===o)return;let s=r.get(e)||o5.empty();s=i.applyToLocalView(o,s),r.set(e,s);let a=(n.get(i.batchId)||ae()).add(e);n=n.insert(i.batchId,a)})}).next(()=>{let o=[],s=n.getReverseIterator();for(;s.hasNext();){let n=s.getNext(),a=n.key,l=n.value,c=s9();l.forEach(e=>{if(!i.has(e)){let n=av(t.get(e),r.get(e));null!==n&&c.set(e,n),i=i.add(e)}}),o.push(this.documentOverlayCache.saveOverlays(e,a,c))}return oH.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,r,n){return oB.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):null!==t.collectionGroup?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,n):this.getDocumentsMatchingCollectionQuery(e,t,r,n)}getNextDocuments(e,t,r,n){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,n).next(i=>{let o=n-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,n-i.size):oH.resolve(s9()),s=-1,a=i;return o.next(t=>oH.forEach(t,(t,r)=>(s<r.largestBatchId&&(s=r.largestBatchId),i.get(t)?oH.resolve():this.remoteDocumentCache.getEntry(e,t).next(e=>{a=a.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,a,t,ae())).next(e=>({batchId:s,changes:s3(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new oB(t)).next(e=>{let t=s6();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,r,n){let i=t.collectionGroup,o=s6();return this.indexManager.getCollectionParents(e,i).next(s=>oH.forEach(s,s=>{let a=new sH(s.child(i),null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt);return this.getDocumentsMatchingCollectionQuery(e,a,r,n).next(e=>{e.forEach((e,t)=>{o=o.insert(e,t)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,t,r,n){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next(o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,i,n))).next(e=>{i.forEach((t,r)=>{let n=r.getKey();null===e.get(n)&&(e=e.insert(n,sk.newInvalidDocument(n)))});let r=s6();return e.forEach((e,n)=>{let o=i.get(e);void 0!==o&&ab(o.mutation,n,o5.empty(),oD.now()),s0(t,n)&&(r=r.insert(e,n))}),r})}}class lf{constructor(e){this.serializer=e,this.hr=new Map,this.Pr=new Map}getBundleMetadata(e,t){return oH.resolve(this.hr.get(t))}saveBundleMetadata(e,t){return this.hr.set(t.id,{id:t.id,version:t.version,createTime:a0(t.createTime)}),oH.resolve()}getNamedQuery(e,t){return oH.resolve(this.Pr.get(t))}saveNamedQuery(e,t){return this.Pr.set(t.name,{name:t.name,query:function(e){let t=function(e){var t;let r,n=function(e){let t=a4(e);return 4===t.length?oF.emptyPath():a8(t)}(e.parent),i=e.structuredQuery,o=i.from?i.from.length:0,s=null;if(o>0){1===o||ow();let e=i.from[0];e.allDescendants?s=e.collectionId:n=n.child(e.collectionId)}let a=[];i.where&&(a=function(e){var t;let r=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=lt(e.unaryFilter.field);return sP.create(t,"==",{doubleValue:NaN});case"IS_NULL":let r=lt(e.unaryFilter.field);return sP.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let n=lt(e.unaryFilter.field);return sP.create(n,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=lt(e.unaryFilter.field);return sP.create(i,"!=",{nullValue:"NULL_VALUE"});default:return ow()}}(t):void 0!==t.fieldFilter?sP.create(lt(t.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return ow()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?sA.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return ow()}}(t.compositeFilter.op)):ow()}(e);return r instanceof sA&&sR(t=r)&&sO(t)?r.getFilters():[r]}(i.where));let l=[];i.orderBy&&(l=i.orderBy.map(e=>new sC(lt(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let c=null;i.limit&&(c=null==(r="object"==typeof(t=i.limit)?t.value:t)?null:r);let u=null;i.startAt&&(u=function(e){let t=!!e.before;return new sS(e.values||[],t)}(i.startAt));let h=null;return i.endAt&&(h=function(e){let t=!e.before;return new sS(e.values||[],t)}(i.endAt)),new sH(n,s,l,a,c,"F",u,h)}({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?sY(t,t.limit,"L"):t}(t.bundledQuery),readTime:a0(t.readTime)}),oH.resolve()}}class lp{constructor(){this.overlays=new oZ(oB.comparator),this.Ir=new Map}getOverlay(e,t){return oH.resolve(this.overlays.get(t))}getOverlays(e,t){let r=s9();return oH.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&r.set(t,e)})).next(()=>r)}saveOverlays(e,t,r){return r.forEach((r,n)=>{this.ht(e,t,n)}),oH.resolve()}removeOverlaysForBatchId(e,t,r){let n=this.Ir.get(r);return void 0!==n&&(n.forEach(e=>this.overlays=this.overlays.remove(e)),this.Ir.delete(r)),oH.resolve()}getOverlaysForCollection(e,t,r){let n=s9(),i=t.length+1,o=new oB(t.child("")),s=this.overlays.getIteratorFrom(o);for(;s.hasNext();){let e=s.getNext().value,o=e.getKey();if(!t.isPrefixOf(o.path))break;o.path.length===i&&e.largestBatchId>r&&n.set(e.getKey(),e)}return oH.resolve(n)}getOverlaysForCollectionGroup(e,t,r,n){let i=new oZ((e,t)=>e-t),o=this.overlays.getIterator();for(;o.hasNext();){let e=o.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>r){let t=i.get(e.largestBatchId);null===t&&(t=s9(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let s=s9(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach((e,t)=>s.set(e,t)),!(s.size()>=n)););return oH.resolve(s)}ht(e,t,r){let n=this.overlays.get(r.key);if(null!==n){let e=this.Ir.get(n.largestBatchId).delete(r.key);this.Ir.set(n.largestBatchId,e)}this.overlays=this.overlays.insert(r.key,new aA(t,r));let i=this.Ir.get(t);void 0===i&&(i=ae(),this.Ir.set(t,i)),this.Ir.set(t,i.add(r.key))}}class lm{constructor(){this.sessionToken=o3.EMPTY_BYTE_STRING}getSessionToken(e){return oH.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,oH.resolve()}}class lg{constructor(){this.Tr=new o2(ly.Er),this.dr=new o2(ly.Ar)}isEmpty(){return this.Tr.isEmpty()}addReference(e,t){let r=new ly(e,t);this.Tr=this.Tr.add(r),this.dr=this.dr.add(r)}Rr(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.Vr(new ly(e,t))}mr(e,t){e.forEach(e=>this.removeReference(e,t))}gr(e){let t=new oB(new oF([])),r=new ly(t,e),n=new ly(t,e+1),i=[];return this.dr.forEachInRange([r,n],e=>{this.Vr(e),i.push(e.key)}),i}pr(){this.Tr.forEach(e=>this.Vr(e))}Vr(e){this.Tr=this.Tr.delete(e),this.dr=this.dr.delete(e)}yr(e){let t=new oB(new oF([])),r=new ly(t,e),n=new ly(t,e+1),i=ae();return this.dr.forEachInRange([r,n],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new ly(e,0),r=this.Tr.firstAfterOrEqual(t);return null!==r&&e.isEqual(r.key)}}class ly{constructor(e,t){this.key=e,this.wr=t}static Er(e,t){return oB.comparator(e.key,t.key)||oN(e.wr,t.wr)}static Ar(e,t){return oN(e.wr,t.wr)||oB.comparator(e.key,t.key)}}class lv{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.Sr=1,this.br=new o2(ly.Er)}checkEmpty(e){return oH.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,r,n){let i=this.Sr;this.Sr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let o=new aI(i,t,r,n);for(let t of(this.mutationQueue.push(o),n))this.br=this.br.add(new ly(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return oH.resolve(o)}lookupMutationBatch(e,t){return oH.resolve(this.Dr(t))}getNextMutationBatchAfterBatchId(e,t){let r=this.vr(t+1),n=r<0?0:r;return oH.resolve(this.mutationQueue.length>n?this.mutationQueue[n]:null)}getHighestUnacknowledgedBatchId(){return oH.resolve(0===this.mutationQueue.length?-1:this.Sr-1)}getAllMutationBatches(e){return oH.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let r=new ly(t,0),n=new ly(t,Number.POSITIVE_INFINITY),i=[];return this.br.forEachInRange([r,n],e=>{let t=this.Dr(e.wr);i.push(t)}),oH.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new o2(oN);return t.forEach(e=>{let t=new ly(e,0),n=new ly(e,Number.POSITIVE_INFINITY);this.br.forEachInRange([t,n],e=>{r=r.add(e.wr)})}),oH.resolve(this.Cr(r))}getAllMutationBatchesAffectingQuery(e,t){let r=t.path,n=r.length+1,i=r;oB.isDocumentKey(i)||(i=i.child(""));let o=new ly(new oB(i),0),s=new o2(oN);return this.br.forEachWhile(e=>{let t=e.key.path;return!!r.isPrefixOf(t)&&(t.length===n&&(s=s.add(e.wr)),!0)},o),oH.resolve(this.Cr(s))}Cr(e){let t=[];return e.forEach(e=>{let r=this.Dr(e);null!==r&&t.push(r)}),t}removeMutationBatch(e,t){0===this.Fr(t.batchId,"removed")||ow(),this.mutationQueue.shift();let r=this.br;return oH.forEach(t.mutations,n=>{let i=new ly(n.key,t.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,n.key)}).next(()=>{this.br=r})}On(e){}containsKey(e,t){let r=new ly(t,0),n=this.br.firstAfterOrEqual(r);return oH.resolve(t.isEqual(n&&n.key))}performConsistencyCheck(e){return this.mutationQueue.length,oH.resolve()}Fr(e,t){return this.vr(e)}vr(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Dr(e){let t=this.vr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class lb{constructor(e){this.Mr=e,this.docs=new oZ(oB.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let r=t.key,n=this.docs.get(r),i=n?n.size:0,o=this.Mr(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:o}),this.size+=o-i,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let r=this.docs.get(t);return oH.resolve(r?r.document.mutableCopy():sk.newInvalidDocument(t))}getEntries(e,t){let r=s4;return t.forEach(e=>{let t=this.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():sk.newInvalidDocument(e))}),oH.resolve(r)}getDocumentsMatchingQuery(e,t,r,n){let i=s4,o=t.path,s=new oB(o.child("")),a=this.docs.getIteratorFrom(s);for(;a.hasNext();){let{key:e,value:{document:s}}=a.getNext();if(!o.isPrefixOf(e.path))break;e.path.length>o.length+1||0>=function(e,t){let r=e.readTime.compareTo(t.readTime);return 0!==r?r:0!==(r=oB.comparator(e.documentKey,t.documentKey))?r:oN(e.largestBatchId,t.largestBatchId)}(new oq(s.readTime,s.key,-1),r)||(n.has(s.key)||s0(t,s))&&(i=i.insert(s.key,s.mutableCopy()))}return oH.resolve(i)}getAllFromCollectionGroup(e,t,r,n){ow()}Or(e,t){return oH.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new lw(this)}getSize(e){return oH.resolve(this.size)}}class lw extends lu{constructor(e){super(),this.cr=e}applyChanges(e){let t=[];return this.changes.forEach((r,n)=>{n.isValidDocument()?t.push(this.cr.addEntry(e,n)):this.cr.removeEntry(r)}),oH.waitFor(t)}getFromCache(e,t){return this.cr.getEntry(e,t)}getAllFromCache(e,t){return this.cr.getEntries(e,t)}}class l_{constructor(e){this.persistence=e,this.Nr=new s2(e=>sq(e),s$),this.lastRemoteSnapshotVersion=oM.min(),this.highestTargetId=0,this.Lr=0,this.Br=new lg,this.targetCount=0,this.kr=lc.Bn()}forEachTarget(e,t){return this.Nr.forEach((e,r)=>t(r)),oH.resolve()}getLastRemoteSnapshotVersion(e){return oH.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return oH.resolve(this.Lr)}allocateTargetId(e){return this.highestTargetId=this.kr.next(),oH.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.Lr&&(this.Lr=t),oH.resolve()}Kn(e){this.Nr.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.kr=new lc(t),this.highestTargetId=t),e.sequenceNumber>this.Lr&&(this.Lr=e.sequenceNumber)}addTargetData(e,t){return this.Kn(t),this.targetCount+=1,oH.resolve()}updateTargetData(e,t){return this.Kn(t),oH.resolve()}removeTargetData(e,t){return this.Nr.delete(t.target),this.Br.gr(t.targetId),this.targetCount-=1,oH.resolve()}removeTargets(e,t,r){let n=0,i=[];return this.Nr.forEach((o,s)=>{s.sequenceNumber<=t&&null===r.get(s.targetId)&&(this.Nr.delete(o),i.push(this.removeMatchingKeysForTargetId(e,s.targetId)),n++)}),oH.waitFor(i).next(()=>n)}getTargetCount(e){return oH.resolve(this.targetCount)}getTargetData(e,t){let r=this.Nr.get(t)||null;return oH.resolve(r)}addMatchingKeys(e,t,r){return this.Br.Rr(t,r),oH.resolve()}removeMatchingKeys(e,t,r){this.Br.mr(t,r);let n=this.persistence.referenceDelegate,i=[];return n&&t.forEach(t=>{i.push(n.markPotentiallyOrphaned(e,t))}),oH.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Br.gr(t),oH.resolve()}getMatchingKeysForTargetId(e,t){let r=this.Br.yr(t);return oH.resolve(r)}containsKey(e,t){return oH.resolve(this.Br.containsKey(t))}}class lx{constructor(e,t){this.qr={},this.overlays={},this.Qr=new oK(0),this.Kr=!1,this.Kr=!0,this.$r=new lm,this.referenceDelegate=e(this),this.Ur=new l_(this),this.indexManager=new ls,this.remoteDocumentCache=new lb(e=>this.referenceDelegate.Wr(e)),this.serializer=new li(t),this.Gr=new lf(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Kr=!1,Promise.resolve()}get started(){return this.Kr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new lp,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this.qr[e.toKey()];return r||(r=new lv(t,this.referenceDelegate),this.qr[e.toKey()]=r),r}getGlobalsCache(){return this.$r}getTargetCache(){return this.Ur}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Gr}runTransaction(e,t,r){og("MemoryPersistence","Starting transaction:",e);let n=new lk(this.Qr.next());return this.referenceDelegate.zr(),r(n).next(e=>this.referenceDelegate.jr(n).next(()=>e)).toPromise().then(e=>(n.raiseOnCommittedEvent(),e))}Hr(e,t){return oH.or(Object.values(this.qr).map(r=>()=>r.containsKey(e,t)))}}class lk extends o${constructor(e){super(),this.currentSequenceNumber=e}}class lS{constructor(e){this.persistence=e,this.Jr=new lg,this.Yr=null}static Zr(e){return new lS(e)}get Xr(){if(this.Yr)return this.Yr;throw ow()}addReference(e,t,r){return this.Jr.addReference(r,t),this.Xr.delete(r.toString()),oH.resolve()}removeReference(e,t,r){return this.Jr.removeReference(r,t),this.Xr.add(r.toString()),oH.resolve()}markPotentiallyOrphaned(e,t){return this.Xr.add(t.toString()),oH.resolve()}removeTarget(e,t){this.Jr.gr(t.targetId).forEach(e=>this.Xr.add(e.toString()));let r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Xr.add(e.toString()))}).next(()=>r.removeTargetData(e,t))}zr(){this.Yr=new Set}jr(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return oH.forEach(this.Xr,r=>{let n=oB.fromPath(r);return this.ei(e,n).next(e=>{e||t.removeEntry(n,oM.min())})}).next(()=>(this.Yr=null,t.apply(e)))}updateLimboDocument(e,t){return this.ei(e,t).next(e=>{e?this.Xr.delete(t.toString()):this.Xr.add(t.toString())})}Wr(e){return 0}ei(e,t){return oH.or([()=>oH.resolve(this.Jr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Hr(e,t)])}}class lE{constructor(e,t,r,n){this.targetId=e,this.fromCache=t,this.$i=r,this.Ui=n}static Wi(e,t){let r=ae(),n=ae();for(let e of t.docChanges)switch(e.type){case 0:r=r.add(e.doc.key);break;case 1:n=n.add(e.doc.key)}return new lE(e,t.fromCache,r,n)}}class lT{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class lC{constructor(){this.Gi=!1,this.zi=!1,this.ji=100,this.Hi=!function(){var e;let t=null===(e=es())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(r.g.process)}catch(e){return!1}}()&&navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")?8:function(e){let t=e.match(/Android ([\d.]+)/i);return Number(t?t[1].split(".").slice(0,2).join("."):"-1")}(ef())>0?6:4}initialize(e,t){this.Ji=e,this.indexManager=t,this.Gi=!0}getDocumentsMatchingQuery(e,t,r,n){let i={result:null};return this.Yi(e,t).next(e=>{i.result=e}).next(()=>{if(!i.result)return this.Zi(e,t,n,r).next(e=>{i.result=e})}).next(()=>{if(i.result)return;let r=new lT;return this.Xi(e,t,r).next(n=>{if(i.result=n,this.zi)return this.es(e,t,r,n.size)})}).next(()=>i.result)}es(e,t,r,n){return r.documentReadCount<this.ji?(om()<=I.DEBUG&&og("QueryEngine","SDK will not create cache indexes for query:",sZ(t),"since it only creates cache indexes for collection contains","more than or equal to",this.ji,"documents"),oH.resolve()):(om()<=I.DEBUG&&og("QueryEngine","Query:",sZ(t),"scans",r.documentReadCount,"local documents and returns",n,"documents as results."),r.documentReadCount>this.Hi*n?(om()<=I.DEBUG&&og("QueryEngine","The SDK decides to create cache indexes for query:",sZ(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,sQ(t))):oH.resolve())}Yi(e,t){if(sG(t))return oH.resolve(null);let r=sQ(t);return this.indexManager.getIndexType(e,r).next(n=>0===n?null:(null!==t.limit&&1===n&&(r=sQ(t=sY(t,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,r).next(n=>{let i=ae(...n);return this.Ji.getDocuments(e,i).next(n=>this.indexManager.getMinOffset(e,r).next(r=>{let o=this.ts(t,n);return this.ns(t,o,i,r.readTime)?this.Yi(e,sY(t,null,"F")):this.rs(e,o,t,r)}))})))}Zi(e,t,r,n){return sG(t)||n.isEqual(oM.min())?oH.resolve(null):this.Ji.getDocuments(e,r).next(i=>{let o=this.ts(t,i);return this.ns(t,o,r,n)?oH.resolve(null):(om()<=I.DEBUG&&og("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),sZ(t)),this.rs(e,o,t,function(e,t){let r=e.toTimestamp().seconds,n=e.toTimestamp().nanoseconds+1;return new oq(oM.fromTimestamp(1e9===n?new oD(r+1,0):new oD(r,n)),oB.empty(),-1)}(n,0)).next(e=>e))})}ts(e,t){let r=new o2(s1(e));return t.forEach((t,n)=>{s0(e,n)&&(r=r.add(n))}),r}ns(e,t,r,n){if(null===e.limit)return!1;if(r.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(n)>0)}Xi(e,t,r){return om()<=I.DEBUG&&og("QueryEngine","Using full collection scan to execute query:",sZ(t)),this.Ji.getDocumentsMatchingQuery(e,t,oq.min(),r)}rs(e,t,r,n){return this.Ji.getDocumentsMatchingQuery(e,r,n).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}class lI{constructor(e,t,r,n){this.persistence=e,this.ss=t,this.serializer=n,this.os=new oZ(oN),this._s=new s2(e=>sq(e),s$),this.us=new Map,this.cs=e.getRemoteDocumentCache(),this.Ur=e.getTargetCache(),this.Gr=e.getBundleCache(),this.ls(r)}ls(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new ld(this.cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.cs.setIndexManager(this.indexManager),this.ss.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.os))}}async function lP(e,t){return await e.persistence.runTransaction("Handle user change","readonly",r=>{let n;return e.mutationQueue.getAllMutationBatches(r).next(i=>(n=i,e.ls(t),e.mutationQueue.getAllMutationBatches(r))).next(t=>{let i=[],o=[],s=ae();for(let e of n)for(let t of(i.push(e.batchId),e.mutations))s=s.add(t.key);for(let e of t)for(let t of(o.push(e.batchId),e.mutations))s=s.add(t.key);return e.localDocuments.getDocuments(r,s).next(e=>({hs:e,removedBatchIds:i,addedBatchIds:o}))})})}function lA(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Ur.getLastRemoteSnapshotVersion(t))}async function lO(e,t,r){let n=e.os.get(t);try{r||await e.persistence.runTransaction("Release target",r?"readwrite":"readwrite-primary",t=>e.persistence.referenceDelegate.removeTarget(t,n))}catch(e){if(!oG(e))throw e;og("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}e.os=e.os.remove(t),e._s.delete(n.target)}function lR(e,t,r){let n=oM.min(),i=ae();return e.persistence.runTransaction("Execute query","readwrite",o=>(function(e,t,r){let n=e._s.get(r);return void 0!==n?oH.resolve(e.os.get(n)):e.Ur.getTargetData(t,r)})(e,o,sQ(t)).next(t=>{if(t)return n=t.lastLimboFreeSnapshotVersion,e.Ur.getMatchingKeysForTargetId(o,t.targetId).next(e=>{i=e})}).next(()=>e.ss.getDocumentsMatchingQuery(o,t,r?n:oM.min(),r?i:ae())).next(r=>{var n;let o;return n=t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2)),o=e.us.get(n)||oM.min(),r.forEach((e,t)=>{t.readTime.compareTo(o)>0&&(o=t.readTime)}),e.us.set(n,o),{documents:r,Ts:i}}))}class lN{constructor(){this.activeTargetIds=at}fs(e){this.activeTargetIds=this.activeTargetIds.add(e)}gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Vs(){return JSON.stringify({activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()})}}class lj{constructor(){this.so=new lN,this.oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e,t=!0){return t&&this.so.fs(e),this.oo[e]||"not-current"}updateQueryState(e,t,r){this.oo[e]=t}removeLocalQueryTarget(e){this.so.gs(e)}isLocalQueryTarget(e){return this.so.activeTargetIds.has(e)}clearQueryState(e){delete this.oo[e]}getAllActiveQueryTargets(){return this.so.activeTargetIds}isActiveQueryTarget(e){return this.so.activeTargetIds.has(e)}start(){return this.so=new lN,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class lD{_o(e){}shutdown(){}}class lM{constructor(){this.ao=()=>this.uo(),this.co=()=>this.lo(),this.ho=[],this.Po()}_o(e){this.ho.push(e)}shutdown(){window.removeEventListener("online",this.ao),window.removeEventListener("offline",this.co)}Po(){window.addEventListener("online",this.ao),window.addEventListener("offline",this.co)}uo(){for(let e of(og("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.ho))e(0)}lo(){for(let e of(og("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.ho))e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let lL=null;function lF(){return null===lL?lL=268435456+Math.round(2147483648*Math.random()):lL++,"0x"+lL.toString(16)}let lz={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class lU{constructor(e){this.Io=e.Io,this.To=e.To}Eo(e){this.Ao=e}Ro(e){this.Vo=e}mo(e){this.fo=e}onMessage(e){this.po=e}close(){this.To()}send(e){this.Io(e)}yo(){this.Ao()}wo(){this.Vo()}So(e){this.fo(e)}bo(e){this.po(e)}}let lB="WebChannelConnection";class lV extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),n=encodeURIComponent(this.databaseId.database);this.Do=t+"://"+e.host,this.vo=`projects/${r}/databases/${n}`,this.Co="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${n}`}get Fo(){return!1}Mo(e,t,r,n,i){let o=lF(),s=this.xo(e,t.toUriEncodedString());og("RestConnection",`Sending RPC '${e}' ${o}:`,s,r);let a={"google-cloud-resource-prefix":this.vo,"x-goog-request-params":this.Co};return this.Oo(a,n,i),this.No(e,s,a,r).then(t=>(og("RestConnection",`Received RPC '${e}' ${o}: `,t),t),t=>{throw ov("RestConnection",`RPC '${e}' ${o} failed with error: `,t,"url: ",s,"request:",r),t})}Lo(e,t,r,n,i,o){return this.Mo(e,t,r,n,i)}Oo(e,t,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+of}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,r)=>e[r]=t),r&&r.headers.forEach((t,r)=>e[r]=t)}xo(e,t){let r=lz[e];return`${this.Do}/v1/${t}:${r}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}No(e,t,r,n){let i=lF();return new Promise((o,s)=>{let a=new j;a.setWithCredentials(!0),a.listenOnce(M.COMPLETE,()=>{try{switch(a.getLastErrorCode()){case L.NO_ERROR:let t=a.getResponseJson();og(lB,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),o(t);break;case L.TIMEOUT:og(lB,`RPC '${e}' ${i} timed out`),s(new ox(o_.DEADLINE_EXCEEDED,"Request time out"));break;case L.HTTP_ERROR:let r=a.getStatus();if(og(lB,`RPC '${e}' ${i} failed with status:`,r,"response text:",a.getResponseText()),r>0){let e=a.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=null==e?void 0:e.error;if(t&&t.status&&t.message){let e=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(o_).indexOf(t)>=0?t:o_.UNKNOWN}(t.status);s(new ox(e,t.message))}else s(new ox(o_.UNKNOWN,"Server responded with status "+a.getStatus()))}else s(new ox(o_.UNAVAILABLE,"Connection failed."));break;default:ow()}}finally{og(lB,`RPC '${e}' ${i} completed.`)}});let l=JSON.stringify(n);og(lB,`RPC '${e}' ${i} sending request:`,n),a.send(t,"POST",l,r,15)})}Bo(e,t,r){let n=lF(),i=[this.Do,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=B(),s=U(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(a.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(a.useFetchStreams=!0),this.Oo(a.initMessageHeaders,t,r),a.encodeInitMessageHeaders=!0;let c=i.join("");og(lB,`Creating RPC '${e}' stream ${n}: ${c}`,a);let u=o.createWebChannel(c,a),h=!1,d=!1,f=new lU({Io:t=>{d?og(lB,`Not sending because RPC '${e}' stream ${n} is closed:`,t):(h||(og(lB,`Opening RPC '${e}' stream ${n} transport.`),u.open(),h=!0),og(lB,`RPC '${e}' stream ${n} sending:`,t),u.send(t))},To:()=>u.close()}),p=(e,t,r)=>{e.listen(t,e=>{try{r(e)}catch(e){setTimeout(()=>{throw e},0)}})};return p(u,D.EventType.OPEN,()=>{d||(og(lB,`RPC '${e}' stream ${n} transport opened.`),f.yo())}),p(u,D.EventType.CLOSE,()=>{d||(d=!0,og(lB,`RPC '${e}' stream ${n} transport closed`),f.So())}),p(u,D.EventType.ERROR,t=>{d||(d=!0,ov(lB,`RPC '${e}' stream ${n} transport errored:`,t),f.So(new ox(o_.UNAVAILABLE,"The operation could not be completed")))}),p(u,D.EventType.MESSAGE,t=>{var r;if(!d){let i=t.data[0];i||ow();let o=i.error||(null===(r=i[0])||void 0===r?void 0:r.error);if(o){og(lB,`RPC '${e}' stream ${n} received error:`,o);let t=o.status,r=function(e){let t=V[e];if(void 0!==t)return aR(t)}(t),i=o.message;void 0===r&&(r=o_.INTERNAL,i="Unknown error status: "+t+" with message "+o.message),d=!0,f.So(new ox(r,i)),u.close()}else og(lB,`RPC '${e}' stream ${n} received:`,i),f.bo(i)}}),p(s,z.STAT_EVENT,t=>{t.stat===F.PROXY?og(lB,`RPC '${e}' stream ${n} detected buffering proxy`):t.stat===F.NOPROXY&&og(lB,`RPC '${e}' stream ${n} detected no buffering proxy`)}),setTimeout(()=>{f.wo()},0),f}}function lq(){return"undefined"!=typeof document?document:null}function l$(e){return new aY(e,!0)}class lW{constructor(e,t,r=1e3,n=1.5,i=6e4){this.ui=e,this.timerId=t,this.ko=r,this.qo=n,this.Qo=i,this.Ko=0,this.$o=null,this.Uo=Date.now(),this.reset()}reset(){this.Ko=0}Wo(){this.Ko=this.Qo}Go(e){this.cancel();let t=Math.floor(this.Ko+this.zo()),r=Math.max(0,Date.now()-this.Uo),n=Math.max(0,t-r);n>0&&og("ExponentialBackoff",`Backing off for ${n} ms (base delay: ${this.Ko} ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.$o=this.ui.enqueueAfterDelay(this.timerId,n,()=>(this.Uo=Date.now(),e())),this.Ko*=this.qo,this.Ko<this.ko&&(this.Ko=this.ko),this.Ko>this.Qo&&(this.Ko=this.Qo)}jo(){null!==this.$o&&(this.$o.skipDelay(),this.$o=null)}cancel(){null!==this.$o&&(this.$o.cancel(),this.$o=null)}zo(){return(Math.random()-.5)*this.Ko}}class lH{constructor(e,t,r,n,i,o,s,a){this.ui=e,this.Ho=r,this.Jo=n,this.connection=i,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=s,this.listener=a,this.state=0,this.Yo=0,this.Zo=null,this.Xo=null,this.stream=null,this.e_=0,this.t_=new lW(e,t)}n_(){return 1===this.state||5===this.state||this.r_()}r_(){return 2===this.state||3===this.state}start(){this.e_=0,4!==this.state?this.auth():this.i_()}async stop(){this.n_()&&await this.close(0)}s_(){this.state=0,this.t_.reset()}o_(){this.r_()&&null===this.Zo&&(this.Zo=this.ui.enqueueAfterDelay(this.Ho,6e4,()=>this.__()))}a_(e){this.u_(),this.stream.send(e)}async __(){if(this.r_())return this.close(0)}u_(){this.Zo&&(this.Zo.cancel(),this.Zo=null)}c_(){this.Xo&&(this.Xo.cancel(),this.Xo=null)}async close(e,t){this.u_(),this.c_(),this.t_.cancel(),this.Yo++,4!==e?this.t_.reset():t&&t.code===o_.RESOURCE_EXHAUSTED?(oy(t.toString()),oy("Using maximum backoff delay to prevent overloading the backend."),this.t_.Wo()):t&&t.code===o_.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.l_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.mo(t)}l_(){}auth(){this.state=1;let e=this.h_(this.Yo),t=this.Yo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,r])=>{this.Yo===t&&this.P_(e,r)},t=>{e(()=>{let e=new ox(o_.UNKNOWN,"Fetching auth token failed: "+t.message);return this.I_(e)})})}P_(e,t){let r=this.h_(this.Yo);this.stream=this.T_(e,t),this.stream.Eo(()=>{r(()=>this.listener.Eo())}),this.stream.Ro(()=>{r(()=>(this.state=2,this.Xo=this.ui.enqueueAfterDelay(this.Jo,1e4,()=>(this.r_()&&(this.state=3),Promise.resolve())),this.listener.Ro()))}),this.stream.mo(e=>{r(()=>this.I_(e))}),this.stream.onMessage(e=>{r(()=>1==++this.e_?this.E_(e):this.onNext(e))})}i_(){this.state=5,this.t_.Go(async()=>{this.state=0,this.start()})}I_(e){return og("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}h_(e){return t=>{this.ui.enqueueAndForget(()=>this.Yo===e?t():(og("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class lG extends lH{constructor(e,t,r,n,i,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,n,o),this.serializer=i}T_(e,t){return this.connection.Bo("Listen",e,t)}E_(e){return this.onNext(e)}onNext(e){this.t_.reset();let t=function(e,t){let r;if("targetChange"in t){var n,i;t.targetChange;let o="NO_CHANGE"===(n=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===n?1:"REMOVE"===n?2:"CURRENT"===n?3:"RESET"===n?4:ow(),s=t.targetChange.targetIds||[],a=(i=t.targetChange.resumeToken,e.useProto3Json?(void 0===i||"string"==typeof i||ow(),o3.fromBase64String(i||"")):(void 0===i||i instanceof ou||i instanceof Uint8Array||ow(),o3.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause;r=new aV(o,s,a,l&&new ox(void 0===l.code?o_.UNKNOWN:aR(l.code),l.message||"")||null)}else if("documentChange"in t){t.documentChange;let n=t.documentChange;n.document,n.document.name,n.document.updateTime;let i=a6(e,n.document.name),o=a0(n.document.updateTime),s=n.document.createTime?a0(n.document.createTime):oM.min(),a=new sx({mapValue:{fields:n.document.fields}}),l=sk.newFoundDocument(i,o,s,a);r=new aU(n.targetIds||[],n.removedTargetIds||[],l.key,l)}else if("documentDelete"in t){t.documentDelete;let n=t.documentDelete;n.document;let i=a6(e,n.document),o=n.readTime?a0(n.readTime):oM.min(),s=sk.newNoDocument(i,o);r=new aU([],n.removedTargetIds||[],s.key,s)}else if("documentRemove"in t){t.documentRemove;let n=t.documentRemove;n.document;let i=a6(e,n.document);r=new aU([],n.removedTargetIds||[],i,null)}else{if(!("filter"in t))return ow();{t.filter;let e=t.filter;e.targetId;let{count:n=0,unchangedNames:i}=e,o=new aO(n,i);r=new aB(e.targetId,o)}}return r}(this.serializer,e),r=function(e){if(!("targetChange"in e))return oM.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?oM.min():t.readTime?a0(t.readTime):oM.min()}(e);return this.listener.d_(t,r)}A_(e){let t={};t.database=a9(this.serializer),t.addTarget=function(e,t){let r;let n=t.target;if((r=sW(n)?{documents:{documents:[a3(e,n.path)]}}:{query:function(e,t){var r,n;let i;let o={structuredQuery:{}},s=t.path;null!==t.collectionGroup?(i=s,o.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=s.popLast(),o.structuredQuery.from=[{collectionId:s.lastSegment()}]),o.parent=a3(e,i);let a=function(e){if(0!==e.length)return function e(t){return t instanceof sP?function(e){if("=="===e.op){if(sy(e.value))return{unaryFilter:{field:le(e.field),op:"IS_NAN"}};if(sg(e.value))return{unaryFilter:{field:le(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(sy(e.value))return{unaryFilter:{field:le(e.field),op:"IS_NOT_NAN"}};if(sg(e.value))return{unaryFilter:{field:le(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:le(e.field),op:aK[e.op],value:e.value}}}(t):t instanceof sA?function(t){let r=t.getFilters().map(t=>e(t));return 1===r.length?r[0]:{compositeFilter:{op:aQ[t.op],filters:r}}}(t):ow()}(sA.create(e,"and"))}(t.filters);a&&(o.structuredQuery.where=a);let l=function(e){if(0!==e.length)return e.map(e=>({field:le(e.field),direction:aG[e.dir]}))}(t.orderBy);l&&(o.structuredQuery.orderBy=l);let c=aX(e,t.limit);return null!==c&&(o.structuredQuery.limit=c),t.startAt&&(o.structuredQuery.startAt={before:(r=t.startAt).inclusive,values:r.position}),t.endAt&&(o.structuredQuery.endAt={before:!(n=t.endAt).inclusive,values:n.position}),{_t:o,parent:i}}(e,n)._t}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){r.resumeToken=aZ(e,t.resumeToken);let n=aX(e,t.expectedCount);null!==n&&(r.expectedCount=n)}else if(t.snapshotVersion.compareTo(oM.min())>0){r.readTime=aJ(e,t.snapshotVersion.toTimestamp());let n=aX(e,t.expectedCount);null!==n&&(r.expectedCount=n)}return r}(this.serializer,e);let r=function(e,t){let r=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return ow()}}(t.purpose);return null==r?null:{"goog-listen-tags":r}}(this.serializer,e);r&&(t.labels=r),this.a_(t)}R_(e){let t={};t.database=a9(this.serializer),t.removeTarget=e,this.a_(t)}}class lK extends lH{constructor(e,t,r,n,i,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,r,n,o),this.serializer=i}get V_(){return this.e_>0}start(){this.lastStreamToken=void 0,super.start()}l_(){this.V_&&this.m_([])}T_(e,t){return this.connection.Bo("Write",e,t)}E_(e){return e.streamToken||ow(),this.lastStreamToken=e.streamToken,e.writeResults&&0!==e.writeResults.length&&ow(),this.listener.f_()}onNext(e){var t,r;e.streamToken||ow(),this.lastStreamToken=e.streamToken,this.t_.reset();let n=(t=e.writeResults,r=e.commitTime,t&&t.length>0?(void 0!==r||ow(),t.map(e=>{let t;return(t=e.updateTime?a0(e.updateTime):a0(r)).isEqual(oM.min())&&(t=a0(r)),new ap(t,e.transformResults||[])})):[]),i=a0(e.commitTime);return this.listener.g_(i,n)}p_(){let e={};e.database=a9(this.serializer),this.a_(e)}m_(e){let t={streamToken:this.lastStreamToken,writes:e.map(e=>(function(e,t){var r;let n;if(t instanceof a_)n={update:a7(e,t.key,t.value)};else if(t instanceof aT)n={delete:a5(e,t.key)};else if(t instanceof ax)n={update:a7(e,t.key,t.data),updateMask:function(e){let t=[];return e.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}(t.fieldMask)};else{if(!(t instanceof aC))return ow();n={verify:a5(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(e=>(function(e,t){let r=t.transform;if(r instanceof as)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(r instanceof aa)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:r.elements}};if(r instanceof ac)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:r.elements}};if(r instanceof ah)return{fieldPath:t.field.canonicalString(),increment:r.Pe};throw ow()})(0,e))),t.precondition.isNone||(n.currentDocument=void 0!==(r=t.precondition).updateTime?{updateTime:aJ(e,r.updateTime.toTimestamp())}:void 0!==r.exists?{exists:r.exists}:ow()),n})(this.serializer,e))};this.a_(t)}}class lQ extends class{}{constructor(e,t,r,n){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=n,this.y_=!1}w_(){if(this.y_)throw new ox(o_.FAILED_PRECONDITION,"The client has already been terminated.")}Mo(e,t,r,n){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,o])=>this.connection.Mo(e,a2(t,r),n,i,o)).catch(e=>{throw"FirebaseError"===e.name?(e.code===o_.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new ox(o_.UNKNOWN,e.toString())})}Lo(e,t,r,n,i){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.Lo(e,a2(t,r),n,o,s,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===o_.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new ox(o_.UNKNOWN,e.toString())})}terminate(){this.y_=!0,this.connection.terminate()}}class lY{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.S_=0,this.b_=null,this.D_=!0}v_(){0===this.S_&&(this.C_("Unknown"),this.b_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.b_=null,this.F_("Backend didn't respond within 10 seconds."),this.C_("Offline"),Promise.resolve())))}M_(e){"Online"===this.state?this.C_("Unknown"):(this.S_++,this.S_>=1&&(this.x_(),this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.C_("Offline")))}set(e){this.x_(),this.S_=0,"Online"===e&&(this.D_=!1),this.C_(e)}C_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}F_(e){let t=`Could not reach Cloud Firestore backend. ${e}
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.D_?(oy(t),this.D_=!1):og("OnlineStateTracker",t)}x_(){null!==this.b_&&(this.b_.cancel(),this.b_=null)}}class lX{constructor(e,t,r,n,i){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.O_=[],this.N_=new Map,this.L_=new Set,this.B_=[],this.k_=i,this.k_._o(e=>{r.enqueueAndForget(async()=>{l3(this)&&(og("RemoteStore","Restarting streams for network reachability change."),await async function(e){e.L_.add(4),await lZ(e),e.q_.set("Unknown"),e.L_.delete(4),await lJ(e)}(this))})}),this.q_=new lY(r,n)}}async function lJ(e){if(l3(e))for(let t of e.B_)await t(!0)}async function lZ(e){for(let t of e.B_)await t(!1)}function l0(e,t){e.N_.has(t.targetId)||(e.N_.set(t.targetId,t),l6(e)?l5(e):cd(e).r_()&&l2(e,t))}function l1(e,t){let r=cd(e);e.N_.delete(t),r.r_()&&l4(e,t),0===e.N_.size&&(r.r_()?r.o_():l3(e)&&e.q_.set("Unknown"))}function l2(e,t){if(e.Q_.xe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(oM.min())>0){let r=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(r)}cd(e).A_(t)}function l4(e,t){e.Q_.xe(t),cd(e).R_(t)}function l5(e){e.Q_=new a$({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),ot:t=>e.N_.get(t)||null,tt:()=>e.datastore.serializer.databaseId}),cd(e).start(),e.q_.v_()}function l6(e){return l3(e)&&!cd(e).n_()&&e.N_.size>0}function l3(e){return 0===e.L_.size}async function l9(e){e.q_.set("Online")}async function l8(e){e.N_.forEach((t,r)=>{l2(e,t)})}async function l7(e,t){e.Q_=void 0,l6(e)?(e.q_.M_(t),l5(e)):e.q_.set("Unknown")}async function ce(e,t,r){if(e.q_.set("Online"),t instanceof aV&&2===t.state&&t.cause)try{await async function(e,t){let r=t.cause;for(let n of t.targetIds)e.N_.has(n)&&(await e.remoteSyncer.rejectListen(n,r),e.N_.delete(n),e.Q_.removeTarget(n))}(e,t)}catch(r){og("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),await ct(e,r)}else if(t instanceof aU?e.Q_.Ke(t):t instanceof aB?e.Q_.He(t):e.Q_.We(t),!r.isEqual(oM.min()))try{let t=await lA(e.localStore);r.compareTo(t)>=0&&await function(e,t){let r=e.Q_.rt(t);return r.targetChanges.forEach((r,n)=>{if(r.resumeToken.approximateByteSize()>0){let i=e.N_.get(n);i&&e.N_.set(n,i.withResumeToken(r.resumeToken,t))}}),r.targetMismatches.forEach((t,r)=>{let n=e.N_.get(t);if(!n)return;e.N_.set(t,n.withResumeToken(o3.EMPTY_BYTE_STRING,n.snapshotVersion)),l4(e,t);let i=new ln(n.target,t,r,n.sequenceNumber);l2(e,i)}),e.remoteSyncer.applyRemoteEvent(r)}(e,r)}catch(t){og("RemoteStore","Failed to raise snapshot:",t),await ct(e,t)}}async function ct(e,t,r){if(!oG(t))throw t;e.L_.add(1),await lZ(e),e.q_.set("Offline"),r||(r=()=>lA(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{og("RemoteStore","Retrying IndexedDB access"),await r(),e.L_.delete(1),await lJ(e)})}function cr(e,t){return t().catch(r=>ct(e,r,t))}async function cn(e){let t=cf(e),r=e.O_.length>0?e.O_[e.O_.length-1].batchId:-1;for(;l3(e)&&e.O_.length<10;)try{let n=await function(e,t){return e.persistence.runTransaction("Get next mutation batch","readonly",r=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(r,t)))}(e.localStore,r);if(null===n){0===e.O_.length&&t.o_();break}r=n.batchId,function(e,t){e.O_.push(t);let r=cf(e);r.r_()&&r.V_&&r.m_(t.mutations)}(e,n)}catch(t){await ct(e,t)}ci(e)&&co(e)}function ci(e){return l3(e)&&!cf(e).n_()&&e.O_.length>0}function co(e){cf(e).start()}async function cs(e){cf(e).p_()}async function ca(e){let t=cf(e);for(let r of e.O_)t.m_(r.mutations)}async function cl(e,t,r){let n=e.O_.shift(),i=aP.from(n,t,r);await cr(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await cn(e)}async function cc(e,t){t&&cf(e).V_&&await async function(e,t){var r;if(function(e){switch(e){default:return ow();case o_.CANCELLED:case o_.UNKNOWN:case o_.DEADLINE_EXCEEDED:case o_.RESOURCE_EXHAUSTED:case o_.INTERNAL:case o_.UNAVAILABLE:case o_.UNAUTHENTICATED:return!1;case o_.INVALID_ARGUMENT:case o_.NOT_FOUND:case o_.ALREADY_EXISTS:case o_.PERMISSION_DENIED:case o_.FAILED_PRECONDITION:case o_.ABORTED:case o_.OUT_OF_RANGE:case o_.UNIMPLEMENTED:case o_.DATA_LOSS:return!0}}(r=t.code)&&r!==o_.ABORTED){let r=e.O_.shift();cf(e).s_(),await cr(e,()=>e.remoteSyncer.rejectFailedWrite(r.batchId,t)),await cn(e)}}(e,t),ci(e)&&co(e)}async function cu(e,t){e.asyncQueue.verifyOperationInProgress(),og("RemoteStore","RemoteStore received new credentials");let r=l3(e);e.L_.add(3),await lZ(e),r&&e.q_.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.L_.delete(3),await lJ(e)}async function ch(e,t){t?(e.L_.delete(2),await lJ(e)):t||(e.L_.add(2),await lZ(e),e.q_.set("Unknown"))}function cd(e){var t,r,n;return e.K_||(e.K_=(t=e.datastore,r=e.asyncQueue,n={Eo:l9.bind(null,e),Ro:l8.bind(null,e),mo:l7.bind(null,e),d_:ce.bind(null,e)},t.w_(),new lG(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n)),e.B_.push(async t=>{t?(e.K_.s_(),l6(e)?l5(e):e.q_.set("Unknown")):(await e.K_.stop(),e.Q_=void 0)})),e.K_}function cf(e){var t,r,n;return e.U_||(e.U_=(t=e.datastore,r=e.asyncQueue,n={Eo:()=>Promise.resolve(),Ro:cs.bind(null,e),mo:cc.bind(null,e),f_:ca.bind(null,e),g_:cl.bind(null,e)},t.w_(),new lK(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n)),e.B_.push(async t=>{t?(e.U_.s_(),await cn(e)):(await e.U_.stop(),e.O_.length>0&&(og("RemoteStore",`Stopping write stream with ${e.O_.length} pending writes`),e.O_=[]))})),e.U_}class cp{constructor(e,t,r,n,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=n,this.removalCallback=i,this.deferred=new ok,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,n,i){let o=new cp(e,t,Date.now()+r,n,i);return o.start(r),o}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new ox(o_.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function cm(e,t){if(oy("AsyncQueue",`${t}: ${e}`),oG(e))return new ox(o_.UNAVAILABLE,`${t}: ${e}`);throw e}class cg{constructor(e){this.comparator=e?(t,r)=>e(t,r)||oB.comparator(t.key,r.key):(e,t)=>oB.comparator(e.key,t.key),this.keyedMap=s6(),this.sortedSet=new oZ(this.comparator)}static emptySet(e){return new cg(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,r)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof cg)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(!e.isEqual(n))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}copy(e,t){let r=new cg;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}class cy{constructor(){this.W_=new oZ(oB.comparator)}track(e){let t=e.doc.key,r=this.W_.get(t);r?0!==e.type&&3===r.type?this.W_=this.W_.insert(t,e):3===e.type&&1!==r.type?this.W_=this.W_.insert(t,{type:r.type,doc:e.doc}):2===e.type&&2===r.type?this.W_=this.W_.insert(t,{type:2,doc:e.doc}):2===e.type&&0===r.type?this.W_=this.W_.insert(t,{type:0,doc:e.doc}):1===e.type&&0===r.type?this.W_=this.W_.remove(t):1===e.type&&2===r.type?this.W_=this.W_.insert(t,{type:1,doc:r.doc}):0===e.type&&1===r.type?this.W_=this.W_.insert(t,{type:2,doc:e.doc}):ow():this.W_=this.W_.insert(t,e)}G_(){let e=[];return this.W_.inorderTraversal((t,r)=>{e.push(r)}),e}}class cv{constructor(e,t,r,n,i,o,s,a,l){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=n,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=s,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,r,n,i){let o=[];return t.forEach(e=>{o.push({type:0,doc:e})}),new cv(e,t,cg.emptySet(t),o,r,n,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&sX(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==r[e].type||!t[e].doc.isEqual(r[e].doc))return!1;return!0}}class cb{constructor(){this.z_=void 0,this.j_=[]}H_(){return this.j_.some(e=>e.J_())}}class cw{constructor(){this.queries=c_(),this.onlineState="Unknown",this.Y_=new Set}terminate(){!function(e,t){let r=e.queries;e.queries=c_(),r.forEach((e,r)=>{for(let e of r.j_)e.onError(t)})}(this,new ox(o_.ABORTED,"Firestore shutting down"))}}function c_(){return new s2(e=>sJ(e),sX)}async function cx(e,t){let r=3,n=t.query,i=e.queries.get(n);i?!i.H_()&&t.J_()&&(r=2):(i=new cb,r=t.J_()?0:1);try{switch(r){case 0:i.z_=await e.onListen(n,!0);break;case 1:i.z_=await e.onListen(n,!1);break;case 2:await e.onFirstRemoteStoreListen(n)}}catch(r){let e=cm(r,`Initialization of query '${sZ(t.query)}' failed`);return void t.onError(e)}e.queries.set(n,i),i.j_.push(t),t.Z_(e.onlineState),i.z_&&t.X_(i.z_)&&cT(e)}async function ck(e,t){let r=t.query,n=3,i=e.queries.get(r);if(i){let e=i.j_.indexOf(t);e>=0&&(i.j_.splice(e,1),0===i.j_.length?n=t.J_()?0:1:!i.H_()&&t.J_()&&(n=2))}switch(n){case 0:return e.queries.delete(r),e.onUnlisten(r,!0);case 1:return e.queries.delete(r),e.onUnlisten(r,!1);case 2:return e.onLastRemoteStoreUnlisten(r);default:return}}function cS(e,t){let r=!1;for(let n of t){let t=n.query,i=e.queries.get(t);if(i){for(let e of i.j_)e.X_(n)&&(r=!0);i.z_=n}}r&&cT(e)}function cE(e,t,r){let n=e.queries.get(t);if(n)for(let e of n.j_)e.onError(r);e.queries.delete(t)}function cT(e){e.Y_.forEach(e=>{e.next()})}(W=$||($={})).ea="default",W.Cache="cache";class cC{constructor(e,t,r){this.query=e,this.ta=t,this.na=!1,this.ra=null,this.onlineState="Unknown",this.options=r||{}}X_(e){if(!this.options.includeMetadataChanges){let t=[];for(let r of e.docChanges)3!==r.type&&t.push(r);e=new cv(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.na?this.ia(e)&&(this.ta.next(e),t=!0):this.sa(e,this.onlineState)&&(this.oa(e),t=!0),this.ra=e,t}onError(e){this.ta.error(e)}Z_(e){this.onlineState=e;let t=!1;return this.ra&&!this.na&&this.sa(this.ra,e)&&(this.oa(this.ra),t=!0),t}sa(e,t){return!(e.fromCache&&this.J_())||(!this.options._a||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}ia(e){if(e.docChanges.length>0)return!0;let t=this.ra&&this.ra.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}oa(e){e=cv.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.na=!0,this.ta.next(e)}J_(){return this.options.source!==$.Cache}}class cI{constructor(e){this.key=e}}class cP{constructor(e){this.key=e}}class cA{constructor(e,t){this.query=e,this.Ta=t,this.Ea=null,this.hasCachedResults=!1,this.current=!1,this.da=ae(),this.mutatedKeys=ae(),this.Aa=s1(e),this.Ra=new cg(this.Aa)}get Va(){return this.Ta}ma(e,t){let r=t?t.fa:new cy,n=t?t.Ra:this.Ra,i=t?t.mutatedKeys:this.mutatedKeys,o=n,s=!1,a="F"===this.query.limitType&&n.size===this.query.limit?n.last():null,l="L"===this.query.limitType&&n.size===this.query.limit?n.first():null;if(e.inorderTraversal((e,t)=>{let c=n.get(e),u=s0(this.query,t)?t:null,h=!!c&&this.mutatedKeys.has(c.key),d=!!u&&(u.hasLocalMutations||this.mutatedKeys.has(u.key)&&u.hasCommittedMutations),f=!1;c&&u?c.data.isEqual(u.data)?h!==d&&(r.track({type:3,doc:u}),f=!0):this.ga(c,u)||(r.track({type:2,doc:u}),f=!0,(a&&this.Aa(u,a)>0||l&&0>this.Aa(u,l))&&(s=!0)):!c&&u?(r.track({type:0,doc:u}),f=!0):c&&!u&&(r.track({type:1,doc:c}),f=!0,(a||l)&&(s=!0)),f&&(u?(o=o.add(u),i=d?i.add(e):i.delete(e)):(o=o.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;o.size>this.query.limit;){let e="F"===this.query.limitType?o.last():o.first();o=o.delete(e.key),i=i.delete(e.key),r.track({type:1,doc:e})}return{Ra:o,fa:r,ns:s,mutatedKeys:i}}ga(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,n){let i=this.Ra;this.Ra=e.Ra,this.mutatedKeys=e.mutatedKeys;let o=e.fa.G_();o.sort((e,t)=>(function(e,t){let r=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ow()}};return r(e)-r(t)})(e.type,t.type)||this.Aa(e.doc,t.doc)),this.pa(r),n=null!=n&&n;let s=t&&!n?this.ya():[],a=0===this.da.size&&this.current&&!n?1:0,l=a!==this.Ea;return(this.Ea=a,0!==o.length||l)?{snapshot:new cv(this.query,e.Ra,i,o,e.mutatedKeys,0===a,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),wa:s}:{wa:s}}Z_(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Ra:this.Ra,fa:new cy,mutatedKeys:this.mutatedKeys,ns:!1},!1)):{wa:[]}}Sa(e){return!this.Ta.has(e)&&!!this.Ra.has(e)&&!this.Ra.get(e).hasLocalMutations}pa(e){e&&(e.addedDocuments.forEach(e=>this.Ta=this.Ta.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Ta=this.Ta.delete(e)),this.current=e.current)}ya(){if(!this.current)return[];let e=this.da;this.da=ae(),this.Ra.forEach(e=>{this.Sa(e.key)&&(this.da=this.da.add(e.key))});let t=[];return e.forEach(e=>{this.da.has(e)||t.push(new cP(e))}),this.da.forEach(r=>{e.has(r)||t.push(new cI(r))}),t}ba(e){this.Ta=e.Ts,this.da=ae();let t=this.ma(e.documents);return this.applyChanges(t,!0)}Da(){return cv.fromInitialDocuments(this.query,this.Ra,this.mutatedKeys,0===this.Ea,this.hasCachedResults)}}class cO{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class cR{constructor(e){this.key=e,this.va=!1}}class cN{constructor(e,t,r,n,i,o){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=n,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.Ca={},this.Fa=new s2(e=>sJ(e),sX),this.Ma=new Map,this.xa=new Set,this.Oa=new oZ(oB.comparator),this.Na=new Map,this.La=new lg,this.Ba={},this.ka=new Map,this.qa=lc.kn(),this.onlineState="Unknown",this.Qa=void 0}get isPrimaryClient(){return!0===this.Qa}}async function cj(e,t,r=!0){let n;let i=c1(e),o=i.Fa.get(t);return o?(i.sharedClientState.addLocalQueryTarget(o.targetId),n=o.view.Da()):n=await cM(i,t,r,!0),n}async function cD(e,t){let r=c1(e);await cM(r,t,!0,!1)}async function cM(e,t,r,n){var i,o;let s;let a=await (i=e.localStore,o=sQ(t),i.persistence.runTransaction("Allocate target","readwrite",e=>{let t;return i.Ur.getTargetData(e,o).next(r=>r?(t=r,oH.resolve(t)):i.Ur.allocateTargetId(e).next(r=>(t=new ln(o,r,"TargetPurposeListen",e.currentSequenceNumber),i.Ur.addTargetData(e,t).next(()=>t))))}).then(e=>{let t=i.os.get(e.targetId);return(null===t||e.snapshotVersion.compareTo(t.snapshotVersion)>0)&&(i.os=i.os.insert(e.targetId,e),i._s.set(o,e.targetId)),e})),l=a.targetId,c=e.sharedClientState.addLocalQueryTarget(l,r);return n&&(s=await cL(e,t,l,"current"===c,a.resumeToken)),e.isPrimaryClient&&r&&l0(e.remoteStore,a),s}async function cL(e,t,r,n,i){e.Ka=(t,r,n)=>(async function(e,t,r,n){let i=t.view.ma(r);i.ns&&(i=await lR(e.localStore,t.query,!1).then(({documents:e})=>t.view.ma(e,i)));let o=n&&n.targetChanges.get(t.targetId),s=n&&null!=n.targetMismatches.get(t.targetId),a=t.view.applyChanges(i,e.isPrimaryClient,o,s);return cY(e,t.targetId,a.wa),a.snapshot})(e,t,r,n);let o=await lR(e.localStore,t,!0),s=new cA(t,o.Ts),a=s.ma(o.documents),l=az.createSynthesizedTargetChangeForCurrentChange(r,n&&"Offline"!==e.onlineState,i),c=s.applyChanges(a,e.isPrimaryClient,l);cY(e,r,c.wa);let u=new cO(t,r,s);return e.Fa.set(t,u),e.Ma.has(r)?e.Ma.get(r).push(t):e.Ma.set(r,[t]),c.snapshot}async function cF(e,t,r){let n=e.Fa.get(t),i=e.Ma.get(n.targetId);if(i.length>1)return e.Ma.set(n.targetId,i.filter(e=>!sX(e,t))),void e.Fa.delete(t);e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(n.targetId),e.sharedClientState.isActiveQueryTarget(n.targetId)||await lO(e.localStore,n.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(n.targetId),r&&l1(e.remoteStore,n.targetId),cK(e,n.targetId)}).catch(oW)):(cK(e,n.targetId),await lO(e.localStore,n.targetId,!0))}async function cz(e,t){let r=e.Fa.get(t),n=e.Ma.get(r.targetId);e.isPrimaryClient&&1===n.length&&(e.sharedClientState.removeLocalQueryTarget(r.targetId),l1(e.remoteStore,r.targetId))}async function cU(e,t,r){var n;let i=(e.remoteStore.remoteSyncer.applySuccessfulWrite=c$.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=cW.bind(null,e),e);try{let e;let o=await function(e,t){let r,n;let i=oD.now(),o=t.reduce((e,t)=>e.add(t.key),ae());return e.persistence.runTransaction("Locally write mutations","readwrite",s=>{let a=s4,l=ae();return e.cs.getEntries(s,o).next(e=>{(a=e).forEach((e,t)=>{t.isValidDocument()||(l=l.add(e))})}).next(()=>e.localDocuments.getOverlayedDocuments(s,a)).next(n=>{r=n;let o=[];for(let e of t){let t=function(e,t){let r=null;for(let n of e.fieldTransforms){let e=t.data.field(n.field),i=ao(n.transform,e||null);null!=i&&(null===r&&(r=sx.empty()),r.set(n.field,i))}return r||null}(e,r.get(e.key).overlayedDocument);null!=t&&o.push(new ax(e.key,t,function e(t){let r=[];return oX(t.fields,(t,n)=>{let i=new oU([t]);if(sv(n)){let t=e(n.mapValue).fields;if(0===t.length)r.push(i);else for(let e of t)r.push(i.child(e))}else r.push(i)}),new o5(r)}(t.value.mapValue),am.exists(!0)))}return e.mutationQueue.addMutationBatch(s,i,o,t)}).next(t=>{n=t;let i=t.applyToLocalDocumentSet(r,l);return e.documentOverlayCache.saveOverlays(s,t.batchId,i)})}).then(()=>({batchId:n.batchId,changes:s3(r)}))}(i.localStore,t);i.sharedClientState.addPendingMutation(o.batchId),n=o.batchId,(e=i.Ba[i.currentUser.toKey()])||(e=new oZ(oN)),e=e.insert(n,r),i.Ba[i.currentUser.toKey()]=e,await cJ(i,o.changes),await cn(i.remoteStore)}catch(t){let e=cm(t,"Failed to persist write");r.reject(e)}}async function cB(e,t){try{let r=await function(e,t){let r=t.snapshotVersion,n=e.os;return e.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{var o;let s,a;let l=e.cs.newChangeBuffer({trackRemovals:!0});n=e.os;let c=[];t.targetChanges.forEach((o,s)=>{var a;let l=n.get(s);if(!l)return;c.push(e.Ur.removeMatchingKeys(i,o.removedDocuments,s).next(()=>e.Ur.addMatchingKeys(i,o.addedDocuments,s)));let u=l.withSequenceNumber(i.currentSequenceNumber);null!==t.targetMismatches.get(s)?u=u.withResumeToken(o3.EMPTY_BYTE_STRING,oM.min()).withLastLimboFreeSnapshotVersion(oM.min()):o.resumeToken.approximateByteSize()>0&&(u=u.withResumeToken(o.resumeToken,r)),n=n.insert(s,u),a=u,(0===l.resumeToken.approximateByteSize()||a.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||o.addedDocuments.size+o.modifiedDocuments.size+o.removedDocuments.size>0)&&c.push(e.Ur.updateTargetData(i,u))});let u=s4,h=ae();if(t.documentUpdates.forEach(r=>{t.resolvedLimboDocuments.has(r)&&c.push(e.persistence.referenceDelegate.updateLimboDocument(i,r))}),c.push((o=t.documentUpdates,s=ae(),a=ae(),o.forEach(e=>s=s.add(e)),l.getEntries(i,s).next(e=>{let t=s4;return o.forEach((r,n)=>{let i=e.get(r);n.isFoundDocument()!==i.isFoundDocument()&&(a=a.add(r)),n.isNoDocument()&&n.version.isEqual(oM.min())?(l.removeEntry(r,n.readTime),t=t.insert(r,n)):!i.isValidDocument()||n.version.compareTo(i.version)>0||0===n.version.compareTo(i.version)&&i.hasPendingWrites?(l.addEntry(n),t=t.insert(r,n)):og("LocalStore","Ignoring outdated watch update for ",r,". Current version:",i.version," Watch version:",n.version)}),{Ps:t,Is:a}})).next(e=>{u=e.Ps,h=e.Is})),!r.isEqual(oM.min())){let t=e.Ur.getLastRemoteSnapshotVersion(i).next(t=>e.Ur.setTargetsMetadata(i,i.currentSequenceNumber,r));c.push(t)}return oH.waitFor(c).next(()=>l.apply(i)).next(()=>e.localDocuments.getLocalViewOfDocuments(i,u,h)).next(()=>u)}).then(t=>(e.os=n,t))}(e.localStore,t);t.targetChanges.forEach((t,r)=>{let n=e.Na.get(r);n&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||ow(),t.addedDocuments.size>0?n.va=!0:t.modifiedDocuments.size>0?n.va||ow():t.removedDocuments.size>0&&(n.va||ow(),n.va=!1))}),await cJ(e,r,t)}catch(e){await oW(e)}}function cV(e,t,r){var n;if(e.isPrimaryClient&&0===r||!e.isPrimaryClient&&1===r){let r;let i=[];e.Fa.forEach((e,r)=>{let n=r.view.Z_(t);n.snapshot&&i.push(n.snapshot)}),(n=e.eventManager).onlineState=t,r=!1,n.queries.forEach((e,n)=>{for(let e of n.j_)e.Z_(t)&&(r=!0)}),r&&cT(n),i.length&&e.Ca.d_(i),e.onlineState=t,e.isPrimaryClient&&e.sharedClientState.setOnlineState(t)}}async function cq(e,t,r){e.sharedClientState.updateQueryState(t,"rejected",r);let n=e.Na.get(t),i=n&&n.key;if(i){let r=new oZ(oB.comparator);r=r.insert(i,sk.newNoDocument(i,oM.min()));let n=ae().add(i),o=new aF(oM.min(),new Map,new oZ(oN),r,n);await cB(e,o),e.Oa=e.Oa.remove(i),e.Na.delete(t),cX(e)}else await lO(e.localStore,t,!1).then(()=>cK(e,t,r)).catch(oW)}async function c$(e,t){var r;let n=t.batch.batchId;try{let i=await (r=e.localStore).persistence.runTransaction("Acknowledge batch","readwrite-primary",e=>{let n=t.batch.keys(),i=r.cs.newChangeBuffer({trackRemovals:!0});return(function(e,t,r,n){let i=r.batch,o=i.keys(),s=oH.resolve();return o.forEach(e=>{s=s.next(()=>n.getEntry(t,e)).next(t=>{let o=r.docVersions.get(e);null!==o||ow(),0>t.version.compareTo(o)&&(i.applyToRemoteDocument(t,r),t.isValidDocument()&&(t.setReadTime(r.commitVersion),n.addEntry(t)))})}),s.next(()=>e.mutationQueue.removeMutationBatch(t,i))})(r,e,t,i).next(()=>i.apply(e)).next(()=>r.mutationQueue.performConsistencyCheck(e)).next(()=>r.documentOverlayCache.removeOverlaysForBatchId(e,n,t.batch.batchId)).next(()=>r.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=ae();for(let r=0;r<e.mutationResults.length;++r)e.mutationResults[r].transformResults.length>0&&(t=t.add(e.batch.mutations[r].key));return t}(t))).next(()=>r.localDocuments.getDocuments(e,n))});cG(e,n,null),cH(e,n),e.sharedClientState.updateMutationState(n,"acknowledged"),await cJ(e,i)}catch(e){await oW(e)}}async function cW(e,t,r){var n;try{let i=await (n=e.localStore).persistence.runTransaction("Reject batch","readwrite-primary",e=>{let r;return n.mutationQueue.lookupMutationBatch(e,t).next(t=>(null!==t||ow(),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t))).next(()=>n.mutationQueue.performConsistencyCheck(e)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)).next(()=>n.localDocuments.getDocuments(e,r))});cG(e,t,r),cH(e,t),e.sharedClientState.updateMutationState(t,"rejected",r),await cJ(e,i)}catch(e){await oW(e)}}function cH(e,t){(e.ka.get(t)||[]).forEach(e=>{e.resolve()}),e.ka.delete(t)}function cG(e,t,r){let n=e.Ba[e.currentUser.toKey()];if(n){let i=n.get(t);i&&(r?i.reject(r):i.resolve(),n=n.remove(t)),e.Ba[e.currentUser.toKey()]=n}}function cK(e,t,r=null){for(let n of(e.sharedClientState.removeLocalQueryTarget(t),e.Ma.get(t)))e.Fa.delete(n),r&&e.Ca.$a(n,r);e.Ma.delete(t),e.isPrimaryClient&&e.La.gr(t).forEach(t=>{e.La.containsKey(t)||cQ(e,t)})}function cQ(e,t){e.xa.delete(t.path.canonicalString());let r=e.Oa.get(t);null!==r&&(l1(e.remoteStore,r),e.Oa=e.Oa.remove(t),e.Na.delete(r),cX(e))}function cY(e,t,r){for(let n of r)n instanceof cI?(e.La.addReference(n.key,t),function(e,t){let r=t.key,n=r.path.canonicalString();e.Oa.get(r)||e.xa.has(n)||(og("SyncEngine","New document in limbo: "+r),e.xa.add(n),cX(e))}(e,n)):n instanceof cP?(og("SyncEngine","Document no longer in limbo: "+n.key),e.La.removeReference(n.key,t),e.La.containsKey(n.key)||cQ(e,n.key)):ow()}function cX(e){for(;e.xa.size>0&&e.Oa.size<e.maxConcurrentLimboResolutions;){let t=e.xa.values().next().value;e.xa.delete(t);let r=new oB(oF.fromString(t)),n=e.qa.next();e.Na.set(n,new cR(r)),e.Oa=e.Oa.insert(r,n),l0(e.remoteStore,new ln(sQ(new sH(r.path)),n,"TargetPurposeLimboResolution",oK.oe))}}async function cJ(e,t,r){let n=[],i=[],o=[];e.Fa.isEmpty()||(e.Fa.forEach((s,a)=>{o.push(e.Ka(a,t,r).then(t=>{var o;if((t||r)&&e.isPrimaryClient){let n=t?!t.fromCache:null===(o=null==r?void 0:r.targetChanges.get(a.targetId))||void 0===o?void 0:o.current;e.sharedClientState.updateQueryState(a.targetId,n?"current":"not-current")}if(t){n.push(t);let e=lE.Wi(a.targetId,t);i.push(e)}}))}),await Promise.all(o),e.Ca.d_(n),await async function(e,t){try{await e.persistence.runTransaction("notifyLocalViewChanges","readwrite",r=>oH.forEach(t,t=>oH.forEach(t.$i,n=>e.persistence.referenceDelegate.addReference(r,t.targetId,n)).next(()=>oH.forEach(t.Ui,n=>e.persistence.referenceDelegate.removeReference(r,t.targetId,n)))))}catch(e){if(!oG(e))throw e;og("LocalStore","Failed to update sequence numbers: "+e)}for(let r of t){let t=r.targetId;if(!r.fromCache){let r=e.os.get(t),n=r.snapshotVersion,i=r.withLastLimboFreeSnapshotVersion(n);e.os=e.os.insert(t,i)}}}(e.localStore,i))}async function cZ(e,t){var r;if(!e.currentUser.isEqual(t)){og("SyncEngine","User change. New user:",t.toKey());let n=await lP(e.localStore,t);e.currentUser=t,r="'waitForPendingWrites' promise is rejected due to a user change.",e.ka.forEach(e=>{e.forEach(e=>{e.reject(new ox(o_.CANCELLED,r))})}),e.ka.clear(),e.sharedClientState.handleUserChange(t,n.removedBatchIds,n.addedBatchIds),await cJ(e,n.hs)}}function c0(e,t){let r=e.Na.get(t);if(r&&r.va)return ae().add(r.key);{let r=ae(),n=e.Ma.get(t);if(!n)return r;for(let t of n){let n=e.Fa.get(t);r=r.unionWith(n.view.Va)}return r}}function c1(e){return e.remoteStore.remoteSyncer.applyRemoteEvent=cB.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=c0.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=cq.bind(null,e),e.Ca.d_=cS.bind(null,e.eventManager),e.Ca.$a=cE.bind(null,e.eventManager),e}class c2{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=l$(e.databaseInfo.databaseId),this.sharedClientState=this.Wa(e),this.persistence=this.Ga(e),await this.persistence.start(),this.localStore=this.za(e),this.gcScheduler=this.ja(e,this.localStore),this.indexBackfillerScheduler=this.Ha(e,this.localStore)}ja(e,t){return null}Ha(e,t){return null}za(e){var t;return t=this.persistence,new lI(t,new lC,e.initialUser,this.serializer)}Ga(e){return new lx(lS.Zr,this.serializer)}Wa(e){return new lj}async terminate(){var e,t;null===(e=this.gcScheduler)||void 0===e||e.stop(),null===(t=this.indexBackfillerScheduler)||void 0===t||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}c2.provider={build:()=>new c2};class c4{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>cV(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=cZ.bind(null,this.syncEngine),await ch(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new cw}createDatastore(e){let t=l$(e.databaseInfo.databaseId),r=new lV(e.databaseInfo);return new lQ(e.authCredentials,e.appCheckCredentials,r,t)}createRemoteStore(e){var t;return t=this.localStore,new lX(t,this.datastore,e.asyncQueue,e=>cV(this.syncEngine,e,0),lM.D()?new lM:new lD)}createSyncEngine(e,t){return function(e,t,r,n,i,o,s){let a=new cN(e,t,r,n,i,o);return s&&(a.Qa=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(e){og("RemoteStore","RemoteStore shutting down."),e.L_.add(5),await lZ(e),e.k_.shutdown(),e.q_.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate(),null===(t=this.eventManager)||void 0===t||t.terminate()}}c4.provider={build:()=>new c4};class c5{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ya(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ya(this.observer.error,e):oy("Uncaught Error in snapshot listener:",e.toString()))}Za(){this.muted=!0}Ya(e,t){setTimeout(()=>{this.muted||e(t)},0)}}class c6{constructor(e,t,r,n,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this.databaseInfo=n,this.user=od.UNAUTHENTICATED,this.clientId=oR.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(r,async e=>{og("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(r,e=>(og("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();let e=new ok;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(r){let t=cm(r,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function c3(e,t){e.asyncQueue.verifyOperationInProgress(),og("FirestoreClient","Initializing OfflineComponentProvider");let r=e.configuration;await t.initialize(r);let n=r.initialUser;e.setCredentialChangeListener(async e=>{n.isEqual(e)||(await lP(t.localStore,e),n=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function c9(e,t){e.asyncQueue.verifyOperationInProgress();let r=await c8(e);og("FirestoreClient","Initializing OnlineComponentProvider"),await t.initialize(r,e.configuration),e.setCredentialChangeListener(e=>cu(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,r)=>cu(t.remoteStore,r)),e._onlineComponents=t}async function c8(e){if(!e._offlineComponents){if(e._uninitializedComponentsProvider){og("FirestoreClient","Using user provided OfflineComponentProvider");try{await c3(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===o_.FAILED_PRECONDITION||t.code===o_.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;ov("Error using user provided cache. Falling back to memory cache: "+t),await c3(e,new c2)}}else og("FirestoreClient","Using default OfflineComponentProvider"),await c3(e,new c2)}return e._offlineComponents}async function c7(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(og("FirestoreClient","Using user provided OnlineComponentProvider"),await c9(e,e._uninitializedComponentsProvider._online)):(og("FirestoreClient","Using default OnlineComponentProvider"),await c9(e,new c4))),e._onlineComponents}async function ue(e){let t=await c7(e),r=t.eventManager;return r.onListen=cj.bind(null,t.syncEngine),r.onUnlisten=cF.bind(null,t.syncEngine),r.onFirstRemoteStoreListen=cD.bind(null,t.syncEngine),r.onLastRemoteStoreUnlisten=cz.bind(null,t.syncEngine),r}function ut(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}let ur=new Map;function un(e,t,r){if(!r)throw new ox(o_.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function ui(e){if(!oB.isDocumentKey(e))throw new ox(o_.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function uo(e){if(oB.isDocumentKey(e))throw new ox(o_.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function us(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let r=(t=e).constructor?t.constructor.name:null;return r?`a custom ${r} object`:"an object"}}return"function"==typeof e?"a function":ow()}function ua(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new ox(o_.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let r=us(e);throw new ox(o_.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${r}`)}}return e}class ul{constructor(e){var t,r;if(void 0===e.host){if(void 0!==e.ssl)throw new ox(o_.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new ox(o_.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,r,n){if(!0===t&&!0===n)throw new ox(o_.INVALID_ARGUMENT,`${e} and ${r} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=ut(null!==(r=e.experimentalLongPollingOptions)&&void 0!==r?r:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new ox(o_.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new ox(o_.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new ox(o_.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,r;return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(t=this.experimentalLongPollingOptions,r=e.experimentalLongPollingOptions,t.timeoutSeconds===r.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class uc{constructor(e,t,r,n){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new ul({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new ox(o_.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return"notTerminated"!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new ox(o_.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new ul(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new oE;switch(e.type){case"firstParty":return new oP(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new ox(o_.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return"notTerminated"===this._terminateTask&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){"notTerminated"===this._terminateTask?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=ur.get(e);t&&(og("ComponentProvider","Removing Datastore"),ur.delete(e),t.terminate())}(this),Promise.resolve()}}class uu{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new uu(this.firestore,e,this._query)}}class uh{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ud(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new uh(this.firestore,e,this._key)}}class ud extends uu{constructor(e,t,r){super(e,t,new sH(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new uh(this.firestore,null,new oB(e))}withConverter(e){return new ud(this.firestore,e,this._path)}}function uf(e,t,...r){if(e=e$(e),un("collection","path",t),e instanceof uc){let n=oF.fromString(t,...r);return uo(n),new ud(e,null,n)}{if(!(e instanceof uh||e instanceof ud))throw new ox(o_.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(oF.fromString(t,...r));return uo(n),new ud(e.firestore,null,n)}}function up(e,t,...r){if(e=e$(e),1==arguments.length&&(t=oR.newId()),un("doc","path",t),e instanceof uc){let n=oF.fromString(t,...r);return ui(n),new uh(e,null,new oB(n))}{if(!(e instanceof uh||e instanceof ud))throw new ox(o_.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(oF.fromString(t,...r));return ui(n),new uh(e.firestore,e instanceof ud?e.converter:null,new oB(n))}}class um{constructor(e=Promise.resolve()){this.Pu=[],this.Iu=!1,this.Tu=[],this.Eu=null,this.du=!1,this.Au=!1,this.Ru=[],this.t_=new lW(this,"async_queue_retry"),this.Vu=()=>{let e=lq();e&&og("AsyncQueue","Visibility state changed to "+e.visibilityState),this.t_.jo()},this.mu=e;let t=lq();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.Vu)}get isShuttingDown(){return this.Iu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.fu(),this.gu(e)}enterRestrictedMode(e){if(!this.Iu){this.Iu=!0,this.Au=e||!1;let t=lq();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Vu)}}enqueue(e){if(this.fu(),this.Iu)return new Promise(()=>{});let t=new ok;return this.gu(()=>this.Iu&&this.Au?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Pu.push(e),this.pu()))}async pu(){if(0!==this.Pu.length){try{await this.Pu[0](),this.Pu.shift(),this.t_.reset()}catch(e){if(!oG(e))throw e;og("AsyncQueue","Operation failed with retryable error: "+e)}this.Pu.length>0&&this.t_.Go(()=>this.pu())}}gu(e){let t=this.mu.then(()=>(this.du=!0,e().catch(e=>{let t;throw this.Eu=e,this.du=!1,oy("INTERNAL UNHANDLED ERROR: ",(t=e.message||"",e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t)),e}).then(e=>(this.du=!1,e))));return this.mu=t,t}enqueueAfterDelay(e,t,r){this.fu(),this.Ru.indexOf(e)>-1&&(t=0);let n=cp.createAndSchedule(this,e,t,r,e=>this.yu(e));return this.Tu.push(n),n}fu(){this.Eu&&ow()}verifyOperationInProgress(){}async wu(){let e;do e=this.mu,await e;while(e!==this.mu)}Su(e){for(let t of this.Tu)if(t.timerId===e)return!0;return!1}bu(e){return this.wu().then(()=>{for(let t of(this.Tu.sort((e,t)=>e.targetTimeMs-t.targetTimeMs),this.Tu))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.wu()})}Du(e){this.Ru.push(e)}yu(e){let t=this.Tu.indexOf(e);this.Tu.splice(t,1)}}function ug(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(let r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])}class uy extends uc{constructor(e,t,r,n){super(e,t,r,n),this.type="firestore",this._queue=new um,this._persistenceKey=(null==n?void 0:n.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){let e=this._firestoreClient.terminate();this._queue=new um(e),this._firestoreClient=void 0,await e}}}function uv(e){if(e._terminated)throw new ox(o_.FAILED_PRECONDITION,"The client has already been terminated.");return e._firestoreClient||function(e){var t,r,n,i;let o=e._freezeSettings(),s=(i=e._databaseId,new si(i,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,o.host,o.ssl,o.experimentalForceLongPolling,o.experimentalAutoDetectLongPolling,ut(o.experimentalLongPollingOptions),o.useFetchStreams));e._componentsProvider||(null===(r=o.localCache)||void 0===r?void 0:r._offlineComponentProvider)&&(null===(n=o.localCache)||void 0===n?void 0:n._onlineComponentProvider)&&(e._componentsProvider={_offline:o.localCache._offlineComponentProvider,_online:o.localCache._onlineComponentProvider}),e._firestoreClient=new c6(e._authCredentials,e._appCheckCredentials,e._queue,s,e._componentsProvider&&function(e){let t=null==e?void 0:e._online.build();return{_offline:null==e?void 0:e._offline.build(t),_online:t}}(e._componentsProvider))}(e),e._firestoreClient}class ub{constructor(e){this._byteString=e}static fromBase64String(e){try{return new ub(o3.fromBase64String(e))}catch(e){throw new ox(o_.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new ub(o3.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class uw{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new ox(o_.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new oU(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class u_{constructor(e){this._methodName=e}}class ux{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new ox(o_.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new ox(o_.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return oN(this._lat,e._lat)||oN(this._long,e._long)}}class uk{constructor(e){this._values=(e||[]).map(e=>e)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(this._values,e._values)}}let uS=/^__.*__$/;class uE{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return null!==this.fieldMask?new ax(e,this.data,this.fieldMask,t,this.fieldTransforms):new a_(e,this.data,t,this.fieldTransforms)}}function uT(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ow()}}class uC{constructor(e,t,r,n,i,o){this.settings=e,this.databaseId=t,this.serializer=r,this.ignoreUndefinedProperties=n,void 0===i&&this.vu(),this.fieldTransforms=i||[],this.fieldMask=o||[]}get path(){return this.settings.path}get Cu(){return this.settings.Cu}Fu(e){return new uC(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Mu(e){var t;let r=null===(t=this.path)||void 0===t?void 0:t.child(e),n=this.Fu({path:r,xu:!1});return n.Ou(e),n}Nu(e){var t;let r=null===(t=this.path)||void 0===t?void 0:t.child(e),n=this.Fu({path:r,xu:!1});return n.vu(),n}Lu(e){return this.Fu({path:void 0,xu:!0})}Bu(e){return uN(e,this.settings.methodName,this.settings.ku||!1,this.path,this.settings.qu)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}vu(){if(this.path)for(let e=0;e<this.path.length;e++)this.Ou(this.path.get(e))}Ou(e){if(0===e.length)throw this.Bu("Document fields must not be empty");if(uT(this.Cu)&&uS.test(e))throw this.Bu('Document fields cannot begin and end with "__"')}}class uI{constructor(e,t,r){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=r||l$(e)}Qu(e,t,r,n=!1){return new uC({Cu:e,methodName:t,qu:r,path:oU.emptyPath(),xu:!1,ku:n},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function uP(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof oD||e instanceof ux||e instanceof ub||e instanceof uh||e instanceof u_||e instanceof uk)}function uA(e,t,r){if(!uP(r)||!("object"==typeof r&&null!==r&&(Object.getPrototypeOf(r)===Object.prototype||null===Object.getPrototypeOf(r)))){let n=us(r);throw"an object"===n?t.Bu(e+" a custom object"):t.Bu(e+" "+n)}}let uO=RegExp("[~\\*/\\[\\]]");function uR(e,t,r){if(t.search(uO)>=0)throw uN(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,r);try{return new uw(...t.split("."))._internalPath}catch(n){throw uN(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,r)}}function uN(e,t,r,n,i){let o=n&&!n.isEmpty(),s=void 0!==i,a=`Function ${t}() called with invalid data`;r&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${n}`),s&&(l+=` in document ${i}`),l+=")"),new ox(o_.INVALID_ARGUMENT,a+e+l)}class uj{constructor(e,t,r,n,i){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=n,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new uh(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new uD(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(uM("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class uD extends uj{data(){return super.data()}}function uM(e,t){return"string"==typeof t?uR(e,t):t instanceof uw?t._internalPath:t._delegate._internalPath}class uL{convertValue(e,t="none"){switch(sa(e)){case 0:return null;case 1:return e.booleanValue;case 2:return o7(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(se(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw ow()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let r={};return oX(e,(e,n)=>{r[e]=this.convertValue(n,t)}),r}convertVectorValue(e){var t,r,n;return new uk(null===(n=null===(r=null===(t=e.fields)||void 0===t?void 0:t.value.arrayValue)||void 0===r?void 0:r.values)||void 0===n?void 0:n.map(e=>o7(e.doubleValue)))}convertGeoPoint(e){return new ux(o7(e.latitude),o7(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let r=sr(e);return null==r?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(sn(e));default:return null}}convertTimestamp(e){let t=o8(e);return new oD(t.seconds,t.nanos)}convertDocumentKey(e,t){let r=oF.fromString(e);lr(r)||ow();let n=new so(r.get(1),r.get(3)),i=new oB(r.popFirst(5));return n.isEqual(t)||oy(`Document ${i} 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 (${t.projectId}/${t.database}) instead.`),i}}class uF{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class uz extends uj{constructor(e,t,r,n,i,o){super(e,t,r,n,o),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new uU(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){let r=this._document.data.field(uM("DocumentSnapshot.get",e));if(null!==r)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}}class uU extends uz{data(e={}){return super.data(e)}}class uB{constructor(e,t,r,n){this._firestore=e,this._userDataWriter=t,this._snapshot=n,this.metadata=new uF(n.hasPendingWrites,n.fromCache),this.query=r}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(r=>{e.call(t,new uU(this._firestore,this._userDataWriter,r.key,r,new uF(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new ox(o_.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map(r=>{let n=new uU(e._firestore,e._userDataWriter,r.doc.key,r.doc,new uF(e._snapshot.mutatedKeys.has(r.doc.key),e._snapshot.fromCache),e.query.converter);return r.doc,{type:"added",doc:n,oldIndex:-1,newIndex:t++}})}{let r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let n=new uU(e._firestore,e._userDataWriter,t.doc.key,t.doc,new uF(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,o=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(o=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ow()}}(t.type),doc:n,oldIndex:i,newIndex:o}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}class uV extends uL{constructor(e){super(),this.firestore=e}convertBytes(e){return new ub(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new uh(this.firestore,null,t)}}function uq(e,t,r){var n,i;e=ua(e,uh);let o=ua(e.firestore,uy),s=(n=e.converter)?r&&(r.merge||r.mergeFields)?n.toFirestore(t,r):n.toFirestore(t):t;return i=[(function(e,t,r,n,i,o={}){let s,a;let l=e.Qu(o.merge||o.mergeFields?2:0,t,r,i);uA("Data must be an object, but it was:",l,n);let c=function e(t,r){let n={};return oJ(t)?r.path&&r.path.length>0&&r.fieldMask.push(r.path):oX(t,(t,i)=>{let o=function t(r,n){if(uP(r=e$(r)))return uA("Unsupported field value:",n,r),e(r,n);if(r instanceof u_)return function(e,t){if(!uT(t.Cu))throw t.Bu(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.Bu(`${e._methodName}() is not currently supported inside arrays`);let r=e._toFieldTransform(t);r&&t.fieldTransforms.push(r)}(r,n),null;if(void 0===r&&n.ignoreUndefinedProperties)return null;if(n.path&&n.fieldMask.push(n.path),r instanceof Array){if(n.settings.xu&&4!==n.Cu)throw n.Bu("Nested arrays are not supported");return function(e,r){let n=[],i=0;for(let o of e){let e=t(o,r.Lu(i));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),i++}return{arrayValue:{values:n}}}(r,n)}return function(e,t){var r,n,i;if(null===(e=e$(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return r=t.serializer,"number"==typeof(i=n=e)&&Number.isInteger(i)&&!oQ(i)&&i<=Number.MAX_SAFE_INTEGER&&i>=Number.MIN_SAFE_INTEGER?an(n):ar(r,n);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let r=oD.fromDate(e);return{timestampValue:aJ(t.serializer,r)}}if(e instanceof oD){let r=new oD(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:aJ(t.serializer,r)}}if(e instanceof ux)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof ub)return{bytesValue:aZ(t.serializer,e._byteString)};if(e instanceof uh){let r=t.databaseId,n=e.firestore._databaseId;if(!n.isEqual(r))throw t.Bu(`Document reference is for database ${n.projectId}/${n.database} but should be for database ${r.projectId}/${r.database}`);return{referenceValue:a1(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof uk)return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:e.toArray().map(e=>{if("number"!=typeof e)throw t.Bu("VectorValues must only contain numeric values.");return ar(t.serializer,e)})}}}}};throw t.Bu(`Unsupported field value: ${us(e)}`)}(r,n)}(i,r.Mu(t));null!=o&&(n[t]=o)}),{mapValue:{fields:n}}}(n,l);if(o.merge)s=new o5(l.fieldMask),a=l.fieldTransforms;else if(o.mergeFields){let e=[];for(let n of o.mergeFields){let i=function(e,t,r){if((t=e$(t))instanceof uw)return t._internalPath;if("string"==typeof t)return uR(e,t);throw uN("Field path arguments must be of type string or ",e,!1,void 0,r)}(t,n,r);if(!l.contains(i))throw new ox(o_.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);(function(e,t){return e.some(e=>e.isEqual(t))})(e,i)||e.push(i)}s=new o5(e),a=l.fieldTransforms.filter(e=>s.covers(e.field))}else s=null,a=l.fieldTransforms;return new uE(new sx(c),s,a)})(function(e){let t=e._freezeSettings(),r=l$(e._databaseId);return new uI(e._databaseId,!!t.ignoreUndefinedProperties,r)}(o),"setDoc",e._key,s,null!==e.converter,r).toMutation(e._key,am.none())],function(e,t){let r=new ok;return e.asyncQueue.enqueueAndForget(async()=>cU(await c7(e).then(e=>e.syncEngine),t,r)),r.promise}(uv(o),i)}function u$(e,...t){var r,n,i;let o,s,a;e=e$(e);let l={includeMetadataChanges:!1,source:"default"},c=0;"object"!=typeof t[0]||ug(t[c])||(l=t[c],c++);let u={includeMetadataChanges:l.includeMetadataChanges,source:l.source};if(ug(t[c])){let e=t[c];t[c]=null===(r=e.next)||void 0===r?void 0:r.bind(e),t[c+1]=null===(n=e.error)||void 0===n?void 0:n.bind(e),t[c+2]=null===(i=e.complete)||void 0===i?void 0:i.bind(e)}if(e instanceof uh)s=ua(e.firestore,uy),a=new sH(e._key.path),o={next:r=>{t[c]&&t[c](function(e,t,r){let n=r.docs.get(t._key),i=new uV(e);return new uz(e,i,t._key,n,new uF(r.hasPendingWrites,r.fromCache),t.converter)}(s,e,r))},error:t[c+1],complete:t[c+2]};else{let r=ua(e,uu);s=ua(r.firestore,uy),a=r._query;let n=new uV(s);o={next:e=>{t[c]&&t[c](new uB(s,n,r,e))},error:t[c+1],complete:t[c+2]},function(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new ox(o_.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query)}return function(e,t,r,n){let i=new c5(n),o=new cC(t,i,r);return e.asyncQueue.enqueueAndForget(async()=>cx(await ue(e),o)),()=>{i.Za(),e.asyncQueue.enqueueAndForget(async()=>ck(await ue(e),o))}}(uv(s),a,u,o)}new WeakMap,function(e=!0){of=tw,tm(new eW("firestore",(t,{instanceIdentifier:r,options:n})=>{let i=t.getProvider("app").getImmediate(),o=new uy(new oC(t.getProvider("auth-internal")),new oO(t.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new ox(o_.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new so(e.options.projectId,t)}(i,r),i);return n=Object.assign({useFetchStreams:e},n),o._setSettings(n),o},"PUBLIC").setMultipleInstances(!0)),tk(oh,"4.7.3",void 0),tk(oh,"4.7.3","esm2017")}();let uW="functions";class uH{constructor(e,t,r){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then(e=>this.auth=e,()=>{}),this.messaging||t.get().then(e=>this.messaging=e,()=>{}),this.appCheck||r.get().then(e=>this.appCheck=e,()=>{})}async getAuthToken(){if(this.auth)try{let e=await this.auth.getToken();return null==e?void 0:e.accessToken}catch(e){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return await this.messaging.getToken()}catch(e){return}}async getAppCheckToken(e){if(this.appCheck){let t=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return t.error?null:t.token}return null}async getContext(e){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken(),appCheckToken:await this.getAppCheckToken(e)}}}let uG="us-central1";class uK{constructor(e,t,r,n,i=uG,o){this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new uH(t,r,n),this.cancelAllRequests=new Promise(e=>{this.deleteService=()=>Promise.resolve(e())});try{let e=new URL(i);this.customDomain=e.origin+("/"===e.pathname?"":e.pathname),this.region=uG}catch(e){this.customDomain=null,this.region=i}}_delete(){return this.deleteService()}_url(e){let t=this.app.options.projectId;if(null!==this.emulatorOrigin){let r=this.emulatorOrigin;return`${r}/${t}/${this.region}/${e}`}return null!==this.customDomain?`${this.customDomain}/${e}`:`https://${this.region}-${t}.cloudfunctions.net/${e}`}}let uQ="@firebase/functions",uY="0.11.8";T=fetch.bind(self),tm(new eW(uW,(e,{instanceIdentifier:t})=>{let r=e.getProvider("app").getImmediate();return new uK(r,e.getProvider("auth-internal"),e.getProvider("messaging-internal"),e.getProvider("app-check-internal"),t,T)},"PUBLIC").setMultipleInstances(!0)),tk(uQ,uY,void 0),tk(uQ,uY,"esm2017");let uX="@firebase/installations",uJ="0.6.9",uZ=`w:${uJ}`,u0="FIS_v2",u1=new ex("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function u2(e){return e instanceof e_&&e.code.includes("request-failed")}function u4({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function u5(e){return{token:e.token,requestStatus:2,expiresIn:Number(e.expiresIn.replace("s","000")),creationTime:Date.now()}}async function u6(e,t){let r=(await t.json()).error;return u1.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function u3({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}async function u9(e){let t=await e();return t.status>=500&&t.status<600?e():t}async function u8({appConfig:e,heartbeatServiceProvider:t},{fid:r}){let n=u4(e),i=u3(e),o=t.getImmediate({optional:!0});if(o){let e=await o.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}let s={method:"POST",headers:i,body:JSON.stringify({fid:r,authVersion:u0,appId:e.appId,sdkVersion:uZ})},a=await u9(()=>fetch(n,s));if(a.ok){let e=await a.json();return{fid:e.fid||r,registrationStatus:2,refreshToken:e.refreshToken,authToken:u5(e.authToken)}}throw await u6("Create Installation",a)}function u7(e){return new Promise(t=>{setTimeout(t,e)})}let he=/^[cdef][\w-]{21}$/;function ht(e){return`${e.appName}!${e.appId}`}let hr=new Map;function hn(e,t){let r=ht(e);hi(r,t),function(e,t){let r=(!ho&&"BroadcastChannel"in self&&((ho=new BroadcastChannel("[Firebase] FID Change")).onmessage=e=>{hi(e.data.key,e.data.fid)}),ho);r&&r.postMessage({key:e,fid:t}),0===hr.size&&ho&&(ho.close(),ho=null)}(r,t)}function hi(e,t){let r=hr.get(e);if(r)for(let e of r)e(t)}let ho=null,hs="firebase-installations-store",ha=null;function hl(){return ha||(ha=te("firebase-installations-database",1,{upgrade:(e,t)=>{0===t&&e.createObjectStore(hs)}})),ha}async function hc(e,t){let r=ht(e),n=(await hl()).transaction(hs,"readwrite"),i=n.objectStore(hs),o=await i.get(r);return await i.put(t,r),await n.done,o&&o.fid===t.fid||hn(e,t.fid),t}async function hu(e){let t=ht(e),r=(await hl()).transaction(hs,"readwrite");await r.objectStore(hs).delete(t),await r.done}async function hh(e,t){let r=ht(e),n=(await hl()).transaction(hs,"readwrite"),i=n.objectStore(hs),o=await i.get(r),s=t(o);return void 0===s?await i.delete(r):await i.put(s,r),await n.done,s&&(!o||o.fid!==s.fid)&&hn(e,s.fid),s}async function hd(e){let t;let r=await hh(e.appConfig,r=>{let n=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(u1.create("app-offline"))};let r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=hf(e,r);return{installationEntry:r,registrationPromise:n}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:hp(e)}:{installationEntry:t}}(e,hg(r||{fid:function(){try{let e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;let t=btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").substr(0,22);return he.test(t)?t:""}catch(e){return""}}(),registrationStatus:0}));return t=n.registrationPromise,n.installationEntry});return""===r.fid?{installationEntry:await t}:{installationEntry:r,registrationPromise:t}}async function hf(e,t){try{let r=await u8(e,t);return hc(e.appConfig,r)}catch(r){throw u2(r)&&409===r.customData.serverCode?await hu(e.appConfig):await hc(e.appConfig,{fid:t.fid,registrationStatus:0}),r}}async function hp(e){let t=await hm(e.appConfig);for(;1===t.registrationStatus;)await u7(100),t=await hm(e.appConfig);if(0===t.registrationStatus){let{installationEntry:t,registrationPromise:r}=await hd(e);return r||t}return t}function hm(e){return hh(e,e=>{if(!e)throw u1.create("installation-not-found");return hg(e)})}function hg(e){return 1===e.registrationStatus&&e.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e}async function hy({appConfig:e,heartbeatServiceProvider:t},r){let n=function(e,{fid:t}){return`${u4(e)}/${t}/authTokens:generate`}(e,r),i=function(e,{refreshToken:t}){let r=u3(e);return r.append("Authorization",`${u0} ${t}`),r}(e,r),o=t.getImmediate({optional:!0});if(o){let e=await o.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}let s={method:"POST",headers:i,body:JSON.stringify({installation:{sdkVersion:uZ,appId:e.appId}})},a=await u9(()=>fetch(n,s));if(a.ok)return u5(await a.json());throw await u6("Generate Auth Token",a)}async function hv(e,t=!1){let r;let n=await hh(e.appConfig,n=>{var i;if(!hx(n))throw u1.create("not-registered");let o=n.authToken;if(!t&&2===(i=o).requestStatus&&!function(e){let t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(i))return n;if(1===o.requestStatus)return r=hb(e,t),n;{if(!navigator.onLine)throw u1.create("app-offline");let t=function(e){let t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(n);return r=h_(e,t),t}});return r?await r:n.authToken}async function hb(e,t){let r=await hw(e.appConfig);for(;1===r.authToken.requestStatus;)await u7(100),r=await hw(e.appConfig);let n=r.authToken;return 0===n.requestStatus?hv(e,t):n}function hw(e){return hh(e,e=>{var t;if(!hx(e))throw u1.create("not-registered");return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function h_(e,t){try{let r=await hy(e,t),n=Object.assign(Object.assign({},t),{authToken:r});return await hc(e.appConfig,n),r}catch(r){if(u2(r)&&(401===r.customData.serverCode||404===r.customData.serverCode))await hu(e.appConfig);else{let r=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await hc(e.appConfig,r)}throw r}}function hx(e){return void 0!==e&&2===e.registrationStatus}async function hk(e){let{installationEntry:t,registrationPromise:r}=await hd(e);return r?r.catch(console.error):hv(e).catch(console.error),t.fid}async function hS(e,t=!1){return await hE(e),(await hv(e,t)).token}async function hE(e){let{registrationPromise:t}=await hd(e);t&&await t}function hT(e){return u1.create("missing-app-config-values",{valueName:e})}let hC="installations";tm(new eW(hC,e=>{let t=e.getProvider("app").getImmediate(),r=function(e){if(!e||!e.options)throw hT("App Configuration");if(!e.name)throw hT("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw hT(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),n=tg(t,"heartbeat");return{app:t,appConfig:r,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},"PUBLIC")),tm(new eW("installations-internal",e=>{let t=tg(e.getProvider("app").getImmediate(),hC).getImmediate();return{getId:()=>hk(t),getToken:e=>hS(t,e)}},"PRIVATE")),tk(uX,uJ),tk(uX,uJ,"esm2017");let hI="analytics",hP="https://www.googletagmanager.com/gtag/js",hA=new e0("@firebase/analytics"),hO=new ex("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function hR(e){if(!e.startsWith(hP)){let t=hO.create("invalid-gtag-resource",{gtagURL:e});return hA.warn(t.message),""}return e}function hN(e){return Promise.all(e.map(e=>e.catch(e=>e)))}async function hj(e,t,r,n,i,o){let s=n[i];try{if(s)await t[s];else{let e=(await hN(r)).find(e=>e.measurementId===i);e&&await t[e.appId]}}catch(e){hA.error(e)}e("config",i,o)}async function hD(e,t,r,n,i){try{let o=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);let n=await hN(r);for(let r of e){let e=n.find(e=>e.measurementId===r),i=e&&t[e.appId];if(i)o.push(i);else{o=[];break}}}0===o.length&&(o=Object.values(t)),await Promise.all(o),e("event",n,i||{})}catch(e){hA.error(e)}}class hM{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}let hL=new hM;async function hF(e){var t;let{appId:r,apiKey:n}=e,i={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":n})},o="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",r),s=await fetch(o,i);if(200!==s.status&&304!==s.status){let e="";try{let r=await s.json();(null===(t=r.error)||void 0===t?void 0:t.message)&&(e=r.error.message)}catch(e){}throw hO.create("config-fetch-failed",{httpStatus:s.status,responseMessage:e})}return s.json()}async function hz(e,t=hL,r){let{appId:n,apiKey:i,measurementId:o}=e.options;if(!n)throw hO.create("no-app-id");if(!i){if(o)return{measurementId:o,appId:n};throw hO.create("no-api-key")}let s=t.getThrottleMetadata(n)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new hB;return setTimeout(async()=>{a.abort()},void 0!==r?r:6e4),hU({appId:n,apiKey:i,measurementId:o},s,a,t)}async function hU(e,{throttleEndTimeMillis:t,backoffCount:r},n,i=hL){var o;let{appId:s,measurementId:a}=e;try{await new Promise((e,r)=>{let i=setTimeout(e,Math.max(t-Date.now(),0));n.addEventListener(()=>{clearTimeout(i),r(hO.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}catch(e){if(a)return hA.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${null==e?void 0:e.message}]`),{appId:s,measurementId:a};throw e}try{let t=await hF(e);return i.deleteThrottleMetadata(s),t}catch(c){if(!function(e){if(!(e instanceof e_)||!e.customData)return!1;let t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(c)){if(i.deleteThrottleMetadata(s),a)return hA.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${null==c?void 0:c.message}]`),{appId:s,measurementId:a};throw c}let t=503===Number(null===(o=null==c?void 0:c.customData)||void 0===o?void 0:o.httpStatus)?eq(r,i.intervalMillis,30):eq(r,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+t,backoffCount:r+1};return i.setThrottleMetadata(s,l),hA.debug(`Calling attemptFetch again in ${t} millis`),hU(e,l,n,i)}}class hB{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function hV(e,t,r,n,i){if(i&&i.global){e("event",r,n);return}{let i=await t;e("event",r,Object.assign(Object.assign({},n),{send_to:i}))}}async function hq(){if(!ev())return hA.warn(hO.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await eb()}catch(e){return hA.warn(hO.create("indexeddb-unavailable",{errorInfo:null==e?void 0:e.toString()}).message),!1}return!0}async function h$(e,t,r,n,i,o,s){var a;let l=hz(e);l.then(t=>{r[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&hA.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>hA.error(e)),t.push(l);let c=hq().then(e=>e?n.getId():void 0),[u,h]=await Promise.all([l,c]);!function(e){for(let t of Object.values(window.document.getElementsByTagName("script")))if(t.src&&t.src.includes(hP)&&t.src.includes(e))return t;return null}(o)&&function(e,t){var r,n;let i;let o=(r="firebase-js-sdk-policy",n={createScriptURL:hR},window.trustedTypes&&(i=window.trustedTypes.createPolicy(r,n)),i),s=document.createElement("script"),a=`${hP}?l=${e}&id=${t}`;s.src=o?null==o?void 0:o.createScriptURL(a):a,s.async=!0,document.head.appendChild(s)}(o,u.measurementId),g&&(i("consent","default",g),g=void 0),i("js",new Date);let d=null!==(a=null==s?void 0:s.config)&&void 0!==a?a:{};return d.origin="firebase",d.update=!0,null!=h&&(d.firebase_id=h),i("config",u.measurementId,d),m&&(i("set",m),m=void 0),u.measurementId}class hW{constructor(e){this.app=e}_delete(){return delete hH[this.app.options.appId],Promise.resolve()}}let hH={},hG=[],hK={},hQ="dataLayer",hY=!1;async function hX(){if(em()||!ew()||!ev())return!1;try{return await eb()}catch(e){return!1}}function hJ(e,t,r,n){e=e$(e),hV(v,hH[e.app.options.appId],t,r,n).catch(e=>hA.error(e))}let hZ="@firebase/analytics",h0="0.10.8";tm(new eW(hI,(e,{options:t})=>(function(e,t,r){!function(){let e=[];if(em()&&e.push("This is a browser extension environment."),ew()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),r=hO.create("invalid-analytics-context",{errorInfo:t});hA.warn(r.message)}}();let n=e.options.appId;if(!n)throw hO.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)hA.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw hO.create("no-api-key")}if(null!=hH[n])throw hO.create("already-exists",{id:n});if(!hY){var i,o;let e,t;e=[],Array.isArray(window[hQ])?e=window[hQ]:window[hQ]=e;let{wrappedGtag:r,gtagCore:n}=(i="gtag",t=function(...e){window[hQ].push(arguments)},window[i]&&"function"==typeof window[i]&&(t=window[i]),window[i]=(o=t,async function(e,...t){try{if("event"===e){let[e,r]=t;await hD(o,hH,hG,e,r)}else if("config"===e){let[e,r]=t;await hj(o,hH,hG,hK,e,r)}else if("consent"===e){let[e,r]=t;o("consent",e,r)}else if("get"===e){let[e,r,n]=t;o("get",e,r,n)}else if("set"===e){let[e]=t;o("set",e)}else o(e,...t)}catch(e){hA.error(e)}}),{gtagCore:t,wrappedGtag:window[i]});v=r,y=n,hY=!0}return hH[n]=h$(e,hG,hK,t,y,hQ,r),new hW(e)})(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),tm(new eW("analytics-internal",function(e){try{let t=e.getProvider(hI).getImmediate();return{logEvent:(e,r,n)=>hJ(t,e,r,n)}}catch(e){throw hO.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),tk(hZ,h0),tk(hZ,h0,"esm2017");var h1=r(97582);function h2(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}let h4=new ex("auth","Firebase",h2()),h5=new e0("@firebase/auth");function h6(e,...t){h5.logLevel<=I.ERROR&&h5.error(`Auth (${tw}): ${e}`,...t)}function h3(e,...t){throw de(e,...t)}function h9(e,...t){return de(e,...t)}function h8(e,t,r){return new ex("auth","Firebase",Object.assign(Object.assign({},h2()),{[t]:r})).create(t,{appName:e.name})}function h7(e){return h8(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function de(e,...t){if("string"!=typeof e){let r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return h4.create(e,...t)}function dt(e,t,...r){if(!e)throw de(t,...r)}function dr(e){let t="INTERNAL ASSERTION FAILED: "+e;throw h6(t),Error(t)}function dn(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function di(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class ds{constructor(e,t){var r;this.shortDelay=e,this.longDelay=t,r="Short delay should be less than long delay!",t>e||dr(r),this.isMobile=ep()||eg()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===di()||"https:"===di()||em()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function da(e,t){var r,n;r=e.emulator,n="Emulator should always be set here",r||dr(n);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}class dl{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:"undefined"!=typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!=typeof fetch?fetch:void dr("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:"undefined"!=typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!=typeof Headers?Headers:void dr("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:"undefined"!=typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!=typeof Response?Response:void dr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let dc={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},du=new ds(3e4,6e4);function dh(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function dd(e,t,r,n,i={}){return df(e,i,async()=>{let i={},o={};n&&("GET"===t?o=n:i={body:JSON.stringify(n)});let s=eD(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode);let l=Object.assign({method:t,headers:a},i);return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||(l.referrerPolicy="no-referrer"),dl.fetch()(dm(e,e.config.apiHost,r,s),l)})}async function df(e,t,r){e._canInitEmulator=!1;let n=Object.assign(Object.assign({},dc),t);try{let t=new dg(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();let o=await i.json();if("needConfirmation"in o)throw dy(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{let[t,r]=(i.ok?o.errorMessage:o.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw dy(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===t)throw dy(e,"email-already-in-use",o);if("USER_DISABLED"===t)throw dy(e,"user-disabled",o);let s=n[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(r)throw h8(e,s,r);h3(e,s)}}catch(t){if(t instanceof e_)throw t;h3(e,"network-request-failed",{message:String(t)})}}async function dp(e,t,r,n,i={}){let o=await dd(e,t,r,n,i);return"mfaPendingCredential"in o&&h3(e,"multi-factor-auth-required",{_serverResponse:o}),o}function dm(e,t,r,n){let i=`${t}${r}?${n}`;return e.config.emulator?da(e.config,i):`${e.config.apiScheme}://${i}`}class dg{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(h9(this.auth,"network-request-failed")),du.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function dy(e,t,r){let n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);let i=h9(e,t,n);return i.customData._tokenResponse=r,i}function dv(e){return void 0!==e&&void 0!==e.enterprise}class db{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function dw(e,t){return dd(e,"GET","/v2/recaptchaConfig",dh(e,t))}async function d_(e,t){return dd(e,"POST","/v1/accounts:delete",t)}async function dx(e,t){return dd(e,"POST","/v1/accounts:lookup",t)}function dk(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function dS(e,t=!1){let r=e$(e),n=await r.getIdToken(t),i=dT(n);dt(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");let o="object"==typeof i.firebase?i.firebase:void 0,s=null==o?void 0:o.sign_in_provider;return{claims:i,token:n,authTime:dk(dE(i.auth_time)),issuedAtTime:dk(dE(i.iat)),expirationTime:dk(dE(i.exp)),signInProvider:s||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}function dE(e){return 1e3*Number(e)}function dT(e){let[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return h6("JWT malformed, contained fewer than 3 sections"),null;try{let e=er(r);if(!e)return h6("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return h6("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}function dC(e){let t=dT(e);return dt(t,"internal-error"),dt(void 0!==t.exp,"internal-error"),dt(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function dI(e,t,r=!1){if(r)return t;try{return await t}catch(t){throw t instanceof e_&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class dP{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class dA{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=dk(this.lastLoginAt),this.creationTime=dk(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function dO(e){var t;let r=e.auth,n=await e.getIdToken(),i=await dI(e,dx(r,{idToken:n}));dt(null==i?void 0:i.users.length,r,"internal-error");let o=i.users[0];e._notifyReloadListener(o);let s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?dN(o.providerUserInfo):[],a=[...e.providerData.filter(e=>!s.some(t=>t.providerId===e.providerId)),...s],l=e.isAnonymous,c=!(e.email&&o.passwordHash)&&!(null==a?void 0:a.length);Object.assign(e,{uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new dA(o.createdAt,o.lastLoginAt),isAnonymous:!!l&&c})}async function dR(e){let t=e$(e);await dO(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function dN(e){return e.map(e=>{var{providerId:t}=e,r=(0,h1._T)(e,["providerId"]);return{providerId:t,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}async function dj(e,t){let r=await df(e,{},async()=>{let r=eD({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,o=dm(e,n,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",dl.fetch()(o,{method:"POST",headers:s,body:r})});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function dD(e,t){return dd(e,"POST","/v2/accounts:revokeToken",dh(e,t))}class dM{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){dt(e.idToken,"internal-error"),dt(void 0!==e.idToken,"internal-error"),dt(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):dC(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){dt(0!==e.length,"internal-error");let t=dC(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(dt(this.refreshToken,e,"user-token-expired"),this.refreshToken)?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:r,refreshToken:n,expiresIn:i}=await dj(e,t);this.updateTokensAndExpiration(r,n,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){let{refreshToken:r,accessToken:n,expirationTime:i}=t,o=new dM;return r&&(dt("string"==typeof r,"internal-error",{appName:e}),o.refreshToken=r),n&&(dt("string"==typeof n,"internal-error",{appName:e}),o.accessToken=n),i&&(dt("number"==typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new dM,this.toJSON())}_performRefresh(){return dr("not implemented")}}function dL(e,t){dt("string"==typeof e||void 0===e,"internal-error",{appName:t})}class dF{constructor(e){var{uid:t,auth:r,stsTokenManager:n}=e,i=(0,h1._T)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new dP(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=r,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new dA(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await dI(this,this.stsTokenManager.getToken(this.auth,e));return dt(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return dS(this,e)}reload(){return dR(this)}_assign(e){this!==e&&(dt(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new dF(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){dt(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await dO(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(ty(this.auth.app))return Promise.reject(h7(this.auth));let e=await this.getIdToken();return await dI(this,d_(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var r,n,i,o,s,a,l,c;let u=null!==(r=t.displayName)&&void 0!==r?r:void 0,h=null!==(n=t.email)&&void 0!==n?n:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,y=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:v,emailVerified:b,isAnonymous:w,providerData:_,stsTokenManager:x}=t;dt(v&&x,e,"internal-error");let k=dM.fromJSON(this.name,x);dt("string"==typeof v,e,"internal-error"),dL(u,e.name),dL(h,e.name),dt("boolean"==typeof b,e,"internal-error"),dt("boolean"==typeof w,e,"internal-error"),dL(d,e.name),dL(f,e.name),dL(p,e.name),dL(m,e.name),dL(g,e.name),dL(y,e.name);let S=new dF({uid:v,auth:e,email:h,emailVerified:b,displayName:u,isAnonymous:w,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:k,createdAt:g,lastLoginAt:y});return _&&Array.isArray(_)&&(S.providerData=_.map(e=>Object.assign({},e))),m&&(S._redirectEventId=m),S}static async _fromIdTokenResponse(e,t,r=!1){let n=new dM;n.updateFromServerResponse(t);let i=new dF({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await dO(i),i}static async _fromGetAccountInfoResponse(e,t,r){let n=t.users[0];dt(void 0!==n.localId,"internal-error");let i=void 0!==n.providerUserInfo?dN(n.providerUserInfo):[],o=!(n.email&&n.passwordHash)&&!(null==i?void 0:i.length),s=new dM;s.updateFromIdToken(r);let a=new dF({uid:n.localId,auth:e,stsTokenManager:s,isAnonymous:o});return Object.assign(a,{uid:n.localId,displayName:n.displayName||null,photoURL:n.photoUrl||null,email:n.email||null,emailVerified:n.emailVerified||!1,phoneNumber:n.phoneNumber||null,tenantId:n.tenantId||null,providerData:i,metadata:new dA(n.createdAt,n.lastLoginAt),isAnonymous:!(n.email&&n.passwordHash)&&!(null==i?void 0:i.length)}),a}}let dz=new Map;function dU(e){var t,r;t="Expected a class definition",e instanceof Function||dr(t);let n=dz.get(e);return n?(r="Instance stored in cache mismatched with class",n instanceof e||dr(r)):(n=new e,dz.set(e,n)),n}class dB{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function dV(e,t,r){return`firebase:${e}:${t}:${r}`}dB.type="NONE";class dq{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;let{config:n,name:i}=this.auth;this.fullUserKey=dV(this.userKey,n.apiKey,i),this.fullPersistenceKey=dV("persistence",n.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?dF._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new dq(dU(dB),e,r);let n=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=n[0]||dU(dB),o=dV(r,e.config.apiKey,e.name),s=null;for(let r of t)try{let t=await r._get(o);if(t){let n=dF._fromJSON(e,t);r!==i&&(s=n),i=r;break}}catch(e){}let a=n.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&a.length&&(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(o)}catch(e){}}))),new dq(i,e,r)}}function d$(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(dK(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(dW(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(dY(t))return"Blackberry";if(dX(t))return"Webos";if(dH(t))return"Safari";if((t.includes("chrome/")||dG(t))&&!t.includes("edge/"))return"Chrome";if(dQ(t))return"Android";let r=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==r?void 0:r.length)===2)return r[1]}return"Other"}function dW(e=ef()){return/firefox\//i.test(e)}function dH(e=ef()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function dG(e=ef()){return/crios\//i.test(e)}function dK(e=ef()){return/iemobile/i.test(e)}function dQ(e=ef()){return/android/i.test(e)}function dY(e=ef()){return/blackberry/i.test(e)}function dX(e=ef()){return/webos/i.test(e)}function dJ(e=ef()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function dZ(e=ef()){return dJ(e)||dQ(e)||dX(e)||dY(e)||/windows phone/i.test(e)||dK(e)}function d0(e,t=[]){let r;switch(e){case"Browser":r=d$(ef());break;case"Worker":r=`${d$(ef())}-${e}`;break;default:r=e}let n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${tw}/${n}`}class d1{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let r=t=>new Promise((r,n)=>{try{let n=e(t);r(n)}catch(e){n(e)}});r.onAbort=t,this.queue.push(r);let n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}async function d2(e,t={}){return dd(e,"GET","/v2/passwordPolicy",dh(e,t))}class d4{constructor(e){var t,r,n,i;let o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(n=null===(r=e.allowedNonAlphanumericCharacters)||void 0===r?void 0:r.join(""))&&void 0!==n?n:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,r,n,i,o,s;let a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(r=a.meetsMaxPasswordLength)||void 0===r||r),a.isValid&&(a.isValid=null===(n=a.containsLowercaseLetter)||void 0===n||n),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){let r=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)r=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,n,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class d5{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new d6(this),this.idTokenSubscription=new d6(this),this.beforeStateQueue=new d1(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=h4,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=dU(t)),this._initializationPromise=this.queue(async()=>{var r,n;if(!this._deleted&&(this.persistenceManager=await dq.create(this,e),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(n=this.currentUser)||void 0===n?void 0:n.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await dx(this,{idToken:e}),r=await dF._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(r)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if(ty(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let r=await this.assertedPersistence.getCurrentUser(),n=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null==n?void 0:n._redirectEventId,s=await this.tryRedirectSignIn(e);(!r||r===o)&&(null==s?void 0:s.user)&&(n=s.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(e){n=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return(dt(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId)?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await dO(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(ty(this.app))return Promise.reject(h7(this));let t=e?e$(e):null;return t&&dt(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&dt(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return ty(this.app)?Promise.reject(h7(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return ty(this.app)?Promise.reject(h7(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(dU(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new d4(await d2(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new ex("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await dD(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&dU(e)||this._popupRedirectResolver;dt(t,this,"argument-error"),this.redirectPersistenceManager=await dq.create(this,[dU(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,r;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(r=this.redirectUser)||void 0===r?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let r=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,n){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),o=!1,s=this._isInitialized?Promise.resolve():this._initializationPromise;if(dt(s,this,"internal-error"),s.then(()=>{o||i(this.currentUser)}),"function"==typeof t){let i=e.addObserver(t,r,n);return()=>{o=!0,i()}}{let r=e.addObserver(t);return()=>{o=!0,r()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return dt(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=d0(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let r=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());r&&(t["X-Firebase-Client"]=r);let n=await this._getAppCheckToken();return n&&(t["X-Firebase-AppCheck"]=n),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){h5.logLevel<=I.WARN&&h5.warn(`Auth (${tw}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}class d6{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){let r=new ez(e,void 0);return r.subscribe.bind(r)}(e=>this.observer=e)}get next(){return dt(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let d3={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function d9(e){return`__${e}${Math.floor(1e6*Math.random())}`}class d8{constructor(e){this.type="recaptcha-enterprise",this.auth=e$(e)}async verify(e="verify",t=!1){async function r(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,r)=>{dw(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)r(Error("recaptcha Enterprise site key undefined"));else{let r=new db(n);return null==e.tenantId?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,t(r.siteKey)}}).catch(e=>{r(e)})})}function n(t,r,n){let i=window.grecaptcha;dv(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{r(e)}).catch(()=>{r("NO_RECAPTCHA")})}):n(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,i)=>{r(this.auth).then(r=>{if(!t&&dv(window.grecaptcha))n(r,e,i);else{var o;if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}let t=d3.recaptchaEnterpriseScript;0!==t.length&&(t+=r),(o=t,d3.loadJS(o)).then(()=>{n(r,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function d7(e,t,r,n=!1){let i;let o=new d8(e);try{i=await o.verify(r)}catch(e){i=await o.verify(r,!0)}let s=Object.assign({},t);return n?Object.assign(s,{captchaResp:i}):Object.assign(s,{captchaResponse:i}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function fe(e,t,r,n){var i;if(null===(i=e._getRecaptchaConfig())||void 0===i||!i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async i=>{if("auth/missing-recaptcha-token"!==i.code)return Promise.reject(i);{console.log(`${r} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let i=await d7(e,t,r,"getOobCode"===r);return n(e,i)}});{let i=await d7(e,t,r,"getOobCode"===r);return n(e,i)}}function ft(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function fr(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class fn{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return dr("not implemented")}_getIdTokenResponse(e){return dr("not implemented")}_linkToIdToken(e,t){return dr("not implemented")}_getReauthenticationResolver(e){return dr("not implemented")}}async function fi(e,t){return dd(e,"POST","/v1/accounts:resetPassword",dh(e,t))}async function fo(e,t){return dd(e,"POST","/v1/accounts:signUp",t)}async function fs(e,t){return dp(e,"POST","/v1/accounts:signInWithPassword",dh(e,t))}async function fa(e,t){return dd(e,"POST","/v1/accounts:sendOobCode",dh(e,t))}async function fl(e,t){return fa(e,t)}async function fc(e,t){return dp(e,"POST","/v1/accounts:signInWithEmailLink",dh(e,t))}async function fu(e,t){return dp(e,"POST","/v1/accounts:signInWithEmailLink",dh(e,t))}class fh extends fn{constructor(e,t,r,n=null){super("password",r),this._email=e,this._password=t,this._tenantId=n}static _fromEmailAndPassword(e,t){return new fh(e,t,"password")}static _fromEmailAndCode(e,t,r=null){return new fh(e,t,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return fe(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",fs);case"emailLink":return fc(e,{email:this._email,oobCode:this._password});default:h3(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return fe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",fo);case"emailLink":return fu(e,{idToken:t,email:this._email,oobCode:this._password});default:h3(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function fd(e,t){return dp(e,"POST","/v1/accounts:signInWithIdp",dh(e,t))}class ff extends fn{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new ff(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):h3("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:r,signInMethod:n}=t,i=(0,h1._T)(t,["providerId","signInMethod"]);if(!r||!n)return null;let o=new ff(r,n);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return fd(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,fd(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,fd(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=eD(t)}return e}}async function fp(e,t){return dd(e,"POST","/v1/accounts:sendVerificationCode",dh(e,t))}async function fm(e,t){return dp(e,"POST","/v1/accounts:signInWithPhoneNumber",dh(e,t))}async function fg(e,t){let r=await dp(e,"POST","/v1/accounts:signInWithPhoneNumber",dh(e,t));if(r.temporaryProof)throw dy(e,"account-exists-with-different-credential",r);return r}let fy={USER_NOT_FOUND:"user-not-found"};async function fv(e,t){return dp(e,"POST","/v1/accounts:signInWithPhoneNumber",dh(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),fy)}class fb extends fn{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new fb({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new fb({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return fm(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return fg(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return fv(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:n}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}=e;return r||t||n||i?new fb({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}class fw{constructor(e){var t,r,n,i,o,s;let a=eM(eL(e)),l=null!==(t=a.apiKey)&&void 0!==t?t:null,c=null!==(r=a.oobCode)&&void 0!==r?r:null,u=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(n=a.mode)&&void 0!==n?n:null);dt(l&&c&&u,"argument-error"),this.apiKey=l,this.operation=u,this.code=c,this.continueUrl=null!==(i=a.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(o=a.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(s=a.tenantId)&&void 0!==s?s:null}static parseLink(e){let t=function(e){let t=eM(eL(e)).link,r=t?eM(eL(t)).deep_link_id:null,n=eM(eL(e)).deep_link_id;return(n?eM(eL(n)).link:null)||n||r||t||e}(e);try{return new fw(t)}catch(e){return null}}}class f_{constructor(){this.providerId=f_.PROVIDER_ID}static credential(e,t){return fh._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let r=fw.parseLink(t);return dt(r,"argument-error"),fh._fromEmailAndCode(e,r.code,r.tenantId)}}f_.PROVIDER_ID="password",f_.EMAIL_PASSWORD_SIGN_IN_METHOD="password",f_.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class fx{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class fk extends fx{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class fS extends fk{constructor(){super("facebook.com")}static credential(e){return ff._fromParams({providerId:fS.PROVIDER_ID,signInMethod:fS.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return fS.credentialFromTaggedObject(e)}static credentialFromError(e){return fS.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return fS.credential(e.oauthAccessToken)}catch(e){return null}}}fS.FACEBOOK_SIGN_IN_METHOD="facebook.com",fS.PROVIDER_ID="facebook.com";class fE extends fk{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return ff._fromParams({providerId:fE.PROVIDER_ID,signInMethod:fE.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return fE.credentialFromTaggedObject(e)}static credentialFromError(e){return fE.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return fE.credential(t,r)}catch(e){return null}}}fE.GOOGLE_SIGN_IN_METHOD="google.com",fE.PROVIDER_ID="google.com";class fT extends fk{constructor(){super("github.com")}static credential(e){return ff._fromParams({providerId:fT.PROVIDER_ID,signInMethod:fT.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return fT.credentialFromTaggedObject(e)}static credentialFromError(e){return fT.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return fT.credential(e.oauthAccessToken)}catch(e){return null}}}fT.GITHUB_SIGN_IN_METHOD="github.com",fT.PROVIDER_ID="github.com";class fC extends fk{constructor(){super("twitter.com")}static credential(e,t){return ff._fromParams({providerId:fC.PROVIDER_ID,signInMethod:fC.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return fC.credentialFromTaggedObject(e)}static credentialFromError(e){return fC.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return fC.credential(t,r)}catch(e){return null}}}async function fI(e,t){return dp(e,"POST","/v1/accounts:signUp",dh(e,t))}fC.TWITTER_SIGN_IN_METHOD="twitter.com",fC.PROVIDER_ID="twitter.com";class fP{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,n=!1){return new fP({user:await dF._fromIdTokenResponse(e,r,n),providerId:fA(r),_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){return await e._updateTokensIfNecessary(r,!0),new fP({user:e,providerId:fA(r),_tokenResponse:r,operationType:t})}}function fA(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class fO extends e_{constructor(e,t,r,n){var i;super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,fO.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,n){return new fO(e,t,r,n)}}function fR(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(r=>{if("auth/multi-factor-auth-required"===r.code)throw fO._fromErrorAndOperation(e,r,t,n);throw r})}async function fN(e,t,r=!1){let n=await dI(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return fP._forOperation(e,"link",n)}async function fj(e,t,r=!1){let{auth:n}=e;if(ty(n.app))return Promise.reject(h7(n));let i="reauthenticate";try{let o=await dI(e,fR(n,i,t,e),r);dt(o.idToken,n,"internal-error");let s=dT(o.idToken);dt(s,n,"internal-error");let{sub:a}=s;return dt(e.uid===a,n,"user-mismatch"),fP._forOperation(e,i,o)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&h3(n,"user-mismatch"),e}}async function fD(e,t,r=!1){if(ty(e.app))return Promise.reject(h7(e));let n="signIn",i=await fR(e,n,t),o=await fP._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(o.user),o}class fM{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?fL._fromServerResponse(e,t):"totpInfo"in t?fF._fromServerResponse(e,t):h3(e,"internal-error")}}class fL extends fM{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new fL(t)}}class fF extends fM{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new fF(t)}}async function fz(e){let t=e$(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function fU(e,t,r){let n=e$(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};if(r){var o;dt((null===(o=r.url)||void 0===o?void 0:o.length)>0,n,"invalid-continue-uri"),dt(void 0===r.dynamicLinkDomain||r.dynamicLinkDomain.length>0,n,"invalid-dynamic-link-domain"),i.continueUrl=r.url,i.dynamicLinkDomain=r.dynamicLinkDomain,i.canHandleCodeInApp=r.handleCodeInApp,r.iOS&&(dt(r.iOS.bundleId.length>0,n,"missing-ios-bundle-id"),i.iOSBundleId=r.iOS.bundleId),r.android&&(dt(r.android.packageName.length>0,n,"missing-android-pkg-name"),i.androidInstallApp=r.android.installApp,i.androidMinimumVersionCode=r.android.minimumVersion,i.androidPackageName=r.android.packageName)}await fe(n,i,"getOobCode",fl)}async function fB(e,t,r){await fi(e$(e),{oobCode:t,newPassword:r}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&fz(e),t})}async function fV(e,t){let r=e$(e),n=await fi(r,{oobCode:t}),i=n.requestType;switch(dt(i,r,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":dt(n.newEmail,r,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":dt(n.mfaInfo,r,"internal-error");default:dt(n.email,r,"internal-error")}let o=null;return n.mfaInfo&&(o=fM._fromServerResponse(e$(r),n.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.newEmail:n.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===n.requestType?n.email:n.newEmail)||null,multiFactorInfo:o},operation:i}}async function fq(e,t){let{data:r}=await fV(e$(e),t);return r.email}async function f$(e,t,r){if(ty(e.app))return Promise.reject(h7(e));let n=e$(e),i=fe(n,{returnSecureToken:!0,email:t,password:r,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",fI),o=await i.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&fz(e),t}),s=await fP._fromIdTokenResponse(n,"signIn",o);return await n._updateCurrentUser(s.user),s}new WeakMap;let fW="__sak";class fH{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(fW,"1"),this.storage.removeItem(fW),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class fG extends fH{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=dZ(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,r)=>{this.notifyListeners(e,r)});return}let r=e.key;t?this.detachListener():this.stopPolling();let n=()=>{let e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},i=this.storage.getItem(r);(function(){let e=ef();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0})()&&10===document.documentMode&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(n,10):n()}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}fG.type="LOCAL";class fK extends fH{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}fK.type="SESSION";class fQ{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let r=new fQ(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:r,data:n}=e.data,i=this.handlersMap[r];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:r});let o=Array.from(i).map(async t=>t(e.origin,n)),s=await Promise.all(o.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:r,response:s})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function fY(e="",t=10){let r="";for(let e=0;e<t;e++)r+=Math.floor(10*Math.random());return e+r}fQ.receivers=[];class fX{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,r=50){let n,i;let o="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!o)throw Error("connection_unavailable");return new Promise((s,a)=>{let l=fY("",20);o.port1.start();let c=setTimeout(()=>{a(Error("unsupported_event"))},r);i={messageChannel:o,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(c),n=setTimeout(()=>{a(Error("timeout"))},3e3);break;case"done":clearTimeout(n),s(e.data.response);break;default:clearTimeout(c),clearTimeout(n),a(Error("invalid_response"))}}},this.handlers.add(i),o.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[o.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}function fJ(){return window}function fZ(){return void 0!==fJ().WorkerGlobalScope&&"function"==typeof fJ().importScripts}async function f0(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}let f1="firebaseLocalStorageDb",f2="firebaseLocalStorage",f4="fbase_key";class f5{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function f6(e,t){return e.transaction([f2],t?"readwrite":"readonly").objectStore(f2)}function f3(){let e=indexedDB.open(f1,1);return new Promise((t,r)=>{e.addEventListener("error",()=>{r(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(f2,{keyPath:f4})}catch(e){r(e)}}),e.addEventListener("success",async()=>{let r=e.result;r.objectStoreNames.contains(f2)?t(r):(r.close(),await new f5(indexedDB.deleteDatabase(f1)).toPromise(),t(await f3()))})})}async function f9(e,t,r){return new f5(f6(e,!0).put({[f4]:t,value:r})).toPromise()}async function f8(e,t){let r=f6(e,!1).get(t),n=await new f5(r).toPromise();return void 0===n?null:n.value}function f7(e,t){return new f5(f6(e,!0).delete(t)).toPromise()}class pe{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await f3()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return fZ()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=fQ._getInstance(fZ()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await f0(),!this.activeServiceWorker)return;this.sender=new fX(this.activeServiceWorker);let r=await this.sender._send("ping",{},800);r&&(null===(e=r[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=r[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await f3();return await f9(e,fW,"1"),await f7(e,fW),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>f9(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>f8(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>f7(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new f5(f6(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],r=new Set;if(0!==e.length)for(let{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!r.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}async function pt(e,t,r){var n,i,o;let s=await r.verify();try{let a;if(dt("string"==typeof s,e,"argument-error"),dt("recaptcha"===r.type,e,"argument-error"),a="string"==typeof t?{phoneNumber:t}:t,"session"in a){let t=a.session;if("phoneNumber"in a)return dt("enroll"===t.type,e,"internal-error"),(await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:a.phoneNumber,recaptchaToken:s}},dd(e,"POST","/v2/accounts/mfaEnrollment:start",dh(e,i)))).phoneSessionInfo.sessionInfo;{dt("signin"===t.type,e,"internal-error");let r=(null===(n=a.multiFactorHint)||void 0===n?void 0:n.uid)||a.multiFactorUid;return dt(r,e,"missing-multi-factor-info"),(await (o={mfaPendingCredential:t.credential,mfaEnrollmentId:r,phoneSignInInfo:{recaptchaToken:s}},dd(e,"POST","/v2/accounts/mfaSignIn:start",dh(e,o)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await fp(e,{phoneNumber:a.phoneNumber,recaptchaToken:s});return t}}finally{r._reset()}}pe.type="LOCAL",d9("rcb"),new ds(3e4,6e4);class pr{constructor(e){this.providerId=pr.PROVIDER_ID,this.auth=e$(e)}verifyPhoneNumber(e,t){return pt(this.auth,e,e$(t))}static credential(e,t){return fb._fromVerification(e,t)}static credentialFromResult(e){return pr.credentialFromTaggedObject(e)}static credentialFromError(e){return pr.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:r}=e;return t&&r?fb._fromTokenResponse(t,r):null}}pr.PROVIDER_ID="phone",pr.PHONE_SIGN_IN_METHOD="phone";class pn extends fn{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return fd(e,this._buildIdpRequest())}_linkToIdToken(e,t){return fd(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return fd(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function pi(e){return fD(e.auth,new pn(e),e.bypassAuthState)}function po(e){let{auth:t,user:r}=e;return dt(r,t,"internal-error"),fj(r,new pn(e),e.bypassAuthState)}async function ps(e){let{auth:t,user:r}=e;return dt(r,t,"internal-error"),fN(r,new pn(e),e.bypassAuthState)}class pa{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:o,type:s}=e;if(o){this.reject(o);return}let a={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return pi;case"linkViaPopup":case"linkViaRedirect":return ps;case"reauthViaPopup":case"reauthViaRedirect":return po;default:h3(this.auth,"internal-error")}}resolve(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||dr(r),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||dr(r),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let pl=new ds(2e3,1e4);class pc extends pa{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,pc.currentPopupAction&&pc.currentPopupAction.cancel(),pc.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return dt(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||dr(t);let r=fY();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],r),this.authWindow.associatedEvent=r,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(h9(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(h9(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,pc.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,r;if(null===(r=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===r?void 0:r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(h9(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,pl.get())};e()}}pc.currentPopupAction=null;let pu=new Map;class ph extends pa{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=pu.get(this.auth._key());if(!e){try{let t=await pd(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}pu.set(this.auth._key(),e)}return this.bypassAuthState||pu.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function pd(e,t){let r=dV("pendingRedirect",t.config.apiKey,t.name),n=dU(e._redirectPersistence);if(!await n._isAvailable())return!1;let i=await n._get(r)==="true";return await n._remove(r),i}function pf(e,t){pu.set(e._key(),t)}async function pp(e,t,r=!1){if(ty(e.app))return Promise.reject(h7(e));let n=e$(e),i=t?dU(t):(dt(n._popupRedirectResolver,n,"argument-error"),n._popupRedirectResolver),o=new ph(n,i,r),s=await o.execute();return s&&!r&&(delete s.user._redirectEventId,await n._persistUserIfCurrent(s.user),await n._setRedirectUser(null,t)),s}class pm{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return py(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var r;if(e.error&&!py(e)){let n=(null===(r=e.error.code)||void 0===r?void 0:r.split("auth/")[1])||"internal-error";t.onError(h9(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(pg(e))}saveEventToCache(e){this.cachedEventUids.add(pg(e)),this.lastProcessedEventTime=Date.now()}}function pg(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function py({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}async function pv(e,t={}){return dd(e,"GET","/v1/projects",t)}let pb=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,pw=/^https?/;async function p_(e){if(e.config.emulator)return;let{authorizedDomains:t}=await pv(e);for(let e of t)try{if(function(e){let t=dn(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===n?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&i.hostname===n}if(!pw.test(r))return!1;if(pb.test(e))return n===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}(e))return}catch(e){}h3(e,"unauthorized-domain")}let px=new ds(3e4,6e4);function pk(){let e=fJ().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let pS=null,pE=new ds(5e3,15e3),pT={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},pC=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function pI(e){let t=await (pS=pS||new Promise((t,r)=>{var n,i,o,s;function a(){pk(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{pk(),r(h9(e,"network-request-failed"))},timeout:px.get()})}if(null===(i=null===(n=fJ().gapi)||void 0===n?void 0:n.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(o=fJ().gapi)||void 0===o?void 0:o.load)a();else{let t=d9("iframefcb");return fJ()[t]=()=>{gapi.load?a():r(h9(e,"network-request-failed"))},(s=`${d3.gapiScript}?onload=${t}`,d3.loadJS(s)).catch(e=>r(e))}}).catch(e=>{throw pS=null,e})),r=fJ().gapi;return dt(r,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;dt(t.authDomain,e,"auth-domain-config-required");let r=t.emulator?da(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,n={apiKey:t.apiKey,appName:e.name,v:tw},i=pC.get(e.config.apiHost);i&&(n.eid=i);let o=e._getFrameworks();return o.length&&(n.fw=o.join(",")),`${r}?${eD(n).slice(1)}`}(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pT,dontclear:!0},t=>new Promise(async(r,n)=>{await t.restyle({setHideOnLeave:!1});let i=h9(e,"network-request-failed"),o=fJ().setTimeout(()=>{n(i)},pE.get());function s(){fJ().clearTimeout(o),r(t)}t.ping(s).then(s,()=>{n(i)})}))}let pP={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class pA{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let pO=encodeURIComponent("fac");async function pR(e,t,r,n,i,o){dt(e.config.authDomain,e,"auth-domain-config-required"),dt(e.config.apiKey,e,"invalid-api-key");let s={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:tw,eventId:i};if(t instanceof fx)for(let[r,n]of(t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",eO(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(o||{})))s[r]=n;if(t instanceof fk){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(s.scopes=e.join(","))}for(let t of(e.tenantId&&(s.tid=e.tenantId),Object.keys(s)))void 0===s[t]&&delete s[t];let a=await e._getAppCheckToken(),l=a?`#${pO}=${encodeURIComponent(a)}`:"";return`${function({config:e}){return e.emulator?da(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${eD(s).slice(1)}${l}`}let pN="webStorageSupport";class pj{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=fK,this._completeRedirectFn=pp,this._overrideRedirectResult=pf}async _openPopup(e,t,r,n){var i,o,s;o=null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,s="_initialize() not called before _openPopup()",o||dr(s);let a=await pR(e,t,r,dn(),n);return function(e,t,r,n=500,i=600){let o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-n)/2,0).toString(),a="",l=Object.assign(Object.assign({},pP),{width:n.toString(),height:i.toString(),top:o,left:s}),c=ef().toLowerCase();r&&(a=dG(c)?"_blank":r),dW(c)&&(t=t||"http://localhost",l.scrollbars="yes");let u=Object.entries(l).reduce((e,[t,r])=>`${e}${t}=${r},`,"");if(function(e=ef()){var t;return dJ(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(c)&&"_self"!==a)return function(e,t){let r=document.createElement("a");r.href=e,r.target=t;let n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}(t||"",a),new pA(null);let h=window.open(t||"",a,u);dt(h,e,"popup-blocked");try{h.focus()}catch(e){}return new pA(h)}(e,a,fY())}async _openRedirect(e,t,r,n){var i;return await this._originValidation(e),i=await pR(e,t,r,dn(),n),fJ().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var r;let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(r="If manager is not set, promise should be",n||dr(r),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await pI(e),r=new pm(e);return t.register("authEvent",t=>(dt(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(pN,{type:pN},r=>{var n;let i=null===(n=null==r?void 0:r[0])||void 0===n?void 0:n[pN];void 0!==i&&t(!!i),h3(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=p_(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return dZ()||dH()||dJ()}}class pD{constructor(e){this.factorId=e}_process(e,t,r){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,r);case"signin":return this._finalizeSignIn(e,t.credential);default:return dr("unexpected MultiFactorSessionType")}}}class pM extends pD{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new pM(e)}_finalizeEnroll(e,t,r){return dd(e,"POST","/v2/accounts/mfaEnrollment:finalize",dh(e,{idToken:t,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return dd(e,"POST","/v2/accounts/mfaSignIn:finalize",dh(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class pL{constructor(){}static assertion(e){return pM._fromCredential(e)}}pL.FACTOR_ID="phone";class pF{static assertionForEnrollment(e,t){return pz._fromSecret(e,t)}static assertionForSignIn(e,t){return pz._fromEnrollmentId(e,t)}static async generateSecret(e){var t,r;dt(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let n=await dd(r=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",dh(r,{idToken:e.credential,totpEnrollmentInfo:{}}));return pU._fromStartTotpMfaEnrollmentResponse(n,e.user.auth)}}pF.FACTOR_ID="totp";class pz extends pD{constructor(e,t,r){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=r}static _fromSecret(e,t){return new pz(t,void 0,e)}static _fromEnrollmentId(e,t){return new pz(t,e)}async _finalizeEnroll(e,t,r){return dt(void 0!==this.secret,e,"argument-error"),dd(e,"POST","/v2/accounts/mfaEnrollment:finalize",dh(e,{idToken:t,displayName:r,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){dt(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let r={verificationCode:this.otp};return dd(e,"POST","/v2/accounts/mfaSignIn:finalize",dh(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:r}))}}class pU{constructor(e,t,r,n,i,o,s){this.sessionInfo=o,this.auth=s,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=r,this.codeIntervalSeconds=n,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new pU(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var r;let n=!1;return(pB(e)||pB(t))&&(n=!0),n&&(pB(e)&&(e=(null===(r=this.auth.currentUser)||void 0===r?void 0:r.email)||"unknownuser"),pB(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function pB(e){return void 0===e||(null==e?void 0:e.length)===0}var pV="@firebase/auth",pq="1.7.9";class p${constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){dt(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let pW=eu("authIdTokenMaxAge")||300,pH=null,pG=e=>async t=>{let r=t&&await t.getIdTokenResult(),n=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(n&&n>pW)return;let i=null==r?void 0:r.token;pH!==i&&(pH=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};d3={loadJS:e=>new Promise((t,r)=>{var n,i;let o=document.createElement("script");o.setAttribute("src",e),o.onload=t,o.onerror=e=>{let t=h9("internal-error");t.customData=e,r(t)},o.type="text/javascript",o.charset="UTF-8",(null!==(i=null===(n=document.getElementsByTagName("head"))||void 0===n?void 0:n[0])&&void 0!==i?i:document).appendChild(o)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},C="Browser",tm(new eW("auth",(e,{options:t})=>{let r=e.getProvider("app").getImmediate(),n=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=r.options;dt(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});let a=new d5(r,n,i,{apiKey:o,authDomain:s,clientPlatform:C,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:d0(C)});return function(e,t){let r=(null==t?void 0:t.persistence)||[],n=(Array.isArray(r)?r:[r]).map(dU);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,null==t?void 0:t.popupRedirectResolver)}(a,t),a},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider("auth-internal").initialize()})),tm(new eW("auth-internal",e=>new p$(e$(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),tk(pV,pq,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(C)),tk(pV,pq,"esm2017");let pK=t_({apiKey:"AIzaSyCdtSQUoSqb_LSxWvS5Q-Hqugf-BFH9AqY",appId:"1:995746606634:web:338be4f04125ca1ce95d53",authDomain:"options-md-357200.firebaseapp.com",databaseURL:"https://options-md-357200.firebaseio.com",projectId:"options-md-357200",storageBucket:"options-md-357200.appspot.com",messagingSenderId:"995746606634",measurementId:"G-ZSKWYGTDHY"});!function(e=tx(),t){let r=tg(e=e$(e),tQ).getImmediate({identifier:void 0}),n=el("storage");n&&function(e,t,r,n={}){!function(e,t,r,n={}){e.host=`${t}:${r}`,e._protocol="http";let{mockUserToken:i}=n;i&&(e._overrideAuthToken="string"==typeof i?i:ed(i,e.app.options.projectId))}(e,t,r,n)}(r,...n)}(pK);let pQ=function(e=tx()){let t=tg(e,"auth");if(t.isInitialized())return t.getImmediate();let r=function(e,t){let r=tg(e,"auth");if(r.isInitialized()){let e=r.getImmediate();if(eN(r.getOptions(),null!=t?t:{}))return e;h3(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:pj,persistence:[pe,fG,fK]}),n=eu("authTokenSyncURL");if(n&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(n,location.origin);if(location.origin===e.origin){var i,o;let t=pG(e.toString());i=()=>t(r.currentUser),e$(r).beforeAuthStateChanged(t,i),o=e=>t(e),e$(r).onIdTokenChanged(o,void 0,void 0)}}let s=ea("auth");return s&&function(e,t,r){let n=e$(e);dt(n._canInitEmulator,n,"emulator-config-failed"),dt(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");let i=ft(t),{host:o,port:s}=function(e){let t=ft(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};let n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){let e=i[1];return{host:e,port:fr(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:fr(t)}}}(t),a=null===s?"":`:${s}`;n.config.emulator={url:`${i}//${o}${a}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:o,port:s,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:!1})}),function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}(r,`http://${s}`),r}(),pY=function(e,t){let r=tg(tx(),"firestore").getImmediate({identifier:"(default)"});if(!r._initialized){let e=el("firestore");e&&function(e,t,r,n={}){var i;let o=(e=ua(e,uc))._getSettings(),s=`${t}:${r}`;if("firestore.googleapis.com"!==o.host&&o.host!==s&&ov("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),n.mockUserToken){let t,r;if("string"==typeof n.mockUserToken)t=n.mockUserToken,r=od.MOCK_USER;else{t=ed(n.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let o=n.mockUserToken.sub||n.mockUserToken.user_id;if(!o)throw new ox(o_.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");r=new od(o)}e._authCredentials=new oT(new oS(t,r))}}(r,...e)}return r}();!function(e=tx()){let t=tg(e,"database").getImmediate({identifier:void 0});if(!t._instanceStarted){let e=el("database");e&&function(e,t,r,n={}){var i;let o;(e=e$(e))._checkNotDeleted("useEmulator"),e._instanceStarted&&ro("Cannot call useEmulator() after instance has already been initialized.");let s=e._repoInternal;s.repoInfo_.nodeAdmin?(n.mockUserToken&&ro('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),o=new rE(rE.OWNER)):n.mockUserToken&&(o=new rE("string"==typeof n.mockUserToken?n.mockUserToken:ed(n.mockUserToken,e.app.options.projectId))),i=o,s.repoInfo_=new rP(`${t}:${r}`,!1,s.repoInfo_.namespace,s.repoInfo_.webSocketOnly,s.repoInfo_.nodeAdmin,s.repoInfo_.persistenceKey,s.repoInfo_.includeNamespaceInQueryParams,!0),i&&(s.authTokenProvider_=i)}(t,...e)}}(),function(e=tx(),t=uG){let r=tg(e$(e),uW).getImmediate({identifier:t}),n=el("functions");n&&function(e,t,r){e$(e).emulatorOrigin=`http://${t}:${r}`}(r,...n)}(pK),hX().then(e=>{e&&(b=function(e=tx()){let t=tg(e=e$(e),hI);return t.isInitialized()?t.getImmediate():function(e,t={}){let r=tg(e,hI);if(r.isInitialized()){let e=r.getImmediate();if(eN(t,r.getOptions()))return e;throw hO.create("already-initialized")}return r.initialize({options:t})}(e)}(pK))})},52572:function(e,t,r){"use strict";r.d(t,{zx:function(){return p},gx:function(){return m.g}});var n=r(82729),i=r(85893),o=r(40645),s=r.n(o);r(67294);var a=r(16829),l=r(18173);function c(){let e=(0,n._)(["\n  margin: 1rem 0;\n  font-family: ",";\n  background-color: ",";\n  border-radius: ",";\n  color: ",";\n  cursor: pointer;\n  padding: 1rem 2rem;\n  border: none;\n  letter-spacing: 0.2px;\n  opacity: 1;\n  outline: none;\n  max-width: 100%;\n  white-space: nowrap;\n"]);return c=function(){return e},e}function u(){let e=(0,n._)(["\n  margin: 0.75rem 0;\n  font-family: ",";\n  background-color: ",";\n  border-radius: 5px;\n  color: ",";\n  cursor: pointer;\n  padding: 1rem 2rem;\n  border: none;\n  letter-spacing: 0.2px;\n  opacity: 1;\n  outline: none;\n  max-width: 100%;\n  transition: opacity ease-in-out 350ms;\n  white-space: nowrap;\n  &:hover {\n    opacity: 0.7;\n  }\n"]);return u=function(){return e},e}let h=()=>(0,i.jsx)("img",{src:"/images/loading-buffering.gif",style:{height:"18px",width:"auto",margin:"0 auto"}}),d=a.Z.button(c(),e=>{let{theme:t,fontFamily:r}=e;return r||t.primary.fonts.primary},e=>{let{theme:t}=e;return t.colors.black},e=>{let{square:t}=e;return t?"0px":"5px"},e=>{let{theme:t}=e;return t.colors.white}),f=a.Z.button(u(),e=>{let{theme:t}=e;return t.primary.fonts.secondary},e=>{let{theme:t}=e;return t.colors.black},e=>{let{theme:t}=e;return t.colors.white}),p=e=>{let{onClick:t,children:r,disabled:n=!1,loading:o=!1,type:a,variant:c}=e,u=e=>{e.preventDefault(),t()};switch(c){case"primary":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["bbfbb176726431b1",[l.fonts.Poppins,l.colors.black,l.colors.white]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"bbfbb176726431b1",dynamic:[l.fonts.Poppins,l.colors.black,l.colors.white],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";background-color:").concat(l.colors.black,";-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:").concat(l.colors.white,";cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});case"primary_round":return(0,i.jsx)(f,{theme:l,onClick:t?e=>u(e):null,children:o?(0,i.jsx)(h,{}):r});case"primary_white":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["fc21dace0179901e",[l.fonts.Poppins,l.colors.white,l.colors.black]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"fc21dace0179901e",dynamic:[l.fonts.Poppins,l.colors.white,l.colors.black],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";background-color:").concat(l.colors.white,";-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:").concat(l.colors.black,";cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1;outline:none;max-width:100%}.btn.__jsx-style-dynamic-selector:focus{border:1.5px solid black}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});case"primary_teal":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["60b1296d899b021d",[l.fonts.Poppins,l.colors.teal,l.colors.teal,l.colors.black]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"60b1296d899b021d",dynamic:[l.fonts.Poppins,l.colors.teal,l.colors.teal,l.colors.black],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";background-color:").concat(l.colors.teal,";border-color:").concat(l.colors.teal,";border:0px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;color:").concat(l.colors.black,";cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1;outline:none;max-width:100%}.btn.__jsx-style-dynamic-selector:focus{border:1.5px solid black}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});case"primary_pink":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["f238331baa8625a5",[l.fonts.Poppins,l.colors.pinkOther,l.colors.black]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"f238331baa8625a5",dynamic:[l.fonts.Poppins,l.colors.pinkOther,l.colors.black],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";background-color:").concat(l.colors.pinkOther,";-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:").concat(l.colors.black,";cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1;outline:none;max-width:100%}.btn.__jsx-style-dynamic-selector:focus{border:1.5px solid black}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});case"secondary":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>t(e):null,className:s().dynamic([["f10bb6f7cde5383a",[l.fonts.Poppins,l.colors.darkBlue,l.colors.white]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"f10bb6f7cde5383a",dynamic:[l.fonts.Poppins,l.colors.darkBlue,l.colors.white],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";background-color:").concat(l.colors.darkBlue,";-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:").concat(l.colors.white,";cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1;max-width:100%}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});case"cookie":return(0,i.jsx)(d,{theme:l,onClick:t?e=>u(e):null,fontFamily:l.fonts.Poppins,square:!0,children:o?(0,i.jsx)(h,{}):r});case"call_now":return(0,i.jsx)(f,{theme:l,onClick:t?e=>u(e):null,children:o?(0,i.jsx)(h,{}):r});case"quiz_back":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["13f41ae1c6ec679c",[l.fonts.Poppins]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):"Previous"}),(0,i.jsx)(s(),{id:"13f41ae1c6ec679c",dynamic:[l.fonts.Poppins],children:".btn.__jsx-style-dynamic-selector{background-color:white;border:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;color:black;cursor:pointer;font-family:".concat(l.fonts.Poppins,";font-size:16px;letter-spacing:.2px;margin:0 0 0 0;max-width:100%;opacity:1;outline:none;padding:.5rem 1rem}.btn.__jsx-style-dynamic-selector:focus{border:1.5px solid black}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});case"download-free-guide":return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["a8a4852bc24d2ed4",[l.fonts.Poppins]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"a8a4852bc24d2ed4",dynamic:[l.fonts.Poppins],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";font-size:13px;background-color:#c4d9dc;color:black;cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1;max-width:100%;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]});default:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:a,onClick:t?e=>u(e):null,className:s().dynamic([["c17d67b4a40f98d9",[l.fonts.Poppins,l.colors.black,l.colors.white]]])+" "+((n?"disabled btn":"btn")||""),children:o?(0,i.jsx)(h,{}):r}),(0,i.jsx)(s(),{id:"c17d67b4a40f98d9",dynamic:[l.fonts.Poppins,l.colors.black,l.colors.white],children:".btn.__jsx-style-dynamic-selector{margin:1rem 0;font-family:".concat(l.fonts.Poppins,";background-color:").concat(l.colors.black,";color:").concat(l.colors.white,";cursor:pointer;padding:1rem 2rem;border:none;letter-spacing:.2px;opacity:1;max-width:100%}.disabled.__jsx-style-dynamic-selector{opacity:.6}")})]})}};r(73935),r(73469);var m=r(73244);function g(){let e=(0,n._)(["\n  color: ",";\n  background: ",";\n  border-radius: 3px;\n  border: ",";\n  font-size: 2rem;\n  height: 72px;\n  padding-left: 0.5rem;\n  outline: 0;\n  width: ",";\n  :focus {\n    border: ",";\n  }\n  @media only screen and (max-width: ",") {\n    max-width: 95vw;\n  }\n"]);return g=function(){return e},e}function y(){let e=(0,n._)(["\n  color: ",";\n  background: ",";\n  border-radius: 3px;\n  border: ",";\n  font-size: 2rem;\n  height: 72px;\n  padding-left: 0.5rem;\n  outline: 0;\n  width: 100%;\n  :focus {\n    border: ",";\n  }\n  @media only screen and (max-width: ",") {\n    max-width: 95vw;\n  }\n"]);return y=function(){return e},e}a.Z.input(g(),e=>{let{theme:t}=e;return t.primary.input.color},e=>{let{theme:t}=e;return"".concat(t.primary.input.background,"66")},e=>{let{error:t,theme:r}=e;return t?"2px solid ".concat(r.primary.errors.color):"2px solid".concat(r.primary.input.background,"66")},e=>{let{width:t}=e;return t||"350px"},e=>{let{theme:t}=e;return"2px solid ".concat(t.primary.input.focusBorder)},l.breakpoints.small),a.Z.textarea(y(),e=>{let{theme:t}=e;return t.primary.input.color},e=>{let{theme:t}=e;return t.primary.input.background},e=>{let{error:t,theme:r}=e;return t?"2px solid ".concat(r.primary.errors.color):"2px solid".concat(r.primary.input.background)},e=>{let{theme:t}=e;return"2px solid ".concat(t.primary.input.focusBorder)},l.breakpoints.small),r(41664)},51040:function(e,t,r){"use strict";r.d(t,{Z:function(){return R},j:function(){return O}});var n=r(85893),i=r(40645),o=r.n(i),s=r(67294),a=r(33299),l=r(41664),c=r.n(l),u=r(39332),h=r(11163),d=r(45007),f=r(83658),p=r(57879),m=r(68029),g=r(38491),y=r(73636),v=r(5185),b=r(33251),w=r(12259),_=r(88074),x=r(82729),k=r(16829),S=r(18173);function E(){let e=(0,x._)(["\n  display: none;\n  @media screen and (max-width: ",") {\n    display: flex;\n    position: absolute;\n    right: 15px;\n    top: 15px;\n  }\n  flex-direction: column;\n  justify-content: space-around;\n  width: 2rem;\n  height: 1.5rem;\n  background: transparent;\n  border: none;\n  cursor: pointer;\n  padding: 0;\n  z-index: 10;\n\n  span {\n    width: 1.5rem;\n    height: 3px;\n    background: ",';\n    border-radius: 50px;\n    transition: all 0.3s linear;\n    position: relative;\n    transform-origin: 1px;\n\n    :first-of-type {\n      background-color: "black";\n      transform: ',';\n    }\n\n    :nth-of-type(2) {\n      background-color: "black";\n      opacity: ',";\n      transform: ",';\n    }\n\n    :nth-of-type(3) {\n      background-color: "black";\n      transform: ',";\n    }\n  }\n"]);return E=function(){return e},e}let T=k.Z.button(E(),S.breakpoints.small,e=>{let{theme:t,open:r}=e;return r?"#7bdcb5":"#0D0C1D"},e=>{let{open:t}=e;return t?"rotate(45deg)":"rotate(0)"},e=>{let{open:t}=e;return t?"0":"1"},e=>{let{open:t}=e;return t?"translateX(20px)":"translateX(0)"},e=>{let{open:t}=e;return t?"rotate(-45deg)":"rotate(0)"});var C=e=>{let{isOpen:t=!1,onOpen:r,...i}=e;return t?null:(0,n.jsxs)(T,{"aria-label":"Toggle menu","aria-expanded":t,open:t,onClick:()=>r(),...i,children:[(0,n.jsx)("span",{}),(0,n.jsx)("span",{}),(0,n.jsx)("span",{})]})},I=r(12642),P=r(8805);let A=["/get-started","/onboarding"],O=["/","/login","/about","/book","/bots/faq","/change-password","/email-verify","/forgot-password","/get-started","/insurance/payment-added","/new-auth","/newsletter-unsubscribe","/onboarding","/onboarding-reset","/onboarding/payment-options","/pre-register","/register","/resources","/schedule","/scheduling","/terms","/waitlist","/waitlist-registered"];var R=e=>{let{bg_color:t}=e,r=(0,s.useRef)(!1),i=(0,d.I0)(),l=(0,s.useRef)(!1),x=(0,h.useRouter)(),k=(0,u.useSearchParams)(),{isOpen:E,onOpen:T,onClose:R}=(0,f.q)(),N=(0,v.i)(e=>e.anonUser),j=(0,v.i)(e=>e.drChrono),D=(0,v.i)(e=>e.region),M=(0,v.i)(e=>e.test),L=(0,v.i)(e=>e.user.user),{data:F,status:z}=(0,a.useSession)(),U="authenticated"===z,{onboardingPreview:B}=M,V="control"!==B,q="";q=encodeURIComponent(window.location.href);let $=async()=>{if(!r.current&&k.get("authMethod")&&(null==L?void 0:L.id)){r.current=!0;let e=k.get("authMethod");"register"===e?await (0,P.Iq)({eventType:"REGISTER",data:{user_id:(null==L?void 0:L.id)||"",user_state:(null==L?void 0:L.state)||""}}):"onboarding"===e?await (0,P.Iq)({eventType:"ONBOARDING_COMPLETE",data:{user_id:(null==L?void 0:L.id)||"",user_state:(null==L?void 0:L.state)||""}}):"login"===e&&await (0,P.Iq)({eventType:"LOGIN",data:{user_id:(null==L?void 0:L.id)||"",user_state:(null==L?void 0:L.state)||""}})}};(0,s.useEffect)(()=>{$()},[x.pathname]),(0,s.useEffect)(()=>{"function"!=typeof _.co||l.current||((0,b.cy)(i),l.current=!0)},[_.co]);let W=async()=>{await (0,b.II)(i,F.user.uid),window.localStorage.setItem("omdUser",JSON.stringify(Date.now()))};(0,s.useEffect)(()=>{"loading"!==z&&("authenticated"!==z||L.uid?"unauthenticated"===z&&(i((0,w.$k)()),i((0,w.pn)())):W())},[z]),(0,s.useEffect)(()=>{"authenticated"===z&&L.uid&&!j.loaded&&(0,b.Rc)(i)},[z,null==L?void 0:L.uid,null==j?void 0:j.loaded]),(0,s.useEffect)(()=>{(!1===M.loaded&&(null==L?void 0:L.uid)||!1===M.loaded&&(null==N?void 0:N.id))&&(0,b.GE)(i,null==N?void 0:N.id)},[N,M,L]),(0,s.useEffect)(()=>{"/onboarding"!==x.pathname&&"/get-started"!==x.pathname&&(!L.email||L.emailConfirmed||V||x.push("/email-confirm"))},[L,x.pathname]),(0,s.useEffect)(()=>{i((0,w.b1)())},[w.b1]);let H=()=>{if("/onboarding"!==x.pathname&&"/get-started"!==x.pathname&&"/onboarding/identification"!==x.pathname&&"/account/insurance"!==x.pathname){if("/email-confirm"!==x.pathname&&"/onboarding/accept-terms"!==x.pathname&&L.email&&L.emailConfirmed&&!L.affirmedBig4Date&&!V){x.push("/onboarding/accept-terms");return}if("/email-confirm"!==x.pathname&&L.email&&L.emailConfirmed&&"/onboarding/accept-terms"!==x.pathname&&(!L.addressLineOne||!L.city||!L.state||!L.zipCode)&&!V){x.push("/onboarding/identification");return}}};(0,s.useEffect)(()=>{H()},[x.pathname,L.email,L.emailConfirmed]);let G=()=>{if("unauthenticated"===z&&!O.includes(x.pathname)){let e=encodeURIComponent(q);x.push("/login?redirect_uri=".concat(e))}};(0,s.useEffect)(()=>{"loading"!==z&&G()},[z,x.pathname]),(0,s.useEffect)(()=>{D.loaded||K()},[D.loaded]),(0,s.useEffect)(()=>{let e=()=>{E&&R()};return x.events.on("routeChangeComplete",e),()=>{x.events.off("routeChangeComplete",e)}},[x.events]);let K=async()=>{{let e=await fetch("/api/brighter").then(e=>e.json()).then(e=>e).catch(e=>{console.error(e)});i((0,w.dj)({regionData:e,regionActivated:(null==e?void 0:e.region)==="NY"||(null==e?void 0:e.region)==="CA"}))}};return A.includes(x.pathname)?null:(0,n.jsxs)("div",{className:o().dynamic([["b1e5510560d84a7d",[t,t,S.breakpoints.small]]])+" nav_container",children:[(0,n.jsxs)("nav",{className:o().dynamic([["b1e5510560d84a7d",[t,t,S.breakpoints.small]]]),children:[(0,n.jsx)(c(),{legacyBehavior:!0,href:U?"/home":"/login",children:(0,n.jsx)("a",{className:o().dynamic([["b1e5510560d84a7d",[t,t,S.breakpoints.small]]])+" logo_link",children:(0,n.jsx)(y.U,{children:(0,n.jsx)("img",{style:{width:"150px",height:"auto",padding:"8px"},src:"/optionsmd_resiliencelabco_1x.png",alt:"Options Md a Resilience Lab Company",className:o().dynamic([["b1e5510560d84a7d",[t,t,S.breakpoints.small]]])})})})}),(0,n.jsxs)("div",{className:o().dynamic([["b1e5510560d84a7d",[t,t,S.breakpoints.small]]])+" side_links",children:[(0,n.jsx)(()=>U?(0,n.jsxs)("div",{className:o().dynamic([["fab9fefe30495d7b",[S.breakpoints.small]]])+" desktop",children:[(0,n.jsx)(c(),{legacyBehavior:!0,href:"/home",passHref:!0,children:(0,n.jsx)(p.r,{children:"Home"})}),(0,n.jsx)(m.x,{width:"20px"}),(0,n.jsx)(m.x,{width:"1px",height:"38px",bg:S.colors.black}),(0,n.jsx)(m.x,{width:"20px"}),(0,n.jsx)(o(),{id:"fab9fefe30495d7b",dynamic:[S.breakpoints.small],children:"div.__jsx-style-dynamic-selector{display:none}@media screen and (min-width:".concat(S.breakpoints.small,"){div.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}}")})]}):null,{className:o().dynamic([["b1e5510560d84a7d",[t,t,S.breakpoints.small]]])}),U?(0,n.jsxs)("div",{onClick:()=>(0,a.signOut)({redirect:!1}),className:o().dynamic([["a5cca84e8776bec8",[S.breakpoints.small]]])+" log_out_links",children:[(0,n.jsx)(g.z,{variant:"outline",children:"Sign Out"}),(0,n.jsx)(o(),{id:"a5cca84e8776bec8",dynamic:[S.breakpoints.small],children:".log_out_links.__jsx-style-dynamic-selector{display:none}@media screen and (min-width:".concat(S.breakpoints.small,"){.log_out_links.__jsx-style-dynamic-selector{display:block}}")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c(),{legacyBehavior:!0,href:"/login",passHref:!0,children:(0,n.jsx)("a",{className:o().dynamic([["1df81be624b2f6cd",[S.breakpoints.small]]])+" links",children:(0,n.jsx)(g.z,{variant:"outline",color:S.colors.black,children:"Sign In"})})}),(0,n.jsx)(o(),{id:"1df81be624b2f6cd",dynamic:[S.breakpoints.small],children:".links.__jsx-style-dynamic-selector{display:none}@media screen and (min-width:".concat(S.breakpoints.small,"){.links.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}}")})]})]}),(0,n.jsx)(C,{isOpen:E,onOpen:T})]}),(0,n.jsx)(I.o0,{isLoggedIn:U,isOpen:E,onClose:R}),(0,n.jsx)(o(),{id:"b1e5510560d84a7d",dynamic:[t,t,S.breakpoints.small],children:"nav.__jsx-style-dynamic-selector{background-color:".concat(t,";display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:0;max-width:100vw;overflow-x:hidden;padding:16px .25rem .25rem;z-index:2}.logo_link.__jsx-style-dynamic-selector{margin:8px;z-index:2}.nav_container.__jsx-style-dynamic-selector{background-color:").concat(t,";max-width:100vw;margin:0;overflow-x:hidden;padding:0;width:100vw;z-index:2}.side_links.__jsx-style-dynamic-selector{z-index:2}@media screen and (min-width:").concat(S.breakpoints.small,"){.links.__jsx-style-dynamic-selector{display:block}.nav_container.__jsx-style-dynamic-selector{max-width:100vw;overflow-x:hidden}.side_links.__jsx-style-dynamic-selector{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-right:1rem}}")})]})}},60908:function(e,t,r){"use strict";r.d(t,{A:function(){return v},W:function(){return y}});var n=r(82729),i=r(85893),o=r(67796);function s(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M849.152 0H211.153c-46 0-66.032 34-66.032 66v127.312h-34.928c-17.311 0-31.344 14.032-31.344 31.345 0 17.311 14.033 31.343 31.344 31.343h34.928v128.752h-31.936c-17.312 0-31.344 14.033-31.344 31.344 0 17.313 14.032 31.345 31.343 31.345h31.936v129.44h-32.624c-17.312 0-31.344 14.032-31.344 31.344s14.032 31.344 31.344 31.344h32.624v128.464h-32.624c-17.312 0-31.344 14.032-31.344 31.343s14.032 31.344 31.344 31.344h32.624V960c0 53.025 41.536 64 64.528 64h639.504c53.025 0 96-42.975 96-96V96c0-53.024-42.96-96-96-96zM209.121 960l-.001-129.279h33.344c17.311 0 31.344-14.032 31.344-31.344s-14.033-31.344-31.344-31.344H209.12V639.569h33.344c17.311 0 31.344-14.033 31.344-31.344s-14.033-31.344-31.344-31.344H209.12V447.44h34.032c17.313 0 31.345-14.032 31.345-31.345 0-17.311-14.032-31.344-31.344-31.344h-34.032V256h31.024c17.312 0 31.344-14.032 31.344-31.343 0-17.313-14.032-31.345-31.344-31.345h-31.024V66c0-.752.064-1.376.16-1.936a28.23 28.23 0 0 1 1.872-.064h510v896H209.121zm672.031-31.999c0 17.664-14.336 32-32 32h-64v-896h64c17.664 0 32 14.336 32 32v832z"},child:[]}]})(e)}function a(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19 4h-3V2h-2v2h-4V2H8v2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zM5 20V7h14V6l.002 14H5z"},child:[]},{tag:"path",attr:{d:"M7 9h10v2H7zm0 4h5v2H7z"},child:[]}]})(e)}function l(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.984 7.506v6.74c.006 1.524 1.361 2.75 3.014 2.745h10.693c.303 0 .549-.225.549-.498v-6.74c-.008-1.523-1.363-2.75-3.014-2.744H2.531c-.302 0-.547.224-.547.497zm14.936 2.63 4.416-2.963c.383-.292.68-.219.68.309v9.036c0 .601-.363.528-.68.309L16.92 13.87v-3.734z"},child:[]}]})(e)}var c=r(55346);function u(e){return(0,o.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M6,16 L16,16 L6,16 L6,16 Z M6,12 L18,12 L6,12 L6,12 Z M6,8 L11,8 L6,8 L6,8 Z M14,1 L14,8 L21,8 M3,23 L3,1 L15,1 L21,7 L21,23 L3,23 Z"},child:[]}]})(e)}function h(e){return(0,o.w_)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z"},child:[]}]})(e)}var d=r(50788),f=r(16829),p=r(68029);function m(){let e=(0,n._)(["\n  width: 24px;\n"]);return m=function(){return e},e}let g=f.Z.img(m()),y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;switch(e){case"account":return(0,i.jsx)(d.h24,{size:"".concat(t,"px")});case"chat":return(0,i.jsx)(h,{size:"".concat(t,"px")});case"documents":return(0,i.jsx)(u,{size:"".concat(t,"px")});case"handsHelping":return(0,i.jsx)(c.THo,{size:"".concat(t,"px")});case"hourGlass":return(0,i.jsx)(c.N$0,{size:"".concat(t,"px")});case"mailPreferences":return(0,i.jsx)(c.KKr,{size:"".concat(t,"px")});case"notebook":return(0,i.jsx)(a,{size:"".concat(t,"px")});case"options-md":return(0,i.jsx)(g,{src:"/icons/OptionsMD-logo.png",alt:"options-md"});case"telehealth":return(0,i.jsx)(c.NTS,{size:"".concat(t,"px")});case"wallet":return(0,i.jsx)(d._OR,{size:"".concat(t,"px")});case"zoom":return(0,i.jsx)(l,{size:"".concat(t,"px")});default:return(0,i.jsx)(s,{})}},v=()=>(0,i.jsx)(p.x,{padding:"8px",children:(0,i.jsx)(g,{src:"/icons/OptionsMD-logo.png",alt:"options-md"})})},12642:function(e,t,r){"use strict";r.d(t,{aG:function(){return h},mI:function(){return eB},Ac:function(){return eL},NI:function(){return ez},y:function(){return e$},By:function(){return S},H1:function(){return eP},H2:function(){return eN},H5:function(){return eD},R6:function(){return eO},TK:function(){return k},o0:function(){return ee},cJ:function(){return en},gF:function(){return p},A$:function(){return d.A},M7:function(){return eg},sD:function(){return eo},N2:function(){return ep},E6:function(){return eV}});var n=r(85893),i=r(67294),o=r(5490),s=r(34614),a=r(26840),l=r(68029),c=r(70010),u=r(15581);let h=e=>{let{children:t,isOpen:r,onClose:i,title:h=""}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(o.u_,{isOpen:r,onClose:i,children:[(0,n.jsx)(s.Z,{}),(0,n.jsxs)(a.h,{borderRadius:"4px",children:[(0,n.jsx)(l.x,{width:"100%",display:"flex",justifyContent:"flex-end",padding:0,children:(0,n.jsx)(l.x,{margin:"4px",children:(0,n.jsx)(u.oHP,{onClick:i,size:24})})}),(0,n.jsx)(c.f,{children:(0,n.jsx)(l.x,{children:t})})]})]})})};var d=r(60908),f=r(82206);let p=e=>{let{...t}=e;return(0,n.jsx)(f.I,{variant:"outline",focusBorderColor:"#93a19f",sx:{borderColor:"#B8CAC7",fontSize:"14px"},...t})};var m=r(40645),g=r.n(m),y=r(82729),v=r(16829),b=r(48899),w=r(18173);function _(){let e=(0,y._)(["\n  align-items: center;\n  display: flex;\n  justify-content: center;\n  margin: 24px 0 24px 0;\n  max-width: 90vw;\n"]);return _=function(){return e},e}let x=v.Z.div(_()),k=e=>{let{size:t="xl"}=e;return(0,n.jsx)(x,{children:(0,n.jsx)(b.$,{color:w.default.colors.cyan,emptyColor:w.default.colors.gray,size:t,thickness:"2px"})})},S=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:g().dynamic([["79988fb9ad498ef6",[w.default.colors.bgPrimary]]])+" container",children:(0,n.jsx)(k,{size:"xl"})}),(0,n.jsx)(g(),{id:"79988fb9ad498ef6",dynamic:[w.default.colors.bgPrimary],children:".container.__jsx-style-dynamic-selector{background-color:".concat(w.default.colors.bgPrimary,";min-height:100vh;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100vw}")})]});var E=r(41664),T=r.n(E),C=r(33299),I=r(52110),P=r(37984);let[A,O]=(0,I.k)(),R={start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}};function N(e){let{isOpen:t,onClose:r,placement:i="right",children:s,...a}=e,l=(0,P.F)(),c=l.components?.Drawer,u=function(e,t){if(e)return R[e]?.[t]??e}(i,l.direction);return(0,n.jsx)(A,{value:{placement:u},children:(0,n.jsx)(o.u_,{isOpen:t,onClose:r,styleConfig:c,...a,children:s})})}var j=r(34926),D=r(45989),M=r(13114),L=r(72701),F=r(82145);let z={exit:{duration:.15,ease:F.Lj.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},U={exit:({direction:e,transition:t,transitionEnd:r,delay:n})=>{let{exit:i}=(0,F.js)({direction:e});return{...i,transition:t?.exit??F.p$.exit(z.exit,n),transitionEnd:r?.exit}},enter:({direction:e,transitionEnd:t,transition:r,delay:n})=>{let{enter:i}=(0,F.js)({direction:e});return{...i,transition:r?.enter??F.p$.enter(z.enter,n),transitionEnd:t?.enter}}},B=(0,i.forwardRef)(function(e,t){let{direction:r="right",style:i,unmountOnExit:o,in:s,className:a,transition:l,transitionEnd:c,delay:u,motionProps:h,animatePresenceProps:d,...f}=e,p=Object.assign({position:"fixed"},(0,F.js)({direction:r}).position,i),m=!o||s&&o,g=s||o?"enter":"exit",y={transitionEnd:c,transition:l,direction:r,delay:u};return(0,n.jsx)(M.M,{...d,custom:y,children:m&&(0,n.jsx)(L.E.div,{...f,ref:t,initial:"exit",className:(0,j.cx)("chakra-slide",a),animate:g,exit:"exit",custom:y,variants:U,style:p,...h})})});B.displayName="Slide";var V=r(64993),q=r(49381);let $=(0,V.m)(B),W=(0,q.G)((e,t)=>{let{className:r,children:i,motionProps:s,containerProps:a,...l}=e,{getDialogProps:c,getDialogContainerProps:u,isOpen:h}=(0,o.vR)(),d=c(l,t),f=u(a),p=(0,j.cx)("chakra-modal__content",r),m=(0,o.I_)(),g={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{placement:v}=O();return(0,n.jsx)(D.M,{children:(0,n.jsx)(V.m.div,{...f,className:"chakra-modal__content-container",__css:y,children:(0,n.jsx)($,{motionProps:s,direction:v,in:h,className:p,...d,__css:g,children:i})})})});W.displayName="DrawerContent";var H=r(73636),G=r(71856),K=r(8186),Q=r(64831),Y=r(57879),X=r(90092),J=r(38491),Z=r(90269);let ee=e=>{let{isLoggedIn:t,isOpen:r,onClose:i}=e,{isDesktop:o}=(0,Z.Z)();return o?null:(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(N,{onClose:i,placement:"left",isOpen:r,children:[(0,n.jsx)(s.Z,{}),(0,n.jsxs)(W,{backgroundColor:w.colors.bgSecondary,children:[(0,n.jsxs)(H.U,{justifyContent:"space-between",margin:"4px",children:[(0,n.jsx)(l.x,{}),(0,n.jsx)(G.P,{fontSize:"1xl",onClick:i})]}),(0,n.jsx)(l.x,{height:"64px"}),(0,n.jsx)(c.f,{children:t?(0,n.jsxs)(K.g,{divider:(0,n.jsx)(Q.i,{maxW:"200px",orientation:"horizontal"}),spacing:4,alignItems:"center",children:[(0,n.jsx)(T(),{href:"/home",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Home"})})}),(0,n.jsx)(T(),{href:"/appointments",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Appointments"})})}),(0,n.jsx)(T(),{href:"/messages",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Messages"})})}),(0,n.jsx)(T(),{href:"/clinical-assessments",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Assessments"})})}),(0,n.jsx)(T(),{href:"/account",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Account"})})}),(0,n.jsx)(J.z,{fontSize:"medium",onClick:()=>(0,C.signOut)({redirect:!1}),children:"Sign Out"})]}):(0,n.jsxs)(K.g,{divider:(0,n.jsx)(Q.i,{maxW:"200px",orientation:"horizontal"}),justifyItems:"center",spacing:6,children:[(0,n.jsx)(T(),{href:"/book",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Book"})})}),(0,n.jsx)(T(),{href:"/login",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Sign In"})})}),(0,n.jsx)(T(),{href:"https://optionsmd.com/contact-us",target:"_blank",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Contact Us"})})}),(0,n.jsx)(T(),{href:"https://optionsmd.com/privacy-policy",target:"_blank",children:(0,n.jsx)(Y.r,{onClick:i,children:(0,n.jsx)(X.x,{fontSize:"large",textAlign:"center",children:"Privacy"})})})]})})]})]})})};var et=r(51107),er=r(86115);let en=e=>{let{checked:t,name:r,onChange:i}=e;return(0,n.jsx)(et.X,{colorScheme:"red",icon:t?(0,n.jsx)(er.n,{boxSize:3}):(0,n.jsx)("span",{}),iconColor:"green.400",name:r,onChange:i,size:"lg",sx:{".chakra-checkbox__control":{borderWidth:"1px"},backgroundColor:"white",borderColor:t?"#51B82E":"#849A96"}})};function ei(){let e=(0,y._)(["\n  border-radius: 5px;\n  height: 100px;\n  width: auto;\n"]);return ei=function(){return e},e}let eo=v.Z.img(ei());var es=r(50232),ea=r(3712),el=r(19311),ec=r(11163),eu=r(51040);function eh(){let e=(0,y._)(["\n  margin: 0 auto;\n  max-width: 95vw;\n  padding: 8px;\n\n  @media only screen and (min-width: ",") {\n    max-width: 600px;\n  }\n"]);return eh=function(){return e},e}function ed(){let e=(0,y._)(["\n  margin: 0 auto;\n  max-width: 95vw;\n  padding: 8px;\n  /* \n  @media only screen and (min-width: ",") {\n    max-width: 0px;\n  } */\n"]);return ed=function(){return e},e}let ef=v.Z.div(eh(),w.breakpoints.small),ep=e=>{let{bgColor:t,children:r,title:i}=e;return(0,n.jsx)(l.x,{sx:{backgroundColor:t},children:(0,n.jsxs)(ef,{children:[(0,n.jsx)(l.x,{height:8}),(0,n.jsx)(l.x,{marginLeft:4,children:(0,n.jsx)(eP,{children:i})}),(0,n.jsx)(l.x,{height:4}),(0,n.jsx)(n.Fragment,{children:r}),(0,n.jsx)(l.x,{height:16})]})})},em=v.Z.div(ed(),w.breakpoints.small),eg=e=>{let{children:t,hasBack:r=!1,title:o}=e,s=(0,ec.useRouter)(),{status:a}=(0,C.useSession)(),c=(0,i.useMemo)(()=>eu.j.includes(s.pathname),[s.pathname]);return"authenticated"===a||c?(0,n.jsxs)(em,{children:[(0,n.jsx)(l.x,{height:8}),(0,n.jsx)(l.x,{marginLeft:[0,0,4],children:(0,n.jsx)(es.X,{children:o})}),(0,n.jsx)(l.x,{marginLeft:[0,0,4],marginRight:"auto",children:r?(0,n.jsx)(T(),{legacyBehavior:!0,href:"/home",passHref:!0,children:(0,n.jsxs)(Y.r,{style:{alignItems:"center",display:"flex",textDecoration:"underline"},children:[(0,n.jsx)(el.R,{}),(0,n.jsx)(X.x,{style:{fontFamily:w.default.fonts.Poppins,fontSize:"1rem",lineHeight:"2rem"},children:"Back"})]})}):null}),(0,n.jsx)(l.x,{height:4}),(0,n.jsx)(ea.K,{direction:["column","column","row"],spacing:"24px",children:t}),(0,n.jsx)(l.x,{height:16})]}):(0,n.jsx)(H.U,{justifyContent:"center",children:(0,n.jsx)(k,{size:"xl"})})};function ey(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-size: 24px;\n  font-weight: ",";\n  max-width: 90vw;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 32px;\n  }\n"]);return ey=function(){return e},e}function ev(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-size: 20px;\n  font-weight: ",";\n  letter-spacing: -0.8px;\n  line-height: 28px;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 20px;\n  }\n"]);return ev=function(){return e},e}function eb(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-size: 18px;\n  font-weight: ",";\n  max-width: 90vw;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 24px;\n  }\n"]);return eb=function(){return e},e}function ew(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-size: 16px;\n  font-weight: ",";\n  max-width: 90vw;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 22px;\n  }\n"]);return ew=function(){return e},e}function e_(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-weight: ",";\n  font-size: 18px;\n  line-height: 1.2;\n  max-width: 90vw;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 20px;\n  }\n"]);return e_=function(){return e},e}function ex(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-size: 16px;\n  font-weight: ",";\n  line-height: 1.2;\n  max-width: 90vw;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 18px;\n  }\n"]);return ex=function(){return e},e}function ek(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-weight: ",";\n  font-size: 14px;\n  line-height: 1.2;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 16px;\n  }\n"]);return ek=function(){return e},e}function eS(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-weight: ",";\n  font-size: 16px;\n  line-height: 24px;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 16px;\n  }\n"]);return eS=function(){return e},e}function eE(){let e=(0,y._)(["\n  color: #4b5351;\n  font-family: Poppins;\n  font-weight: ",";\n  font-size: 14px;\n  letter-spacing: -0.14px;\n  line-height: 21px;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 16px;\n  }\n"]);return eE=function(){return e},e}function eT(){let e=(0,y._)(["\n  font-family: Poppins;\n  font-weight: ",";\n  font-size: 10px;\n  line-height: 1.2;\n  text-align: ",";\n\n  @media only screen and (min-width: ",") {\n    font-size: 12px;\n  }\n"]);return eT=function(){return e},e}function eC(){let e=(0,y._)(["\n  color: ",";\n  font-family: Poppins;\n  font-weight:;\n  font-weight: ",";\n  font-size: 18px;\n  line-height: 1.2;\n  margin: 0 0 4px 0;\n"]);return eC=function(){return e},e}let eI=v.Z.h1(ey(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),eP=e=>{let{children:t,fontWeight:r=500,textAlign:i="left"}=e;return(0,n.jsx)(eI,{fontWeight:r,textAlign:i,children:t})},eA=v.Z.h1(ev(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),eO=e=>{let{children:t,fontWeight:r=500,textAlign:i="left"}=e;return(0,n.jsx)(eA,{fontWeight:r,textAlign:i,children:t})},eR=v.Z.h2(eb(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),eN=e=>{let{children:t,fontWeight:r=200,textAlign:i="left"}=e;return(0,n.jsx)(eR,{fontWeight:r,textAlign:i,children:t})};v.Z.h2(ew(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small);let ej=v.Z.h5(e_(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),eD=e=>{let{children:t,fontWeight:r=500,textAlign:i}=e;return(0,n.jsx)(ej,{fontWeight:r,textAlign:i,children:t})},eM=v.Z.p(ex(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),eL=e=>{let{children:t,fontWeight:r=300,textAlign:i="left"}=e;return(0,n.jsx)(eM,{fontWeight:r,textAlign:i,children:t})},eF=v.Z.p(ek(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),ez=e=>{let{children:t,fontWeight:r=300,textAlign:i="left"}=e;return(0,n.jsx)(eF,{fontWeight:r,textAlign:i,children:t})},eU=v.Z.p(eS(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),eB=e=>{let{children:t,bold:r=!1,fontWeight:i=300,textAlign:o="left"}=e;return(0,n.jsx)(eU,{fontWeight:r?500:i,textAlign:o,children:t})};v.Z.p(eE(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small),v.Z.p(eT(),e=>{let{fontWeight:t}=e;return t},e=>{let{textAlign:t}=e;return t},w.breakpoints.small);let eV=e=>{let{size:t,direction:r}=e;return(0,n.jsx)(l.x,{height:"vertical"===r?"".concat(t,"px"):0,width:"horizontal"===r?"".concat(t,"px"):0})},eq=v.Z.p(eC(),w.colors.red,e=>{let{fontWeight:t}=e;return t}),e$=e=>{let{children:t,fontWeight:r=500}=e;return(0,n.jsx)(eq,{fontWeight:r,children:t})}},18173:function(e,t,r){"use strict";r.r(t),r.d(t,{breakpoints:function(){return f},chakraBreakPoints:function(){return p},chakraBreakPointsNumbers:function(){return m},colors:function(){return h},default:function(){return v},fonts:function(){return d},primary:function(){return y},quizTheme:function(){return g}});var n=r(79115);let i=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];var o=r(1209),s=r(38554);function a(e){return"function"==typeof e}let l=e=>function(...t){var r;let o=[...t],l=t[t.length-1];return(r=l,(0,n.Kn)(r)&&i.every(e=>Object.prototype.hasOwnProperty.call(r,e))&&o.length>1)?o=o.slice(0,o.length-1):l=e,(function(...e){return t=>e.reduce((e,t)=>t(e),t)})(...o.map(e=>t=>a(e)?e(t):function(...e){return s({},...e,u)}(t,e)))(l)},c=l(o.rS);function u(e,t,r,i){return(a(e)||a(t))&&Object.prototype.hasOwnProperty.call(i,r)?(...r)=>s({},a(e)?e(...r):e,a(t)?t(...r):t,u):(0,n.kJ)(e)&&(0,n.kJ)(t)?[...e,...t]:(0,n.kJ)(e)&&(0,n.Kn)(t)?t:void 0}l(o.wE);let h={alabaster:"#EFF2F2",beachBeige:"#f9e7cc",bgPrimary:"#F5F9FA",bgSecondary:"#E0EFF0",bgWhite:"#F8FBFC",black:"#000",brown:"#C1835D",cyan:"#00f8e5",darkBlue:"#162345",gray:"#585858",honeySuckle:"#e5ff76",lightBlack:"#1D1D1D",lightBlue:"#e4f5fb",lightBrown:"#D0AB96",lightGray:"#D3D3D3",lightPink:"#FFE5E4",lightTeal:"#C4D9DC",lighterTeal:"#D9E5E7",optionsGreen:"#51B82E",pink:"#FFC6C4",pinkOther:"#FFC3C2",pinkDark:"#6F373B",red:"#aa0000",seaGreen:"#46605D",softBlack:"#24292f",teal:"#87afbc",tundora:"#404040",white:"#FFFFFF"},d={Poppins:"Poppins, sans-serif"},f={small:"600px",medium:"900px",large:"1200px",xLarge:"1800px"},p={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},m={base:0,sm:480,md:768,lg:992,xl:1280,"2xl":1536},g={pink:{bg:"#FFC6C4",inner:"#FFE6E5",barBg:"#FFE6E5",barProgress:h.black,radioSelected:h.black,text:h.black,textSelected:h.white,selected:"#6F373B"},black:{bg:h.black,barBg:"#D9E5E7",barProgress:"#3C515D",inner:"#D9E5E7",radioSelected:h.black,text:h.black,textSelected:h.white,selected:"#3C515D"},aqua:{bg:"#C4D9DC",barBg:"#D9E5E7",barProgress:h.black,inner:"#D9E5E7",radioSelected:h.black,text:h.black,textSelected:h.black,selected:h.white}},y={page:{bg:h.lightTeal},btn:{bg:h.black,color:h.white},errors:{color:h.red},input:{background:h.white,color:h.black,focusBorder:h.white},fonts:{primary:d.Poppins,secondary:d.Poppins}};var v=c({colors:h,components:{Button:{baseStyle:{fontFamily:d.Poppins,fontWeight:400},variants:{optionsGreen:{fontSize:"14px",borderRadius:"4px",bgGradient:"linear(to-b, #9DDF86, #7CD45E)",padding:"12px 24px",_disabled:{color:"#4B5351",backgroundColor:"#B8CAC7",backgroundImage:"unset"}}}}},fonts:{body:d.Poppins},palette:{primary:{main:"#C4D9DC",light:"#DAE5E7",dark:"#86B3BA",green:"#51B82E",contrastText:"#000"},secondary:{main:"#C1835D",light:"#D0AB96",dark:"#996342",contrastText:"#000"}}})},10550:function(e,t,r){"use strict";r.d(t,{B:function(){return i},LV:function(){return n}});let n=e=>{window.gtag("config","UA-166049043-2",{page_path:e})},i=e=>{let{action:t,category:r,label:n,value:i}=e;window.gtag("event",t,{event_category:r,event_label:n,value:i})}},90269:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(67294),i=r(28497),o=()=>{let[e,t]=function(e,t={}){let{ssr:r=!0,fallback:o}=t,{getWindow:s}=(0,i.O)(),a=Array.isArray(e)?e:[e],l=Array.isArray(o)?o:[o];l=l.filter(e=>null!=e);let[c,u]=(0,n.useState)(()=>a.map((e,t)=>({media:e,matches:r?!!l[t]:s().matchMedia(e).matches})));return(0,n.useEffect)(()=>{let e=s();u(a.map(t=>({media:t,matches:e.matchMedia(t).matches})));let t=a.map(t=>e.matchMedia(t)),r=e=>{u(t=>t.slice().map(t=>t.media===e.media?{...t,matches:e.matches}:t))};return t.forEach(e=>{"function"==typeof e.addListener?e.addListener(r):e.addEventListener("change",r)}),()=>{t.forEach(e=>{"function"==typeof e.removeListener?e.removeListener(r):e.removeEventListener("change",r)})}},[s]),c.map(e=>e.matches)}(["(min-width: 601px)","(min-width: 901px)"]);return{isMobile:e,isDesktop:e,isDesktopLg:t}}},49330:function(e,t,r){"use strict";r.d(t,{R:function(){return o},t:function(){return s}});var n=r(91259),i=r(12259);let o=async e=>{let t=await (0,n.N)(),r=await fetch("".concat("https://srvr.optionsmd.com","/user/patient"),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}}).then(e=>e.json()).then(e=>e).catch(e=>e);e((null==r?void 0:r.data)?(0,i.O3)(r.data):(0,i.t8)())},s=async e=>{var t;let r=await (0,n.N)(),o=await fetch("".concat("https://srvr.optionsmd.com","/user/zocdoc-appointment"),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)}}).then(e=>e.json()).then(e=>e).catch(e=>e);(null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.id)&&e((0,i.MK)(o.data))}},32611:function(e,t,r){"use strict";r.d(t,{Ab:function(){return c},hC:function(){return h},lv:function(){return u},oo:function(){return l},yf:function(){return a}});var n=r(54098),i=r.n(n),o=r(91259);let s="".concat("https://srvr.optionsmd.com","/onboarding"),a=async()=>{try{let e=await (0,o.N)(),t=await i()("".concat("https://srvr.optionsmd.com","/user/get-started"),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(200===t.status){let{data:e}=await t.json();return e}return{}}catch(e){return console.error(e),{}}},l=async e=>{let{state:t}=e;try{let e=await (0,o.N)();return await i()("".concat("https://srvr.optionsmd.com","/user/get-started"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({getStartedState:t})})}catch(e){return console.error(e),e}},c=async e=>{let{email:t}=e;try{let e=t.trim().toLowerCase();return await i()("".concat(s,"/trigger-email-code"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})})}catch(e){console.error(e)}},u=async e=>{let{email:t,code:r}=e;try{let e=t.trim().toLowerCase();return await i()("".concat(s,"/v2/verify-email-code"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,code:r})})}catch(e){return{status:500}}},h=async e=>{let{method:t,zocDocApptId:r}=e;try{let e=await (0,o.N)(),n=await i()("".concat("https://srvr.optionsmd.com","/booking/confirm-zoc-doc"),{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({method:t,zocDocApptId:r})});if((null==n?void 0:n.ok)&&204===n.status)return!0;return!1}catch(e){return console.error(e),!1}}},33251:function(e,t,r){"use strict";r.d(t,{pT:function(){return p.pT},v1:function(){return p.v1},LY:function(){return p.LY},CO:function(){return b},Rc:function(){return n.R},cy:function(){return x},Qz:function(){return w},GE:function(){return _},II:function(){return p.II},v3:function(){return p.v3},Tf:function(){return l},NH:function(){return u},Lt:function(){return h},vh:function(){return c},N7:function(){return y},UH:function(){return p.UH},iz:function(){return g},Sr:function(){return p.Sr},Sm:function(){return v},FE:function(){return p.FE}});var n=r(49330);r(32611);var i=r(54098),o=r.n(i),s=r(88074);let a="".concat("https://srvr.optionsmd.com","/onboarding"),l=async e=>{let{email:t,password:r}=e;try{let e=t.trim().toLowerCase(),n=!1,i="",o="",a=await (0,s.Xb)(s.I8,e,r).then(e=>e.user).catch(e=>{n=!0,i=e.message,o=e.code});if(n||!a)return{error:o,errorCode:o,errorMessage:i,userId:""};return{error:null,errorCode:null,errorMessage:"",userId:a.uid}}catch(e){return console.error(e),{error:(null==e?void 0:e.code)||"",errorMessage:(null==e?void 0:e.message)||"",userId:""}}},c=async e=>{let{token:t}=e;try{let e=await o()("".concat(a,"/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})});if(200===e.status){let{data:t}=await e.json(),r=t.anonId;return window.localStorage.setItem("omdAnonId",r),t}throw console.error("Validate token error"),Error(e.statusText)}catch(e){return console.error(e),!1}},u=async e=>{let{email:t}=e;return await o()("".concat(a,"/trigger-email-code"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t})})},h=async e=>{let{anonId:t,email:r,code:n}=e,i=r.trim().toLowerCase();return await o()("".concat(a,"/verify-email-code"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,anonId:t,code:n})})};var d=r(53416),f=r(91259),p=r(36928),m=r(12259);let g=(e,t)=>{let{quiz:r,quizAnswers:n=[],quizQuestions:i=[],userResponses:o=[]}=e,s=["64bdefd8091b5cd4df6e4029","64bdf009091b5cd4df6e4031","64bdf031091b5cd4df6e4039","64bdf098091b5cd4df6e4041","64bdf0d5091b5cd4df6e4049","64bdf11d091b5cd4df6e4051"];if(i=i.filter(e=>!s.includes(e.id)),t((0,m.KU)(r)),n&&t((0,m.N3)(n)),t((0,m.XO)(i)),o.length>0){let e=[...i].map(e=>{let r=o.find(t=>t.questionId===e.id);return("5JucNmEUEbG9F0w2mZURGI"===e.id&&(null==r?void 0:r.answer)&&t((0,m.np)(r.answer)),"1cJ7SzFhVGWB7XDbnC5uMO"===e.id&&(null==r?void 0:r.answer)&&t((0,m.BS)(r.answer)),"64bdefa0091b5cd4df6e4021"===e.id&&(null==r?void 0:r.answer)&&t((0,m.np)(r.answer)),r)?{...e,answerId:r.id,answer:r.answer,answer2:(null==r?void 0:r.answer2)||[]}:(null==e?void 0:e.question)?{...e,answerId:(0,d.x0)()}:void 0});t((0,m.OE)(e))}else t((0,m.jF)(i.map(e=>({...e,answerId:(0,d.x0)()}))))},y=async(e,t)=>{try{let r=await (0,f.N)();return await fetch("".concat("https://srvr.optionsmd.com","/quiz/record-answer"),{method:"POST",credentials:"include",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify({userAnswer:t})}).then(e=>e.json()).then(r=>{let{status:n}=r;return 200===n?(e((0,m.p$)(t)),{success:!0}):{success:!1}})}catch(e){return console.error("RECORD_USER_ANSWER failed for Quiz: "+t.quizId),console.error(e),{success:!1}}},v=async(e,t)=>{try{let r=await (0,f.N)();return await fetch("".concat("https://srvr.optionsmd.com","/quiz/update-answer"),{method:"POST",credentials:"include",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify({userAnswer:t})}).then(r=>200===r.status?(e((0,m.p$)(t)),{success:!0}):{success:!1})}catch(e){return console.error("RECORD_USER_ANSWER UPDATE failed for Quiz: "+t.quizId),console.error(e),{success:!1}}},b=async(e,t,r)=>{try{let n=await (0,f.N)();await fetch("".concat("https://srvr.optionsmd.com","/quiz/finish/").concat(r),{method:"GET",credentials:"include",headers:{Authorization:"Bearer ".concat(n)}}),e((0,m.MW)()),await (0,p.UH)(e,t)}catch(e){console.error("FAILED TO FINISH QUIZ "+r+" For user"+t),console.error(e)}};r(8805);let w=async e=>{try{let t=await (0,f.N)(),r=await fetch("".concat("https://srvr.optionsmd.com","/staff-users/slim"),{method:"GET",credentials:"include",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"}});if(200===r.status){let{data:t}=await r.json();e((0,m.xy)(t))}500===r.status&&e((0,m.lG)())}catch(t){console.error(t),e((0,m.lG)())}},_=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=await (0,f.N)();return fetch("".concat("https://srvr.optionsmd.com","/test/load-variant?anonId=").concat(t),{credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)}}).then(e=>e.json()).then(t=>{var r,n;(null==t?void 0:null===(r=t.data)||void 0===r?void 0:r.shortOption)&&e((0,m.IC)(t.data.shortOption)),(null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.onboardingPreview)&&e((0,m.oX)(t.data.onboardingPreview)),(window.location.href.includes("https://stg.optionsmd.com")||window.location.href.includes("http://localhost"))&&(e((0,m._N)()),e((0,m.oX)("variant_1")))}).catch(e=>{console.error(e)})},x=e=>{let t=window.document.referrer;t&&(localStorage.setItem("referrer",t),e((0,m.NV)(t)),(0,s.Kz)(s.co,"referrer",{referrer:t}))}},36928:function(e,t,r){"use strict";r.d(t,{BL:function(){return f},FE:function(){return l},II:function(){return a},LY:function(){return v},Sr:function(){return m},UH:function(){return u},W3:function(){return d},mA:function(){return p},pT:function(){return g},r3:function(){return h},v1:function(){return y},v3:function(){return b},zN:function(){return c}});var n=r(33299),i=r(91259),o=r(49330),s=r(12259);let a=async(e,t)=>{if(t){let r=await (0,i.N)();return fetch("".concat("https://srvr.optionsmd.com","/user/id/").concat(t),{method:"GET",credentials:"include",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}}).then(e=>e.json()).then(t=>{let{data:r,status:n}=t;if(200===n&&(null==r?void 0:r.id)){let t={...r,uid:r.id};e((0,s.lx)(t))}}).catch(e=>{console.error(e)})}(0,n.signOut)({redirect:!1}),e((0,s.pn)())},l=async e=>{let{contentType:t,fileName:r,label:n,name:o,insuranceCarrier:s,insuranceCardPairId:a,insuranceId:l=""}=e;try{let e=await (0,i.N)();return(await fetch("".concat("https://srvr.optionsmd.com","/storage/upload-url"),{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({contentType:t,fileName:r,insuranceCarrier:s,insuranceCardPairId:a,insuranceId:l,label:n,name:o})}).then(e=>e.json()).then(e=>e)).data}catch(e){return console.error(e),null}},c=async(e,t)=>{try{let r=await (0,i.N)();return await fetch("".concat("https://srvr.optionsmd.com","/user/accept-big4"),{method:"GET",credentials:"include",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}}),await u(e,t),!0}catch(e){return console.error(e),!1}},u=async(e,t)=>{if(!t)return;let r=await (0,i.N)();return fetch("".concat("https://srvr.optionsmd.com","/user/id/").concat(t),{credentials:"include",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}}).then(e=>e.json()).then(t=>((null==t?void 0:t.data)&&e((0,s.lx)(t.data)),t)).catch(e=>console.error({e}))},h=async()=>{let e=await (0,i.N)();return fetch("".concat("https://srvr.optionsmd.com","/user/trigger-code"),{credentials:"include",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>e).catch(e=>console.error(e))},d=async(e,t)=>{let r=await (0,i.N)();return fetch("".concat("https://srvr.optionsmd.com","/user/email-code?code=").concat(t),{credentials:"include",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}}).then(e=>e.json()).then(t=>((null==t?void 0:t.data)&&e((0,s.lx)(t.data)),t)).catch(e=>console.error(e))},f=async e=>{let{addressLineOne:t,city:r,state:n,zipCode:o}=e,s=await (0,i.N)();return await fetch("".concat("https://srvr.optionsmd.com","/user/update-address"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s)},body:JSON.stringify({addressLineOne:t,city:r,state:n,zipCode:o})}).then(e=>e.json()).then(e=>e).catch(e=>e)},p=async e=>{let{dispatch:t,emergency_contact_name:r,emergency_contact_phone:n,emergency_contact_relation:s}=e,a=await (0,i.N)(),l=await fetch("".concat("https://srvr.optionsmd.com","/user/emergency-contact"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a)},body:JSON.stringify({emergency_contact_name:r,emergency_contact_phone:n,emergency_contact_relation:s})}).then(e=>e.json()).then(e=>e).catch(e=>e);return await (0,o.R)(t),l},m=async e=>{let{okToEmail:t,okToTextReminders:r}=e,n=await (0,i.N)();return await fetch("".concat("https://srvr.optionsmd.com","/user/communication"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify({okToEmail:t,okToTextReminders:r})}).then(e=>e.json()).then(e=>e).catch(e=>e)},g=async e=>{let{appointment:t,date:r,duration:n,method:o,practitionerId:s,time:a,zoc:l}=e;try{var c;let e=await (0,i.N)(),u=await fetch("".concat("https://srvr.optionsmd.com","/booking/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({appointment:t,date:r,duration:n,method:o,practitionerId:s,time:a,zoc:l})}).then(e=>e.json()).then(e=>e);if(null==u?void 0:null===(c=u.data)||void 0===c?void 0:c.success)return!0;return!1}catch(e){return!1}},y=async e=>{let{appointmentId:t}=e,r=await (0,i.N)();return await fetch("".concat("https://srvr.optionsmd.com","/booking/cancel"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},body:JSON.stringify({appointmentId:t})}).then(e=>e.json()).then(e=>e).catch(e=>e)},v=async e=>{var t;let r=await (0,i.N)(),n=await fetch("".concat("https://srvr.optionsmd.com","/user/has-completed-intake"),{credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)}}).then(e=>e.json()).then(e=>e).catch(e=>e);return(null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.hasCompletedIntake)&&e((0,s.ts)()),n},b=async e=>{let t=await (0,i.N)();return await fetch("".concat("https://srvr.optionsmd.com","/threads/read?conversationId=").concat(e),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}}).then(e=>e.json()).then(e=>e).catch(e=>e)}},5185:function(e,t,r){"use strict";r.d(t,{i:function(){return b}});var n=r(45007),i=r(65849),o=r(23055),s=r(94083),a=r(42376),l=r(12259),c=r(27921),u=r(72145),h=r(10829),d=r(6748),f=r(5494),p=r(28466),m=r(35666),g=r(84255),y=r(61661);let v=(0,i.UY)({anonUser:o.ZP,drChrono:s.ZP,fhir:a.ZP,getStarted:l.Wn,insurances:c.ZP,practitioners:u.ZP,quizAnswers:h.ZP,quiz:d.ZP,region:f.ZP,slots:p.ZP,staff:m.ZP,test:g.ZP,user:y.ZP});t.Z=v;let b=n.v9},23055:function(e,t,r){"use strict";r.d(t,{Hk:function(){return i},rw:function(){return s}});let n=(0,r(85839).oM)({name:"anonUser",initialState:{id:"",answers:[],email:"",loading:!1,preRegisterCompleted:!1,preRegisterQuizId:"",hasLoaded:!1},reducers:{setAnonUser:(e,t)=>{let{answers:r,id:n,email:i,preRegisterQuizId:o,preRegisterCompleted:s}=t.payload;e.id=n,e.answers=r,e.email=i,e.hasLoaded=!0,e.loading=!1,e.preRegisterQuizId=o,e.preRegisterCompleted=s},setAnonUserEmail:(e,t)=>{e.email=t.payload},setAnonUserId:(e,t)=>{e.id=t.payload},setPreRegisterQuizComplete:(e,t)=>{e.answers=[],e.preRegisterCompleted=!0}}}),{setAnonUser:i,setAnonUserEmail:o,setPreRegisterQuizComplete:s}=n.actions;t.ZP=n.reducer},94083:function(e,t,r){"use strict";r.d(t,{$k:function(){return s},MK:function(){return c},O3:function(){return a},t8:function(){return l}});var n=r(85839);let i={patient:{emergency_contact_name:"",emergency_contact_phone:"",emergency_contact_relation:"",doctor:0,drChronoDoctorId:""},loaded:!1,zocDocAppointment:null},o=(0,n.oM)({name:"drChrono",initialState:i,reducers:{clearPatient:e=>{e.loaded=!1,e.patient=i.patient,e.zocDocAppointment=i.zocDocAppointment},setPatient:(e,t)=>{e.loaded=!0,e.patient=t.payload},setPatientLoaded:e=>{e.loaded=!0},setZocDocAppointment:(e,t)=>{e.zocDocAppointment=t.payload}}}),{clearPatient:s,setPatient:a,setPatientLoaded:l,setZocDocAppointment:c}=o.actions;t.ZP=o.reducer},42376:function(e,t,r){"use strict";var n=r(85839);let i={patient:{id:""},loaded:!1,status:"idle"},o=(0,n.oM)({name:"fhir",initialState:i,reducers:{clearFhirPatient:e=>{e.loaded=!1,e.patient=i.patient,e.status="idle"},setFhirPatient:(e,t)=>{e.loaded=!0,e.patient=t.payload}}}),{clearFhirPatient:s,setFhirPatient:a}=o.actions;t.ZP=o.reducer},12259:function(e,t,r){"use strict";r.d(t,{$k:function(){return i.$k},pn:function(){return y.pn},QM:function(){return u.QM},qz:function(){return u.qz},d5:function(){return u.d5},b1:function(){return d.b1},U4:function(){return d.U4},US:function(){return d.US},XP:function(){return p.XP},An:function(){return p.An},_T:function(){return p._T},Wn:function(){return c},p$:function(){return f.p$},MW:function(){return f.MW},dj:function(){return h.dj},N3:function(){return f.N3},LB:function(){return d.LB},XO:function(){return f.XO},jF:function(){return f.jF},OE:function(){return f.OE},Hk:function(){return n.Hk},lx:function(){return y.lx},ts:function(){return y.ts},_N:function(){return g._N},oX:function(){return g.oX},O3:function(){return i.O3},t8:function(){return i.t8},rw:function(){return n.rw},NV:function(){return g.NV},IC:function(){return g.IC},lG:function(){return m.lG},xy:function(){return m.xy},KU:function(){return y.KU},zJ:function(){return y.zJ},BS:function(){return y.BS},np:function(){return y.np},m2:function(){return y.m2},MK:function(){return i.MK}});var n=r(23055),i=r(94083);r(42376);let o=(0,r(85839).oM)({name:"getStarted",initialState:{insuranceUploaded:!1,identificationUploaded:!1,emergencyContactUploaded:!1},reducers:{clearGetStarted:e=>{},setIdUploaded:e=>{e.identificationUploaded=!0},setEmergencyContactUploaded:e=>{e.emergencyContactUploaded=!0}}}),{clearGetStarted:s,setIdUploaded:a,setEmergencyContactUploaded:l}=o.actions,c=o.reducer;var u=r(27921),h=r(5494),d=r(72145);r(10829);var f=r(6748),p=r(28466),m=r(35666),g=r(84255),y=r(61661)},27921:function(e,t,r){"use strict";r.d(t,{QM:function(){return o},d5:function(){return a},qz:function(){return s}});let n=(0,r(85839).oM)({name:"insurances",initialState:{data:[],status:"idle",error:""},reducers:{clearInsurances:e=>{},fetchInsurancesError:(e,t)=>{var r;e.status="failed",e.error=(null===(r=t.payload)||void 0===r?void 0:r.message)||"fetchInsurances Something went wrong"},fetchInsurances:e=>{e.status="loading"},fetchInsurancesSuccess:(e,t)=>{e.data=t.payload,e.status="succeeded"}}}),{clearInsurances:i,fetchInsurances:o,fetchInsurancesError:s,fetchInsurancesSuccess:a}=n.actions;t.ZP=n.reducer},72145:function(e,t,r){"use strict";r.d(t,{LB:function(){return a},U4:function(){return o},US:function(){return s},b1:function(){return i}});let n=(0,r(85839).oM)({name:"practitioners",initialState:{data:[],practitioners:[],status:"idle",loaded:!1,error:""},reducers:{fetchPractitionersError:(e,t)=>{var r;e.status="failed",e.error=(null===(r=t.payload)||void 0===r?void 0:r.message)||"fetchPractitioners Something went wrong"},fetchPractitioners:e=>{e.status="loading"},fetchPractitionersSuccess:(e,t)=>{e.data=t.payload,e.status="succeeded"},setAllPractitioners:(e,t)=>{Array.isArray(t.payload)&&(e.practitioners=t.payload,e.loaded=!0)}}}),{fetchPractitioners:i,fetchPractitionersError:o,fetchPractitionersSuccess:s,setAllPractitioners:a}=n.actions;t.ZP=n.reducer},10829:function(e,t,r){"use strict";let n=(0,r(85839).oM)({name:"quizAnswers",initialState:{common_side_effects:[],error:""},reducers:{setCommonSideEffects:(e,t)=>{e.common_side_effects=t.payload}}}),{setCommonSideEffects:i}=n.actions;t.ZP=n.reducer},6748:function(e,t,r){"use strict";r.d(t,{ZP:function(){return m},p$:function(){return c},MW:function(){return u},N3:function(){return h},XO:function(){return d},jF:function(){return f},OE:function(){return p}});var n=r(85839),i=r(53416);let o=(e,t,r)=>{if(!(r>0)||null==t||!t.id||null==t||!t.question)return e;{if(e.find(e=>e.id===t.id))return e;let n={...t,answerId:(0,i.x0)()},o=[...e];return o.splice(r+1,0,n),o}},s=(e,t)=>{var r,n,i;let s=e.filter(e=>e.id).map(e=>e.id),a=[...e],l=a.find(e=>"Fc0HxLzij9vqkDqsNdFMJ"===e.id);if((null==l?void 0:null===(r=l.answer)||void 0===r?void 0:r[0])==="cko83ue2h0007bqozaabuv5en"){if(s.includes("3ukjF8XvbZweUCEAIzUpE8")&&(a=[...a].filter(e=>"3ukjF8XvbZweUCEAIzUpE8"!==e.id&&"2GaYn0tXvT8dqjdbADM70Z"!==e.id&&"1VSDFj1pUu0FaEgUj8Rgn5"!==e.id)),!s.includes("HmRGmntWqvLjwbLG7PHX2")){let e=a.findIndex(e=>"4aDu11tDmdScqOmAFDFL0x"===e.id);a=o(a,t.find(e=>"HmRGmntWqvLjwbLG7PHX2"===e.id),e)}if(!s.includes("4cz85cckdm6EnfVNKL4ZtX")){let e=a.findIndex(e=>"HmRGmntWqvLjwbLG7PHX2"===e.id);a=o(a,t.find(e=>"4cz85cckdm6EnfVNKL4ZtX"===e.id),e)}}else if((null==l?void 0:null===(n=l.answer)||void 0===n?void 0:n[0])==="cko83udxe0000bqoznxj8ojle"&&(a=[...a].filter(e=>"HmRGmntWqvLjwbLG7PHX2"!==e.id&&"4cz85cckdm6EnfVNKL4ZtX"!==e.id),!s.includes("3ukjF8XvbZweUCEAIzUpE8"))){let e=a.findIndex(e=>"78VT1r8IfkIopsdt9FMHrb"===e.id);a=o(a,t.find(e=>"3ukjF8XvbZweUCEAIzUpE8"===e.id),e),a=o(a,t.find(e=>"2GaYn0tXvT8dqjdbADM70Z"===e.id),e+1),a=o(a,t.find(e=>"1VSDFj1pUu0FaEgUj8Rgn5"===e.id),e+2)}let c=a.find(e=>"17KnUiB8VhsJdyWyR6iEmT"===e.id);if(c){if("no"===c.answer[0])a=[...a].filter(e=>"4jBj4bmQT7soJFMiq9z5GY"!==e.id&&"1myeDuhZQBI1Figc0hA1oa"!==e.id);else if(!s.includes("4jBj4bmQT7soJFMiq9z5GY")){let e=a.findIndex(e=>"17KnUiB8VhsJdyWyR6iEmT"===e.id);a=o(a,t.find(e=>"4jBj4bmQT7soJFMiq9z5GY"===e.id),e),a=o(a,t.find(e=>"1myeDuhZQBI1Figc0hA1oa"===e.id),e+1)}}let u=a.find(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id);if(u){if(u.answer.includes("cl0bqyihh0119dyypwzrl296n")){let e=a.findIndex(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id);a=o(a,t.find(e=>"6ovGq0eibo7RpST9A1a2i"===e.id),e)}else a=[...a].filter(e=>"6ovGq0eibo7RpST9A1a2i"!==e.id);if(u.answer.includes("cl0br03970126dyypfgb7ltkp")){let e=a.findIndex(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id);a=o(a,t.find(e=>"r2IhgKb96RBpn6xKZ4Ees"===e.id),e)}else a=[...a].filter(e=>"r2IhgKb96RBpn6xKZ4Ees"!==e.id);if(u.answer.includes("cl0br382v0154dyyp7nqzvzfa")){let e=a.findIndex(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id),r=(a=o(a,t.find(e=>"64IB1IfkQ20cDUoaT38EOg"===e.id),e)).findIndex(e=>"64IB1IfkQ20cDUoaT38EOg"===e.id);a=o(a,t.find(e=>"62Z8c0h9tWSKLyxlU0jXob"===e.id),r)}else a=[...a].filter(e=>"64IB1IfkQ20cDUoaT38EOg"!==e.id&&"62Z8c0h9tWSKLyxlU0jXob"!==e.id);if(u.answer.includes("cl0br2zsx0147dyypt31075fd")){let e=a.findIndex(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id);a=o(a,t.find(e=>"5oPnGsnzmejFbSixtnOGdc"===e.id),e)}else a=[...a].filter(e=>"5oPnGsnzmejFbSixtnOGdc"!==e.id);if(u.answer.includes("cl0br2p1v0140dyypuifdc787")){let e=a.findIndex(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id);a=o(a,t.find(e=>"jvd5f6BIsyJGiTGDvuoUy"===e.id),e)}else a=[...a].filter(e=>"jvd5f6BIsyJGiTGDvuoUy"!==e.id);if(u.answer.includes("cl0br2hx20133dyypn3fbjfl9")){let e=a.findIndex(e=>"6nKUoMFcS2DXubCmaaB13V"===e.id);a=o(a,t.find(e=>"3nIMR88dAMybNF8Dp7ueTO"===e.id),e)}else a=[...a].filter(e=>"3nIMR88dAMybNF8Dp7ueTO"!==e.id)}let h=a.find(e=>"cl92wc3sf000ks6012hmdlzm0"===e.id);if(h&&"no"!==h.answer[0]){let e=a.findIndex(e=>"cl92wc3sf000ks6012hmdlzm0"===e.id);a=o(a,t.find(e=>"cl92wcwat0013s601mt2vga4u"===e.id),e)}else a=[...a].filter(e=>"cl92wcwat0013s601mt2vga4u"!==e.id);let d=a.find(e=>"cl92wdz5d001ns601exib070q"===e.id);if(d&&"no"!==d.answer[0]){let e=a.findIndex(e=>"cl92wdz5d001ns601exib070q"===e.id);a=o(a,t.find(e=>"cl92wew370026s601qni008fa"===e.id),e)}else a=[...a].filter(e=>"cl92wew370026s601qni008fa"!==e.id);let f=a.find(e=>"cl8wljeo20012s601s84poymd"===e.id);if(!f||f.answer.includes("cl93ls3l803452sypdk9nc795"))a=[...a].filter(e=>"cl8wll414001ms601pq6ki6sz"!==e.id);else{let e=a.findIndex(e=>"cl8wljeo20012s601s84poymd"===e.id);a=o(a,t.find(e=>"cl8wll414001ms601pq6ki6sz"===e.id),e)}let p=a.find(e=>"cl92t424w0000s601l2b5u23n"===e.id);if(!p||p.answer.includes("cl93lsgbj04052syp6q2qsu34"))a=[...a].filter(e=>"cl92t5i2z000js601es8p4s06"!==e.id);else{let e=a.findIndex(e=>"cl92t424w0000s601l2b5u23n"===e.id);a=o(a,t.find(e=>"cl92t5i2z000js601es8p4s06"===e.id),e)}let m=a.find(e=>"cl92uvazl0013s601v3nu1uzb"===e.id);if(!m||m.answer.includes("cl93m7z210074bbypl9jnwzfr"))a=[...a].filter(e=>"cl92uwdpn0000s601992usqva"!==e.id);else{let e=a.findIndex(e=>"cl92uvazl0013s601v3nu1uzb"===e.id);a=o(a,t.find(e=>"cl92uwdpn0000s601992usqva"===e.id),e)}let g=a.find(e=>"cl92v17jo000ks601nxziidvd"===e.id);if(!g||g.answer.includes("cl93m89o00155bbypukcr4o79"))a=[...a].filter(e=>"cl92v8ybh0014s6012djogm4n"!==e.id);else{let e=a.findIndex(e=>"cl92v17jo000ks601nxziidvd"===e.id);a=o(a,t.find(e=>"cl92v8ybh0014s6012djogm4n"===e.id),e)}let y=a.find(e=>"cl92vp1cr003rs601cz2zq3w9"===e.id);if(!y||y.answer.includes("no"))a=[...a].filter(e=>"cl92vwt6x004bs601kbufd3gn"!==e.id);else{let e=a.findIndex(e=>"cl92vp1cr003rs601cz2zq3w9"===e.id);a=o(a,t.find(e=>"cl92vwt6x004bs601kbufd3gn"===e.id),e)}let v=a.find(e=>"cl92vlg74002os6017nmyjdid"===e.id);if(!v||v.answer.includes("cl93meel90479bbyprathgb4x"))a=[...a].filter(e=>"cl93meel90479bbyprathgb4x"!==e.id);else{let e=a.findIndex(e=>"cl92vlg74002os6017nmyjdid"===e.id);a=o(a,t.find(e=>"cl93meel90479bbyprathgb4x"===e.id),e)}let b=a.find(e=>"cl92w0i3m004us6011390gest"===e.id);if(!b||b.answer.includes("no"))a=[...a].filter(e=>"cl92w1lpl005ds601zif4hyzi"!==e.id);else{let e=a.findIndex(e=>"cl92w0i3m004us6011390gest"===e.id);a=o(a,t.find(e=>"cl92w1lpl005ds601zif4hyzi"===e.id),e)}let w=a.find(e=>"clcfbyeew0036s601c9gk3uii"===e.id);if(!w||w.answer.includes("none"))a=[...a].filter(e=>"clcfc0o7f003hs60188nuvi1l"!==e.id);else{let e=a.findIndex(e=>"clcfbyeew0036s601c9gk3uii"===e.id);a=o(a,t.find(e=>"clcfc0o7f003hs60188nuvi1l"===e.id),e)}let _=a.find(e=>"clcfc6w7a003ss6015fqdyuwz"===e.id);if(!_||_.answer.includes("no"))a=[...a].filter(e=>"clcfcc7br0043s6016jnxihg3"!==e.id);else{let e=a.findIndex(e=>"clcfc6w7a003ss6015fqdyuwz"===e.id);a=o(a,t.find(e=>"clcfcc7br0043s6016jnxihg3"===e.id),e)}let x=a.find(e=>"64bde9c3091b5cd4df6e3fa1"===e.id);if((null==x?void 0:null===(i=x.answer[0])||void 0===i?void 0:i.length)>0){let e=x.answer;if(e.includes("clkj5w5va000g0zz01giz88qz")){let e=a.findIndex(e=>"64bde9c3091b5cd4df6e3fa1"===e.id),r=(a=o(a,t.find(e=>"64bdea98091b5cd4df6e3fa9"===e.id),e)).findIndex(e=>"64bdea98091b5cd4df6e3fa9"===e.id);a=o(a,t.find(e=>"64bdeae8091b5cd4df6e3fb1"===e.id),r)}else a=[...a].filter(e=>"64bdea98091b5cd4df6e3fa9"!==e.id&&"64bdeae8091b5cd4df6e3fb1"!==e.id);if(e.includes("clkj5w5xk000i0zz0nn7yj0ai")){let e=a.findIndex(e=>"64bde9c3091b5cd4df6e3fa1"===e.id);a=o(a,t.find(e=>"64bdeb2c091b5cd4df6e3fb9"===e.id),e)}else a=[...a].filter(e=>"64bdeb2c091b5cd4df6e3fb9"!==e.id);if(e.includes("clkj5w5p8000a0zz0gqiuywqs")){let e=a.findIndex(e=>"64bde9c3091b5cd4df6e3fa1"===e.id);a=o(a,t.find(e=>"64bdeb6e091b5cd4df6e3fc1"===e.id),e)}else a=[...a].filter(e=>"64bdeb6e091b5cd4df6e3fc1"!==e.id);if(e.includes("clkj5w5r4000c0zz0a0sn6a07")){let e=a.findIndex(e=>"64bde9c3091b5cd4df6e3fa1"===e.id);a=o(a,t.find(e=>"64f881375d706309d62fd31d"===e.id),e)}else a=[...a].filter(e=>"64f881375d706309d62fd31d"!==e.id);if(e.includes("clkj5w5t3000e0zz0c0s2d751")){let e=a.findIndex(e=>"64bde9c3091b5cd4df6e3fa1"===e.id);a=o(a,t.find(e=>"64f881985d706309d62fd325"===e.id),e)}else a=[...a].filter(e=>"64f881985d706309d62fd325"!==e.id)}let k=a.find(e=>"64bdeba6091b5cd4df6e3fc9"===e.id);if(!k||k.answer.includes("clkj64a37000a0zv3imapa1m0"))a=[...a].filter(e=>"64bdec16091b5cd4df6e3fd1"!==e.id);else{let e=a.findIndex(e=>"64bdeba6091b5cd4df6e3fc9"===e.id);a=o(a,t.find(e=>"64bdec16091b5cd4df6e3fd1"===e.id),e)}let S=a.find(e=>"64bdec90091b5cd4df6e3fe1"===e.id);if(!S||S.answer.includes("clkj65jvg000m0z0caj8fo04f"))a=[...a].filter(e=>"64bdecc9091b5cd4df6e3fe9"!==e.id);else{let e=a.findIndex(e=>"64bdec90091b5cd4df6e3fe1"===e.id);a=o(a,t.find(e=>"64bdecc9091b5cd4df6e3fe9"===e.id),e)}let E=a.find(e=>"64bdec90091b5cd4df6e3fe1"===e.id);if(E&&E.answer.includes("clkj65j9e00000z0cfa2s5zta")){let e=a.findIndex(e=>"64bdec90091b5cd4df6e3fe1"===e.id);a=o(a,t.find(e=>"6502f3c782802f4cee5f5a12"===e.id),e)}else a=[...a].filter(e=>"6502f3c782802f4cee5f5a12"!==e.id);let T=a.find(e=>"64bded12091b5cd4df6e3ff1"===e.id);if(!T||T.answer.includes("clkj66fi2000m0z35ie1fpkve"))a=[...a].filter(e=>"64bded61091b5cd4df6e3ff9"!==e.id);else{let e=a.findIndex(e=>"64bded12091b5cd4df6e3ff1"===e.id);a=o(a,t.find(e=>"64bded61091b5cd4df6e3ff9"===e.id),e)}let C=a.find(e=>"64bded12091b5cd4df6e3ff1"===e.id);if(C&&C.answer.includes("clkj65j9e00000z0cfa2s5zta")){let e=a.findIndex(e=>"64bded12091b5cd4df6e3ff1"===e.id);a=o(a,t.find(e=>"6502f6278e80352345ea80ef"===e.id),e)}else a=[...a].filter(e=>"6502f6278e80352345ea80ef"!==e.id);let I=a.find(e=>"64bdf742091b5cd4df6e4111"===e.id);if(!I||I.answer.includes("clkqrlxe6001cypbboh3mb4b8"))a=[...a].filter(e=>"64bdf78a091b5cd4df6e4119"!==e.id);else{let e=a.findIndex(e=>"64bdf742091b5cd4df6e4111"===e.id);a=o(a,t.find(e=>"64bdf78a091b5cd4df6e4119"===e.id),e)}let P=a.find(e=>"64bdf7d2091b5cd4df6e4121"===e.id);if(P&&P.answer.includes("clkqrqkrl001sypbbciuus6vi")){let e=a.findIndex(e=>"64bdf7d2091b5cd4df6e4121"===e.id);a=o(a,t.find(e=>"64bdf823091b5cd4df6e4129"===e.id),e)}else a=[...a].filter(e=>"64bdf823091b5cd4df6e4129"!==e.id);let A=a.find(e=>"64bdf940091b5cd4df6e4149"===e.id);if(!A||A.answer.includes("no"))a=[...a].filter(e=>"64bdf9ca091b5cd4df6e4151"!==e.id);else{let e=a.findIndex(e=>"64bdf940091b5cd4df6e4149"===e.id);a=o(a,t.find(e=>"64bdf9ca091b5cd4df6e4151"===e.id),e)}let O=a.find(e=>"64bdfa4b091b5cd4df6e4159"===e.id);if(!O||O.answer.includes("no"))a=[...a].filter(e=>"64bdfaa4091b5cd4df6e4161"!==e.id);else{let e=a.findIndex(e=>"64bdfa4b091b5cd4df6e4159"===e.id);a=o(a,t.find(e=>"64bdfaa4091b5cd4df6e4161"===e.id),e)}let R=a.find(e=>"64bdfb16091b5cd4df6e4171"===e.id);if(!R||R.answer.includes("no"))a=[...a].filter(e=>"64bdfb46091b5cd4df6e4179"!==e.id);else{let e=a.findIndex(e=>"64bdfb16091b5cd4df6e4171"===e.id);a=o(a,t.find(e=>"64bdfb46091b5cd4df6e4179"===e.id),e)}let N=a.find(e=>"64bdf6ac091b5cd4df6e4101"===e.id);if(N&&N.answer.includes("clkqrirhf000oypbbhmxc3htn")){let e=a.findIndex(e=>"64bdf6ac091b5cd4df6e4101"===e.id);a=o(a,t.find(e=>"64bdf6e5091b5cd4df6e4109"===e.id),e)}else a=[...a].filter(e=>"64bdf6e5091b5cd4df6e4109"!==e.id);let j=a.find(e=>"64bdf26b091b5cd4df6e4079"===e.id);if(!j||j.answer.includes("clkj6mc6y000g0zi8ga1pqes4"))a=[...a].filter(e=>"6516461626b2910503378c5d"!==e.id);else{let e=a.findIndex(e=>"64bdf26b091b5cd4df6e4079"===e.id);a=o(a,t.find(e=>"6516461626b2910503378c5d"===e.id),e)}let D=a.find(e=>"64bdf2d3091b5cd4df6e4081"===e.id);if(!D||D.answer.includes("clkj6mcee000o0zi8lp6rjhr2"))a=[...a].filter(e=>"65164653a3622380d4dd6b0e"!==e.id);else{let e=a.findIndex(e=>"64bdf2d3091b5cd4df6e4081"===e.id);a=o(a,t.find(e=>"65164653a3622380d4dd6b0e"===e.id),e)}let M=a.find(e=>"64bdf380091b5cd4df6e40a1"===e.id);if(!M||M.answer.includes("clkj6md8u001k0zi882zuwudl"))a=[...a].filter(e=>"6516468526b2910503378c65"!==e.id);else{let e=a.findIndex(e=>"64bdf380091b5cd4df6e40a1"===e.id);a=o(a,t.find(e=>"6516468526b2910503378c65"===e.id),e)}let L=a.find(e=>"clwxt9ecg000411sy8fpggill"===e.id);if(!L||L.answer.includes("clwxujjft001211syjrv0teui"))a=[...a].filter(e=>"clwxt9pq7000511syyd8swe7g"!==e.id);else{let e=a.findIndex(e=>"clwxt9ecg000411sy8fpggill"===e.id);a=o(a,t.find(e=>"clwxt9pq7000511syyd8swe7g"===e.id),e)}let F=a.find(e=>"clwxtacsv000711syd68d6ym8"===e.id);if(!F||F.answer.includes("clwxupbrf001911syknt6nonb"))a=[...a].filter(e=>"clwxtarx9000811syp83a213z"!==e.id);else{let e=a.findIndex(e=>"clwxtacsv000711syd68d6ym8"===e.id);a=o(a,t.find(e=>"clwxtarx9000811syp83a213z"===e.id),e)}let z=a.find(e=>"clwxtd4v3000e11syiw4bdu0m"===e.id);if(!z||z.answer.includes("clwxupbrf001911syknt6nonb"))a=[...a].filter(e=>"clwxtdmfl000f11syln1yq9se"!==e.id);else{let e=a.findIndex(e=>"clwxtd4v3000e11syiw4bdu0m"===e.id);a=o(a,t.find(e=>"clwxtdmfl000f11syln1yq9se"===e.id),e)}return{result:a=a.filter(e=>e.question&&e.id)}},a={answers:[],answersLoaded:!1,questions:[],questionsLoaded:!1,questionsUnfiltered:[],error:""},l=(0,n.oM)({name:"quiz",initialState:a,reducers:{recordUserAnswer:(e,t)=>{let{result:r}=s(e.questions.map(e=>{var r,n,i,o;return(null==e?void 0:e.answerId)===(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.answerId)&&(null==t?void 0:null===(i=t.payload)||void 0===i?void 0:null===(n=i.answer)||void 0===n?void 0:n[0])?{...e,answer:t.payload.answer,answer2:(null==t?void 0:null===(o=t.payload)||void 0===o?void 0:o.answer2)||[]}:e}),e.questionsUnfiltered);e.questions=r},resetQuiz:e=>{e.answers=a.answers,e.answersLoaded=a.answersLoaded,e.questions=a.questions,e.questionsLoaded=a.questionsLoaded,e.questionsUnfiltered=a.questionsUnfiltered,e.error=a.error},setAllAnswers:(e,t)=>{e.answers=t.payload,e.answersLoaded=!0},setAllQuestionsUnfiltered:(e,t)=>{e.questionsUnfiltered=t.payload},setAllQuestionsWithIds:(e,t)=>{e.questions=t.payload,e.questionsLoaded=!0},setAllQuestionsWithUserAnswers:(e,t)=>{let{result:r}=s(t.payload,e.questionsUnfiltered);e.questions=r,e.questionsLoaded=!0}}}),{recordUserAnswer:c,resetQuiz:u,setAllAnswers:h,setAllQuestionsUnfiltered:d,setAllQuestionsWithIds:f,setAllQuestionsWithUserAnswers:p}=l.actions;var m=l.reducer},5494:function(e,t,r){"use strict";r.d(t,{dj:function(){return i}});let n=(0,r(85839).oM)({name:"region",initialState:{loaded:!1,regionActivated:!1,regionData:{as:"",city:"",country:"",countryCode:"",isp:"",lat:0,lon:0,org:"",query:"",region:"",regionName:"",status:"",timezone:"",zip:""}},reducers:{setActiveRegion:(e,t)=>{e.regionActivated=t.payload.regionActivated,e.regionData=t.payload.regionData,e.loaded=!0}}}),{setActiveRegion:i}=n.actions;t.ZP=n.reducer},28466:function(e,t,r){"use strict";r.d(t,{An:function(){return o},XP:function(){return i},_T:function(){return s}});let n=(0,r(85839).oM)({name:"slots",initialState:{data:[],status:"idle",loaded:!1,error:""},reducers:{fetchSlotsError:(e,t)=>{var r;e.status="failed",e.error=(null===(r=t.payload)||void 0===r?void 0:r.message)||"fetchSlots Something went wrong"},fetchSlots:e=>{e.status="loading"},fetchSlotsSuccess:(e,t)=>{e.data=t.payload,e.status="succeeded"}}}),{fetchSlots:i,fetchSlotsError:o,fetchSlotsSuccess:s}=n.actions;t.ZP=n.reducer},35666:function(e,t,r){"use strict";r.d(t,{lG:function(){return o},xy:function(){return i}});let n=(0,r(85839).oM)({name:"staff",initialState:{data:[],loaded:!1,error:""},reducers:{setStaffUsersSlim:(e,t)=>{e.data=t.payload,e.loaded=!0},setStaffUsersServerErrorLoaded:e=>{e.loaded=!0}}}),{setStaffUsersSlim:i,setStaffUsersServerErrorLoaded:o}=n.actions;t.ZP=n.reducer},84255:function(e,t,r){"use strict";r.d(t,{IC:function(){return l},NV:function(){return a},_N:function(){return i},oX:function(){return o}});let n=(0,r(85839).oM)({name:"test",initialState:{isBetaSite:!1,loaded:!1,onboardingPreview:"control",preRegister:"control",preRegisterLoaded:!1,referrer:"",shortOption:"control"},reducers:{setIsBeta:e=>{e.isBetaSite=!0},setOnboardingPreview:(e,t)=>{e.onboardingPreview=t.payload},setPreRegisterTest:(e,t)=>{e.preRegisterLoaded=!0,e.preRegister=t.payload},setReferrer:(e,t)=>{e.referrer=t.payload},setShortOptionTest:(e,t)=>{e.loaded=!0,e.shortOption=t.payload}}}),{setIsBeta:i,setOnboardingPreview:o,setPreRegisterTest:s,setReferrer:a,setShortOptionTest:l}=n.actions;t.ZP=n.reducer},61661:function(e,t,r){"use strict";r.d(t,{BS:function(){return p},KU:function(){return h},lx:function(){return c},m2:function(){return g},np:function(){return m},pn:function(){return s},ts:function(){return u},zJ:function(){return f}});var n=r(85839);let i={agreedToBetaTerms:!1,user:{id:"",uid:""},userActiveQuiz:{version:""},userHasCompletedIntake:!1,userOptions:[],usersQuizzes:[],usersQuizzesLoaded:!1,userPastAndCurrentMedications:[],userPastAndCurrentPharm:[],userPastAndCurrentNonPharm:[]},o=(0,n.oM)({name:"user",initialState:i,reducers:{clearUser:e=>{e.user=i.user,e.userOptions=i.userOptions,e.usersQuizzes=i.usersQuizzes,e.usersQuizzesLoaded=i.usersQuizzesLoaded},clearUserActiveQuiz:e=>{e.userActiveQuiz=i.userActiveQuiz},setBetaAgreed:e=>{e.agreedToBetaTerms=!0},setCurrentUser:(e,t)=>{e.user=t.payload},setHasCompletedIntake:e=>{e.userHasCompletedIntake=!0},setUserActiveQuiz:(e,t)=>{e.userActiveQuiz=t.payload},setUserOptions:(e,t)=>{e.userOptions=t.payload},setUserPastAndCurrentMedication:(e,t)=>{e.userPastAndCurrentMedications=t.payload},setUserPastAndCurrentPharm:(e,t)=>{e.userPastAndCurrentPharm=t.payload},setUserPronoun:(e,t)=>{e.user={...e.user,pronoun:t.payload}},setUserPastAndCurrentNonPharm:(e,t)=>{e.userPastAndCurrentNonPharm=t.payload}}}),{clearUser:s,clearUserActiveQuiz:a,setBetaAgreed:l,setCurrentUser:c,setHasCompletedIntake:u,setUserActiveQuiz:h,setUserOptions:d,setUserPastAndCurrentMedication:f,setUserPastAndCurrentNonPharm:p,setUserPastAndCurrentPharm:m,setUserPronoun:g}=o.actions;t.ZP=o.reducer},38971:function(e,t,r){"use strict";r.d(t,{Z:function(){return eK}});var n,i=r(85839),o=r(5185),s=function(e){return"@@redux-saga/"+e},a=s("CANCEL_PROMISE"),l=s("CHANNEL_END"),c=s("IO"),u=s("MATCH"),h=s("MULTICAST"),d=s("SAGA_ACTION"),f=s("SELF_CANCELLATION"),p=s("TASK"),m=s("TASK_CANCEL"),g=s("TERMINATE"),y=s("LOCATION"),v=r(87462),b=r(63366),w=function(e){return null==e},_=function(e){return null!=e},x=function(e){return"function"==typeof e},k=function(e){return"string"==typeof e},S=Array.isArray,E=function(e){return e&&x(e.then)},T=function(e){return e&&x(e.next)&&x(e.throw)},C=function e(t){return t&&(k(t)||A(t)||x(t)||S(t)&&t.every(e))},I=function(e){return e&&x(e.take)&&x(e.close)},P=function(e){return x(e)&&e.hasOwnProperty("toString")},A=function(e){return!!e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},O=function(){return!0},R=function(){},N=function(e){return e},j=function(e,t){(0,v.Z)(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(function(r){e[r]=t[r]})},D=function(e,t){var r;return(r=[]).concat.apply(r,t.map(e))};function M(e,t){var r=e.indexOf(t);r>=0&&e.splice(r,1)}var L=function(e){throw e},F=function(e){return{value:e,done:!0}};function z(e,t,r){void 0===t&&(t=L),void 0===r&&(r="iterator");var n={meta:{name:r},next:e,throw:t,return:F,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(n[Symbol.iterator]=function(){return n}),n}function U(e,t){var r=t.sagaStack;console.error(e),console.error(r)}var B=function(e){return Array.apply(null,Array(e))},V=function(e){return e===g},q=function(e){return e===m},$=function(e){return V(e)||q(e)};function W(e,t){var r,n=Object.keys(e),i=n.length,o=0,s=S(e)?B(i):{},a={};return n.forEach(function(e){var n=function(n,a){r||(a||$(n)?(t.cancel(),t(n,a)):(s[e]=n,++o===i&&(r=!0,t(s))))};n.cancel=R,a[e]=n}),t.cancel=function(){r||(r=!0,n.forEach(function(e){return a[e].cancel()}))},a}function H(e){return{name:e.name||"anonymous",location:e[y]}}function G(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}var K="TAKE",Q="CALL",Y="FORK",X=function(e,t){var r;return(r={})[c]=!0,r.combinator=!1,r.type=e,r.payload=t,r};function J(e,t){return w(t)&&(t=e,e=void 0),X("PUT",{channel:e,action:t})}function Z(e,t){var r,n=null;return x(e)?r=e:(S(e)?(n=e[0],r=e[1]):(n=e.context,r=e.fn),n&&k(r)&&x(n[r])&&(r=n[r])),{context:n,fn:r,args:t}}function ee(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return X(Q,Z(e,r))}function et(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return X(Y,Z(e,r))}var er=function(){var e={};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e},en=[],ei=0;function eo(e){en.push(e),ei||(ei++,ea())}function es(e){try{return ei++,e()}finally{ea()}}function ea(){var e;for(ei--;!ei&&void 0!==(e=en.shift());)!function(e){try{ei++,e()}finally{ei--}}(e)}var el=function(e){return function(t){return e.some(function(e){return ef(e)(t)})}},ec=function(e){return function(t){return e(t)}},eu=function(e){return function(t){return t.type===String(e)}},eh=function(e){return function(t){return t.type===e}},ed=function(){return O};function ef(e){var t="*"===e?ed:k(e)?eu:S(e)?el:P(e)?eu:x(e)?ec:A(e)?eh:null;if(null===t)throw Error("invalid pattern: "+e);return t(e)}var ep={type:l},em=function(e){return e&&e.type===l};function eg(){var e,t,r,n,i,o,s=(t=!1,n=r=[],i=function(){n===r&&(n=r.slice())},o=function(){t=!0;var e=r=n;n=[],e.forEach(function(e){e(ep)})},(e={})[h]=!0,e.put=function(e){if(!t){if(em(e)){o();return}for(var i=r=n,s=0,a=i.length;s<a;s++){var l=i[s];l[u](e)&&(l.cancel(),l(e))}}},e.take=function(e,r){var o,s;if(void 0===r&&(r=ed),t){e(ep);return}e[u]=r,i(),n.push(e),e.cancel=(o=function(){i(),M(n,e)},s=!1,function(){s||(s=!0,o())})},e.close=o,e),a=s.put;return s.put=function(e){if(e[d]){a(e);return}eo(function(){a(e)})},s}function ey(e,t){var r=e[a];x(r)&&(t.cancel=r),e.then(t,function(e){t(e,!0)})}var ev=0,eb=function(){return++ev};function ew(e){e.isRunning()&&e.cancel()}var e_=((n={})[K]=function(e,t,r){var n=t.channel,i=void 0===n?e.channel:n,o=t.pattern,s=t.maybe,a=function(e){if(e instanceof Error){r(e,!0);return}if(em(e)&&!s){r(g);return}r(e)};try{i.take(a,_(o)?ef(o):null)}catch(e){r(e,!0);return}r.cancel=a.cancel},n.PUT=function(e,t,r){var n=t.channel,i=t.action,o=t.resolve;eo(function(){var t;try{t=(n?n.put:e.dispatch)(i)}catch(e){r(e,!0);return}o&&E(t)?ey(t,r):r(t)})},n.ALL=function(e,t,r,n){var i=n.digestEffect,o=ev,s=Object.keys(t);if(0===s.length){r(S(t)?[]:{});return}var a=W(t,r);s.forEach(function(e){i(t[e],o,a[e],e)})},n.RACE=function(e,t,r,n){var i=n.digestEffect,o=ev,s=Object.keys(t),a=S(t)?B(s.length):{},l={},c=!1;s.forEach(function(e){var t=function(t,n){c||(n||$(t)?(r.cancel(),r(t,n)):(r.cancel(),c=!0,a[e]=t,r(a)))};t.cancel=R,l[e]=t}),r.cancel=function(){c||(c=!0,s.forEach(function(e){return l[e].cancel()}))},s.forEach(function(e){c||i(t[e],o,l[e],e)})},n[Q]=function(e,t,r,n){var i=t.context,o=t.fn,s=t.args,a=n.task;try{var l=o.apply(i,s);if(E(l)){ey(l,r);return}if(T(l)){eP(e,l,a.context,ev,H(o),!1,r);return}r(l)}catch(e){r(e,!0)}},n.CPS=function(e,t,r){var n=t.context,i=t.fn,o=t.args;try{var s=function(e,t){w(e)?r(t):r(e,!0)};i.apply(n,o.concat(s)),s.cancel&&(r.cancel=s.cancel)}catch(e){r(e,!0)}},n[Y]=function(e,t,r,n){var i=t.context,o=t.fn,s=t.args,a=t.detached,l=n.task,c=function(e){var t=e.context,r=e.fn,n=e.args;try{var i=r.apply(t,n);if(T(i))return i;var o=!1;return z(function(e){return o?{value:e,done:!0}:(o=!0,{value:i,done:!E(i)})})}catch(e){return z(function(){throw e})}}({context:i,fn:o,args:s}),u=c.isSagaIterator?{name:c.meta.name}:H(o);es(function(){var t=eP(e,c,l.context,ev,u,a,void 0);a?r(t):t.isRunning()?(l.queue.addTask(t),r(t)):t.isAborted()?l.queue.abort(t.error()):r(t)})},n.JOIN=function(e,t,r,n){var i=n.task,o=function(e,t){if(e.isRunning()){var r={task:i,cb:t};t.cancel=function(){e.isRunning()&&M(e.joiners,r)},e.joiners.push(r)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(S(t)){if(0===t.length){r([]);return}var s=W(t,r);t.forEach(function(e,t){o(e,s[t])})}else o(t,r)},n.CANCEL=function(e,t,r,n){var i=n.task;t===f?ew(i):S(t)?t.forEach(ew):ew(t),r()},n.SELECT=function(e,t,r){var n=t.selector,i=t.args;try{var o=n.apply(void 0,[e.getState()].concat(i));r(o)}catch(e){r(e,!0)}},n.ACTION_CHANNEL=function(e,t,r){var n=t.pattern,i=function(e){if(void 0===e){var t,r,n,i,o,s,a,l;t=void 0,r=Array(t=10),n=0,i=0,o=0,s=function(e){r[i]=e,i=(i+1)%t,n++},a=function(){if(0!=n){var e=r[o];return r[o]=null,n--,o=(o+1)%t,e}},l=function(){for(var e=[];n;)e.push(a());return e},e={isEmpty:function(){return 0==n},put:function(e){if(n<t)s(e);else{var a;a=2*t,n=(r=l()).length,i=r.length,o=0,r.length=a,t=a,s(e)}},take:a,flush:l}}var c=!1,u=[];return{take:function(t){c&&e.isEmpty()?t(ep):e.isEmpty()?(u.push(t),t.cancel=function(){M(u,t)}):t(e.take())},put:function(t){if(!c){if(0===u.length)return e.put(t);u.shift()(t)}},flush:function(t){if(c&&e.isEmpty()){t(ep);return}t(e.flush())},close:function(){if(!c){c=!0;var e=u;u=[];for(var t=0,r=e.length;t<r;t++)(0,e[t])(ep)}}}}(t.buffer),o=ef(n),s=function t(r){em(r)||e.channel.take(t,o),i.put(r)},a=i.close;i.close=function(){s.cancel(),a()},e.channel.take(s,o),r(i)},n.CANCELLED=function(e,t,r,n){r(n.task.isCancelled())},n.FLUSH=function(e,t,r){t.flush(r)},n.GET_CONTEXT=function(e,t,r,n){r(n.task.context[t])},n.SET_CONTEXT=function(e,t,r,n){j(n.task.context,t),r()},n);function ex(e){var t=e.name,r=e.location;return r?t+"  "+r.fileName+"?"+r.lineNumber:t}var ek=null,eS=[],eE=function(e){e.crashedEffect=ek,eS.push(e)},eT=function(){ek=null,eS.length=0},eC=function(e){ek=e},eI=function(){var e,t,r=eS[0],n=eS.slice(1),i=r.crashedEffect?(e=r.crashedEffect[y])?e.code+"  "+e.fileName+"?"+e.lineNumber:"":null;return["The above error occurred in task "+ex(r.meta)+(i?" \n when executing effect "+i:"")].concat(n.map(function(e){return"    created by "+ex(e.meta)}),[(t=D(function(e){return e.cancelledTasks},eS)).length?["Tasks cancelled due to error:"].concat(t).join("\n"):""]).join("\n")};function eP(e,t,r,n,i,o,s){var a=e.finalizeRunEffect(function(t,r,n){E(t)?ey(t,n):T(t)?eP(e,t,u.context,r,i,!1,n):t&&t[c]?(0,e_[t.type])(e,t.payload,n,h):n(t)});d.cancel=R;var l={meta:i,cancel:function(){0===l.status&&(l.status=1,d(m))},status:0},u=function(e,t,r,n,i,o,s){void 0===s&&(s=R);var a,l,c,u=0,h=null,d=[],f=Object.create(r),g=function(e,t,r){var n,i=[],o=!1;function s(e){t(),l(),r(e,!0)}function a(t){i.push(t),t.cont=function(a,l){!o&&(M(i,t),t.cont=R,l?s(a):(t===e&&(n=a),i.length||(o=!0,r(n))))}}function l(){o||(o=!0,i.forEach(function(e){e.cont=R,e.cancel()}),i=[])}return a(e),{addTask:a,cancelAll:l,abort:s,getTasks:function(){return i}}}(t,function(){d.push.apply(d,g.getTasks().map(function(e){return e.meta.name}))},y);function y(t,r){if(r){if(u=2,eE({meta:i,cancelledTasks:d}),v.isRoot){var n=eI();eT(),e.onError(t,{sagaStack:n})}c=t,h&&h.reject(t)}else t===m?u=1:1!==u&&(u=3),l=t,h&&h.resolve(t);v.cont(t,r),v.joiners.forEach(function(e){e.cb(t,r)}),v.joiners=null}var v=((a={})[p]=!0,a.id=n,a.meta=i,a.isRoot=o,a.context=f,a.joiners=[],a.queue=g,a.cancel=function(){0===u&&(u=1,g.cancelAll(),y(m,!1))},a.cont=s,a.end=y,a.setContext=function(e){j(f,e)},a.toPromise=function(){return h||(h=er(),2===u?h.reject(c):0!==u&&h.resolve(l)),h.promise},a.isRunning=function(){return 0===u},a.isCancelled=function(){return 1===u||0===u&&1===t.status},a.isAborted=function(){return 2===u},a.result=function(){return l},a.error=function(){return c},a);return v}(e,l,r,n,i,o,s),h={task:u,digestEffect:f};return s&&(s.cancel=u.cancel),d(),u;function d(e,r){try{var i;r?(i=t.throw(e),eT()):q(e)?(l.status=1,d.cancel(),i=x(t.return)?t.return(m):{done:!0,value:m}):i=V(e)?x(t.return)?t.return():{done:!0}:t.next(e),i.done?(1!==l.status&&(l.status=3),l.cont(i.value)):f(i.value,n,d)}catch(e){if(1===l.status)throw e;l.status=2,l.cont(e,!0)}}function f(t,r,n,i){void 0===i&&(i="");var o,s=eb();function l(r,i){o||(o=!0,n.cancel=R,e.sagaMonitor&&(i?e.sagaMonitor.effectRejected(s,r):e.sagaMonitor.effectResolved(s,r)),i&&eC(t),n(r,i))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:s,parentEffectId:r,label:i,effect:t}),l.cancel=R,n.cancel=function(){!o&&(o=!0,l.cancel(),l.cancel=R,e.sagaMonitor&&e.sagaMonitor.effectCancelled(s))},a(t,s,l)}}function eA(e,t){for(var r,n=e.channel,i=void 0===n?eg():n,o=e.dispatch,s=e.getState,a=e.context,l=void 0===a?{}:a,c=e.sagaMonitor,u=e.effectMiddlewares,h=e.onError,f=arguments.length,p=Array(f>2?f-2:0),m=2;m<f;m++)p[m-2]=arguments[m];var g=t.apply(void 0,p),y=eb();if(c&&(c.rootSagaStarted=c.rootSagaStarted||R,c.effectTriggered=c.effectTriggered||R,c.effectResolved=c.effectResolved||R,c.effectRejected=c.effectRejected||R,c.effectCancelled=c.effectCancelled||R,c.actionDispatched=c.actionDispatched||R,c.rootSagaStarted({effectId:y,saga:t,args:p})),u){var v=G.apply(void 0,u);r=function(e){return function(t,r,n){return v(function(t){return e(t,r,n)})(t)}}}else r=N;var b={channel:i,dispatch:function(e){return o(Object.defineProperty(e,d,{value:!0}))},getState:s,sagaMonitor:c,onError:void 0===h?U:h,finalizeRunEffect:r};return es(function(){var e=eP(b,g,l,y,H(t),!0,void 0);return c&&c.effectResolved(y,e),e})}var eO=function(e){return{done:!0,value:e}},eR={};function eN(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var o,s,a,l,c={done:!1,value:(void 0===(o=e)&&(o="*"),C(o))?(_(void 0)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),X(K,{pattern:o})):I(a=o)&&a[h]&&_(void 0)&&C(s)?X(K,{channel:o,pattern:s}):I(o)?(_(s)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),X(K,{channel:o})):void 0},u=function(e){return l=e};return function(e,t,r){var n,i,o,s="q1";function a(t,r){if(s===eR)return eO(t);if(r&&!i)throw s=eR,r;n&&n(t);var a=r?e[i](r):e[s]();return s=a.nextState,o=a.effect,n=a.stateUpdater,i=a.errorState,s===eR?eO(t):o}return z(a,function(e){return a(null,e)},r)}({q1:function(){return{nextState:"q2",effect:c,stateUpdater:u}},q2:function(){var e;return{nextState:"q1",effect:(e=l,{done:!1,value:et.apply(void 0,[t].concat(n,[e]))})}}},0,"takeEvery("+(I(e)?"channel":P(e)?String(e):x(e)?e.name:String(e))+", "+t.name+")")}function ej(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return et.apply(void 0,[eN,e,t].concat(n))}var eD=r(12259);let eM=async()=>{let e=await fetch("".concat("https://srvr.optionsmd.com","/public/insurance"),{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error("Server Error");let{data:t}=await e.json();return t};var eL=r(91259);let eF=async()=>{let e=await (0,eL.N)(),t=await fetch("".concat("https://srvr.optionsmd.com","/onboarding/slots"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!t.ok)throw Error("Server Error");let{data:r}=await t.json();return r},ez=async()=>{let e=await (0,eL.N)(),t=await fetch("".concat("https://srvr.optionsmd.com","/public/practitioners"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!t.ok)throw Error("Server Error");let{data:r}=await t.json();return r};function*eU(e){try{let e=yield ee(eM);yield J((0,eD.d5)(e))}catch(e){console.error(e),yield J((0,eD.qz)(e))}}var eB=function*(){yield ej(eD.QM,eU)};function*eV(){try{let e=yield ee(ez);yield J((0,eD.US)(e))}catch(e){console.error(e),yield J((0,eD.U4)(e))}}var eq=function*(){yield ej(eD.b1,eV)};function*e$(){try{let e=yield ee(eF);yield J((0,eD._T)(e))}catch(e){console.error(e),yield J((0,eD.An)(e))}}var eW=function*(){yield ej(eD.XP,e$)};(0,i.PH)("CLEAR_ALL_STATE");let eH=function(e){var t,r=void 0===e?{}:e,n=r.context,i=void 0===n?{}:n,o=r.channel,s=void 0===o?eg():o,a=r.sagaMonitor,l=(0,b.Z)(r,["context","channel","sagaMonitor"]);function c(e){var r=e.getState,n=e.dispatch;return t=eA.bind(null,(0,v.Z)({},l,{context:i,channel:s,dispatch:n,getState:r,sagaMonitor:a})),function(e){return function(t){a&&a.actionDispatched&&a.actionDispatched(t);var r=e(t);return s.put(t),r}}}return c.run=function(){return t.apply(void 0,arguments)},c.setContext=function(e){j(i,e)},c}(),eG=(0,i.xC)({reducer:(e,t)=>"CLEAR_ALL_STATE"===t.type?(0,o.Z)(void 0,t):(0,o.Z)(e,t),devTools:!1,middleware:e=>e({serializableCheck:!1}).concat(eH)});eH.run(function*(){var e;yield((e=X("ALL",[eB(),eq(),eW()])).combinator=!0,e)});var eK=eG},8805:function(e,t,r){"use strict";r.d(t,{zQ:function(){return d},Fw:function(){return f},_y:function(){return m},Sy:function(){return p},Iq:function(){return h}});var n=r(19900),i=r(63923),o=r(17660),s=r(67751),a=r(75696),l=r(19126),c=r(88074),u=r(38971);let h=async e=>{let{eventType:t,data:r}=e;try{if("https://srvr.optionsmd.com".includes("localhost"))return;let e={geo_country:"",geo_region:"",geo_zip:""},{regionData:n,loaded:i}=u.Z.getState().region;i&&n.country&&(e.geo_country=n.country,e.geo_region=n.region,e.geo_zip=n.zip||"");let o=(0,c.JU)((0,c.hJ)(c.db,"options-events")),s=new Date,a={id:o.id,day:s.getDate(),day_of_week:s.getDay(),event_type:t,month:s.getMonth()+1,year:s.getFullYear(),ts_bigIntAsString:"".concat(s.getTime()),ts_iso:s.toISOString(),processed:!1,processedTs:"",type:t,...r,...e};return await (0,c.pl)(o,a),!0}catch(e){return!1}},d=e=>{let{urlString:t,paramName:r,paramValue:n}=e;try{let e=new URL(t);return e.searchParams.set(r,n),e.toString()}catch(e){return t}},f=e=>{let t=new Date,r=new Date(e);return Math.floor((t.getTime()-r.getTime())/31536e6)},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return e.length>t+3?e.slice(0,t)+"...":e},m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Date,r=(0,n.Q)(new Date);t=function(e,t,r){let o=(0,i.Q)(e),s=(0,n.Q)(o,void 0)-t;return o.setDate(o.getDate()-7*s),o}(t,r+e);let c=r+e===r?t:(0,o.z)(t),u=function(e,t){var r,n,o,a,l;let c=(0,s.j)(),u=null!==(l=null!==(a=(o=void 0,c.weekStartsOn))&&void 0!==a?a:null===(n=c.locale)||void 0===n?void 0:null===(r=n.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==l?l:0,h=(0,i.Q)(e),d=h.getDay();return h.setDate(h.getDate()+((d<u?-7:0)+6-(d-u))),h.setHours(23,59,59,999),h}(t),h=[];for(t=r+e===r?t:c;t<=u;)h.push(t),t=function(e,t){let r=(0,i.Q)(e);return isNaN(1)?(0,a.L)(e,NaN):(r.setDate(r.getDate()+1),r)}(t,1);return{startOfWeek:c,endOfWeek:u,weekDays:h,formattedWeekDays:h.map(e=>(0,l.WU)(e,"MM_dd_yyyy"))}}},91479:function(){},77663:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l=[],c=!1,u=-1;function h(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&d())}function d(){if(!c){var e=a(h);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u<t;)n&&n[u].run();u=-1,t=l.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||c||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//";var i=n(229);e.exports=i}()},9008:function(e,t,r){e.exports=r(23867)},41664:function(e,t,r){e.exports=r(98342)},39332:function(e,t,r){e.exports=r(8199)},11163:function(e,t,r){e.exports=r(43079)},4298:function(e,t,r){e.exports=r(23381)},83300:function(e,t,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},69590:function(e){var t="undefined"!=typeof Element,r="function"==typeof Map,n="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,o){try{return function e(o,s){if(o===s)return!0;if(o&&s&&"object"==typeof o&&"object"==typeof s){var a,l,c,u;if(o.constructor!==s.constructor)return!1;if(Array.isArray(o)){if((a=o.length)!=s.length)return!1;for(l=a;0!=l--;)if(!e(o[l],s[l]))return!1;return!0}if(r&&o instanceof Map&&s instanceof Map){if(o.size!==s.size)return!1;for(u=o.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return!1;for(u=o.entries();!(l=u.next()).done;)if(!e(l.value[1],s.get(l.value[0])))return!1;return!0}if(n&&o instanceof Set&&s instanceof Set){if(o.size!==s.size)return!1;for(u=o.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(s)){if((a=o.length)!=s.length)return!1;for(l=a;0!=l--;)if(o[l]!==s[l])return!1;return!0}if(o.constructor===RegExp)return o.source===s.source&&o.flags===s.flags;if(o.valueOf!==Object.prototype.valueOf&&"function"==typeof o.valueOf&&"function"==typeof s.valueOf)return o.valueOf()===s.valueOf();if(o.toString!==Object.prototype.toString&&"function"==typeof o.toString&&"function"==typeof s.toString)return o.toString()===s.toString();if((a=(c=Object.keys(o)).length)!==Object.keys(s).length)return!1;for(l=a;0!=l--;)if(!Object.prototype.hasOwnProperty.call(s,c[l]))return!1;if(t&&o instanceof Element)return!1;for(l=a;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!o.$$typeof)&&!e(o[c[l]],s[c[l]]))return!1;return!0}return o!=o&&s!=s}(e,o)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},69921:function(e,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case h:case o:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case g:case m:case l:return e;default:return t}}case i:return t}}}function x(e){return _(e)===h}t.AsyncMode=u,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=l,t.Element=n,t.ForwardRef=d,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||_(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===o},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===a},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===a||e===s||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=_},59864:function(e,t,r){"use strict";e.exports=r(69921)},73914:function(e,t,r){"use strict";e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,r(67294))},73469:function(e,t,r){"use strict";var n=r(67294).useLayoutEffect;t.Z=n},53771:function(e,t,r){"use strict";var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,s=n.useRef,a=n.useEffect,l=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,u){var h=s(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var f=o(e,(h=l(function(){function e(e){if(!a){if(a=!0,o=e,e=n(e),void 0!==u&&d.hasValue){var t=d.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var r=n(e);return void 0!==u&&u(t,r)?t:(o=e,s=r)}var o,s,a=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,r,n,u]))[0],h[1]);return a(function(){d.hasValue=!0,d.value=f},[f]),c(f),f}},31103:function(e,t,r){"use strict";e.exports=r(53771)},73897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},85372:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},66115:function(e){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},17156:function(e){function t(e,t,r,n,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,i)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise(function(i,o){var s=e.apply(r,n);function a(e){t(s,i,o,a,l,"next",e)}function l(e){t(s,i,o,a,l,"throw",e)}a(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},56690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3515:function(e,t,r){var n=r(69617),i=r(6015);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var s=new(e.bind.apply(e,o));return r&&i(s,r.prototype),s},e.exports.__esModule=!0,e.exports.default=e.exports},89728:function(e,t,r){var n=r(64062);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}e.exports=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},38416:function(e,t,r){var n=r(64062);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},73808:function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},61655:function(e,t,r){var n=r(6015);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},46035:function(e){e.exports=function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},69617:function(e){function t(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e.exports=t=function(){return!!r},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},68872:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,a=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},12218:function(e){e.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},94993:function(e,t,r){var n=r(18698).default,i=r(66115);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},17061:function(e,t,r){var n=r(18698).default;function i(){"use strict";e.exports=i=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",h=l.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,r,n,i){var o,s,l=Object.create((r&&r.prototype instanceof b?r:b).prototype);return a(l,"_invoke",{value:(o=new A(i||[]),s=m,function(r,i){if(s===g)throw Error("Generator is already running");if(s===y){if("throw"===r)throw i;return{value:t,done:!0}}for(o.method=r,o.arg=i;;){var a=o.delegate;if(a){var l=function e(r,n){var i=n.method,o=r.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),v;var s=p(o,r.iterator,n.arg);if("throw"===s.type)return n.method="throw",n.arg=s.arg,n.delegate=null,v;var a=s.arg;return a?a.done?(n[r.resultName]=a.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(a,o);if(l){if(l===v)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(s===m)throw s=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s=g;var c=p(e,n,o);if("normal"===c.type){if(s=o.done?y:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(s=y,o.method="throw",o.arg=c.arg)}})}),l}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var m="suspendedStart",g="executing",y="completed",v={};function b(){}function w(){}function _(){}var x={};d(x,c,function(){return this});var k=Object.getPrototypeOf,S=k&&k(k(O([])));S&&S!==o&&s.call(S,c)&&(x=S);var E=_.prototype=b.prototype=Object.create(x);function T(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function C(e,t){var r;a(this,"_invoke",{value:function(i,o){function a(){return new t(function(r,a){!function r(i,o,a,l){var c=p(e[i],e,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==n(h)&&s.call(h,"__await")?t.resolve(h.__await).then(function(e){r("next",e,a,l)},function(e){r("throw",e,a,l)}):t.resolve(h).then(function(e){u.value=e,a(u)},function(e){return r("throw",e,a,l)})}l(c.arg)}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(s.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw TypeError(n(e)+" is not iterable")}return w.prototype=_,a(E,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:w,configurable:!0}),w.displayName=d(_,h,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,d(e,h,"GeneratorFunction")),e.prototype=Object.create(E),e},r.awrap=function(e){return{__await:e}},T(C.prototype),d(C.prototype,u,function(){return this}),r.AsyncIterator=C,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var s=new C(f(e,t,n,i),o);return r.isGeneratorFunction(t)?s:s.next().then(function(e){return e.done?e.value:s.next()})},T(E),d(E,h,"Generator"),d(E,c,function(){return this}),d(E,"toString",function(){return"[object Generator]"}),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=O,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&s.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},27424:function(e,t,r){var n=r(85372),i=r(68872),o=r(86116),s=r(12218);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},95036:function(e,t,r){var n=r(18698).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},64062:function(e,t,r){var n=r(18698).default,i=r(95036);e.exports=function(e){var t=i(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},18698:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116:function(e,t,r){var n=r(73897);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},33496:function(e,t,r){var n=r(73808),i=r(6015),o=r(46035),s=r(3515);function a(t){var r="function"==typeof Map?new Map:void 0;return e.exports=a=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return s(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,a(t)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},64687:function(e,t,r){var n=r(17061)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},1644:function(e,t,r){"use strict";var n,i;function o(e){return!!e&&e<7}r.d(t,{Ie:function(){return n},Oj:function(){return o}}),(i=n||(n={}))[i.loading=1]="loading",i[i.setVariables=2]="setVariables",i[i.fetchMore=3]="fetchMore",i[i.refetch=4]="refetch",i[i.poll=6]="poll",i[i.ready=7]="ready",i[i.error=8]="error"},30990:function(e,t,r){"use strict";r.d(t,{MS:function(){return a},YG:function(){return o},cA:function(){return c},ls:function(){return s}});var n=r(97582);r(78287);var i=r(13154),o=Symbol();function s(e){return!!e.extensions&&Array.isArray(e.extensions[o])}function a(e){return e.hasOwnProperty("graphQLErrors")}var l=function(e){var t=(0,n.ev)((0,n.ev)((0,n.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,i.s)(e)&&e.message||"Error message not found."}).join("\n")},c=function(e){function t(r){var i=r.graphQLErrors,o=r.protocolErrors,s=r.clientErrors,a=r.networkError,c=r.errorMessage,u=r.extraInfo,h=e.call(this,c)||this;return h.name="ApolloError",h.graphQLErrors=i||[],h.protocolErrors=o||[],h.clientErrors=s||[],h.networkError=a||null,h.message=c||l(h),h.extraInfo=u,h.cause=(0,n.ev)((0,n.ev)((0,n.ev)([a],i||[],!0),o||[],!0),s||[],!0).find(function(e){return!!e})||null,h.__proto__=t.prototype,h}return(0,n.ZT)(t,e),t}(Error)},85317:function(e,t,r){"use strict";r.d(t,{K:function(){return l}});var n,i=r(73914),o=r(30320),s=r(78287),a=o.aS?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function l(){(0,s.kG)("createContext"in(n||(n=r.t(i,2))),46);var e=i.createContext[a];return e||(Object.defineProperty(i.createContext,a,{value:e=i.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},38991:function(e,t,r){"use strict";r.d(t,{L:function(){return l},s:function(){return a}});var n=r(99869),i=r(2379),o=new WeakSet;function s(e){!(e.size<=(e.max||-1))&&(o.has(e)||(o.add(e),setTimeout(function(){e.clean(),o.delete(e)},100)))}var a=function(e,t){var r=new n.k(e,t);return r.set=function(e,t){var r=n.k.prototype.set.call(this,e,t);return s(this),r},r},l=function(e,t){var r=new i.e(e,t);return r.set=function(e,t){var r=i.e.prototype.set.call(this,e,t);return s(this),r},r}},88244:function(e,t,r){"use strict";r.d(t,{Kb:function(){return c},q4:function(){return l},su:function(){return a},zP:function(){return s}});var n=r(97582),i=r(66331),o={};function s(e,t){o[e]=t}var a=!1!==globalThis.__DEV__?function(){var e,t,r,s,a;if(!(!1!==globalThis.__DEV__))throw Error("only supported in development mode");return{limits:Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map(function(e){var t=e[0],r=e[1];return[t,i.Q[t]||r]})),sizes:(0,n.pi)({print:null===(e=o.print)||void 0===e?void 0:e.call(o),parser:null===(t=o.parser)||void 0===t?void 0:t.call(o),canonicalStringify:null===(r=o.canonicalStringify)||void 0===r?void 0:r.call(o),links:function e(t){var r;return t?(0,n.ev)((0,n.ev)([null===(r=null==t?void 0:t.getMemoryInternals)||void 0===r?void 0:r.call(t)],e(null==t?void 0:t.left),!0),e(null==t?void 0:t.right),!0).filter(d):[]}(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:f(this.queryManager.documentTransform)}},null===(a=(s=this.cache).getMemoryInternals)||void 0===a?void 0:a.call(s))}}:void 0,l=!1!==globalThis.__DEV__?function(){var e=this.config.fragments;return(0,n.pi)((0,n.pi)({},u.apply(this)),{addTypenameDocumentTransform:f(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:h(this.storeReader.executeSelectionSet),executeSubSelectedArray:h(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:h(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:h(null==e?void 0:e.findFragmentSpreads),lookup:h(null==e?void 0:e.lookup),transform:h(null==e?void 0:e.transform)}})}:void 0,c=!1!==globalThis.__DEV__?u:void 0;function u(){return{cache:{fragmentQueryDocuments:h(this.getFragmentDoc)}}}function h(e){return e&&"dirtyKey"in e?e.size:void 0}function d(e){return null!=e}function f(e){return(function e(t){return t?(0,n.ev)((0,n.ev)([h(null==t?void 0:t.performWork)],e(null==t?void 0:t.left),!0),e(null==t?void 0:t.right),!0).filter(d):[]})(e).map(function(e){return{cache:e}})}},66331:function(e,t,r){"use strict";r.d(t,{Q:function(){return s}});var n=r(97582),i=r(78287),o=Symbol.for("apollo.cacheSize"),s=(0,n.pi)({},i.CO[o])},21436:function(e,t,r){"use strict";r.d(t,{O:function(){return i},k:function(){return n}});var n=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},30320:function(e,t,r){"use strict";r.d(t,{DN:function(){return l},JC:function(){return h},Nq:function(){return c},aS:function(){return a},mr:function(){return o},sy:function(){return s}});var n=r(78287),i="ReactNative"==(0,n.wY)(function(){return navigator.product}),o="function"==typeof WeakMap&&!(i&&!global.HermesInternal),s="function"==typeof WeakSet,a="function"==typeof Symbol&&"function"==typeof Symbol.for,l=a&&Symbol.asyncIterator,c="function"==typeof(0,n.wY)(function(){return window.document.createElement}),u=(0,n.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,h=(c||i)&&!u},53712:function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];void 0!==n&&(r[t]=n)})}),r}r.d(t,{o:function(){return n}})},60897:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=new Map;function i(e){var t=n.get(e)||1;return n.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}},48702:function(e,t,r){"use strict";r.d(t,{J:function(){return i}});var n=r(13154);function i(e){if(!1!==globalThis.__DEV__){var t;(t=new Set([e])).forEach(function(e){(0,n.s)(e)&&function(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach(function(r){(0,n.s)(e[r])&&t.add(e[r])})})}return e}},14012:function(e,t,r){"use strict";r.d(t,{J:function(){return o}});var n=r(97582),i=r(53712);function o(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,i.o)((0,n.pi)((0,n.pi)({},e&&e.variables),t.variables))})}},13154:function(e,t,r){"use strict";function n(e){return null!==e&&"object"==typeof e}r.d(t,{s:function(){return n}})},13887:function(e,t,r){"use strict";r.d(t,{v:function(){return i}});var n=r(60897);function i(e,t){void 0===t&&(t=0);var r=(0,n.X)("stringifyForDisplay");return JSON.stringify(e,function(e,t){return void 0===t?r:t},t).split(JSON.stringify(r)).join("<undefined>")}},78287:function(e,t,r){"use strict";r.d(t,{CO:function(){return m},kG:function(){return v},wY:function(){return p},_K:function(){return b}});var n,i=r(97582),o="Invariant Violation",s=Object.setPrototypeOf,a=void 0===s?function(e,t){return e.__proto__=t,e}:s,l=function(e){function t(r){void 0===r&&(r=o);var n=e.call(this,"number"==typeof r?o+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=o,a(n,t.prototype),n}return(0,i.ZT)(t,e),t}(Error);function c(e,t){if(!e)throw new l(t)}var u=["debug","log","warn","error","silent"],h=u.indexOf("log");function d(e){return function(){if(u.indexOf(e)>=h)return(console[e]||console.log).apply(console,arguments)}}(n=c||(c={})).debug=d("debug"),n.log=d("log"),n.warn=d("warn"),n.error=d("error");var f=r(49379);function p(e){try{return e()}catch(e){}}var m=p(function(){return globalThis})||p(function(){return window})||p(function(){return self})||p(function(){return global})||p(function(){return p.constructor("return this")()}),g=r(13887);function y(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if("number"==typeof t){var i=t;(t=x(i))||(t=k(i,r),r=[])}e.apply(void 0,[t].concat(r))}}var v=Object.assign(function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];e||c(e,x(t,r)||k(t,r))},{debug:y(c.debug),log:y(c.log),warn:y(c.warn),error:y(c.error)});function b(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new l(x(e,t)||k(e,t))}var w=Symbol.for("ApolloErrorMessageHandler_"+f.i);function _(e){if("string"==typeof e)return e;try{return(0,g.v)(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function x(e,t){if(void 0===t&&(t=[]),e)return m[w]&&m[w](e,t.map(_))}function k(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:f.i,message:e,args:t.map(_)})))}},49379:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});var n="3.11.8"},4942:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(83997);function i(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},87462:function(e,t,r){"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}r.d(t,{Z:function(){return n}})},94578:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(89611);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,n.Z)(e,t)}},63366:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}r.d(t,{Z:function(){return n}})},89611:function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,{Z:function(){return n}})},83997:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(71002);function i(e){var t=function(e,t){if("object"!=(0,n.Z)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=(0,n.Z)(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.Z)(t)?t:t+""}},71002:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{Z:function(){return n}})},95372:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(67294);function i(e,t=[]){let r=(0,n.useRef)(e);return(0,n.useEffect)(()=>{r.current=e}),(0,n.useCallback)((...e)=>r.current?.(...e),t)}},83658:function(e,t,r){"use strict";r.d(t,{q:function(){return o}});var n=r(95372),i=r(67294);function o(e={}){let{onClose:t,onOpen:r,isOpen:o,id:s}=e,a=(0,n.W)(r),l=(0,n.W)(t),[c,u]=(0,i.useState)(e.defaultIsOpen||!1),h=void 0!==o?o:c,d=void 0!==o,f=(0,i.useId)(),p=s??`disclosure-${f}`,m=(0,i.useCallback)(()=>{d||u(!1),l?.()},[d,l]),g=(0,i.useCallback)(()=>{d||u(!0),a?.()},[d,a]),y=(0,i.useCallback)(()=>{h?m():g()},[h,g,m]);return{isOpen:h,onOpen:g,onClose:m,onToggle:y,isControlled:d,getButtonProps:function(e={}){return{...e,"aria-expanded":h,"aria-controls":p,onClick(t){e.onClick?.(t),y()}}},getDisclosureProps:function(e={}){return{...e,hidden:!h,id:p}}}}},29062:function(e,t,r){"use strict";r.d(t,{lq:function(){return i},qq:function(){return o}});var n=r(67294);function i(...e){return t=>{e.forEach(e=>{!function(e,t){if(null!=e){if("function"==typeof e){e(t);return}try{e.current=t}catch(r){throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}(e,t)})}}function o(...e){return(0,n.useMemo)(()=>i(...e),e)}},12408:function(e,t,r){"use strict";r.d(t,{G:function(){return i}});var n=r(67294);let i=globalThis?.document?n.useLayoutEffect:n.useEffect},4840:function(e,t,r){"use strict";r.d(t,{r:function(){return i}});var n=r(67294);let i=(e,t)=>{let r=(0,n.useRef)(!1),i=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(r.current&&i.current)return e();i.current=!0},t),(0,n.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[])}},19311:function(e,t,r){"use strict";r.d(t,{R:function(){return n}});let n=(0,r(24278).I)({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"})},86115:function(e,t,r){"use strict";r.d(t,{n:function(){return i}});var n=r(85893);let i=(0,r(24278).I)({viewBox:"0 0 14 14",path:(0,n.jsx)("g",{fill:"currentColor",children:(0,n.jsx)("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})})},68029:function(e,t,r){"use strict";r.d(t,{x:function(){return n}});let n=(0,r(64993).m)("div");n.displayName="Box"},38491:function(e,t,r){"use strict";r.d(t,{z:function(){return v}});var n=r(85893),i=r(29062),o=r(65544),s=r(20397),a=r(34926),l=r(67294);let[c,u]=(0,r(52110).k)({strict:!1,name:"ButtonGroupContext"});var h=r(64993);function d(e){let{children:t,className:r,...i}=e,o=(0,l.isValidElement)(t)?(0,l.cloneElement)(t,{"aria-hidden":!0,focusable:!1}):t,s=(0,a.cx)("chakra-button__icon",r);return(0,n.jsx)(h.m.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...i,className:s,children:o})}d.displayName="ButtonIcon";var f=r(83695),p=r(48899);function m(e){let{label:t,placement:r,spacing:i="0.5rem",children:o=(0,n.jsx)(p.$,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:c,...u}=e,d=(0,a.cx)("chakra-button__spinner",s),m="start"===r?"marginEnd":"marginStart",g=(0,l.useMemo)(()=>(0,f.k0)({display:"flex",alignItems:"center",position:t?"relative":"absolute",[m]:t?i:0,fontSize:"1em",lineHeight:"normal",...c}),[c,t,m,i]);return(0,n.jsx)(h.m.div,{className:d,...u,__css:g,children:o})}m.displayName="ButtonSpinner";var g=r(49381),y=r(73035);let v=(0,g.G)((e,t)=>{let r=u(),c=(0,y.m)("Button",{...r,...e}),{isDisabled:d=r?.isDisabled,isLoading:f,isActive:p,children:g,leftIcon:v,rightIcon:w,loadingText:_,iconSpacing:x="0.5rem",type:k,spinner:S,spinnerPlacement:E="start",className:T,as:C,shouldWrapChildren:I,...P}=(0,o.L)(e),A=(0,l.useMemo)(()=>{let e={...c?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...c,...!!r&&{_focus:e}}},[c,r]),{ref:O,type:R}=function(e){let[t,r]=(0,l.useState)(!e);return{ref:(0,l.useCallback)(e=>{e&&r("BUTTON"===e.tagName)},[]),type:t?"button":void 0}}(C),N={rightIcon:w,leftIcon:v,iconSpacing:x,children:g,shouldWrapChildren:I};return(0,n.jsxs)(h.m.button,{disabled:d||f,ref:(0,i.qq)(t,O),as:C,type:k??R,"data-active":(0,s.P)(p),"data-loading":(0,s.P)(f),__css:A,className:(0,a.cx)("chakra-button",T),...P,children:[f&&"start"===E&&(0,n.jsx)(m,{className:"chakra-button__spinner--start",label:_,placement:"start",spacing:x,children:S}),f?_||(0,n.jsx)(h.m.span,{opacity:0,children:(0,n.jsx)(b,{...N})}):(0,n.jsx)(b,{...N}),f&&"end"===E&&(0,n.jsx)(m,{className:"chakra-button__spinner--end",label:_,placement:"end",spacing:x,children:S})]})});function b(e){let{leftIcon:t,rightIcon:r,children:i,iconSpacing:o,shouldWrapChildren:s}=e;return s?(0,n.jsxs)("span",{style:{display:"contents"},children:[t&&(0,n.jsx)(d,{marginEnd:o,children:t}),i,r&&(0,n.jsx)(d,{marginStart:o,children:r})]}):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(d,{marginEnd:o,children:t}),i,r&&(0,n.jsx)(d,{marginStart:o,children:r})]})}v.displayName="Button"},51107:function(e,t,r){"use strict";r.d(t,{X:function(){return S}});var n=r(85893),i=r(65544),o=r(68928),s=r(87155),a=r(34926),l=r(70917),c=r(67294);let[u,h]=(0,r(52110).k)({name:"CheckboxGroupContext",strict:!1});var d=r(64993);function f(e){return(0,n.jsx)(d.m.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:(0,n.jsx)("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function p(e){return(0,n.jsx)(d.m.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:(0,n.jsx)("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function m(e){let{isIndeterminate:t,isChecked:r,...i}=e;return r||t?(0,n.jsx)(d.m.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,n.jsx)(t?p:f,{...i})}):null}var g=r(75312),y=r(49381),v=r(73035);let b={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},w={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},_=(0,l.F4)({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),x=(0,l.F4)({from:{opacity:0},to:{opacity:1}}),k=(0,l.F4)({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),S=(0,y.G)(function(e,t){let r=h(),l={...r,...e},u=(0,v.j)("Checkbox",l),f=(0,i.L)(e),{spacing:p="0.5rem",className:y,children:S,iconColor:E,iconSize:T,icon:C=(0,n.jsx)(m,{}),isChecked:I,isDisabled:P=r?.isDisabled,onChange:A,inputProps:O,...R}=f,N=I;r?.value&&f.value&&(N=r.value.includes(f.value));let j=A;r?.onChange&&f.value&&(j=(0,o.P)(r.onChange,A));let{state:D,getInputProps:M,getCheckboxProps:L,getLabelProps:F,getRootProps:z}=(0,g.O)({...R,isDisabled:P,isChecked:N,onChange:j}),U=function(e){let[t,r]=(0,c.useState)(e),[n,i]=(0,c.useState)(!1);return e!==t&&(i(!0),r(e)),n}(D.isChecked),B=(0,c.useMemo)(()=>({animation:U?D.isIndeterminate?`${x} 20ms linear, ${k} 200ms linear`:`${_} 200ms linear`:void 0,...u.icon,...(0,s.o)({fontSize:T,color:E})}),[E,T,U,D.isIndeterminate,u.icon]),V=(0,c.cloneElement)(C,{__css:B,isIndeterminate:D.isIndeterminate,isChecked:D.isChecked});return(0,n.jsxs)(d.m.label,{__css:{...w,...u.container},className:(0,a.cx)("chakra-checkbox",y),...z(),children:[(0,n.jsx)("input",{className:"chakra-checkbox__input",...M(O,t)}),(0,n.jsx)(d.m.span,{__css:{...b,...u.control},className:"chakra-checkbox__control",...L(),children:V}),S&&(0,n.jsx)(d.m.span,{className:"chakra-checkbox__label",...F(),__css:{marginStart:p,...u.label},children:S})]})});S.displayName="Checkbox"},75312:function(e,t,r){"use strict";r.d(t,{O:function(){return C}});var n=r(95372),i=r(12408),o=r(4840),s=r(29062),a=r(8297),l=r(20397),c=r(68928),u=()=>"undefined"!=typeof document,h=!1,d=null,f=!1,p=!1,m=new Set;function g(e,t){m.forEach(r=>r(e,t))}var y="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function v(e){f=!0,e.metaKey||!y&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(d="keyboard",g("keyboard",e))}function b(e){if(d="pointer","mousedown"===e.type||"pointerdown"===e.type){f=!0;let t=e.composedPath?e.composedPath()[0]:e.target,r=!1;try{r=t.matches(":focus-visible")}catch{}r||g("pointer",e)}}function w(e){(0===e.mozInputSource&&e.isTrusted||0===e.detail&&!e.pointerType)&&(f=!0,d="virtual")}function _(e){e.target===window||e.target===document||e.target instanceof Element&&e.target.hasAttribute("tabindex")||(f||p||(d="virtual",g("virtual",e)),f=!1,p=!1)}function x(){f=!1,p=!0}function k(){return"pointer"!==d}var S=r(67294),E=r(16013);let T={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function C(e={}){let{isDisabled:t,isReadOnly:r,isRequired:d,isInvalid:p,id:g,onBlur:y,onFocus:C,"aria-describedby":P}=(0,E.K)(e),{defaultChecked:A,isChecked:O,isFocusable:R,onChange:N,isIndeterminate:j,name:D,value:M,tabIndex:L,"aria-label":F,"aria-labelledby":z,"aria-invalid":U,...B}=e,V=(0,a.C)(B,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),q=(0,n.W)(N),$=(0,n.W)(y),W=(0,n.W)(C),[H,G]=(0,S.useState)(!1),[K,Q]=(0,S.useState)(!1),[Y,X]=(0,S.useState)(!1),[J,Z]=(0,S.useState)(!1);(0,S.useEffect)(()=>(function(e){!function(){if(!u()||h)return;let{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...t){f=!0,e.apply(this,t)},document.addEventListener("keydown",v,!0),document.addEventListener("keyup",v,!0),document.addEventListener("click",w,!0),window.addEventListener("focus",_,!0),window.addEventListener("blur",x,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",b,!0),document.addEventListener("pointermove",b,!0),document.addEventListener("pointerup",b,!0)):(document.addEventListener("mousedown",b,!0),document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",b,!0)),h=!0}(),e(k());let t=()=>e(k());return m.add(t),()=>{m.delete(t)}})(G),[]);let ee=(0,S.useRef)(null),[et,er]=(0,S.useState)(!0),[en,ei]=(0,S.useState)(!!A),eo=void 0!==O,es=eo?O:en,ea=(0,S.useCallback)(e=>{if(r||t){e.preventDefault();return}eo||(es?ei(e.currentTarget.checked):ei(!!j||e.currentTarget.checked)),q?.(e)},[r,t,es,eo,j,q]);(0,i.G)(()=>{ee.current&&(ee.current.indeterminate=!!j)},[j]),(0,o.r)(()=>{t&&Q(!1)},[t,Q]),(0,i.G)(()=>{let e=ee.current;if(!e?.form)return;let t=()=>{ei(!!A)};return e.form.addEventListener("reset",t),()=>e.form?.removeEventListener("reset",t)},[]);let el=t&&!R,ec=(0,S.useCallback)(e=>{" "===e.key&&Z(!0)},[Z]),eu=(0,S.useCallback)(e=>{" "===e.key&&Z(!1)},[Z]);(0,i.G)(()=>{ee.current&&ee.current.checked!==es&&ei(ee.current.checked)},[ee.current]);let eh=(0,S.useCallback)((e={},n=null)=>({...e,ref:n,"data-active":(0,l.P)(J),"data-hover":(0,l.P)(Y),"data-checked":(0,l.P)(es),"data-focus":(0,l.P)(K),"data-focus-visible":(0,l.P)(K&&H),"data-indeterminate":(0,l.P)(j),"data-disabled":(0,l.P)(t),"data-invalid":(0,l.P)(p),"data-readonly":(0,l.P)(r),"aria-hidden":!0,onMouseDown:(0,c.v)(e.onMouseDown,e=>{K&&e.preventDefault(),Z(!0)}),onMouseUp:(0,c.v)(e.onMouseUp,()=>Z(!1)),onMouseEnter:(0,c.v)(e.onMouseEnter,()=>X(!0)),onMouseLeave:(0,c.v)(e.onMouseLeave,()=>X(!1))}),[J,es,t,K,H,Y,j,p,r]),ed=(0,S.useCallback)((e={},n=null)=>({...e,ref:n,"data-active":(0,l.P)(J),"data-hover":(0,l.P)(Y),"data-checked":(0,l.P)(es),"data-focus":(0,l.P)(K),"data-focus-visible":(0,l.P)(K&&H),"data-indeterminate":(0,l.P)(j),"data-disabled":(0,l.P)(t),"data-invalid":(0,l.P)(p),"data-readonly":(0,l.P)(r)}),[J,es,t,K,H,Y,j,p,r]),ef=(0,S.useCallback)((e={},r=null)=>({...V,...e,ref:(0,s.lq)(r,e=>{e&&er("LABEL"===e.tagName)}),onClick:(0,c.v)(e.onClick,()=>{et||(ee.current?.click(),requestAnimationFrame(()=>{ee.current?.focus({preventScroll:!0})}))}),"data-disabled":(0,l.P)(t),"data-checked":(0,l.P)(es),"data-invalid":(0,l.P)(p)}),[V,t,es,p,et]),ep=(0,S.useCallback)((e={},n=null)=>({...e,ref:(0,s.lq)(ee,n),type:"checkbox",name:D,value:M,id:g,tabIndex:L,onChange:(0,c.v)(e.onChange,ea),onBlur:(0,c.v)(e.onBlur,$,()=>Q(!1)),onFocus:(0,c.v)(e.onFocus,W,()=>Q(!0)),onKeyDown:(0,c.v)(e.onKeyDown,ec),onKeyUp:(0,c.v)(e.onKeyUp,eu),required:d,checked:es,disabled:el,readOnly:r,"aria-label":F,"aria-labelledby":z,"aria-invalid":U?!!U:p,"aria-describedby":P,"aria-disabled":t,style:T}),[D,M,g,ea,$,W,ec,eu,d,es,el,r,F,z,U,p,P,t,L]),em=(0,S.useCallback)((e={},r=null)=>({...e,ref:r,onMouseDown:(0,c.v)(e.onMouseDown,I),"data-disabled":(0,l.P)(t),"data-checked":(0,l.P)(es),"data-invalid":(0,l.P)(p)}),[es,t,p]);return{state:{isInvalid:p,isFocused:K,isChecked:es,isActive:J,isHovered:Y,isIndeterminate:j,isDisabled:t,isReadOnly:r,isRequired:d},getRootProps:ef,getCheckboxProps:eh,getIndicatorProps:ed,getInputProps:ep,getLabelProps:em,htmlProps:V}}function I(e){e.preventDefault(),e.stopPropagation()}},71856:function(e,t,r){"use strict";r.d(t,{P:function(){return u}});var n=r(85893),i=r(65544),o=r(12553),s=r(49381),a=r(73035),l=r(64993);function c(e){return(0,n.jsx)(o.J,{focusable:"false","aria-hidden":!0,...e,children:(0,n.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}let u=(0,s.G)(function(e,t){let r=(0,a.m)("CloseButton",e),{children:o,isDisabled:s,__css:u,...h}=(0,i.L)(e);return(0,n.jsx)(l.m.button,{type:"button","aria-label":"Close",ref:t,disabled:s,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...r,...u},...h,children:o||(0,n.jsx)(c,{width:"1em",height:"1em"})})});u.displayName="CloseButton"},31046:function(e,t,r){"use strict";r.d(t,{If:function(){return o},kc:function(){return i}});var n=r(67294);let i=(0,n.createContext)({});function o(){let e=(0,n.useContext)(i);if(void 0===e)throw Error("useColorMode must be used within a ColorModeProvider");return e}i.displayName="ColorModeContext"},64831:function(e,t,r){"use strict";r.d(t,{i:function(){return c}});var n=r(85893),i=r(65544),o=r(34926),s=r(49381),a=r(73035),l=r(64993);let c=(0,s.G)(function(e,t){let{borderLeftWidth:r,borderBottomWidth:s,borderTopWidth:c,borderRightWidth:u,borderWidth:h,borderStyle:d,borderColor:f,...p}=(0,a.m)("Divider",e),{className:m,orientation:g="horizontal",__css:y,...v}=(0,i.L)(e);return(0,n.jsx)(l.m.hr,{ref:t,"aria-orientation":g,...v,__css:{...p,border:"0",borderColor:f,borderStyle:d,...{vertical:{borderLeftWidth:r||u||h||"1px",height:"100%"},horizontal:{borderBottomWidth:s||c||h||"1px",width:"100%"}}[g],...y},className:(0,o.cx)("chakra-divider",m)})});c.displayName="Divider"},28497:function(e,t,r){"use strict";r.d(t,{O:function(){return a},u:function(){return l}});var n=r(85893),i=r(12408),o=r(67294);let s=(0,o.createContext)({getDocument:()=>document,getWindow:()=>window});function a({defer:e}={}){let[,t]=(0,o.useReducer)(e=>e+1,0);return(0,i.G)(()=>{e&&t()},[e]),(0,o.useContext)(s)}function l(e){let{children:t,environment:r,disabled:i}=e,a=(0,o.useRef)(null),l=(0,o.useMemo)(()=>r||{getDocument:()=>a.current?.ownerDocument??document,getWindow:()=>a.current?.ownerDocument.defaultView??window},[r]),c=!i||!r;return(0,n.jsxs)(s.Provider,{value:l,children:[t,c&&(0,n.jsx)("span",{id:"__chakra_env",hidden:!0,ref:a})]})}s.displayName="EnvironmentContext",l.displayName="EnvironmentProvider"},54506:function(e,t,r){"use strict";r.d(t,{NI:function(){return y},NJ:function(){return g},e:function(){return p}});var n=r(85893),i=r(29062),o=r(65544),s=r(52110),a=r(20397),l=r(34926),c=r(67294),u=r(49381),h=r(73035),d=r(64993);let[f,p]=(0,s.k)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormControl />\" "}),[m,g]=(0,s.k)({strict:!1,name:"FormControlContext"}),y=(0,u.G)(function(e,t){let r=(0,h.j)("Form",e),{getRootProps:s,htmlProps:u,...p}=function(e){let{id:t,isRequired:r,isInvalid:n,isDisabled:o,isReadOnly:s,...l}=e,u=(0,c.useId)(),h=t||`field-${u}`,d=`${h}-label`,f=`${h}-feedback`,p=`${h}-helptext`,[m,g]=(0,c.useState)(!1),[y,v]=(0,c.useState)(!1),[b,w]=(0,c.useState)(!1),_=(0,c.useCallback)((e={},t=null)=>({id:p,...e,ref:(0,i.lq)(t,e=>{e&&v(!0)})}),[p]),x=(0,c.useCallback)((e={},t=null)=>({...e,ref:t,"data-focus":(0,a.P)(b),"data-disabled":(0,a.P)(o),"data-invalid":(0,a.P)(n),"data-readonly":(0,a.P)(s),id:void 0!==e.id?e.id:d,htmlFor:void 0!==e.htmlFor?e.htmlFor:h}),[h,o,b,n,s,d]),k=(0,c.useCallback)((e={},t=null)=>({id:f,...e,ref:(0,i.lq)(t,e=>{e&&g(!0)}),"aria-live":"polite"}),[f]),S=(0,c.useCallback)((e={},t=null)=>({...e,...l,ref:t,role:"group","data-focus":(0,a.P)(b),"data-disabled":(0,a.P)(o),"data-invalid":(0,a.P)(n),"data-readonly":(0,a.P)(s)}),[l,o,b,n,s]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!s,isDisabled:!!o,isFocused:!!b,onFocus:()=>w(!0),onBlur:()=>w(!1),hasFeedbackText:m,setHasFeedbackText:g,hasHelpText:y,setHasHelpText:v,id:h,labelId:d,feedbackId:f,helpTextId:p,htmlProps:l,getHelpTextProps:_,getErrorMessageProps:k,getRootProps:S,getLabelProps:x,getRequiredIndicatorProps:(0,c.useCallback)((e={},t=null)=>({...e,ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"}),[])}}((0,o.L)(e)),g=(0,l.cx)("chakra-form-control",e.className);return(0,n.jsx)(m,{value:p,children:(0,n.jsx)(f,{value:r,children:(0,n.jsx)(d.m.div,{...s({},t),className:g,__css:r.container})})})});y.displayName="FormControl",(0,u.G)(function(e,t){let r=g(),i=p(),o=(0,l.cx)("chakra-form__helper-text",e.className);return(0,n.jsx)(d.m.div,{...r?.getHelpTextProps(e,t),__css:i.helperText,className:o})}).displayName="FormHelperText"},16013:function(e,t,r){"use strict";r.d(t,{K:function(){return a},Y:function(){return s}});var n=r(20397),i=r(68928),o=r(54506);function s(e){let{isDisabled:t,isInvalid:r,isReadOnly:i,isRequired:o,...s}=a(e);return{...s,disabled:t,readOnly:i,required:o,"aria-invalid":(0,n.Q)(r),"aria-required":(0,n.Q)(o),"aria-readonly":(0,n.Q)(i)}}function a(e){let t=(0,o.NJ)(),{id:r,disabled:n,readOnly:s,required:a,isRequired:l,isInvalid:c,isReadOnly:u,isDisabled:h,onFocus:d,onBlur:f,...p}=e,m=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&m.push(t.feedbackId),t?.hasHelpText&&m.push(t.helpTextId),{...p,"aria-describedby":m.join(" ")||void 0,id:r??t?.id,isDisabled:n??h??t?.isDisabled,isReadOnly:s??u??t?.isReadOnly,isRequired:a??l??t?.isRequired,isInvalid:c??t?.isInvalid,onFocus:(0,i.v)(t?.onFocus,d),onBlur:(0,i.v)(t?.onBlur,f)}}},24278:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(85893),i=r(67294),o=r(12553),s=r(49381);function a(e){let{viewBox:t="0 0 24 24",d:r,displayName:a,defaultProps:l={}}=e,c=i.Children.toArray(e.path),u=(0,s.G)((e,i)=>(0,n.jsx)(o.J,{ref:i,viewBox:t,...l,...e,children:c.length?c:(0,n.jsx)("path",{fill:"currentColor",d:r})}));return u.displayName=a,u}},12553:function(e,t,r){"use strict";r.d(t,{J:function(){return c}});var n=r(85893),i=r(34926),o=r(49381),s=r(73035),a=r(64993);let l={path:(0,n.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,n.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,n.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,n.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},c=(0,o.G)((e,t)=>{let{as:r,viewBox:o,color:c="currentColor",focusable:u=!1,children:h,className:d,__css:f,...p}=e,m=(0,i.cx)("chakra-icon",d),g=(0,s.m)("Icon",e),y={ref:t,focusable:u,className:m,__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:c,...f,...g}},v=o??l.viewBox;if(r&&"string"!=typeof r)return(0,n.jsx)(a.m.svg,{as:r,...y,...p});let b=h??l.path;return(0,n.jsx)(a.m.svg,{verticalAlign:"middle",viewBox:v,...y,...p,children:b})});c.displayName="Icon"},82206:function(e,t,r){"use strict";r.d(t,{I:function(){return u}});var n=r(85893),i=r(65544),o=r(34926),s=r(16013),a=r(49381),l=r(73035),c=r(64993);let u=(0,a.G)(function(e,t){let{htmlSize:r,...a}=e,u=(0,l.j)("Input",a),h=(0,i.L)(a),d=(0,s.Y)(h),f=(0,o.cx)("chakra-input",e.className);return(0,n.jsx)(c.m.input,{size:r,...d,__css:u.field,ref:t,className:f})});u.displayName="Input",u.id="Input"},57879:function(e,t,r){"use strict";r.d(t,{r:function(){return c}});var n=r(85893),i=r(65544),o=r(34926),s=r(49381),a=r(73035),l=r(64993);let c=(0,s.G)(function(e,t){let r=(0,a.m)("Link",e),{className:s,isExternal:c,...u}=(0,i.L)(e);return(0,n.jsx)(l.m.a,{target:c?"_blank":void 0,rel:c?"noopener":void 0,ref:t,className:(0,o.cx)("chakra-link",s),...u,__css:r})});c.displayName="Link"},70010:function(e,t,r){"use strict";r.d(t,{f:function(){return c}});var n=r(85893),i=r(34926),o=r(67294),s=r(5490),a=r(49381),l=r(64993);let c=(0,a.G)((e,t)=>{let{className:r,...a}=e,{bodyId:c,setBodyMounted:u}=(0,s.vR)();(0,o.useEffect)(()=>(u(!0),()=>u(!1)),[u]);let h=(0,i.cx)("chakra-modal__body",r),d=(0,s.I_)();return(0,n.jsx)(l.m.div,{ref:t,className:h,id:c,...a,__css:d.body})});c.displayName="ModalBody"},26840:function(e,t,r){"use strict";r.d(t,{h:function(){return b}});var n=r(85893),i=r(83695),o=r(34926),s=r(5490),a=r(45989),l=r(72701),c=r(67294),u=r(13114),h=r(82145);let d={initial:"initial",animate:"enter",exit:"exit",variants:{initial:({offsetX:e,offsetY:t,transition:r,transitionEnd:n,delay:i})=>({opacity:0,x:e,y:t,transition:r?.exit??h.p$.exit(h.Sh.exit,i),transitionEnd:n?.exit}),enter:({transition:e,transitionEnd:t,delay:r})=>({opacity:1,x:0,y:0,transition:e?.enter??h.p$.enter(h.Sh.enter,r),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:r,transitionEnd:n,reverse:i,delay:o})=>{let s={x:t,y:e};return{opacity:0,transition:r?.exit??h.p$.exit(h.Sh.exit,o),...i?{...s,transitionEnd:n?.exit}:{transitionEnd:{...s,...n?.exit}}}}}};(0,c.forwardRef)(function(e,t){let{unmountOnExit:r,in:i,reverse:s=!0,className:a,offsetX:c=0,offsetY:h=8,transition:f,transitionEnd:p,delay:m,animatePresenceProps:g,...y}=e,v=!r||i&&r,b=i||r?"enter":"exit",w={offsetX:c,offsetY:h,reverse:s,transition:f,transitionEnd:p,delay:m};return(0,n.jsx)(u.M,{...g,custom:w,children:v&&(0,n.jsx)(l.E.div,{ref:t,className:(0,o.cx)("chakra-offset-slide",a),custom:w,...d,animate:b,...y})})}).displayName="SlideFade";let f={initial:"exit",animate:"enter",exit:"exit",variants:{exit:({reverse:e,initialScale:t,transition:r,transitionEnd:n,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:n?.exit}:{transitionEnd:{scale:t,...n?.exit}},transition:r?.exit??h.p$.exit(h.Sh.exit,i)}),enter:({transitionEnd:e,transition:t,delay:r})=>({opacity:1,scale:1,transition:t?.enter??h.p$.enter(h.Sh.enter,r),transitionEnd:e?.enter})}};(0,c.forwardRef)(function(e,t){let{unmountOnExit:r,in:i,reverse:s=!0,initialScale:a=.95,className:c,transition:h,transitionEnd:d,delay:p,animatePresenceProps:m,...g}=e,y=!r||i&&r,v=i||r?"enter":"exit",b={initialScale:a,reverse:s,transition:h,transitionEnd:d,delay:p};return(0,n.jsx)(u.M,{...m,custom:b,children:y&&(0,n.jsx)(l.E.div,{ref:t,className:(0,o.cx)("chakra-offset-slide",c),...f,animate:v,custom:b,...g})})}).displayName="ScaleFade";var p=r(64993);let m={slideInBottom:{...d,custom:{offsetY:16,reverse:!0}},slideInRight:{...d,custom:{offsetX:16,reverse:!0}},slideInTop:{...d,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...d,custom:{offsetX:-16,reverse:!0}},scale:{...f,custom:{initialScale:.95,reverse:!0}},none:{}},g=(0,p.m)(l.E.section),y=e=>m[e||"none"],v=(0,c.forwardRef)((e,t)=>{let{preset:r,motionProps:i=y(r),...o}=e;return(0,n.jsx)(g,{ref:t,...i,...o})});v.displayName="ModalTransition";let b=(0,r(49381).G)((e,t)=>{let{className:r,children:l,containerProps:c,motionProps:u,...h}=e,{getDialogProps:d,getDialogContainerProps:f}=(0,s.vR)(),m=d(h,t),g=f(c),y=(0,o.cx)("chakra-modal__content",r),b=(0,s.I_)(),w=(0,i.k0)({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...b.dialog}),_=(0,i.k0)({display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...b.dialogContainer}),{motionPreset:x}=(0,s.vR)();return(0,n.jsx)(a.M,{children:(0,n.jsx)(p.m.div,{...g,className:"chakra-modal__content-container",tabIndex:-1,__css:_,children:(0,n.jsx)(v,{preset:x,motionProps:u,className:y,...m,__css:w,children:l})})})});b.displayName="ModalContent"},45989:function(e,t,r){"use strict";r.d(t,{M:function(){return tz}});var n,i,o,s,a=r(85893),l=r(15947),c=r(67294),u=r(97582),h="right-scroll-bar-position",d="width-before-scroll-bar";function f(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var p="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,m=new WeakMap;function g(e,t){var r,n,i,o=(r=t||null,n=function(t){return e.forEach(function(e){return f(e,t)})},(i=(0,c.useState)(function(){return{value:r,callback:n,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=n,i.facade);return p(function(){var t=m.get(o);if(t){var r=new Set(t),n=new Set(e),i=o.current;r.forEach(function(e){n.has(e)||f(e,null)}),n.forEach(function(e){r.has(e)||f(e,i)})}m.set(o,e)},[e]),o}function y(e){return e}function v(e,t){void 0===t&&(t=y);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;r=[],i.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},s=function(){return Promise.resolve().then(o)};s(),r={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),r}}}}}function b(e,t){return void 0===t&&(t=y),v(e,t)}function w(e){void 0===e&&(e={});var t=v(null);return t.options=(0,u.pi)({async:!0,ssr:!1},e),t}var _=w(),x=function(){},k=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:x}),i=n[0],o=n[1],s=e.forwardProps,a=e.children,l=e.className,h=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,y=e.inert,v=e.allowPinchZoom,b=e.as,w=e.gapMode,k=(0,u._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g([r,t]),E=(0,u.pi)((0,u.pi)({},k),i);return c.createElement(c.Fragment,null,d&&c.createElement(p,{sideCar:_,removeScrollBar:h,shards:f,noIsolation:m,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:r,gapMode:w}),s?c.cloneElement(c.Children.only(a),(0,u.pi)((0,u.pi)({},E),{ref:S})):c.createElement(void 0===b?"div":b,(0,u.pi)({},E,{className:l,ref:S}),a))});k.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},k.classNames={fullWidth:d,zeroRight:h};var S=function(e){var t=e.sideCar,r=(0,u._T)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return c.createElement(n,(0,u.pi)({},r))};S.isSideCarExport=!0;var E=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||r.nc;return t&&e.setAttribute("nonce",t),e}())){var i,o;(i=t).styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T=function(){var e=E();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},C=function(){var e=T();return function(t){return e(t.styles,t.dynamic),null}},I={left:0,top:0,right:0,gap:0},P=function(e){return parseInt(e||"",10)||0},A=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[P(r),P(n),P(i)]},O=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return I;var t=A(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},R=C(),N="data-scroll-locked",j=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,a=e.gap;return void 0===r&&(r="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(n,";\n   padding-right: ").concat(a,"px ").concat(n,";\n  }\n  body[").concat(N,"] {\n    overflow: hidden ").concat(n,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(o,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(n,";\n    "),"padding"===r&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(h," {\n    right: ").concat(a,"px ").concat(n,";\n  }\n  \n  .").concat(d," {\n    margin-right: ").concat(a,"px ").concat(n,";\n  }\n  \n  .").concat(h," .").concat(h," {\n    right: 0 ").concat(n,";\n  }\n  \n  .").concat(d," .").concat(d," {\n    margin-right: 0 ").concat(n,";\n  }\n  \n  body[").concat(N,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n  }\n")},D=function(){var e=parseInt(document.body.getAttribute(N)||"0",10);return isFinite(e)?e:0},M=function(){c.useEffect(function(){return document.body.setAttribute(N,(D()+1).toString()),function(){var e=D()-1;e<=0?document.body.removeAttribute(N):document.body.setAttribute(N,e.toString())}},[])},L=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;M();var o=c.useMemo(function(){return O(i)},[i]);return c.createElement(R,{styles:j(o,!t,i,r?"":"!important")})},F=!1;if("undefined"!=typeof window)try{var z=Object.defineProperty({},"passive",{get:function(){return F=!0,!0}});window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch(e){F=!1}var U=!!F&&{passive:!1},B=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===r[t])},V=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),q(e,n)){var i=$(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},q=function(e,t){return"v"===e?B(t,"overflowY"):B(t,"overflowX")},$=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},W=function(e,t,r,n,i){var o,s=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=s*n,l=r.target,c=t.contains(l),u=!1,h=a>0,d=0,f=0;do{var p=$(e,l),m=p[0],g=p[1]-p[2]-s*m;(m||g)&&q(e,l)&&(d+=g,f+=m),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return h&&(i&&1>Math.abs(d)||!i&&a>d)?u=!0:!h&&(i&&1>Math.abs(f)||!i&&-a>f)&&(u=!0),u},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},G=function(e){return[e.deltaX,e.deltaY]},K=function(e){return e&&"current"in e?e.current:e},Q=0,Y=[],X=(n=function(e){var t=c.useRef([]),r=c.useRef([0,0]),n=c.useRef(),i=c.useState(Q++)[0],o=c.useState(C)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,u.ev)([e.lockRef.current],(e.shards||[]).map(K),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var i,o=H(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],c="deltaY"in e?e.deltaY:a[1]-o[1],u=e.target,h=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===h&&"range"===u.type)return!1;var d=V(h,u);if(!d)return!0;if(d?i=h:(i="v"===h?"h":"v",d=V(h,u)),!d)return!1;if(!n.current&&"changedTouches"in e&&(l||c)&&(n.current=i),!i)return!0;var f=n.current||i;return W(f,t,e,"h"===f?l:c,!0)},[]),l=c.useCallback(function(e){if(Y.length&&Y[Y.length-1]===o){var r="deltaY"in e?G(e):H(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta)[0]===r[0]&&n[1]===r[1]})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(s.current.shards||[]).map(K).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?a(e,i[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),h=c.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=c.useCallback(function(e){r.current=H(e),n.current=void 0},[]),f=c.useCallback(function(t){h(t.type,G(t),t.target,a(t,e.lockRef.current))},[]),p=c.useCallback(function(t){h(t.type,H(t),t.target,a(t,e.lockRef.current))},[]);c.useEffect(function(){return Y.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,U),document.addEventListener("touchmove",l,U),document.addEventListener("touchstart",d,U),function(){Y=Y.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,U),document.removeEventListener("touchmove",l,U),document.removeEventListener("touchstart",d,U)}},[]);var m=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(o,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,m?c.createElement(L,{gapMode:e.gapMode}):null)},_.useMedium(n),S),J=c.forwardRef(function(e,t){return c.createElement(k,(0,u.pi)({},e,{ref:t,sideCar:X}))});J.classNames=k.classNames;var Z=r(5490),ee=r(59848),et=r(63366),er=r(87462),en="data-focus-lock",ei="data-focus-lock-disabled",eo={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},es=b({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),ea=b(),el=b(),ec=w({async:!0,ssr:"undefined"!=typeof document}),eu=(0,c.createContext)(void 0),eh=[],ed=c.forwardRef(function(e,t){var r,n=c.useState(),i=n[0],o=n[1],s=c.useRef(),a=c.useRef(!1),l=c.useRef(null),u=c.useState({})[1],h=e.children,d=e.disabled,f=void 0!==d&&d,p=e.noFocusGuards,m=void 0!==p&&p,y=e.persistentFocus,v=e.crossFrame,b=e.autoFocus,w=(e.allowTextSelection,e.group),_=e.className,x=e.whiteList,k=e.hasPositiveIndices,S=e.shards,E=void 0===S?eh:S,T=e.as,C=e.lockProps,I=e.sideCar,P=e.returnFocus,A=void 0!==P&&P,O=e.focusOptions,R=e.onActivation,N=e.onDeactivation,j=c.useState({})[0],D=c.useCallback(function(e){var t=e.captureFocusRestore;if(!l.current){var r,n=null==(r=document)?void 0:r.activeElement;l.current=n,n!==document.body&&(l.current=t(n))}s.current&&R&&R(s.current),a.current=!0,u()},[R]),M=c.useCallback(function(){a.current=!1,N&&N(s.current),u()},[N]),L=c.useCallback(function(e){var t=l.current;if(t){var r=("function"==typeof t?t():t)||document.body,n="function"==typeof A?A(r):A;if(n){var i="object"==typeof n?n:void 0;l.current=null,e?Promise.resolve().then(function(){return r.focus(i)}):r.focus(i)}}},[A]),F=c.useCallback(function(e){a.current&&es.useMedium(e)},[]),z=ea.useMedium,U=c.useCallback(function(e){s.current!==e&&(s.current=e,o(e))},[]),B=(0,er.Z)(((r={})[ei]=f&&"disabled",r[en]=w,r),void 0===C?{}:C),V=!0!==m,q=V&&"tail"!==m,$=g([t,U]),W=c.useMemo(function(){return{observed:s,shards:E,enabled:!f,active:a.current}},[f,a.current,E,i]);return c.createElement(c.Fragment,null,V&&[c.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:eo}),k?c.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:eo}):null],!f&&c.createElement(I,{id:j,sideCar:ec,observed:i,disabled:f,persistentFocus:void 0!==y&&y,crossFrame:void 0===v||v,autoFocus:void 0===b||b,whiteList:x,shards:E,onActivation:D,onDeactivation:M,returnFocus:L,focusOptions:O,noFocusGuards:m}),c.createElement(void 0===T?"div":T,(0,er.Z)({ref:$},B,{className:_,onBlur:z,onFocus:F}),c.createElement(eu.Provider,{value:W},h)),q&&c.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:eo}))});ed.propTypes={};var ef=r(94578),ep=r(4942),em=function(e){for(var t=Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t},eg=function(e){return Array.isArray(e)?e:[e]},ey=function(e){return Array.isArray(e)?e[0]:e},ev=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!!t&&!!t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility"))},eb=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},ew=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},e_=function(e,t){var r,n=e.get(t);if(void 0!==n)return n;var i=(r=e_.bind(void 0,e),!t||ew(t)||!ev(t)&&!t.hasAttribute("inert")&&r(eb(t)));return e.set(t,i),i},ex=function(e,t){var r,n=e.get(t);if(void 0!==n)return n;var i=(r=ex.bind(void 0,e),!t||!!ew(t)||!!eT(t)&&r(eb(t)));return e.set(t,i),i},ek=function(e){return e.dataset},eS=function(e){return"INPUT"===e.tagName},eE=function(e){return eS(e)&&"radio"===e.type},eT=function(e){return![!0,"true",""].includes(e.getAttribute("data-no-autofocus"))},eC=function(e){var t;return!!(e&&(null===(t=ek(e))||void 0===t?void 0:t.focusGuard))},eI=function(e){return!eC(e)},eP=function(e){return!!e},eA=function(e,t){var r=Math.max(0,e.tabIndex),n=Math.max(0,t.tabIndex),i=r-n,o=e.index-t.index;if(i){if(!r)return 1;if(!n)return -1}return i||o},eO=function(e,t,r){return em(e).map(function(e,t){var n=e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex;return{node:e,index:t,tabIndex:r&&-1===n?(e.dataset||{}).focusGuard?0:-1:n}}).filter(function(e){return!t||e.tabIndex>=0}).sort(eA)},eR="button:enabled,select:enabled,textarea:enabled,input:enabled,a[href],area[href],summary,iframe,object,embed,audio[controls],video[controls],[tabindex],[contenteditable],[autofocus]",eN="".concat(eR,", [data-focus-guard]"),ej=function(e,t){return em((e.shadowRoot||e).children).reduce(function(e,r){return e.concat(r.matches(t?eN:eR)?[r]:[],ej(r))},[])},eD=function(e,t){var r;return e instanceof HTMLIFrameElement&&(null===(r=e.contentDocument)||void 0===r?void 0:r.body)?eM([e.contentDocument.body],t):[e]},eM=function(e,t){return e.reduce(function(e,r){var n,i=ej(r,t),o=(n=[]).concat.apply(n,i.map(function(e){return eD(e,t)}));return e.concat(o,r.parentNode?em(r.parentNode.querySelectorAll(eR)).filter(function(e){return e===r}):[])},[])},eL=function(e,t){return em(e).filter(function(e){return e_(t,e)}).filter(function(e){return!((eS(e)||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))})},eF=function(e,t){return void 0===t&&(t=new Map),em(e).filter(function(e){return ex(t,e)})},ez=function(e,t,r){return eO(eL(eM(e,r),t),!0,r)},eU=function(e,t){return eO(eL(eM(e),t),!1)},eB=function(e,t){return e.shadowRoot?eB(e.shadowRoot,t):!!(void 0!==Object.getPrototypeOf(e).contains&&Object.getPrototypeOf(e).contains.call(e,t))||em(e.children).some(function(e){var r;if(e instanceof HTMLIFrameElement){var n=null===(r=e.contentDocument)||void 0===r?void 0:r.body;return!!n&&eB(n,t)}return eB(e,t)})},eV=function(e){try{return e()}catch(e){return}},eq=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?eq(t.shadowRoot):t instanceof HTMLIFrameElement&&eV(function(){return t.contentWindow.document})?eq(t.contentWindow.document):t}},e$=function(e){void 0===e&&(e=document);var t=eq(e);return!!t&&em(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some(function(e){return eB(e,t)})},eW=function(e){for(var t=new Set,r=e.length,n=0;n<r;n+=1)for(var i=n+1;i<r;i+=1){var o=e[n].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter(function(e,r){return!t.has(r)})},eH=function(e){return e.parentNode?eH(e.parentNode):e},eG=function(e){return eg(e).filter(Boolean).reduce(function(e,t){var r=t.getAttribute(en);return e.push.apply(e,r?eW(em(eH(t).querySelectorAll("[".concat(en,'="').concat(r,'"]:not([').concat(ei,'="disabled"])')))):[t]),e},[])},eK=function(e,t){return void 0===t&&(t=eq(ey(e).ownerDocument)),!!t&&(!t.dataset||!t.dataset.focusGuard)&&eG(e).some(function(e){var r;return eB(e,t)||(r=t,!!em(e.querySelectorAll("iframe")).some(function(e){return e===r}))})},eQ=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},eY=function(e,t){return eE(e)&&e.name&&t.filter(eE).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e},eX=function(e){var t=new Set;return e.forEach(function(r){return t.add(eY(r,e))}),e.filter(function(e){return t.has(e)})},eJ=function(e){return e[0]&&e.length>1?eY(e[0],e):e[0]},eZ=function(e,t){return e.indexOf(eY(t,e))},e0="NEW_FOCUS",e1=function(e,t,r,n,i){var o=e.length,s=e[0],a=e[o-1],l=eC(n);if(!(n&&e.indexOf(n)>=0)){var c=void 0!==n?r.indexOf(n):-1,u=i?r.indexOf(i):c,h=i?e.indexOf(i):-1;if(-1===c)return -1!==h?h:e0;if(-1===h)return e0;var d=c-u,f=r.indexOf(s),p=r.indexOf(a),m=eX(r),g=(void 0!==n?m.indexOf(n):-1)-(i?m.indexOf(i):c);if(!d&&h>=0||0===t.length)return h;var y=eZ(e,t[0]),v=eZ(e,t[t.length-1]);if(c<=f&&l&&Math.abs(d)>1)return v;if(c>=p&&l&&Math.abs(d)>1)return y;if(d&&Math.abs(g)>1)return h;if(c<=f)return v;if(c>p)return y;if(d)return Math.abs(d)>1?h:(o+h+d)%o}},e2=function(e,t,r){var n=eF(e.map(function(e){return e.node}).filter(function(e){var t,n=null===(t=ek(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0}));return n&&n.length?eJ(n):eJ(eF(t))},e4=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&e4(e.parentNode.host||e.parentNode,t),t},e5=function(e,t){for(var r=e4(e),n=e4(t),i=0;i<r.length;i+=1){var o=r[i];if(n.indexOf(o)>=0)return o}return!1},e6=function(e,t,r){var n=eg(e),i=eg(t),o=n[0],s=!1;return i.filter(Boolean).forEach(function(e){s=e5(s||e,e)||s,r.filter(Boolean).forEach(function(e){var t=e5(o,e);t&&(s=!s||eB(t,s)?t:e5(t,s))})}),s},e3=function(e,t){return e.reduce(function(e,r){return e.concat(eL(em(r.querySelectorAll("[".concat("data-autofocus-inside","]"))).map(function(e){return eM([e])}).reduce(function(e,t){return e.concat(t)},[]),t))},[])},e9=function(e,t){var r=new Map;return t.forEach(function(e){return r.set(e.node,e)}),e.map(function(e){return r.get(e)}).filter(eP)},e8=function(e,t){var r=eq(eg(e).length>0?document:ey(e).ownerDocument),n=eG(e).filter(eI),i=e6(r||e,e,n),o=new Map,s=eU(n,o),a=s.filter(function(e){return eI(e.node)});if(a[0]){var l=eU([i],o).map(function(e){return e.node}),c=e9(l,a),u=c.map(function(e){return e.node}),h=c.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),d=e1(u,h,l,r,t);if(d===e0){var f=e2(s,h,e3(n,o))||e2(s,u,e3(n,o));return f?{node:f}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===d?d:c[d]}},e7=0,te=!1,tt=function(e,t,r){void 0===r&&(r={});var n=e8(e,t);if(!te&&n){if(e7>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),te=!0,setTimeout(function(){te=!1},1);return}e7++,eQ(n.node,r.focusOptions),e7--}};function tr(e){if(!e)return null;if("undefined"==typeof WeakRef)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(null==t?void 0:t.deref())||null}}var tn=function(e){if(!e)return null;for(var t=[],r=e;r&&r!==document.body;)t.push({current:tr(r),parent:tr(r.parentElement),left:tr(r.previousElementSibling),right:tr(r.nextElementSibling)}),r=r.parentElement;return{element:tr(e),stack:t,ownerDocument:e.ownerDocument}},ti=function(e){if(e)for(var t,r,n,i,o,s=e.stack,a=e.ownerDocument,l=new Map,c=0;c<s.length;c++){var u=s[c],h=null===(t=u.parent)||void 0===t?void 0:t.call(u);if(h&&a.contains(h)){for(var d=null===(r=u.left)||void 0===r?void 0:r.call(u),f=u.current(),p=h.contains(f)?f:void 0,m=null===(n=u.right)||void 0===n?void 0:n.call(u),g=ez([h],l),y=null!==(o=null!==(i=null!=p?p:null==d?void 0:d.nextElementSibling)&&void 0!==i?i:m)&&void 0!==o?o:d;y;){for(var v=0;v<g.length;v++){var b=g[v];if(null==y?void 0:y.contains(b.node))return b.node}y=y.nextElementSibling}if(g.length)return g[0].node}}},to=function(e){var t=tn(e);return function(){return ti(t)}},ts=function(e){var t=eG(e).filter(eI),r=eO(eM([e6(e,e,t)],!0),!0,!0),n=eM(t,!1);return r.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:n.indexOf(t)>=0,guard:eC(t)}})},ta=function(e,t,r){if(!e||!t)return console.error("no element or scope given"),{};var n=eg(t);if(n.every(function(t){return!eB(t,e)}))return console.error("Active element is not contained in the scope"),{};var i=r?ez(n,new Map):eU(n,new Map),o=i.findIndex(function(t){return t.node===e});if(-1!==o)return{prev:i[o-1],next:i[o+1],first:i[0],last:i[i.length-1]}},tl=function(e,t){var r=t?ez(eg(e),new Map):eU(eg(e),new Map);return{first:r[0],last:r[r.length-1]}},tc=function(e,t,r){void 0===t&&(t={});var n,i=(n=t,Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},n)),o=ta(e,i.scope,i.onlyTabbable);if(o){var s=r(o,i.cycle);s&&eQ(s.node,i.focusOptions)}},tu=function(e,t,r){var n,i=tl(e,null===(n=t.onlyTabbable)||void 0===n||n)[r];i&&eQ(i.node,t.focusOptions)};function th(e){setTimeout(e,1)}var td=function(e){return e&&"current"in e?e.current:e},tf=function(){return document&&document.activeElement===document.body},tp=null,tm=null,tg=function(){return null},ty=null,tv=!1,tb=!1,tw=function(e,t){ty={observerNode:e,portaledElement:t}};function t_(e,t,r,n){var i=null,o=e;do{var s=n[o];if(s.guard)s.node.dataset.focusAutoGuard&&(i=s);else if(s.lockItem){if(o!==e)return;i=null}else break}while((o+=r)!==t);i&&(i.node.tabIndex=0)}var tx=function(e){return eU(e,new Map)},tk=function(){var e=!1;if(tp){var t=tp,r=t.observed,n=t.persistentFocus,i=t.autoFocus,o=t.shards,s=t.crossFrame,a=t.focusOptions,l=t.noFocusGuards,c=r||ty&&ty.portaledElement;if(tf()&&tm&&(!document.body.contains(tm)||!tx([(d=tm).parentNode]).some(function(e){return e.node===d}))){tm=null;var u=tg();u&&u.focus()}var h=document&&document.activeElement;if(c){var d,f=[c].concat(o.map(td).filter(Boolean));if((!h||(tp.whiteList||function(){return!0})(h))&&(n||function(){if(!(s?!!tv:"meanwhile"===tv)||!l||!tm||tb)return!1;var e=tx(f),t=e.findIndex(function(e){return e.node===tm});return 0===t||t===e.length-1}()||!(tf()||e$())||!tm&&i)&&(c&&!(eK(f)||h&&f.some(function(e){return function e(t,r,n){return r&&(r.host===t&&(!r.activeElement||n.contains(r.activeElement))||r.parentNode&&e(t,r.parentNode,n))}(h,e,e)})||ty&&ty.portaledElement===h)&&(document&&!tm&&h&&!i?(h.blur&&h.blur(),document.body.focus()):(e=tt(f,tm,{focusOptions:a}),ty={})),tv=!1,tg=to(tm=document&&document.activeElement)),document&&h!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var p=document&&document.activeElement,m=ts(f),g=m.map(function(e){return e.node}).indexOf(p);g>-1&&(m.filter(function(e){var t=e.guard,r=e.node;return t&&r.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute("tabIndex")}),t_(g,m.length,1,m),t_(g,-1,-1,m))}}}return e},tS=function(e){tk()&&e&&(e.stopPropagation(),e.preventDefault())},tE=function(){return th(tk)},tT=function(){tb=!0},tC=function(){tb=!1,tv="just",th(function(){tv="meanwhile"})},tI=function(){document.addEventListener("focusin",tS),document.addEventListener("focusout",tE),window.addEventListener("focus",tT),window.addEventListener("blur",tC)},tP=function(){document.removeEventListener("focusin",tS),document.removeEventListener("focusout",tE),window.removeEventListener("focus",tT),window.removeEventListener("blur",tC)},tA={moveFocusInside:tt,focusInside:eK,focusNextElement:function(e,t){void 0===t&&(t={}),tc(e,t,function(e,t){var r=e.next,n=e.first;return r||t&&n})},focusPrevElement:function(e,t){void 0===t&&(t={}),tc(e,t,function(e,t){var r=e.prev,n=e.last;return r||t&&n})},focusFirstElement:function(e,t){void 0===t&&(t={}),tu(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),tu(e,t,"last")},captureFocusRestore:to};es.assignSyncMedium(function(e){var t=e.target,r=e.currentTarget;r.contains(t)||tw(r,t)}),ea.assignMedium(tE),el.assignMedium(function(e){return e(tA)});var tO=(i=function(e){return e.filter(function(e){return!e.disabled})},o=function(e){var t=e.slice(-1)[0];t&&!tp&&tI();var r=tp,n=r&&t&&t.id===r.id;tp=t,!r||n||(r.onDeactivation(),e.filter(function(e){return e.id===r.id}).length||r.returnFocus(!t)),t?(tm=null,n&&r.observed===t.observed||t.onActivation(tA),tk(!0),th(tk)):(tP(),tm=null)},function(e){var t,r=[];function n(){o(t=i(r.map(function(e){return e.props})))}var s=function(i){function o(){return i.apply(this,arguments)||this}(0,ef.Z)(o,i),o.peek=function(){return t};var s=o.prototype;return s.componentDidMount=function(){r.push(this),n()},s.componentDidUpdate=function(){n()},s.componentWillUnmount=function(){var e=r.indexOf(this);r.splice(e,1),n()},s.render=function(){return c.createElement(e,this.props)},o}(c.PureComponent);return(0,ep.Z)(s,"displayName","SideEffect("+(e.displayName||e.name||"Component")+")"),s})(function(){return null}),tR=c.forwardRef(function(e,t){return c.createElement(ed,(0,er.Z)({sideCar:tO,ref:t},e))}),tN=ed.propTypes||{};tN.sideCar,(0,et.Z)(tN,["sideCar"]),tR.propTypes={};var tj=r(21326);let tD=e=>e.hasAttribute("tabindex"),tM=e=>e.offsetWidth>0&&e.offsetHeight>0,tL=tR.default??tR,tF=e=>{let{initialFocusRef:t,finalFocusRef:r,contentRef:n,restoreFocus:i,children:o,isDisabled:s,autoFocus:l,persistentFocus:u,lockFocusAcrossFrames:h}=e,d=(0,c.useCallback)(()=>{t?.current?t.current.focus():n?.current&&0===function(e){let t=Array.from(e.querySelectorAll("input:not(:disabled):not([disabled]),select:not(:disabled):not([disabled]),textarea:not(:disabled):not([disabled]),embed,iframe,object,a[href],area[href],button:not(:disabled):not([disabled]),[tabindex],audio[controls],video[controls],*[tabindex]:not([aria-disabled]),*[contenteditable]"));return t.unshift(e),t.filter(e=>(function(e){if(!(0,tj.Re)(e)||(0,tj.oI)(e)||(0,tj.nV)(e))return!1;let{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;let r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():!!(0,tj.iU)(e)||tD(e)})(e)&&tM(e))}(n.current).length&&requestAnimationFrame(()=>{n.current?.focus()})},[t,n]),f=(0,c.useCallback)(()=>{r?.current?.focus()},[r]),p=i&&!r;return(0,a.jsx)(tL,{crossFrame:h,persistentFocus:u,autoFocus:l,disabled:s,onActivation:d,onDeactivation:f,returnFocus:p,children:o})};function tz(e){let{autoFocus:t,trapFocus:r,dialogRef:n,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:s,finalFocusRef:u,returnFocusOnClose:h,preserveScrollBarGap:d,lockFocusAcrossFrames:f,isOpen:p}=(0,Z.vR)(),[m,g]=(0,l.oO)();(0,c.useEffect)(()=>{!m&&g&&setTimeout(g)},[m,g]);let y=(0,ee.$)(n,p);return(0,a.jsx)(tF,{autoFocus:t,isDisabled:!r,initialFocusRef:i,finalFocusRef:u,restoreFocus:h,contentRef:n,lockFocusAcrossFrames:f,children:(0,a.jsx)(J,{removeScrollBar:!d,allowPinchZoom:s,enabled:1===y&&o,forwardProps:!0,children:e.children})})}tF.displayName="FocusLock"},59848:function(e,t,r){"use strict";r.d(t,{$:function(){return c},m:function(){return l}});var n=r(67294),i=Object.defineProperty,o=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t,r)=>(o(e,"symbol"!=typeof t?t+"":t,r),r);class a{constructor(){s(this,"modals"),this.modals=new Set}add(e){return this.modals.add(e),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return!!e&&e===Array.from(this.modals)[this.modals.size-1]}}let l=new a;function c(e,t){let[r,i]=(0,n.useState)(0);return(0,n.useEffect)(()=>{let r=e.current;if(r)return t&&i(l.add(r)),()=>{l.remove(r),i(0)}},[t,e]),r}},34614:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=r(85893),i=r(34926),o=r(72701),s=r(5490),a=r(13114),l=r(67294),c=r(82145);let u={initial:"exit",animate:"enter",exit:"exit",variants:{enter:({transition:e,transitionEnd:t,delay:r}={})=>({opacity:1,transition:e?.enter??c.p$.enter(c.Sh.enter,r),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:r}={})=>({opacity:0,transition:e?.exit??c.p$.exit(c.Sh.exit,r),transitionEnd:t?.exit})}};(0,l.forwardRef)(function(e,t){let{unmountOnExit:r,in:s,className:l,transition:c,transitionEnd:h,delay:d,animatePresenceProps:f,...p}=e,m=s||r?"enter":"exit",g=!r||s&&r,y={transition:c,transitionEnd:h,delay:d};return(0,n.jsx)(a.M,{...f,custom:y,children:g&&(0,n.jsx)(o.E.div,{ref:t,className:(0,i.cx)("chakra-fade",l),custom:y,...u,animate:m,...p})})}).displayName="Fade";var h=r(64993),d=r(49381);let f=(0,h.m)(o.E.div),p=(0,d.G)((e,t)=>{let{className:r,transition:o,motionProps:a,...l}=e,c=(0,i.cx)("chakra-modal__overlay",r),h={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...(0,s.I_)().overlay},{motionPreset:d}=(0,s.vR)(),p="none"===d?{}:u;return(0,n.jsx)(f,{...a||p,__css:h,ref:t,className:c,...l})});p.displayName="ModalOverlay"},5490:function(e,t,r){"use strict";r.d(t,{u_:function(){return k},vR:function(){return x},I_:function(){return w}});var n=r(85893),i=r(52110),o=r(13114),s=r(29062),a=r(68928),l=new WeakMap,c=new WeakMap,u={},h=0,d=function(e){return e&&(e.host||d(e.parentNode))},f=function(e,t,r,n){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=d(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});u[r]||(u[r]=new WeakMap);var o=u[r],s=[],a=new Set,f=new Set(i),p=function(e){!e||a.has(e)||(a.add(e),p(e.parentNode))};i.forEach(p);var m=function(e){!e||f.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))m(e);else try{var t=e.getAttribute(n),i=null!==t&&"false"!==t,u=(l.get(e)||0)+1,h=(o.get(e)||0)+1;l.set(e,u),o.set(e,h),s.push(e),1===u&&i&&c.set(e,!0),1===h&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),a.clear(),h++,function(){s.forEach(function(e){var t=l.get(e)-1,i=o.get(e)-1;l.set(e,t),o.set(e,i),t||(c.has(e)||e.removeAttribute(n),c.delete(e)),i||e.removeAttribute(r)}),--h||(l=new WeakMap,l=new WeakMap,c=new WeakMap,u={})}},p=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),f(n,i,r,"aria-hidden")):function(){return null}},m=r(67294),g=r(59848),y=r(93977),v=r(73035);let[b,w]=(0,i.k)({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" "}),[_,x]=(0,i.k)({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),k=e=>{let t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,preserveScrollBarGap:!0,motionPreset:"scale",...e,lockFocusAcrossFrames:e.lockFocusAcrossFrames||!0},{portalProps:r,children:i,autoFocus:l,trapFocus:c,initialFocusRef:u,finalFocusRef:h,returnFocusOnClose:d,blockScrollOnMount:f,allowPinchZoom:w,preserveScrollBarGap:x,motionPreset:k,lockFocusAcrossFrames:S,animatePresenceProps:E,onCloseComplete:T}=t,C=(0,v.j)("Modal",t),I={...function(e){let{isOpen:t,onClose:r,id:n,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:l=!0,onOverlayClick:c,onEsc:u}=e,h=(0,m.useRef)(null),d=(0,m.useRef)(null),[f,y,v]=function(e,...t){let r=(0,m.useId)(),n=e||r;return(0,m.useMemo)(()=>t.map(e=>`${e}-${n}`),[n,t])}(n,"chakra-modal","chakra-modal--header","chakra-modal--body");!function(e,t){let r=e.current;(0,m.useEffect)(()=>{if(e.current&&t)return p(e.current)},[t,e,r])}(h,t&&l);let b=(0,g.$)(h,t),w=(0,m.useRef)(null),_=(0,m.useCallback)(e=>{w.current=e.target},[]),x=(0,m.useCallback)(e=>{"Escape"===e.key&&(e.stopPropagation(),o&&r?.(),u?.())},[o,r,u]),[k,S]=(0,m.useState)(!1),[E,T]=(0,m.useState)(!1),C=(0,m.useCallback)((e={},t=null)=>({role:"dialog",...e,ref:(0,s.lq)(t,h),id:f,tabIndex:-1,"aria-modal":!0,"aria-labelledby":k?y:void 0,"aria-describedby":E?v:void 0,onClick:(0,a.v)(e.onClick,e=>e.stopPropagation())}),[v,E,f,y,k]),I=(0,m.useCallback)(e=>{e.stopPropagation(),w.current===e.target&&g.m.isTopModal(h.current)&&(i&&r?.(),c?.())},[r,i,c]),P=(0,m.useCallback)((e={},t=null)=>({...e,ref:(0,s.lq)(t,d),onClick:(0,a.v)(e.onClick,I),onKeyDown:(0,a.v)(e.onKeyDown,x),onMouseDown:(0,a.v)(e.onMouseDown,_)}),[x,_,I]);return{isOpen:t,onClose:r,headerId:y,bodyId:v,setBodyMounted:T,setHeaderMounted:S,dialogRef:h,overlayRef:d,getDialogProps:C,getDialogContainerProps:P,index:b}}(t),autoFocus:l,trapFocus:c,initialFocusRef:u,finalFocusRef:h,returnFocusOnClose:d,blockScrollOnMount:f,allowPinchZoom:w,preserveScrollBarGap:x,motionPreset:k,lockFocusAcrossFrames:S};return(0,n.jsx)(_,{value:I,children:(0,n.jsx)(b,{value:C,children:(0,n.jsx)(o.M,{...E,onExitComplete:T,children:I.isOpen&&(0,n.jsx)(y.h,{...r,children:i})})})})};k.displayName="Modal"},28215:function(e,t,r){"use strict";r.d(t,{L:function(){return o},h:function(){return s}});var n=r(85893);let[i,o]=(0,r(52110).k)({strict:!1,name:"PortalManagerContext"});function s(e){let{children:t,zIndex:r}=e;return(0,n.jsx)(i,{value:{zIndex:r},children:t})}s.displayName="PortalManager"},93977:function(e,t,r){"use strict";r.d(t,{h:function(){return m}});var n=r(85893),i=r(12408),o=r(52110),s=r(67294),a=r(73935),l=r(28215);let[c,u]=(0,o.k)({strict:!1,name:"PortalContext"}),h="chakra-portal",d=e=>(0,n.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),f=e=>{let{appendToParentPortal:t,children:r}=e,[o,f]=(0,s.useState)(null),p=(0,s.useRef)(null),[,m]=(0,s.useState)({});(0,s.useEffect)(()=>m({}),[]);let g=u(),y=(0,l.L)();(0,i.G)(()=>{if(!o)return;let e=o.ownerDocument,r=t?g??e.body:e.body;if(!r)return;p.current=e.createElement("div"),p.current.className=h,r.appendChild(p.current),m({});let n=p.current;return()=>{r.contains(n)&&r.removeChild(n)}},[o]);let v=y?.zIndex?(0,n.jsx)(d,{zIndex:y?.zIndex,children:r}):r;return p.current?(0,a.createPortal)((0,n.jsx)(c,{value:p.current,children:v}),p.current):(0,n.jsx)("span",{ref:e=>{e&&f(e)}})},p=e=>{let{children:t,containerRef:r,appendToParentPortal:o}=e,l=r.current,u=l??("undefined"!=typeof window?document.body:void 0),d=(0,s.useMemo)(()=>{let e=l?.ownerDocument.createElement("div");return e&&(e.className=h),e},[l]),[,f]=(0,s.useState)({});return((0,i.G)(()=>f({}),[]),(0,i.G)(()=>{if(d&&u)return u.appendChild(d),()=>{u.removeChild(d)}},[d,u]),u&&d)?(0,a.createPortal)((0,n.jsx)(c,{value:o?d:null,children:t}),d):null};function m(e){let{containerRef:t,...r}={appendToParentPortal:!0,...e};return t?(0,n.jsx)(p,{containerRef:t,...r}):(0,n.jsx)(f,{...r})}m.className=h,m.selector=".chakra-portal",m.displayName="Portal"},48899:function(e,t,r){"use strict";r.d(t,{$:function(){return h}});var n=r(85893),i=r(65544),o=r(34926),s=r(70917),a=r(49381),l=r(73035),c=r(64993);let u=(0,s.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),h=(0,a.G)((e,t)=>{let r=(0,l.m)("Spinner",e),{label:s="Loading...",thickness:a="2px",speed:h="0.45s",emptyColor:d="transparent",className:f,...p}=(0,i.L)(e),m=(0,o.cx)("chakra-spinner",f),g={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:a,borderBottomColor:d,borderLeftColor:d,animation:`${u} ${h} linear infinite`,...r};return(0,n.jsx)(c.m.div,{ref:t,__css:g,className:m,...p,children:s&&(0,n.jsx)(c.m.span,{srOnly:!0,children:s})})});h.displayName="Spinner"},73636:function(e,t,r){"use strict";r.d(t,{U:function(){return o}});var n=r(85893),i=r(3712);let o=(0,r(49381).G)((e,t)=>(0,n.jsx)(i.K,{align:"center",...e,direction:"row",ref:t}));o.displayName="HStack"},3712:function(e,t,r){"use strict";r.d(t,{K:function(){return u}});var n=r(85893),i=r(90911),o=r(34926),s=r(67294),a=r(64993);let l=e=>(0,n.jsx)(a.m.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});l.displayName="StackItem";var c=r(1185);let u=(0,r(49381).G)((e,t)=>{let{isInline:r,direction:u,align:h,justify:d,spacing:f="0.5rem",wrap:p,children:m,divider:g,className:y,shouldWrapChildren:v,...b}=e,w=r?"row":u??"column",_=(0,s.useMemo)(()=>(function(e){let{spacing:t,direction:r}=e,n={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":(0,c.XQ)(r,e=>n[e])}})({spacing:f,direction:w}),[f,w]),x=!!g,k=!v&&!x,S=(0,s.useMemo)(()=>{let e=(0,i.W)(m);return k?e:e.map((t,r)=>{let i=void 0!==t.key?t.key:r,o=r+1===e.length,a=(0,n.jsx)(l,{children:t},i),c=v?a:t;if(!x)return c;let u=(0,s.cloneElement)(g,{__css:_});return(0,n.jsxs)(s.Fragment,{children:[c,o?null:u]},i)})},[g,_,x,k,v,m]),E=(0,o.cx)("chakra-stack",y);return(0,n.jsx)(a.m.div,{ref:t,display:"flex",alignItems:h,justifyContent:d,flexDirection:w,flexWrap:p,gap:x?void 0:f,className:E,...b,children:S})});u.displayName="Stack"},8186:function(e,t,r){"use strict";r.d(t,{g:function(){return o}});var n=r(85893),i=r(3712);let o=(0,r(49381).G)((e,t)=>(0,n.jsx)(i.K,{align:"center",...e,direction:"column",ref:t}));o.displayName="VStack"},64993:function(e,t,r){"use strict";let n;r.d(t,{m:function(){return g}});var i=r(82203),o=r(2847),s=r(87155),a=r(16829),l=r(67294);let c=new Set([...(0,r(35831).bB)({}),"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),u=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function h(e){return(u.has(e)||!c.has(e))&&"_"!==e[0]}var d=r(31046);let f=(n=a.Z).default||n,p=({baseStyle:e})=>t=>{let{theme:r,css:n,__css:a,sx:l,...c}=t,[u]=function(e,...t){let r=Object.getOwnPropertyDescriptors(e),n=Object.keys(r),i=e=>{let t={};for(let n=0;n<e.length;n++){let i=e[n];r[i]&&(Object.defineProperty(t,i,r[i]),delete r[i])}return t};return t.map(e=>i(Array.isArray(e)?e:n.filter(e))).concat(i(n))}(c,r.__isStyleProp),h=function(e,...t){if(null==e)throw TypeError("Cannot convert undefined or null to object");let r={...e};for(let e of t)if(null!=e)for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(t in r&&delete r[t],r[t]=e[t]);return r}({},a,(0,o.P)(e,t),(0,s.o)(u),l),d=(0,i.i)(h)(t.theme);return n?[d,n]:d};function m(e,t){let{baseStyle:r,...n}=t??{};n.shouldForwardProp||(n.shouldForwardProp=h);let i=p({baseStyle:r}),o=f(e,n)(i);return(0,l.forwardRef)(function(e,t){let{children:r,...n}=e,{colorMode:i,forced:s}=(0,d.If)();return(0,l.createElement)(o,{ref:t,"data-theme":s?i:void 0,...n},r)})}let g=function(){let e=new Map;return new Proxy(m,{apply:(e,t,r)=>m(...r),get:(t,r)=>(e.has(r)||e.set(r,m(r)),e.get(r))})}()},49381:function(e,t,r){"use strict";r.d(t,{G:function(){return i}});var n=r(67294);function i(e){return(0,n.forwardRef)(e)}},70052:function(e,t,r){"use strict";r.d(t,{LP:function(){return s},uP:function(){return o}});var n=r(37984),i=r(31046);function o(){let e=(0,i.If)(),t=(0,n.F)();return{...e,theme:t}}function s(e,t,r){let n=Array.isArray(t)?t:[t],i=Array.isArray(r)?r:[r];return r=>{let o=i.filter(Boolean),s=n.map((t,n)=>"breakpoints"===e?function(e,t,r){if(null==t)return t;let n=t=>e.__breakpoints?.asArray?.[t];return n(t)??n(r)??r}(r,t,o[n]??t):function(e,t,r){if(null==t)return t;let n=t=>e.__cssMap?.[t]?.value;return n(t)??n(r)??r}(r,`${e}.${t}`,o[n]??t));return Array.isArray(t)?s:s[0]}}},73035:function(e,t,r){"use strict";r.d(t,{j:function(){return m},m:function(){return p}});var n=r(79115),i=r(15292),o=r(2847),s=r(38554),a=r(4839),l=r(87155),c=r(8297),u=r(67294),h=r(69590),d=r(70052);function f(e,t={}){let{styleConfig:r,...f}=t,{theme:p,colorMode:m}=(0,d.uP)(),g=e?(0,a.W)(p,`components.${e}`):void 0,y=r||g,v=s({theme:p,colorMode:m},y?.defaultProps??{},(0,l.o)((0,c.C)(f,["children"])),(e,t)=>e?void 0:t),b=(0,u.useRef)({});if(y){let e=(e=>{let{variant:t,size:r,theme:a}=e,l=function(e){let t=e.__breakpoints;return function(e,r,a,l){var c;if(!t)return;let u={},h=(c=t.toArrayValue,Array.isArray(a)?a:(0,n.Kn)(a)?c(a):null!=a?[a]:void 0);if(!h)return u;let d=h.length,f=1===d,p=!!e.parts;for(let n=0;n<d;n++){let a=t.details[n],c=t.details[function(e,t){for(let r=t+1;r<e.length;r++)if(null!=e[r])return r;return -1}(h,n)],d=(0,i.Y)(a.minW,c?._minW),m=(0,o.P)(e[r]?.[h[n]],l);if(m){if(p){e.parts?.forEach(e=>{s(u,{[e]:f?m[e]:{[d]:m[e]}})});continue}if(!p){f?s(u,m):u[d]=m;continue}u[d]=m}}return u}}(a);return s({},(0,o.P)(y.baseStyle??{},e),l(y,"sizes",r,e),l(y,"variants",t,e))})(v);h(b.current,e)||(b.current=e)}return b.current}function p(e,t={}){return f(e,t)}function m(e,t={}){return f(e,t)}},37984:function(e,t,r){"use strict";r.d(t,{F:function(){return o}});var n=r(2623),i=r(67294);function o(){let e=(0,i.useContext)(n.T);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}},73244:function(e,t,r){"use strict";r.d(t,{g:function(){return d}});var n=r(85893),i=r(65544),o=r(8297),s=r(34926),a=r(16013),l=r(49381),c=r(73035),u=r(64993);let h=["h","minH","height","minHeight"],d=(0,l.G)((e,t)=>{let r=(0,c.m)("Textarea",e),{className:l,rows:d,...f}=(0,i.L)(e),p=(0,a.Y)(f),m=d?(0,o.C)(r,h):r;return(0,n.jsx)(u.m.textarea,{ref:t,rows:d,...p,className:(0,s.cx)("chakra-textarea",l),__css:m})});d.displayName="Textarea"},82145:function(e,t,r){"use strict";r.d(t,{Lj:function(){return n},Sh:function(){return s},js:function(){return o},p$:function(){return a}});let n={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},i={slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function o(e){switch(e?.direction??"right"){case"right":default:return i.slideRight;case"left":return i.slideLeft;case"bottom":return i.slideDown;case"top":return i.slideUp}}let s={enter:{duration:.2,ease:n.easeOut},exit:{duration:.1,ease:n.easeIn}},a={enter:(e,t)=>({...e,delay:"number"==typeof t?t:t?.enter}),exit:(e,t)=>({...e,delay:"number"==typeof t?t:t?.exit})}},50232:function(e,t,r){"use strict";r.d(t,{X:function(){return c}});var n=r(85893),i=r(65544),o=r(34926),s=r(49381),a=r(73035),l=r(64993);let c=(0,s.G)(function(e,t){let r=(0,a.m)("Heading",e),{className:s,...c}=(0,i.L)(e);return(0,n.jsx)(l.m.h2,{ref:t,className:(0,o.cx)("chakra-heading",e.className),...c,__css:r})});c.displayName="Heading"},90092:function(e,t,r){"use strict";r.d(t,{x:function(){return u}});var n=r(85893),i=r(65544),o=r(87155),s=r(34926),a=r(49381),l=r(73035),c=r(64993);let u=(0,a.G)(function(e,t){let r=(0,l.m)("Text",e),{className:a,align:u,decoration:h,casing:d,...f}=(0,i.L)(e),p=(0,o.o)({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return(0,n.jsx)(c.m.p,{ref:t,className:(0,s.cx)("chakra-text",e.className),...p,...f,__css:r})});u.displayName="Text"},33829:function(e,t,r){"use strict";r.d(t,{y:function(){return h}});var n=r(79115);function i(e){return(0,n.Kn)(e)&&e.reference?e.reference:String(e)}let o=(e,...t)=>t.map(i).join(` ${e} `).replace(/calc/g,""),s=(...e)=>`calc(${o("+",...e)})`,a=(...e)=>`calc(${o("-",...e)})`,l=(...e)=>`calc(${o("*",...e)})`,c=(...e)=>`calc(${o("/",...e)})`,u=e=>{let t=i(e);return null==t||Number.isNaN(parseFloat(t))?l(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},h=Object.assign(e=>({add:(...t)=>h(s(e,...t)),subtract:(...t)=>h(a(e,...t)),multiply:(...t)=>h(l(e,...t)),divide:(...t)=>h(c(e,...t)),negate:()=>h(u(e)),toString:()=>e.toString()}),{add:s,subtract:a,multiply:l,divide:c,negate:u})},43289:function(e,t,r){"use strict";function n(e,t,r){let n=function(e,t=""){var r;return((r=function(e,t="-"){return e.replace(/\s+/g,t)}(`--${(function(e,t=""){return[t,e].filter(Boolean).join("-")})(e,t)}`.toString())).includes("\\.")?r:Number.isInteger(parseFloat(r.toString()))?r:r.replace(".","\\.")).replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(e,r);return{variable:n,reference:`var(${n}${t?`, ${t}`:""})`}}function i(e,t){let r={};for(let i of t){if(Array.isArray(i)){let[t,o]=i;r[t]=n(`${e}-${t}`,o);continue}r[i]=n(`${e}-${i}`)}return r}r.d(t,{_6:function(){return i},gJ:function(){return n}})},82203:function(e,t,r){"use strict";r.d(t,{i:function(){return h}});var n=r(2847),i=r(79115),o=r(38554),s=r(57474),a=r(35831);let l=e=>t=>{if(!t.__breakpoints)return e;let{isResponsive:r,toArrayValue:o,media:s}=t.__breakpoints,a={};for(let l in e){let c=(0,n.P)(e[l],t);if(null==c)continue;if(!Array.isArray(c=(0,i.Kn)(c)&&r(c)?o(c):c)){a[l]=c;continue}let u=c.slice(0,s.length).length;for(let e=0;e<u;e+=1){let t=s?.[e];if(!t){a[l]=c[e];continue}a[t]=a[t]||{},null!=c[e]&&(a[t][l]=c[e])}}return a},c=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!/^var\(--.+\)$/.test(t),u=(e,t)=>{if(null==t)return t;let r=t=>e.__cssMap?.[t]?.varRef,n=e=>r(e)??e,[i,o]=function(e){let t=[],r="",n=!1;for(let i=0;i<e.length;i++){let o=e[i];"("===o?(n=!0,r+=o):")"===o?(n=!1,r+=o):","!==o||n?r+=o:(t.push(r),r="")}return(r=r.trim())&&t.push(r),t}(t);return t=r(i)??n(o)??n(t)},h=e=>t=>(function(e){let{configs:t={},pseudos:r={},theme:s}=e,a=(e,h=!1)=>{let d=(0,n.P)(e,s),f=l(d)(s),p={};for(let e in f){let l=f[e],m=(0,n.P)(l,s);e in r&&(e=r[e]),c(e,m)&&(m=u(s,m));let g=t[e];if(!0===g&&(g={property:e}),(0,i.Kn)(m)){p[e]=p[e]??{},p[e]=o({},p[e],a(m,!0));continue}let y=g?.transform?.(m,s,d)??m;y=g?.processResult?a(y,!0):y;let v=(0,n.P)(g?.property,s);if(!h&&g?.static&&(p=o({},p,(0,n.P)(g.static,s))),v&&Array.isArray(v)){for(let e of v)p[e]=y;continue}if(v){"&"===v&&(0,i.Kn)(y)?p=o({},p,y):p[v]=y;continue}if((0,i.Kn)(y)){p=o({},p,y);continue}p[e]=y}return p};return a})({theme:t,pseudos:(0,s.R)(t),configs:a.Ul})(e)},83695:function(e,t,r){"use strict";function n(e){return e}function i(e){return e}function o(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}}r.d(t,{D:function(){return o},fj:function(){return i},k0:function(){return n}})},57474:function(e,t,r){"use strict";r.d(t,{R:function(){return m},T:function(){return g}});let n=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,i=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,o=(e,t)=>`${e}:focus-visible ${t}`,s=(e,t)=>`${e}:focus-within ${t}`,a=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,l=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,c=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,u=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,h=e=>f(t=>e(t,"&"),"[role=group]","[data-group]",".group"),d=e=>f(t=>e(t,"~ &"),"[data-peer]",".peer"),f=(e,...t)=>t.map(e).join(", "),p={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within, &[data-focus-within]",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty, &[data-empty]",_expanded:"&[aria-expanded=true], &[data-expanded], &[data-state=expanded]",_checked:"&[aria-checked=true], &[data-checked], &[data-state=checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate], &[data-state=indeterminate]",_groupOpen:h((e,t)=>`${e}[data-open], ${e}[open], ${e}[data-state=open] ${t}`),_groupClosed:h((e,t)=>`${e}[data-closed], ${e}[data-state=closed] ${t}`),_groupHover:h(n),_peerHover:d(n),_groupFocus:h(i),_peerFocus:d(i),_groupFocusVisible:h(o),_peerFocusVisible:d(o),_groupActive:h(a),_peerActive:d(a),_groupDisabled:h(l),_peerDisabled:d(l),_groupInvalid:h(c),_peerInvalid:d(c),_groupChecked:h(u),_peerChecked:d(u),_groupFocusWithin:h(s),_peerFocusWithin:d(s),_peerPlaceholderShown:d((e,t)=>`${e}:placeholder-shown ${t}`),_placeholder:"&::placeholder, &[data-placeholder]",_placeholderShown:"&:placeholder-shown, &[data-placeholder-shown]",_fullScreen:"&:fullscreen, &[data-fullscreen]",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]",_open:"&[data-open], &[open], &[data-state=open]",_closed:"&[data-closed], &[data-state=closed]",_complete:"&[data-complete]",_incomplete:"&[data-incomplete]",_current:"&[data-current]"};function m(e){let t=Object.fromEntries(Object.entries(e.conditions??{}).map(([e,t])=>[`_${e}`,t]));return{...p,...t}}function g(e){return Object.keys(m(e))}},35831:function(e,t,r){"use strict";r.d(t,{bB:function(){return K},O0:function(){return Q},oE:function(){return G},Ul:function(){return H}});var n=r(38554),i=r(57474),o=r(79115);let s=e=>/!(important)?$/.test(e),a=e=>"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,l=(e,t)=>r=>{let n=String(t),i=s(n),l=a(n),c=e?`${e}.${l}`:l,u=(0,o.Kn)(r.__cssMap)&&c in r.__cssMap?r.__cssMap[c].varRef:t;return u=a(u),i?`${u} !important`:u};function c(e){let{scale:t,transform:r,compose:n}=e;return(e,i)=>{let o=l(t,e)(i),s=r?.(o,i)??o;return n&&(s=n(s,i)),s}}let u=(...e)=>t=>e.reduce((e,t)=>t(e),t);function h(e,t){return r=>{let n={property:r,scale:e};return n.transform=c({scale:e,transform:t}),n}}let d=({rtl:e,ltr:t})=>r=>"rtl"===r.direction?e:t,f=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],p={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:"var(--chakra-blur) var(--chakra-brightness) var(--chakra-contrast) var(--chakra-grayscale) var(--chakra-hue-rotate) var(--chakra-invert) var(--chakra-saturate) var(--chakra-sepia) var(--chakra-drop-shadow)"},m={backdropFilter:"var(--chakra-backdrop-blur) var(--chakra-backdrop-brightness) var(--chakra-backdrop-contrast) var(--chakra-backdrop-grayscale) var(--chakra-backdrop-hue-rotate) var(--chakra-backdrop-invert) var(--chakra-backdrop-opacity) var(--chakra-backdrop-saturate) var(--chakra-backdrop-sepia)","--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},g={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},y={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},v=new Set(Object.values(y)),b=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),w=e=>e.trim(),_=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),x=e=>{let t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},k=e=>t=>`${e}(${t})`,S={filter:e=>"auto"!==e?e:p,backdropFilter:e=>"auto"!==e?e:m,ring:e=>({"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":S.px(e),boxShadow:"var(--chakra-ring-offset-shadow), var(--chakra-ring-shadow), var(--chakra-shadow, 0 0 #0000)"}),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...f].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...f].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;let{unitless:t}=x(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:`${100*e}%`,float:(e,t)=>"rtl"===t.direction?({left:"right",right:"left"})[e]:e,degree(e){if(/^var\(--.+\)$/.test(e)||null==e)return e;let t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>(function(e,t){if(null==e||b.has(e))return e;if(!(_(e)||b.has(e)))return`url('${e}')`;let r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),n=r?.[1],i=r?.[2];if(!n||!i)return e;let o=n.includes("-gradient")?n:`${n}-gradient`,[s,...a]=i.split(",").map(w).filter(Boolean);if(a?.length===0)return e;let l=s in y?y[s]:s;a.unshift(l);let c=a.map(e=>{if(v.has(e))return e;let r=e.indexOf(" "),[n,i]=-1!==r?[e.substr(0,r),e.substr(r+1)]:[e],o=_(i)?i:i&&i.split(" "),s=`colors.${n}`,a=s in t.__cssMap?t.__cssMap[s].varRef:n;return o?[a,...Array.isArray(o)?o:[o]].join(" "):a});return`${o}(${c.join(", ")})`})(e,t??{}),blur:k("blur"),opacity:k("opacity"),brightness:k("brightness"),contrast:k("contrast"),dropShadow:k("drop-shadow"),grayscale:k("grayscale"),hueRotate:e=>k("hue-rotate")(S.degree(e)),invert:k("invert"),saturate:k("saturate"),sepia:k("sepia"),bgImage:e=>null==e?e:_(e)||b.has(e)?e:`url(${e})`,outline(e){let t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){let{space:t,divide:r}=g[e]??{},n={flexDirection:e};return t&&(n[t]=1),r&&(n[r]=1),n}},E={borderWidths:h("borderWidths"),borderStyles:h("borderStyles"),colors:h("colors"),borders:h("borders"),gradients:h("gradients",S.gradient),radii:h("radii",S.px),space:h("space",u(S.vh,S.px)),spaceT:h("space",u(S.vh,S.px)),degreeT:e=>({property:e,transform:S.degree}),prop:(e,t,r)=>({property:e,scale:t,...t&&{transform:c({scale:t,transform:r})}}),propT:(e,t)=>({property:e,transform:t}),sizes:h("sizes",u(S.vh,S.px)),sizesT:h("sizes",u(S.vh,S.fraction)),shadows:h("shadows"),logical:function(e){let{property:t,scale:r,transform:n}=e;return{scale:r,property:d(t),transform:r?c({scale:r,compose:n}):n}},blur:h("blur",S.blur)},T={background:E.colors("background"),backgroundColor:E.colors("backgroundColor"),backgroundImage:E.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:S.bgClip},bgSize:E.prop("backgroundSize"),bgPosition:E.prop("backgroundPosition"),bg:E.colors("background"),bgColor:E.colors("backgroundColor"),bgPos:E.prop("backgroundPosition"),bgRepeat:E.prop("backgroundRepeat"),bgAttachment:E.prop("backgroundAttachment"),bgGradient:E.gradients("backgroundImage"),bgClip:{transform:S.bgClip}};Object.assign(T,{bgImage:T.backgroundImage,bgImg:T.backgroundImage});let C={border:E.borders("border"),borderWidth:E.borderWidths("borderWidth"),borderStyle:E.borderStyles("borderStyle"),borderColor:E.colors("borderColor"),borderRadius:E.radii("borderRadius"),borderTop:E.borders("borderTop"),borderBlockStart:E.borders("borderBlockStart"),borderTopLeftRadius:E.radii("borderTopLeftRadius"),borderStartStartRadius:E.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:E.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:E.radii("borderTopRightRadius"),borderStartEndRadius:E.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:E.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:E.borders("borderRight"),borderInlineEnd:E.borders("borderInlineEnd"),borderBottom:E.borders("borderBottom"),borderBlockEnd:E.borders("borderBlockEnd"),borderBottomLeftRadius:E.radii("borderBottomLeftRadius"),borderBottomRightRadius:E.radii("borderBottomRightRadius"),borderLeft:E.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:E.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:E.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:E.borders(["borderLeft","borderRight"]),borderInline:E.borders("borderInline"),borderY:E.borders(["borderTop","borderBottom"]),borderBlock:E.borders("borderBlock"),borderTopWidth:E.borderWidths("borderTopWidth"),borderBlockStartWidth:E.borderWidths("borderBlockStartWidth"),borderTopColor:E.colors("borderTopColor"),borderBlockStartColor:E.colors("borderBlockStartColor"),borderTopStyle:E.borderStyles("borderTopStyle"),borderBlockStartStyle:E.borderStyles("borderBlockStartStyle"),borderBottomWidth:E.borderWidths("borderBottomWidth"),borderBlockEndWidth:E.borderWidths("borderBlockEndWidth"),borderBottomColor:E.colors("borderBottomColor"),borderBlockEndColor:E.colors("borderBlockEndColor"),borderBottomStyle:E.borderStyles("borderBottomStyle"),borderBlockEndStyle:E.borderStyles("borderBlockEndStyle"),borderLeftWidth:E.borderWidths("borderLeftWidth"),borderInlineStartWidth:E.borderWidths("borderInlineStartWidth"),borderLeftColor:E.colors("borderLeftColor"),borderInlineStartColor:E.colors("borderInlineStartColor"),borderLeftStyle:E.borderStyles("borderLeftStyle"),borderInlineStartStyle:E.borderStyles("borderInlineStartStyle"),borderRightWidth:E.borderWidths("borderRightWidth"),borderInlineEndWidth:E.borderWidths("borderInlineEndWidth"),borderRightColor:E.colors("borderRightColor"),borderInlineEndColor:E.colors("borderInlineEndColor"),borderRightStyle:E.borderStyles("borderRightStyle"),borderInlineEndStyle:E.borderStyles("borderInlineEndStyle"),borderTopRadius:E.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:E.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:E.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:E.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(C,{rounded:C.borderRadius,roundedTop:C.borderTopRadius,roundedTopLeft:C.borderTopLeftRadius,roundedTopRight:C.borderTopRightRadius,roundedTopStart:C.borderStartStartRadius,roundedTopEnd:C.borderStartEndRadius,roundedBottom:C.borderBottomRadius,roundedBottomLeft:C.borderBottomLeftRadius,roundedBottomRight:C.borderBottomRightRadius,roundedBottomStart:C.borderEndStartRadius,roundedBottomEnd:C.borderEndEndRadius,roundedLeft:C.borderLeftRadius,roundedRight:C.borderRightRadius,roundedStart:C.borderInlineStartRadius,roundedEnd:C.borderInlineEndRadius,borderStart:C.borderInlineStart,borderEnd:C.borderInlineEnd,borderTopStartRadius:C.borderStartStartRadius,borderTopEndRadius:C.borderStartEndRadius,borderBottomStartRadius:C.borderEndStartRadius,borderBottomEndRadius:C.borderEndEndRadius,borderStartRadius:C.borderInlineStartRadius,borderEndRadius:C.borderInlineEndRadius,borderStartWidth:C.borderInlineStartWidth,borderEndWidth:C.borderInlineEndWidth,borderStartColor:C.borderInlineStartColor,borderEndColor:C.borderInlineEndColor,borderStartStyle:C.borderInlineStartStyle,borderEndStyle:C.borderInlineEndStyle});let I={color:E.colors("color"),textColor:E.colors("color"),fill:E.colors("fill"),stroke:E.colors("stroke"),accentColor:E.colors("accentColor"),textFillColor:E.colors("textFillColor")},P={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:S.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:E.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:E.space("gap"),rowGap:E.space("rowGap"),columnGap:E.space("columnGap")};Object.assign(P,{flexDir:P.flexDirection});let A={width:E.sizesT("width"),inlineSize:E.sizesT("inlineSize"),height:E.sizes("height"),blockSize:E.sizes("blockSize"),boxSize:E.sizes(["width","height"]),minWidth:E.sizes("minWidth"),minInlineSize:E.sizes("minInlineSize"),minHeight:E.sizes("minHeight"),minBlockSize:E.sizes("minBlockSize"),maxWidth:E.sizes("maxWidth"),maxInlineSize:E.sizes("maxInlineSize"),maxHeight:E.sizes("maxHeight"),maxBlockSize:E.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{let r=t.__breakpoints?.get(e)?.minW??e;return{[`@media screen and (min-width: ${r})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{let r=t.__breakpoints?.get(e)?._minW??e;return{[`@media screen and (max-width: ${r})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:E.propT("float",S.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(A,{w:A.width,h:A.height,minW:A.minWidth,maxW:A.maxWidth,minH:A.minHeight,maxH:A.maxHeight,overscroll:A.overscrollBehavior,overscrollX:A.overscrollBehaviorX,overscrollY:A.overscrollBehaviorY});let O={filter:{transform:S.filter},blur:E.blur("--chakra-blur"),brightness:E.propT("--chakra-brightness",S.brightness),contrast:E.propT("--chakra-contrast",S.contrast),hueRotate:E.propT("--chakra-hue-rotate",S.hueRotate),invert:E.propT("--chakra-invert",S.invert),saturate:E.propT("--chakra-saturate",S.saturate),dropShadow:E.propT("--chakra-drop-shadow",S.dropShadow),backdropFilter:{transform:S.backdropFilter},backdropBlur:E.blur("--chakra-backdrop-blur"),backdropBrightness:E.propT("--chakra-backdrop-brightness",S.brightness),backdropContrast:E.propT("--chakra-backdrop-contrast",S.contrast),backdropHueRotate:E.propT("--chakra-backdrop-hue-rotate",S.hueRotate),backdropInvert:E.propT("--chakra-backdrop-invert",S.invert),backdropSaturate:E.propT("--chakra-backdrop-saturate",S.saturate)},R={ring:{transform:S.ring},ringColor:E.colors("--chakra-ring-color"),ringOffset:E.prop("--chakra-ring-offset-width"),ringOffsetColor:E.colors("--chakra-ring-offset-color"),ringInset:E.prop("--chakra-ring-inset")},N={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:S.outline},outlineOffset:!0,outlineColor:E.colors("outlineColor")},j={gridGap:E.space("gridGap"),gridColumnGap:E.space("gridColumnGap"),gridRowGap:E.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},D=(e=>{let t=new WeakMap;return(r,n,i,o)=>{if(void 0===r)return e(r,n,i);t.has(r)||t.set(r,new Map);let s=t.get(r);if(s.has(n))return s.get(n);let a=e(r,n,i,o);return s.set(n,a),a}})(function(e,t,r,n){let i="string"==typeof t?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return void 0===e?r:e}),M={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},L={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},F=(e,t,r)=>{let n={},i=D(e,t,{});for(let e in i)e in r&&null!=r[e]||(n[e]=i[e]);return n},z={position:!0,pos:E.prop("position"),zIndex:E.prop("zIndex","zIndices"),inset:E.spaceT("inset"),insetX:E.spaceT(["left","right"]),insetInline:E.spaceT("insetInline"),insetY:E.spaceT(["top","bottom"]),insetBlock:E.spaceT("insetBlock"),top:E.spaceT("top"),insetBlockStart:E.spaceT("insetBlockStart"),bottom:E.spaceT("bottom"),insetBlockEnd:E.spaceT("insetBlockEnd"),left:E.spaceT("left"),insetInlineStart:E.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:E.spaceT("right"),insetInlineEnd:E.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(z,{insetStart:z.insetInlineStart,insetEnd:z.insetInlineEnd});let U={boxShadow:E.shadows("boxShadow"),mixBlendMode:!0,blendMode:E.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:E.prop("backgroundBlendMode"),opacity:!0};Object.assign(U,{shadow:U.boxShadow});let B={margin:E.spaceT("margin"),marginTop:E.spaceT("marginTop"),marginBlockStart:E.spaceT("marginBlockStart"),marginRight:E.spaceT("marginRight"),marginInlineEnd:E.spaceT("marginInlineEnd"),marginBottom:E.spaceT("marginBottom"),marginBlockEnd:E.spaceT("marginBlockEnd"),marginLeft:E.spaceT("marginLeft"),marginInlineStart:E.spaceT("marginInlineStart"),marginX:E.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:E.spaceT("marginInline"),marginY:E.spaceT(["marginTop","marginBottom"]),marginBlock:E.spaceT("marginBlock"),padding:E.space("padding"),paddingTop:E.space("paddingTop"),paddingBlockStart:E.space("paddingBlockStart"),paddingRight:E.space("paddingRight"),paddingBottom:E.space("paddingBottom"),paddingBlockEnd:E.space("paddingBlockEnd"),paddingLeft:E.space("paddingLeft"),paddingInlineStart:E.space("paddingInlineStart"),paddingInlineEnd:E.space("paddingInlineEnd"),paddingX:E.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:E.space("paddingInline"),paddingY:E.space(["paddingTop","paddingBottom"]),paddingBlock:E.space("paddingBlock")};Object.assign(B,{m:B.margin,mt:B.marginTop,mr:B.marginRight,me:B.marginInlineEnd,marginEnd:B.marginInlineEnd,mb:B.marginBottom,ml:B.marginLeft,ms:B.marginInlineStart,marginStart:B.marginInlineStart,mx:B.marginX,my:B.marginY,p:B.padding,pt:B.paddingTop,py:B.paddingY,px:B.paddingX,pb:B.paddingBottom,pl:B.paddingLeft,ps:B.paddingInlineStart,paddingStart:B.paddingInlineStart,pr:B.paddingRight,pe:B.paddingInlineEnd,paddingEnd:B.paddingInlineEnd});let V={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:E.spaceT("scrollMargin"),scrollMarginTop:E.spaceT("scrollMarginTop"),scrollMarginBottom:E.spaceT("scrollMarginBottom"),scrollMarginLeft:E.spaceT("scrollMarginLeft"),scrollMarginRight:E.spaceT("scrollMarginRight"),scrollMarginX:E.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:E.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:E.spaceT("scrollPadding"),scrollPaddingTop:E.spaceT("scrollPaddingTop"),scrollPaddingBottom:E.spaceT("scrollPaddingBottom"),scrollPaddingLeft:E.spaceT("scrollPaddingLeft"),scrollPaddingRight:E.spaceT("scrollPaddingRight"),scrollPaddingX:E.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:E.spaceT(["scrollPaddingTop","scrollPaddingBottom"])},q={fontFamily:E.prop("fontFamily","fonts"),fontSize:E.prop("fontSize","fontSizes",S.px),fontWeight:E.prop("fontWeight","fontWeights"),lineHeight:E.prop("lineHeight","lineHeights"),letterSpacing:E.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},$={textDecorationColor:E.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:E.shadows("textShadow")},W={clipPath:!0,transform:E.propT("transform",S.transform),transformOrigin:!0,translateX:E.spaceT("--chakra-translate-x"),translateY:E.spaceT("--chakra-translate-y"),skewX:E.degreeT("--chakra-skew-x"),skewY:E.degreeT("--chakra-skew-y"),scaleX:E.prop("--chakra-scale-x"),scaleY:E.prop("--chakra-scale-y"),scale:E.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:E.degreeT("--chakra-rotate")},H=n({},T,C,I,P,A,O,R,N,j,{srOnly:{transform:e=>!0===e?M:"focusable"===e?L:{}},layerStyle:{processResult:!0,transform:(e,t,r)=>F(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>F(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>F(t,e,r)}},z,U,B,V,q,$,W,{listStyleType:!0,listStylePosition:!0,listStylePos:E.prop("listStylePosition"),listStyleImage:!0,listStyleImg:E.prop("listStyleImage")},{transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:E.prop("transitionDuration","transition.duration"),transitionProperty:E.prop("transitionProperty","transition.property"),transitionTimingFunction:E.prop("transitionTimingFunction","transition.easing")}),G=Object.keys(Object.assign({},B,A,P,j,z)),K=e=>[...Object.keys(H),...(0,i.T)(e)],Q=e=>{let t=(0,i.R)(e),r={...H,...t};return e=>Object.hasOwnProperty.call(r,e)}},65544:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(8297);function i(e){return(0,n.C)(e,["styleConfig","size","variant","colorScheme"])}},1209:function(e,t,r){"use strict";function n(e,t={}){let r=!1;function i(t){let r=(["container","root"].includes(t??"")?[e]:[e,t]).filter(Boolean).join("__"),n=`chakra-${r}`;return{className:n,selector:`.${n}`,toString:()=>t}}return{parts:function(...o){for(let e of(!function(){if(!r){r=!0;return}throw Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}(),o))t[e]=i(e);return n(e,t)},toPart:i,extend:function(...r){for(let e of r)e in t||(t[e]=i(e));return n(e,t)},selectors:function(){return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.selector]))},classnames:function(){return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.className]))},get keys(){return Object.keys(t)},__type:{}}}r.d(t,{wE:function(){return iZ},rS:function(){return iJ}});let i=n("accordion").parts("root","container","button","panel","icon"),o=n("alert").parts("title","description","container","icon","spinner"),s=n("avatar").parts("label","badge","container","excessLabel","group"),a=n("breadcrumb").parts("link","item","container","separator");n("button").parts();let l=n("checkbox").parts("control","icon","container","label");n("progress").parts("track","filledTrack","label");let c=n("drawer").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),u=n("editable").parts("preview","input","textarea"),h=n("form").parts("container","requiredIndicator","helperText"),d=n("formError").parts("text","icon"),f=n("input").parts("addon","field","element","group"),p=n("list").parts("container","item","icon"),m=n("menu").parts("button","list","item","groupTitle","icon","command","divider"),g=n("modal").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),y=n("numberinput").parts("root","field","stepperGroup","stepper");n("pininput").parts("field");let v=n("popover").parts("content","header","body","footer","popper","arrow","closeButton"),b=n("progress").parts("label","filledTrack","track"),w=n("radio").parts("container","control","label"),_=n("select").parts("field","icon"),x=n("slider").parts("container","track","thumb","filledTrack","mark"),k=n("stat").parts("container","label","helpText","number","icon"),S=n("switch").parts("container","track","thumb","label"),E=n("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),T=n("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),C=n("tag").parts("container","label","closeButton"),I=n("card").parts("container","header","body","footer");n("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");var P=r(83695);let{definePartsStyle:A,defineMultiStyleConfig:O}=(0,P.D)(i.keys),R=(0,P.k0)({borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}}),N=O({baseStyle:A({container:R,button:(0,P.k0)({transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"}),panel:(0,P.k0)({pt:"2",px:"4",pb:"5"}),icon:(0,P.k0)({fontSize:"1.25em"})})});var j=r(43289);function D(e,t,r){return Math.min(Math.max(e,r),t)}class M extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}function L(e){if("string"!=typeof e)throw new M(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=W.test(e)?function(e){let t=z[function(e){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);return(t>>>0)%2341}(e.toLowerCase().trim())];if(!t)throw new M(e);return`#${t}`}(e):e;let r=B.exec(t);if(r){let e=Array.from(r).slice(1);return[...e.slice(0,3).map(e=>parseInt(U(e,2),16)),parseInt(U(e[3]||"f",2),16)/255]}let n=V.exec(t);if(n){let e=Array.from(n).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,16)),parseInt(e[3]||"ff",16)/255]}let i=q.exec(t);if(i){let e=Array.from(i).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,10)),parseFloat(e[3]||"1")]}let o=$.exec(t);if(o){let[t,r,n,i]=Array.from(o).slice(1).map(parseFloat);if(D(0,100,r)!==r||D(0,100,n)!==n)throw new M(e);return[...G(t,r,n),Number.isNaN(i)?1:i]}throw new M(e)}let F=e=>parseInt(e.replace(/_/g,""),36),z="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{let r=F(t.substring(0,3)),n=F(t.substring(3)).toString(16),i="";for(let e=0;e<6-n.length;e++)i+="0";return e[r]=`${i}${n}`,e},{}),U=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),B=RegExp(`^#${U("([a-f0-9])",3)}([a-f0-9])?$`,"i"),V=RegExp(`^#${U("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),q=RegExp(`^rgba?\\(\\s*(\\d+)\\s*${U(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),$=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,W=/^[a-z]+$/i,H=e=>Math.round(255*e),G=(e,t,r)=>{let n=r/100;if(0===t)return[n,n,n].map(H);let i=(e%360+360)%360/60,o=t/100*(1-Math.abs(2*n-1)),s=o*(1-Math.abs(i%2-1)),a=0,l=0,c=0;i>=0&&i<1?(a=o,l=s):i>=1&&i<2?(a=s,l=o):i>=2&&i<3?(l=o,c=s):i>=3&&i<4?(l=s,c=o):i>=4&&i<5?(a=s,c=o):i>=5&&i<6&&(a=o,c=s);let u=n-o/2;return[a+u,l+u,c+u].map(H)},K=e=>0===Object.keys(e).length,Q=(e,t,r)=>{let n=function(e,t,r,n,i){for(n=0,t=t.split?t.split("."):t;n<t.length;n++)e=e?e[t[n]]:void 0;return void 0===e?r:e}(e,`colors.${t}`,t);try{return!function(e){let[t,r,n,i]=L(e),o=e=>{let t=D(0,255,e).toString(16);return 1===t.length?`0${t}`:t};o(t),o(r),o(n),i<1&&o(Math.round(255*i))}(n),n}catch{return r??"#000000"}},Y=e=>{let[t,r,n]=L(e);return(299*t+587*r+114*n)/1e3},X=e=>t=>128>Y(Q(t,e))?"dark":"light",J=e=>t=>"dark"===X(e)(t),Z=(e,t)=>r=>(function(e,t){var r;let[n,i,o,s]=L(e);return r=s-t,`rgba(${D(0,255,n).toFixed()}, ${D(0,255,i).toFixed()}, ${D(0,255,o).toFixed()}, ${parseFloat(D(0,1,r).toFixed(3))})`})(Q(r,e),1-t);function ee(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
    45deg,
    ${t} 25%,
    transparent 25%,
    transparent 50%,
    ${t} 50%,
    ${t} 75%,
    transparent 75%,
    transparent
  )`,backgroundSize:`${e} ${e}`}}let et=()=>`#${Math.floor(16777215*Math.random()).toString(16).padEnd(6,"0")}`,{definePartsStyle:er,defineMultiStyleConfig:en}=(0,P.D)(o.keys),ei=(0,j.gJ)("alert-fg"),eo=(0,j.gJ)("alert-bg"),es=er({container:{bg:eo.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ei.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ei.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function ea(e){let{theme:t,colorScheme:r}=e,n=Z(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}let el=er(e=>{let{colorScheme:t}=e,r=ea(e);return{container:{[ei.variable]:`colors.${t}.600`,[eo.variable]:r.light,_dark:{[ei.variable]:`colors.${t}.200`,[eo.variable]:r.dark}}}}),ec=er(e=>{let{colorScheme:t}=e,r=ea(e);return{container:{[ei.variable]:`colors.${t}.600`,[eo.variable]:r.light,_dark:{[ei.variable]:`colors.${t}.200`,[eo.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ei.reference}}}),eu=en({baseStyle:es,variants:{subtle:el,"left-accent":ec,"top-accent":er(e=>{let{colorScheme:t}=e,r=ea(e);return{container:{[ei.variable]:`colors.${t}.600`,[eo.variable]:r.light,_dark:{[ei.variable]:`colors.${t}.200`,[eo.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ei.reference}}}),solid:er(e=>{let{colorScheme:t}=e;return{container:{[ei.variable]:"colors.white",[eo.variable]:`colors.${t}.600`,_dark:{[ei.variable]:"colors.gray.900",[eo.variable]:`colors.${t}.200`},color:ei.reference}}})},defaultProps:{variant:"subtle",colorScheme:"blue"}}),eh={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},ed={...eh,max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch",container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}},ef=e=>"function"==typeof e;function ep(e,...t){return ef(e)?e(...t):e}let{definePartsStyle:em,defineMultiStyleConfig:eg}=(0,P.D)(s.keys),ey=(0,j.gJ)("avatar-border-color"),ev=(0,j.gJ)("avatar-bg"),eb=(0,j.gJ)("avatar-font-size"),ew=(0,j.gJ)("avatar-size"),e_=(0,P.k0)({borderRadius:"full",border:"0.2em solid",borderColor:ey.reference,[ey.variable]:"white",_dark:{[ey.variable]:"colors.gray.800"}}),ex=(0,P.k0)({bg:ev.reference,fontSize:eb.reference,width:ew.reference,height:ew.reference,lineHeight:"1",[ev.variable]:"colors.gray.200",_dark:{[ev.variable]:"colors.whiteAlpha.400"}}),ek=(0,P.k0)(e=>{let{name:t,theme:r}=e,n=t?function(e){var t;let r=et();return!e||K(e)?r:e.string&&e.colors?function(e,t){let r=0;if(0===e.length)return t[0];for(let t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r),r&=r;return r=(r%t.length+t.length)%t.length,t[r]}(e.string,e.colors):e.string&&!e.colors?function(e){let t=0;if(0===e.length)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t&=t;let r="#";for(let e=0;e<3;e+=1){let n=t>>8*e&255;r+=`00${n.toString(16)}`.substr(-2)}return r}(e.string):e.colors&&!e.string?(t=e.colors)[Math.floor(Math.random()*t.length)]:r}({string:t}):"colors.gray.400",i=J(n)(r),o="white";return i||(o="gray.800"),{bg:ev.reference,fontSize:eb.reference,color:o,borderColor:ey.reference,verticalAlign:"top",width:ew.reference,height:ew.reference,"&:not([data-loaded])":{[ev.variable]:n},[ey.variable]:"colors.white",_dark:{[ey.variable]:"colors.gray.800"}}}),eS=(0,P.k0)({fontSize:eb.reference,lineHeight:"1"});function eE(e){let t="100%"!==e?ed[e]:void 0;return em({container:{[ew.variable]:t??e,[eb.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[ew.variable]:t??e,[eb.variable]:`calc(${t??e} / 2.5)`}})}let eT=eg({baseStyle:em(e=>({badge:ep(e_,e),excessLabel:ep(ex,e),container:ep(ek,e),label:eS})),sizes:{"2xs":eE(4),xs:eE(6),sm:eE(8),md:eE(12),lg:eE(16),xl:eE(24),"2xl":eE(32),full:eE("100%")},defaultProps:{size:"md"}}),eC=(0,j._6)("badge",["bg","color","shadow"]),eI=(0,P.k0)({px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:eC.bg.reference,color:eC.color.reference,boxShadow:eC.shadow.reference}),eP=(0,P.k0)(e=>{let{colorScheme:t,theme:r}=e,n=Z(`${t}.500`,.6)(r);return{[eC.bg.variable]:`colors.${t}.500`,[eC.color.variable]:"colors.white",_dark:{[eC.bg.variable]:n,[eC.color.variable]:"colors.whiteAlpha.800"}}}),eA=(0,P.k0)(e=>{let{colorScheme:t,theme:r}=e,n=Z(`${t}.200`,.16)(r);return{[eC.bg.variable]:`colors.${t}.100`,[eC.color.variable]:`colors.${t}.800`,_dark:{[eC.bg.variable]:n,[eC.color.variable]:`colors.${t}.200`}}}),eO=(0,P.k0)(e=>{let{colorScheme:t,theme:r}=e,n=Z(`${t}.200`,.8)(r);return{[eC.color.variable]:`colors.${t}.500`,_dark:{[eC.color.variable]:n},[eC.shadow.variable]:`inset 0 0 0px 1px ${eC.color.reference}`}}),eR=(0,P.fj)({baseStyle:eI,variants:{solid:eP,subtle:eA,outline:eO},defaultProps:{variant:"subtle",colorScheme:"gray"}}),{defineMultiStyleConfig:eN,definePartsStyle:ej}=(0,P.D)(a.keys),eD=(0,j.gJ)("breadcrumb-link-decor"),eM=eN({baseStyle:ej({link:(0,P.k0)({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:eD.reference,[eD.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[eD.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}})})});function eL(e,t){return r=>"dark"===r.colorMode?t:e}function eF(e){let{orientation:t,vertical:r,horizontal:n}=e;return t?"vertical"===t?r:n:{}}let ez=(0,P.k0)({lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}}),eU=(0,P.k0)(e=>{let{colorScheme:t,theme:r}=e;if("gray"===t)return{color:eL("gray.800","whiteAlpha.900")(e),_hover:{bg:eL("gray.100","whiteAlpha.200")(e)},_active:{bg:eL("gray.200","whiteAlpha.300")(e)}};let n=Z(`${t}.200`,.12)(r),i=Z(`${t}.200`,.24)(r);return{color:eL(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:eL(`${t}.50`,n)(e)},_active:{bg:eL(`${t}.100`,i)(e)}}}),eB=(0,P.k0)(e=>{let{colorScheme:t}=e,r=eL("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:"gray"===t?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...ep(eU,e)}}),eV={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},eq=(0,P.k0)(e=>{let{colorScheme:t}=e;if("gray"===t){let t=eL("gray.100","whiteAlpha.200")(e);return{bg:t,color:eL("gray.800","whiteAlpha.900")(e),_hover:{bg:eL("gray.200","whiteAlpha.300")(e),_disabled:{bg:t}},_active:{bg:eL("gray.300","whiteAlpha.400")(e)}}}let{bg:r=`${t}.500`,color:n="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=eV[t]??{},s=eL(r,`${t}.200`)(e);return{bg:s,color:eL(n,"gray.800")(e),_hover:{bg:eL(i,`${t}.300`)(e),_disabled:{bg:s}},_active:{bg:eL(o,`${t}.400`)(e)}}}),e$=(0,P.k0)(e=>{let{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:eL(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:eL(`${t}.700`,`${t}.500`)(e)}}}),eW=(0,P.k0)({bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}),eH={lg:(0,P.k0)({h:"12",minW:"12",fontSize:"lg",px:"6"}),md:(0,P.k0)({h:"10",minW:"10",fontSize:"md",px:"4"}),sm:(0,P.k0)({h:"8",minW:"8",fontSize:"sm",px:"3"}),xs:(0,P.k0)({h:"6",minW:"6",fontSize:"xs",px:"2"})},eG=(0,P.fj)({baseStyle:ez,variants:{ghost:eU,outline:eB,solid:eq,link:e$,unstyled:eW},sizes:eH,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}}),{definePartsStyle:eK,defineMultiStyleConfig:eQ}=(0,P.D)(I.keys),eY=(0,j.gJ)("card-bg"),eX=(0,j.gJ)("card-padding"),eJ=(0,j.gJ)("card-shadow"),eZ=(0,j.gJ)("card-radius"),e0=(0,j.gJ)("card-border-width","0"),e1=(0,j.gJ)("card-border-color"),e2=eK({container:{[eY.variable]:"colors.chakra-body-bg",backgroundColor:eY.reference,boxShadow:eJ.reference,borderRadius:eZ.reference,color:"chakra-body-text",borderWidth:e0.reference,borderColor:e1.reference},body:{padding:eX.reference,flex:"1 1 0%"},header:{padding:eX.reference},footer:{padding:eX.reference}}),e4={sm:eK({container:{[eZ.variable]:"radii.base",[eX.variable]:"space.3"}}),md:eK({container:{[eZ.variable]:"radii.md",[eX.variable]:"space.5"}}),lg:eK({container:{[eZ.variable]:"radii.xl",[eX.variable]:"space.7"}})},e5=eQ({baseStyle:e2,variants:{elevated:eK({container:{[eJ.variable]:"shadows.base",_dark:{[eY.variable]:"colors.gray.700"}}}),outline:eK({container:{[e0.variable]:"1px",[e1.variable]:"colors.chakra-border-color"}}),filled:eK({container:{[eY.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[eX.variable]:0},header:{[eX.variable]:0},footer:{[eX.variable]:0}}},sizes:e4,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:e6,defineMultiStyleConfig:e3}=(0,P.D)(l.keys),e9=(0,j.gJ)("checkbox-size"),e8=(0,P.k0)(e=>{let{colorScheme:t}=e;return{w:e9.reference,h:e9.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:eL(`${t}.500`,`${t}.200`)(e),borderColor:eL(`${t}.500`,`${t}.200`)(e),color:eL("white","gray.900")(e),_hover:{bg:eL(`${t}.600`,`${t}.300`)(e),borderColor:eL(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:eL("gray.200","transparent")(e),bg:eL("gray.200","whiteAlpha.300")(e),color:eL("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:eL(`${t}.500`,`${t}.200`)(e),borderColor:eL(`${t}.500`,`${t}.200`)(e),color:eL("white","gray.900")(e)},_disabled:{bg:eL("gray.100","whiteAlpha.100")(e),borderColor:eL("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:eL("red.500","red.300")(e)}}}),e7=(0,P.k0)({_disabled:{cursor:"not-allowed"}}),te=(0,P.k0)({userSelect:"none",_disabled:{opacity:.4}}),tt=(0,P.k0)({transitionProperty:"transform",transitionDuration:"normal"}),tr=e3({baseStyle:e6(e=>({icon:tt,container:e7,control:ep(e8,e),label:te})),sizes:{sm:e6({control:{[e9.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:e6({control:{[e9.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:e6({control:{[e9.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},defaultProps:{size:"md",colorScheme:"blue"}});function tn(e){let t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:Number.isInteger(parseFloat(e.toString()))?e:t.replace(".","\\.")}function ti(e,t){var r,n;let i=function(e,t=""){return`--${function(e,t=""){return[t,tn(e)].filter(Boolean).join("-")}(e,t)}`}(e,t?.prefix);return{variable:i,reference:(r="string"==typeof(n=t?.fallback)?n:n?.reference,`var(${tn(i)}${r?`, ${r}`:""})`)}}let to=ti("close-button-size"),ts=ti("close-button-bg"),ta=(0,P.k0)({w:[to.reference],h:[to.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[ts.variable]:"colors.blackAlpha.100",_dark:{[ts.variable]:"colors.whiteAlpha.100"}},_active:{[ts.variable]:"colors.blackAlpha.200",_dark:{[ts.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:ts.reference}),tl={lg:(0,P.k0)({[to.variable]:"sizes.10",fontSize:"md"}),md:(0,P.k0)({[to.variable]:"sizes.8",fontSize:"xs"}),sm:(0,P.k0)({[to.variable]:"sizes.6",fontSize:"2xs"})},tc=(0,P.fj)({baseStyle:ta,sizes:tl,defaultProps:{size:"md"}}),{variants:tu,defaultProps:th}=eR,td=(0,P.k0)({fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:eC.bg.reference,color:eC.color.reference,boxShadow:eC.shadow.reference}),tf=(0,P.fj)({baseStyle:td,variants:tu,defaultProps:th}),tp=(0,P.k0)({w:"100%",mx:"auto",maxW:"prose",px:"4"}),tm=(0,P.fj)({baseStyle:tp}),tg=(0,P.k0)({opacity:.6,borderColor:"inherit"}),ty=(0,P.k0)({borderStyle:"solid"}),tv=(0,P.k0)({borderStyle:"dashed"}),tb=(0,P.fj)({baseStyle:tg,variants:{solid:ty,dashed:tv},defaultProps:{variant:"solid"}}),{definePartsStyle:tw,defineMultiStyleConfig:t_}=(0,P.D)(c.keys),tx=(0,j.gJ)("drawer-bg"),tk=(0,j.gJ)("drawer-box-shadow");function tS(e){return"full"===e?tw({dialog:{maxW:"100vw",h:"100vh"}}):tw({dialog:{maxW:e}})}let tE=(0,P.k0)({bg:"blackAlpha.600",zIndex:"modal"}),tT=(0,P.k0)({display:"flex",zIndex:"modal",justifyContent:"center"}),tC=(0,P.k0)(e=>{let{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[tx.variable]:"colors.white",[tk.variable]:"shadows.lg",_dark:{[tx.variable]:"colors.gray.700",[tk.variable]:"shadows.dark-lg"},bg:tx.reference,boxShadow:tk.reference}}),tI=(0,P.k0)({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),tP=(0,P.k0)({position:"absolute",top:"2",insetEnd:"3"}),tA=(0,P.k0)({px:"6",py:"2",flex:"1",overflow:"auto"}),tO=(0,P.k0)({px:"6",py:"4"}),tR=t_({baseStyle:tw(e=>({overlay:tE,dialogContainer:tT,dialog:ep(tC,e),header:tI,closeButton:tP,body:tA,footer:tO})),sizes:{xs:tS("xs"),sm:tS("md"),md:tS("lg"),lg:tS("2xl"),xl:tS("4xl"),full:tS("full")},defaultProps:{size:"xs"}}),{definePartsStyle:tN,defineMultiStyleConfig:tj}=(0,P.D)(u.keys),tD=tj({baseStyle:tN({preview:(0,P.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"}),input:(0,P.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}),textarea:(0,P.k0)({borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}})})}),{definePartsStyle:tM,defineMultiStyleConfig:tL}=(0,P.D)(h.keys),tF=(0,j.gJ)("form-control-color"),tz=tL({baseStyle:tM({container:{width:"100%",position:"relative"},requiredIndicator:(0,P.k0)({marginStart:"1",[tF.variable]:"colors.red.500",_dark:{[tF.variable]:"colors.red.300"},color:tF.reference}),helperText:(0,P.k0)({mt:"2",[tF.variable]:"colors.gray.600",_dark:{[tF.variable]:"colors.whiteAlpha.600"},color:tF.reference,lineHeight:"normal",fontSize:"sm"})})}),{definePartsStyle:tU,defineMultiStyleConfig:tB}=(0,P.D)(d.keys),tV=(0,j.gJ)("form-error-color"),tq=tB({baseStyle:tU({text:(0,P.k0)({[tV.variable]:"colors.red.500",_dark:{[tV.variable]:"colors.red.300"},color:tV.reference,mt:"2",fontSize:"sm",lineHeight:"normal"}),icon:(0,P.k0)({marginEnd:"0.5em",[tV.variable]:"colors.red.500",_dark:{[tV.variable]:"colors.red.300"},color:tV.reference})})}),t$=(0,P.k0)({fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}),tW=(0,P.fj)({baseStyle:t$}),tH=(0,P.k0)({fontFamily:"heading",fontWeight:"bold"}),tG={"4xl":(0,P.k0)({fontSize:["6xl",null,"7xl"],lineHeight:1}),"3xl":(0,P.k0)({fontSize:["5xl",null,"6xl"],lineHeight:1}),"2xl":(0,P.k0)({fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]}),xl:(0,P.k0)({fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]}),lg:(0,P.k0)({fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]}),md:(0,P.k0)({fontSize:"xl",lineHeight:1.2}),sm:(0,P.k0)({fontSize:"md",lineHeight:1.2}),xs:(0,P.k0)({fontSize:"sm",lineHeight:1.2})},tK=(0,P.fj)({baseStyle:tH,sizes:tG,defaultProps:{size:"xl"}}),{definePartsStyle:tQ,defineMultiStyleConfig:tY}=(0,P.D)(f.keys),tX=(0,j.gJ)("input-height"),tJ=(0,j.gJ)("input-font-size"),tZ=(0,j.gJ)("input-padding"),t0=(0,j.gJ)("input-border-radius"),t1=tQ({addon:{height:tX.reference,fontSize:tJ.reference,px:tZ.reference,borderRadius:t0.reference},field:{width:"100%",height:tX.reference,fontSize:tJ.reference,px:tZ.reference,borderRadius:t0.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),t2={lg:(0,P.k0)({[tJ.variable]:"fontSizes.lg",[tZ.variable]:"space.4",[t0.variable]:"radii.md",[tX.variable]:"sizes.12"}),md:(0,P.k0)({[tJ.variable]:"fontSizes.md",[tZ.variable]:"space.4",[t0.variable]:"radii.md",[tX.variable]:"sizes.10"}),sm:(0,P.k0)({[tJ.variable]:"fontSizes.sm",[tZ.variable]:"space.3",[t0.variable]:"radii.sm",[tX.variable]:"sizes.8"}),xs:(0,P.k0)({[tJ.variable]:"fontSizes.xs",[tZ.variable]:"space.2",[t0.variable]:"radii.sm",[tX.variable]:"sizes.6"})},t4={lg:tQ({field:t2.lg,group:t2.lg}),md:tQ({field:t2.md,group:t2.md}),sm:tQ({field:t2.sm,group:t2.sm}),xs:tQ({field:t2.xs,group:t2.xs})};function t5(e){let{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||eL("blue.500","blue.300")(e),errorBorderColor:r||eL("red.500","red.300")(e)}}let t6=tQ(e=>{let{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=t5(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:eL("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Q(t,n),boxShadow:`0 0 0 1px ${Q(t,n)}`},_focusVisible:{zIndex:1,borderColor:Q(t,r),boxShadow:`0 0 0 1px ${Q(t,r)}`}},addon:{border:"1px solid",borderColor:eL("inherit","whiteAlpha.50")(e),bg:eL("gray.100","whiteAlpha.300")(e)}}}),t3=tQ(e=>{let{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=t5(e);return{field:{border:"2px solid",borderColor:"transparent",bg:eL("gray.100","whiteAlpha.50")(e),_hover:{bg:eL("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Q(t,n)},_focusVisible:{bg:"transparent",borderColor:Q(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:eL("gray.100","whiteAlpha.50")(e)}}}),t9=tY({baseStyle:t1,sizes:t4,variants:{outline:t6,filled:t3,flushed:tQ(e=>{let{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=t5(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Q(t,n),boxShadow:`0px 1px 0px 0px ${Q(t,n)}`},_focusVisible:{borderColor:Q(t,r),boxShadow:`0px 1px 0px 0px ${Q(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),unstyled:tQ({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"md",variant:"outline"}}),t8=(0,j.gJ)("kbd-bg"),t7=(0,P.k0)({[t8.variable]:"colors.gray.100",_dark:{[t8.variable]:"colors.whiteAlpha.100"},bg:t8.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),re=(0,P.fj)({baseStyle:t7}),rt=(0,P.k0)({transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}),rr=(0,P.fj)({baseStyle:rt}),{defineMultiStyleConfig:rn,definePartsStyle:ri}=(0,P.D)(p.keys),ro=rn({baseStyle:ri({icon:(0,P.k0)({marginEnd:"2",display:"inline",verticalAlign:"text-bottom"})})}),{defineMultiStyleConfig:rs,definePartsStyle:ra}=(0,P.D)(m.keys),rl=(0,j.gJ)("menu-bg"),rc=(0,j.gJ)("menu-shadow"),ru=(0,P.k0)({[rl.variable]:"#fff",[rc.variable]:"shadows.sm",_dark:{[rl.variable]:"colors.gray.700",[rc.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:"dropdown",borderRadius:"md",borderWidth:"1px",bg:rl.reference,boxShadow:rc.reference}),rh=(0,P.k0)({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[rl.variable]:"colors.gray.100",_dark:{[rl.variable]:"colors.whiteAlpha.100"}},_active:{[rl.variable]:"colors.gray.200",_dark:{[rl.variable]:"colors.whiteAlpha.200"}},_expanded:{[rl.variable]:"colors.gray.100",_dark:{[rl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:rl.reference}),rd=(0,P.k0)({mx:4,my:2,fontWeight:"semibold",fontSize:"sm"}),rf=(0,P.k0)({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),rp=(0,P.k0)({opacity:.6}),rm=(0,P.k0)({border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}),rg=rs({baseStyle:ra({button:(0,P.k0)({transitionProperty:"common",transitionDuration:"normal"}),list:ru,item:rh,groupTitle:rd,icon:rf,command:rp,divider:rm})}),{defineMultiStyleConfig:ry,definePartsStyle:rv}=(0,P.D)(g.keys),rb=(0,j.gJ)("modal-bg"),rw=(0,j.gJ)("modal-shadow"),r_=(0,P.k0)({bg:"blackAlpha.600",zIndex:"modal"}),rx=(0,P.k0)(e=>{let{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===r?"hidden":"auto",overscrollBehaviorY:"none"}}),rk=(0,P.k0)(e=>{let{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:"inside"===r?"calc(100% - 7.5rem)":void 0,[rb.variable]:"colors.white",[rw.variable]:"shadows.lg",_dark:{[rb.variable]:"colors.gray.700",[rw.variable]:"shadows.dark-lg"},bg:rb.reference,boxShadow:rw.reference}}),rS=(0,P.k0)({px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"}),rE=(0,P.k0)({position:"absolute",top:"2",insetEnd:"3"}),rT=(0,P.k0)(e=>{let{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:"inside"===t?"auto":void 0}}),rC=(0,P.k0)({px:"6",py:"4"});function rI(e){return"full"===e?rv({dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}):rv({dialog:{maxW:e}})}let rP=ry({baseStyle:rv(e=>({overlay:r_,dialogContainer:ep(rx,e),dialog:ep(rk,e),header:rS,closeButton:rE,body:ep(rT,e),footer:rC})),sizes:{xs:rI("xs"),sm:rI("sm"),md:rI("md"),lg:rI("lg"),xl:rI("xl"),"2xl":rI("2xl"),"3xl":rI("3xl"),"4xl":rI("4xl"),"5xl":rI("5xl"),"6xl":rI("6xl"),full:rI("full")},defaultProps:{size:"md"}});var rA=r(79115);function rO(e){return(0,rA.Kn)(e)&&e.reference?e.reference:String(e)}let rR=(e,...t)=>t.map(rO).join(` ${e} `).replace(/calc/g,""),rN=(...e)=>`calc(${rR("+",...e)})`,rj=(...e)=>`calc(${rR("-",...e)})`,rD=(...e)=>`calc(${rR("*",...e)})`,rM=(...e)=>`calc(${rR("/",...e)})`,rL=e=>{let t=rO(e);return null==t||Number.isNaN(parseFloat(t))?rD(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},rF=Object.assign(e=>({add:(...t)=>rF(rN(e,...t)),subtract:(...t)=>rF(rj(e,...t)),multiply:(...t)=>rF(rD(e,...t)),divide:(...t)=>rF(rM(e,...t)),negate:()=>rF(rL(e)),toString:()=>e.toString()}),{add:rN,subtract:rj,multiply:rD,divide:rM,negate:rL}),rz={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},{defineMultiStyleConfig:rU,definePartsStyle:rB}=(0,P.D)(y.keys),rV=ti("number-input-stepper-width"),rq=ti("number-input-input-padding"),r$=rF(rV).add("0.5rem").toString(),rW=ti("number-input-bg"),rH=ti("number-input-color"),rG=ti("number-input-border-color"),rK=(0,P.k0)({[rV.variable]:"sizes.6",[rq.variable]:r$}),rQ=(0,P.k0)(e=>ep(t9.baseStyle,e)?.field??{}),rY=(0,P.k0)({width:rV.reference}),rX=(0,P.k0)({borderStart:"1px solid",borderStartColor:rG.reference,color:rH.reference,bg:rW.reference,[rH.variable]:"colors.chakra-body-text",[rG.variable]:"colors.chakra-border-color",_dark:{[rH.variable]:"colors.whiteAlpha.800",[rG.variable]:"colors.whiteAlpha.300"},_active:{[rW.variable]:"colors.gray.200",_dark:{[rW.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}});function rJ(e){let t=t9.sizes?.[e],r={lg:"md",md:"md",sm:"sm",xs:"sm"},n=t.field?.fontSize??"md",i=rz.fontSizes[n];return rB({field:{...t.field,paddingInlineEnd:rq.reference,verticalAlign:"top"},stepper:{fontSize:rF(i).multiply(.75).toString(),_first:{borderTopEndRadius:r[e]},_last:{borderBottomEndRadius:r[e],mt:"-1px",borderTopWidth:1}}})}let rZ=rU({baseStyle:rB(e=>({root:rK,field:ep(rQ,e)??{},stepperGroup:rY,stepper:rX})),sizes:{xs:rJ("xs"),sm:rJ("sm"),md:rJ("md"),lg:rJ("lg")},variants:t9.variants,defaultProps:t9.defaultProps}),r0=(0,P.k0)({...t9.baseStyle?.field,textAlign:"center"}),r1={lg:(0,P.k0)({fontSize:"lg",w:12,h:12,borderRadius:"md"}),md:(0,P.k0)({fontSize:"md",w:10,h:10,borderRadius:"md"}),sm:(0,P.k0)({fontSize:"sm",w:8,h:8,borderRadius:"sm"}),xs:(0,P.k0)({fontSize:"xs",w:6,h:6,borderRadius:"sm"})},r2={outline:(0,P.k0)(e=>ep(t9.variants?.outline,e)?.field??{}),flushed:(0,P.k0)(e=>ep(t9.variants?.flushed,e)?.field??{}),filled:(0,P.k0)(e=>ep(t9.variants?.filled,e)?.field??{}),unstyled:t9.variants?.unstyled.field??{}},r4=(0,P.fj)({baseStyle:r0,sizes:r1,variants:r2,defaultProps:t9.defaultProps}),{defineMultiStyleConfig:r5,definePartsStyle:r6}=(0,P.D)(v.keys),r3=ti("popper-bg"),r9=ti("popper-arrow-bg"),r8=ti("popper-arrow-shadow-color"),r7=(0,P.k0)({zIndex:"popover"}),ne=(0,P.k0)({[r3.variable]:"colors.white",bg:r3.reference,[r9.variable]:r3.reference,[r8.variable]:"colors.gray.200",_dark:{[r3.variable]:"colors.gray.700",[r8.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}),nt=(0,P.k0)({px:3,py:2,borderBottomWidth:"1px"}),nr=r5({baseStyle:r6({popper:r7,content:ne,header:nt,body:(0,P.k0)({px:3,py:2}),footer:(0,P.k0)({px:3,py:2,borderTopWidth:"1px"}),closeButton:(0,P.k0)({position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2})})}),{defineMultiStyleConfig:nn,definePartsStyle:ni}=(0,P.D)(b.keys),no=(0,P.k0)(e=>{let{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:i}=e,o=eL(ee(),ee("1rem","rgba(0,0,0,0.1)"))(e),s=eL(`${t}.500`,`${t}.200`)(e),a=`linear-gradient(
    to right,
    transparent 0%,
    ${Q(r,s)} 50%,
    transparent 100%
  )`;return{...!n&&i&&o,...n?{bgImage:a}:{bgColor:s}}}),ns=(0,P.k0)({lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"}),na=(0,P.k0)(e=>({bg:eL("gray.100","whiteAlpha.300")(e)})),nl=(0,P.k0)(e=>({transitionProperty:"common",transitionDuration:"slow",...no(e)})),nc=ni(e=>({label:ns,filledTrack:nl(e),track:na(e)})),nu=nn({sizes:{xs:ni({track:{h:"1"}}),sm:ni({track:{h:"2"}}),md:ni({track:{h:"3"}}),lg:ni({track:{h:"4"}})},baseStyle:nc,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nh,definePartsStyle:nd}=(0,P.D)(w.keys),nf=(0,P.k0)(e=>{let t=ep(tr.baseStyle,e)?.control;return{...t,borderRadius:"full",_checked:{...t?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}}),np=nh({baseStyle:nd(e=>({label:tr.baseStyle?.(e).label,container:tr.baseStyle?.(e).container,control:nf(e)})),sizes:{md:nd({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:nd({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:nd({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nm,definePartsStyle:ng}=(0,P.D)(_.keys),ny=(0,j.gJ)("select-bg"),nv=ng({field:(0,P.k0)({...t9.baseStyle?.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:ny.reference,[ny.variable]:"colors.white",_dark:{[ny.variable]:"colors.gray.700"},"> option, > optgroup":{bg:ny.reference}}),icon:(0,P.k0)({width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}})}),nb=(0,P.k0)({paddingInlineEnd:"8"}),nw=nm({baseStyle:nv,sizes:{lg:{...t9.sizes?.lg,field:{...t9.sizes?.lg.field,...nb}},md:{...t9.sizes?.md,field:{...t9.sizes?.md.field,...nb}},sm:{...t9.sizes?.sm,field:{...t9.sizes?.sm.field,...nb}},xs:{...t9.sizes?.xs,field:{...t9.sizes?.xs.field,...nb},icon:{insetEnd:"1"}}},variants:t9.variants,defaultProps:t9.defaultProps}),n_=(0,j.gJ)("skeleton-start-color"),nx=(0,j.gJ)("skeleton-end-color"),nk=(0,P.k0)({[n_.variable]:"colors.gray.100",[nx.variable]:"colors.gray.400",_dark:{[n_.variable]:"colors.gray.800",[nx.variable]:"colors.gray.600"},background:n_.reference,borderColor:nx.reference,opacity:.7,borderRadius:"sm"}),nS=(0,P.fj)({baseStyle:nk}),nE=(0,j.gJ)("skip-link-bg"),nT=(0,P.k0)({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[nE.variable]:"colors.white",_dark:{[nE.variable]:"colors.gray.700"},bg:nE.reference}}),nC=(0,P.fj)({baseStyle:nT});var nI=r(33829);let{defineMultiStyleConfig:nP,definePartsStyle:nA}=(0,P.D)(x.keys),nO=(0,j.gJ)("slider-thumb-size"),nR=(0,j.gJ)("slider-track-size"),nN=(0,j.gJ)("slider-bg"),nj=(0,P.k0)(e=>{let{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...eF({orientation:t,vertical:{h:"100%",px:(0,nI.y)(nO.reference).divide(2).toString()},horizontal:{w:"100%",py:(0,nI.y)(nO.reference).divide(2).toString()}})}}),nD=(0,P.k0)(e=>({...eF({orientation:e.orientation,horizontal:{h:nR.reference},vertical:{w:nR.reference}}),overflow:"hidden",borderRadius:"sm",[nN.variable]:"colors.gray.200",_dark:{[nN.variable]:"colors.whiteAlpha.200"},_disabled:{[nN.variable]:"colors.gray.300",_dark:{[nN.variable]:"colors.whiteAlpha.300"}},bg:nN.reference})),nM=(0,P.k0)(e=>{let{orientation:t}=e;return{...eF({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:nO.reference,h:nO.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}}),nL=(0,P.k0)(e=>{let{colorScheme:t}=e;return{width:"inherit",height:"inherit",[nN.variable]:`colors.${t}.500`,_dark:{[nN.variable]:`colors.${t}.200`},bg:nN.reference}}),nF=nA(e=>({container:nj(e),track:nD(e),thumb:nM(e),filledTrack:nL(e)})),nz=nA({container:{[nO.variable]:"sizes.4",[nR.variable]:"sizes.1"}}),nU=nP({baseStyle:nF,sizes:{lg:nz,md:nA({container:{[nO.variable]:"sizes.3.5",[nR.variable]:"sizes.1"}}),sm:nA({container:{[nO.variable]:"sizes.2.5",[nR.variable]:"sizes.0.5"}})},defaultProps:{size:"md",colorScheme:"blue"}}),nB=ti("spinner-size"),nV=(0,P.k0)({width:[nB.reference],height:[nB.reference]}),nq={xs:(0,P.k0)({[nB.variable]:"sizes.3"}),sm:(0,P.k0)({[nB.variable]:"sizes.4"}),md:(0,P.k0)({[nB.variable]:"sizes.6"}),lg:(0,P.k0)({[nB.variable]:"sizes.8"}),xl:(0,P.k0)({[nB.variable]:"sizes.12"})},n$=(0,P.fj)({baseStyle:nV,sizes:nq,defaultProps:{size:"md"}}),{defineMultiStyleConfig:nW,definePartsStyle:nH}=(0,P.D)(k.keys),nG=(0,P.k0)({fontWeight:"medium"}),nK=nW({baseStyle:nH({container:{},label:nG,helpText:(0,P.k0)({opacity:.8,marginBottom:"2"}),number:(0,P.k0)({verticalAlign:"baseline",fontWeight:"semibold"}),icon:(0,P.k0)({marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"})}),sizes:{md:nH({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},defaultProps:{size:"md"}}),{defineMultiStyleConfig:nQ,definePartsStyle:nY}=(0,P.D)(["stepper","step","title","description","indicator","separator","icon","number"]),nX=(0,j.gJ)("stepper-indicator-size"),nJ=(0,j.gJ)("stepper-icon-size"),nZ=(0,j.gJ)("stepper-title-font-size"),n0=(0,j.gJ)("stepper-description-font-size"),n1=(0,j.gJ)("stepper-accent-color"),n2=nQ({baseStyle:nY(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[n1.variable]:`colors.${e}.500`,_dark:{[n1.variable]:`colors.${e}.200`}},title:{fontSize:nZ.reference,fontWeight:"medium"},description:{fontSize:n0.reference,color:"chakra-subtle-text"},number:{fontSize:nZ.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:nJ.reference,height:nJ.reference},indicator:{flexShrink:0,borderRadius:"full",width:nX.reference,height:nX.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:n1.reference},"&[data-status=complete]":{bg:n1.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:n1.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${nX.reference} - 8px)`,top:`calc(${nX.reference} + 4px)`,insetStart:`calc(${nX.reference} / 2 - 1px)`}}})),sizes:{xs:nY({stepper:{[nX.variable]:"sizes.4",[nJ.variable]:"sizes.3",[nZ.variable]:"fontSizes.xs",[n0.variable]:"fontSizes.xs"}}),sm:nY({stepper:{[nX.variable]:"sizes.6",[nJ.variable]:"sizes.4",[nZ.variable]:"fontSizes.sm",[n0.variable]:"fontSizes.xs"}}),md:nY({stepper:{[nX.variable]:"sizes.8",[nJ.variable]:"sizes.5",[nZ.variable]:"fontSizes.md",[n0.variable]:"fontSizes.sm"}}),lg:nY({stepper:{[nX.variable]:"sizes.10",[nJ.variable]:"sizes.6",[nZ.variable]:"fontSizes.lg",[n0.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:n4,definePartsStyle:n5}=(0,P.D)(S.keys),n6=ti("switch-track-width"),n3=ti("switch-track-height"),n9=ti("switch-track-diff"),n8=rF.subtract(n6,n3),n7=ti("switch-thumb-x"),ie=ti("switch-bg"),it=(0,P.k0)(e=>{let{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[n6.reference],height:[n3.reference],transitionProperty:"common",transitionDuration:"fast",[ie.variable]:"colors.gray.300",_dark:{[ie.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[ie.variable]:`colors.${t}.500`,_dark:{[ie.variable]:`colors.${t}.200`}},bg:ie.reference}}),ir=(0,P.k0)({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[n3.reference],height:[n3.reference],_checked:{transform:`translateX(${n7.reference})`}}),ii=n4({baseStyle:n5(e=>({container:{[n9.variable]:n8,[n7.variable]:n9.reference,_rtl:{[n7.variable]:rF(n9).negate().toString()}},track:it(e),thumb:ir})),sizes:{sm:n5({container:{[n6.variable]:"1.375rem",[n3.variable]:"sizes.3"}}),md:n5({container:{[n6.variable]:"1.875rem",[n3.variable]:"sizes.4"}}),lg:n5({container:{[n6.variable]:"2.875rem",[n3.variable]:"sizes.6"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:io,definePartsStyle:is}=(0,P.D)(E.keys),ia=is({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),il=(0,P.k0)({"&[data-is-numeric=true]":{textAlign:"end"}}),ic=io({baseStyle:ia,variants:{simple:is(e=>{let{colorScheme:t}=e;return{th:{color:eL("gray.600","gray.400")(e),borderBottom:"1px",borderColor:eL(`${t}.100`,`${t}.700`)(e),...il},td:{borderBottom:"1px",borderColor:eL(`${t}.100`,`${t}.700`)(e),...il},caption:{color:eL("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),striped:is(e=>{let{colorScheme:t}=e;return{th:{color:eL("gray.600","gray.400")(e),borderBottom:"1px",borderColor:eL(`${t}.100`,`${t}.700`)(e),...il},td:{borderBottom:"1px",borderColor:eL(`${t}.100`,`${t}.700`)(e),...il},caption:{color:eL("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:eL(`${t}.100`,`${t}.700`)(e)},td:{background:eL(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),unstyled:(0,P.k0)({})},sizes:{sm:is({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:is({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:is({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),iu=(0,j.gJ)("tabs-color"),ih=(0,j.gJ)("tabs-bg"),id=(0,j.gJ)("tabs-border-color"),{defineMultiStyleConfig:ip,definePartsStyle:im}=(0,P.D)(T.keys),ig=(0,P.k0)(e=>{let{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}}),iy=(0,P.k0)(e=>{let{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}}),iv=(0,P.k0)(e=>{let{align:t="start",orientation:r}=e;return{justifyContent:({end:"flex-end",center:"center",start:"flex-start"})[t],flexDirection:"vertical"===r?"column":"row"}}),ib=(0,P.k0)({p:4}),iw=im(e=>({root:ig(e),tab:iy(e),tablist:iv(e),tabpanel:ib})),i_={sm:im({tab:{py:1,px:4,fontSize:"sm"}}),md:im({tab:{fontSize:"md",py:2,px:4}}),lg:im({tab:{fontSize:"lg",py:3,px:4}})},ix=im(e=>{let{colorScheme:t,orientation:r}=e,n="vertical"===r,i=n?"borderStart":"borderBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[n?"marginStart":"marginBottom"]:"-2px",_selected:{[iu.variable]:`colors.${t}.600`,_dark:{[iu.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[ih.variable]:"colors.gray.200",_dark:{[ih.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:iu.reference,bg:ih.reference}}}),ik=im(e=>{let{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[id.variable]:"transparent",_selected:{[iu.variable]:`colors.${t}.600`,[id.variable]:"colors.white",_dark:{[iu.variable]:`colors.${t}.300`,[id.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:id.reference},color:iu.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),iS=im(e=>{let{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[ih.variable]:"colors.gray.50",_dark:{[ih.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[ih.variable]:"colors.white",[iu.variable]:`colors.${t}.600`,_dark:{[ih.variable]:"colors.gray.800",[iu.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:iu.reference,bg:ih.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),iE=im(e=>{let{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Q(r,`${t}.700`),bg:Q(r,`${t}.100`)}}}}),iT=ip({baseStyle:iw,sizes:i_,variants:{line:ix,enclosed:ik,"enclosed-colored":iS,"soft-rounded":iE,"solid-rounded":im(e=>{let{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[iu.variable]:"colors.gray.600",_dark:{[iu.variable]:"inherit"},_selected:{[iu.variable]:"colors.white",[ih.variable]:`colors.${t}.600`,_dark:{[iu.variable]:"colors.gray.800",[ih.variable]:`colors.${t}.300`}},color:iu.reference,bg:ih.reference}}}),unstyled:im({})},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:iC,definePartsStyle:iI}=(0,P.D)(C.keys),iP=(0,j.gJ)("tag-bg"),iA=(0,j.gJ)("tag-color"),iO=(0,j.gJ)("tag-shadow"),iR=(0,j.gJ)("tag-min-height"),iN=(0,j.gJ)("tag-min-width"),ij=(0,j.gJ)("tag-font-size"),iD=(0,j.gJ)("tag-padding-inline"),iM=iI({container:(0,P.k0)({fontWeight:"medium",lineHeight:1.2,outline:0,[iA.variable]:eC.color.reference,[iP.variable]:eC.bg.reference,[iO.variable]:eC.shadow.reference,color:iA.reference,bg:iP.reference,boxShadow:iO.reference,borderRadius:"md",minH:iR.reference,minW:iN.reference,fontSize:ij.reference,px:iD.reference,_focusVisible:{[iO.variable]:"shadows.outline"}}),label:(0,P.k0)({lineHeight:1.2,overflow:"visible"}),closeButton:(0,P.k0)({fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}})}),iL={sm:iI({container:{[iR.variable]:"sizes.5",[iN.variable]:"sizes.5",[ij.variable]:"fontSizes.xs",[iD.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:iI({container:{[iR.variable]:"sizes.6",[iN.variable]:"sizes.6",[ij.variable]:"fontSizes.sm",[iD.variable]:"space.2"}}),lg:iI({container:{[iR.variable]:"sizes.8",[iN.variable]:"sizes.8",[ij.variable]:"fontSizes.md",[iD.variable]:"space.3"}})},iF=iC({variants:{subtle:iI(e=>({container:eR.variants?.subtle(e)})),solid:iI(e=>({container:eR.variants?.solid(e)})),outline:iI(e=>({container:eR.variants?.outline(e)}))},baseStyle:iM,sizes:iL,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),iz=(0,P.k0)({...t9.baseStyle?.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),iU={outline:(0,P.k0)(e=>t9.variants?.outline(e).field??{}),flushed:(0,P.k0)(e=>t9.variants?.flushed(e).field??{}),filled:(0,P.k0)(e=>t9.variants?.filled(e).field??{}),unstyled:t9.variants?.unstyled.field??{}},iB={xs:t9.sizes?.xs.field??{},sm:t9.sizes?.sm.field??{},md:t9.sizes?.md.field??{},lg:t9.sizes?.lg.field??{}},iV=(0,P.fj)({baseStyle:iz,sizes:iB,variants:iU,defaultProps:{size:"md",variant:"outline"}}),iq=ti("tooltip-bg"),i$=ti("tooltip-fg"),iW=ti("popper-arrow-bg"),iH=(0,P.k0)({bg:iq.reference,color:i$.reference,[iq.variable]:"colors.gray.700",[i$.variable]:"colors.whiteAlpha.900",_dark:{[iq.variable]:"colors.gray.300",[i$.variable]:"colors.gray.900"},[iW.variable]:iq.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}),iG=(0,P.fj)({baseStyle:iH}),iK={breakpoints:{base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},zIndices:{hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"}},...rz,sizes:ed,shadows:{xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},space:eh,borders:{none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},transition:{property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}}},iQ={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},iY={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},iX={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},iJ={semanticTokens:iQ,direction:"ltr",...iK,components:{Accordion:N,Alert:eu,Avatar:eT,Badge:eR,Breadcrumb:eM,Button:eG,Checkbox:tr,CloseButton:tc,Code:tf,Container:tm,Divider:tb,Drawer:tR,Editable:tD,Form:tz,FormError:tq,FormLabel:tW,Heading:tK,Input:t9,Kbd:re,Link:rr,List:ro,Menu:rg,Modal:rP,NumberInput:rZ,PinInput:r4,Popover:nr,Progress:nu,Radio:np,Select:nw,Skeleton:nS,SkipLink:nC,Slider:nU,Spinner:n$,Stat:nK,Switch:ii,Table:ic,Tabs:iT,Tag:iF,Textarea:iV,Tooltip:iG,Card:e5,Stepper:n2},styles:iY,config:iX},iZ={semanticTokens:iQ,direction:"ltr",components:{},...iK,styles:iY,config:iX}},20397:function(e,t,r){"use strict";r.d(t,{P:function(){return n},Q:function(){return i}});let n=e=>e?"":void 0,i=e=>!!e||void 0},15292:function(e,t,r){"use strict";r.d(t,{Y:function(){return c},y:function(){return u}});var n=r(79115);function i(e){if(null==e)return e;let{unitless:t}=function(e){let t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}(e);return t||"number"==typeof e?`${e}px`:e}let o=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,s=e=>Object.fromEntries(Object.entries(e).sort(o));function a(e){let t=s(e);return Object.assign(Object.values(t),t)}function l(e){return e?"number"==typeof(e=i(e)??e)?`${e+-.02}`:e.replace(/(\d+\.?\d*)/u,e=>`${parseFloat(e)+-.02}`):e}function c(e,t){let r=["@media screen"];return e&&r.push("and",`(min-width: ${i(e)})`),t&&r.push("and",`(max-width: ${i(t)})`),r.join(" ")}function u(e){if(!e)return null;e.base=e.base??"0px";let t=a(e),r=Object.entries(e).sort(o).map(([e,t],r,n)=>{let[,i]=n[r+1]??[];return i=parseFloat(i)>0?l(i):void 0,{_minW:l(t),breakpoint:e,minW:t,maxW:i,maxWQuery:c(null,i),minWQuery:c(t),minMaxQuery:c(t,i)}}),i=new Set(Object.keys(s(e))),u=Array.from(i.values());return{keys:i,normalized:t,isResponsive(e){let t=Object.keys(e);return t.length>0&&t.every(e=>i.has(e))},asObject:s(e),asArray:a(e),details:r,get:e=>r.find(t=>t.breakpoint===e),media:[null,...t.map(e=>c(e)).slice(1)],toArrayValue(e){if(!(0,n.Kn)(e))throw Error("toArrayValue: value must be an object");let t=u.map(t=>e[t]??null);for(;null===function(e){let t=null==e?0:e.length;return t?e[t-1]:void 0}(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw Error("toObjectValue: value must be an array");return e.reduce((e,t,r)=>{let n=u[r];return null!=n&&null!=t&&(e[n]=t),e},{})}}}},68928:function(e,t,r){"use strict";function n(...e){return function(...t){e.forEach(e=>e?.(...t))}}function i(...e){return function(t){e.some(e=>(e?.(t),t?.defaultPrevented))}}r.d(t,{P:function(){return n},v:function(){return i}})},90911:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(67294);function i(e){return n.Children.toArray(e).filter(e=>(0,n.isValidElement)(e))}},87155:function(e,t,r){"use strict";function n(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}r.d(t,{o:function(){return n}})},52110:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=r(67294);function i(e={}){let{name:t,strict:r=!0,hookName:i="useContext",providerName:o="Provider",errorMessage:s,defaultValue:a}=e,l=(0,n.createContext)(a);return l.displayName=t,[l.Provider,function e(){let t=(0,n.useContext)(l);if(!t&&r){let t=Error(s??`${i} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw t.name="ContextError",Error.captureStackTrace?.(t,e),t}return t},l]}},34926:function(e,t,r){"use strict";r.d(t,{cx:function(){return n}});let n=(...e)=>e.filter(Boolean).join(" ")},4839:function(e,t,r){"use strict";r.d(t,{W:function(){return n}});let n=(e=>{let t=new WeakMap;return(r,n,i,o)=>{if(void 0===r)return e(r,n,i);t.has(r)||t.set(r,new Map);let s=t.get(r);if(s.has(n))return s.get(n);let a=e(r,n,i,o);return s.set(n,a),a}})(function(e,t,r,n){let i="string"==typeof t?t.split("."):[t];for(n=0;n<i.length&&e;n+=1)e=e[i[n]];return void 0===e?r:e})},21326:function(e,t,r){"use strict";function n(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function i(){return!!globalThis?.document}function o(e){let t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}function s(e){return!0==!!e.getAttribute("disabled")||!0==!!e.getAttribute("aria-disabled")}r.d(t,{Re:function(){return n},iU:function(){return o},jU:function(){return i},nV:function(){return s},oI:function(){return function e(t){return!!(t.parentElement&&e(t.parentElement))||t.hidden}}})},79115:function(e,t,r){"use strict";function n(e){return Array.isArray(e)}function i(e){let t=typeof e;return null!=e&&("object"===t||"function"===t)&&!n(e)}r.d(t,{Kn:function(){return i},kJ:function(){return n}})},8297:function(e,t,r){"use strict";function n(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}r.d(t,{C:function(){return n}})},70562:function(e,t,r){"use strict";function n(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}r.d(t,{e:function(){return n}})},1185:function(e,t,r){"use strict";r.d(t,{XQ:function(){return i}});var n=r(79115);function i(e,t){return Array.isArray(e)?e.map(e=>null===e?null:t(e)):(0,n.Kn)(e)?Object.keys(e).reduce((r,n)=>(r[n]=t(e[n]),r),{}):null!=e?t(e):null}Object.freeze(["base","sm","md","lg","xl","2xl"])},2847:function(e,t,r){"use strict";r.d(t,{P:function(){return i}});let n=e=>"function"==typeof e;function i(e,...t){return n(e)?e(...t):e}},85839:function(e,t,r){"use strict";r.d(t,{xC:function(){return ei},PH:function(){return Q},oM:function(){return ec}});var n,i,o=r(65849);function s(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var a=s(),l=Symbol.for("immer-nothing"),c=Symbol.for("immer-draftable"),u=Symbol.for("immer-state");function h(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var d=Object.getPrototypeOf;function f(e){return!!e&&!!e[u]}function p(e){return!!e&&(g(e)||Array.isArray(e)||!!e[c]||!!e.constructor?.[c]||_(e)||x(e))}var m=Object.prototype.constructor.toString();function g(e){if(!e||"object"!=typeof e)return!1;let t=d(e);if(null===t)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===m}function y(e,t){0===v(e)?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function v(e){let t=e[u];return t?t.type_:Array.isArray(e)?1:_(e)?2:x(e)?3:0}function b(e,t){return 2===v(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function w(e,t,r){let n=v(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function _(e){return e instanceof Map}function x(e){return e instanceof Set}function k(e){return e.copy_||e.base_}function S(e,t){if(_(e))return new Map(e);if(x(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=g(e);if(!0!==t&&("class_only"!==t||r)){let t=d(e);return null!==t&&r?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[u];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(d(e),t)}}function E(e,t=!1){return C(e)||f(e)||!p(e)||(v(e)>1&&(e.set=e.add=e.clear=e.delete=T),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>E(t,!0))),e}function T(){h(2)}function C(e){return Object.isFrozen(e)}var I={};function P(e){let t=I[e];return t||h(0,e),t}function A(e,t){t&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function O(e){R(e),e.drafts_.forEach(j),e.drafts_=null}function R(e){e===i&&(i=e.parent_)}function N(e){return i={drafts_:[],parent_:i,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function j(e){let t=e[u];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function D(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[u].modified_&&(O(t),h(4)),p(e)&&(e=M(t,e),t.parent_||F(t,e)),t.patches_&&P("Patches").generateReplacementPatches_(r[u].base_,e,t.patches_,t.inversePatches_)):e=M(t,r,[]),O(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==l?e:void 0}function M(e,t,r){if(C(t))return t;let n=t[u];if(!n)return y(t,(i,o)=>L(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return F(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let t=n.copy_,i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),y(i,(i,s)=>L(e,n,t,i,s,r,o)),F(e,t,!1),r&&e.patches_&&P("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function L(e,t,r,n,i,o,s){if(f(i)){let s=M(e,i,o&&t&&3!==t.type_&&!b(t.assigned_,n)?o.concat(n):void 0);if(w(r,n,s),!f(s))return;e.canAutoFreeze_=!1}else s&&r.add(i);if(p(i)&&!C(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;M(e,i),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&Object.prototype.propertyIsEnumerable.call(r,n)&&F(e,i)}}function F(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&E(t,r)}var z={get(e,t){if(t===u)return e;let r=k(e);if(!b(r,t))return function(e,t,r){let n=V(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);let n=r[t];return e.finalized_||!p(n)?n:n===B(e.base_,t)?($(e),e.copy_[t]=W(n,e)):n},has:(e,t)=>t in k(e),ownKeys:e=>Reflect.ownKeys(k(e)),set(e,t,r){let n=V(k(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=B(k(e),t),i=n?.[u];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||b(e.base_,t)))return!0;$(e),q(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==B(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,$(e),q(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=k(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){h(11)},getPrototypeOf:e=>d(e.base_),setPrototypeOf(){h(12)}},U={};function B(e,t){let r=e[u];return(r?k(r):e)[t]}function V(e,t){if(!(t in e))return;let r=d(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=d(r)}}function q(e){!e.modified_&&(e.modified_=!0,e.parent_&&q(e.parent_))}function $(e){e.copy_||(e.copy_=S(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function W(e,t){let r=_(e)?P("MapSet").proxyMap_(e,t):x(e)?P("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:i,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,s=z;r&&(o=[n],s=U);let{revoke:a,proxy:l}=Proxy.revocable(o,s);return n.draft_=l,n.revoke_=a,l}(e,t);return(t?t.scope_:i).drafts_.push(r),r}y(z,(e,t)=>{U[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),U.deleteProperty=function(e,t){return U.set.call(this,e,t,void 0)},U.set=function(e,t,r){return z.set.call(this,e[0],t,r,e[0])};var H=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&h(6),void 0!==r&&"function"!=typeof r&&h(7),p(e)){let i=N(this),o=W(e,void 0),s=!0;try{n=t(o),s=!1}finally{s?O(i):R(i)}return A(i,r),D(n,i)}if(e&&"object"==typeof e)h(1,e);else{if(void 0===(n=t(e))&&(n=e),n===l&&(n=void 0),this.autoFreeze_&&E(n,!0),r){let t=[],i=[];P("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;p(e)||h(8),f(e)&&(f(t=e)||h(10,t),e=function e(t){let r;if(!p(t)||C(t))return t;let n=t[u];if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=S(t,n.scope_.immer_.useStrictShallowCopy_)}else r=S(t,!0);return y(r,(t,n)=>{w(r,t,e(n))}),n&&(n.finalized_=!1),r}(t));let r=N(this),n=W(e,void 0);return n[u].isManual_=!0,R(r),n}finishDraft(e,t){let r=e&&e[u];r&&r.isManual_||h(9);let{scope_:n}=r;return A(n,t),D(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=P("Patches").applyPatches_;return f(e)?n(e,t):this.produce(e,e=>n(e,t))}},G=H.produce;H.produceWithPatches.bind(H),H.setAutoFreeze.bind(H),H.setUseStrictShallowCopy.bind(H),H.applyPatches.bind(H),H.createDraft.bind(H),H.finishDraft.bind(H),r(83454);var K="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?o.qC:o.qC.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Q(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(ev(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>(0,o.LG)(t)&&t.type===e,r}var Y=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function X(e){return p(e)?G(e,()=>{}):e}function J(e,t,r){if(e.has(t)){let n=e.get(t);return r.update&&(n=r.update(n,t,e),e.set(t,n)),n}if(!r.insert)throw Error(ev(10));let n=r.insert(t,e);return e.set(t,n),n}var Z=()=>function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},o=new Y;return t&&("boolean"==typeof t?o.push(a):o.push(s(t.extraArgument))),o},ee=e=>t=>{setTimeout(t,e)},et="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:ee(10),er=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,a=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?et:"callback"===e.type?e.queueNotification:ee(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>i&&e());return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){try{return(o=!(i=!e?.meta?.RTK_autoBatch))&&!s&&(s=!0,l(c)),n.dispatch(e)}finally{i=!0}}})},en=e=>function(t){let{autoBatch:r=!0}=t??{},n=new Y(e);return r&&n.push(er("object"==typeof r?r:void 0)),n};function ei(e){let t,r;let n=Z(),{reducer:i,middleware:s,devTools:a=!0,preloadedState:l,enhancers:c}=e||{};if("function"==typeof i)t=i;else if((0,o.PO)(i))t=(0,o.UY)(i);else throw Error(ev(1));r="function"==typeof s?s(n):n();let u=o.qC;a&&(u=K({trace:!1,..."object"==typeof a&&a}));let h=en((0,o.md)(...r)),d=u(..."function"==typeof c?c(h):h());return(0,o.MT)(t,l,d)}function eo(e){let t;let r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(ev(28));if(n in r)throw Error(ev(29));return r[n]=t,i},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}var es=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ea=Symbol.for("rtk-slice-createasyncthunk"),el=((n=el||{}).reducer="reducer",n.reducerWithPrepare="reducerWithPrepare",n.asyncThunk="asyncThunk",n),ec=function({creators:e}={}){let t=e?.asyncThunk?.[ea];return function(e){let r;let{name:n,reducerPath:i=n}=e;if(!n)throw Error(ev(11));let o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(o),a={},l={},c={},u=[],h={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(ev(12));if(r in l)throw Error(ev(13));return l[r]=t,h},addMatcher:(e,t)=>(u.push({matcher:e,reducer:t}),h),exposeAction:(e,t)=>(c[e]=t,h),exposeCaseReducer:(e,t)=>(a[e]=t,h)};function d(){let[t={},r=[],n]="function"==typeof e.extraReducers?eo(e.extraReducers):[e.extraReducers],i={...t,...l};return function(e,t){let r;let[n,i,o]=eo(t);if("function"==typeof e)r=()=>X(e());else{let t=X(e);r=()=>t}function s(e=r(),t){let s=[n[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===s.filter(e=>!!e).length&&(s=[o]),s.reduce((e,r)=>{if(r){if(f(e)){let n=r(e,t);return void 0===n?e:n}if(p(e))return G(e,e=>r(e,t));{let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}}return e},e)}return s.getInitialState=r,s}(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of u)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}s.forEach(r=>{let i=o[r],s={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===i._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(ev(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,h=i(e,o,u);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),a&&n.addCase(h.pending,a),l&&n.addCase(h.rejected,l),c&&n.addMatcher(h.settled,c),n.exposeCaseReducer(t,{fulfilled:s||eu,pending:a||eu,rejected:l||eu,settled:c||eu})}(s,i,h,t):function({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(ev(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Q(e,s):Q(e))}(s,i,h)});let m=e=>e,g=new Map;function y(e,t){return r||(r=d()),r(e,t)}function v(){return r||(r=d()),r.getInitialState()}function b(t,r=!1){function n(e){let n=e[t];return void 0===n&&r&&(n=v()),n}function i(t=m){let n=J(g,r,{insert:()=>new WeakMap});return J(n,t,{insert:()=>{let n={};for(let[i,o]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(o,...s){let a=t(o);return void 0===a&&n&&(a=r()),e(a,...s)}return i.unwrapped=e,i}(o,t,v,r);return n}})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let w={name:n,reducer:y,actions:c,caseReducers:a,getInitialState:v,...b(i),injectInto(e,{reducerPath:t,...r}={}){let n=t??i;return e.inject({reducerPath:n,reducer:y},r),{...w,...b(n,!0)}}};return w}}();function eu(){}var eh=(e,t)=>{if("function"!=typeof e)throw TypeError(ev(32))},{assign:ed}=Object,ef="listenerMiddleware",ep=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Q(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(ev(21));return eh(o,"options.listener"),{predicate:i,type:t,effect:o}},em=ed(e=>{let{type:t,predicate:r,effect:n}=ep(e);return{id:es(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(ev(22))}}},{withTypes:()=>em}),eg=ed(Q(`${ef}/add`),{withTypes:()=>eg}),ey=ed(Q(`${ef}/remove`),{withTypes:()=>ey});function ev(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},82729:function(e,t,r){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,{_:function(){return n}})},2379:function(e,t,r){"use strict";function n(){}r.d(t,{e:function(){return i}});class i{constructor(e=1/0,t=n){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){let t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}}},99869:function(e,t,r){"use strict";function n(){}r.d(t,{k:function(){return a}});let i="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},o="undefined"!=typeof WeakMap?WeakMap:Map,s="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:n,unregister:n}};class a{constructor(e=1/0,t=n){this.max=e,this.dispose=t,this.map=new o,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{let e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){let t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);let r=t.key;delete t.key,t.keyRef=new i(r),this.registry.register(r,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new s(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(e,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;let t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){let t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}},30020:function(e,t,r){"use strict";r.d(t,{D:function(){return a}});let{toString:n,hasOwnProperty:i}=Object.prototype,o=Function.prototype.toString,s=new Map;function a(e,t){try{return function e(t,r){if(t===r)return!0;let s=n.call(t);if(s!==n.call(r))return!1;switch(s){case"[object Array]":if(t.length!==r.length)break;case"[object Object]":{if(h(t,r))return!0;let n=l(t),o=l(r),s=n.length;if(s!==o.length)return!1;for(let e=0;e<s;++e)if(!i.call(r,n[e]))return!1;for(let i=0;i<s;++i){let o=n[i];if(!e(t[o],r[o]))return!1}return!0}case"[object Error]":return t.name===r.name&&t.message===r.message;case"[object Number]":if(t!=t)return r!=r;case"[object Boolean]":case"[object Date]":return+t==+r;case"[object RegExp]":case"[object String]":return t==`${r}`;case"[object Map]":case"[object Set]":{if(t.size!==r.size)return!1;if(h(t,r))return!0;let n=t.entries(),i="[object Map]"===s;for(;;){let t=n.next();if(t.done)break;let[o,s]=t.value;if(!r.has(o)||i&&!e(s,r.get(o)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),r=new Uint8Array(r);case"[object DataView]":{let e=t.byteLength;if(e===r.byteLength)for(;e--&&t[e]===r[e];);return -1===e}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{let e=o.call(t);if(e!==o.call(r))return!1;return!function(e,t){let r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}(e,u)}}return!1}(e,t)}finally{s.clear()}}function l(e){return Object.keys(e).filter(c,e)}function c(e){return void 0!==this[e]}t.Z=a;let u="{ [native code] }";function h(e,t){let r=s.get(e);if(r){if(r.has(t))return!0}else s.set(e,r=new Set);return r.add(t),!1}},13114:function(e,t,r){"use strict";r.d(t,{M:function(){return y}});var n=r(85893),i=r(67294),o=r(240),s=r(96681),a=r(16014);class l extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function c({children:e,isPresent:t}){let r=(0,i.useId)(),o=(0,i.useRef)(null),s=(0,i.useRef)({width:0,height:0,top:0,left:0}),{nonce:c}=(0,i.useContext)(a._);return(0,i.useInsertionEffect)(()=>{let{width:e,height:n,top:i,left:a}=s.current;if(t||!o.current||!e||!n)return;o.current.dataset.motionPopId=r;let l=document.createElement("style");return c&&(l.nonce=c),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${n}px !important;
            top: ${i}px !important;
            left: ${a}px !important;
          }
        `),()=>{document.head.removeChild(l)}},[t]),(0,n.jsx)(l,{isPresent:t,childRef:o,sizeRef:s,children:i.cloneElement(e,{ref:o})})}let u=({children:e,initial:t,isPresent:r,onExitComplete:a,custom:l,presenceAffectsLayout:u,mode:d})=>{let f=(0,s.h)(h),p=(0,i.useId)(),m=(0,i.useCallback)(e=>{for(let t of(f.set(e,!0),f.values()))if(!t)return;a&&a()},[f,a]),g=(0,i.useMemo)(()=>({id:p,initial:t,isPresent:r,custom:l,onExitComplete:m,register:e=>(f.set(e,!1),()=>f.delete(e))}),u?[Math.random(),m]:[r,m]);return(0,i.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[r]),i.useEffect(()=>{r||f.size||!a||a()},[r]),"popLayout"===d&&(e=(0,n.jsx)(c,{isPresent:r,children:e})),(0,n.jsx)(o.O.Provider,{value:g,children:e})};function h(){return new Map}var d=r(25364),f=r(45487);let p=e=>e.key||"";function m(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}var g=r(58868);let y=({children:e,exitBeforeEnter:t,custom:r,initial:o=!0,onExitComplete:a,presenceAffectsLayout:l=!0,mode:c="sync"})=>{(0,f.k)(!t,"Replace exitBeforeEnter with mode='wait'");let h=(0,i.useMemo)(()=>m(e),[e]),y=h.map(p),v=(0,i.useRef)(!0),b=(0,i.useRef)(h),w=(0,s.h)(()=>new Map),[_,x]=(0,i.useState)(h),[k,S]=(0,i.useState)(h);(0,g.L)(()=>{v.current=!1,b.current=h;for(let e=0;e<k.length;e++){let t=p(k[e]);y.includes(t)?w.delete(t):!0!==w.get(t)&&w.set(t,!1)}},[k,y.length,y.join("-")]);let E=[];if(h!==_){let e=[...h];for(let t=0;t<k.length;t++){let r=k[t],n=p(r);y.includes(n)||(e.splice(t,0,r),E.push(r))}"wait"===c&&E.length&&(e=E),S(m(e)),x(h);return}let{forceRender:T}=(0,i.useContext)(d.p);return(0,n.jsx)(n.Fragment,{children:k.map(e=>{let t=p(e),i=h===k||y.includes(t);return(0,n.jsx)(u,{isPresent:i,initial:(!v.current||!!o)&&void 0,custom:i?void 0:r,presenceAffectsLayout:l,mode:c,onExitComplete:i?void 0:()=>{if(!w.has(t))return;w.set(t,!0);let e=!0;w.forEach(t=>{t||(e=!1)}),e&&(null==T||T(),S(b.current),a&&a())},children:e},t)})})}},15947:function(e,t,r){"use strict";r.d(t,{hO:function(){return s},oO:function(){return o}});var n=r(67294),i=r(240);function o(){let e=(0,n.useContext)(i.O);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:r,register:o}=e,s=(0,n.useId)();(0,n.useEffect)(()=>o(s),[]);let a=(0,n.useCallback)(()=>r&&r(s),[s,r]);return!t&&r?[!1,a]:[!0]}function s(){var e;return null===(e=(0,n.useContext)(i.O))||e.isPresent}},25364:function(e,t,r){"use strict";r.d(t,{p:function(){return n}});let n=(0,r(67294).createContext)({})},16014:function(e,t,r){"use strict";r.d(t,{_:function(){return n}});let n=(0,r(67294).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},240:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});let n=(0,r(67294).createContext)(null)},72701:function(e,t,r){"use strict";let n;function i(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}r.d(t,{E:function(){return oc}});let o=e=>Array.isArray(e);function s(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function a(e){return"string"==typeof e||Array.isArray(e)}function l(e){let t=[{},{}];return null==e||e.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function c(e,t,r,n){if("function"==typeof t){let[i,o]=l(n);t=t(void 0!==r?r:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=l(n);t=t(void 0!==r?r:e.custom,i,o)}return t}function u(e,t,r){let n=e.getProps();return c(n,t,void 0!==r?r:n.custom,e)}let h=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],d=["initial",...h],f=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],p=new Set(f),m=e=>1e3*e,g=e=>e/1e3,y={type:"spring",stiffness:500,damping:25,restSpeed:10},v=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),b={type:"keyframes",duration:.8},w={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_=(e,{keyframes:t})=>t.length>2?b:p.has(e)?e.startsWith("scale")?v(t[1]):y:w;function x(e,t){return e?e[t]||e.default||e:void 0}let k={skipAnimations:!1,useManualTiming:!1},S={current:!1},E=e=>null!==e;function T(e,{repeat:t,repeatType:r="loop"},n){let i=e.filter(E),o=t&&"loop"!==r&&t%2==1?0:i.length-1;return o&&void 0!==n?n:i[o]}var C,I,P,A=r(81662);let O=["read","resolveKeyframes","update","preRender","render","postRender"];function R(e,t){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>r=!0,s=O.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,n=!1,i=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,i=!1,s=!1)=>{let a=s&&n?t:r;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,n){i=!0;return}n=!0,[t,r]=[r,t],r.clear(),t.forEach(a),n=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:h,postRender:d}=s,f=()=>{let o=k.useManualTiming?i.timestamp:performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(f))},p=()=>{r=!0,n=!0,i.isProcessing||e(f)};return{schedule:O.reduce((e,t)=>{let n=s[t];return e[t]=(e,t=!1,i=!1)=>(r||p(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<O.length;t++)s[O[t]].cancel(e)},state:i,steps:s}}let{schedule:N,cancel:j,state:D,steps:M}=R("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:A.Z,!0),L=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function F(e,t,r,n){if(e===t&&r===n)return A.Z;let i=t=>(function(e,t,r,n,i){let o,s;let a=0;do(o=L(s=t+(r-t)/2,n,i)-e)>0?r=s:t=s;while(Math.abs(o)>1e-7&&++a<12);return s})(t,0,1,e,r);return e=>0===e||1===e?e:L(i(e),t,n)}let z=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U=e=>t=>1-e(1-t),B=F(.33,1.53,.69,.99),V=U(B),q=z(V),$=e=>(e*=2)<1?.5*V(e):.5*(2-Math.pow(2,-10*(e-1))),W=e=>1-Math.sin(Math.acos(e)),H=U(W),G=z(W),K=e=>/^0[^.\s]+$/u.test(e);var Q=r(45487);let Y=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),X=e=>t=>"string"==typeof t&&t.startsWith(e),J=X("--"),Z=X("var(--"),ee=e=>!!Z(e)&&et.test(e.split("/*")[0].trim()),et=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,er=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,en=(e,t,r)=>r>t?t:r<e?e:r,ei={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},eo={...ei,transform:e=>en(0,1,e)},es={...ei,default:1},ea=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),el=ea("deg"),ec=ea("%"),eu=ea("px"),eh=ea("vh"),ed=ea("vw"),ef={...ec,parse:e=>ec.parse(e)/100,transform:e=>ec.transform(100*e)},ep=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),em=e=>e===ei||e===eu,eg=(e,t)=>parseFloat(e.split(", ")[t]),ey=(e,t)=>(r,{transform:n})=>{if("none"===n||!n)return 0;let i=n.match(/^matrix3d\((.+)\)$/u);if(i)return eg(i[1],t);{let t=n.match(/^matrix\((.+)\)$/u);return t?eg(t[1],e):0}},ev=new Set(["x","y","z"]),eb=f.filter(e=>!ev.has(e)),ew={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ey(4,13),y:ey(5,14)};ew.translateX=ew.x,ew.translateY=ew.y;let e_=e=>t=>t.test(e),ex=[ei,eu,ec,el,ed,eh,{test:e=>"auto"===e,parse:e=>e}],ek=e=>ex.find(e_(e)),eS=new Set,eE=!1,eT=!1;function eC(){if(eT){let e=Array.from(eS).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t=function(e){let t=[];return eb.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{var n;null===(n=e.getValue(t))||void 0===n||n.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eT=!1,eE=!1,eS.forEach(e=>e.complete()),eS.clear()}function eI(){eS.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eT=!0)})}class eP{constructor(e,t,r,n,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(eS.add(this),eE||(eE=!0,N.read(eI),N.resolveKeyframes(eC))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;for(let i=0;i<e.length;i++)if(null===e[i]){if(0===i){let i=null==n?void 0:n.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(r&&t){let n=r.readValue(t,o);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=o),n&&void 0===i&&n.set(e[0])}else e[i]=e[i-1]}}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),eS.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,eS.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let eA=e=>Math.round(1e5*e)/1e5,eO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,eR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eN=(e,t)=>r=>!!("string"==typeof r&&eR.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),ej=(e,t,r)=>n=>{if("string"!=typeof n)return n;let[i,o,s,a]=n.match(eO);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},eD=e=>en(0,255,e),eM={...ei,transform:e=>Math.round(eD(e))},eL={test:eN("rgb","red"),parse:ej("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+eM.transform(e)+", "+eM.transform(t)+", "+eM.transform(r)+", "+eA(eo.transform(n))+")"},eF={test:eN("#"),parse:function(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:eL.transform},ez={test:eN("hsl","hue"),parse:ej("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ec.transform(eA(t))+", "+ec.transform(eA(r))+", "+eA(eo.transform(n))+")"},eU={test:e=>eL.test(e)||eF.test(e)||ez.test(e),parse:e=>eL.test(e)?eL.parse(e):ez.test(e)?ez.parse(e):eF.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eL.transform(e):ez.transform(e)},eB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eV="number",eq="color",e$=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eW(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[],o=0,s=t.replace(e$,e=>(eU.test(e)?(n.color.push(o),i.push(eq),r.push(eU.parse(e))):e.startsWith("var(")?(n.var.push(o),i.push("var"),r.push(e)):(n.number.push(o),i.push(eV),r.push(parseFloat(e))),++o,"${}")).split("${}");return{values:r,split:s,indexes:n,types:i}}function eH(e){return eW(e).values}function eG(e){let{split:t,types:r}=eW(e),n=t.length;return e=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],void 0!==e[o]){let t=r[o];t===eV?i+=eA(e[o]):t===eq?i+=eU.transform(e[o]):i+=e[o]}return i}}let eK=e=>"number"==typeof e?0:e,eQ={test:function(e){var t,r;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(eO))||void 0===t?void 0:t.length)||0)+((null===(r=e.match(eB))||void 0===r?void 0:r.length)||0)>0},parse:eH,createTransformer:eG,getAnimatableNone:function(e){let t=eH(e);return eG(e)(t.map(eK))}},eY=new Set(["brightness","contrast","saturate","opacity"]);function eX(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(eO)||[];if(!n)return e;let i=r.replace(n,""),o=eY.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}let eJ=/\b([a-z-]*)\(.*?\)/gu,eZ={...eQ,getAnimatableNone:e=>{let t=e.match(eJ);return t?t.map(eX).join(" "):e}},e0={...ei,transform:Math.round},e1={borderWidth:eu,borderTopWidth:eu,borderRightWidth:eu,borderBottomWidth:eu,borderLeftWidth:eu,borderRadius:eu,radius:eu,borderTopLeftRadius:eu,borderTopRightRadius:eu,borderBottomRightRadius:eu,borderBottomLeftRadius:eu,width:eu,maxWidth:eu,height:eu,maxHeight:eu,top:eu,right:eu,bottom:eu,left:eu,padding:eu,paddingTop:eu,paddingRight:eu,paddingBottom:eu,paddingLeft:eu,margin:eu,marginTop:eu,marginRight:eu,marginBottom:eu,marginLeft:eu,backgroundPositionX:eu,backgroundPositionY:eu,rotate:el,rotateX:el,rotateY:el,rotateZ:el,scale:es,scaleX:es,scaleY:es,scaleZ:es,skew:el,skewX:el,skewY:el,distance:eu,translateX:eu,translateY:eu,translateZ:eu,x:eu,y:eu,z:eu,perspective:eu,transformPerspective:eu,opacity:eo,originX:ef,originY:ef,originZ:eu,zIndex:e0,size:eu,fillOpacity:eo,strokeOpacity:eo,numOctaves:e0},e2={...e1,color:eU,backgroundColor:eU,outlineColor:eU,fill:eU,stroke:eU,borderColor:eU,borderTopColor:eU,borderRightColor:eU,borderBottomColor:eU,borderLeftColor:eU,filter:eZ,WebkitFilter:eZ},e4=e=>e2[e];function e5(e,t){let r=e4(e);return r!==eZ&&(r=eQ),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let e6=new Set(["auto","none","0"]);class e3 extends eP{constructor(e,t,r,n,i){super(e,t,r,n,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&ee(n=n.trim())){let i=function e(t,r,n=1){(0,Q.k)(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[i,o]=function(e){let t=er.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${null!=r?r:n}`,i]}(t);if(!i)return;let s=window.getComputedStyle(r).getPropertyValue(i);if(s){let e=s.trim();return Y(e)?parseFloat(e):e}return ee(o)?e(o,r,n+1):o}(n,t.current);void 0!==i&&(e[r]=i),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!ep.has(r)||2!==e.length)return;let[n,i]=e,o=ek(n),s=ek(i);if(o!==s){if(em(o)&&em(s))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else this.needsMeasurement=!0}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++){var n;("number"==typeof(n=e[t])?0===n:null===n||"none"===n||"0"===n||K(n))&&r.push(t)}r.length&&function(e,t,r){let n,i=0;for(;i<e.length&&!n;){let t=e[i];"string"==typeof t&&!e6.has(t)&&eW(t).values.length&&(n=e[i]),i++}if(n&&r)for(let i of t)e[i]=e5(r,n)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ew[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){var e;let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);let o=n.length-1,s=n[o];n[o]=ew[r](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,r])=>{t.getValue(e).set(r)}),this.resolveNoneKeyframes()}}function e9(e){return"function"==typeof e}function e8(){n=void 0}let e7={now:()=>(void 0===n&&e7.set(D.isProcessing||k.useManualTiming?D.timestamp:performance.now()),n),set:e=>{n=e,queueMicrotask(e8)}},te=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eQ.test(e)||"0"===e)&&!e.startsWith("url("));class tt{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=e7.now(),this.options={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(eI(),eC()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=e7.now(),this.hasAttemptedResolve=!0;let{name:r,type:n,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,r,n){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=te(i,t),a=te(o,t);return(0,Q.K)(s===a,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||e9(r))&&n)}(e,r,n,i)){if(S.current||!o){null==a||a(T(e,this.options,t)),null==s||s(),this.resolveFinishedPromise();return}this.options.duration=0}let c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function tr(e,t,r){var n,i;let o=Math.max(t-5,0);return n=r-e(o),(i=t-o)?1e3/i*n:0}function tn(e,t){return e*Math.sqrt(1-t*t)}let ti=["duration","bounce"],to=["stiffness","damping","mass"];function ts(e,t){return t.some(t=>void 0!==e[t])}function ta({keyframes:e,restDelta:t,restSpeed:r,...n}){let i;let o=e[0],s=e[e.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ts(e,to)&&ts(e,ti)){let r=function({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o;(0,Q.K)(e<=m(10),"Spring duration must be 10 seconds or less");let s=1-t;s=en(.05,1,s),e=en(.01,10,g(e)),s<1?(i=t=>{let n=t*s,i=n*e;return .001-(n-r)/tn(t,s)*Math.exp(-i)},o=t=>{let n=t*s*e,o=Math.pow(s,2)*Math.pow(t,2)*e,a=tn(Math.pow(t,2),s);return(n*r+r-o)*Math.exp(-n)*(-i(t)+.001>0?-1:1)/a}):(i=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),o=t=>e*e*(r-t)*Math.exp(-t*e));let a=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(i,o,5/e);if(e=m(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(a,2)*n;return{stiffness:t,damping:2*s*Math.sqrt(n*t),duration:e}}}(e);(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...n,velocity:-g(n.velocity||0)}),p=d||0,y=c/(2*Math.sqrt(l*u)),v=s-o,b=g(Math.sqrt(l/u)),w=5>Math.abs(v);if(r||(r=w?.01:2),t||(t=w?.005:.5),y<1){let e=tn(b,y);i=t=>s-Math.exp(-y*b*t)*((p+y*b*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}else if(1===y)i=e=>s-Math.exp(-b*e)*(v+(p+b*v)*e);else{let e=b*Math.sqrt(y*y-1);i=t=>{let r=Math.exp(-y*b*t),n=Math.min(e*t,300);return s-r*((p+y*b*v)*Math.sinh(n)+e*v*Math.cosh(n))/e}}return{calculatedDuration:f&&h||null,next:e=>{let n=i(e);if(f)a.done=e>=h;else{let o=0;y<1&&(o=0===e?m(p):tr(i,e,n));let l=Math.abs(o)<=r,c=Math.abs(s-n)<=t;a.done=l&&c}return a.value=a.done?s:n,a}}}function tl({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){let h,d;let f=e[0],p={done:!1,value:f},m=e=>void 0!==a&&e<a||void 0!==l&&e>l,g=e=>void 0===a?l:void 0===l?a:Math.abs(a-e)<Math.abs(l-e)?a:l,y=r*t,v=f+y,b=void 0===s?v:s(v);b!==v&&(y=b-f);let w=e=>-y*Math.exp(-e/n),_=e=>b+w(e),x=e=>{let t=w(e),r=_(e);p.done=Math.abs(t)<=c,p.value=p.done?b:r},k=e=>{m(p.value)&&(h=e,d=ta({keyframes:[p.value,g(p.value)],velocity:tr(_,e,p.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return(d||void 0!==h||(t=!0,x(e),k(e)),void 0!==h&&e>=h)?d.next(e-h):(t||x(e),p)}}}let tc=F(.42,0,1,1),tu=F(0,0,.58,1),th=F(.42,0,.58,1),td=e=>Array.isArray(e)&&"number"!=typeof e[0],tf=e=>Array.isArray(e)&&"number"==typeof e[0],tp={linear:A.Z,easeIn:tc,easeInOut:th,easeOut:tu,circIn:W,circInOut:G,circOut:H,backIn:V,backInOut:q,backOut:B,anticipate:$},tm=e=>{if(tf(e)){(0,Q.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,i]=e;return F(t,r,n,i)}return"string"==typeof e?((0,Q.k)(void 0!==tp[e],`Invalid easing type '${e}'`),tp[e]):e},tg=(e,t)=>r=>t(e(r)),ty=(...e)=>e.reduce(tg),tv=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n},tb=(e,t,r)=>e+(t-e)*r;function tw(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function t_(e,t){return r=>r>0?t:e}let tx=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},tk=[eF,eL,ez],tS=e=>tk.find(t=>t.test(e));function tE(e){let t=tS(e);if((0,Q.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===ez&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let i=0,o=0,s=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;i=tw(a,n,e+1/3),o=tw(a,n,e),s=tw(a,n,e-1/3)}else i=o=s=r;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:n}}(r)),r}let tT=(e,t)=>{let r=tE(e),n=tE(t);if(!r||!n)return t_(e,t);let i={...r};return e=>(i.red=tx(r.red,n.red,e),i.green=tx(r.green,n.green,e),i.blue=tx(r.blue,n.blue,e),i.alpha=tb(r.alpha,n.alpha,e),eL.transform(i))},tC=new Set(["none","hidden"]);function tI(e,t){return r=>tb(e,t,r)}function tP(e){return"number"==typeof e?tI:"string"==typeof e?ee(e)?t_:eU.test(e)?tT:tR:Array.isArray(e)?tA:"object"==typeof e?eU.test(e)?tT:tO:t_}function tA(e,t){let r=[...e],n=r.length,i=e.map((e,r)=>tP(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=i[t](e);return r}}function tO(e,t){let r={...e,...t},n={};for(let i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=tP(e[i])(e[i],t[i]));return e=>{for(let t in n)r[t]=n[t](e);return r}}let tR=(e,t)=>{let r=eQ.createTransformer(t),n=eW(e),i=eW(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?tC.has(e)&&!i.values.length||tC.has(t)&&!n.values.length?tC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e:ty(tA(function(e,t){var r;let n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let s=t.types[o],a=e.indexes[s][i[s]],l=null!==(r=e.values[a])&&void 0!==r?r:0;n[o]=l,i[s]++}return n}(n,i),i.values),r):((0,Q.K)(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),t_(e,t))};function tN(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?tb(e,t,r):tP(e)(e,t)}function tj({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let i=td(n)?n.map(tm):tm(n),o={done:!1,value:t[0]},s=function(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let o=e.length;if((0,Q.k)(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,r){let n=[],i=r||tN,o=e.length-1;for(let r=0;r<o;r++){let o=i(e[r],e[r+1]);t&&(o=ty(Array.isArray(t)?t[r]||A.Z:t,o)),n.push(o)}return n}(t,n,i),a=s.length,l=t=>{let r=0;if(a>1)for(;r<e.length-2&&!(t<e[r+1]);r++);let n=tv(e[r],e[r+1],t);return s[r](n)};return r?t=>l(en(e[0],e[o-1],t)):l}((r&&r.length===t.length?r:function(e){let t=[0];return function(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=tv(0,t,n);e.push(tb(r,1,i))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(i)?i:t.map(()=>i||th).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}let tD=e=>{let t=({timestamp:t})=>e(t);return{start:()=>N.update(t,!0),stop:()=>j(t),now:()=>D.isProcessing?D.timestamp:e7.now()}},tM={decay:tl,inertia:tl,tween:tj,keyframes:tj,spring:ta},tL=e=>e/100;class tF extends tt{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:r,element:n,keyframes:i}=this.options,o=(null==n?void 0:n.KeyframeResolver)||eP;this.resolver=new o(i,(e,t)=>this.onKeyframesResolved(e,t),t,r,n),this.resolver.scheduleResolve()}initPlayback(e){let t,r;let{type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=this.options,l=e9(n)?n:tM[n]||tj;l!==tj&&"number"!=typeof e[0]&&(t=ty(tL,tN(e[0],e[1])),e=[0,100]);let c=l({...this.options,keyframes:e});"mirror"===s&&(r=l({...this.options,keyframes:[...e].reverse(),velocity:-a})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}(c));let{calculatedDuration:u}=c,h=u+o;return{generator:c,mirroredGenerator:r,mapPercentToKeyframes:t,calculatedDuration:u,resolvedDuration:h,totalDuration:h*(i+1)-o}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:r}=this;if(!r){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:n,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=r;if(null===this.startTime)return i.next(0);let{delay:h,repeat:d,repeatType:f,repeatDelay:p,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=i;if(d){let e=Math.min(this.currentTime,c)/u,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,d+1))%2&&("reverse"===f?(r=1-r,p&&(r-=p/u)):"mirror"===f&&(b=o)),v=en(0,1,r)*u}let w=y?{done:!1,value:a[0]}:b.next(v);s&&(w.value=s(w.value));let{done:_}=w;y||null===l||(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);let x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&_);return x&&void 0!==n&&(w.value=T(a,this.options,n)),m&&m(w.value),x&&this.finish(),w}get duration(){let{resolved:e}=this;return e?g(e.calculatedDuration):0}get time(){return g(this.currentTime)}set time(e){e=m(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=g(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=tD,onPlay:t,startTime:r}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=n):this.startTime=null!=r?r:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let tz=new Set(["opacity","clipPath","filter","transform"]),tU=(e,t)=>{let r="",n=Math.max(Math.round(t/10),2);for(let t=0;t<n;t++)r+=e(tv(0,n-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function tB(e){let t;return()=>(void 0===t&&(t=e()),t)}let tV={linearEasing:void 0},tq=function(e,t){let r=tB(e);return()=>{var e;return null!==(e=tV[t])&&void 0!==e?e:r()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),t$=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,tW={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:t$([0,.65,.55,1]),circOut:t$([.55,0,1,.45]),backIn:t$([.31,.01,.66,-.59]),backOut:t$([.33,1.53,.69,.99])};function tH(e,t){e.timeline=t,e.onfinish=null}let tG=tB(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tK={anticipate:$,backInOut:q,circInOut:G};class tQ extends tt{constructor(e){super(e);let{name:t,motionValue:r,element:n,keyframes:i}=this.options;this.resolver=new e3(i,(e,t)=>this.onKeyframesResolved(e,t),t,r,n),this.resolver.scheduleResolve()}initPlayback(e,t){var r,n;let{duration:i=300,times:o,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!(null===(r=l.owner)||void 0===r?void 0:r.current))return!1;if("string"==typeof s&&tq()&&s in tK&&(s=tK[s]),e9((n=this.options).type)||"spring"===n.type||!function e(t){return!!("function"==typeof t&&tq()||!t||"string"==typeof t&&(t in tW||tq())||tf(t)||Array.isArray(t)&&t.every(e))}(n.ease)){let{onComplete:t,onUpdate:r,motionValue:n,element:l,...c}=this.options,u=function(e,t){let r=new tF({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},i=[],o=0;for(;!n.done&&o<2e4;)i.push((n=r.sample(o)).value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),i=u.duration,o=u.times,s=u.ease,a="keyframes"}let h=function(e,t,r,{delay:n=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){let c={[t]:r};l&&(c.offset=l);let u=function e(t,r){if(t)return"function"==typeof t&&tq()?tU(t,r):tf(t)?t$(t):Array.isArray(t)?t.map(t=>e(t,r)||tW.easeOut):tW[t]}(a,i);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:s});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(tH(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{let{onComplete:r}=this.options;l.set(T(e,this.options,t)),r&&r(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:o,type:a,ease:s,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return g(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return g(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.currentTime=m(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return A.Z;let{animation:r}=t;tH(r,e)}else this.pendingTimeline=e;return A.Z}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:r,duration:n,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new tF({...c,keyframes:r,duration:n,type:i,ease:o,times:s,isGenerator:!0}),h=m(this.time);e.setWithVelocity(u.sample(h-10).value,u.sample(h).value,10)}let{onStop:a}=this.options;a&&a(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:o,type:s}=e;return tG()&&r&&tz.has(r)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!n&&"mirror"!==i&&0!==o&&"inertia"!==s}}let tY=tB(()=>void 0!==window.ScrollTimeline);class tX{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=t}attachTimeline(e,t){let r=this.animations.map(r=>tY()&&r.attachTimeline?r.attachTimeline(e):t(r));return()=>{r.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}let tJ=(e,t,r,n={},i,o)=>s=>{let a=x(n,e)||{},l=a.delay||n.delay||0,{elapsed:c=0}=n;c-=m(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(a)&&(u={...u,..._(e,u)}),u.duration&&(u.duration=m(u.duration)),u.repeatDelay&&(u.repeatDelay=m(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(u.duration=0,0!==u.delay||(h=!0)),(S.current||k.skipAnimations)&&(h=!0,u.duration=0,u.delay=0),h&&!o&&void 0!==t.get()){let e=T(u.keyframes,a);if(void 0!==e)return N.update(()=>{u.onUpdate(e),u.onComplete()}),new tX([])}return!o&&tQ.supports(u)?new tQ(u):new tF(u)},tZ=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),t0=e=>o(e)?e[e.length-1]||0:e;function t1(e,t){-1===e.indexOf(t)&&e.push(t)}function t2(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class t4{constructor(){this.subscriptions=[]}add(e){return t1(this.subscriptions,e),()=>t2(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){let n=this.subscriptions[i];n&&n(e,t,r)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let t5=e=>!isNaN(parseFloat(e)),t6={current:void 0};class t3{constructor(e,t={}){this.version="11.11.10",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let r=e7.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=e7.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=t5(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new t4);let r=this.events[e].add(t);return"change"===e?()=>{r(),N.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return t6.current&&t6.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=e7.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t9(e,t){return new t3(e,t)}let t8=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),t7="data-"+t8("framerAppearId"),re=e=>!!(e&&e.getVelocity);function rt(e,t){let r=e.getValue("willChange");if(re(r)&&r.add)return r.add(t)}function rr(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(s=n);let c=[],h=i&&e.animationState&&e.animationState.getState()[i];for(let t in l){let n=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),i=l[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(h,t))continue;let a={delay:r,...x(s||{},t)},u=!1;if(window.MotionHandoffAnimation){let r=e.props[t7];if(r){let e=window.MotionHandoffAnimation(r,t,N);null!==e&&(a.startTime=e,u=!0)}}rt(e,t),n.start(tJ(t,n,i,e.shouldReduceMotion&&p.has(t)?{type:!1}:a,e,u));let d=n.animation;d&&c.push(d)}return a&&Promise.all(c).then(()=>{N.update(()=>{a&&function(e,t){let{transitionEnd:r={},transition:n={},...i}=u(e,t)||{};for(let t in i={...i,...r}){let r=t0(i[t]);e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,t9(r))}}(e,a)})}),c}function rn(e,t,r={}){var n;let i=u(e,t,"exit"===r.type?null===(n=e.presenceContext)||void 0===n?void 0:n.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);let s=i?()=>Promise.all(rr(e,i,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,r=0,n=0,i=1,o){let s=[],a=(e.variantChildren.size-1)*n,l=1===i?(e=0)=>e*n:(e=0)=>a-e*n;return Array.from(e.variantChildren).sort(ri).forEach((e,n)=>{e.notify("AnimationStart",t),s.push(rn(e,t,{...o,delay:r+l(n)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,i+n,s,a,r)}:()=>Promise.resolve(),{when:l}=o;if(!l)return Promise.all([s(),a(r.delay)]);{let[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}}function ri(e,t){return e.sortNodePosition(t)}let ro=d.length,rs=[...h].reverse(),ra=h.length;function rl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rc(){return{animate:rl(!0),whileInView:rl(),whileHover:rl(),whileTap:rl(),whileDrag:rl(),whileFocus:rl(),exit:rl()}}class ru{constructor(e){this.isMounted=!1,this.node=e}update(){}}class rh extends ru{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>rn(e,t,r)));else if("string"==typeof t)n=rn(e,t,r);else{let i="function"==typeof t?u(e,t,r.custom):t;n=Promise.all(rr(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})})(e,t,r))),r=rc(),n=!0,l=t=>(r,n)=>{var i;let o=u(e,n,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){let{transition:e,transitionEnd:t,...n}=o;r={...r,...n,...t}}return r};function c(c){let{props:u}=e,h=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;e<ro;e++){let n=d[e],i=t.props[n];(a(i)||!1===i)&&(r[n]=i)}return r}(e.parent)||{},f=[],p=new Set,m={},g=1/0;for(let t=0;t<ra;t++){var y;let d=rs[t],v=r[d],b=void 0!==u[d]?u[d]:h[d],w=a(b),_=d===c?v.isActive:null;!1===_&&(g=t);let x=b===h[d]&&b!==u[d]&&w;if(x&&n&&e.manuallyAnimateOnMount&&(x=!1),v.protectedKeys={...m},!v.isActive&&null===_||!b&&!v.prevProp||i(b)||"boolean"==typeof b)continue;let k=(y=v.prevProp,"string"==typeof b?b!==y:!!Array.isArray(b)&&!s(b,y)),S=k||d===c&&v.isActive&&!x&&w||t>g&&w,E=!1,T=Array.isArray(b)?b:[b],C=T.reduce(l(d),{});!1===_&&(C={});let{prevResolvedValues:I={}}=v,P={...I,...C},A=t=>{S=!0,p.has(t)&&(E=!0,p.delete(t)),v.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in P){let t=C[e],r=I[e];if(!m.hasOwnProperty(e))(o(t)&&o(r)?s(t,r):t===r)?void 0!==t&&p.has(e)?A(e):v.protectedKeys[e]=!0:null!=t?A(e):p.add(e)}v.prevProp=b,v.prevResolvedValues=C,v.isActive&&(m={...m,...C}),n&&e.blockInitialAnimation&&(S=!1);let O=!(x&&k)||E;S&&O&&f.push(...T.map(e=>({animation:e,options:{type:d}})))}if(p.size){let t={};p.forEach(r=>{let n=e.getBaseTarget(r),i=e.getValue(r);i&&(i.liveStyle=!0),t[r]=null!=n?n:null}),f.push({animation:t})}let v=!!f.length;return n&&(!1===u.initial||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,v?t(f):Promise.resolve()}return{animateChanges:c,setActive:function(t,n){var i;if(r[t].isActive===n)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)}),r[t].isActive=n;let o=c(t);for(let e in r)r[e].protectedKeys={};return o},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=rc(),n=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();i(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}let rd=0;class rf extends ru{constructor(){super(...arguments),this.id=rd++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}let rp=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rm(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}let rg=e=>t=>rp(t)&&e(t,rm(t));function ry(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function rv(e,t,r,n){return ry(e,t,rg(r),n)}let rb=(e,t)=>Math.abs(e-t);class rw{constructor(e,t,{transformPagePoint:r,contextWindow:n,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=rk(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,i=(e=r.offset,t={x:0,y:0},Math.sqrt(rb(e.x,t.x)**2+rb(e.y,t.y)**2)>=3);if(!n&&!i)return;let{point:o}=r,{timestamp:s}=D;this.history.push({...o,timestamp:s});let{onStart:a,onMove:l}=this.handlers;n||(a&&a(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=r_(t,this.transformPagePoint),N.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:n,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=rk("pointercancel"===e.type?this.lastMoveEventInfo:r_(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,o),n&&n(e,o)},!rp(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.contextWindow=n||window;let o=r_(rm(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=D;this.history=[{...s,timestamp:a}];let{onSessionStart:l}=t;l&&l(e,rk(o,this.history)),this.removeListeners=ty(rv(this.contextWindow,"pointermove",this.handlePointerMove),rv(this.contextWindow,"pointerup",this.handlePointerUp),rv(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),j(this.updatePoint)}}function r_(e,t){return t?{point:t(e.point)}:e}function rx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rk({point:e},t){return{point:e,delta:rx(e,rS(t)),offset:rx(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,i=rS(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>m(.1)));)r--;if(!n)return{x:0,y:0};let o=g(i.timestamp-n.timestamp);if(0===o)return{x:0,y:0};let s={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,0)}}function rS(e){return e[e.length-1]}function rE(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let rT=rE("dragHorizontal"),rC=rE("dragVertical");function rI(e){let t=!1;if("y"===e)t=rC();else if("x"===e)t=rT();else{let e=rT(),r=rC();e&&r?t=()=>{e(),r()}:(e&&e(),r&&r())}return t}function rP(){let e=rI(!0);return!e||(e(),!1)}function rA(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function rO(e){return e.max-e.min}function rR(e,t,r,n=.5){e.origin=n,e.originPoint=tb(t.min,t.max,e.origin),e.scale=rO(r)/rO(t),e.translate=tb(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rN(e,t,r,n){rR(e.x,t.x,r.x,n?n.originX:void 0),rR(e.y,t.y,r.y,n?n.originY:void 0)}function rj(e,t,r){e.min=r.min+t.min,e.max=e.min+rO(t)}function rD(e,t,r){e.min=t.min-r.min,e.max=e.min+rO(t)}function rM(e,t,r){rD(e.x,t.x,r.x),rD(e.y,t.y,r.y)}function rL(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function rF(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function rz(e,t,r){return{min:rU(e,t),max:rU(e,r)}}function rU(e,t){return"number"==typeof e?e:e[t]||0}let rB=()=>({translate:0,scale:1,origin:0,originPoint:0}),rV=()=>({x:rB(),y:rB()}),rq=()=>({min:0,max:0}),r$=()=>({x:rq(),y:rq()});function rW(e){return[e("x"),e("y")]}function rH({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function rG(e){return void 0===e||1===e}function rK({scale:e,scaleX:t,scaleY:r}){return!rG(e)||!rG(t)||!rG(r)}function rQ(e){return rK(e)||rY(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rY(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function rX(e,t,r,n,i){return void 0!==i&&(e=n+i*(e-n)),n+r*(e-n)+t}function rJ(e,t=0,r=1,n,i){e.min=rX(e.min,t,r,n,i),e.max=rX(e.max,t,r,n,i)}function rZ(e,{x:t,y:r}){rJ(e.x,t.translate,t.scale,t.originPoint),rJ(e.y,r.translate,r.scale,r.originPoint)}function r0(e,t){e.min=e.min+t,e.max=e.max+t}function r1(e,t,r,n,i=.5){let o=tb(e.min,e.max,i);rJ(e,t,r,o,n)}function r2(e,t){r1(e.x,t.x,t.scaleX,t.scale,t.originX),r1(e.y,t.y,t.scaleY,t.scale,t.originY)}function r4(e,t){return rH(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}let r5=({current:e})=>e?e.ownerDocument.defaultView:null,r6=new WeakMap;class r3{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=r$(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let{dragSnapToOrigin:n}=this.getProps();this.panSession=new rw(e,{onSessionStart:e=>{let{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(rm(e,"page").point)},onStart:(e,t)=>{let{drag:r,dragPropagation:n,onDragStart:i}=this.getProps();if(r&&!n&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=rI(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rW(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ec.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let n=r.layout.layoutBox[e];if(n){let e=rO(n);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),i&&N.postRender(()=>i(e,t)),rt(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{let{dragPropagation:r,dragDirectionLock:n,onDirectionLock:i,onDrag:o}=this.getProps();if(!r&&!this.openGlobalLock)return;let{offset:s}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>rW(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:n,contextWindow:r5(this.visualElement)})}stop(e,t){let r=this.isDragging;if(this.cancel(),!r)return;let{velocity:n}=t;this.startAnimation(n);let{onDragEnd:i}=this.getProps();i&&N.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){let{drag:n}=this.getProps();if(!r||!r9(e,n,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?tb(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?tb(r,e,n.max):Math.min(e,r)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&rA(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=function(e,{top:t,left:r,bottom:n,right:i}){return{x:rL(e.x,r,i),y:rL(e.y,t,n)}}(n.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:rz(e,"left","right"),y:rz(e,"top","bottom")}}(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&rW(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!rA(t))return!1;let n=t.current;(0,Q.k)(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,r){let n=r4(e,r),{scroll:i}=t;return i&&(r0(n.x,i.offset.x),r0(n.y,i.offset.y)),n}(n,i.root,this.visualElement.getTransformPagePoint()),s={x:rF((e=i.layout.layoutBox).x,o.x),y:rF(e.y,o.y)};if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=rH(e))}return s}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(rW(s=>{if(!r9(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});let c={type:"inertia",velocity:r?e[s]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,c)})).then(s)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return rt(this.visualElement,e),r.start(tJ(e,r,0,t,this.visualElement,!1))}stopAnimation(){rW(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rW(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){rW(t=>{let{drag:r}=this.getProps();if(!r9(t,r,this.currentDirection))return;let{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){let{min:r,max:o}=n.layout.layoutBox[t];i.set(e[t]-tb(r,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!rA(t)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};rW(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let r=t.get();n[e]=function(e,t){let r=.5,n=rO(e),i=rO(t);return i>n?r=tv(t.min,t.max-n,e.min):n>i&&(r=tv(e.min,e.max-i,t.min)),en(0,1,r)}({min:r,max:r},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rW(t=>{if(!r9(t,e,null))return;let r=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];r.set(tb(i,o,n[t]))})}addListeners(){if(!this.visualElement.current)return;r6.set(this.visualElement,this);let e=rv(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();rA(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),N.read(t);let i=ry(window,"resize",()=>this.scalePositionWithinConstraints()),o=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rW(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),n(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function r9(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}class r8 extends ru{constructor(e){super(e),this.removeGroupControls=A.Z,this.removeListeners=A.Z,this.controls=new r3(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||A.Z}unmount(){this.removeGroupControls(),this.removeListeners()}}let r7=e=>(t,r)=>{e&&N.postRender(()=>e(t,r))};class ne extends ru{constructor(){super(...arguments),this.removePointerDownListener=A.Z}onPointerDown(e){this.session=new rw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:r5(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:r7(e),onStart:r7(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&N.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=rv(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var nt=r(85893),nr=r(67294),nn=r(15947),ni=r(25364);let no=(0,nr.createContext)({}),ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function na(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let nl={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!eu.test(e))return e;e=parseFloat(e)}let r=na(e,t.target.x),n=na(e,t.target.y);return`${r}% ${n}%`}},nc={},{schedule:nu,cancel:nh}=R(queueMicrotask,!1);class nd extends nr.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;Object.assign(nc,np),i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,n||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||N.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),nu.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function nf(e){let[t,r]=(0,nn.oO)(),n=(0,nr.useContext)(ni.p);return(0,nt.jsx)(nd,{...e,layoutGroup:n,switchLayoutGroup:(0,nr.useContext)(no),isPresent:t,safeToRemove:r})}let np={borderRadius:{...nl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nl,borderTopRightRadius:nl,borderBottomLeftRadius:nl,borderBottomRightRadius:nl,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let n=eQ.parse(e);if(n.length>5)return e;let i=eQ.createTransformer(e),o="number"!=typeof n[0]?1:0,s=r.x.scale*t.x,a=r.y.scale*t.y;n[0+o]/=s,n[1+o]/=a;let l=tb(s,a,.5);return"number"==typeof n[2+o]&&(n[2+o]/=l),"number"==typeof n[3+o]&&(n[3+o]/=l),i(n)}}},nm=["TopLeft","TopRight","BottomLeft","BottomRight"],ng=nm.length,ny=e=>"string"==typeof e?parseFloat(e):e,nv=e=>"number"==typeof e||eu.test(e);function nb(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let nw=nx(0,.5,H),n_=nx(.5,.95,A.Z);function nx(e,t,r){return n=>n<e?0:n>t?1:r(tv(e,t,n))}function nk(e,t){e.min=t.min,e.max=t.max}function nS(e,t){nk(e.x,t.x),nk(e.y,t.y)}function nE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nT(e,t,r,n,i){return e-=t,e=n+1/r*(e-n),void 0!==i&&(e=n+1/i*(e-n)),e}function nC(e,t,[r,n,i],o,s){!function(e,t=0,r=1,n=.5,i,o=e,s=e){if(ec.test(t)&&(t=parseFloat(t),t=tb(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=tb(o.min,o.max,n);e===o&&(a-=t),e.min=nT(e.min,t,r,a,i),e.max=nT(e.max,t,r,a,i)}(e,t[r],t[n],t[i],t.scale,o,s)}let nI=["x","scaleX","originX"],nP=["y","scaleY","originY"];function nA(e,t,r,n){nC(e.x,t,nI,r?r.x:void 0,n?n.x:void 0),nC(e.y,t,nP,r?r.y:void 0,n?n.y:void 0)}function nO(e){return 0===e.translate&&1===e.scale}function nR(e){return nO(e.x)&&nO(e.y)}function nN(e,t){return e.min===t.min&&e.max===t.max}function nj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nD(e,t){return nj(e.x,t.x)&&nj(e.y,t.y)}function nM(e){return rO(e.x)/rO(e.y)}function nL(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nF{constructor(){this.members=[]}add(e){t1(this.members,e),e.scheduleRender()}remove(e){if(t2(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let r=this.members.findIndex(t=>e===t);if(0===r)return!1;for(let e=r;e>=0;e--){let r=this.members[e];if(!1!==r.isPresent){t=r;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:n}=e.options;!1===n&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let nz=(e,t)=>e.depth-t.depth;class nU{constructor(){this.children=[],this.isDirty=!1}add(e){t1(this.children,e),this.isDirty=!0}remove(e){t2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nz),this.isDirty=!1,this.children.forEach(e)}}function nB(e){let t=re(e)?e.get():e;return tZ(t)?t.toValue():t}let nV={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},nq="undefined"!=typeof window&&void 0!==window.MotionDebug,n$=["","X","Y","Z"],nW={visibility:"hidden"},nH=0;function nG(e,t,r,n){let{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function nK({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e={},r=null==t?void 0:t()){this.id=nH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,nq&&(nV.totalNodes=nV.resolvedTargetDeltas=nV.recalculatedProjection=0),this.nodes.forEach(nX),this.nodes.forEach(n5),this.nodes.forEach(n6),this.nodes.forEach(nJ),nq&&window.MotionDebug.record(nV)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new nU)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new t4),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,r=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:n,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),r&&(i||n)&&(this.isLayoutDirty=!0),e){let r;let n=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,r&&r(),r=function(e,t){let r=e7.now(),n=({timestamp:t})=>{let i=t-r;i>=250&&(j(n),e(i-250))};return N.read(n,!0),()=>j(n)}(n,0),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(n4))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||o.getDefaultTransition()||it,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!nD(this.targetLayout,n)||r,c=!t&&r;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);let t={...x(i,"layout"),onPlay:s,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||n4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,j(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(n3),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let n=r.props[t7];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",N,!(e||r))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(n0);return}this.isUpdating||this.nodes.forEach(n1),this.isUpdating=!1,this.nodes.forEach(n2),this.nodes.forEach(nQ),this.nodes.forEach(nY),this.clearAllSnapshots();let e=e7.now();D.delta=en(0,1e3/60,e-D.timestamp),D.timestamp=e,D.isProcessing=!0,M.update.process(D),M.preRender.process(D),M.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nZ),this.sharedNodes.forEach(n9)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,N.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){N.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=r$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!nR(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,o=n!==this.prevTransformTemplateValue;e&&(t||rQ(this.latestValues)||o)&&(i(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),n=this.removeElementScroll(r);return e&&(n=this.removeTransform(n)),io((t=n).x),io(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return r$();let r=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(ia))){let{scroll:e}=this.root;e&&(r0(r.x,e.offset.x),r0(r.y,e.offset.y))}return r}removeElementScroll(e){var t;let r=r$();if(nS(r,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return r;for(let t=0;t<this.path.length;t++){let n=this.path[t],{scroll:i,options:o}=n;n!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&nS(r,e),r0(r.x,i.offset.x),r0(r.y,i.offset.y))}return r}applyTransform(e,t=!1){let r=r$();nS(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&r2(r,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),rQ(n.latestValues)&&r2(r,n.latestValues)}return rQ(this.latestValues)&&r2(r,this.latestValues),r}removeTransform(e){let t=r$();nS(t,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];if(!r.instance||!rQ(r.latestValues))continue;rK(r.latestValues)&&r.updateSnapshot();let n=r$();nS(n,r.measurePageBox()),nA(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,n)}return rQ(this.latestValues)&&nA(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t,r,n,i;let o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);let s=!!this.resumingFrom||this!==o;if(!(e||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:a,layoutId:l}=this.options;if(this.layout&&(a||l)){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=r$(),this.relativeTargetOrigin=r$(),rM(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),nS(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=r$(),this.targetWithTransforms=r$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),r=this.target,n=this.relativeTarget,i=this.relativeParent.target,rj(r.x,n.x,i.x),rj(r.y,n.y,i.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nS(this.target,this.layout.layoutBox),rZ(this.target,this.targetDelta)):nS(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=r$(),this.relativeTargetOrigin=r$(),rM(this.relativeTargetOrigin,this.target,e.target),nS(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}nq&&nV.resolvedTargetDeltas++}}}getClosestProjectingParent(){return!this.parent||rK(this.parent.latestValues)||rY(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),r=!!this.resumingFrom||this!==t,n=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(n=!1),r&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===D.timestamp&&(n=!1),n)return;let{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||o))return;nS(this.layoutCorrected,this.layout.layoutBox);let s=this.treeScale.x,a=this.treeScale.y;!function(e,t,r,n=!1){let i,o;let s=r.length;if(s){t.x=t.y=1;for(let a=0;a<s;a++){o=(i=r[a]).projectionDelta;let{visualElement:s}=i.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&r2(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,rZ(e,o)),n&&rQ(i.latestValues)&&r2(e,i.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,r),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=r$());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nE(this.prevProjectionDelta.x,this.projectionDelta.x),nE(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rN(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&nL(this.projectionDelta.x,this.prevProjectionDelta.x)&&nL(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),nq&&nV.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rV(),this.projectionDelta=rV(),this.projectionDeltaWithTransform=rV()}setAnimationOrigin(e,t=!1){let r;let n=this.snapshot,i=n?n.latestValues:{},o={...this.latestValues},s=rV();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let a=r$(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(ie));this.animationProgress=0,this.mixTargetDelta=t=>{let n=t/1e3;if(n8(s.x,e.x,n),n8(s.y,e.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,d,f,p;rM(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,p=this.relativeTargetOrigin,n7(f.x,p.x,a.x,n),n7(f.y,p.y,a.y,n),r&&(c=this.relativeTarget,d=r,nN(c.x,d.x)&&nN(c.y,d.y))&&(this.isProjectionDirty=!1),r||(r=r$()),nS(r,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,r,n,i,o){i?(e.opacity=tb(0,void 0!==r.opacity?r.opacity:1,nw(n)),e.opacityExit=tb(void 0!==t.opacity?t.opacity:1,0,n_(n))):o&&(e.opacity=tb(void 0!==t.opacity?t.opacity:1,void 0!==r.opacity?r.opacity:1,n));for(let i=0;i<ng;i++){let o=`border${nm[i]}Radius`,s=nb(t,o),a=nb(r,o);(void 0!==s||void 0!==a)&&(s||(s=0),a||(a=0),0===s||0===a||nv(s)===nv(a)?(e[o]=Math.max(tb(ny(s),ny(a),n),0),(ec.test(a)||ec.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||r.rotate)&&(e.rotate=tb(t.rotate||0,r.rotate||0,n))}(o,i,this.latestValues,n,h,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(j(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=N.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,r){let n=re(0)?0:t9(0);return n.start(tJ("",n,1e3,r)),n.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:n,latestValues:i}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&is(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||r$();let t=rO(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let n=rO(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}nS(t,r),r2(t,i),rN(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new nF),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let n={};r.z&&nG("z",e,n,this.animationValues);for(let t=0;t<n$.length;t++)nG(`rotate${n$[t]}`,e,n,this.animationValues),nG(`skew${n$[t]}`,e,n,this.animationValues);for(let t in e.render(),n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}getProjectionStyles(e){var t,r;if(!this.instance||this.isSVG)return;if(!this.isVisible)return nW;let n={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,n.opacity="",n.pointerEvents=nB(null==e?void 0:e.pointerEvents)||"",n.transform=i?i(this.latestValues,""):"none",n;let o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=nB(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!rQ(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}let s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),n.transform=function(e,t,r){let n="",i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==r?void 0:r.z)||0;if((i||o||s)&&(n=`translate3d(${i}px, ${o}px, ${s}px) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),i&&(n+=`rotateX(${i}deg) `),o&&(n+=`rotateY(${o}deg) `),s&&(n+=`skewX(${s}deg) `),a&&(n+=`skewY(${a}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==a||1!==l)&&(n+=`scale(${a}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(n.transform=i(s,n.transform));let{x:a,y:l}=this.projectionDelta;for(let e in n.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?n.opacity=o===this?null!==(r=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==r?r:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:n.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,nc){if(void 0===s[e])continue;let{correct:t,applyTo:r}=nc[e],i="none"===n.transform?s[e]:t(s[e],o);if(r){let e=r.length;for(let t=0;t<e;t++)n[r[t]]=i}else n[e]=i}return this.options.layoutId&&(n.pointerEvents=o===this?nB(null==e?void 0:e.pointerEvents)||"":"none"),n}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(n0),this.root.sharedNodes.clear()}}}function nQ(e){e.updateLayout()}function nY(e){var t;let r=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:n}=e.layout,{animationType:i}=e.options,o=r.source!==e.layout.source;"size"===i?rW(e=>{let n=o?r.measuredBox[e]:r.layoutBox[e],i=rO(n);n.min=t[e].min,n.max=n.min+i}):is(i,r.layoutBox,t)&&rW(n=>{let i=o?r.measuredBox[n]:r.layoutBox[n],s=rO(t[n]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+s)});let s=rV();rN(s,t,r.layoutBox);let a=rV();o?rN(a,e.applyTransform(n,!0),r.measuredBox):rN(a,t,r.layoutBox);let l=!nR(s),c=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:i,layout:o}=n;if(i&&o){let s=r$();rM(s,r.layoutBox,i.layoutBox);let a=r$();rM(a,t,o.layoutBox),nD(s,a)||(c=!0),n.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:r,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function nX(e){nq&&nV.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nJ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nZ(e){e.clearSnapshot()}function n0(e){e.clearMeasurements()}function n1(e){e.isLayoutDirty=!1}function n2(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function n4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n5(e){e.resolveTargetDelta()}function n6(e){e.calcProjection()}function n3(e){e.resetSkewAndRotation()}function n9(e){e.removeLeadSnapshot()}function n8(e,t,r){e.translate=tb(t.translate,0,r),e.scale=tb(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function n7(e,t,r,n){e.min=tb(t.min,r.min,n),e.max=tb(t.max,r.max,n)}function ie(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let it={duration:.45,ease:[.4,0,.1,1]},ir=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ii=ir("applewebkit/")&&!ir("chrome/")?Math.round:A.Z;function io(e){e.min=ii(e.min),e.max=ii(e.max)}function is(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(nM(t)-nM(r)))}function ia(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let il=nK({attachResizeListener:(e,t)=>ry(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ic={current:void 0},iu=nK({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ic.current){let e=new il({});e.mount(window),e.setOptions({layoutScroll:!0}),ic.current=e}return ic.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function ih(e,t){let r=t?"onHoverStart":"onHoverEnd";return rv(e.current,t?"pointerenter":"pointerleave",(n,i)=>{if("touch"===n.pointerType||rP())return;let o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);let s=o[r];s&&N.postRender(()=>s(n,i))},{passive:!e.getProps()[r]})}class id extends ru{mount(){this.unmount=ty(ih(this.node,!0),ih(this.node,!1))}unmount(){}}class ip extends ru{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ty(ry(this.node.current,"focus",()=>this.onFocus()),ry(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let im=(e,t)=>!!t&&(e===t||im(e,t.parentElement));function ig(e,t){if(!t)return;let r=new PointerEvent("pointer"+e);t(r,rm(r))}class iy extends ru{constructor(){super(...arguments),this.removeStartListeners=A.Z,this.removeEndListeners=A.Z,this.removeAccessibleListeners=A.Z,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();let r=this.node.getProps(),n=rv(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;let{onTap:r,onTapCancel:n,globalTapTarget:i}=this.node.getProps(),o=i||im(this.node.current,e.target)?r:n;o&&N.update(()=>o(e,t))},{passive:!(r.onTap||r.onPointerUp)}),i=rv(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ty(n,i),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=ry(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=ry(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&ig("up",(e,t)=>{let{onTap:r}=this.node.getProps();r&&N.postRender(()=>r(e,t))})}),ig("down",(e,t)=>{this.startPress(e,t)}))}),t=ry(this.node.current,"blur",()=>{this.isPressing&&ig("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=ty(e,t)}}startPress(e,t){this.isPressing=!0;let{onTapStart:r,whileTap:n}=this.node.getProps();n&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&N.postRender(()=>r(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!rP()}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:r}=this.node.getProps();r&&N.postRender(()=>r(e,t))}mount(){let e=this.node.getProps(),t=rv(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=ry(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ty(t,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let iv=new WeakMap,ib=new WeakMap,iw=e=>{let t=iv.get(e.target);t&&t(e)},i_=e=>{e.forEach(iw)},ix={some:0,all:1};class ik extends ru{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:ix[n]};return function(e,t,r){let n=function({root:e,...t}){let r=e||document;ib.has(r)||ib.set(r,{});let n=ib.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(i_,{root:e,...t})),n[i]}(t);return iv.set(e,r),n.observe(e),()=>{iv.delete(e),n.unobserve(e)}}(this.node.current,o,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),o=t?r:n;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}var iS=r(16014);let iE=(0,nr.createContext)({});var iT=r(240),iC=r(58868);let iI=(0,nr.createContext)({strict:!1});function iP(e){return i(e.animate)||d.some(t=>a(e[t]))}function iA(e){return!!(iP(e)||e.variants)}function iO(e){return Array.isArray(e)?e.join(" "):e}let iR={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iN={};for(let e in iR)iN[e]={isEnabled:t=>iR[e].some(e=>!!t[e])};var ij=r(11741);let iD=Symbol.for("motionComponentSymbol"),iM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function iL(e){if("string"!=typeof e||e.includes("-"));else if(iM.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}function iF(e,{style:t,vars:r},n,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(n)),r)e.style.setProperty(o,r[o])}let iz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function iU(e,t,r,n){for(let r in iF(e,t,void 0,n),t.attrs)e.setAttribute(iz.has(r)?r:t8(r),t.attrs[r])}function iB(e,{layout:t,layoutId:r}){return p.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!nc[e]||"opacity"===e)}function iV(e,t,r){var n;let{style:i}=e,o={};for(let s in i)(re(i[s])||t.style&&re(t.style[s])||iB(s,e)||(null===(n=null==r?void 0:r.getValue(s))||void 0===n?void 0:n.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function iq(e,t,r){let n=iV(e,t,r);for(let r in e)(re(e[r])||re(t[r]))&&(n[-1!==f.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}var i$=r(96681);let iW=e=>(t,r)=>{let n=(0,nr.useContext)(iE),o=(0,nr.useContext)(iT.O),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,o,s){let a={latestValues:function(e,t,r,n){let o={},s=n(e,{});for(let e in s)o[e]=nB(s[e]);let{initial:a,animate:l}=e,u=iP(e),h=iA(e);t&&h&&!u&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===l&&(l=t.animate));let d=!!r&&!1===r.initial,f=(d=d||!1===a)?l:a;if(f&&"boolean"!=typeof f&&!i(f)){let t=Array.isArray(f)?f:[f];for(let r=0;r<t.length;r++){let n=c(e,t[r]);if(n){let{transitionEnd:e,transition:t,...r}=n;for(let e in r){let t=r[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(o[e]=t)}for(let t in e)o[t]=e[t]}}}return o}(n,o,s,e),renderState:t()};return r&&(a.mount=e=>r(n,e,a)),a})(e,t,n,o);return r?s():(0,i$.h)(s)},iH=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),iG=()=>({...iH(),attrs:{}}),iK=(e,t)=>t&&"number"==typeof e?t.transform(e):e,iQ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iY=f.length;function iX(e,t,r){let{style:n,vars:i,transformOrigin:o}=e,s=!1,a=!1;for(let e in t){let r=t[e];if(p.has(e)){s=!0;continue}if(J(e)){i[e]=r;continue}{let t=iK(r,e1[e]);e.startsWith("origin")?(a=!0,o[e]=t):n[e]=t}}if(!t.transform&&(s||r?n.transform=function(e,t,r){let n="",i=!0;for(let o=0;o<iY;o++){let s=f[o],a=e[s];if(void 0===a)continue;let l=!0;if(!(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a))||r){let e=iK(a,e1[s]);if(!l){i=!1;let t=iQ[s]||s;n+=`${t}(${e}) `}r&&(t[s]=e)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),a){let{originX:e="50%",originY:t="50%",originZ:r=0}=o;n.transformOrigin=`${e} ${t} ${r}`}}function iJ(e,t,r){return"string"==typeof e?e:eu.transform(t+r*e)}let iZ={offset:"stroke-dashoffset",array:"stroke-dasharray"},i0={offset:"strokeDashoffset",array:"strokeDasharray"};function i1(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,h){if(iX(e,c,h),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f,dimensions:p}=e;d.transform&&(p&&(f.transform=d.transform),delete d.transform),p&&(void 0!==i||void 0!==o||f.transform)&&(f.transformOrigin=function(e,t,r){let n=iJ(t,e.x,e.width),i=iJ(r,e.y,e.height);return`${n} ${i}`}(p,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(d.x=t),void 0!==r&&(d.y=r),void 0!==n&&(d.scale=n),void 0!==s&&function(e,t,r=1,n=0,i=!0){e.pathLength=1;let o=i?iZ:i0;e[o.offset]=eu.transform(-n);let s=eu.transform(t),a=eu.transform(r);e[o.array]=`${s} ${a}`}(d,s,a,l,!1)}let i2=e=>"string"==typeof e&&"svg"===e.toLowerCase(),i4={useVisualState:iW({scrapeMotionValuesFromProps:iq,createRenderState:iG,onMount:(e,t,{renderState:r,latestValues:n})=>{N.read(()=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}}),N.render(()=>{i1(r,n,i2(t.tagName),e.transformTemplate),iU(t,r)})}})},i5={useVisualState:iW({scrapeMotionValuesFromProps:iV,createRenderState:iH})};function i6(e,t,r){for(let n in t)re(t[n])||iB(n,r)||(e[n]=t[n])}let i3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function i9(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||i3.has(e)}let i8=e=>!i9(e);try{(C=require("@emotion/is-prop-valid").default)&&(i8=e=>e.startsWith("on")?!i9(e):C(e))}catch(e){}let i7={current:null},oe={current:!1},ot=new WeakMap,or=[...ex,eU,eQ],on=e=>or.find(e_(e)),oi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class oo{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eP,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=e7.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,N.render(this.render,!1,!0))};let{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=iP(t),this.isVariantNode=iA(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];void 0!==a[e]&&re(t)&&t.set(a[e],!1)}}mount(e){this.current=e,ot.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),oe.current||function(){if(oe.current=!0,ij.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>i7.current=e.matches;e.addListener(t),t()}else i7.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||i7.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in ot.delete(this.current),this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let r;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=p.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&N.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in iN){let t=iN[e];if(!t)continue;let{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):r$()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<oi.length;t++){let r=oi[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(let n in t){let i=t[n],o=r[n];if(re(i))e.addValue(n,i);else if(re(o))e.addValue(n,t9(i,{owner:e}));else if(o!==i){if(e.hasValue(n)){let t=e.getValue(n);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(n);e.addValue(n,t9(void 0!==t?t:i,{owner:e}))}}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=t9(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){var r;let n=void 0===this.latestValues[e]&&this.current?null!==(r=this.getBaseTargetFromProps(this.props,e))&&void 0!==r?r:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&(Y(n)||K(n))?n=parseFloat(n):!on(n)&&eQ.test(t)&&(n=e5(e,t)),this.setBaseTarget(e,re(n)?n.get():n)),re(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let r;let{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let i=c(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||re(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new t4),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class os extends oo{constructor(){super(...arguments),this.KeyframeResolver=e3}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}}class oa extends os{constructor(){super(...arguments),this.type="html",this.renderInstance=iF}readValueFromInstance(e,t){if(p.has(t)){let e=e4(t);return e&&e.default||0}{let r=window.getComputedStyle(e),n=(J(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return r4(e,t)}build(e,t,r){iX(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return iV(e,t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;re(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class ol extends os{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=r$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(p.has(t)){let e=e4(t);return e&&e.default||0}return t=iz.has(t)?t:t8(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return iq(e,t,r)}build(e,t,r){i1(e,t,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,r,n){iU(e,t,r,n)}mount(e){this.isSVGTag=i2(e.tagName),super.mount(e)}}let oc=function(e){if("undefined"==typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(r,n)=>"create"===n?e:(t.has(n)||t.set(n,e(n)),t.get(n))})}((I={animation:{Feature:rh},exit:{Feature:rf},inView:{Feature:ik},tap:{Feature:iy},focus:{Feature:ip},hover:{Feature:id},pan:{Feature:ne},drag:{Feature:r8,ProjectionNode:iu,MeasureLayout:nf},layout:{ProjectionNode:iu,MeasureLayout:nf}},P=(e,t)=>iL(e)?new ol(t):new oa(t,{allowProjection:e!==nr.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&function(e){for(let t in e)iN[t]={...iN[t],...e[t]}}(e);let o=(0,nr.forwardRef)(function(e,o){var s;let l;let c={...(0,nr.useContext)(iS._),...e,layoutId:function({layoutId:e}){let t=(0,nr.useContext)(ni.p).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:u}=c,h=function(e){let{initial:t,animate:r}=function(e,t){if(iP(e)){let{initial:t,animate:r}=e;return{initial:!1===t||a(t)?t:void 0,animate:a(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,nr.useContext)(iE));return(0,nr.useMemo)(()=>({initial:t,animate:r}),[iO(t),iO(r)])}(e),d=n(e,u);if(!u&&ij.j){(0,nr.useContext)(iI).strict;let e=function(e){let{drag:t,layout:r}=iN;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(c);l=e.MeasureLayout,h.visualElement=function(e,t,r,n,i){var o,s;let{visualElement:a}=(0,nr.useContext)(iE),l=(0,nr.useContext)(iI),c=(0,nr.useContext)(iT.O),u=(0,nr.useContext)(iS._).reducedMotion,h=(0,nr.useRef)();n=n||l.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:a,props:r,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));let d=h.current,f=(0,nr.useContext)(no);d&&!d.projection&&i&&("html"===d.type||"svg"===d.type)&&function(e,t,r,n){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&rA(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}(h.current,r,i,f),(0,nr.useInsertionEffect)(()=>{d&&d.update(r,c)});let p=r[t7],m=(0,nr.useRef)(!!p&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,p))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,p)));return(0,iC.L)(()=>{d&&(window.MotionIsMounted=!0,d.updateFeatures(),nu.render(d.render),m.current&&d.animationState&&d.animationState.animateChanges())}),(0,nr.useEffect)(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,p)}),m.current=!1))}),d}(i,d,c,t,e.ProjectionNode)}return(0,nt.jsxs)(iE.Provider,{value:h,children:[l&&h.visualElement?(0,nt.jsx)(l,{visualElement:h.visualElement,...c}):null,r(i,e,(s=h.visualElement,(0,nr.useCallback)(e=>{e&&d.mount&&d.mount(e),s&&(e?s.mount(e):s.unmount()),o&&("function"==typeof o?o(e):rA(o)&&(o.current=e))},[s])),d,u,h.visualElement)]})});return o[iD]=i,o}({...iL(e)?i4:i5,preloadedFeatures:I,useRender:function(e=!1){return(t,r,n,{latestValues:i},o)=>{let s=(iL(t)?function(e,t,r,n){let i=(0,nr.useMemo)(()=>{let r=iG();return i1(r,t,i2(n),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};i6(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let r={},n=function(e,t){let r=e.style||{},n={};return i6(n,r,e),Object.assign(n,function({transformTemplate:e},t){return(0,nr.useMemo)(()=>{let r=iH();return iX(r,t,e),Object.assign({},r.vars,r.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r})(r,i,o,t),a=function(e,t,r){let n={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(i8(i)||!0===r&&i9(i)||!t&&!i9(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),l=t!==nr.Fragment?{...a,...s,ref:n}:{},{children:c}=r,u=(0,nr.useMemo)(()=>re(c)?c.get():c,[c]);return(0,nr.createElement)(t,{...l,children:u})}}(t),createVisualElement:P,Component:e})}))},45487:function(e,t,r){"use strict";r.d(t,{K:function(){return i},k:function(){return o}});var n=r(81662);let i=n.Z,o=n.Z},11741:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});let n="undefined"!=typeof window},81662:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=e=>e},96681:function(e,t,r){"use strict";r.d(t,{h:function(){return i}});var n=r(67294);function i(e){let t=(0,n.useRef)(null);return null===t.current&&(t.current=e()),t.current}},58868:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(67294);let i=r(11741).j?n.useLayoutEffect:n.useEffect},53416:function(e,t,r){"use strict";r.d(t,{x0:function(){return n}});let n=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"")},67751:function(e,t,r){"use strict";r.d(t,{j:function(){return i}});let n={};function i(){return n}},69005:function(e,t,r){"use strict";r.d(t,{dP:function(){return i},jE:function(){return n}});let n=6048e5,i=864e5},75696:function(e,t,r){"use strict";function n(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}r.d(t,{L:function(){return n}})},19126:function(e,t,r){"use strict";r.d(t,{WU:function(){return U}});let n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function i(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}let o={date:i({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:i({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:i({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function a(e){return(t,r)=>{let n;if("formatting"===((null==r?void 0:r.context)?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=(null==r?void 0:r.width)?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=(null==r?void 0:r.width)?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t){let r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;let a=s[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(l,e=>e.test(a)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(l,e=>e.test(a));return r=e.valueCallback?e.valueCallback(c):c,{value:r=n.valueCallback?n.valueCallback(r):r,rest:t.slice(a.length)}}}let c={code:"en-US",formatDistance:(e,t,r)=>{let i;let o=n[e];return(i="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null==r?void 0:r.addSuffix)?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},formatLong:o,formatRelative:(e,t,r,n)=>s[e],localize:{ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:a({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:a({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:a({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:a({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:a({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(u={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(u.matchPattern);if(!r)return null;let n=r[0],i=e.match(u.parsePattern);if(!i)return null;let o=u.valueCallback?u.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(n.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var u,h=r(67751),d=r(69005),f=r(63923);function p(e){let t=(0,f.Q)(e);return t.setHours(0,0,0,0),t}function m(e){let t=(0,f.Q)(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}var g=r(75696),y=r(17660);function v(e){return(0,y.z)(e,{weekStartsOn:1})}function b(e){let t=(0,f.Q)(e),r=t.getFullYear(),n=(0,g.L)(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=v(n),o=(0,g.L)(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=v(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}var w=r(19900),_=r(53584);function x(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}let k={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return x("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):x(r+1,2)},d:(e,t)=>x(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>x(e.getHours()%12||12,t.length),H:(e,t)=>x(e.getHours(),t.length),m:(e,t)=>x(e.getMinutes(),t.length),s:(e,t)=>x(e.getSeconds(),t.length),S(e,t){let r=t.length;return x(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},S={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={G:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return k.y(e,t)},Y:function(e,t,r,n){let i=(0,_.c)(e,n),o=i>0?i:1-i;return"YY"===t?x(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):x(o,t.length)},R:function(e,t){return x(b(e),t.length)},u:function(e,t){return x(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return x(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return x(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return k.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return x(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let i=(0,w.Q)(e,n);return"wo"===t?r.ordinalNumber(i,{unit:"week"}):x(i,t.length)},I:function(e,t,r){let n=function(e){let t=(0,f.Q)(e);return Math.round((+v(t)-+function(e){let t=b(e),r=(0,g.L)(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),v(r)}(t))/d.jE)+1}(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):x(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):k.d(e,t)},D:function(e,t,r){let n=function(e){let t=(0,f.Q)(e);return function(e,t){let r=p(e),n=p(t);return Math.round((+r-m(r)-(+n-m(n)))/d.dP)}(t,function(e){let t=(0,f.Q)(e),r=(0,g.L)(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}(t))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):x(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return x(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return x(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return x(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n;let i=e.getHours();switch(n=12===i?S.noon:0===i?S.midnight:i/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n;let i=e.getHours();switch(n=i>=17?S.evening:i>=12?S.afternoon:i>=4?S.morning:S.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return k.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):k.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):x(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):x(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):k.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):k.s(e,t)},S:function(e,t){return k.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return C(n);case"XXXX":case"XX":return I(n);default:return I(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return C(n);case"xxxx":case"xx":return I(n);default:return I(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+T(n,":");default:return"GMT"+I(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+T(n,":");default:return"GMT"+I(n,":")}},t:function(e,t,r){return x(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,r){return x(e.getTime(),t.length)}};function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return 0===o?r+String(i):r+String(i)+t+x(o,2)}function C(e,t){return e%60==0?(e>0?"-":"+")+x(Math.abs(e)/60,2):I(e,t)}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=Math.abs(e);return(e>0?"-":"+")+x(Math.trunc(r/60),2)+t+x(r%60,2)}let P=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},A=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},O={p:A,P:(e,t)=>{let r;let n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return P(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",P(i,t)).replace("{{time}}",A(o,t))}},R=/^D+$/,N=/^Y+$/,j=["D","DD","YY","YYYY"],D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,M=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L=/^'([^]*?)'?$/,F=/''/g,z=/[a-zA-Z]/;function U(e,t,r){var n,i,o,s,a,l,u,d,p,m,g,y,v,b,w,_,x,k;let S=(0,h.j)(),T=null!==(m=null!==(p=null==r?void 0:r.locale)&&void 0!==p?p:S.locale)&&void 0!==m?m:c,C=null!==(b=null!==(v=null!==(y=null!==(g=null==r?void 0:r.firstWeekContainsDate)&&void 0!==g?g:null==r?void 0:null===(i=r.locale)||void 0===i?void 0:null===(n=i.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==y?y:S.firstWeekContainsDate)&&void 0!==v?v:null===(s=S.locale)||void 0===s?void 0:null===(o=s.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==b?b:1,I=null!==(k=null!==(x=null!==(_=null!==(w=null==r?void 0:r.weekStartsOn)&&void 0!==w?w:null==r?void 0:null===(l=r.locale)||void 0===l?void 0:null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==_?_:S.weekStartsOn)&&void 0!==x?x:null===(d=S.locale)||void 0===d?void 0:null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==k?k:0,P=(0,f.Q)(e);if(!((P instanceof Date||"object"==typeof P&&"[object Date]"===Object.prototype.toString.call(P)||"number"==typeof P)&&!isNaN(Number((0,f.Q)(P)))))throw RangeError("Invalid time value");let A=t.match(M).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,O[t])(e,T.formatLong):e}).join("").match(D).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t)return{isToken:!1,value:function(e){let t=e.match(L);return t?t[1].replace(F,"'"):e}(e)};if(E[t])return{isToken:!0,value:e};if(t.match(z))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});T.localize.preprocessor&&(A=T.localize.preprocessor(P,A));let U={firstWeekContainsDate:C,weekStartsOn:I,locale:T};return A.map(n=>{if(!n.isToken)return n.value;let i=n.value;return(!(null==r?void 0:r.useAdditionalWeekYearTokens)&&N.test(i)||!(null==r?void 0:r.useAdditionalDayOfYearTokens)&&R.test(i))&&function(e,t,r){let n=function(e,t,r){let n="Y"===e[0]?"years":"days of the month";return"Use `".concat(e.toLowerCase(),"` instead of `").concat(e,"` (in `").concat(t,"`) for formatting ").concat(n," to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(e,t,r);if(console.warn(n),j.includes(e))throw RangeError(n)}(i,t,String(e)),(0,E[i[0]])(P,i,T.localize,U)}).join("")}},19900:function(e,t,r){"use strict";r.d(t,{Q:function(){return c}});var n=r(69005),i=r(17660),o=r(75696),s=r(53584),a=r(67751),l=r(63923);function c(e,t){let r=(0,l.Q)(e);return Math.round((+(0,i.z)(r,t)-+function(e,t){var r,n,l,c,u,h,d,f;let p=(0,a.j)(),m=null!==(f=null!==(d=null!==(h=null!==(u=null==t?void 0:t.firstWeekContainsDate)&&void 0!==u?u:null==t?void 0:null===(n=t.locale)||void 0===n?void 0:null===(r=n.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==h?h:p.firstWeekContainsDate)&&void 0!==d?d:null===(c=p.locale)||void 0===c?void 0:null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==f?f:1,g=(0,s.c)(e,t),y=(0,o.L)(e,0);return y.setFullYear(g,0,m),y.setHours(0,0,0,0),(0,i.z)(y,t)}(r,t))/n.jE)+1}},53584:function(e,t,r){"use strict";r.d(t,{c:function(){return a}});var n=r(75696),i=r(17660),o=r(63923),s=r(67751);function a(e,t){var r,a,l,c,u,h,d,f;let p=(0,o.Q)(e),m=p.getFullYear(),g=(0,s.j)(),y=null!==(f=null!==(d=null!==(h=null!==(u=null==t?void 0:t.firstWeekContainsDate)&&void 0!==u?u:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(r=a.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==h?h:g.firstWeekContainsDate)&&void 0!==d?d:null===(c=g.locale)||void 0===c?void 0:null===(l=c.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==f?f:1,v=(0,n.L)(e,0);v.setFullYear(m+1,0,y),v.setHours(0,0,0,0);let b=(0,i.z)(v,t),w=(0,n.L)(e,0);w.setFullYear(m,0,y),w.setHours(0,0,0,0);let _=(0,i.z)(w,t);return p.getTime()>=b.getTime()?m+1:p.getTime()>=_.getTime()?m:m-1}},17660:function(e,t,r){"use strict";r.d(t,{z:function(){return o}});var n=r(63923),i=r(67751);function o(e,t){var r,o,s,a,l,c,u,h;let d=(0,i.j)(),f=null!==(h=null!==(u=null!==(c=null!==(l=null==t?void 0:t.weekStartsOn)&&void 0!==l?l:null==t?void 0:null===(o=t.locale)||void 0===o?void 0:null===(r=o.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==c?c:d.weekStartsOn)&&void 0!==u?u:null===(a=d.locale)||void 0===a?void 0:null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==h?h:0,p=(0,n.Q)(e),m=p.getDay();return p.setDate(p.getDate()-((m<f?7:0)+m-f)),p.setHours(0,0,0,0),p}},63923:function(e,t,r){"use strict";function n(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}r.d(t,{Q:function(){return n}})},15581:function(e,t,r){"use strict";r.d(t,{MhC:function(){return o},mny:function(){return i},oHP:function(){return s}});var n=r(67796);function i(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"},child:[]}]})(e)}function o(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm234.8 736.5L223.5 277.2c16-19.7 34-37.7 53.7-53.7l523.3 523.3c-16 19.6-34 37.7-53.7 53.7z"},child:[]}]})(e)}function s(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(e)}},55346:function(e,t,r){"use strict";r.d(t,{KKr:function(){return c},N$0:function(){return a},NTS:function(){return l},THo:function(){return s},Zf_:function(){return o},tBk:function(){return i}});var n=r(67796);function i(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"},child:[]}]})(e)}function o(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"},child:[]}]})(e)}function s(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M488 192H336v56c0 39.7-32.3 72-72 72s-72-32.3-72-72V126.4l-64.9 39C107.8 176.9 96 197.8 96 220.2v47.3l-80 46.2C.7 322.5-4.6 342.1 4.3 357.4l80 138.6c8.8 15.3 28.4 20.5 43.7 11.7L231.4 448H368c35.3 0 64-28.7 64-64h16c17.7 0 32-14.3 32-32v-64h8c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zm147.7-37.4L555.7 16C546.9.7 527.3-4.5 512 4.3L408.6 64H306.4c-12 0-23.7 3.4-33.9 9.7L239 94.6c-9.4 5.8-15 16.1-15 27.1V248c0 22.1 17.9 40 40 40s40-17.9 40-40v-88h184c30.9 0 56 25.1 56 56v28.5l80-46.2c15.3-8.9 20.5-28.4 11.7-43.7z"},child:[]}]})(e)}function a(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-75.078 384H99.08c17.059-46.797 52.096-80 92.92-80 40.821 0 75.862 33.196 92.922 80zm.019-256H99.078C91.988 108.548 88 86.748 88 64h208c0 22.805-3.987 44.587-11.059 64z"},child:[]}]})(e)}function l(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M232 224h56v56a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-56h56a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8h-56v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56h-56a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8zM576 48a48.14 48.14 0 0 0-48-48H112a48.14 48.14 0 0 0-48 48v336h512zm-64 272H128V64h384zm112 96H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33-17.47-32.77-32H16a16 16 0 0 0-16 16v16a64.19 64.19 0 0 0 64 64h512a64.19 64.19 0 0 0 64-64v-16a16 16 0 0 0-16-16z"},child:[]}]})(e)}function c(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M160 448c-25.6 0-51.2-22.4-64-32-64-44.8-83.2-60.8-96-70.4V480c0 17.67 14.33 32 32 32h256c17.67 0 32-14.33 32-32V345.6c-12.8 9.6-32 25.6-96 70.4-12.8 9.6-38.4 32-64 32zm128-192H32c-17.67 0-32 14.33-32 32v16c25.6 19.2 22.4 19.2 115.2 86.4 9.6 6.4 28.8 25.6 44.8 25.6s35.2-19.2 44.8-22.4c92.8-67.2 89.6-67.2 115.2-86.4V288c0-17.67-14.33-32-32-32zm256-96H224c-17.67 0-32 14.33-32 32v32h96c33.21 0 60.59 25.42 63.71 57.82l.29-.22V416h192c17.67 0 32-14.33 32-32V192c0-17.67-14.33-32-32-32zm-32 128h-64v-64h64v64zm-352-96c0-35.29 28.71-64 64-64h224V32c0-17.67-14.33-32-32-32H96C78.33 0 64 14.33 64 32v192h96v-32z"},child:[]}]})(e)}},67796:function(e,t,r){"use strict";r.d(t,{w_:function(){return u},Pd:function(){return o}});var n=r(67294),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=n.createContext&&n.createContext(i),s=["attr","size","title"];function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e){return t=>n.createElement(h,a({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,r)=>n.createElement(t.tag,c({key:r},t.attr),e(t.child)))}(e.child))}function h(e){var t=t=>{var r,{attr:i,size:o,title:l}=e,u=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,s),h=o||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,u,{className:r,style:c(c({color:e.color||t.color},t.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&n.createElement("title",null,l),e.children)};return void 0!==o?n.createElement(o.Consumer,null,e=>t(e)):t(i)}},50788:function(e,t,r){"use strict";r.d(t,{ZSR:function(){return i},_OR:function(){return s},fE1:function(){return o},h24:function(){return l},hrt:function(){return a}});var n=r(67796);function i(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"},child:[]}]})(e)}function o(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"},child:[]}]})(e)}function s(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4zm-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84l-3.49 2.93zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2z"},child:[]}]})(e)}function a(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"},child:[]}]})(e)}function l(e){return(0,n.w_)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01.1-.7.3-1.37.59-1.98-.22-.02-.44-.03-.67-.03-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2H4zM10 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM20.75 16c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63zM17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},child:[]}]})(e)}},45007:function(e,t,r){"use strict";r.d(t,{I0:function(){return w},v9:function(){return d},zt:function(){return y}});var n=r(67294),i=r(31103),o=Symbol.for("react-redux-context"),s="undefined"!=typeof globalThis?globalThis:{},a=function(){if(!n.createContext)return{};let e=s[o]??(s[o]=new Map),t=e.get(n.createContext);return t||(t=n.createContext(null),e.set(n.createContext,t)),t}();function l(e=a){return function(){return n.useContext(e)}}var c=l(),u=()=>{throw Error("uSES not initialized!")},h=(e,t)=>e===t,d=function(e=a){let t=e===a?c:l(e),r=(e,r={})=>{let{equalityFn:i=h,devModeChecks:o={}}="function"==typeof r?{equalityFn:r}:r,{store:s,subscription:a,getServerState:l,stabilityCheck:c,identityFunctionCheck:d}=t();n.useRef(!0);let f=n.useCallback({[e.name]:t=>e(t)}[e.name],[e,c,o.stabilityCheck]),p=u(a.addNestedSub,s.getState,l||s.getState,f,i);return n.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}();Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen"),Symbol.for("react.client.reference");var f={notify(){},get:()=>[]},p=!!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement),m="undefined"!=typeof navigator&&"ReactNative"===navigator.product,g=p||m?n.useLayoutEffect:n.useEffect,y=function({store:e,context:t,children:r,serverState:i,stabilityCheck:o="once",identityFunctionCheck:s="once"}){let l=n.useMemo(()=>{let t=function(e,t){let r;let n=f,i=0,o=!1;function s(){c.onStateChange&&c.onStateChange()}function a(){if(i++,!r){let t,i;r=e.subscribe(s),t=null,i=null,n={clear(){t=null,i=null},notify(){(()=>{let e=t;for(;e;)e.callback(),e=e.next})()},get(){let e=[],r=t;for(;r;)e.push(r),r=r.next;return e},subscribe(e){let r=!0,n=i={callback:e,next:null,prev:i};return n.prev?n.prev.next=n:t=n,function(){r&&null!==t&&(r=!1,n.next?n.next.prev=n.prev:i=n.prev,n.prev?n.prev.next=n.next:t=n.next)}}}}}function l(){i--,r&&0===i&&(r(),r=void 0,n.clear(),n=f)}let c={addNestedSub:function(e){a();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),l())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:s,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,a())},tryUnsubscribe:function(){o&&(o=!1,l())},getListeners:()=>n};return c}(e);return{store:e,subscription:t,getServerState:i?()=>i:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,i,o,s]),c=n.useMemo(()=>e.getState(),[e]);return g(()=>{let{subscription:t}=l;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),c!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[l,c]),n.createElement((t||a).Provider,{value:l},r)};function v(e=a){let t=e===a?c:l(e),r=()=>{let{store:e}=t();return e};return Object.assign(r,{withTypes:()=>r}),r}var b=v(),w=function(e=a){let t=e===a?b:v(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}();u=i.useSyncExternalStoreWithSelector,n.useSyncExternalStore},65849:function(e,t,r){"use strict";function n(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}r.d(t,{LG:function(){return d},MT:function(){return l},PO:function(){return a},UY:function(){return c},md:function(){return h},qC:function(){return u}});var i="function"==typeof Symbol&&Symbol.observable||"@@observable",o=()=>Math.random().toString(36).substring(7).split("").join("."),s={INIT:`@@redux/INIT${o()}`,REPLACE:`@@redux/REPLACE${o()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o()}`};function a(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function l(e,t,r){if("function"!=typeof e)throw Error(n(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(n(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error(n(1));return r(l)(e,t)}let o=e,c=t,u=new Map,h=u,d=0,f=!1;function p(){h===u&&(h=new Map,u.forEach((e,t)=>{h.set(t,e)}))}function m(){if(f)throw Error(n(3));return c}function g(e){if("function"!=typeof e)throw Error(n(4));if(f)throw Error(n(5));let t=!0;p();let r=d++;return h.set(r,e),function(){if(t){if(f)throw Error(n(6));t=!1,p(),h.delete(r),u=null}}}function y(e){if(!a(e))throw Error(n(7));if(void 0===e.type)throw Error(n(8));if("string"!=typeof e.type)throw Error(n(17));if(f)throw Error(n(9));try{f=!0,c=o(c,e)}finally{f=!1}return(u=h).forEach(e=>{e()}),e}return y({type:s.INIT}),{dispatch:y,subscribe:g,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw Error(n(10));o=e,y({type:s.REPLACE})},[i]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(n(11));function t(){e.next&&e.next(m())}return t(),{unsubscribe:g(t)}},[i](){return this}}}}}function c(e){let t;let r=Object.keys(e),i={};for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof e[n]&&(i[n]=e[n])}let o=Object.keys(i);try{!function(e){Object.keys(e).forEach(t=>{let r=e[t];if(void 0===r(void 0,{type:s.INIT}))throw Error(n(12));if(void 0===r(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw Error(n(13))})}(i)}catch(e){t=e}return function(e={},r){if(t)throw t;let s=!1,a={};for(let t=0;t<o.length;t++){let l=o[t],c=i[l],u=e[l],h=c(u,r);if(void 0===h)throw r&&r.type,Error(n(14));a[l]=h,s=s||h!==u}return(s=s||o.length!==Object.keys(e).length)?a:e}}function u(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function h(...e){return t=>(r,i)=>{let o=t(r,i),s=()=>{throw Error(n(15))},a={getState:o.getState,dispatch:(e,...t)=>s(e,...t)};return s=u(...e.map(e=>e(a)))(o.dispatch),{...o,dispatch:s}}}function d(e){return a(e)&&"type"in e&&"string"==typeof e.type}},97582:function(e,t,r){"use strict";r.d(t,{Jh:function(){return l},ZT:function(){return i},_T:function(){return s},ev:function(){return c},mG:function(){return a},pi:function(){return o}});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function c(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(43079)}),_N_E=e.O()}]);